Skip to content

nir/lower_idiv: Remove imprecise_32bit_lowering

Alyssa Rosenzweig requested to merge alyssa/mesa:nir/delete-idiv into main
NIR has two implementations of lower_idiv, keyed on the
imprecise_32bit_lowering flag. This flag is misleading: the results when
setting this flag "imprecise", they're completely wrong for some values.
If a backend has a native implementation of umul_high, the correct path
isn't that much more expensive. If it doesn't, it's substantially slower
for highp integer divison... but in practice, non-constant highp integer
division is pretty rare.

After a painful migration of the tree, this code path has no more users.
Remove it so nobody else gets the bright idea of using it again.

etnaviv was the last user, I don't want to block this on !18080 at this point, that can land after for perf. Let's prioritize correctness here.

Cc @jekstrand @anholt @austriancoder

Merge request reports