r300: remove most of backend contant folding
authorPavel Ondračka <pavel.ondracka@gmail.com>
Thu, 15 Jun 2023 11:29:50 +0000 (13:29 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 5 Jul 2023 18:34:37 +0000 (18:34 +0000)
commit7c291fca156be75be0726af411282dcd40bf6da3
treed83bf8e93a34661e7a2d5a189693d3422e3efb89
parent41f1dd89a35a3396f562e7a07d8234439f87a6aa
r300: remove most of backend contant folding

This is now done in NIR. The remaining one for ADD + 0 to MOV is kept
until we move some remaining part of FS lowering to NIR.

There single regressions is in one d3d->glsl shader from Wine.
Wine sets invariant for glPosition which translates to exact bit for all
calculations leading to it (or the TGSI PRECISE flag). r300 backend
ignores is completelly, so removing the backend optimizations should
even make us more correct in this regards.

RV530:
total instructions in shared programs: 130705 -> 130706 (<.01%)
instructions in affected programs: 16 -> 17 (6.25%)
helped: 0
HURT: 1

RV370: no change

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23927>
src/gallium/drivers/r300/compiler/radeon_optimize.c