mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-01 15:30:26 +01:00
GL_EXT_packed_float, 2.1.B Unsigned 10-Bit Floating-Point Numbers:
0.0, if E == 0 and M == 0,
2^-14 * (M / 32), if E == 0 and M != 0,
2^(E-15) * (1 + M/32), if 0 < E < 31,
INF, if E == 31 and M == 0, or
NaN, if E == 31 and M != 0,
In the second case (E == 0 and M != 0), we were multiplying the mantissa
by 2^-20, when we should have been multiplying by 2^-19 (which is
2^(-14 + -5), or 2^-14 * 2^-5, or 2^-14 / 32).
The previous section defines the formula for 11-bit numbers, which is:
2^-14 * (M / 64), if E == 0 and M != 0,
In other words, we had accidentally copy and pasted the 11-bit code
to the 10-bit case, and neglected to change the exponent.
Fixes dEQP-GLES3.functional.pbo.renderbuffer.r11f_g11f_b10f_triangles
when run with surface dimensions of 1536x1152 or 1920x1080.
Cc: mesa-stable@lists.freedesktop.org
References: https://code.google.com/p/chrome-os-partner/issues/detail?id=56244
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Stephane Marchesin <stephane.marchesin@gmail.com>
Reviewed-by: Antia Puentes <apuentes@igalia.com>
|
||
|---|---|---|
| .. | ||
| tests/hash_table | ||
| .gitignore | ||
| Android.mk | ||
| bitscan.c | ||
| bitscan.h | ||
| bitset.h | ||
| debug.c | ||
| debug.h | ||
| format_r11g11b10f.h | ||
| format_rgb9e5.h | ||
| format_srgb.h | ||
| format_srgb.py | ||
| half_float.c | ||
| half_float.h | ||
| hash_table.c | ||
| hash_table.h | ||
| list.h | ||
| macros.h | ||
| Makefile.am | ||
| Makefile.sources | ||
| mesa-sha1.c | ||
| mesa-sha1.h | ||
| ralloc.c | ||
| ralloc.h | ||
| register_allocate.c | ||
| register_allocate.h | ||
| rgtc.c | ||
| rgtc.h | ||
| roundeven_test.c | ||
| rounding.h | ||
| SConscript | ||
| set.c | ||
| set.h | ||
| simple_list.h | ||
| strndup.c | ||
| strndup.h | ||
| strtod.c | ||
| strtod.h | ||
| texcompress_rgtc_tmp.h | ||
| u_atomic.h | ||
| u_atomic_test.c | ||