i965/skl: Avoid using the 1D stencil layout for stencil-only images
authorNeil Roberts <neil@linux.intel.com>
Tue, 31 Mar 2015 13:58:28 +0000 (14:58 +0100)
committerNeil Roberts <neil@linux.intel.com>
Tue, 31 Mar 2015 17:22:01 +0000 (18:22 +0100)
commitfe026d7ce5c59535c5296004b94138bdf8ef613c
treed9d5fda5cc573749c1eeafaccca9d04ebc35bc86
parentfda7558057a301a5a0ee1cb4d68f09ea39b03bb3
i965/skl: Avoid using the 1D stencil layout for stencil-only images

Commit cf67ca9ffa9 made the layouting code pick a special layout for
1D images on Skylake. This should not be used for depth and stencil
buffers because these need to be treated as 2D tiled images. However
the patch was missing a check for images with a base format of
GL_STENCIL_INDEX. In practice I don't think it's currently possible to
hit this because Mesa doesn't support GL_ARB_texture_stencil8 and it's
not possible to create a 1D renderbuffer, but it'll be good to be
ready for when the extension is supported.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/brw_tex_layout.c