mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
panvk: allow panvk_pool_alloc_mem to use full slab_size
We waste the last chunk if the last alloc happen to match the size.
Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37861>
(cherry picked from commit dcd2a99415)
This commit is contained in:
parent
273232abd4
commit
0a491ccfa8
2 changed files with 2 additions and 2 deletions
|
|
@ -1184,7 +1184,7 @@
|
|||
"description": "panvk: allow panvk_pool_alloc_mem to use full slab_size",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ panvk_pool_alloc_mem(struct panvk_pool *pool, struct panvk_pool_alloc_info info)
|
|||
unsigned offset = ALIGN_POT(pool->transient_offset, info.alignment);
|
||||
|
||||
/* If we don't fit, allocate a new backing */
|
||||
if (unlikely(bo == NULL || (offset + info.size) >= pool->base.slab_size)) {
|
||||
if (unlikely(bo == NULL || (offset + info.size) > pool->base.slab_size)) {
|
||||
bo = panvk_pool_alloc_backing(pool, info.size);
|
||||
offset = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue