fix(agc): apply completion-proven native depth clears #5554
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5554"
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-13T23:44:17Z.
What
Apply a completed, recognized HTILE mask clear to a sampling-eligible native multisampled depth owner. Keep the native image, attachment and sampled-view identities.
The clear requires exact direct-dispatch bounds for the existing 17-word mask kernel, complete tracked driver-store coverage since notification, no pending GPU or intervening CPU/depth write, and every HTILE word proving the current zero/one clear.
StoredOverremains an overlap query;StoredAllSinceproves coverage and does not prove fence completion.Partial, unproven, overlapping and raced clears throw. Guest publication, metadata-fill transitions, arbitrary producers and lost tracking remain unsupported. The strict native path is separate from generic HTILE range notification.
Parent #5524 and prerequisite #5496 are merged. The current head retains main's single HTILE notification after the pipeline drain, with the bounded native producer extent as its third argument.
The conditional Sonic Unleashed Recompiled PPSA99902 need is recorded in #3262 and bring-up #4443:
native multisample depth fast-clear transition is not implementedafter the sampling prerequisites. This head has not been replayed on the title.Current head:
c9a96a548cd7e63161f069433cdfc56cbae26ac6, refreshed by @adriadam10 on mainb3f9f89e62979d7328ff0dec2d14b006f8c2c0ab. Independent validation below uses composition213cd7dc6: this exact head plus #6333's unchanged one-line PM4 build dependency, now merged. The published PR branch is unchanged.Tested
Composition213cd7dc6: #5554 c9 + merged #6333, Windows11 Enterprise26200, WinLibs GCC15.2.0 Release, bundled dependencies/SPIRV-Tools enabled:
Recompiler.hppfailure intests/Pm4.cpp; red/green evidence.StoredAllSincecoverage, draw-write ranges, pipelined fill/DMA and predication ordering. D16/D32 completed-clear and partial/raced/unproven-producer refusal tests pass.Dispatch.cppparses without configuration errors/timeouts (8.785s analyzer time). Cppcheck has no selected diagnostic; clang reports an existingPerformanceTimernull-metric warning. Its path assumes a null constructor frame and later a nonnull unchanged frame; the private-frame/metric initialization invariant was inspected. No new defect was reproduced and no analyzer-clean claim is made. Prior six-TU analysis and earlier288-pass matrix remain pinned to a6abeafb0.Historical title/source/fault evidence retains its pins. This composition has no new title replay, Linux or full-suite result; it does not prove console equivalence or arbitrary producers. Full upstream CI still requires maintainer dispatch.
Checklist
main(c9 on b3f9; tested composition213 includes merged #6333); no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by Gashrod1 on 2026-10-15T00:25:18Z.
@Amoenus Data from DAVE THE DIVER (PPSA19115) on Windows (RTX 5060), stack:
mainab9a47684+ #5554 (104ea4e60) + #5558 + #6108, plus a local change that samples an undrawn 2x Z_X texture whose HTILE is all zero as depth 0.0.The title now stops at frame 16 on the native multisample depth path. The first refusal is
native multisample stencil or depth format import is not implemented. A whole-HTILE fill then replaces it withmetadata fill transition:VK_FORMAT_D32_SFLOAT_S8_UINT, stencil in HTILE (htileDepthOnly0), clear depth 0.00x21be48000+0x30000, filled with0x00000000(whole range) before the first sample. Before the fill, the same HTILE was already all zero when the depth plane was sampled undrawn.So for this title the next steps are D32S8 with stencil, then (I expect) the watched-memory requirement on Windows. Do you plan to cover D32S8 in this chain? If you prefer, I can prototype the HTILE-proven clear case for D32S8 (all words prove the clear for depth and stencil, no memory decode) as a follow-up on top of your branch, and test it in this title.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-15T04:10:13Z.
@Gashrod1 D32S8 is outside the current #5554 scope. At
104ea4e60, native sampling eligibility accepts only D16_UNORM/D32_SFLOAT and rejects a stencil plane or stencil HTILE. The later generic metadata-fill notification can replace that earlier refusal, so the second message does not establish that D32S8 import succeeded.A separate follow-up on this stack is welcome; I am keeping #5554 focused on completion-proven clears for an already sampling-eligible owner. For the D32S8 clear case, please pin the depth and stencil proof independently, including contradictory/partial HTILE and intervening-write refusal controls, and verify both sampled results. An all-zero initial HTILE and a later whole-range fill need separate coverage. The Windows watched-memory boundary should remain an explicit failure until its ownership/tracking requirements are met.
Your DAVE THE DIVER evidence is useful conditional title validation; I have not independently reproduced that title or the D32S8 proposal here. AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T12:02:46Z.
mainmoved (dc027cc004notes the HTILE depth clear after the pipeline drain) and conflicted inDispatch.cpp. Rebased onto currentmain: the call stays after the drain and now passesHtileDepthClearBytes_nid_no_patch(...)as the third argument, as in this PR's head (added as one commit on top, no other change). On the rebased treeagc_write_tracking,agc_driver_native_multisample_depth,agc_driver_native_depth_retirement,agc_driver_native_depth_clearsandagc_driver_native_depth_clear_refusalspass. Merging once the Windows build is green.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:07:59Z.
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/Execution/src/GuestMemory.cppL912-915core/libs/prx/libSceAgcDriver/tests/WriteTracking.cppL102, L836Some 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/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/Dispatch.cppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/Dispatch.cppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/Dispatch.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/Dispatch.cppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/Dispatch.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/Dispatch.cppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppdocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-15T12:31:51Z.
@adriadam10 Independent Windows validation is green for your refreshed
c9a96a548, composed with #6333's unchanged PM4 dependency (now merged): 213cd7dc6.Full app/libs build and repository checkers pass. The27 selected groups pass once plus five repeats per NVIDIA/AMD selector:324 executions, no skips/timeouts, maximum5.73s. Fourteen runtime groups per vendor report the actual GPU. The post-drain notification retains the third native-extent argument. Exact pins, analysis advisory and scope are in the updated description; no new title/Linux/full-suite claim. Your published PR head is unchanged. AI-assisted: Codex.