mesa/src/compiler/clc
Alyssa Rosenzweig aca4948997 clc: force exact! across libclc
libclc seems to have piles of bugs where it relies on precise floating point
behaviours to meet CL precision requirements but doesn't actually disable fast
math in its own spir-v. I am tired of playing this whack-a-mole game. Let's just
assume that the math in CLC is right and should not be optimized in unsafe ways,
and force the exact bit across libclc. This works around a large class of libclc
bugs that keep cropping up from innocuous NIR changes.

This does not force the exact bit for application shaders using libclc, just for
the calculations inside of libclc itself. This seems like the right tradeoff all
considered, anything "fast" bypasses libclc anyway.

Fixes generated_tests/cl/builtin/math/builtin-float-pow-1.0.generated.cl on
drivers using nir_opt_reassociate, and probably other stuff.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36527>
2025-08-01 21:00:47 +00:00
..
clc.c clc: Tell clang to track imported dependencies 2024-12-06 13:48:26 -05:00
clc.h clc: add support for cl_ext_image_unorm_int_2_101010 2025-06-30 18:04:59 +00:00
clc_helpers.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
clc_helpers.h rusticl/feat: LinkOnce ODR 2025-01-31 13:46:41 +00:00
mesa_clc.c clc: Allow bitfields 2025-04-11 21:27:37 +00:00
meson.build mesa-clc: add an option to force inclusion of OpenCL headers 2025-04-24 11:40:15 +00:00
nir_clc_helpers.h nir: move the libclc lowering over to functions file. 2023-09-12 01:57:50 +00:00
nir_load_libclc.c clc: force exact! across libclc 2025-08-01 21:00:47 +00:00