mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user