mesa/src/compiler
Alyssa Rosenzweig 1286e73c2c nir/lower_idiv: Add 8-bit and 16-bit lowering path
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>
2021-04-07 15:48:15 +00:00
..
glsl glsl/linker: Fix xfb stride alignment for buffers containing 64bit types 2021-04-01 17:16:33 +00:00
nir nir/lower_idiv: Add 8-bit and 16-bit lowering path 2021-04-07 15:48:15 +00:00
spirv compiler/spirv: use undefs when extending image coords 2021-03-24 19:07:19 +00:00
Android.glsl.gen.mk android: util: Move xxd.py to util 2020-10-11 23:22:34 +02:00
Android.glsl.mk
Android.mk
Android.nir.gen.mk android: spirv: fix '::' typo in gen rules 2020-12-08 22:44:23 +01:00
Android.nir.mk
builtin_type_macros.h compiler/types: Add 64-bit image types 2020-11-09 17:17:39 +00:00
glsl_types.cpp glsl/linker: Fix attempts to split up 64bit varyings between slots 2021-04-01 17:16:33 +00:00
glsl_types.h glsl/linker: Fix attempts to split up 64bit varyings between slots 2021-04-01 17:16:33 +00:00
Makefile.sources nir: Add nir_opt_offsets to fold const adds into load/store offsets. 2021-03-17 12:42:23 +00:00
meson.build spirv: add some tests for volatile/available/visible 2020-09-01 17:15:22 +00:00
nir_types.cpp nir: Add a size_align helper function for aligning elements to 16 bytes. 2020-11-16 13:54:22 -08:00
nir_types.h nir: Add a size_align helper function for aligning elements to 16 bytes. 2020-11-16 13:54:22 -08:00
shader_enums.c compiler: Drop now unused gl_varying_slot_name() 2021-02-13 00:44:53 +00:00
shader_enums.h compiler: Drop now unused gl_varying_slot_name() 2021-02-13 00:44:53 +00:00
shader_info.h spirv: Add support for SPV_EXT_shader_atomic_float_min_max 2021-03-18 00:13:40 +00:00