mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
nouveau/nir: Allow up to 6 nested joins
This matches what the tgsi path does and doesn't regress any tests. (For comparison, unlimited join nesting does regress tests in deqp and piglit) Fixes graphical artifacts from stack overflows in https://www.shadertoy.com/view/Xds3zN with nir on kepler Reviewed-by: Emma Anholt <emma@anholt.net> Acked-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15597>
This commit is contained in:
parent
0c4d1762de
commit
9da14a2119
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue