summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-09-09 15:25:32 -0700
committerIan Romanick <[email protected]>2010-09-09 15:39:52 -0700
commit2b70dbfe091af5ae7c788e16275e1af2cb1c284c (patch)
treea871cba91b90dfba4399b9ff366b8083b11c9acf /src/mesa/main
parent547131ac8750acabd030972fc768705c13d19ef7 (diff)
glsl2: Add EmitNoNoise flag, use it to remove noise opcodes
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/shaderapi.c13
2 files changed, 3 insertions, 11 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 96fd9141902..bcd324b4432 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2199,6 +2199,7 @@ struct gl_shader_compiler_options
GLboolean EmitNoFunctions;
GLboolean EmitNoCont; /**< Emit CONT opcode? */
GLboolean EmitNoMainReturn; /**< Emit CONT/RET opcodes? */
+ GLboolean EmitNoNoise; /**< Emit NOISE opcodes? */
GLuint MaxUnrollIterations;
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index c32c09f8d4b..c25d2a19747 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -96,21 +96,12 @@ _mesa_init_shader_state(GLcontext *ctx)
*/
struct gl_shader_compiler_options options;
GLuint i;
- options.EmitHighLevelInstructions = GL_TRUE;
- options.EmitCondCodes = GL_FALSE;
- options.EmitComments = GL_FALSE;
- options.EmitNoIfs = GL_FALSE;
- options.EmitNoLoops = GL_FALSE;
- options.EmitNoFunctions = GL_FALSE;
- options.EmitNoCont = GL_FALSE;
- options.EmitNoMainReturn = GL_FALSE;
+
+ memset(&options, 0, sizeof(options));
options.MaxUnrollIterations = 32;
/* Default pragma settings */
- options.DefaultPragmas.IgnoreOptimize = GL_FALSE;
- options.DefaultPragmas.IgnoreDebug = GL_FALSE;
options.DefaultPragmas.Optimize = GL_TRUE;
- options.DefaultPragmas.Debug = GL_FALSE;
for(i = 0; i < MESA_SHADER_TYPES; ++i)
memcpy(&ctx->ShaderCompilerOptions[i], &options, sizeof(options));