r300: don't merge w channel in fragment shaders
authorPavel Ondračka <pavel.ondracka@gmail.com>
Tue, 12 Jul 2022 14:03:35 +0000 (16:03 +0200)
committerPavel Ondračka <pavel.ondracka@gmail.com>
Sun, 21 Aug 2022 07:52:15 +0000 (09:52 +0200)
commit13607d8c4829edda3f3b01a9bdda0ece6e1c4821
tree9da7bf91763b143c42b20a39aca12a2b6ddba87b
parent268f317f228b2e7ffc850c1881d8f3f75f41aed2
r300: don't merge w channel in fragment shaders

Skip the merge if one of the instructions writes just w channel
and we are compiling a fragment shader. We can pair-schedule it together
later anyway and it will also give the scheduler a bit more flexibility.

Shader-db stats with RV530:
total instructions in shared programs: 169522 -> 169509 (<.01%)
instructions in affected programs: 14170 -> 14157 (-0.09%)
total temps in shared programs: 21712 -> 21722 (0.05%)
temps in affected programs: 324 -> 334 (3.09%)

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
src/gallium/drivers/r300/compiler/radeon_optimize.c