*/
ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitCondCodes = GL_TRUE;
ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT].EmitNoIfs = GL_TRUE;
+ ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT].EmitNoNoise = GL_TRUE;
ctx->Const.MaxDrawBuffers = 1;
for (i = 0; i <= MESA_SHADER_FRAGMENT; i++) {
ctx->ShaderCompilerOptions[i].EmitCondCodes = GL_TRUE;
ctx->ShaderCompilerOptions[i].EmitNVTempInitialization = GL_TRUE;
+ ctx->ShaderCompilerOptions[i].EmitNoNoise = GL_TRUE;
}
ctx->Const.VertexProgram.MaxNativeInstructions = (16 * 1024);
GLboolean EmitNoFunctions;
GLboolean EmitNoCont; /**< Emit CONT opcode? */
GLboolean EmitNoMainReturn; /**< Emit CONT/RET opcodes? */
+ GLboolean EmitNoNoise; /**< Emit NOISE opcodes? */
GLuint MaxUnrollIterations;
*/
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));
if (options->EmitNoIfs)
progress = do_if_to_cond_assign(ir) || progress;
+ if (options->EmitNoNoise)
+ progress = lower_noise(ir) || progress;
+
progress = do_vec_index_to_cond_assign(ir) || progress;
} while (progress);