From 2755faf9386b4428973f105dfada6625ab85f392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= Date: Wed, 22 Jun 2022 18:30:06 +0200 Subject: [PATCH] r300: check for identical saturate mode when merging MOVs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Ondračka Reviewed-by: Filip Gawin Part-of: --- src/gallium/drivers/r300/compiler/radeon_optimize.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/r300/compiler/radeon_optimize.c b/src/gallium/drivers/r300/compiler/radeon_optimize.c index fef370d8807..31bd8526a5a 100644 --- a/src/gallium/drivers/r300/compiler/radeon_optimize.c +++ b/src/gallium/drivers/r300/compiler/radeon_optimize.c @@ -953,6 +953,7 @@ static int merge_movs(struct radeon_compiler * c, struct rc_instruction * inst) if (cur->U.I.Opcode == RC_OPCODE_MOV && cur->U.I.DstReg.File == orig_dst_file && cur->U.I.DstReg.Index == orig_dst_reg && + cur->U.I.SaturateMode == inst->U.I.SaturateMode && (cur->U.I.DstReg.WriteMask & orig_dst_wmask) == 0) { /* We can merge the movs if one of them is from inline constant */