r300: don't allow constant swizzles from presubtract sources
authorPavel Ondračka <pavel.ondracka@gmail.com>
Tue, 15 Nov 2022 21:35:32 +0000 (22:35 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 16 Nov 2022 19:51:47 +0000 (19:51 +0000)
commit8cfc44aace34036caecb8043369165a04f601666
tree6c6dd8bbac73e58b7606d18fb8b210610d99a17b
parent6738a7b5b4ae7a8f14fda0d39f760db4e29db186
r300: don't allow constant swizzles from presubtract sources

It is not possible to rewrite it to a native swizzle later on R300/R400.

The way the native rewrite currently works, it will create bunch of
movs with the given presubtract and partial swizzles, however no
constant swizzle for presubtract source exists so it is just not
possible to rewrite it.

This prevents an infinite loop in supertuxkart shader when we really
start enforcing the presubtract swizzle limitations during native
swizzle rewrite in the next commit.

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