From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/command.c | 4 ++-- libs/vkd3d/resource.c | 2 ++ libs/vkd3d/vkd3d_private.h | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 7e7b3ee5d9c7..542c484f4bd4 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -3677,7 +3677,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12Gra
attachment_desc.flags = 0; attachment_desc.format = dsv_desc->format; - attachment_desc.samples = VK_SAMPLE_COUNT_1_BIT; + attachment_desc.samples = dsv_desc->sample_count; if (flags & D3D12_CLEAR_FLAG_DEPTH) { attachment_desc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; @@ -3725,7 +3725,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearRenderTargetView(ID3D12Gra
attachment_desc.flags = 0; attachment_desc.format = rtv_desc->format; - attachment_desc.samples = VK_SAMPLE_COUNT_1_BIT; + attachment_desc.samples = rtv_desc->sample_count; attachment_desc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; attachment_desc.storeOp = VK_ATTACHMENT_STORE_OP_STORE; attachment_desc.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 55abd50c2c67..cb1427f94a4a 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -2058,6 +2058,7 @@ void d3d12_rtv_desc_create_rtv(struct d3d12_rtv_desc *rtv_desc, struct d3d12_dev
rtv_desc->magic = VKD3D_DESCRIPTOR_MAGIC_RTV; rtv_desc->format = vkd3d_desc.format->vk_format; + rtv_desc->sample_count = vk_samples_from_dxgi_sample_desc(&resource->desc.SampleDesc); rtv_desc->width = d3d12_resource_desc_get_width(&resource->desc, vkd3d_desc.miplevel_idx); rtv_desc->height = d3d12_resource_desc_get_height(&resource->desc, vkd3d_desc.miplevel_idx); rtv_desc->layer_count = vkd3d_desc.layer_count; @@ -2130,6 +2131,7 @@ void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_dev
dsv_desc->magic = VKD3D_DESCRIPTOR_MAGIC_DSV; dsv_desc->format = vkd3d_desc.format->vk_format; + dsv_desc->sample_count = vk_samples_from_dxgi_sample_desc(&resource->desc.SampleDesc); 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; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 5f5798852290..4be160b89b9c 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -337,6 +337,7 @@ struct d3d12_rtv_desc { uint32_t magic; VkFormat format; + VkSampleCountFlagBits sample_count; uint64_t width; unsigned int height; unsigned int layer_count; @@ -356,6 +357,7 @@ struct d3d12_dsv_desc { uint32_t magic; VkFormat format; + VkSampleCountFlagBits sample_count; uint64_t width; unsigned int height; unsigned int layer_count;