From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/command.c | 5 +++-- libs/vkd3d/resource.c | 1 + libs/vkd3d/vkd3d_private.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 5fd093617e3b..b4d8ecd75179 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -3681,7 +3681,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_OMSetRenderTargets(ID3D12Graphi list->views[0] = view->u.vk_image_view; list->fb_width = max(list->fb_width, dsv_desc->width); list->fb_height = max(list->fb_height, dsv_desc->height); - list->fb_layer_count = max(list->fb_layer_count, 1); + list->fb_layer_count = max(list->fb_layer_count, dsv_desc->layer_count); }
d3d12_command_list_invalidate_current_framebuffer(list); @@ -3841,7 +3841,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12Gra ds_reference.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
d3d12_command_list_clear(list, &attachment_desc, NULL, &ds_reference, - dsv_desc->view, dsv_desc->width, dsv_desc->height, 1, &clear_value, rect_count, rects); + dsv_desc->view, dsv_desc->width, dsv_desc->height, dsv_desc->layer_count, + &clear_value, rect_count, rects); }
static void STDMETHODCALLTYPE d3d12_command_list_ClearRenderTargetView(ID3D12GraphicsCommandList *iface, diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 98c703a9313d..d6330941127a 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -2131,6 +2131,7 @@ void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_dev dsv_desc->format = vkd3d_desc.format->vk_format; dsv_desc->width = d3d12_resource_desc_get_width(&resource->desc, vkd3d_desc.miplevel_idx); dsv_desc->height = d3d12_resource_desc_get_height(&resource->desc, vkd3d_desc.miplevel_idx); + dsv_desc->layer_count = vkd3d_desc.layer_count; dsv_desc->view = view; dsv_desc->resource = resource; } diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index bffae35fb830..d744af5a5bac 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -358,6 +358,7 @@ struct d3d12_dsv_desc VkFormat format; uint64_t width; unsigned int height; + unsigned int layer_count; struct vkd3d_view *view; struct d3d12_resource *resource; };