[Mesa-dev] [PATCH] i965: Don't bother flushing the batch if it doesn't ref our mt to map.

Kenneth Graunke kenneth at whitecape.org
Thu Apr 24 22:41:14 PDT 2014


On 04/24/2014 06:21 PM, Eric Anholt wrote:
> -1.1372% +/- 0.858033% effect on cairo runtime on glamor (n=175).
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 59700ed..c24cfce 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -1614,7 +1614,8 @@ intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt)
>  
>     drm_intel_bo *bo = mt->region->bo;
>  
> -   intel_batchbuffer_flush(brw);
> +   if (drm_intel_bo_references(brw->batch.bo, bo))
> +      intel_batchbuffer_flush(brw);
>  
>     if (mt->region->tiling != I915_TILING_NONE)
>        brw_bo_map_gtt(brw, bo, "miptree");
> 

Oh, thanks!  I kept meaning to fix this and never got around to sending
the patch.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140424/cd041c34/attachment.sig>


More information about the mesa-dev mailing list