fix(agc): support alternate channel order in 16-bit color targets #1349
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1349"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T00:01:55Z.
What
Support alternate component order for 16-bit RGBA color targets. Swap red and blue in shader exports, write masks, and constant-color blend factors together. Reject conflicting constants across simultaneous targets.
Semantics follow
ac_translate_colorswapin Mesa 26.2.2. Console equivalence remains unmeasured and is recorded in TechnicalDebt.Tested
Fedora 44, Release: graphics tests cover UNORM, SNORM, UINT, and float formats; standard/alternate/rejected reverse orders; write masks; blend constants; and compatible/conflicting target combinations. Related color-format PRs do not implement this mapping. Contribution checks pass. Windows was not tested.
Checklist
main; no duplicate open PR.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T06:37:27Z.
Which title draws to a 16_16_16_16 color target with COMP_SWAP 1 on main? With the title ID and the log line where it stops this can go in.
Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T07:14:19Z.
Rebased on
e705d430. Preserved the new wide-string and Windows I/O limitations. Removed an unrelated blank-line change and grouped this texture limitation with the graphics notes. The title-evidence request remains open.Fedora 44 Release:
agc_driver_graphics_tests,agc_driver_pm4_testsbuild; the targeted tests and contribution checks pass. Windows CI is pending.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T23:12:47Z.
Review: CHANGES_REQUESTED
Thanks. This no longer applies to current
main, and the conflict is not mechanical:State.cppDecodeColorFormatcase 12: since #1425,mainalready mapsswap2/3 to the reversed mappings (0x1b/0x93) and only rejectsswap == 1. Please rebase and add theswap == 1(0xc6) case on top of that, keeping 2/3 as they are.DecodeState:mainthrows when blending into a target with a reversed order (mapping == 0x1b/0x93). Say how the new blend-constant handling interacts with that, and keep the throw for the reversed orders.tests/Graphics.cppanddocs/dev/TechnicalDebt.mdconflict as well; re-add the test and the TechnicalDebt line (not as the last line of its section) after the rebase.16_16_16_16target withCOMP_SWAP1, and where does it stop onmain? Without that evidence (title ID and log line), or a Linux test reproducing it, this stays a speculative path.Please rerun
agc_driver_graphics_testsafter the rebase.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T09:03:54Z.
Review: APPROVED
Rebased onto current
mainand fixed the points from the previous review on your branch:DecodeColorFormatcase 12 now only addsswap == 1(mapping0xc6) on top of #1425;swap2/3 keep0x1b/0x93.0x1b/0x93) still throws. The constant-color swizzle applies only to the0xe4/0xc6targets; conflicting constants across simultaneous targets throw. The old "component swap 1 fails" check is gone and the blend test now expects the reversed-order rejection.Graphics.cpptest re-added after the rebase and TechnicalDebt line re-added in "Functional" (not last in the section).agc_driver_graphicspasses and fails without theState.cppchange.Not verified: console behaviour for
COMP_SWAP1 on 16_16_16_16 (only Mesaac_translate_colorswap, same model as the existing 8_8_8_8 alternate order); recorded in TechnicalDebt. Merging on green CI.