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 <ian.d.romanick@intel.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user