mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
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:
parent
5dd63a69da
commit
7ce82f1dec
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue