Skip to content

perf(agc): widen small epoch collects to their 64 KiB block on Windows - #6273

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
SoRadGaming:perf/windows-widen-collects
Nov 3, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
SoRadGaming:perf/windows-widen-collects

Conversation

@SoRadGaming

@SoRadGaming SoRadGaming commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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.

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.

  • New CheckWidenedCollectBesideUncommittedPages (agc_write_tracking, Windows):
    • The last 16 KiB of a 64 KiB block stays an uncommitted placeholder, which the test checks.
    • A 64-byte collect in the block must succeed and see a CPU write in the next epoch.
    • With the widening but without the retry, it fails with a collect beside uncommitted pages of its block failed.
  • agc_driver_image_table_reuse passes.
  • ctest, the whole suite on this commit (rebased onto main c0be1f6): 1,250 of 1,254 pass.
  • tools/check_conventions.py --base origin/main passes.
  • Linux: not built here.

The frame-rate runs below were on main ab9a476, 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.

A B (this PR)
hub FPS 3.09 / 3.11 / 3.10 / 3.08 3.20 / 3.20 (+3.4 %)

Trace summary lines, APS5_TRACE_SECONDS=300:30 in the same scene, no other APS5_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.

capture commit presents in 30 s frame ms p50 frame ms p90 gpu_busy ms/present queue worker 0x0 busy Driver.Packet ms/frame
A1 0e4cea2533e7 91 329.2 341.8 152.2 99.3 % 995
B1 76e7495c50a1 94 320.2 328.2 150.7 99.3 % 962
A2 0e4cea2533e7 91 333.4 341.6 151.0 99.3 % 1003
B2 76e7495c50a1 96 312.5 324.5 151.2 99.3 % 944

0e4cea2533e7 is A (main ab9a476 + #6060) and 76e7495c50a1 is 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)
{"commit":"0e4cea2533e7","dirty":false,"env":{"APS5_NO_SNAPSHOT_CHECK":"1","APS5_RESOURCE_CACHE_ENTRIES":"4096","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"300:30"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.3.1 (LLPC)","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 300:30","first_present":7589,"ms":30088.041},"presents":91,"frame_ms":{"p50":329.230,"p90":341.761,"p99":358.002,"max":358.002},"gpu_busy_ms_per_present":152.221,"worker_busy_pct":{"queue worker 0x0":99.317,"queue worker 0x40":99.198,"queue worker 0x48":97.882,"queue worker 0x46":4.639},"top_phases_ms_per_frame":{"Driver.Packet":994.826,"Driver.Packet.memory_wait":623.748,"Driver.Packet.draw":274.862,"Driver.Draw":273.691,"Driver.Draw.draw_and_resource_release":150.867,"Graphics.Draw":149.011,"Graphics.Draw.draw_and_resource_release":127.293,"Driver.Draw.shader_compile_and_link":96.645},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.671,"events_lost":1126861,"totals_full":false}},"trace":"aps5-trace-0e4cea2533e7-38328.json.gz"}
{"commit":"76e7495c50a1","dirty":false,"env":{"APS5_NO_SNAPSHOT_CHECK":"1","APS5_RESOURCE_CACHE_ENTRIES":"4096","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"300:30"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.3.1 (LLPC)","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 300:30","first_present":7485,"ms":30012.035},"presents":94,"frame_ms":{"p50":320.238,"p90":328.198,"p99":334.560,"max":334.560},"gpu_busy_ms_per_present":150.677,"worker_busy_pct":{"queue worker 0x0":99.300,"queue worker 0x40":99.198,"queue worker 0x48":98.077,"queue worker 0x46":4.813},"top_phases_ms_per_frame":{"Driver.Packet":961.729,"Driver.Packet.memory_wait":603.154,"Driver.Packet.draw":262.151,"Driver.Draw":261.033,"Driver.Draw.draw_and_resource_release":140.028,"Graphics.Draw":138.340,"Graphics.Draw.draw_and_resource_release":117.132,"Driver.Draw.shader_compile_and_link":95.201},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.626,"events_lost":1150218,"totals_full":false}},"trace":"aps5-trace-76e7495c50a1-24348.json.gz"}
{"commit":"0e4cea2533e7","dirty":false,"env":{"APS5_NO_SNAPSHOT_CHECK":"1","APS5_RESOURCE_CACHE_ENTRIES":"4096","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"300:30"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.3.1 (LLPC)","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 300:30","first_present":5939,"ms":30305.004},"presents":91,"frame_ms":{"p50":333.391,"p90":341.607,"p99":357.428,"max":357.428},"gpu_busy_ms_per_present":150.968,"worker_busy_pct":{"queue worker 0x0":99.321,"queue worker 0x40":99.211,"queue worker 0x48":98.099,"queue worker 0x46":4.703},"top_phases_ms_per_frame":{"Driver.Packet":1002.867,"Driver.Packet.memory_wait":629.182,"Driver.Packet.draw":276.746,"Driver.Draw":275.514,"Driver.Draw.draw_and_resource_release":151.510,"Graphics.Draw":149.656,"Graphics.Draw.draw_and_resource_release":127.574,"Driver.Draw.shader_compile_and_link":97.106},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.664,"events_lost":1141939,"totals_full":false}},"trace":"aps5-trace-0e4cea2533e7-25884.json.gz"}
{"commit":"76e7495c50a1","dirty":false,"env":{"APS5_NO_SNAPSHOT_CHECK":"1","APS5_RESOURCE_CACHE_ENTRIES":"4096","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"300:30"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.3.1 (LLPC)","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 300:30","first_present":5828,"ms":30034.340},"presents":96,"frame_ms":{"p50":312.495,"p90":324.478,"p99":345.084,"max":345.084},"gpu_busy_ms_per_present":151.188,"worker_busy_pct":{"queue worker 0x0":99.292,"queue worker 0x40":99.210,"queue worker 0x48":97.981,"queue worker 0x46":5.269},"top_phases_ms_per_frame":{"Driver.Packet":943.545,"Driver.Packet.memory_wait":589.044,"Driver.Packet.draw":256.496,"Driver.Draw":255.348,"Driver.Draw.draw_and_resource_release":137.372,"Graphics.Draw":135.660,"Graphics.Draw.draw_and_resource_release":114.983,"Driver.Draw.shader_compile_and_link":92.531},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.541,"events_lost":1170046,"totals_full":false}},"trace":"aps5-trace-76e7495c50a1-20508.json.gz"}

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-29)

Rebased onto main edf6804 as a6aae73. GuestMemory.cpp conflicted where main now reads the collect epoch through HostThreadSlot. It is resolved as in @B-Howell's qualification copy (984029f):

  • main's HostThreadSlot<std::uint64_t, CollectEpochSlot>::Get() and every other main change stay;
  • the widening, the requested-range retry and CheckWidenedCollectBesideUncommittedPages are unchanged;
  • the retry's two-line code comment is gone (CONVENTIONS: code comments mark technical debt and are written by a human; the debt entry describes the retry);
  • the debt file keeps every other entry;
  • the commit message no longer mentions the agc_driver_image_table_reuse expectation, which main has had since e3dd06f.

Validation layer, the same 15 focused tests as on 2026-10-23, on main edf6804 and on a6aae73, in one build tree (main = the same tree checked out at edf6804 and rebuilt).

  • Environment: VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V -j1 --timeout 600.
  • Machine: Vulkan SDK 1.3.296.0 validation layer, Windows 11 Pro 26200, RX 9070 XT, Adrenalin 26.8.1 (driver 32.0.31041.1004), WinLibs GCC 15.2.0 r7, Release.
  • Result: 15 of 15 pass on both.
  • Neither log reports was not found but was requested by env var VK_INSTANCE_LAYERS. A second pass with VK_LOADER_DEBUG=layer shows 8 insertions of VK_LAYER_KHRONOS_validation on each, one per Vulkan test; it passes 15 of 15 too.
  • Both logs report one VUID, and only that one: VUID-VkDeviceCreateInfo-pNext-pNext from vkCreateDevice, 24 times each, as before. This change adds no new VUID.
  • tools/check_conventions.py --base origin/main passes.

Main's newer write tracking (raised by @tibzejoker):

  • fix(libc): stop write-protecting resident runs on Windows #9181 removed armResident, so a widened collect inside a resident run write-protects nothing; it stays one GetWriteWatch call over the block.
  • WindowsMappings::Collect still arms the settled subpages of a shared view's aliases. A widened collect settles every subpage of its block, so it can arm up to 16 subpages where the requested range armed one. Resumed write faults per 10 s on main and on this PR are being measured.
  • A widened walk that is refused (uncommitted pages, or a compared shared page anywhere in the block) goes through noteRefusedWalk before the retry: the block's unreported pages are stamped, and blocks with compared shared pages are marked refused. Callers holding an older generation for that block then compare bytes. The retry's own generation is newer than the mark.

Update (2026-10-23)

Rebased onto main 3bd7173 (a78974c). Only the debt file conflicted, where two new entries sat next to this one.

Validation layer, as CONTRIBUTING asks for AGC driver changes.

  • Same 15 focused tests on main 3bd7173 (the PR's base then: its GuestMemory.cpp and WriteTracking.cpp in the same tree) and on a78974c.
  • Environment: VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V.
  • Machine: Vulkan SDK 1.3.296.0 validation layer, Windows 11 Pro 26200, RX 9070 XT, Adrenalin 26.8.1 (driver 32.0.31041.1004).
  • Tests:
    • agc_write_tracking, agc_write_tracking_metadata_commit, agc_write_watch_coverage;
    • agc_driver_image_table_reuse;
    • agc_shared_write_partial_collect and _two_pass;
    • agc_driver_guest_memory_lifetime and its _copy, _direct, _locked, _heap, _heap_uncached variants;
    • agc_driver_depth_bits_guest_memory, windows_write_watch, guest_memory.
  • Result: 15 of 15 pass on both.
  • Neither log reports was not found but was requested by env var VK_INSTANCE_LAYERS.
  • Both logs report one VUID, and only that one: VUID-VkDeviceCreateInfo-pNext-pNext from vkCreateDevice, 24 times each. The 1.3.296 layer does not know a structure in the device's pNext chain. This change adds no new VUID.

Update (2026-10-19)

Rebased onto main 3ddbc4a (246b029). Only the debt file conflicted: #4650's depth-range entry and this one now sit side by side. The image-table test change dropped out of the diff because main has it (e3dd06f), so the PR is the collect widening with its retry, the new write-tracking test and the debt entry.

On the rebased commit, Windows 11 Pro 26200, Ryzen 7 5800X3D, RX 9070 XT (Adrenalin 26.8.1):

  • agc_write_tracking and agc_driver_image_table_reuse pass 3 of 3 (ctest --repeat until-fail:3).
  • CheckWidenedCollectBesideUncommittedPages resets its range before releasing it, as CheckStoredAllSince does. CheckVersionRanges and CheckCollectBoundaries on main release theirs without a reset. Release alone leaves the committed host allocation in place, so a test added after them that resets its own block hits "cannot release part of a host allocation" (a local experiment of ours did). Nothing on main runs into it, so this PR leaves them alone.
  • The frame-rate numbers above are from the original base (ab9a476); they have not been re-measured on this one.

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 main 5d9dcc4:

  • agc_write_tracking and agc_driver_image_table_reuse pass 3 of 3.
  • ctest -R "agc_|guest_memory|write_watch": 602 of 605.
    • agc_driver_quad_pixel_mask and agc_driver_layered_volume_vertex_no_gpl fail on this GPU without this change, as noted above.
    • agc_driver_gpu_indirect_arguments_misaligned_writer_ahead does not build under MinGW on main itself: alignas(65536) exceeds the object file maximum of 8192. test(agc): align the indirect arguments block at run time #6452 fixes that.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none (the gain shows with perf(agc): keep Windows host imports of write-watched private memory watched #6060, which keeps resident imports watched)
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 9070 XT, Adrenalin 26.8.1 (driver 32.0.31041.1004), Windows 11 Pro 26200 (the original frame-rate runs and whole-suite run: Adrenalin 26.3.1, driver 32.0.23033.1002)
  • AI-assisted: yes

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5925 docs/dev/debt/libSceAgcDriver.md
PR 6146 docs/dev/debt/libSceAgcDriver.md
PR 6185 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6187 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6209 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6743 docs/dev/debt/libSceAgcDriver.md
PR 6804 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6926 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6973 docs/dev/debt/libSceAgcDriver.md
PR 6987 docs/dev/debt/libSceAgcDriver.md
PR 6989 docs/dev/debt/libSceAgcDriver.md
PR 6995 docs/dev/debt/libSceAgcDriver.md
PR 7002 docs/dev/debt/libSceAgcDriver.md
PR 7085 docs/dev/debt/libSceAgcDriver.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7604 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7668 docs/dev/debt/libSceAgcDriver.md
PR 7978 docs/dev/debt/libSceAgcDriver.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 8707 docs/dev/debt/libSceAgcDriver.md
PR 9020 docs/dev/debt/libSceAgcDriver.md
PR 9318 docs/dev/debt/libSceAgcDriver.md
PR 9335 docs/dev/debt/libSceAgcDriver.md
PR 9356 docs/dev/debt/libSceAgcDriver.md
PR 9387 docs/dev/debt/libSceAgcDriver.md
PR 9508 docs/dev/debt/libSceAgcDriver.md
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9672 docs/dev/debt/libSceAgcDriver.md
PR 9673 docs/dev/debt/libSceAgcDriver.md
PR 9674 docs/dev/debt/libSceAgcDriver.md
PR 9675 docs/dev/debt/libSceAgcDriver.md
PR 9700 docs/dev/debt/libSceAgcDriver.md
PR 9742 docs/dev/debt/libSceAgcDriver.md
PR 9748 docs/dev/debt/libSceAgcDriver.md
PR 9891 docs/dev/debt/libSceAgcDriver.md
PR 9892 docs/dev/debt/libSceAgcDriver.md
PR 9893 docs/dev/debt/libSceAgcDriver.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9898 docs/dev/debt/libSceAgcDriver.md
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10049 docs/dev/debt/libSceAgcDriver.md
PR 10064 docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10233 docs/dev/debt/libSceAgcDriver.md
PR 10256 docs/dev/debt/libSceAgcDriver.md
PR 10351 docs/dev/debt/libSceAgcDriver.md
PR 10359 docs/dev/debt/libSceAgcDriver.md
PR 10469 docs/dev/debt/libSceAgcDriver.md
PR 10472 docs/dev/debt/libSceAgcDriver.md
PR 10492 docs/dev/debt/libSceAgcDriver.md
PR 10497 docs/dev/debt/libSceAgcDriver.md
PR 10743 docs/dev/debt/libSceAgcDriver.md
PR 10779 docs/dev/debt/libSceAgcDriver.md
PR 11104 docs/dev/debt/libSceAgcDriver.md
PR 11346 docs/dev/debt/libSceAgcDriver.md
PR 11551 docs/dev/debt/libSceAgcDriver.md
PR 11557 docs/dev/debt/libSceAgcDriver.md
PR 11587 docs/dev/debt/libSceAgcDriver.md
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 11995 docs/dev/debt/libSceAgcDriver.md
PR 11998 docs/dev/debt/libSceAgcDriver.md
PR 12120 docs/dev/debt/libSceAgcDriver.md
PR 12452 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12565 docs/dev/debt/libSceAgcDriver.md
PR 12567 docs/dev/debt/libSceAgcDriver.md
PR 12568 docs/dev/debt/libSceAgcDriver.md
PR 12745 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 12764 docs/dev/debt/libSceAgcDriver.md
PR 12792 docs/dev/debt/libSceAgcDriver.md
PR 12840 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12855 docs/dev/debt/libSceAgcDriver.md
PR 12904 docs/dev/debt/libSceAgcDriver.md
PR 12921 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
PR 13021 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13023 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13146 docs/dev/debt/libSceAgcDriver.md
PR 13147 docs/dev/debt/libSceAgcDriver.md
PR 13151 docs/dev/debt/libSceAgcDriver.md
PR 13248 docs/dev/debt/libSceAgcDriver.md
PR 13474 docs/dev/debt/libSceAgcDriver.md
PR 13599 docs/dev/debt/libSceAgcDriver.md
PR 13707 docs/dev/debt/libSceAgcDriver.md
PR 13793 docs/dev/debt/libSceAgcDriver.md
PR 13809 docs/dev/debt/libSceAgcDriver.md
PR 13858 docs/dev/debt/libSceAgcDriver.md
PR 13863 docs/dev/debt/libSceAgcDriver.md
PR 13920 docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13963 docs/dev/debt/libSceAgcDriver.md
PR 13991 docs/dev/debt/libSceAgcDriver.md
PR 13994 docs/dev/debt/libSceAgcDriver.md
PR 14005 docs/dev/debt/libSceAgcDriver.md
PR 14018 docs/dev/debt/libSceAgcDriver.md
PR 14085 docs/dev/debt/libSceAgcDriver.md
PR 14212 docs/dev/debt/libSceAgcDriver.md
PR 14220 docs/dev/debt/libSceAgcDriver.md
PR 14243 docs/dev/debt/libSceAgcDriver.md
PR 14248 docs/dev/debt/libSceAgcDriver.md
PR 14261 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 14262 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 14265 docs/dev/debt/libSceAgcDriver.md
PR 14296 docs/dev/debt/libSceAgcDriver.md
PR 14302 docs/dev/debt/libSceAgcDriver.md
PR 14311 docs/dev/debt/libSceAgcDriver.md
PR 14344 docs/dev/debt/libSceAgcDriver.md
PR 14473 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 14561 docs/dev/debt/libSceAgcDriver.md
PR 14621 docs/dev/debt/libSceAgcDriver.md
PR 14628 docs/dev/debt/libSceAgcDriver.md
PR 14799 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 14815 docs/dev/debt/libSceAgcDriver.md
PR 14899 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
PR 14909 docs/dev/debt/libSceAgcDriver.md
PR 14943 docs/dev/debt/libSceAgcDriver.md
PR 14944 docs/dev/debt/libSceAgcDriver.md
PR 14950 docs/dev/debt/libSceAgcDriver.md
PR 14963 docs/dev/debt/libSceAgcDriver.md
PR 14964 docs/dev/debt/libSceAgcDriver.md
PR 14976 docs/dev/debt/libSceAgcDriver.md
PR 14982 docs/dev/debt/libSceAgcDriver.md
PR 14993 docs/dev/debt/libSceAgcDriver.md
PR 15058 docs/dev/debt/libSceAgcDriver.md

This was referenced Oct 15, 2026
@SoRadGaming

Copy link
Copy Markdown
Contributor Author

This is ready for review whenever someone has time. It's a small change: one function in GuestMemory.cpp plus its test.

  • It merges cleanly with current main (rebased onto 3bd7173), and the conventions check passes.
  • agc_write_tracking and agc_driver_image_table_reuse pass on an RX 9070 XT.

I'm happy to rebase again, re-measure on current main, or run anything else a reviewer wants first, such as the validation-layer runs on main and on the change.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 22, 2026
@tibzejoker

Copy link
Copy Markdown
Contributor

GTA V (PPSA04264), Windows 11, RTX 4090, i9-13900K.

Where GTA's collects go. On main 3bbd232 + #9181 + #9159 (GTA needs both in the open world), one ~8 min run had 11.8M collect walks covering 5.08 TB, 34.2 s in total, plus 74M collect-memo hits. That is ~430 KiB per walk on average, so most of the time is in large walks, which this PR does not widen. An older profile agrees: on main 47a266c + #6488 + #6848 (10-17), GetWriteWatch collects took ~5 % of the committer. I have no counter for walks of 64 KiB or less, so GTA may gain little; not an argument against the PR.

Pitfall: arming. On main, a collecting WindowsMappings::Collect write-protects every settled subpage of shared views in the walked range ("arm shared memory write tracking"). collectResident also arms resident runs of 256 KiB or more (armResident, from #7473; #9181 removes it). A 64-byte collect widened to its block can arm up to 16 subpages instead of one. Each later CPU store there is a resumed write fault, and on Windows that can overwrite the red zone (#361). In GTA that shows up as the HDD Streamer crash in zlib (#9136), and the crash rate follows the number of resumed faults. Could you add a resumed-fault count per 10 s for A and B?

Offer. I can run GTA open world on your head + #9181 + #9159, one run each: resumed faults, collect time, committer µs/draw.

AI-assisted: yes (Claude Code)

TheBlenDed pushed a commit to TheBlenDed/AnyPS5 that referenced this pull request Oct 25, 2026
@B-Howell

Copy link
Copy Markdown
Contributor

Independent Windows/NVIDIA qualification of this patch, AI-assisted: yes (Codex).

  • Base: main 1c9064435d8e365064b19a1f0560c6498cf23987. Original peer head: a78974c844e584a579829b5d6f4c54cbbeeb0f3b. Qualification copy 984029f3ef, preserving the original author's attribution. The source conflict retains current main's HostThreadSlot epoch accessor; two new explanatory comments were removed for current conventions. Other debt entries were preserved. The added fallback test is unchanged.
  • Windows 10.0.26300, Ryzen 7 7800X3D, RTX 4080 SUPER, NVIDIA 617.42, MSYS2 UCRT64 GCC 16.2.0, Release.
  • The same 15 focused tests listed in the PR's October 23 update passed on main and the qualification copy, then all 15 passed again after the negative control was restored: 45 passes, zero skips. Tests ran serially with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and the NVIDIA device selected explicitly. Each run logged eight actual Khronos instance-layer insertions; neither missing-requested-layer diagnostics nor VUID, validation-error or validation-warning diagnostics occurred.
  • Negative control: retain widening but remove the requested-range retry. agc_write_tracking fails with a collect beside uncommitted pages of its block failed. Restoring the patch and rebuilding returns the full 15-test set to passing.
  • Baseline, candidate and restored binaries/dependencies are retained with SHA256 manifests. Among the 19 captured files, main-to-change differences are only the AGC library and write-tracking test executable. The restored test's PE timestamp/checksum differ from its first build; all PE section bytes are identical. Source is clean after restoration. Conventions pass. A separate read-only review verified the source, manifests, negative-control evidence and verbose logs.

No ASTRO's PLAYROOM or other retail performance benefit is claimed. I identified this path while profiling that title, but these results qualify component correctness on another Windows GPU; matched retail measurements remain separate work. This supports the existing PR rather than duplicating its implementation.

@dantdmdarealguy

Copy link
Copy Markdown
Contributor

Windows data point from Stray (PPSA02100 01.002.000), opening scene after New Game, scripted pad, warm cache. Windows 11 Pro, i9-14900K, RTX 5080 (NVIDIA 617.42), WinLibs GCC 15.2.0 Release. main 32b7331 vs main + this PR merged locally (the collectWrites conflict resolved to main's HostThreadSlot<std::uint64_t, CollectEpochSlot>::Get(), as in B-Howell's copy). APS5_TRACE_SECONDS=175:60, alternated, one process at a time.

round main presents in 60 s / p50 this PR
1 1088 / 51.8 ms 662 / 88.7 ms (this run booted slower; its window started at present 3124 instead of ~3600, so the scene moment differs)
2 1086 / 51.7 ms 1074 / 52.4 ms
3 1163 / 47.7 ms 1072 / 52.8 ms

In this scene the committer bounds the frame (busy 41 of 55 ms; queue worker 0 waits for its room 35 % of its samples). A committer sampler on main puts 16.9 % of it in collectWrites → collectResident, 9.9 % in the GetWriteWatch syscall itself, from fastRevalidate (5.1 %), the resident target refresh (4.2 %), CopyDrawInput (3.4 %) and PrepareDrawBindings (1.7 %). With this PR the committer's Graphics.Draw stays at ~42 ms per frame, so the widened collects don't remove that cost here. Summary lines and traces: <attach the r2/r3 pairs>.

@klosixgaming-arch

Copy link
Copy Markdown
Contributor

A data point, not a test of this exact code. On Soul Hackers 2 gameplay (Windows, RTX 5090, main 0cd07dc4ab with #12227 and #11602) the draw committer spent about 14% of its time in GetWriteWatch through GuestArenaCollectWrites: about 1,100 collect walks per frame and about 140 collect epochs per frame.

I tried the same idea locally: an opt-in switch that widened small epoch collects to their 64 KiB block on Windows, only when the whole block was inside one resident direct-memory run. Walks per epoch went down by about 15%, but time per epoch stayed the same (about 47-48 us), and gameplay stayed at 210-237 submissions per 10 s against 212-233 without it. In this title the walks are spread over different blocks, so widening did not help. I did not run this PR's own code.

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.

The new uncommitted-pages test resets its range before releasing it, so the arena does not hand
the next test an address inside memory that is still committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SoRadGaming
SoRadGaming force-pushed the perf/windows-widen-collects branch from a78974c to a6aae73 Compare October 29, 2026 07:43
@SoRadGaming

Copy link
Copy Markdown
Contributor Author

Rebased onto main edf6804 as a6aae73. It merges cleanly again, also with today's 14b3441.

  • Conflict: collectWrites in GuestMemory.cpp (main now reads the collect epoch through HostThreadSlot) and the debt file. I resolved it the way @B-Howell's qualification copy (984029f) did:
    • main's HostThreadSlot<std::uint64_t, CollectEpochSlot>::Get() and every other main change stay;
    • the widening, the requested-range retry and CheckWidenedCollectBesideUncommittedPages are unchanged;
    • the retry's code comment is gone;
    • every other debt entry is kept.
  • Validation layer: the same 15 focused tests on main edf6804 and on a6aae73. One build tree, RX 9070 XT, Adrenalin 26.8.1 (32.0.31041.1004), Vulkan SDK 1.3.296.0 layer, ctest -V -j1.
    • 15 of 15 pass on both.
    • Neither log has a was not found but was requested by env var VK_INSTANCE_LAYERS line. A VK_LOADER_DEBUG=layer pass shows 8 Khronos instance-layer insertions on each.
    • The only VUID on both is VUID-VkDeviceCreateInfo-pNext-pNext, 24 times each, so the change adds no VUID.
    • The description's 2026-10-29 update has the details. It also corrects the driver number given for the 2026-10-23 runs.
  • @tibzejoker: fix(libc): stop write-protecting resident runs on Windows #9181 has removed armResident since then, so a widened collect inside a resident run no longer write-protects anything. Collect's arming of shared-view aliases is still there, and a widened collect can arm the whole block.

Thanks @B-Howell for the NVIDIA qualification and the negative control, @dantdmdarealguy for the Stray A/B and the committer profile, and @klosixgaming-arch for the Soul Hackers 2 data.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
@SoRadGaming

Copy link
Copy Markdown
Contributor Author

A/B of this PR on current main, with the resumed write-fault counts @tibzejoker asked for.

  • ASTRO BOT (PPSA21564), the hub after the fly-in. Windows 11, Ryzen 7 5800X3D, RX 9070 XT, Adrenalin 26.8.1 (32.0.31041.1004), WinLibs GCC 15.2.0, Release.
  • A = main edf6804, B = A + this PR (a6aae73). Same relinked exe, environment and warm shader cache. Only libSceAgcDriver.prx differs, plus libSceVideoOut.prx, whose only change is the embedded revision string.
  • 4 rounds in ABBA order, 90 s each, one process at a time, quiet PC (other processes 5.6-7.2 % CPU).
round main FPS this PR FPS
1 8.30* 5.56
2 5.52 5.61
3 5.65 5.58
4 5.56 5.58

* This boot took 85 s instead of ~25 s, and its first 10 s window counted 24.4 FPS before the scene settled. Its later windows match the other runs. Over the settled windows (40-90 s) of all runs, main averages 5.93 FPS and this PR 5.94 FPS, so there is no measurable difference.

Write faults. I added a counter to a local-only libc.prx build (not part of this PR). It counts every write fault resumed in WindowsMappings (shared views and resident views separately) and every subpage armed for shared-view write tracking, and prints the counts every 10 s. I ran one 150 s run per arm, from boot through the hub:

  • resumed write faults: 0 in every window, in both arms;
  • subpages armed: 0 in every window, in both arms.

The reporting thread was running and printed all 17-18 windows, so on current main this game never reaches the shared-view arming path. This run says nothing about titles that do use shared views.

APS5_PROFILE_DRAW [guestmem]: mean of the last 9 windows of those runs, per 10 s.

main this PR
collect calls 121,374 119,228
collect time 1.12 s 1.02 s
collect epochs 24,969 22,782
time per epoch 44.9 µs 44.8 µs

The PR read more over the whole run (14,578 vs 8,778 MiB), almost all of it before the hub. In the hub both arms read about 36 MiB per 10 s.

So on current main this PR no longer shows a gain in ASTRO BOT. The time per collect epoch is unchanged, which matches what @klosixgaming-arch saw in Soul Hackers 2.

AI-assisted: yes (Claude Code)

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head a6aae73 merged onto main ba5b533 · tested 2026-10-29 18:00 UTC · 19 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,208 passed · 6 failed (0 new, 5 also fail on main, 1 unstable on main) · 39 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,253 of 2,891 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (855 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) none
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_submit_progress: failed in 3 of the last 5 main runs
Failing on main too (5, not counted against this PR)
agc_compute_pipeline_inspection
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 404 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (404 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alpha_to_coverage, agc_driver_array_layer_target_cpu, agc_driver_bc_block_copy, and 396 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (39)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fresh: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_labels: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SD
Reproduce
git fetch origin a6aae73239c1cadecb590bea91cacf495771474a ba5b5330b37724bca4b99f30faab504653635a04
git checkout ba5b5330b37724bca4b99f30faab504653635a04 && git merge --no-ff a6aae73239c1cadecb590bea91cacf495771474a
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 30, 2026
@fogydes

fogydes commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

stale+rebase

1. Freshness Envelope

  • Head SHA: a6aae73239c1cadecb590bea91cacf495771474a
  • Merge-base SHA: edf6804cf52c62eacafc592dd6142cb4efe5bd05
  • Behind origin/main: 1,224 commits
  • Merge-tree status: exit code 1 (conflict against origin/main in docs/dev/debt/libSceAgcDriver.md)

2. Findings

  1. [verified] Merge conflict requires rebase: git merge-tree --write-tree origin/main a6aae73239c1cadecb590bea91cacf495771474a exits with code 1 due to a conflict in docs/dev/debt/libSceAgcDriver.md.
  2. [verified] Conventions clean against merge-base: python tools/check_conventions.py --base edf6804cf52c62eacafc592dd6142cb4efe5bd05 in an isolated scratch worktree reported 0 findings.
  3. [read-only] Missing checklist line: The PR description omits the required Fixes: line from .github/pull_request_template.md.
  4. [author-reported] Validation layer evidence included for 15 focused AGC tests on Windows 11 / RX 9070 XT under VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, confirming no new VUID- errors.
  5. [author-reported] Reported ASTRO BOT (PPSA21564) Crash Site hub FPS improvement (+3.4%) under APS5_RESOURCE_CACHE_ENTRIES=4096.

3. Cross-PR Ledger

# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 788ccea merged onto main f6232fc · tested 2026-11-03 08:02 UTC · 21 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,661 passed · 5 failed (0 new, 3 also fail on main, 2 unstable on main) · 49 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,715 of 3,743 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (927 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_lookup_log_fits_build 43.1 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 5 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 525 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (525 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 517 more
VUID-vkCmdCopyImage-srcImage-01548 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-vkCmdCopyImage-srcImage-01551 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (49)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver
Reproduce
git fetch origin 788ccea4519afb48d05b512e37bf1139c5882f42 f6232fcfda70644495273f6b8dd88cf0603463d6
git checkout f6232fcfda70644495273f6b8dd88cf0603463d6 && git merge --no-ff 788ccea4519afb48d05b512e37bf1139c5882f42
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@oneandonlydean oneandonlydean self-assigned this Nov 3, 2026
@oneandonlydean
oneandonlydean merged commit 3a2ce76 into boykopovar:main Nov 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.