feat(agc): render into depth mip levels #7927
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7927"
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 whamre on 2026-10-19T14:30:38Z.
What
decodeDepththrew on any depth view withDB_DEPTH_VIEW.MIPIDorDB_Z_INFO.MAXMIPset. It now decodes both and renders into the selected level of a 64 KiB Z_X mip chain as a surface of its own, at the level's offset and extent fromComputeElementMipLayout, the same way color target mips are handled. Stencil gets its own 1-byte mip layout. Slices of a mip chain step by the size of the whole chain. Multisampled depth mips, other swizzles, levels in the packed mip tail and HTILE on a mip chain still throw, each with its own message, and are listed in the libSceAgcDriver debt file.Tested
LEGO Builder's Journey (PPSA05496) stopped right after the logo on
mainwith:It renders depth into mip 1 of a 64 KiB Z_X chain without HTILE. With this change (and #7652 for the earlier GC stop), it reaches the first playable scene and renders it correctly.
agc_driver_graphicsgets a new case: mip 0 and mip 1 offsets and extents, a slice of a mip chain, and the four rejected cases (mip past MAXMIP, packed mip tail, HTILE, other swizzle).check_conventions.pypasses.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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T14:45:26Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL360-362core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL397-399core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL354-362core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL397-399core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL397-399Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-20T19:00:52Z.
First AMD run of this PR, on Linux with RADV. Head
cd1efc9fcmerged ontomain2fee39f1b(clean merge), built in full and compared with the samemain, on the same machine.AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.
Full suite (
ANYPS5_REQUIRE_VULKAN=1 ctest -j8) at5d12e6e0f: 1715/1716 with this PR, against 1715/1716 onmain. The one failure is the same on both, so this PR adds none:agc_driver_guest_memory_lifetime(#7784, which #7849 addresses).Comparing the JUnit output with
main: this PR adds no ctest entry, and none is skipped or removed. The test it extends,agc_driver_graphics, runs and passes.GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T22:04:06Z.
@whamre one case the change opens that
mainrefused: aDB_DEPTH_VIEW.MIPIDother than 0 on a surface withDB_Z_INFO.MAXMIP0. Thezero(cx, 0x002, 0x3c000000u, ...)check is gone, andviewMip <= maxMipis only checked insideif (maxMip != 0), so such a view now renders into mip 0 instead of throwing. Could you add aRequireforviewMip == 0whenmaxMip == 0, plus a row in theagc_driver_graphicscase?Imported from boykopovar/AnyPS5. Originally posted by whamre on 2026-10-22T05:43:23Z.
Thanks, good catch. Added in
74f2fcb61: whenDB_Z_INFO.MAXMIPis 0, a non-zeroDB_DEPTH_VIEW.MIPIDnow throws ("depth view mip N on a surface without mips") instead of rendering into mip 0. The COLOR_INVALID depth-only case inagc_driver_graphicshas a new row for MIPID 1 with MAXMIP 0.agc_driver_graphicspasses andcheck_conventions.pyis clean.AI-assisted: yes