zink: always use slab allocation placement for domains
this allows the actual bo to have its memory type changed if necessary Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13849>
This commit is contained in:
parent
4fc216b4ba
commit
74d2e89201
|
@ -826,7 +826,6 @@ static struct pb_slab *
|
|||
bo_slab_alloc(void *priv, unsigned heap, unsigned entry_size, unsigned group_index, bool encrypted)
|
||||
{
|
||||
struct zink_screen *screen = priv;
|
||||
VkMemoryPropertyFlags domains = vk_domain_from_heap(heap);
|
||||
uint32_t base_id;
|
||||
unsigned slab_size = 0;
|
||||
struct zink_slab *slab = CALLOC_STRUCT(zink_slab);
|
||||
|
@ -895,7 +894,6 @@ bo_slab_alloc(void *priv, unsigned heap, unsigned entry_size, unsigned group_ind
|
|||
bo->base.size = entry_size;
|
||||
bo->base.vtbl = &bo_slab_vtbl;
|
||||
bo->offset = slab->buffer->offset + i * entry_size;
|
||||
bo->base.placement = domains;
|
||||
bo->unique_id = base_id + i;
|
||||
bo->u.slab.entry.slab = &slab->base;
|
||||
bo->u.slab.entry.group_index = group_index;
|
||||
|
@ -909,6 +907,7 @@ bo_slab_alloc(void *priv, unsigned heap, unsigned entry_size, unsigned group_ind
|
|||
bo->u.slab.real = slab->buffer->u.slab.real;
|
||||
assert(bo->u.slab.real->mem);
|
||||
}
|
||||
bo->base.placement = bo->u.slab.real->base.placement;
|
||||
|
||||
list_addtail(&bo->u.slab.entry.head, &slab->base.free);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue