mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
iris: Set BO_ALLOC_NO_SUBALLOC when allocating bo for slab
Without setting BO_ALLOC_NO_SUBALLOC iris_bo_alloc() will attempt to get bo from slabs again. Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27734>
This commit is contained in:
parent
4f165117dc
commit
de94d98940
1 changed files with 5 additions and 5 deletions
|
|
@ -723,7 +723,7 @@ iris_slab_alloc(void *priv,
|
|||
{
|
||||
struct iris_bufmgr *bufmgr = priv;
|
||||
struct iris_slab *slab = calloc(1, sizeof(struct iris_slab));
|
||||
uint32_t flags;
|
||||
uint32_t flags = BO_ALLOC_NO_SUBALLOC;
|
||||
unsigned slab_size = 0;
|
||||
/* We only support slab allocation for IRIS_MEMZONE_OTHER */
|
||||
enum iris_memory_zone memzone = IRIS_MEMZONE_OTHER;
|
||||
|
|
@ -777,13 +777,13 @@ iris_slab_alloc(void *priv,
|
|||
|
||||
if (heap == IRIS_HEAP_SYSTEM_MEMORY_CACHED_COHERENT ||
|
||||
heap == IRIS_HEAP_SYSTEM_MEMORY_UNCACHED)
|
||||
flags = BO_ALLOC_SMEM;
|
||||
flags |= BO_ALLOC_SMEM;
|
||||
else if (heap == IRIS_HEAP_DEVICE_LOCAL)
|
||||
flags = BO_ALLOC_LMEM;
|
||||
flags |= BO_ALLOC_LMEM;
|
||||
else if (heap == IRIS_HEAP_DEVICE_LOCAL_CPU_VISIBLE_SMALL_BAR)
|
||||
flags = BO_ALLOC_LMEM | BO_ALLOC_CPU_VISIBLE;
|
||||
flags |= BO_ALLOC_LMEM | BO_ALLOC_CPU_VISIBLE;
|
||||
else
|
||||
flags = BO_ALLOC_PLAIN;
|
||||
flags |= BO_ALLOC_PLAIN;
|
||||
|
||||
slab->bo =
|
||||
iris_bo_alloc(bufmgr, "slab", slab_size, slab_size, memzone, flags);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue