mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-14 13:38:20 +02:00
Roundtrip to a larger float and divide there. The extra details for mod/rem are handled directly in integer space to simplify verification of rounding details. The one issue is that the mantissa might be rounded down which will cause issues; adding 1 unconditionally (proposed by Jonathan Marek) fixes this. The lowerings here were tested exhaustively on all pairs of 16-bit integers. v2: Update idiv lowering per Rhys Perry's comment. v3: Rewrite lowerings. v4: Remove useless ftrunc, fix 8-bit issue, simplify code. v5: Remove useless ffloor Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Tested-by: Danylo Piliaiev <dpiliaiev@igalia.com> Tested-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8339> |
||
|---|---|---|
| .. | ||
| 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 | ||
| shader_enums.c | ||
| shader_enums.h | ||
| shader_info.h | ||