zink: set higher prio on dedicated memory allocations

this should guarantee that e.g., swapchain type images aren't paged
out

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22855>
This commit is contained in:
Mike Blumenkrantz 2023-05-03 16:37:54 -04:00 committed by Marge Bot
parent 5dd63a69da
commit 7ce82f1dec

View file

@ -268,6 +268,14 @@ bo_create_internal(struct zink_screen *screen,
if (screen->info.have_KHR_buffer_device_address)
pNext = &ai;
VkMemoryPriorityAllocateInfoEXT prio = {
VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT,
pNext,
(flags & ZINK_ALLOC_NO_SUBALLOC) ? 1.0 : 0.5,
};
if (screen->info.have_EXT_memory_priority)
pNext = &prio;
VkMemoryAllocateInfo mai;
mai.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
mai.pNext = pNext;