1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 23:52:20 +01:00

[dxvk] Actually apply new create flags when relocating image

Fixes a derp that leads to validation errors when adding view formats.
This commit is contained in:
Philip Rebohle 2024-10-06 02:57:05 +02:00
parent 36907ec01c
commit 851f02fa58

View File

@ -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;
}