[Mesa-dev] [PATCH 01/14] i965: Don't tile 1D miptrees.
Kenneth Graunke
kenneth at whitecape.org
Fri Feb 6 12:01:17 PST 2015
On Friday, February 06, 2015 07:23:15 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.
> ---
> src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 ++++
> 1 file changed, 4 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..311b204 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -488,6 +488,10 @@ intel_miptree_choose_tiling(struct brw_context *brw,
> base_format == GL_DEPTH_STENCIL_EXT)
> return I915_TILING_Y;
>
> + if (mt->target == GL_TEXTURE_1D ||
> + mt->target == GL_TEXTURE_1D_ARRAY)
> + 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. */
>
What do you think about checking mt->logical_height0 == 1 instead?
GLES doesn't have 1D textures, but people might use a 2D texture with
height 1, and I think the same logic applies.
I've also been thinking of trying to make core Mesa hide 1D textures and
simply turn them into 2D textures with height = 1, so drivers don't have
to deal with them.
Either way, this seems like a good idea to me.
-------------- 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/20150206/d0d3ca08/attachment.sig>
More information about the mesa-dev
mailing list