diff options
author | Neil Roberts <[email protected]> | 2015-03-31 14:58:28 +0100 |
---|---|---|
committer | Neil Roberts <[email protected]> | 2015-03-31 18:22:01 +0100 |
commit | fe026d7ce5c59535c5296004b94138bdf8ef613c (patch) | |
tree | d9d5fda5cc573749c1eeafaccca9d04ebc35bc86 | |
parent | fda7558057a301a5a0ee1cb4d68f09ea39b03bb3 (diff) |
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 <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_tex_layout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c index 5e70cd26c7e..7a1e09d692c 100644 --- a/src/mesa/drivers/dri/i965/brw_tex_layout.c +++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c @@ -289,7 +289,8 @@ use_linear_1d_layout(struct brw_context *brw, GLenum base_format = _mesa_get_format_base_format(mt->format); if (base_format != GL_DEPTH_COMPONENT && - base_format != GL_DEPTH_STENCIL) + base_format != GL_DEPTH_STENCIL && + base_format != GL_STENCIL_INDEX) return true; } |