summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-09-19 23:47:56 -0700
committerKenneth Graunke <[email protected]>2011-10-21 01:11:17 -0700
commit01f9fdc4acd28cc4630a3c71f2d007373f4d979c (patch)
treebe51c6ce54773fb1224d3e017b0ff6aaa6d5b750 /src
parent9f2abbee6215d89e48b7fe042f8a905997f5c232 (diff)
i965: Set MaxIfDepth to UINT_MAX on Gen6+ and 16 on prior generations.
Commit 488fe51cf823ccd137c667f1e92dd86f8323b723 converted the EmitNoIfs flag to MaxIfDepth, an unsigned integer saying "flatten if-statements nested beyond this depth." Unfortunately, i965 left this initialized to 0, which made ir_to_mesa attempt to flatten all if-statements. We didn't notice right away because we usually throw away ir_to_mesa's code in favor of the native VS and FS backends...but this still creates a lot of unnecessary work. Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index c1b274fed62..95662dc932c 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -116,6 +116,7 @@ brwCreateContext(int api,
/* We want the GLSL compiler to emit code that uses condition codes */
for (i = 0; i <= MESA_SHADER_FRAGMENT; i++) {
+ ctx->ShaderCompilerOptions[i].MaxIfDepth = intel->gen < 6 ? 16 : UINT_MAX;
ctx->ShaderCompilerOptions[i].EmitCondCodes = true;
ctx->ShaderCompilerOptions[i].EmitNVTempInitialization = true;
ctx->ShaderCompilerOptions[i].EmitNoNoise = true;