mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-16 16:18:06 +02:00
The mantissa for a float doesn't contain enough data to accurately represent the min/max values for some destination types. Instead of clamping before converting, clamp after converting when coming from floats. This improves conformance of CL conversions, specifically for float -> long/ulong with int64 emulation enabled. Refactors the limit determination from the clamp, so we can determine limits for the dest type (int/uint) in both the source (float) and dest type. The limit as a float is used for comparison, while the limit as a dest type is used for bcsel. Important note is that the comparison is inverted to fge instead of flt, so the bcsel chooses the direct int/uint over the converted float in the case where the comparison comes up equal, but the conversion can't produce the exact min/max value. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8256> |
||
|---|---|---|
| .. | ||
| glsl | ||
| nir | ||
| spirv | ||
| Android.glsl.gen.mk | ||
| Android.glsl.mk | ||
| Android.mk | ||
| Android.nir.gen.mk | ||
| Android.nir.mk | ||
| builtin_type_macros.h | ||
| glsl_types.cpp | ||
| glsl_types.h | ||
| Makefile.sources | ||
| meson.build | ||
| nir_types.cpp | ||
| nir_types.h | ||
| SConscript | ||
| SConscript.glsl | ||
| SConscript.nir | ||
| SConscript.spirv | ||
| shader_enums.c | ||
| shader_enums.h | ||
| shader_info.h | ||