summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index ee61e54803f..e35d2804390 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -582,7 +582,7 @@ static struct radeon_bo *radeon_create_bo(struct radeon_drm_winsys *rws,
pipe_mutex_unlock(rws->bo_handles_mutex);
pb_reference(&b, &old_bo->base);
- return b;
+ return radeon_bo(b);
}
util_hash_table_set(rws->bo_vas, (void*)(uintptr_t)bo->va, bo);
@@ -594,7 +594,7 @@ static struct radeon_bo *radeon_create_bo(struct radeon_drm_winsys *rws,
else if (initial_domains & RADEON_DOMAIN_GTT)
rws->allocated_gtt += align(size, rws->size_align);
- return &bo->base;
+ return bo;
}
bool radeon_bo_can_reclaim(struct pb_buffer *_buf)
@@ -768,9 +768,9 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
usage |= 1 << (flags + 3);
if (use_reusable_pool) {
- bo = pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage);
+ bo = radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage));
if (bo)
- return bo;
+ return &bo->base;
}
bo = radeon_create_bo(ws, size, alignment, usage, domain, flags);
@@ -837,7 +837,7 @@ static struct pb_buffer *radeon_winsys_bo_from_ptr(struct radeon_winsys *rws,
if (ws->info.r600_virtual_address) {
struct drm_radeon_gem_va va;
- bo->va = radeon_bomgr_find_va(rws, bo->base.size, 1 << 20);
+ bo->va = radeon_bomgr_find_va(ws, bo->base.size, 1 << 20);
va.handle = bo->handle;
va.operation = RADEON_VA_MAP;
@@ -969,7 +969,7 @@ done:
if (ws->info.r600_virtual_address && !bo->va) {
struct drm_radeon_gem_va va;
- bo->va = radeon_bomgr_find_va(rws, bo->base.size, 1 << 20);
+ bo->va = radeon_bomgr_find_va(ws, bo->base.size, 1 << 20);
va.handle = bo->handle;
va.operation = RADEON_VA_MAP;