Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22855>
ai.pNext = pNext;
ai.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR;
ai.deviceMask = 0;
+ if (screen->info.have_KHR_buffer_device_address)
+ pNext = &ai;
VkMemoryAllocateInfo mai;
mai.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
- if (screen->info.have_KHR_buffer_device_address)
- mai.pNext = &ai;
- else
- mai.pNext = pNext;
+ mai.pNext = pNext;
mai.allocationSize = size;
mai.memoryTypeIndex = mem_type_idx;
if (screen->info.mem_props.memoryTypes[mai.memoryTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) {