vkd3d: Fix copies between footprint and DS aspects.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2021-09-06 16:27:36 +02:00
parent fa1d82e141
commit a3267ba8e5
1 changed files with 2 additions and 18 deletions

View File

@ -6059,22 +6059,12 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(d3d12_command
assert(d3d12_resource_is_texture(src_resource));
if (!(dst_format = vkd3d_format_from_d3d12_resource_desc(list->device,
&src_resource->desc, dst->PlacedFootprint.Footprint.Format)))
&src_resource->desc, DXGI_FORMAT_UNKNOWN)))
{
WARN("Invalid format %#x.\n", dst->PlacedFootprint.Footprint.Format);
return;
}
if (dst_format->is_emulated)
{
FIXME("Format %#x is not supported yet.\n", dst_format->dxgi_format);
return;
}
if ((dst_format->vk_aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT)
&& (dst_format->vk_aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT))
FIXME("Destination depth-stencil format %#x not fully supported yet.\n", dst_format->dxgi_format);
vk_image_buffer_copy_from_d3d12(&buffer_image_copy, &dst->PlacedFootprint,
src->SubresourceIndex, &src_resource->desc, dst_format, src_box, dst_x, dst_y, dst_z);
buffer_image_copy.bufferOffset += dst_resource->mem.offset;
@ -6101,18 +6091,12 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(d3d12_command
assert(d3d12_resource_is_buffer(src_resource));
if (!(src_format = vkd3d_format_from_d3d12_resource_desc(list->device,
&dst_resource->desc, src->PlacedFootprint.Footprint.Format)))
&dst_resource->desc, DXGI_FORMAT_UNKNOWN)))
{
WARN("Invalid format %#x.\n", src->PlacedFootprint.Footprint.Format);
return;
}
if (src_format->is_emulated)
{
FIXME("Format %#x is not supported yet.\n", src_format->dxgi_format);
return;
}
vk_buffer_image_copy_from_d3d12(&buffer_image_copy, &src->PlacedFootprint,
dst->SubresourceIndex, &dst_resource->desc, src_format, src_box, dst_x, dst_y, dst_z);
buffer_image_copy.bufferOffset += src_resource->mem.offset;