From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/command.c | 6 +++--- libs/vkd3d/resource.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index eeae9cf4efe2..30b4ae344df8 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -4456,7 +4456,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_OMSetRenderTargets(ID3D12Graphi 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, dsv_desc->layer_count); - list->dsv_format = dsv_desc->format; + list->dsv_format = dsv_desc->format->vk_format; } else { @@ -4595,7 +4595,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12Gra d3d12_command_list_track_resource_usage(list, dsv_desc->resource);
attachment_desc.flags = 0; - attachment_desc.format = dsv_desc->format; + attachment_desc.format = dsv_desc->format->vk_format; attachment_desc.samples = dsv_desc->sample_count; if (flags & D3D12_CLEAR_FLAG_DEPTH) { @@ -4643,7 +4643,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearRenderTargetView(ID3D12Gra d3d12_command_list_track_resource_usage(list, rtv_desc->resource);
attachment_desc.flags = 0; - attachment_desc.format = rtv_desc->format; + attachment_desc.format = rtv_desc->format->vk_format; attachment_desc.samples = rtv_desc->sample_count; attachment_desc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; attachment_desc.storeOp = VK_ATTACHMENT_STORE_OP_STORE; diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index e0e1aadf62ba..054ad3fe5039 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -2827,8 +2827,8 @@ void d3d12_rtv_desc_create_rtv(struct d3d12_rtv_desc *rtv_desc, struct d3d12_dev return;
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->format = vkd3d_desc.format; 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; @@ -2910,8 +2910,8 @@ void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_dev return;
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->format = vkd3d_desc.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; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 6e2dc2b2bb8e..fe939e548258 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -513,8 +513,8 @@ HRESULT vkd3d_create_static_sampler(struct d3d12_device *device, struct d3d12_rtv_desc { uint32_t magic; - VkFormat format; VkSampleCountFlagBits sample_count; + const struct vkd3d_format *format; uint64_t width; unsigned int height; unsigned int layer_count; @@ -533,8 +533,8 @@ void d3d12_rtv_desc_create_rtv(struct d3d12_rtv_desc *rtv_desc, struct d3d12_dev struct d3d12_dsv_desc { uint32_t magic; - VkFormat format; VkSampleCountFlagBits sample_count; + const struct vkd3d_format *format; uint64_t width; unsigned int height; unsigned int layer_count;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com