Mesa (master): main/base_tex_format: Properly handle STENCIL_INDEX1/4/16

Jason Ekstrand jekstrand at kemper.freedesktop.org
Mon Mar 2 19:09:25 UTC 2015


Module: Mesa
Branch: master
Commit: c4925d7f3b66d63fbdd7b7607cd809db1e58bee9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c4925d7f3b66d63fbdd7b7607cd809db1e58bee9

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Feb 27 18:53:11 2015 -0500

main/base_tex_format: Properly handle STENCIL_INDEX1/4/16

This takes "fbo-stencil blit GL_STENCIL_INDEX1/4/16" from crash to pass on
BDW.

Cc: 10.5 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/main/teximage.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 5ea48c5..611d664 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -224,7 +224,10 @@ _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_INDEX1:
+      case GL_STENCIL_INDEX4:
       case GL_STENCIL_INDEX8:
+      case GL_STENCIL_INDEX16:
          return GL_STENCIL_INDEX;
       default:
          ; /* fallthrough */




More information about the mesa-commit mailing list