mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
zink: fix use_reusable_pool condition
The code originally disabled reuse whenever a pNext was passed to
`bo_create_internal`, however code has been added before it that messed
with the pointer disabling it more often that necessary.
Rearrange code to restore the original check.
cc: mesa-stable
(cherry picked from commit 6a68542167)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39462>
This commit is contained in:
parent
0107186f1c
commit
e335212d83
2 changed files with 4 additions and 4 deletions
|
|
@ -594,7 +594,7 @@
|
|||
"description": "zink: fix use_reusable_pool condition",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -255,6 +255,9 @@ bo_create_internal(struct zink_screen *screen,
|
|||
struct zink_bo *bo = NULL;
|
||||
bool init_pb_cache;
|
||||
|
||||
/* all non-suballocated bo can cache */
|
||||
init_pb_cache = !pNext;
|
||||
|
||||
alignment = get_optimal_alignment(screen, size, alignment);
|
||||
|
||||
VkMemoryAllocateFlagsInfo ai;
|
||||
|
|
@ -288,9 +291,6 @@ bo_create_internal(struct zink_screen *screen,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* all non-suballocated bo can cache */
|
||||
init_pb_cache = !pNext;
|
||||
|
||||
if (!bo)
|
||||
bo = CALLOC(1, sizeof(struct zink_bo) + init_pb_cache * sizeof(struct pb_cache_entry));
|
||||
if (!bo) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue