summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-04-07 11:01:15 -0600
committerBrian Paul <brianp@vmware.com>2009-04-07 11:01:15 -0600
commit4069447f73b3ee011a4beccc6ffa80cce84fd285 (patch)
treefaa4cdccddd0ff690f93124bfb008bd02ceea6c8 /src
parent3e79d650835b3431464de876699d04702df99806 (diff)
glsl: don't optimize program if MESA_GLSL=nopt
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 6348f799aa..ba2fc4f85c 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -2801,7 +2801,8 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader)
shader->CompileStatus = success;
if (success) {
- if (shader->Pragmas.Optimize) {
+ if (shader->Pragmas.Optimize &&
+ (ctx->Shader.Flags & GLSL_NO_OPT) == 0) {
_mesa_optimize_program(ctx, shader->Program);
}
}