summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorPavel Ondračka <pavel.ondracka@gmail.com>2023-01-02 21:02:05 +0100
committerMarge Bot <emma+marge@anholt.net>2023-01-03 23:23:26 +0000
commitd869f0f7ca51fb8767ea4dfd457b713b6c875a26 (patch)
treee63d179fa7d9279f34dda6181dfcd5f4f826bf33 /src/gallium/drivers/r300
parent39b7502f041cab2cf4f6196820789adc691a0242 (diff)
r300: don't copy propagate constant swizzles to KIL on R300
Transforming 0: MOV temp[1], -none.1111; 1: KIL temp[1]; to 0: KIL -none.1111; Doesn't work on R300 while it works just fine with R500. Prevents a regression when we enable the copy propagate of RC_FILE_NONE to texture instructions 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/20484>
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/compiler/radeon_optimize.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/compiler/radeon_optimize.c b/src/gallium/drivers/r300/compiler/radeon_optimize.c
index 33350b7fa41..3e034a06f74 100644
--- a/src/gallium/drivers/r300/compiler/radeon_optimize.c
+++ b/src/gallium/drivers/r300/compiler/radeon_optimize.c
@@ -88,6 +88,20 @@ static void copy_propagate_scan_read(void * data, struct rc_instruction * inst,
return;
}
+ /* R300/R400 is unhappy about propagating
+ * 0: MOV temp[1], -none.1111;
+ * 1: KIL temp[1];
+ * to
+ * 0: KIL -none.1111;
+ *
+ * R500 is fine with it.
+ */
+ if (!reader_data->C->is_r500 && inst->U.I.Opcode == RC_OPCODE_KIL &&
+ reader_data->Writer->U.I.SrcReg[0].File == RC_FILE_NONE) {
+ reader_data->Abort = 1;
+ return;
+ }
+
/* These instructions cannot read from the constants file.
* see radeonTransformTEX()
*/