Repository navigation
perf(agc): widen small epoch collects to their 64 KiB block on Windows - #6273
SoRadGaming wants to merge 1 commit into
Conversation
Linux widens a collect of at most one 64 KiB block to the whole block within an epoch (boykopovar#1310), so the memo serves the block's other ranges. Windows kept the requested range because it was not tested there. On Windows with boykopovar#5596's resident direct memory every walk is a GetWriteWatch call, and ASTRO BOT's hub walks about 50k ranges of at most 64 KiB per 10 s on queue 0. Windows coverage does not know which pages of a block are committed or inaccessible, and a walk refuses such a range before it collects anything. So a widened walk that fails is retried over the requested pages; without that, a collect beside uncommitted pages of its block fails. agc_driver_image_table_reuse expected one more table resolution on Windows than on Linux, from the narrower collects; it now expects Linux's count on both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some 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.
|
|
Windows/RTX5070Ti617.42 combined cross-test is ready at51b148e100509891c9b194da360e6dd80bdeb16b: https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-watch-proof-current . Includes #6346 5532d51 and #6273 fdcbb83, on main93e54cedd plus our explicitly listed007/shared-table/level prerequisites. Both author commits applied cleanly; no replacement implementation. 30/30 selected native CPU/Vulkan checks PASS14.19s, no skips, including write_tracking's new cases, repeated-neighbour stores, image-table reuse/bounds, shared-table vouches, draw reuse/verify/inline, storage flush ordering, tessellation, serializer/cache and prebuild unset/0/1. Conventions clean. After final revision-string rebuild,5/5 related controlsPASS1.46s. Combined native evidence, not standalone each-PR evidence; no title FPS result yet. Integration test adjustment: the There is also an opt-in bounded copied-buffer ownership sampler in this test branch (maximum25small records per process, no game contents). Its initial asynchronous output triggered a native process-exit timeout; sampler-off control passed, and switching it to the existing direct trace sink made all3prebuild policies pass with sampling on. That defect was mine, not attributed to either PR. The full native result above has sampling enabled after the correction. Starting a guarded007 cross-test next. AI-assisted: Codex; raw title data local. |
Current-main Windows fixture check (2026-10-19)Heads-up for the next refresh: the exact counter failure described above now also occurs without this PR's production change on unmodified main Reproduced once on each actual GPU after a matching full Windows relinker/library + reuse-fixture build. Its preceding texel checks pass; it stops at this counter assertion. I then applied only your four-line Windows 11 Enterprise 26200 / WinLibs GCC 15.2 r7; RTX 5080 driver 32.0.16.1062 (610.62), Radeon(TM) Graphics 32.0.21036.18; Khronos 1.4.363. This validates the fixture expectation on that main pin, not the collect-widening/retry behavior or performance of #6273. In particular, the old Windows counter expectation no longer distinguishes the optimization from its base there. We will carry the credited fixture correction in our experimental composition; no duplicate PR for your change. Original build/test logs are retained. AI-assisted validation/report: Codex; author responsible. |
Backport only the fixture expectation from PR boykopovar#6273 by Sorab, commit fdcbb83. Main0c259 already produces the one-resolution outcome on both physical GPUs without the Windows collect-widening change. Retain every texel check and exact reuse-count assertion. Co-authored-by: Sorab <sohorhab.azizdel@outlook.com> (cherry picked from commit a868b03)
What
Within a collect epoch, #1310 widens a collect of at most one 64 KiB block to the whole block, so the epoch's collect memo serves the block's other ranges. It left Windows on the requested range because it was not tested there. Windows now widens too.
MEM_WRITE_WATCHmemory, and a walk over it is aGetWriteWatchcall for each resident run it touches. With perf(agc): keep Windows host imports of write-watched private memory watched #6060, its host imports stay watched as well.main+ perf(agc): keep Windows host imports of write-watched private memory watched #6060, queue worker 0 spends 12.4 % of its samples inGuestArenaCollectWrites→WindowsMappings::collectResident, mostly fromShaderResources::fastRevalidateon every draw. A local counter showed about 50k walks of at most 64 KiB per 10 s.WriteWatchCoverage) does not know which pages of a block are committed or inaccessible.WindowsMappings::Collectrefuses such a range before it collects anything (collectable). So a widened walk that fails is retried over the requested pages.agc_driver_image_table_reuseexpected one more table resolution on Windows than on Linux (CpuWriteResolutions). The extra one came from the narrower Windows collects, so it now expects Linux's count on both.Linux is unchanged: the widening block is the same, and the retry is Windows-only.
Tested
Windows 11 Pro 26200, Ryzen 7 5800X3D, Radeon RX 9070 XT (driver 32.0.23033.1002), WinLibs GCC 15.2.0 r7, Release.
CheckWidenedCollectBesideUncommittedPages(agc_write_tracking, Windows):a collect beside uncommitted pages of its block failed.agc_driver_image_table_reusepasses. With the widening and the old Windows expectation, it fails witha CPU write collected in a new epoch, then two dispatches: 2 reused and 1 resolved tables, expected 1 and 2.ctest, the whole suite on this commit (rebased ontomainc0be1f6): 1,250 of 1,254 pass.agc_driver_quad_pixel_mask(implicit-LOD sample with quad pixel mask 2: pixel (0, 0) channel 2 is 2, expected 0) fails the same on this GPU withmain'sGuestMemory.cpp. It is from feat(agc): emulate PA_SC_AA_MASK sample masks #6015's sample masks, not this change.agc_driver_layered_volume_vertex_no_gplalso fails on this GPU without this change: onmaine34c479, and on perf(agc): keep Windows host imports of write-watched private memory watched #6060's head with and without its switch.guest_gameupdateandguest_vr_setup_dialogdon't start on this machine ("Process not started").tools/check_conventions.py --base origin/mainpasses.The frame-rate runs below were on
mainab9a476, before the rebase; the tests above ran on the rebased commit.ASTRO BOT (PPSA21564 01.007.000),
-lvl hub_crashsite(the full Crash Site hub), no input, warm shader cache (1,904 hits, 0 misses),APS5_NO_SNAPSHOT_CHECK=1 APS5_RESOURCE_CACHE_ENTRIES=4096.mainab9a476 + perf(agc): keep Windows host imports of write-watched private memory watched #6060, and B is A + this PR.libSceAgcDriver.prxdiffers. Runs alternate.Trace summary lines,
APS5_TRACE_SECONDS=300:30in the same scene, no otherAPS5_TRACE_*/APS5_PROFILE_*switch, log not redirected. In every capture, queue worker 0's event buffer filled about 5.6 s into the window (trace_dropped). The four traces are available on request.Driver.Packetms/frame0e4cea2533e776e7495c50a10e4cea2533e776e7495c50a10e4cea2533e7is A (mainab9a476 + #6060) and76e7495c50a1is B (A + this PR's commit, cherry-picked). A's two captures and B's two were taken in separate sessions on the same day; the FPS rows above alternate.Summary lines (A1, B1, A2, B2)
Related: #1201's pipelining commit keeps a thread's collected ranges for the whole epoch (
EpochCollectMap). That covers a separate repeat: the 64-entry memo ring is smaller than a queue-0 epoch here. The two changes add up. With an epoch-long memo, the widening cut the hub's walks on queue worker 0 from 81k to 57k and their time from 686 to 578 ms per 10 s (local counter). This tree plus #1201 (with @Raghav314's and @eliyarson's ordering fixes),APS5_PIPELINED_DRAWS=1, runs the hub at 5.33 / 5.36 FPS.Update (2026-10-16)
#6060 has merged since this was opened, and so has #1201 (pipelined draws, with its per-epoch collect map). This branch still merges cleanly. I retested it merged onto
main5d9dcc4:agc_write_trackingandagc_driver_image_table_reusepass 3 of 3.ctest -R "agc_|guest_memory|write_watch": 602 of 605.agc_driver_quad_pixel_maskandagc_driver_layered_volume_vertex_no_gplfail on this GPU without this change, as noted above.agc_driver_gpu_indirect_arguments_misaligned_writer_aheaddoes not build under MinGW onmainitself:alignas(65536)exceeds the object file maximum of 8192. test(agc): align the indirect arguments block at run time #6452 fixes that.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)🤖 Generated with Claude Code