From b1775f660a165ce56e89877ec61144c03ac3ca9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= Date: Thu, 26 Feb 2026 22:10:52 +0100 Subject: [PATCH] r300: copy target when merging alpha output instruction The alpha instruction always wrote to the same rendertarget as the rgb and the original target was ignored (surprisingly the HW docs explicitly allows rgb and alpha to write to different targets). This makes tesseract rendering a bit better, but there are still some remaining issues. Fixes: 1c2c4ddbd1 ("r300g: copy the compiler from r300c") Reviewed-by: Filip Gawin (cherry picked from commit 87a881558f3ea8e46df8390b05d87d29e9c5d793) Part-of: --- .pick_status.json | 2 +- src/gallium/drivers/r300/compiler/radeon_pair_schedule.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 586b6d18b4a..08449acbd0c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4434,7 +4434,7 @@ "description": "r300: copy target when merging alpha output instruction", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1c2c4ddbd1e97bfd13430521e5c09cb5ce8e36e6", "notes": null diff --git a/src/gallium/drivers/r300/compiler/radeon_pair_schedule.c b/src/gallium/drivers/r300/compiler/radeon_pair_schedule.c index 3fa0e49d692..925a50258f3 100644 --- a/src/gallium/drivers/r300/compiler/radeon_pair_schedule.c +++ b/src/gallium/drivers/r300/compiler/radeon_pair_schedule.c @@ -647,6 +647,7 @@ destructive_merge_instructions(struct rc_pair_instruction *rgb, struct rc_pair_i rgb->Alpha.Opcode = alpha->Alpha.Opcode; rgb->Alpha.DestIndex = alpha->Alpha.DestIndex; rgb->Alpha.WriteMask = alpha->Alpha.WriteMask; + rgb->Alpha.Target = alpha->Alpha.Target; rgb->Alpha.OutputWriteMask = alpha->Alpha.OutputWriteMask; rgb->Alpha.DepthWriteMask = alpha->Alpha.DepthWriteMask; rgb->Alpha.Saturate = alpha->Alpha.Saturate;