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

Alexandre Julliard julliard at winehq.org
Wed Jan 19 15:52:10 CST 2022


Module: vkd3d
Branch: master
Commit: e1f2325aec9440f69aca1717e516d200c89f8f56
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=e1f2325aec9440f69aca1717e516d200c89f8f56

Author: Conor McCarthy <cmccarthy at codeweavers.com>
Date:   Tue Jan 18 14:59:31 2022 +1000

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

Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 f81caa9..a4d16ee 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);




More information about the wine-cvs mailing list