glsl2: Preprocessed source doesn't need to live past compile time.

This commit is contained in:
Kenneth Graunke
2010-06-29 11:31:04 -07:00
committed by Ian Romanick
parent c6099a65f8
commit 629198b96a
2 changed files with 2 additions and 8 deletions

View File

@@ -129,11 +129,8 @@ compile_shader(struct gl_shader *shader)
state->Const.MaxDrawBuffers = 2;
/* Create a new context for the preprocessor output. Ultimately, this
* should probably be the parser context, but there isn't one yet.
*/
const char *source = shader->Source;
state->error = preprocess(shader, &source, &state->info_log);
state->error = preprocess(state, &source, &state->info_log);
if (!state->error) {
_mesa_glsl_lexer_ctor(state, source);

View File

@@ -1679,11 +1679,8 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
state->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
/* Create a new context for the preprocessor output. Ultimately, this
* should probably be the parser context, but there isn't one yet.
*/
const char *source = shader->Source;
state->error = preprocess(shader, &source, &state->info_log);
state->error = preprocess(state, &source, &state->info_log);
if (!state->error) {
_mesa_glsl_lexer_ctor(state, source);