Conor McCarthy : vkd3d: Use the resource's stored format in vkd3d_create_image().
Alexandre Julliard
julliard at winehq.org
Wed Jan 19 15:52:10 CST 2022
Module: vkd3d
Branch: master
Commit: 70d87dcf37fa1f0c866d2cd0c8ee748032cc94a6
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=70d87dcf37fa1f0c866d2cd0c8ee748032cc94a6
Author: Conor McCarthy <cmccarthy at codeweavers.com>
Date: Tue Jan 18 14:58:59 2022 +1000
vkd3d: Use the resource's stored format in vkd3d_create_image().
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, 5 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index b376ecd..a2be9a8 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -855,7 +855,11 @@ static HRESULT vkd3d_create_image(struct d3d12_device *device,
VkImageCreateInfo image_info;
VkResult vr;
- if (!(format = vkd3d_format_from_d3d12_resource_desc(device, desc, 0)))
+ if (resource)
+ {
+ format = resource->format;
+ }
+ else if (!(format = vkd3d_format_from_d3d12_resource_desc(device, desc, 0)))
{
WARN("Invalid DXGI format %#x.\n", desc->Format);
return E_INVALIDARG;
More information about the wine-cvs
mailing list