Repository navigation
perf(agc): read dropped sampled snapshots straight into their upload staging buffer - #9884
Conversation
|
The staging-buffer handoff and the test’s 0xee poison checks directly verify that the pooled buffer is both fully initialized (including uncommitted ranges) and used for upload; the reported negative controls are useful. The title timing is carefully labeled as measured on an earlier production-equivalent revision, and the PR lists the exact A/B stack. Current head |
71ab934 to
e5ef93b
Compare
|
@MarcZX10 Thanks. Done:
|
|
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.
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.
|
|
Thanks for the rebase and focused test reruns on |
e5ef93b to
388daf9
Compare
|
@MarcZX10 Done:
The body's Tested section now leads with this head. |
|
A note on merge order. Our upcoming fix for Ghost of Tsushima Director's Cut (PPSA02225), fix/agc-3d-view-committed-slices-v2, changes the same sampled upload as this PR ( The two compose: once both are in, the packed slabs would be read straight into your upload staging buffer. Ours will go second and adapt to this one when it merges, with this PR in its |
|
Closing this in favour of #8026, which has merged. Thanks @NFSS10 for the spare pool, and @MarcZX10 for the reviews. What this PR would still add on top of #8026, per dropped Uncompressed snapshot (over 256 KiB, tracked or hinted): the guest bytes go straight into the staging buffer, so it saves one surface-sized memcpy and the one spare that #8026 keeps parked per size. On a Ryzen 5 5600X, a local timing diagnostic on main + #9115 measured that memcpy at 1.32-1.41 ms per 24 MiB snapshot. #8026 already removes the larger part on the same runs, the vector allocation and zero-fill: 2.92-2.97 ms per 24 MiB. For PPSA14363 that leaves an estimated 2% of a frame in the PS1 codec on today's main, and nothing on our stack of game PRs: with #9685 and #9879 the PS1 targets stay resident, and a whole 600 s or 960 s run builds only 6 snapshots. Rebasing would also mean changing #8026's just-merged The vector-free path stays on the fork branch ( |
…taging buffer A sampled snapshot of a tracked or hinted surface over 256 KiB keeps no bytes after its upload: boykopovar#8026 parks its vector in the spare pool. To build one, cachedTexture still took a vector of the surface size from that pool or value-initialised a new one, read the guest surface into it, and the Texture then copied the vector into a pooled staging Buffer. With uncompressed keys the surface is now read straight into the staging Buffer, which a new Texture constructor uploads as it is: no vector, no zero-fill, no surface-sized memcpy, and the spare pool is neither taken from nor parked into. Such a snapshot still runs boykopovar#8026's expiry walk, so a spare idle for more than 16 presents is freed as before. ReadTextureSurface zero-fills uncommitted pages itself, so a reused pooled Buffer reads them as zero. The pending-write check still comes before the read, and snapshots that are kept, have other keys (DCC clear fills, ClearSingle expansion) or are views of storage images take the paths they took. agc_snapshot_read_into_staging samples dropped snapshots of watched linear, 64KB_R_X and padded (600x300, rows of 640 texels) surfaces, and of a three-level linear surface whose level-1 centre pages are not committed, each read into a pooled staging buffer poisoned beforehand. Each must leave the spare pool empty, upload from that buffer, sample the guest bytes (zero in the uncommitted pages, the written bytes in the committed levels stored before and after them) and be remade after a driver store of the bytes already there, since it kept none to compare. A fast-cleared tracked snapshot still parks its vector, and a dropped uncompressed snapshot of the same size made 16 presents later must leave that spare alone, so it expires on time. A dropped snapshot made 16 presents after a spare was parked must keep it, and one made 17 presents after must free it. boykopovar#8026's recycle and spare-age tests now park through fast-cleared snapshots, the producer that still uses the pool. Co-Authored-By: Claude <noreply@anthropic.com>
388daf9 to
52a8610
Compare
|
Reopened with a new head, I closed this on 2026-10-23 because #8026 already removed the larger part of the cost on the snapshots measured then, and kept the branch in case a title showed large dropped snapshots every frame, or rare huge ones. PPSA14363 has a rare huge one: each page turn in the launcher's Screenplay Book samples a new snapshot of a 15360x8640 R8 surface (126.6 MiB) and drops it after the upload. Turns come 7 s apart in my route (about 400 presents), and #8026 releases a spare once it has gone unused for more than 16 presents, so every turn allocates and zero-fills a new vector. In a local timing build, none of the 18 builds of that snapshot (two runs, each opening the book and turning 8 pages) got a spare, and the vector allocation, zero-fill and memcpy into the staging buffer, which this PR removes, took 24.1-46.2 ms per page turn (16 turns, Ryzen 5 5600X). Changes since The body has the page-turn A/B of |
|
I attached the traces behind the page-turn numbers, as CONTRIBUTING asks for a speed claim: M1 and M3 ( |
|
A run of this head on NVIDIA, plus a second AMD device. Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release. There are 17 tests:
Negative control on the RTX 4070 SUPER and on the Radeon: The build has no errors. Its warnings are Not run: the validation layer, the PPSA14363 measurement. AI-assisted: yes (Claude Code) |
|
@thuanquang We're keeping this PR for the "read the dropped snapshot straight into the staging buffer" change, and I'm closing #10845 by @milescoviello as a duplicate, since it implements the same thing with the same rule in
Full details are in the #10845 description: #10845 If the read-back test adds coverage your |
|
@thuanquang now that #10845 is closed as a duplicate of this, one piece of it may be worth having on top: a GPU read-back of the staged texels. In #10845, If you'd like it, I can open it as a test-only follow-up once this lands, or you can take it into this PR, whichever suits you. AI-assisted: yes (Claude Code) |
|
@milescoviello thanks, yes please. A test-only follow-up once this lands is the cleaner way: @oneandonlydean thanks for keeping this one and for crediting #10845's evidence. |
|
@oneandonlydean thanks; the description is fixed (the stale "traces are not attached" line is gone, the box stays checked). On merge order, I'd keep the one agreed for #10845, since this PR makes the same change in the same blocks (I test-merged this head with each; every conflict is in
AI-assisted: yes (Claude Code) |
|
@thuanquang Yes, that order works for #10064: #10773, then this PR, then #10064, then #7085, merge order only. It's the order agreed for #10845 with this PR in its place, and #7085's author agreed earlier that #10064 goes before #7085. #10064 is still a draft, so I'll take the merges on its side: a |
Main's boykopovar#12246 lays a sampled 1D array past maxImageArrayLayers out as rows of a 2D image (`layerRows`), and the merge of a4eca2a passes that flag through the staging constructor that a dropped snapshot takes. No test reached that combination: CachedSampledTexture never passes layerRows, and main's ImageArrayRowsPastLayerLimit samples static memory outside the write watch, whose snapshot has no generation and no untracked key and so keeps its vector. agc_snapshot_read_into_staging now binds a watched linear 1D array as a 2D image through ShaderResources. The row's own context caps maxImageArrayLayers at 2048; cachedTexture and the Texture read the limit from the context they are given. A device that reports 8192 (the RX 6700 XT on AMD's Windows driver) allows every array a T# can describe, so without the cap the row would never reach layer rows there. The array has the capped limit + 1 slices, one more when that count is even: with an odd count the rows on both sides of the image centre belong to the centre slice. Its snapshot (2049 slices of 256 bytes at the cap) is over 256 KiB, so cachedTexture drops it, reads it into a staging buffer and makes a layer-rows Texture from that buffer. The lookup must park no vector (main's production files park the snapshot vector after the upload), and the image centre must sample the centre slice. Without layerRows on the staging path the Texture refuses the array ("a texture array with more layers than maxImageArrayLayers is not implemented"). The row prints a "not tested" line without nullDescriptor or when the rows would exceed maxImageDimension2D. Co-Authored-By: Claude <noreply@anthropic.com>
XairRrR
left a comment
There was a problem hiding this comment.
Reviewed — approved
Dropped Uncompressed snapshots are now read straight into a pooled staging Buffer. The merged tree builds and passes the related snapshot and sampled-cache tests on lavapipe. The new test fails on main's production files and passes with the PR, and the validation layer reports no new VUIDs that come from this change.
What I ran
Head e9b72ae83aa067744d220d8a33ae15a906e2ab20 merged into main 4f41f4c375f5abb487dbd184fbc150f31994d762 (merged tree 307f0479be47bc7bd49c21ae3aa506d8ee504a3b), in a clean worktree. Debian 13 VM (Xeon Gold 6136), GCC 14.2.0, Release, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19).
git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...e9b72ae83aa067744d220d8a33ae15a906e2ab20
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "snapshot|sampled_cache|staging|large_tracked|partially_resident"
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R "^(agc_snapshot_read_into_staging|agc_driver_sampled_cache_budget)$"
# negative control: Texture.hpp, ShaderResources.cpp, Texture.cpp from main
git show 4f41f4c375f5abb487dbd184fbc150f31994d762:<path> > <path>
ninja -C build -j32 -l32 agc_driver_recorder_tests agc_driver_sampled_cache_budget_tests
ctest --test-dir build --output-on-failure -R "^(agc_snapshot_read_into_staging|agc_driver_sampled_cache_budget|agc_driver_sampled_cache_budget_without_storage_image_multisample)$"
ninja -C build -j32 -l32 agc_driver_native_multisample_depth_tests
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -R "^agc_driver_native_depth_uniform_planes$"
# restore
git show 307f0479be47bc7bd49c21ae3aa506d8ee504a3b:<path> > <path>
ninja -C build -j32 -l32 agc_driver_native_multisample_depth_tests agc_driver_recorder_tests agc_driver_sampled_cache_budget_tests libs
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -R "^(agc_driver_native_depth_uniform_planes|agc_snapshot_read_into_staging|agc_driver_sampled_cache_budget)$"
git status --porcelain
Results
| Check | Result |
|---|---|
git diff --check |
clean |
check_conventions.py |
All conventions checks passed |
Configure, build, libs (script) |
ok |
| Script test run (2230 tests) | no new failures and no timeouts. The 7 known failures (denormal/division tests, unwrap_self_…, vector_constant_factor_tininess) also fail on main |
20 related tests (snapshot, sampled_cache, staging, large_tracked, partially_resident) |
20/20 pass |
agc_snapshot_read_into_staging |
passes in 0.36 s. lavapipe exposes BC, so every row runs, including the BC5 spare-pool rows and the 1D-array-as-rows row; none prints "not tested" |
| Validation layer, script comparison | the layer loaded in 769 of 770 tests; the one new-VUID test is agc_driver_native_depth_uniform_planes (see below) |
Validation layer, agc_snapshot_read_into_staging and agc_driver_sampled_cache_budget |
the layer was inserted, no Validation Error, no was not found |
| Worktree after restore | git status --porcelain is empty |
agc_snapshot_read_into_staging output (merged tree)
fast-cleared surface cleared on the GPU parks the snapshot vector it replaces and leaves the spare snapshot pool alone: passed
dropped snapshot read into its staging buffer, linear: passed
dropped snapshot read into its staging buffer, tiled: passed
dropped snapshot read into its staging buffer, padded linear: passed
dropped snapshot read into its staging buffer, partially committed: passed
dropped snapshot read into its staging buffer, 1D array laid out as rows of a 2D image: passed
dropped snapshot leaves the spare snapshot pool alone: passed
dropped snapshot expires idle spare snapshots: passed
Snapshot read into staging tests passed
The VUID-vkCmdDispatch-groupCountX-00386 in agc_driver_native_depth_uniform_planes does not come from this PR. The test came to main with c998727, after the validation baseline d1ae628bc2, which is why the script reported it as "test not run on main". I rebuilt the test with main's versions of the three production files this PR changes and ran it under the validation layer. It printed the same VUID-vkCmdDispatch-groupCountX-00386 four times, which matches the merged tree. The PR does not touch dispatch code.
Negative control
I restored Texture.hpp, ShaderResources.cpp and Texture.cpp from main, kept the tests and rebuilt:
agc_snapshot_read_into_stagingfails withAGC graphics: the dropped snapshot of the linear surface parked a vector in the spare pool.agc_driver_sampled_cache_budgetand_without_storage_image_multisamplepass. That is expected: the rewrittenrecycleTests/spareAgeTestsnow park their spare through a fast-cleared BC5 snapshot, which uses the vector path both before and after this change.
After restoring the merged files and rebuilding, all three pass and the worktree is clean.
Findings
Blocking
None.
Non-blocking
- The description's Tested section and its "Not tested" list are older than the head.
- The hardware results ("Head
0386e61741onmain6a3afa4deb") predate three commits: - The "GPUs tested" line still says "on this head".
- "Not tested" still lists "this PR on top of #10773 (I rebase it … when #10773 lands)". #10773 is already in
main(88a4bed), and the merge commit says it was resolved. - Suggestion: rerun the focused tests (including validation) on the RX 6700 XT at
e9b72ae83aand update those lines, or state which head the hardware result is for. The tests on lavapipe here cover the current head.
- The hardware results ("Head
- On devices without BC support, the spare-pool rows don't run. Those are the BC5-producer rows in
agc_snapshot_read_into_staging,recycleTestsandspareAgeTests(core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp:757,:774).- Each prints a "not tested" line and returns success.
- lavapipe and desktop GPUs have BC, so CI still covers them. If the staging path is ever widened to clear keys, these tests also need a new producer, as NFSS10 already noted in the discussion.
- No change needed now.
I checked the code and found nothing wrong:
- Drop decision. It moves before the read (
ShaderResources.cpp:1121) and is equivalent tomain's post-upload drop at:1143forUncompressedkeys.entry.generationissnapshotGeneration, andentry.untrackedis set only when no write is pending. - Other key types. Non-
Uncompressedkeys and kept snapshots keep the vector and the spare pool. - Staging buffer contents. The pooled
Bufferis fully written byReadTextureSurfaceforUncompressedkeys, which the poisoned-buffer rows exercise, including the uncommitted-pages case. - Size check.
Buffer::Bytes()returns exactly the requested size, so the sizeRequireatTexture.cpp:400holds. Constructing with a staging buffer and a clear together is refused. - Debt docs. The PR adds no code comments, so no debt-doc change is needed.
- Perf evidence. The description carries summary lines from two commits (
5fa2520ad95e,85f41ae08dbc) and links to the traces. - Merge order.
Depends on: #10773is satisfied bymain.
Not verified
- Hardware GPUs: I had only lavapipe, so I relied on the author's and commenters' RX 6700 XT, NVIDIA and RDNA2 runs, which were on earlier heads.
- Windows/MinGW: the
ReadProcessMemorypath ofGuestMemory::ReadCommittedinto a pooledBuffer. - The PPSA14363 page-turn numbers: I did not run the title, and the numbers come from an earlier revision (
85f41ae08d), as the description says. - I did not open or check the trace files linked from the author's fork.
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 525 tests)Skipped (49)ReproduceAutomated 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. |
|
@MarcZX10 thanks. Items 1-3 are answered on head
@XairRrR thanks for the lavapipe run. The description now has the RX 6700 XT results on this head (your non-blocking item 1). AI-assisted: yes (Claude Code) |
✅ AMD GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (8, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 517 tests)Skipped (58)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 517 tests)Skipped (48)ReproduceAutomated 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. |
|
Ran this PR merged onto
Failures
|
The test compared one bump count taken with the waits against one taken without, three times, and failed when every pair differed by 8 or more. The bump count of a spin submission is timing dependent (33 with a jump to 48 on lavapipe, no wait involved), so on a loaded runner each pair can carry a spike on the with side. Main's push build 42922616353 failed it with pairs 12, 8, 8 (#16484/#9884 touch neither WaitMemory nor this test; the label wait code was unchanged since e17983e). It now stops at the first pair under Waits / 2 and gives up after 12; a real regression bumps at every wait (16 or more) in every pair and still fails. Co-Authored-By: Claude <noreply@anthropic.com>
Conflicts: - tests/cmake/agc_driver_recorder_tests.cmake: main (boykopovar#9884) registered agc_snapshot_read_into_staging where we registered agc_encoded_segments; kept both. - tests/Recorder.cpp main: main added the --snapshot-read-into-staging-only branch where we added --encoded-segments-only; kept both. boykopovar#17943 merges with main cleanly, so main is merged here directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#9884 reads a dropped sampled snapshot straight into its upload staging buffer, through a Texture constructor that takes the buffer, and conflicted in Texture.hpp, Texture.cpp and ShaderResources.cpp. The merge gives that constructor and its private delegate this PR's packed slabs, so a partially committed snapshot that is dropped is read slab by slab into the staging buffer. The snapshot size check and the upload's tiled buffer, Keep and copy use the staging buffer's size when there is one, since the snapshot span is then empty. cachedTexture keeps #9884's drop and staging flow, sized by this PR's packed snapshot size, and reads through readSnapshot and passes packedSlabs as this PR does.
What
This reopens the change I closed on 2026-10-23 in favour of #8026. It is now rebased past #8026 and keeps #8026's spare pool for the snapshots that still use a vector.
Since #6982, a sampled snapshot of a tracked or hinted surface over 256 KiB keeps no bytes after its upload, and since #8026 its vector then goes to a spare pool. To build one,
cachedTexturedoes three things onmain91ecd2d974:ShaderResources.cpp:1081-1082);:1117);Texturecopies the vector into a pooled stagingBuffer(Texture.cpp:489-490).The vector is parked afterwards (
ShaderResources.cpp:1128).With
Uncompressedkeys, such a snapshot is now read straight into the stagingBuffer:ShaderResources.cpp,cachedTexture:main's drop after the upload: over 256 KiB, and eitherentry.generation != 0(the snapshot generation) or the untracked-memory hint when no write is pending.Uncompressedsnapshot gets a pooled host-visibleBuffer(TRANSFER_SRC).ReadTextureSurfacefills it, and the texture is built from it.main. The expiry loop moves intoexpireSpareSnapshots, whichparkSnapshotandspareSnapshotnow call too.layerRowsas the vector path does, so a dropped snapshot of a 1D array pastmaxImageArrayLayersis still laid out as rows of a 2D image.ClearSingle) keep the vector and the pool. A surface thatmainclears on the GPU (perf(agc): clear a fast-cleared sampled texture on the GPU #13648) keeps no snapshot, as before, and still parks the vector of the entry it replaces. The uncached path (APS5_NO_TEXTURE_CACHE) is unchanged.Texture.cpp(declared inTexture.hpp): the span constructor and a new constructor that takes the stagingBufferas astd::shared_ptr(withdepthCompareandlayerRows) both delegate to one private constructor. It allocates a stagingBufferand copies the span into it only when none was handed in. The rest of the upload ismain's: since fix(agc): reuse one tiled and one linear texture upload scratch per recorded batch #10773, with a recorder, it copies the stagingBufferinto the batch's tiled upload scratch and keeps theBufferwith the batch (Texture.cpp:513-526on this head).For a dropped
Uncompressedsnapshot, this removes the vector allocation, its zero-fill and the surface-sized memcpy. The stagingBuffergoes back to theBufferPoolwhen the recorder releases it, as onmain.A reused pooled
Bufferstill holds earlier bytes, so this relies onReadTextureSurfacewriting every byte forUncompressedkeys.GuestMemory::ReadCommitteddoes: it copies the whole range when it is accessible, and otherwise zero-fills the range and copies the committed parts (copyCommitted,GuestMemory.cpp:2927-2934on91ecd2d974, whichReadCommittedcalls at :2944). On Windows, since #10575, each of those copies is aReadProcessMemoryread. If it fails because a page is not readable, the copy goes page by page and zero-fills every page it cannot read; since #10498, a short read or any other read error throws, and nothing is uploaded from thatBuffer(readPages,visitReadablePagesandcopyCommittedBytes, :2867-2905). #8026 relies on the same contract for reused vectors, and on91ecd2d974,DepthSurface.cpp:1603already reads withReadCommittedstraight into a pooledBuffer.Changes since the close (old head
388daf981f):recycleTestsandspareAgeTests(tests/execution/SampledCacheBudget.cpp) made their spare with a droppedUncompressedsnapshot, which no longer parks one. They now park it through a fast-cleared BC5 snapshot (1024x1024, 0000 keys, 1 MiB), a producer that still does, and check the same counts.mainclears them on the GPU and keeps no snapshot.SampledClearColorrefuses block-compressed formats, so a BC5 surface stays a snapshot.agc_snapshot_staging_uploadis replaced byagc_snapshot_read_into_staging(see Tested).Overlap:
cachedTextureand the same staging setup inTexture's constructor, so the two conflict inTexture.hpp,ShaderResources.cppandTexture.cpp.!slabs.has_value()term on the condition that picks the staging buffer), andpackedSlabsis forwarded into the staging constructor (comment).88a4bed5d3), as agreed with fma-rc. It replaced the upload's per-upload tiled and linearDeviceBuffers with a per-batch scratch, in the block ofTexture.cppwhere this PR makes the staging buffer only when none was passed in. The two complement each other: fix(agc): reuse one tiled and one linear texture upload scratch per recorded batch #10773 changed the device buffers the upload copies and detiles through, this PR how the host stagingBufferis filled. The merge ofmaina4eca2a056keeps fix(agc): reuse one tiled and one linear texture upload scratch per recorded batch #10773's lines as they are and puts this PR's staging block after itssyncUploadsandrecorderlines.Why
PPSA14363 (METAL GEAR SOLID - Master Collection Version): in my runs of a timing build on
main379b1dca32(below), each page turn in the launcher's Screenplay Book sampled a new snapshot of a 15360x8640 R8 linear surface (126.6 MiB), which was dropped after its upload. I have not checked the snapshot itself again on a current build; the page-turn pair on this head is under Tested.#8026 releases a spare once it has gone unused for more than 16 presents, and page turns come seconds apart (7 s in my scripted route, about 400 presents). So in my runs,
mainallocated and zero-filled a new 126.6 MiB vector on every turn, read the surface into it and copied it into the staging buffer.The same holds for any dropped
Uncompressedsnapshot: it always pays the memcpy, and it pays the allocation and zero-fill whenever no spare of its size was parked in the last 16 presents.I measured this with a local timing build on
main379b1dca32, which has #8026 (timing probes, not in this PR; run withAPS5_PROFILE_DRAW=1andAPS5_TRACE_SUMMARY_EVERY=10; it also carried a local change of mine, not part of any PR, that uploads a linear snapshot without the identity detile and changes only the steps after the memcpy). Two runs, each opening the book and turning 8 pages: none of the 18 snapshot builds took a vector from the pool. Per page turn (16 turns, Ryzen 5 5600X):ReadTextureSurface)BufferThis PR removes the first and the last step, which took 24.1-46.2 ms per turn together (median 31.6 ms); the read stays. Keeping spares longer would avoid only the allocation and zero-fill, by holding 126.6 MiB of host memory between turns, and would keep the memcpy. The page-turn frame times of
mainand of this head are under Tested.Tested
Head
ac57b02043onmain4f41f4c375(2026-11-03). RX 6700 XT (gfx1031), AMD Windows driver 32.0.21045.16010, Windows 11 26200, WinLibs GCC 15.2.0 r7 Release,ANYPS5_REQUIRE_VULKAN=1.Integration since
0386e61741, the head of the earlier results:491ffaa5a6and6a54ad1a07mergemaindc9dc7eaaeandf2d874c1fd. The first resolves the conflicts with perf(agc): clear a fast-cleared sampled texture on the GPU #13648, which clears fast-cleared sampled textures on the GPU through a newclearparameter of the snapshot constructor, and moves the test registration intotests/cmake/agc_driver_recorder_tests.cmake(build(agc): register each AGC test executable in its own CMake fragment #12862).181f0ab5e7moves the spare-pool producers to BC5 surfaces (see What) and adds a guard row for the GPU-clear park (below).38f795a674mergesmaina4eca2a056. feat(agc): sample 1D arrays past maxImageArrayLayers as rows of a 2D image #12246 conflicts inTexture.hpp,Texture.cppandShaderResources.cpp, and fix(agc): reuse one tiled and one linear texture upload scratch per recorded batch #10773 inTexture.cpp. The resolution is described in What and under Overlap.e9b72ae83aadds the 1D-array row (below). Ona4eca2a056it also passed 42 related tests in each of 3 runs (that selection missed fix(agc): reuse one tiled and one linear texture upload scratch per recorded batch #10773'sagc_recorder_upload_scratch), and a validation-layer run with noVUID-line.1b0577cc92mergesmain91ecd2d974without conflicts; the page-turn pair below ran on it. Sincea4eca2a056, perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963, fix(agc): copy only the dwords a shader changed back from a GPU-copied buffer #6185, fix(agc): identify cached storage budgets in sampled reports #14891, test(agc): skip the idle publish wait where host imports read as written after a GPU read #12158 and fix(agc): bind a T# minimum LOD through an S# that holds the LOD at 0 #12980 changed five of this PR's six files. The head's changed lines against91ecd2d974are the same ase9b72ae83a's againsta4eca2a056(six files, 380+/34-).ac57b02043mergesmain4f41f4c375(2026-11-03 08:12 UTC) without conflicts. Thatmainis 240 commits past91ecd2d974: 50 merges, all within five minutes after it. The head's changed lines against4f41f4c375are the same as1b0577cc92's against91ecd2d974, and its tree (e7a000f88c) is the onegit merge-treegives fore9b72ae83amerged with4f41f4c375, the merge XairRrR's lavapipe review ran (every row ofagc_snapshot_read_into_stagingpassed there, and the negative control failed; see GPUs tested).cachedTexture, the spare pool and the snapshotTextureconstructors and upload:StorageTexture, and the sampler masks and null-descriptor checks ofShaderResources.cpp. perf(agc): store whole words of 1- and 2-byte texels in the detile shader #6905 and fix(agc): keep a CPU store that rewrote a pending block with its baseline bytes #14302 also add tests toagc_driver_recorder_tests(tests/Recorder.cppand its registrations), the binary that runsagc_snapshot_read_into_staging.TextureDetile.comp,TextureDetiler.cpp): for 1- and 2-byte texels, such as the page surface's R8, it now stores whole words, in both arms. It does not touch the vector allocation, the zero-fill or the memcpy this PR removes. The page-turn pair below ran on1b0577cc92and91ecd2d974, before it; page-turn and GPU-batch times on4f41f4c375may differ in both arms.New test:
agc_snapshot_read_into_staging(agc_driver_recorder_tests --snapshot-read-into-staging-only) samples throughCachedSampledTextureon write-watched guest allocations. On the head, in the validation-layer run (ctest -V), every row below printedpassedand none printednot tested. The test took 0.21-1.59 s in the three plain runs; its CTestTIMEOUTis 30 s.181f0ab5e7, needs no BC):main's production files.Bufferof the surface's size is filled with 0xee and returned to the pool.Buffer: a probeBufferof that size must not get it back.e9b72ae83a, needsnullDescriptor): a watched linear 1D array of 8-texel 8_8_8_8 slices, bound as a 2D image throughShaderResources.maxImageArrayLayersat 2048. The RX 6700 XT reports 8192, which allows every array a T# can describe.cachedTexturedrops its snapshot, and the texture lays it out as rows of a 2D image.Uncompressedsnapshot of the same size 16 presents later leaves that spare alone, and the next snapshot, one present later, releases it.APS5_SYNC_TEXTURE_UPLOAD,APS5_DUMP_TEXTURE,APS5_NO_TEXTURE_CACHEand the buffer pool switches (APS5_BUFFER_POOL_SLOTS,APS5_BUFFER_POOL_SHARED,APS5_NO_BUFFER_CLASSES,APS5_STAGING_POOL_MIB). Each of them changes how a snapshot uploads or whichBufferthe pool hands out.main's production files: this head withTexture.hpp,ShaderResources.cppandTexture.cppfrom4f41f4c375fails in 4 of 4 runs (3 plain, 1 with the validation layer):AGC graphics: the dropped snapshot of the linear surface parked a vector in the spare pool. The head passes in 4 of 4 runs. Withmain's files the test stops at that row, so the 1D-array row does not run there.layerRowsdropped from the staging path: withfalseinstead oflayerRowsin the stagingcreateTexturecall ofcachedTexture, the test fails at the 1D-array row, after the four other dropped rows pass:AGC graphics: a texture array with more layers than maxImageArrayLayers is not implemented(1 run). With the file restored, the head passes again.Related tests: 45 tests, selected by name with
ctest -N -R 'detile_small_elements|recorder|snapshot|sampled_cache|partially_resident|recover_.*allocation|read_written_staging|staged_clear_sampled_read|sampled_storage_base_level_usage|buffer_pool|storage_cache_budget|clear_keys|sampled_clear'.agc_driver_sampled_clear_keys(the last two patterns are new),agc_recorder_upload_scratch(fix(agc): reuse one tiled and one linear texture upload scratch per recorded batch #10773),agc_driver_sampled_cache_budget_report_age(fix(agc): identify cached storage budgets in sampled reports #14891) andagc_detile_small_elements(perf(agc): store whole words of 1- and 2-byte texels in the detile shader #6905, the detile shader the upload dispatches).agc_snapshot_read_into_staging,agc_driver_sampled_cache_budget,agc_driver_sampled_cache_budget_without_storage_image_multisample,agc_driver_sampled_cache_budget_memory,agc_driver_partially_resident_snapshot,agc_driver_large_tracked_snapshot,agc_driver_untracked_snapshot_hintand the 4buffer_pooltests.main's production files with these tests pass 44 of 45 in each of 3 runs; the only failure isagc_snapshot_read_into_staging, as above.Validation layer: the same 45 tests with
ctest -V,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(Vulkan-ValidationLayersvulkan-sdk-1.4.363.0),VK_LOADER_DEBUG=layer,VK_LOADER_LAYERS_DISABLE=~implicit~,ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1, onmain's production files with these tests and on the head. Each log shows the loader insertingVK_LAYER_KHRONOS_validation35 times, once in each of the 35 tests that create a Vulkan instance (agc_snapshot_read_into_stagingamong them; the other 10 print no loader output). Neither log haswas not found but was requested, aVUID-line or aValidation Error. Results as above: 44 of 45 and 45 of 45.Title, on the previous head
1b0577cc92(the same changed lines as this head, onmain91ecd2d974): PPSA14363, launcher → Screenplay Book, 8 page turns (R1) 7 s apart, scripted pad input. 150 s legs ofmain91ecd2d9743b831b575d293e6c8fafbe737e1e88(M) and of1b0577cc927bdde256dc6a54697f9c57f2d340af(P), two clean builds, in the order M1, P1, M2, P2 (2026-11-03).libSceAgcDriver.prxwas checked by hash against its build.APS5_TRACE_SECONDS=60:70and the pad input variables. No leg's trace dropped events.Per leg, 8 page turns each (ms; medians over the turns of the leg):
main91ecd2d974)1b0577cc92)main91ecd2d974)1b0577cc92)All turns of each arm:
main91ecd2d974102.7 ms median (96.3-126.9, 16 turns), committer span 42.7 ms, GPU batch 27.6 ms;1b0577cc9277.3 ms median (68.3-92.5, 16 turns), committer span 15.6 ms, GPU batch 28.2 ms. Every page turn still drops frames with the change.Over the whole 70 s window, in each of the 3 adjacent pairs (M1-P1, M2-P1, M2-P2), the frame p50 is the same (16.683 ms). With the change the mean frame is 0.07-0.08 ms shorter, there are 2.4-2.8 more presents per 10 s, and the GPU is busy 0.002-0.006 ms less per present.
Traces of all four legs, each with its
tools/trace_digest.pyoutput, as CONTRIBUTING asks: M1: trace, digest; P1: trace, digest; M2: trace, digest; P2: trace, digest. They hold only AnyPS5's scope and thread names, timings, batch ids and present numbers; I checked each for anything from the title.Summary lines of the four legs (M1, P1, M2, P2):
{"commit":"91ecd2d9743b","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"60:70"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 60:70","first_present":3572,"ms":70003.123},"presents":4139,"frame_ms":{"p50":16.683,"p90":16.910,"p99":17.428,"max":126.883},"gpu_busy_ms_per_present":6.837,"worker_busy_pct":{"queue worker 0x0":10.513},"top_phases_ms_per_frame":{"VideoOut.Flip":13.645,"VideoOut.Flip.vblank_wait":12.619,"Driver.Packet":1.775,"Graphics.Draw":1.429,"Graphics.Draw.draw_and_resource_release":1.269,"Driver.Packet.draw":1.203,"Driver.Draw":1.183,"VideoOut.Flip.present":0.935},"trace_dropped":false,"trace":"aps5-trace-91ecd2d9743b-14216.json.gz"} {"commit":"1b0577cc927b","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"60:70"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 60:70","first_present":3575,"ms":70003.079},"presents":4159,"frame_ms":{"p50":16.683,"p90":16.910,"p99":17.433,"max":92.502},"gpu_busy_ms_per_present":6.831,"worker_busy_pct":{"queue worker 0x0":10.011},"top_phases_ms_per_frame":{"VideoOut.Flip":13.686,"VideoOut.Flip.vblank_wait":12.650,"Driver.Packet":1.682,"Graphics.Draw":1.342,"Graphics.Draw.draw_and_resource_release":1.191,"Driver.Packet.draw":1.167,"Driver.Draw":1.148,"VideoOut.Flip.present":0.929},"trace_dropped":false,"trace":"aps5-trace-1b0577cc927b-8828.json.gz"} {"commit":"91ecd2d9743b","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"60:70"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 60:70","first_present":3572,"ms":70003.310},"presents":4140,"frame_ms":{"p50":16.683,"p90":16.909,"p99":17.505,"max":126.907},"gpu_busy_ms_per_present":6.833,"worker_busy_pct":{"queue worker 0x0":10.440},"top_phases_ms_per_frame":{"VideoOut.Flip":13.644,"VideoOut.Flip.vblank_wait":12.612,"Driver.Packet":1.762,"Graphics.Draw":1.413,"Graphics.Draw.draw_and_resource_release":1.260,"Driver.Packet.draw":1.195,"Driver.Draw":1.175,"VideoOut.Flip.present":0.939},"trace_dropped":false,"trace":"aps5-trace-91ecd2d9743b-8032.json.gz"} {"commit":"1b0577cc927b","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"60:70"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 60:70","first_present":3574,"ms":70003.066},"presents":4157,"frame_ms":{"p50":16.683,"p90":16.921,"p99":17.572,"max":92.258},"gpu_busy_ms_per_present":6.829,"worker_busy_pct":{"queue worker 0x0":10.067},"top_phases_ms_per_frame":{"VideoOut.Flip":13.663,"VideoOut.Flip.vblank_wait":12.616,"Driver.Packet":1.692,"Graphics.Draw":1.347,"Graphics.Draw.draw_and_resource_release":1.196,"Driver.Packet.draw":1.184,"Driver.Draw":1.164,"VideoOut.Flip.present":0.965},"trace_dropped":false,"trace":"aps5-trace-1b0577cc927b-2116.json.gz"}tools/performance_compare.py --require-matching-contextM1 against P1Performance comparison
Frame and GPU times (ms)
Top phases (ms per frame)
Worker busy time (%)
tools/trace_digest.pyof the M1 traceseconds 60:70 from present 3572: 4139 presents, frame p50 16.7 / p90 16.9 / p99 17.4 / max 126.9 ms, GPU busy 6.8 ms per present
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.26200, 1920x1080, commit 91ecd2d, dropped: no
{"commit":"91ecd2d9743b","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"60:70"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 60:70","first_present":3572,"ms":70003.123},"presents":4139,"frame_ms":{"p50":16.683,"p90":16.91,"p99":17.428,"max":126.883},"gpu_busy_ms_per_present":6.837,"worker_busy_pct":{"queue worker 0x0":10.513},"top_phases_ms_per_frame":{"VideoOut.Flip":13.645,"VideoOut.Flip.vblank_wait":12.619,"Driver.Packet":1.775,"Graphics.Draw":1.429,"Graphics.Draw.draw_and_resource_release":1.269,"Driver.Packet.draw":1.203,"Driver.Draw":1.183,"VideoOut.Flip.present":0.935},"trace_dropped":false,"trace":"aps5-trace-91ecd2d9743b-14216.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 15.1, Driver.WorkerWait.idle_and_completion_poll 15.1, VideoOut.Flip 13.6, VideoOut.Flip.vblank_wait 12.6, batch 6.8, Driver.Packet 1.0, VideoOut.Flip.present 0.9, Driver.Present 0.9, Graphics.Draw 0.7, Graphics.Draw.draw_and_resource_release 0.6
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
tools/trace_digest.pyof the P1 traceseconds 60:70 from present 3575: 4159 presents, frame p50 16.7 / p90 16.9 / p99 17.4 / max 92.5 ms, GPU busy 6.8 ms per present
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.26200, 1920x1080, commit 1b0577c, dropped: no
{"commit":"1b0577cc927b","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"60:70"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 60:70","first_present":3575,"ms":70003.079},"presents":4159,"frame_ms":{"p50":16.683,"p90":16.91,"p99":17.433,"max":92.502},"gpu_busy_ms_per_present":6.831,"worker_busy_pct":{"queue worker 0x0":10.011},"top_phases_ms_per_frame":{"VideoOut.Flip":13.686,"VideoOut.Flip.vblank_wait":12.65,"Driver.Packet":1.682,"Graphics.Draw":1.342,"Graphics.Draw.draw_and_resource_release":1.191,"Driver.Packet.draw":1.167,"Driver.Draw":1.148,"VideoOut.Flip.present":0.929},"trace_dropped":false,"trace":"aps5-trace-1b0577cc927b-8828.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 15.1, Driver.WorkerWait.idle_and_completion_poll 15.1, VideoOut.Flip 13.7, VideoOut.Flip.vblank_wait 12.7, batch 6.8, VideoOut.Flip.present 0.9, Driver.Present 0.9, Driver.Packet 0.9, Graphics.Draw 0.7, Driver.Packet.draw 0.6
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Title, on the previous head: the same route, form and analysis,
main6a3afa4debagainst0386e61741(this PR on6a3afa4deb), legs M1, P1, M2, P2 on 2026-10-31 (UTC), two clean builds, no dropped trace events.main92.8-262.5 ms,0386e6174168.1-228.8 ms).main, and 102.55 and 102.45 ms for0386e61741.tools/trace_digest.pyoutput: M1: trace, digest; P1: trace, digest; M2: trace, digest; P2: trace, digest. They hold the same kinds of data as the traces above, and I checked them the same way.Title, on an earlier revision:
main5fa2520ad9against85f41ae08d(not current-mainnumbers)Title, on an earlier revision: the same route and analysis. These legs compare
main5fa2520ad9with85f41ae08d, which is this change on5fa2520ad9. They are not current-mainnumbers.main5fa2520ad9(M) and of85f41ae08d(S), in the order M1, S1, two legs of a local build that also has the detile change from Why, S2, M2, and later M3, S3.85f41ae08dis pushed asthuanquang:perf/snapshot-staging-upload-measured. Outsidetests/Recorder.cpp, its changed lines against5fa2520ad9are the same as0386e61741's against6a3afa4deb.APS5_TRACE_SECONDS=60:70and the pad input variables. OnlylibSceAgcDriver.prxdiffered between legs, checked by hash. Each leg started the title anew in the same run folder, whose shader cache was copied from an earlier run before M1 and kept between legs.Per leg, 8 page turns each (ms; medians over the turns of the leg):
main5fa2520ad9)main5fa2520ad9)85f41ae08d)85f41ae08d)85f41ae08d)All turns of each arm:
main5fa2520ad9122.6 ms median (107.2-157.8, 16 turns), committer span 46.5 ms, GPU batch 36.1 ms;85f41ae08d75.3 ms median (63.5-103.3, 24 turns), committer span 9.9 ms, GPU batch 30.9 ms. Every page turn still drops frames with the change.Traces of M1, M3, S1 and S3, as CONTRIBUTING asks (S2's trace is not attached): M1: trace, digest; M3: trace, digest; S1: trace, digest; S3: trace, digest. They hold only AnyPS5's scope and thread names, timings, batch ids and present numbers; I checked each for anything from the title. Each digest is the
tools/trace_digest.pyoutput of its trace.Summary lines of M1 (
main5fa2520ad9) and S1 (85f41ae08d){"commit":"5fa2520ad95e","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"60:70"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 60:70","first_present":3552,"ms":70003.173},"presents":4126,"frame_ms":{"p50":16.683,"p90":16.914,"p99":18.763,"max":143.273},"gpu_busy_ms_per_present":8.634,"worker_busy_pct":{"queue worker 0x0":14.159},"top_phases_ms_per_frame":{"VideoOut.Flip":12.819,"VideoOut.Flip.vblank_wait":11.509,"Driver.Packet":2.397,"Graphics.Draw":1.905,"Driver.Packet.draw":1.696,"Driver.Draw":1.663,"Graphics.Draw.draw_and_resource_release":1.549,"Driver.Draw.draw_enqueued":1.001},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":42.045,"events_lost":162856,"totals_full":false}},"trace":"aps5-trace-5fa2520ad95e-7364.json.gz"} {"commit":"85f41ae08dbc","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"60:70"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 60:70","first_present":3573,"ms":70003.273},"presents":4157,"frame_ms":{"p50":16.684,"p90":16.910,"p99":17.373,"max":97.168},"gpu_busy_ms_per_present":8.044,"worker_busy_pct":{"queue worker 0x0":11.491},"top_phases_ms_per_frame":{"VideoOut.Flip":13.362,"VideoOut.Flip.vblank_wait":12.380,"Driver.Packet":1.931,"Graphics.Draw":1.539,"Driver.Packet.draw":1.390,"Driver.Draw":1.363,"Graphics.Draw.draw_and_resource_release":1.239,"Driver.Draw.draw_enqueued":0.808},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":57.427,"events_lost":57660,"totals_full":false}},"trace":"aps5-trace-85f41ae08dbc-27224.json.gz"}In that pair, every leg's trace dropped events of the queue worker thread (
trace_dropped), as its M1 and S1 lines show (M3, S2 and S3 likewise); the page-turn analysis reads presents, draw-committer spans and GPU batches. M3 also dropped draw-committer events from 61.4 s into its window, after its last page turn (58.0 s into the window).tools/performance_compare.pyM1 against S1Performance comparison
Configuration differences
Frame and GPU times (ms)
Top phases (ms per frame)
The only recorded configuration difference is
window.first_present(3552 against 3573), the present at which each window opened.tools/check_conventions.pyandgit diff --checkpass against4f41f4c375.Not tested:
main4f41f4c375(the page-turn pair is on1b0577cc92and91ecd2d974);agc_snapshot_read_into_staging, since WSL gives it no write watch (XairRrR's lavapipe run ofe9b72ae83aran every row, see GPUs tested);e9b72ae83aor earlier), and other titles;main's production files on its own: there the test stops at the linear row first, so control (b) is that row's check;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)88a4bed5d3; this head contains it)ac57b02043(tests) and1b0577cc92(page-turn pair). From this thread, one9b72ae83a: by TechLevelZero's NVIDIA run, merged ontomainf6232fc(0 new failures, no new validation IDs againstmain; the new test was validated but not compared), NVIDIA RTX 2000 Ada Generation (driver 595.99.02), Ubuntu 26.04.1 (comment); by XairRrR, merged ontomain4f41f4c375(20 related tests, negative control red), lavapipe (Mesa 26.1.6, LLVM 19), Debian 13 (review). On52a861028e: by ycbuzi, merged ontomain2e1c72239b(the 17 snapshot tests, 2 runs each, negative control red), NVIDIA GeForce RTX 4070 SUPER and GTX 1650 SUPER (NVIDIA 616.92) and AMD Radeon RDNA2 iGPU1002:164e(AMD 32.0.21030.2001), Windows 11 26200 (comment); by NFSS10 (14 related tests with the validation layer), AMD Radeon RX 7900 GRE, AMD 25.6.1, Windows 10.0.22631 (comment); by Bram910, cherry-picked onto a local integration (7 tests with the validation layer, negative control red), NVIDIA GeForce RTX 3080, Windows driver 32.0.16.1047, Windows 11 26200 (comment)🤖 Generated with Claude Code