Skip to content

nir/lower_int64: do not try to clamp floats to int-range

Erik Faye-Lund requested to merge kusma/mesa:nir-simplify-lower_u2f into main

The clamping isn't correct, because the exact values ended up getting rounded off a bit when converting back to floats.

But, converting floats to integers have undefined results when the float value doesn't fit in the integer. So let's not try to clamp the value here.

This was caught by digging at a Clang warning, see this thread for details:

!15547 (comment 1329769)

Merge request reports