r300: fix for ouput modifier and DDX/DDX

Empirical testing shows that output modifiers are not working if the
DDX/DDY is writing directly to output.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28784>
This commit is contained in:
Pavel Ondračka 2024-05-03 10:35:29 +02:00
parent 472c64c90e
commit d94d2a05b2

View file

@ -793,6 +793,15 @@ static int peephole_mul_omod(
if (var->Inst->U.I.SaturateMode != RC_SATURATE_NONE) {
return 0;
}
/* Empirical testing shows that DDX/DDY directly into output
* with non-identity omod is problematic.
*/
if ((info->Opcode == RC_OPCODE_DDX || info->Opcode == RC_OPCODE_DDY) &&
inst_mul->U.I.DstReg.File == RC_FILE_OUTPUT) {
return 0;
}
for (inst = inst_mul->Prev; inst != var->Inst;
inst = inst->Prev) {
rc_for_all_reads_mask(inst, omod_filter_reader_cb,