summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-03-21 14:01:24 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-04-01 19:04:28 -0700
commit15cd3ebede62a0c73bfa1513a0c9ab942906cd5a (patch)
tree22ce98665c1374c7312e0126ce8e33e8b6915483 /src/mesa/main/texformat.c
parentef1b397b0770ddc24240462a1426f6c3fd4952bb (diff)
downloadexternal_mesa3d-15cd3ebede62a0c73bfa1513a0c9ab942906cd5a.zip
external_mesa3d-15cd3ebede62a0c73bfa1513a0c9ab942906cd5a.tar.gz
external_mesa3d-15cd3ebede62a0c73bfa1513a0c9ab942906cd5a.tar.bz2
mesa: Make _mesa_choose_tex_format() handle stencil textures.
This is necessary for ARB_texture_stencil8 support on classic drivers. Presumably Gallium works because it implements its own ChooseTexFormat. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 419fd78..be2581b 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -765,6 +765,11 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
+ case GL_STENCIL_INDEX:
+ case GL_STENCIL_INDEX8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S_UINT8);
+ break;
+
default:
/* For non-generic compressed format we assert two things:
*