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>
This commit is contained in:
Pavel Ondračka 2023-01-02 21:02:05 +01:00 committed by Marge Bot
parent 39b7502f04
commit d869f0f7ca

View file

@ -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()
*/