glsl2: Conditionally allow optional extensions to be enabled

The only optional extension currently supported by the compiler is
GL_EXT_texture_array.
This commit is contained in:
Ian Romanick
2010-06-30 16:42:07 -07:00
parent efb6b24223
commit 667f4e1940
4 changed files with 11 additions and 0 deletions
+6
View File
@@ -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;
}