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 <filip@gawin.net>
(cherry picked from commit 87a881558f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
This commit is contained in:
Pavel Ondračka 2026-02-26 22:10:52 +01:00 committed by Eric Engestrom
parent f1a3aa4036
commit b1775f660a
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -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;