diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp index f9703fe7cde..192f2f59c1b 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp @@ -1485,9 +1485,9 @@ Converter::visit(nir_if *nif) insertJoins = insertJoins && bb->getExit()->op == OP_BRA; } - /* only insert joins for the most outer if */ - if (--curIfDepth) + if (curIfDepth > 6) { insertJoins = false; + } /* we made sure that all threads would converge at the same block */ if (insertJoins) { @@ -1498,6 +1498,8 @@ Converter::visit(nir_if *nif) mkFlow(OP_JOIN, NULL, CC_ALWAYS, NULL)->fixed = 1; } + curIfDepth--; + return true; }