Mesa (gallium-mesa-7.4): glsl: call the program optimizer
Alan Hourihane
alanh at kemper.freedesktop.org
Wed Mar 11 13:40:04 PDT 2009
Module: Mesa
Branch: gallium-mesa-7.4
Commit: 12a85858d579feeb63e13c61af77d83be5319892
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=12a85858d579feeb63e13c61af77d83be5319892
Author: Brian Paul <brianp at vmware.com>
Date: Fri Mar 6 15:45:01 2009 -0700
glsl: call the program optimizer
This still needs more testing bug glean and Mesa GLSL tests seem OK.
---
src/mesa/shader/slang/slang_compile.c | 5 +++++
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 ab84857..3f46bfd 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);
}
More information about the mesa-commit
mailing list