[Mesa-dev] [PATCH] i965: Don't tile 1D miptrees.

Kenneth Graunke kenneth at whitecape.org
Mon Feb 9 13:14:04 PST 2015


On Monday, February 09, 2015 07:15:28 PM Francisco Jerez wrote:
> It doesn't really improve locality of texture fetches, quite the
> opposite it's a waste of memory bandwidth and space due to tile
> alignment.
> 
> v2: Check mt->logical_height0 instead of mt->target (Ken).  Add short
>     comment explaining why they shouldn't be tiled.
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 64752dd..0e3888f 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -488,6 +488,13 @@ intel_miptree_choose_tiling(struct brw_context *brw,
>         base_format == GL_DEPTH_STENCIL_EXT)
>        return I915_TILING_Y;
>  
> +   /* 1D textures (and 1D array textures) don't get any benefit from tiling,
> +    * in fact it leads to a less efficient use of memory space and bandwidth
> +    * due to tile alignment.
> +    */
> +   if (mt->logical_height0 == 1)
> +      return I915_TILING_NONE;
> +
>     int minimum_pitch = mt->total_width * mt->cpp;
>  
>     /* If the width is much smaller than a tile, don't bother tiling. */
> 

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150209/e9e6c4f5/attachment.sig>


More information about the mesa-dev mailing list