[Intel-gfx] [PATCH] intel: don't let named buffers into the BO cache.

Keith Packard keithp at keithp.com
Mon Dec 15 01:40:52 CET 2008


On Sun, 2008-12-14 at 15:24 -0800, Eric Anholt wrote:
> We wouldn't want some remaining 3D rendering to scribble on our batchbuffer.
> ---
>  libdrm/intel/intel_bufmgr_gem.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c
> index c29368d..17aaaa3 100644
> --- a/libdrm/intel/intel_bufmgr_gem.c
> +++ b/libdrm/intel/intel_bufmgr_gem.c
> @@ -478,12 +478,12 @@ 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->name == 0 &&
> +	    bucket != NULL &&

Uh, surely global_name.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20081214/2a89ca21/attachment.sig>


More information about the Intel-gfx mailing list