diff --git a/src/graphics/host_gpu/vma.cpp b/src/graphics/host_gpu/vma.cpp index 944066fff..870c3a833 100644 --- a/src/graphics/host_gpu/vma.cpp +++ b/src/graphics/host_gpu/vma.cpp @@ -151,7 +151,8 @@ bool GraphicContext::CreateImage(const vk::ImageCreateInfo& image_info, VulkanIm EXIT_IF(allocator == nullptr || image.image != nullptr || image.allocation != nullptr); VmaAllocationCreateInfo alloc_info {}; - alloc_info.requiredFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; + alloc_info.flags = VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT; + alloc_info.usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE; vk::Image::CType native_image = VK_NULL_HANDLE; const auto result = static_cast( diff --git a/tests/ShaderRecompilerComputeTests.cpp b/tests/ShaderRecompilerComputeTests.cpp index 95eb63b9e..0ec998f33 100644 --- a/tests/ShaderRecompilerComputeTests.cpp +++ b/tests/ShaderRecompilerComputeTests.cpp @@ -2186,9 +2186,9 @@ public: VkMemoryPropertyFlags properties{}; vmaGetAllocationMemoryProperties(graphics.allocator, image.allocation, &properties); - Require(name, "allocation policy", + Require(name, "small allocation preference", (properties & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) != 0, - "native image lost its device-local memory requirement"); + "native image did not prefer available device-local memory"); // A reused presentation image may still describe its previous recording. // No commands use this fixture; seed that bookkeeping before retirement.