summaryrefslogtreecommitdiff
path: root/libdrm/intel
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-12-14 14:35:48 -0800
committerEric Anholt <eric@anholt.net>2008-12-14 16:50:02 -0800
commitcebbd2edb54db1780a57b3873d1d3e40cb20043f (patch)
tree4ff4f5ca4dc208b083b7f1d21365fb7b7c0343ba /libdrm/intel
parent782316801beeaf237af8272c41af93c96c708ac4 (diff)
intel: don't let named buffers into the BO cache.
We wouldn't want some remaining 3D rendering to scribble on our batchbuffer.
Diffstat (limited to 'libdrm/intel')
-rw-r--r--libdrm/intel/intel_bufmgr_gem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c
index c29368d7..5da1f6b0 100644
--- a/libdrm/intel/intel_bufmgr_gem.c
+++ b/libdrm/intel/intel_bufmgr_gem.c
@@ -478,12 +478,13 @@ drm_intel_gem_bo_unreference_locked(drm_intel_bo *bo)
bucket = drm_intel_gem_bo_bucket_for_size(bufmgr_gem, bo->size);
/* Put the buffer into our internal cache for reuse if we can. */
- if (bucket != NULL &&
+ if (bo_gem->global_name == 0 &&
+ bucket != NULL &&
(bucket->max_entries == -1 ||
(bucket->max_entries > 0 &&
bucket->num_entries < bucket->max_entries)))
{
- bo_gem->name = 0;
+ bo_gem->name = NULL;
bo_gem->validate_index = -1;
bo_gem->relocs = NULL;
bo_gem->reloc_target_bo = NULL;