Lines Matching refs:real
51 * Sub-allocation information for a real buffer used as backing memory of a
130 if (bo->mem && !bo->u.real.use_reusable_pool) {
131 simple_mtx_lock(&bo->u.real.export_lock);
132 list_for_each_entry_safe(struct bo_export, export, &bo->u.real.exports, link) {
138 simple_mtx_unlock(&bo->u.real.export_lock);
139 simple_mtx_destroy(&bo->u.real.export_lock);
143 if (!bo->u.real.is_user_ptr && bo->u.real.cpu_ptr) {
144 bo->u.real.map_count = 1;
145 bo->u.real.cpu_ptr = NULL;
233 if (bo->u.real.use_reusable_pool)
293 bo->u.real.use_reusable_pool = true;
297 list_inithead(&bo->u.real.exports);
298 simple_mtx_init(&bo->u.real.export_lock, mtx_plain);
668 struct zink_bo *real;
671 real = bo;
673 real = bo->u.slab.real;
674 offset = bo->offset - real->offset;
677 cpu = p_atomic_read(&real->u.real.cpu_ptr);
679 simple_mtx_lock(&real->lock);
682 cpu = real->u.real.cpu_ptr;
684 VkResult result = VKSCR(MapMemory)(screen->dev, real->mem, 0, real->base.size, 0, &cpu);
687 simple_mtx_unlock(&real->lock);
690 p_atomic_set(&real->u.real.cpu_ptr, cpu);
692 simple_mtx_unlock(&real->lock);
694 p_atomic_inc(&real->u.real.map_count);
702 struct zink_bo *real = bo->mem ? bo : bo->u.slab.real;
704 assert(real->u.real.map_count != 0 && "too many unmaps");
706 if (p_atomic_dec_zero(&real->u.real.map_count)) {
707 p_atomic_set(&real->u.real.cpu_ptr, NULL);
708 VKSCR(UnmapMemory)(screen->dev, real->mem);
747 mem_bind.memory = commit ? (bo->mem ? bo->mem : bo->u.slab.real->mem) : VK_NULL_HANDLE;
919 mem_bind.memory = commit ? (bo->mem ? bo->mem : bo->u.slab.real->mem) : VK_NULL_HANDLE;
1031 ibind[i].memory = backing[i]->bo->mem ? backing[i]->bo->mem : backing[i]->bo->u.slab.real->mem;
1128 assert(bo->mem && !bo->u.real.use_reusable_pool);
1129 simple_mtx_lock(&bo->u.real.export_lock);
1130 list_for_each_entry(struct bo_export, export, &bo->u.real.exports, link) {
1132 simple_mtx_unlock(&bo->u.real.export_lock);
1139 simple_mtx_unlock(&bo->u.real.export_lock);
1144 list_addtail(&export->link, &bo->u.real.exports);
1151 simple_mtx_unlock(&bo->u.real.export_lock);
1238 bo->u.slab.real = slab->buffer;
1241 bo->u.slab.real = slab->buffer->u.slab.real;
1242 assert(bo->u.slab.real->mem);
1244 bo->base.placement = bo->u.slab.real->base.placement;