mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-04 06:00:23 +00:00
Round up buffer allocation sizes to nonCoherentAtomSize
.
For some Vega APUs. Or don't use VK_WHOLE_SIZE?
This commit is contained in:
parent
f77a73ce8a
commit
6c737dc734
@ -1011,6 +1011,12 @@ static void CreateOrResizeBuffer(struct device_data *data,
|
||||
if (*buffer_memory)
|
||||
data->vtable.FreeMemory(data->device, *buffer_memory, NULL);
|
||||
|
||||
if (data->properties.limits.nonCoherentAtomSize > 0)
|
||||
{
|
||||
VkDeviceSize atom_size = data->properties.limits.nonCoherentAtomSize - 1;
|
||||
new_size = (new_size + atom_size) & ~atom_size;
|
||||
}
|
||||
|
||||
VkBufferCreateInfo buffer_info = {};
|
||||
buffer_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
|
||||
buffer_info.size = new_size;
|
||||
|
Loading…
Reference in New Issue
Block a user