diff options
author | Matt Turner <[email protected]> | 2015-06-25 16:47:52 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-08-03 09:24:51 -0700 |
commit | 594fc0f85953d11c455e7ab549308a773b312d70 (patch) | |
tree | f23cb5f74f95e7f97fcc8e5c01b166c9a90edde9 /src/mesa/main/pack.c | |
parent | f55c408067a3ea3529fcf7cbbaa1a041a4a8849d (diff) |
mesa: Replace F_TO_I() with _mesa_lroundevenf().
I'm not sure what the true meaning of "The rounding mode may vary." is,
but it is the case that the IROUND() path rounds differently than the
other paths (and does it wrong, at that).
Like _mesa_roundeven{f,}(), just add an use _mesa_lroundeven{f,}() that
has known semantics.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/main/pack.c')
-rw-r--r-- | src/mesa/main/pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index fb642b85be8..7147fd6e4fe 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -470,7 +470,7 @@ extract_uint_indexes(GLuint n, GLuint indexes[], static inline GLuint clamp_float_to_uint(GLfloat f) { - return f < 0.0F ? 0 : F_TO_I(f); + return f < 0.0F ? 0 : _mesa_lroundevenf(f); } @@ -478,7 +478,7 @@ static inline GLuint clamp_half_to_uint(GLhalfARB h) { GLfloat f = _mesa_half_to_float(h); - return f < 0.0F ? 0 : F_TO_I(f); + return f < 0.0F ? 0 : _mesa_lroundevenf(f); } |