From 56705cd36bf48d5050ac9ec10d91fd097a577f42 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 20 Sep 2012 14:27:29 -0700 Subject: [PATCH] mesa: Don't flatten IF statements by default. MaxIfDepth of 0 means "flatten all the time", not "never flatten". This is only desirable on hardware that can't support control flow; software rasterization and most hardware drivers want this. This alters behavior for swrast as well as i915. Tested on i915. NOTE: This is a candidate for stable release branches. Reviewed-by: Ian Romanick Signed-off-by: Kenneth Graunke --- src/mesa/main/shaderapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 6ee41f2b63e..d40a3537670 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -105,6 +105,7 @@ _mesa_init_shader_state(struct gl_context *ctx) memset(&options, 0, sizeof(options)); options.MaxUnrollIterations = 32; + options.MaxIfDepth = UINT_MAX; /* Default pragma settings */ options.DefaultPragmas.Optimize = GL_TRUE; -- 2.30.2