[PATCH vkd3d 6/6] vkd3d: Use the resource's stored format in d3d12_resource_ReadFromSubresource().

Conor McCarthy cmccarthy at codeweavers.com
Mon Jan 17 22:59:31 CST 2022


Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
---
 libs/vkd3d/resource.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index f81caa9d..a4d16ee8 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -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);
-- 
2.34.1




More information about the wine-devel mailing list