From 851f02fa58fabb0d51a67c3b5aa98fc27d86553c Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 6 Oct 2024 02:57:05 +0200 Subject: [PATCH] [dxvk] Actually apply new create flags when relocating image Fixes a derp that leads to validation errors when adding view formats. --- src/dxvk/dxvk_context.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index ce7343c4d..805cfea55 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -2059,12 +2059,15 @@ namespace dxvk { } // Allocate new backing storage and relocate the image - auto storage = image->createResourceWithUsage(usageInfo); + DxvkImageUsageInfo usage = usageInfo; + usage.flags |= createFlags; + + auto storage = image->createResourceWithUsage(usage); DxvkRelocateImageInfo relocateInfo; relocateInfo.image = image; relocateInfo.storage = storage; - relocateInfo.usageInfo = usageInfo; + relocateInfo.usageInfo = usage; relocateResources(0, nullptr, 1, &relocateInfo); return true; @@ -6530,9 +6533,7 @@ namespace dxvk { usageInfo.usage = usage; if (!isFormatCompatible) { - usageInfo.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT - | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT; - + usageInfo.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT; usageInfo.viewFormatCount = 1u; usageInfo.viewFormats = &viewFormat; }