summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-10-06 09:36:02 +1000
committerDave Airlie <[email protected]>2010-10-13 09:30:05 +1000
commitd9671863eaae41ba28b6fe82e3e7d1dac12f514c (patch)
treea6a7a78b1beb0c5b9132433797f34f680ab17d44 /src/glsl/glsl_parser_extras.cpp
parent39d1feb51e9dac794751e72f48faf26409a84b1c (diff)
glsl: add support for shader stencil export
This adds proper support for the GL_ARB_shader_stencil_export extension to the GLSL compiler. Thanks to Ian for pointing out where I need to add things.
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 844a746c65c..1337bed2b48 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -203,6 +203,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;
}