vkd3d: Use the resource's stored format in d3d12_resource_ReadFromSubresource().

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Conor McCarthy 2022-01-18 14:59:31 +10:00 committed by Alexandre Julliard
parent 4c3ecdf5fd
commit e1f2325aec

View File

@ -1441,11 +1441,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_resource_ReadFromSubresource(ID3D12Resour
device = resource->device;
vk_procs = &device->vk_procs;
if (!(format = vkd3d_format_from_d3d12_resource_desc(device, &resource->desc, 0)))
{
ERR("Invalid DXGI format %#x.\n", resource->desc.Format);
return E_INVALIDARG;
}
format = resource->format;
if (format->vk_aspect_mask != VK_IMAGE_ASPECT_COLOR_BIT)
{
FIXME("Not supported for format %#x.\n", format->dxgi_format);