r300: use nir lowering for ffloor
authorPavel Ondračka <pavel.ondracka@gmail.com>
Wed, 7 Dec 2022 15:11:41 +0000 (16:11 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 5 Jan 2023 12:01:32 +0000 (12:01 +0000)
commit31f678626f5895e8d13a73f1c2862fa922ba6c01
treef69eae7ee765f9cd47bb7e9160c39173195c8b58
parenta93bc6afc46aca0f8124af4d77646e9788c697c4
r300: use nir lowering for ffloor

Negligible amount of instructions saved on RV530:
total instructions in shared programs: 134970 -> 134963 (<.01%)
instructions in affected programs: 2273 -> 2266 (-0.31%)
helped: 9
HURT: 1

The one hurt shader is when we fail to recognize the x - ffract(x)
pattern and skip the don't emit ftrunc optimization as implemented
in the previous patch due to some non-trivial swizzles going on.

Signed-off-by: Pavel Ondračka <pave.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20208>
src/gallium/drivers/r300/r300_screen.c