summaryrefslogtreecommitdiffstats
path: root/src/glsl/main.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-06-30 16:27:22 -0700
committerIan Romanick <[email protected]>2010-07-01 20:40:08 -0700
commit06143ea09411aa283ac3633bfbfa4326584cd952 (patch)
tree9823df6abda22c93745029eecd930e85fd9241f7 /src/glsl/main.cpp
parent2d1223611700b33aab084f1927bfc1ff1b284115 (diff)
glsl2: Conditionally define preprocessor tokens for optional extensions
The only optional extension currently supported by the compiler is GL_EXT_texture_array.
Diffstat (limited to 'src/glsl/main.cpp')
-rw-r--r--src/glsl/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index c833c9cde6d..deaab7e0335 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -109,6 +109,7 @@ void
compile_shader(struct gl_shader *shader)
{
struct _mesa_glsl_parse_state *state;
+ struct gl_extensions ext;
state = talloc_zero(talloc_parent(shader), struct _mesa_glsl_parse_state);
@@ -127,11 +128,12 @@ compile_shader(struct gl_shader *shader)
state->loop_or_switch_nesting = NULL;
state->ARB_texture_rectangle_enable = true;
+ memset(&ext, 0, sizeof(ext));
state->Const.MaxDrawBuffers = 2;
state->Const.MaxTextureCoords = 4;
const char *source = shader->Source;
- state->error = preprocess(state, &source, &state->info_log);
+ state->error = preprocess(state, &source, &state->info_log, &ext);
if (!state->error) {
_mesa_glsl_lexer_ctor(state, source);