diff options
author | Brian Paul <[email protected]> | 2012-05-18 14:39:41 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-05-19 08:28:57 -0600 |
commit | 699c1894eea6a42a747ebbc3974bf0abf3d1dd88 (patch) | |
tree | ac60a35e6c92598564df7134804ada1bf5d1a1fc /src/mesa/program | |
parent | 31d59c78f01925c199fd3a49a27718b0659bbaf4 (diff) |
mesa: reimplement IROUND(), add F_TO_I()
The different implementations of IROUND() behaved differently and in
the case of fistp, depended on the current x86 FPU rounding mode.
This caused some tests like piglit roundmode-pixelstore and
roundmode-getintegerv to fail on 32-bit x86 but pass on 64-bit x86.
Now IROUND() always rounds to the nearest integer (away from zero).
The new F_TO_I function converts a float to an int by whatever means
is fastest. We'll use this where we're more concerned with performance
and not too worried to how the conversion is done.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/program')
0 files changed, 0 insertions, 0 deletions