From 65fc2ca82a38bc00ae4223124932af6771765041 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 19 Mar 2009 10:25:24 -0600 Subject: 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. --- src/mesa/shader/slang/slang_compile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/shader/slang/slang_compile.c') 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) { -- cgit v1.2.3