diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/program/arbprogparse.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c index 5b9665091b6..7dec399a538 100644 --- a/src/mesa/program/arbprogparse.c +++ b/src/mesa/program/arbprogparse.c @@ -60,6 +60,7 @@ having three separate program parameter arrays. #include "prog_parameter.h" #include "prog_statevars.h" #include "prog_instruction.h" +#include "prog_optimize.h" #include "program_parser.h" @@ -84,6 +85,9 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target, return; } + if ((ctx->_Shader->Flags & GLSL_NO_OPT) == 0) + _mesa_optimize_program(ctx, &prog); + free(program->Base.String); /* Copy the relevant contents of the arb_program struct into the @@ -177,6 +181,9 @@ _mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target, return; } + if ((ctx->_Shader->Flags & GLSL_NO_OPT) == 0) + _mesa_optimize_program(ctx, &prog); + free(program->Base.String); /* Copy the relevant contents of the arb_program struct into the |