Mesa (master): glsl: Make GL_ARB_shader_stencil_export enable block be similar to other blocks

Ian Romanick idr at kemper.freedesktop.org
Mon Apr 11 14:43:49 PDT 2011


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Apr  8 12:43:53 2011 -0700

glsl: Make GL_ARB_shader_stencil_export enable block be similar to other blocks

Tested-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/glsl/glsl_parser_extras.cpp |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 073ec38..e8881e4 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -241,13 +241,13 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
 
       unsupported = !state->extensions->EXT_texture_array;
    } else if (strcmp(name, "GL_ARB_shader_stencil_export") == 0) {
-      if (state->target != fragment_shader) {
-	 unsupported = true;
-      } else {
-	 state->ARB_shader_stencil_export_enable = (ext_mode != extension_disable);
-	 state->ARB_shader_stencil_export_warn = (ext_mode == extension_warn);
-	 unsupported = !state->extensions->ARB_shader_stencil_export;
-      }
+      state->ARB_shader_stencil_export_enable = (ext_mode != extension_disable);
+      state->ARB_shader_stencil_export_warn = (ext_mode == extension_warn);
+
+      /* This extension is only supported in fragment shaders.
+       */
+      unsupported = (state->target != fragment_shader)
+	 || !state->extensions->ARB_shader_stencil_export;
    } else if (strcmp(name, "GL_AMD_conservative_depth") == 0) {
       /* The AMD_conservative spec does not forbid requiring the extension in
        * the vertex shader.



More information about the mesa-commit mailing list