summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 9900acc75b4..61289db2d2e 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -410,6 +410,12 @@ _mesa_init_shader_state(GLcontext * ctx)
ctx->Shader.EmitCondCodes = GL_FALSE;
ctx->Shader.EmitComments = GL_FALSE;
ctx->Shader.Flags = get_shader_flags();
+
+ /* Default pragma settings */
+ ctx->Shader.DefaultPragmas.IgnoreOptimize = GL_FALSE;
+ ctx->Shader.DefaultPragmas.IgnoreDebug = GL_FALSE;
+ ctx->Shader.DefaultPragmas.Optimize = GL_TRUE;
+ ctx->Shader.DefaultPragmas.Debug = GL_FALSE;
}
@@ -1444,6 +1450,9 @@ _mesa_compile_shader(GLcontext *ctx, GLuint shaderObj)
if (!sh)
return;
+ /* set default pragma state for shader */
+ sh->Pragmas = ctx->Shader.DefaultPragmas;
+
/* this call will set the sh->CompileStatus field to indicate if
* compilation was successful.
*/