mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 14:00:11 +01:00
intel: don't let named buffers into the BO cache.
We wouldn't want some remaining 3D rendering to scribble on our batchbuffer.
This commit is contained in:
parent
782316801b
commit
cebbd2edb5
1 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
bucket = drm_intel_gem_bo_bucket_for_size(bufmgr_gem, bo->size);
|
||||||
/* Put the buffer into our internal cache for reuse if we can. */
|
/* 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 == -1 ||
|
||||||
(bucket->max_entries > 0 &&
|
(bucket->max_entries > 0 &&
|
||||||
bucket->num_entries < bucket->max_entries)))
|
bucket->num_entries < bucket->max_entries)))
|
||||||
{
|
{
|
||||||
bo_gem->name = 0;
|
bo_gem->name = NULL;
|
||||||
bo_gem->validate_index = -1;
|
bo_gem->validate_index = -1;
|
||||||
bo_gem->relocs = NULL;
|
bo_gem->relocs = NULL;
|
||||||
bo_gem->reloc_target_bo = NULL;
|
bo_gem->reloc_target_bo = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue