From e591c4625cae63660c5000fbab366e40fe154ab0 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Sun, 5 Sep 2010 22:29:58 +0200 Subject: glsl: add several EmitNo* options, and MaxUnrollIterations This increases the chance that GLSL programs will actually work. Note that continues and returns are not yet lowered, so linking will just fail if not supported. Signed-off-by: Ian Romanick --- src/mesa/main/shaderapi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/shaderapi.c') diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 2977a29ab7..c32c09f8d4 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -97,10 +97,14 @@ _mesa_init_shader_state(GLcontext *ctx) struct gl_shader_compiler_options options; GLuint i; options.EmitHighLevelInstructions = GL_TRUE; - options.EmitContReturn = 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; + options.MaxUnrollIterations = 32; /* Default pragma settings */ options.DefaultPragmas.IgnoreOptimize = GL_FALSE; -- cgit v1.2.3