mesa/main: drop use_legacy_math_rules
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Sat, 15 Apr 2023 17:03:00 +0000 (19:03 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 4 May 2023 06:11:44 +0000 (06:11 +0000)
commit6ea7bdb15214b691092813ed78c96692718e9e8b
tree52033c99a77996712c0cb7bd40c745e78af38687
parent0a9473b32d5acf1b6051fe8dcae6de36089cfd26
mesa/main: drop use_legacy_math_rules

Seems the only thing that really needs this is fpow(0, 0), which should
return NaN, but then gets multiplied with zero. Let's fix that by doing
a bcsel instead of fmul to select the result here. While we're at it,
get rid of the fabs for stop, which isn't needed.

This fixes a piglits failure for most (if not all?) drivers that doesn't
support legacy math rules.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22789>
src/broadcom/ci/broadcom-rpi4-fails.txt
src/etnaviv/ci/etnaviv-gc2000-fails.txt
src/freedreno/ci/freedreno-a307-fails.txt
src/freedreno/ci/freedreno-a420-fails.txt
src/freedreno/ci/freedreno-a618-fails.txt
src/freedreno/ci/freedreno-a630-fails.txt
src/gallium/drivers/d3d12/ci/d3d12-quick_gl.txt
src/gallium/drivers/lima/ci/lima-fails.txt
src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt
src/mesa/main/ffvertex_prog.c
src/panfrost/ci/panfrost-g52-fails.txt