Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- 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 b376ecd2..a2be9a81 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;