summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-01-30 14:24:13 -0800
committerJason Ekstrand <[email protected]>2015-01-30 15:49:45 -0800
commit7cc3bb2318aa22ba1e85505ff50706bdacdbbf92 (patch)
tree76520cab4197bfb783e7a4c1eea858bfd0c397b9 /src
parent16875bc5cdf12ab2bab1f850a690b9e8a45010e9 (diff)
main: Add STENCIL_INDEX formats to base_tex_format
This fixes a bug on BDW when our meta-based stencil blit path assert-fails due to an invalid internal format even though we do support the ARB_stencil_texturing extension. Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/teximage.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index e067078b17d..29c325bf222 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -221,6 +221,16 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
+ if (ctx->Extensions.ARB_stencil_texturing) {
+ switch (internalFormat) {
+ case GL_STENCIL_INDEX:
+ case GL_STENCIL_INDEX8:
+ return GL_STENCIL_INDEX;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
switch (internalFormat) {
case GL_COMPRESSED_ALPHA:
return GL_ALPHA;