fix(agc): handle Demon's Souls read-only depth resummarize #4049
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4049"
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 Mouhand-Kaddo on 2026-10-11T22:09:18Z.
What
Demon's Souls PPSA01342 v1.04 issues a pure
DB_RENDER_CONTROL.RESUMMARIZE_ENABLEdraw withDB_DEPTH_CONTROL=0x007007f3, D32 depth, no stencil plane, zero color writes and no pixel program. After the earlier Windows direct-memory stop is bypassed by #637, main rejects it with:Extend #2178's resident-depth model to this read-only pass. HTILE is not modeled, so recomputing its summary changes no modeled surface state. Accept only pure resummarization with enabled D16/D32 depth that always passes, no depth writes, bounds test or conditional color writes, no stencil plane, zero color writes, and no running pixel stage. Return
DrawVerdict::Nothingbefore shader decoding or pipeline creation. Missing required registers and draws outside these constraints still reject. TechnicalDebt records the boundary.This is generic register-driven behavior. There is no title check, retry or new environment switch. The PR contains only the resummarize change; #1395's clear/copy recognition and the closed stencil-clear PRs do not implement it.
Tested
Windows 11, i7-13700K, Radeon RX 6900 XT, MinGW-w64, Release, hardware Vulkan,
ANYPS5_ENABLE_SPIRV_TOOLS=OFF(default). Based on main974116d38b1b6ba3ca7e45846c704f2101ec2de3.agc_driver_graphics: the captured register state fails before this change and passes with it. Depth writes, bounds tests, rejecting depth comparisons, a stencil plane, color writes, a running pixel stage, combined maintenance modes, unsupported depth format and missing required registers still reject.agc_driver_readonly_resummarize: submitsSET_CONTEXT_REGandDRAW_INDEX_AUTOthrough the real worker, then waits idle. The unchanged driver throws the exact maintenance rejection above; the changed driver completes. It requires no GPU and exercises the early verdict rather than only the state helper.libsbuild, the two focused tests, and conventions checks pass on the new main.agc_driverpasses with Khronos Vulkan validation enabled, without validation errors. Its normal run intermittently exits with Windows heap corruption (0xc0000374). A private baseline probe using the unchanged driver and original submit suite, adding only a zero-count draw (main's existing early no-op), reproduced the same exit on the third run. Thus that failure can occur without this resummarize change; it remains unresolved.989146c3, with #4021 (Windows build guard), #4018 (loop shader) and #637 (direct-memory write tracking), reached the maintenance rejection at about 55–90 seconds without this change. With this change it progressed into further graphics work, then hit an access violation insideamdvlk64.dll(read of0xffffffffffffffff) near the end of a 300-second observation. No menu or presented frame is claimed. Original game files were preserved.974116d38with the same test stack. With this change and Khronos validation enabled, the game again advances past resummarization, then exits after 343 seconds withamdvlk64.dll+0x9e251f, read of0xffffffffffffffff. Validation reports ten forward-compatibility warnings about 3D-image barrier layer counts and no validation errors before the crash. This later driver crash is outside this PR; main-menu boot remains unverified.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by btsouth on 2026-10-12T00:21:20Z.
Tested on Linux with NVIDIA, Demon's Souls PPSA01342 v1.005 (US). This PR merged locally onto main
bab7b328, Release,ANYPS5_ENABLE_SPIRV_TOOLS=ON,APS5_SPIRV_OPT=none. Arch Linux, kernel 7.2.8, GCC 16.2.1, RTX 4070 SUPER on driver 615.78.08.On plain
bab7b328the title opens its window, presents 2 frames and stops withDB_RENDER_CONTROL depth copy, resummarize or decompress is unsupported (register 0x0 = 0x00000010). With this PR that error is gone. Start-up continues through about 2,450 shader compilations to the save data search, then stops presenting after 2 frames for separate reasons, which I described in #3710.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T03:35:21Z.
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/include/State.hppL136