From 667f4e1940c4c4660e35dc9906672a476369660f Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 30 Jun 2010 16:42:07 -0700 Subject: glsl2: Conditionally allow optional extensions to be enabled The only optional extension currently supported by the compiler is GL_EXT_texture_array. --- src/glsl/glsl_parser_extras.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/glsl/glsl_parser_extras.cpp') diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 2e17c4c337..fc3f9e90b6 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -27,6 +27,7 @@ extern "C" { #include +#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; } -- cgit v1.2.3