summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-03-06 15:45:01 -0700
committerBrian Paul <brianp@vmware.com>2009-03-06 16:21:21 -0700
commit0945b78244d6a86dbe3c35f4cfcd6a9ff524930e (patch)
tree2c30e4eeed15b67782dad39e99020995aabf54ff
parente60b3067d81319236d63ad497e70658fd2e14eb3 (diff)
glsl: call the program optimizer
This still needs more testing bug glean and Mesa GLSL tests seem OK.
-rw-r--r--src/mesa/shader/slang/slang_compile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index ab848579b7..3f46bfd60d 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -32,6 +32,7 @@
#include "main/context.h"
#include "shader/program.h"
#include "shader/programopt.h"
+#include "shader/prog_optimize.h"
#include "shader/prog_print.h"
#include "shader/prog_parameter.h"
#include "shader/grammar/grammar_mesa.h"
@@ -2796,6 +2797,10 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader)
shader->CompileStatus = success;
+ if (success) {
+ _mesa_optimize_program(ctx, shader->Program);
+ }
+
if (ctx->Shader.Flags & GLSL_LOG) {
_mesa_write_shader_to_file(shader);
}