mesa/src/panfrost/compiler
Eric Guo 352a8d6beb
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
pan/compiler: Clamp fp16 ldexp exponent range
Fix OpenCL-CTS error in `math_brute_force/test_bruteforce -w ldexp`

Valhall LDEXP.v2f16 takes a 16-bit exponent, while NIR ldexp uses a
32-bit exponent. Truncating large exponents can flip overflow into
underflow or leave huge 16-bit exponents to hardware behavior that does
not match OpenCL's expected signed infinity/zero results.

Clamp the exponent to a range sufficient to overflow or underflow all
fp16 values before lowering to ldexp16_pan.

Signed-off-by: Eric Guo <eric.guo@nxp.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41234>
2026-05-04 17:59:18 +00:00
..
bifrost pan/compiler: Clamp fp16 ldexp exponent range 2026-05-04 17:59:18 +00:00
midgard pan/model: Expose prod_id and rev functions 2026-04-14 10:12:00 +02:00
meson.build pan/compiler: Replace frag_coord_zw_pan with var_special_pan 2026-03-27 19:23:02 +00:00
pan_compiler.c panvk: Remove pan_optimize_nir call 2026-04-30 18:26:12 +00:00
pan_compiler.h panvk: Remove pan_optimize_nir call 2026-04-30 18:26:12 +00:00
pan_nir.h pan/compiler: Collect nopersp varyings in lower_noperspective_fs 2026-04-30 18:26:13 +00:00
pan_nir_collect_varyings.c pan: Add support for 64 bit gpu_id 2026-04-09 09:49:20 +00:00
pan_nir_lower_bool_to_bitsize.c nir,panfrost: Move lower_bool_to_bitsize to panfrost 2026-03-10 20:54:44 +00:00
pan_nir_lower_framebuffer.c pan: add some missing formats to pan_nir_lower_framebuffer 2026-02-23 13:32:57 +00:00
pan_nir_lower_fs_inputs.c pan: Add support for 64 bit gpu_id 2026-04-09 09:49:20 +00:00
pan_nir_lower_fs_outputs.c pan/compiler: Allow 16-bit alpha for atest_pan 2026-04-30 17:33:09 +00:00
pan_nir_lower_helper_invocation.c panfrost: SPDX everything 2026-01-20 20:49:33 +00:00
pan_nir_lower_image_index.c pan/compiler: Move all NIR passe definitions to pan_nir.h 2025-12-02 21:00:30 +00:00
pan_nir_lower_image_ms.c pan: change image2DMSArray lowering to use Z instead of Y 2026-03-25 15:05:53 +00:00
pan_nir_lower_noperspective.c pan/compiler: Collect nopersp varyings in lower_noperspective_fs 2026-04-30 18:26:13 +00:00
pan_nir_lower_sample_position.c panfrost: SPDX everything 2026-01-20 20:49:33 +00:00
pan_nir_lower_texel_buffer_index.c pan/bi: Add lowering pass for texel buffer indices 2026-01-13 10:00:58 +01:00
pan_nir_lower_var_special.c pan/compiler: Replace frag_coord_zw_pan with var_special_pan 2026-03-27 19:23:02 +00:00
pan_nir_lower_vertex_id.c pan/compiler: Move all NIR passe definitions to pan_nir.h 2025-12-02 21:00:30 +00:00
pan_nir_lower_vs_outputs.c pan: Add support for 64 bit gpu_id 2026-04-09 09:49:20 +00:00
pan_nir_lower_xfb.c nir: merge xfb and xfb2 into one 64bit intrinsic index 2026-03-10 07:46:22 +00:00
pan_nir_resize_varying_io.c pan: Add a pass to resize I/O load/stores as needed by the varying layout 2026-03-12 22:59:13 +00:00