mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
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 <jfonseca@vmware.com>
This commit is contained in:
parent
c3991e1c57
commit
31d59c78f0
1 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue