r300: fix unconditional KIL on R300/R400
authorPavel Ondračka <pavel.ondracka@gmail.com>
Wed, 26 Apr 2023 08:18:20 +0000 (10:18 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 26 Apr 2023 09:25:13 +0000 (09:25 +0000)
commitdb6c3cd13ded5c4a89fb8dbfaef714432b8e1ed9
tree00249797dc9befc9de4435e39a03e7cc4057750a
parent7d4eb78e1b2c0cee720aad9b1c53442c0b2183a8
r300: fix unconditional KIL on R300/R400

  0: KIL -none.1111

Negate is not allowed for texturing opcodes, so the incorrect swizzle
was detected, however later optimization, where we try to rewrite incorrect
swizzles from constant (immediate) registers by adding a new ones with
correct order was interfering and not handling this correctly, so we
ended with

CONST[0] = {    -1.0000    -1.0000    -1.0000    -1.0000 }
  0: KIL const[0].xyz-w;

Even if it would get the swizzle right, texturing opcodes can't read from
constant registers, so just skip it and let this be handled by a later
part which inserts an extra mov instead.

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