Skip to content

nir_to_tgsi: run constant folding after nir_opt_algebraic

Rhys Perry requested to merge pendingchaos/mesa:ntt_cf_after_algebraic into master

Otherwise, an infinite loop can occur.

The first nir_opt_algebraic() in the loop can optimize op(bcsel(a, #b, c), #d) to bcsel(a, op(b, d), op(c, d)) which (because op(b, d) is not constant folded), will be reverted by the second nir_opt_algebraic() in the loop.

Merge request reports