glsl2: Conditionally define preprocessor tokens for optional extensions

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:27:22 -07:00
parent 2d12236117
commit 06143ea094
7 changed files with 25 additions and 12 deletions

View File

@@ -1713,7 +1713,8 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
state->Const.MaxTextureCoords = ctx->Const.MaxTextureCoordUnits;
const char *source = shader->Source;
state->error = preprocess(state, &source, &state->info_log);
state->error = preprocess(state, &source, &state->info_log,
&ctx->Extensions);
if (!state->error) {
_mesa_glsl_lexer_ctor(state, source);