mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
panvk: improve big_bo_pool bo utilization
Better not cap at slab_size, otherwise the bo cache is purely wasting memory as it could only be used for up to slab_size upon re-use. This change unlocks the pool alloc limit to the actual bo size. Dropped the redundant pair of parentheses to stay in one line. Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37861>
This commit is contained in:
parent
dcd2a99415
commit
22ed6c3582
1 changed files with 1 additions and 1 deletions
|
|
@ -149,7 +149,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 > pan_kmod_bo_size(bo->bo))) {
|
||||
bo = panvk_pool_alloc_backing(pool, info.size);
|
||||
offset = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue