i965: Set MaxIfDepth to UINT_MAX on Gen6+ and 16 on prior generations.
Commit 488fe51cf8
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 <kenneth@whitecape.org>
This commit is contained in:
parent
9f2abbee62
commit
01f9fdc4ac
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue