.......testing will remove it

This commit is contained in:
wildcard 2025-08-27 02:26:59 +02:00
parent 44d658bbc5
commit d92e3d747f

View file

@ -306,7 +306,12 @@ bool MemoryAllocator::TryAllocMemory(VkMemoryPropertyFlags flags, u32 type_mask,
vk::DeviceMemory memory = device.GetLogical().TryAllocateMemory({ vk::DeviceMemory memory = device.GetLogical().TryAllocateMemory({
.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
.pNext = nullptr, .pNext = nullptr,
.allocationSize = size, /* AMD drivers (including Adreno) require 4KB alignment */
.allocationSize = (device.GetDriverID() == VK_DRIVER_ID_AMD_PROPRIETARY ||
device.GetDriverID() == VK_DRIVER_ID_AMD_OPEN_SOURCE ||
device.GetDriverID() == VK_DRIVER_ID_QUALCOMM_PROPRIETARY) ?
((size + 4095) & ~4095) : /* AMD (AMDVLK, RADV, RadeonSI) & Adreno */
size, /* Others (NVIDIA, Intel, Mali, etc) */
.memoryTypeIndex = type, .memoryTypeIndex = type,
}); });
if (!memory) { if (!memory) {