vulkan: don't set CREATE_DEDICATED_MEMORY flag for buffer memory.

It was being set all the time because of a code bug, but also documentation recommends using it very sparingly - partly because systems have a hard limit on the number of individual allocations (and they can also be a lot slower).

We might want to revisit more selective use of the flag in the future.
This commit is contained in:
Sasha Szpakowski
2023-02-14 20:18:26 -04:00
parent 139c68d197
commit 70a18e115f
-2
View File
@@ -78,8 +78,6 @@ bool Buffer::loadVolatile()
allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO;
if (dataUsage == BUFFERDATAUSAGE_READBACK)
allocCreateInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT;
else if ((bufferInfo.usage | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT) || (bufferInfo.usage | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT))
allocCreateInfo.flags = VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT;
auto result = vmaCreateBuffer(allocator, &bufferInfo, &allocCreateInfo, &buffer, &allocation, &allocInfo);
if (result != VK_SUCCESS)