fix(agc): accept a CB metadata pass whose depth test passes every fragment without writing #4861
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4861"
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 Tamalero on 2026-10-13T00:29:07Z.
What
DecodeColorMetadataPassrefuses an eliminate-fast-clear or DCC-decompress pass when any of the low four bits ofDB_DEPTH_CONTROLis set while depth or stencil planes are bound. #4076 accepts the pass when no planes are bound; this PR covers the case where planes are bound.Marvel's Guardians of the Galaxy (PPSA01748) issues such a pass with the Z test on, ZFUNC ALWAYS and no Z write (
DB_DEPTH_CONTROL0x72), while a Z32 and an S8 target are bound. That test passes every fragment and leaves depth unchanged, so the pass does no depth work. Draws already treat this state as a pass-through (depthPassThrough), and the metadata pass now uses the same rule.Still refused:
DB_RENDER_CONTROLclears and copies.The error now names
DB_DEPTH_CONTROL,DB_RENDER_CONTROL,DB_Z_INFOandDB_STENCIL_INFO, so the next refusal can be read from a log.DB_DEPTH_CONTROLandDB_RENDER_CONTROLare only read when planes are bound, as before.Tested
Linux (CachyOS), GCC 16, RTX 4090, Release, on
main1c5e62878:agc_driver_graphics:metadataPassTestsgains three cases with Z and S8 planes bound. 0x72 is accepted; 0x76 (adds a Z write) and 0x7a (adds depth bounds) are refused. Withmain'sState.cppthe test fails withCB metadata pass with depth or stencil work; with the change it passes.DB_DEPTH_CONTROL0x72,DB_RENDER_CONTROL0). With it, the title gets past the loading screen to its first UI. That run also carries #757, #758 and the blend bypass PR.tools/check_conventions.py --base origin/main: passes.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Tested and written by Claude (AI assistant) on a contributor's machine.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by kr4y4 on 2026-10-13T03:15:13Z.
A Windows and Intel run, since the description covers Linux on an RTX 4090.
Setup: Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, CI configure flags, an RTX 4070 Laptop GPU and an Intel Raptor Lake-S iGPU. The head b90ec1ed4 merged into
main495bf91a0, which passes 1023 of 1023 on both GPUs.agc_driver_graphicspasses on both GPUs with--repeat until-fail:3. The full suite (ctest --timeout 120 --parallel 4) passes 1023 of 1023 on both.State.cppas onmain,agc_driver_graphicsfails on both GPUs withCB metadata pass with depth or stencil work, as in the description.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-13T18:05:22Z.
Rebase handoff — rebased onto current
main, authorship unchanged.One semantic conflict in
State.cpp, resolved with both sides' intent: this PR's refined depth-work acceptance (a depth test that passes every fragment without writing no longer rejects the CB metadata pass, with the enriched register-values error message for real failures) is kept, and main's newerrasterizerSamplesgating on the resolve-path sample count is kept alongside it.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/mainpassesmainregression (agc_driver_tessellation, #4727)To pick it up:
Head is
8d302082c.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T01:20:18Z.
Rebased onto main to resolve the conflict in
core/libs/prx/libSceAgcDriver/Graphics/src/State.cppafter #2121; no other change.