summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-04-09 10:14:35 +1000
committerDave Airlie <airlied@redhat.com>2009-04-09 10:31:08 +1000
commitd1a9b1f513109c975a5a7ed5a2d0c329b280afe4 (patch)
tree5c85af47b4f5af0661acf129e3ce3f59e43cbfd9 /src/mesa/shader/slang/slang_compile.c
parent90ffce497395d8c02fee2ea4ee4c025eede3d876 (diff)
parent8648c2685870174cf620ef15de70ef030a8d5a20 (diff)
Merge remote branch 'origin/master' into radeon-rewrite
Conflicts: src/mesa/drivers/dri/r200/r200_tex.c src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/r300/r300_context.h src/mesa/drivers/dri/r300/r300_swtcl.c src/mesa/drivers/dri/r300/r300_tex.c src/mesa/drivers/dri/r300/r300_texmem.c src/mesa/drivers/dri/r300/r300_texstate.c src/mesa/drivers/dri/radeon/radeon_tex.c
Diffstat (limited to 'src/mesa/shader/slang/slang_compile.c')
-rw-r--r--src/mesa/shader/slang/slang_compile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index fb7128841c..ba2fc4f85c 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -2435,6 +2435,8 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit,
_slang_codegen_function(&A, mainFunc);
shader->Main = GL_TRUE; /* this shader defines main() */
+
+ shader->UnresolvedRefs = A.UnresolvedRefs;
}
_slang_pop_var_table(o.vartable);
@@ -2799,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);
}
}