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 <kenn...@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

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to