summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_compile.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-03-19 10:25:24 -0600
committerBrian Paul <[email protected]>2009-03-19 10:29:13 -0600
commit65fc2ca82a38bc00ae4223124932af6771765041 (patch)
tree07d7a4b23f2e2d86af8131970df47780aa7f040a /src/mesa/shader/slang/slang_compile.c
parenta57d7edf069d1d161a45825021a7cf4d825fb88f (diff)
glsl: change GLSL #pragma initialization
Initialize the shader's pragma settings before calling the compiler. Added pragma "Ignore" fields to allow overriding the #pragma directives found in shader source code.
Diffstat (limited to 'src/mesa/shader/slang/slang_compile.c')
-rw-r--r--src/mesa/shader/slang/slang_compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 3f46bfd60df..aa080228694 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -2798,7 +2798,9 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader)
shader->CompileStatus = success;
if (success) {
- _mesa_optimize_program(ctx, shader->Program);
+ if (shader->Pragmas.Optimize) {
+ _mesa_optimize_program(ctx, shader->Program);
+ }
}
if (ctx->Shader.Flags & GLSL_LOG) {