zink: avoid infinite recursion on (very) small BAR systems in bo alloc

this should only try a full reclaim if possible, not unconditionally

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
This commit is contained in:
Mike Blumenkrantz
2024-02-02 09:08:04 -05:00
committed by Marge Bot
parent 817ca5147e
commit c6635c09d0
+2
View File
@@ -621,6 +621,8 @@ zink_bo_create(struct zink_screen *screen, uint64_t size, unsigned alignment, en
low_bound *= 2; //nvidia has fat textures or something
unsigned vk_heap_idx = screen->info.mem_props.memoryTypes[mem_type_idx].heapIndex;
reclaim_all = screen->info.mem_props.memoryHeaps[vk_heap_idx].size <= low_bound;
if (reclaim_all)
reclaim_all = clean_up_buffer_managers(screen);
}
entry = pb_slab_alloc_reclaimed(slabs, alloc_size, mem_type_idx, reclaim_all);
if (!entry) {