[Mesa-dev] [PATCH] mesa: Don't flatten IF statements by default.
Kenneth Graunke
kenneth at whitecape.org
Thu Sep 20 14:27:29 PDT 2012
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.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/main/shaderapi.c | 1 +
1 file changed, 1 insertion(+)
I thought I sent this out, but can't find it in our archives. This
replaces the i915 patch that Eric reviewed by setting this in Mesa core
instead of the i915 driver.
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index c2ec1fa..7301f9a 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;
--
1.7.11.4
More information about the mesa-dev
mailing list