Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- libs/vkd3d/command.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index b4fd6cf3..271524b7 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -3498,12 +3498,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12Graphic assert(d3d12_resource_is_texture(dst_resource)); assert(d3d12_resource_is_buffer(src_resource));
- if (!(src_format = vkd3d_format_from_d3d12_resource_desc(list->device, - &dst_resource->desc, src->u.PlacedFootprint.Footprint.Format))) - { - WARN("Invalid format %#x.\n", src->u.PlacedFootprint.Footprint.Format); - return; - } + src_format = dst_resource->format;
if (src_format->is_emulated) { @@ -3527,18 +3522,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12Graphic assert(d3d12_resource_is_texture(dst_resource)); assert(d3d12_resource_is_texture(src_resource));
- if (!(dst_format = vkd3d_format_from_d3d12_resource_desc(list->device, - &dst_resource->desc, DXGI_FORMAT_UNKNOWN))) - { - WARN("Invalid format %#x.\n", dst_resource->desc.Format); - return; - } - if (!(src_format = vkd3d_format_from_d3d12_resource_desc(list->device, - &src_resource->desc, DXGI_FORMAT_UNKNOWN))) - { - WARN("Invalid format %#x.\n", src_resource->desc.Format); - return; - } + dst_format = dst_resource->format; + src_format = src_resource->format;
if ((dst_format->vk_aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) && (dst_format->vk_aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT))