From: Kenneth Graunke Date: Thu, 20 Sep 2012 21:27:29 +0000 (-0700) Subject: mesa: Don't flatten IF statements by default. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=56705cd36bf48d5050ac9ec10d91fd097a577f42;p=mesa.git 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 --- 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;