perf(agc): serve compute dispatches whose read-only buffers moved from the cached template #7044
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7044"
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 AlxcBTW on 2026-10-17T07:38:38Z.
What
A compute dispatch is served from its cached resource template when the content key matches. The key contained the base address and size of every guest buffer, so a dispatch of the same shader over a read-only buffer at another address missed and was built again. The key now leaves out the base and size of read-only buffers, as a draw's key already does.
A hit whose read-only buffers moved is proved by
ShaderResources::MovedDispatchBuffers: every moved element is read-only in the program, was read in place when the template was built, is accessible, is withinAPS5_DISPMOVE_MAX_KIB(default 1024), and has nothing pending over its new range (recorded writes, pending storage images, shadowed units). The dispatch then binds snapshots of the new ranges in a descriptor set of its own that lives with the batch that records it. A refused proof builds the dispatch fresh, as before; an element the program writes is never moved.APS5_NO_DISPATCH_MOVE=1turns the path off.The same commit carries the correctness condition the move needs.
fastRevalidateproved a template's storage image current from write stamps.cachedStorageTextureanswers a storage binding over a registered depth surface with the plane's colour mirror, and no stamp records a depth surface that appears after the template was built. The proof now fails when a registered depth surface covers the image, so the full walk decides and a stale image cannot be copied over the depth image (DepthSurfaceStoreBack). The gap exists for exact-repeat hits too; the move makes it easier to reach. I can split it into its own PR if you prefer.Review follow-up (second commit,
a58a70911): a read-only V# that the build clamps (a size above the descriptor range limit cut to the mapped end, or a stride overhang at the last guest page cut to the allocation end) was compared with the template by its raw size. An unchanged clamped buffer therefore counted as moved, was refused over the limit, and the dispatch was rebuilt every time, where onmainit was an exact hit. With the overhang clamp the proof also snapshotted the raw size, past the allocation end that a fresh build bounds. The build and the move proof now take the buffer range from one function (ShaderResources::guestBufferBytes), so clamped sizes are compared with clamped sizes: an unchanged buffer is an exact hit, and a moved one is snapshotted at its clamped range. An overlay without a descriptor set is refused like one that could not be made, and recording one throws, so a moved dispatch can never bind the template's old set.APS5_NO_DISPATCH_MOVEdisables the path when set to any value, andAPS5_DISPMOVE_MAX_KIB=0means no cap.Review follow-up (third commit,
350b8d2b8): a refused move no longer replaces the movable template that serves another address. The dispatch is served by an entry under the old exact key (read-only bases included), or builds one there, next to the movable template; exact-key hits skip the move proof as before.[dispmove]counts rebuilds after a refusal, builds kept beside the template and dispatches served by an exact entry.Tested
5da6de62a: 494 of 494 tests pass, includingagc_driver_dispatch_move,agc_driver_dispatch_move_depthandagc_driver_graphics(agc_driver_dispatch_movenow also alternates a hit A with a refused B; the verdict table ofagc_driver_graphicscovers the clamped oversized V# at the allocation end and at the block start, a raw size that now fits, and the stride overhang).tests/Graphics.cpp: verdicts of the proof (identical, one and two moved elements, size only, content-key equality, each refusal reason, byte cap).agc_driver_dispatch_move(real device): a read-only input moved between guest blocks, exact repeat, shortened range, driver store over the range, input moved into the unwritten half of the dispatch's own output, input moved onto a range a recorded dispatch still writes; results checked lane by lane, plus the move counters.agc_driver_dispatch_move_depth: a depth surface drawn over the plain storage image a template was built over, planes inside and outside the write watch, imports watched and unwatched; the guard must refuse and the plane must keep what the depth image holds.main(b7951b96a) against the change (2c7add338: the same code behind a switch,APS5_LAB_DISPATCH_MOVE=1; this PR turns it on by default). Three paired rounds, arm order alternating,APS5_NO_PAD_INPUT=1, automatic texture cache budget, trace window 170 s to 190 s.tools/trace_digest.pysummary lines:Mean FPS 6.91 on
mainand 7.72 with the change (+11.7 %); every pair favours the change on FPS, frame p50 and GPU busy (-5.6 ms per present on average). p99 is worse with the change in every pair (by 26 to 169 ms), so the gain is in the typical frame, not the spikes. The rows carry no per-class GPU or mutex profile, so this does not claim a mechanism beyond the change itself. Caveat: gameplay rows on this machine also vary with free memory (about 7 to 8 FPS with 7 GiB free against 5.5 FPS below 6 GiB, independent of the arm); alternating arms share most conditions, but three pairs cannot rule it out. The title menu is atmain's texture budget limit on both arms (2.90 and 2.84 FPS) and shows no difference. With a fixedAPS5_TEXTURE_CACHE_MIB=3072on both arms (four alternated 200 s title rows each,mainf8b22edfbagainst89d255c5f) the title is 7.90 against 7.88 FPS, GPU busy 79.5-79.9 ms on both: the change does not move the title menu; its effect is in gameplay. Traces are on the lab machine and I can attach them on request.APS5_VERIFY_PROOFS=1on the first commit (89d255c5f; the follow-up only changes clamped buffers), same machine and game, one title row and two gameplay walks: 0 disagreements between the proof and the full walk (90,085 checks), no aborts. The move served 28,171 template hits at the title and 230,363 + 263,523 in the walks (443,847 + 506,328 moved buffers), with 0 refused moves; 1,583 / 7,967 / 8,907 hits were exact repeats. An earlier stack that also carried other changes gave the same picture: 0 disagreeing proofs in 185,530 + 24,371 checks (title) and 305,893 + 13,013 (gameplay), pictures unchanged.python3 tools/check_conventions.py --base origin/mainpasses. Based onf8b22edfb; merges cleanly with currentmain(3b10c7ef0).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-17T07:49:42Z.
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/ShaderResources.cppL4740-4741core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL2731-2732core/libs/prx/libSceAgcDriver/tests/execution/DepthFastClearHarness.hppL129core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppL391core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL3702-3704core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL4741core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppL4108core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL3702-3706core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL2731, L2834Some 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/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T07:51:01Z.
Review of
89d255c5f: the move proof looks correct (it mirrors the draw proof and is stricter on storage, recipes can't bypass it, and alignment and pending writes check out). One perf issue needs fixing before merge:Refusal -> rebuild ->
Insertevicts the other template. Read-only addresses are no longer part of the dispatch key. When the same shader alternates over buffer A and buffer B and B's move is refused (overAPS5_DISPMOVE_MAX_KIB, pending write, unmapped, no bindings),dispatchbuilds fresh and inserts under the same key.ResourceCache::Insert(ShaderResources.cpp:3280) erases the existing entry, so A's template (and its recipe, via the weaktemplateRef) is gone. Then A refuses/moves against B's template, and so on, so you get a rebuild on every dispatch. Before this PR, A and B had separate keys and both exact-hit with recipes. Even when B's moves succeed, B pays a snapshot plus a descriptor set per dispatch and never gets a recipe.Could you:
[dispmove];[dispmove]refused/filtered counts from the PPSA16064 run? The p99 in your table is worse in all three pairs (+26 to +169 ms), which fits occasional costly paths like this.Nits:
MarkGpuWritescomment are deleted, leaving// once the work completed.on its own.APS5_DISPMOVE_MAX_KIB=0means unlimited (themaxBytes != 0guard); please document it.Merge note: this has one trivial conflict with #7002 in the
PrepareDrawBindingssignature (keep this PR's signature plus #7002'ssynchronizeGuestBuffers(moved)line). It is clean against #6995 and main.Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-17T08:20:08Z.
In-game run on a real GPU: Epic Mickey: Rebrushed (PPSA15657, UE 4.27), first level. Linux, RX 7600 (RADV NAVI33, Mesa 25.2.8), Ubuntu 24.04, GCC 13.3 Release. Head
89d255c5fagainst its basemainf8b22edfb, three alternated runs each,APS5_PROFILE_DRAW=1. FPS is the mean over 75–180 s after Continue (the cutscene is skipped at 60 s).The path is used heavily and never refused. A typical 10 s
[dispmove]line in the level:About 97 % of the template hits had moved buffers, at roughly 11 MiB/s of snapshots.
[dispatch]resources / B upload / hook waits (cumulative)main1main2main3main4.91, this PR 4.85main63 s, this PR 52 s (resources)main.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by keravyn-ops on 2026-10-17T09:59:23Z.
AMD / Windows run of this PR at
89d255c5f: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release.Every ctest entry built from the test targets this PR changes passes (17):
agc_driver_undithered_alpha_to_coverage_state(0.11 s):297: Existing undithered alpha-to-coverage states passedagc_driver_msaa_dcc_state(0.02 s):298: Multisampled DCC state checks passedagc_driver_alpha_to_coverage_state(0.02 s):299: Alpha-to-coverage state and refusal tests passedagc_driver_prepared_graphics_prebuild_unset(0.17 s):304: prebuild policy native readback passedagc_driver_prepared_graphics_prebuild_0(0.13 s):305: prebuild policy native readback passedagc_driver_prepared_graphics_prebuild_1(0.13 s):306: prebuild policy native readback passedagc_driver_graphics(4.77 s):339: Graphics validation tests passedagc_driver_dispatch_move(0.25 s):388: dispatch move tests passedagc_driver_dispatch_move_depth(0.38 s):389: dispatch move depth tests passedagc_driver_prepared_graphics(0.13 s):604: prepared graphics ABI tests passedagc_driver_prepared_unregistered_graphics(0.16 s):607: prepared unregistered graphics tests passedagc_sparse_buffer_holes(0.04 s):726: sparse buffer hole tests passedagc_pipeline_journal(0.07 s):730: pipeline journal recipe, record and replay tests passedagc_descriptor_pool_reset_failure(0.02 s)agc_driver_address_space_teardown(0.02 s):785: address-space device teardown releases cached guest allocationsagc_compute_descriptor_layout_flags(0.02 s):816: Descriptor layout native and captured binding flags passedagc_driver_covered_centroid_state(0.02 s):817: Covered-centroid and multisample state checks passedAI-assisted: yes (runs made on the device above).
Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-17T12:16:33Z.
@oneandonlydean thanks, all fixed in
350b8d2b8(fork CI 494 of 494).PrepareDispatch) takes the same route.[dispmove]now ends with "after a refusal: N rebuilt, N inserted beside the movable template (kept), N served by an exact entry".tests/execution/DispatchMove.cpphas an A/B alternation with a refused B: after the first round no rebuilds, every return to A is one exact hit, every B is served by its exact entry.MarkGpuWritescomment restored to the three lines onmain.APS5_DISPMOVE_MAX_KIB=0means no cap. That is in the PR text now, together withAPS5_NO_DISPATCH_MOVEdisabling on any value.PrepareDrawBindingssignature alone, so the #7002 conflict stays the one-liner you describe.PPSA16064 counts (
89d255c5f,APS5_VERIFY_PROOFS=1, summed[dispmove]10 s windows):So on this title the refusal path never ran, and the p99 tail in the table does not come from refusal rebuilds. The slowest frames in those trace windows are long
Driver.Packetslices on queue 0x20 with largememory_waitshares, on both arms. I haven't decomposed the p99 further, so I'm not claiming a cause for it.Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-17T13:35:42Z.
Review: COMMENTED
A hardware run of the new GPU tests (the description runs them on lavapipe only), plus one gap in
agc_driver_dispatch_move_depth.Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release,
BUILD_TESTING=ON. NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host. Head350b8d2b8merged ontomain12a71f3f5(clean).ANYPS5_NO_SHADER_CACHE=1,-j1 --timeout 30.agc_driver_graphics,agc_driver_dispatch_move,agc_driver_dispatch_move_depth^agc(638 tests), PR vsmainagc_driver_f16_fma_denormal_modesandagc_driver_fma_mix_f16_denormal_modesfail onmainon this GPU too)The previous head
a58a70911gave the same results on both devices. WithAPS5_NO_DISPATCH_MOVE=1both new tests skip.The depth guard's refusal is caught only by its counter. I removed the two refusals the PR adds in
fastRevalidateandfastRevalidateEachand kept the counter increment:(and the same for
return false;infastRevalidateEach).agc_driver_dispatch_move_depthandagc_driver_dispatch_movestill pass 3/3 on the 3070 and on lavapipe. So the lane checks and the plane checks pass with or without the refusal, and only theDepthGuardRefusals() > refusalscheck would notice the guard gone. If the case is meant to show a stale image copied over the depth image without the guard, it doesn't on these two devices. I did not check whether a later step of the proof refuses instead.Not run: Windows, AMD, Minecraft Dungeons II or any title.
GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-17T14:27:22Z.
Cross-validation on Windows 11 Pro 26220, NVIDIA GeForce RTX 4070 (driver 596.21), Ryzen 7 5700X, WinLibs MinGW-w64 GCC 15.2 r7, Release. Head
350b8d2b8merged on mainc9e6c45de(clean). The main runs use the same tree with the six changed source files taken fromc9e6c45de.libspass.agc_driver_dispatch_move,agc_driver_dispatch_move_depth,agc_driver_graphics: 3 of 3 each. On this device the moved-buffer path runs; the "device kept no template" skip does not appear. The A/B case printsA alternating with a refused input: checked 3, exact 2, moved 0, refused 1andthe input back after the refusals: checked 1, exact 1.89d255c5f.agc_driver_dispatch_movefails 3 of 3 withthe input back at the template's address was not an exact hit after the refusals. So the test catches the eviction @oneandonlydean described, and the new head fixes it.DepthSurfaceOverlapscheck removed fromfastRevalidate/fastRevalidateEach, counter included.agc_driver_dispatch_move_depthfails 3 of 3 withthe template over the plain storage image was proved current although a depth surface covers its memory. That failure comes from the counter check, so it neither confirms nor refutes @jotitadev's point that the lane and plane checks pass without the refusal. I did not run that exact variant.APS5_NO_DISPATCH_MOVE=1both new tests skip.-R '^agc_driver_(compute|dispatch|template|buffer)'(-j1): 17 of 17. All GPU tests (-j1 -R '^agc_driver_'): 488 of 492 pass, 2 skipped; the 2 failures,agc_driver_f16_fma_denormal_modesandagc_driver_fma_mix_f16_denormal_modes, are the known failures on main on this GPU (#7100). Non-GPU suite: 880 of 883, 2 skipped;hardware_oracle_comparetimed out under load and passes serially.check_conventions.pyandgit diff --checkpass.Titles: PPSA16064 and PPSA15657 are not available to me. I ran the local titles with compute dispatches: 60 s each, no input, order PR / main / PR / main,
APS5_PROFILE_DRAW=1 APS5_PROFILE_GPU=1 APS5_TRACE_SUMMARY_EVERY=10. Medians over the five 10 s windows.miss churn (dispatch) ... GuestBuffers (V# word N/0/0/0)), the case this PR targets.pending write: 849 and 861 per run. Only 12 and 4 moves are served, each of one buffer of at most 1 KiB, andrefusedat record is 0.kept849 / 861). None is served again (served by an exact entry0), since every dispatch uses a new address. The cache size stays as on main: 869 / 881 entries against 885 / 865.[gpu]errors and no device loss. 12 frame dumps per run, none black, with mean-brightness sequences that match main dump by dump. The scene is animated, so pixel equality is not meaningful.still running after 60s, killed (app.exe)).A small point on the log:
[dispmove]printsrefused 0 ()next toafter a refusal: 849 rebuilt, because the stage A drops are counted under "rebuilt" but not under "refused".Not checked: AMD, Intel, Linux; the PR's two titles; a title that reaches the moved path in volume;
APS5_VERIFY_PROOFS=1.Written with Claude Code assistance (validation by a subagent, reviewed in this session).
Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-17T18:04:13Z.
@screamm thanks for the cross-check and the negative controls. You were right about the log: stage A drops were counted under "rebuilt" but not under "refused". The
[dispmove]line now readsrefused N (reasons) at stage A (the hit was dropped before the record), M (reasons) at record, and the "after a refusal" counts are unchanged.5da6de62aonly changes that line, no behaviour change; fork CI 494 of 494.On the Showcase: every hit there drops at stage A on a pending write over the moved range and every dispatch uses a new address, so the path stays idle, with no cost and no gain. On PPSA16064 it is the other way round: 0 refusals and about 97 % of template hits served moved.