diff options
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 844a746c65c..b2c378dd858 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -27,7 +27,7 @@ extern "C" { #include <talloc.h> -#include "main/core.h" /* for struct __GLcontextRec */ +#include "main/core.h" /* for struct gl_context */ } #include "ast.h" @@ -36,7 +36,7 @@ extern "C" { #include "ir_optimization.h" #include "loop_analysis.h" -_mesa_glsl_parse_state::_mesa_glsl_parse_state(struct __GLcontextRec *ctx, +_mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx, GLenum target, void *mem_ctx) { switch (target) { @@ -88,7 +88,6 @@ _mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target) case vertex_shader: return "vertex"; case fragment_shader: return "fragment"; case geometry_shader: return "geometry"; - case ir_shader: break; } assert(!"Should not get here."); @@ -203,6 +202,14 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp, state->EXT_texture_array_warn = (ext_mode == extension_warn); 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; + } } else { unsupported = true; } |