feat(agc): support 64 KiB display XOR color targets #4318
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4318"
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 Amoenus on 2026-10-12T05:56:10Z.
What
Support
SW_64KB_D_X(0x1a) color targets through the existing texture equations and mip geometry. Give D_X its own equation-cache slot; validate pipe/bank XOR and reject unresolved raw column bits before resident lookup as well as direct layout construction. Extend layout, transfer, array/mip-view and GPU draw tests.Needed by Sonic Unleashed Recompiled, PPSA99902 /01.003.000: the captured descriptor is
CB_COLOR_ATTRIB3=0x0dc68000. Issue #2970 records conditional title runs stopping at:The unchanged decoder on tested main
ffa198407rejects that descriptor in 5/5 independently compiled runs; this rebased branch passes 5/5. The historical title comparisons use documented startup prerequisites and are not unchanged-current-main boot results. This patch supplies the missing color mode; it does not promise a complete title boot.Source: AMD addrlib GFX10 non-RB+ c5e80007, the same synthetic 16-pipe/256-byte configuration as the existing texture equations. Unmeasured console behavior and unsupported column bits are recorded in TechnicalDebt. No new dependency or environment switch in the implementation.
Tested
Current exact head
b6f1a4a69, rebased onto main2f4cc8983be9b9eacb878a4c705bdf5fcdc2d84f, including #4431's specialization cleanup. Code-only contribution delta is unchanged by this rebase. Debt follows the new per-library layout indocs/dev/debt/libSceAgcDriver.md.Windows 11 Enterprise 26200, WinLibs GCC15.2.0r7, Ninja Release / testing ON; RTX5080/NVIDIA610.62 and AMD1002:13c0/driver32.0.21036.18. Ordinary LTO, AnyPS5 shader cache disabled; driver-coldness not established.
Full build and system libraries, conventions, registration and diff checks pass.
Full suite with two CTest workers (
--parallel 2 --timeout 30): 989 passed / 0 failed / 7 skipped of 996, maximum 21.267s; every observed test finishes below30s. Skips are stencil-reference export and six video-output cases.NVIDIA: all13 selected groups pass5/5. AMD: eleven groups pass5/5;
agc_driver_graphicsandagc_driver_array_layer_targetreport failures. No selected group skips. AMD validation remains unresolved; this is not an all-green or merge-ready claim. Specialization/module and formatted-load regressions are included to validate the new upstream changes. GPU campaigns run sequentially. Driver-backed cases verify the requested GPU. Recorder-based helper controls independently select NVIDIA; no AMD or GPL-off coverage is claimed for those helpers.Selected groups cover graphics/prepared/multisample, draw-cache reuse including GPL-off, R_X/D_X full-array transport, color1555, merged R_X packed tails and uint8x4 resident/nonresident D_X rendering. No new addrlib sweep, console measurement or title-startup comparison was performed; historical controls remain scoped below.
The latest private title descriptor is D64_X /16-byte RGBA32_UINT, packed mip2 of a128x64 surface, pipeBankXor0x4000. This layout PR leaves a separate D_X GPU routing gap, maintained in #4328 and bring-up #4443. A focused follow-up is being investigated; no new launch milestone is claimed.
Harness correction:
APS5_NO_GPLis presence-based. Corrected GPL-on runs leave it unset; off runs use1. Earlier0/1 matrices exercised GPL-off twice and are retained with that corrected scope. No production environment switch or workaround was added.An earlier same-head artifact produced four AMD legacy-path tiled-render mismatches; the graphics group also hit the previously recorded host-exclusion fixture signature. Stock-runtime controls passed. Recompiling all driver/compiler sources without a tracked-code change clears the matched rendering failures. The old failing DLL and logs are retained; the exact stale-artifact origin is unconfirmed. The fresh broad retest still records a host-exclusion fixture failure and an AMD array-render mismatch (0xdeadbeef instead of0x3e800000); the source of that remaining mismatch is unresolved. Earlier passing runs are not substituted for this failed campaign.
Previous exact head
6a42bd7e4on d592: full965/0/7 of972, NVIDIA selected groups pass, AMD array/color1555 crash with ordinary LTO and pass5/5 with the existing LTO-off diagnostic control. A stock-source/header-matched frozen-main-runtime control reproduces color1555 crashes5/5 but its original R_X-only array fixture passes5/5; the extended candidate array failure was not claimed as reproduced by that control. No diagnostic switch was added to this implementation.Historical exact head
c17fc4537on mainffa198407: full 945/0/7 of952; 17/18 relevant groups x5, with an intermittent host-exclusion fixture signature also reproduced on matched main (main1/20, candidate0/20). Captured decoder: main fails5/5, candidate passes5/5. Pinned-addrlib CPU comparison: 140 configurations/536,940 addresses per run x5, zero differences. Earlier broad comparison: all64 legal tags, 2,240 configurations/8,591,040 addresses per run x5, zero differences; five deliberately broken decoder/cache/mapping/XOR/refusal variants detected5/5. These are source-model checks, not console measurements. Earlier heap-corruption findings and #4029 baseline evidence remain in the maintained report.Sequencing: #4551's author agreed that #4551 goes first, then #4318. Only their shared
ArrayLayerTarget.cppfixture conflicts; runtime changes are independent. After it lands, I will rebase this test to retain their R_X collapsed-slice1/2/3 checks and our R_X/D_X full-array checks, then repeat validation. The current head is not that combined fixture yet.No new title-startup milestone is claimed. Conditional PPSA99902 progress and remaining prerequisites are maintained in Game bring-up #4443.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T13:20:34Z.
Rebase handoff — rebased onto current
main(staleness only; all three commits applied cleanly), authorship unchanged.Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV):tools/check_conventions.py --base origin/mainpassesTo pick it up:
Head is
280722906.Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-12T16:06:26Z.
Rebase pushed (2026-10-12):
b6f1a4a69, based on main2f4cc8983. Original code patches remain unchanged by range comparison; technical debt is migrated to the per-library file. Full build/libs/conventions/registration pass. Full NVIDIA suite:989 passed/0 failed/7 skipped of996. All13 selected NVIDIA groups pass5/5.Remaining AMD validation: in the corrected default/GPL-on campaign, eleven groups pass5/5; the graphics fixture reports the previously recorded host-exclusion signature, and the extended array fixture reads0xdeadbeef instead of0x3e800000 after the draw. These results are retained, not replaced by older passing campaigns. Merge readiness remains unresolved.
Earlier tests using APS5_NO_GPL=0 actually disabled GPL and produced four tiled-render mismatches. Stock main-runtime controls passed those four cases5/5 on both devices; the frozen D_X artifact reproduced the off-path mismatches. Recompiling the driver/compiler from unchanged tracked source clears matched color1555/packed-tail failures in crossed-executable controls. The old DLL and failed logs are retained; exact stale-artifact cause and the remaining array mismatch are unconfirmed. Recorder helper controls independently select NVIDIA and are not AMD coverage.
The #4551-first shared-array-fixture order remains pending, so Depends on:#4551 remains. No new title launch or console measurement is claimed. The separate captured D64_X/16-byte packed-mip GPU-routing gap is maintained in #4328; it is outside this layout patch.
Status update (2026-10-13): #4318 was merged at
6f438a1c2after the above validation report was posted. The remaining AMD findings are still under investigation; merge status does not turn them into passes. #4551 remains open, so the previously agreed ordering was not followed by the actual merge.