diff options
author | Ian Romanick <[email protected]> | 2010-06-30 16:42:07 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-07-01 20:40:08 -0700 |
commit | 667f4e1940c4c4660e35dc9906672a476369660f (patch) | |
tree | cec67053730af9c360c3c1148fd55eb7bcb3d2fa /src/glsl/glsl_parser_extras.cpp | |
parent | efb6b24223e0bfd29959e131cd308b1e07ff20df (diff) |
glsl2: Conditionally allow optional extensions to be enabled
The only optional extension currently supported by the compiler is
GL_EXT_texture_array.
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 2e17c4c3372..fc3f9e90b6b 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -27,6 +27,7 @@ extern "C" { #include <talloc.h> +#include "main/mtypes.h" } #include "ast.h" @@ -135,6 +136,11 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp, } else if (strcmp(name, "GL_ARB_texture_rectangle") == 0) { state->ARB_texture_rectangle_enable = (ext_mode != extension_disable); state->ARB_texture_rectangle_warn = (ext_mode == extension_warn); + } else if (strcmp(name, "GL_EXT_texture_array") == 0) { + state->EXT_texture_array_enable = (ext_mode != extension_disable); + state->EXT_texture_array_warn = (ext_mode == extension_warn); + + unsupported = !state->extensions->EXT_texture_array; } else { unsupported = true; } |