diff options
author | Brian Paul <[email protected]> | 2012-05-18 13:33:53 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-05-19 08:28:57 -0600 |
commit | 31d59c78f01925c199fd3a49a27718b0659bbaf4 (patch) | |
tree | ae735d7bb06213f5db97f607642afc895f808d9a /src/mesa/main/format_unpack.c | |
parent | c3991e1c57d3e09fd17f0bd868b73b35cca96d6f (diff) |
mesa: fix Z32_FLOAT -> uint conversion functions
The IROUND converted all arguments to 0 or 1. That's not what we wanted.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/main/format_unpack.c')
-rw-r--r-- | src/mesa/main/format_unpack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index b00e01236b3..c42bac19c72 100644 --- a/src/mesa/main/format_unpack.c +++ b/src/mesa/main/format_unpack.c @@ -2929,7 +2929,7 @@ unpack_uint_z_Z32_FLOAT(const void *src, GLuint *dst, GLuint n) const float *s = (const float *)src; GLuint i; for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_UINT(IROUND(CLAMP((s[i]), 0.0F, 1.0F))); + dst[i] = FLOAT_TO_UINT(CLAMP(s[i], 0.0F, 1.0F)); } } @@ -2940,7 +2940,7 @@ unpack_uint_z_Z32_FLOAT_X24S8(const void *src, GLuint *dst, GLuint n) GLuint i; for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_UINT(IROUND(CLAMP((s[i].z), 0.0F, 1.0F))); + dst[i] = FLOAT_TO_UINT(CLAMP(s[i].z, 0.0F, 1.0F)); } } |