perf(agc): read dropped sampled snapshots straight into their upload staging buffer #9884
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9884"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-22T20:32:45Z.
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 (#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 #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: #10773 changed the device buffers the upload copies and detiles through, this PR how the host stagingBufferis filled. The merge ofmaina4eca2a056keeps #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 #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(#12862).181f0ab5e7moves the spare-pool producers to BC5 surfaces (see What) and adds a guard row for the GPU-clear park (below).38f795a674mergesmaina4eca2a056. #12246 conflicts inTexture.hpp,Texture.cppandShaderResources.cpp, and #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 #10773'sagc_recorder_upload_scratch), and a validation-layer run with noVUID-line.1b0577cc92mergesmain91ecd2d974without conflicts; the page-turn pair below ran on it. Sincea4eca2a056, #8963, #6185, #14891, #12158 and #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. #6905 and #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(#10773),agc_driver_sampled_cache_budget_report_age(#14891) andagc_detile_small_elements(#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):
tools/performance_compare.py --require-matching-contextM1 against P1Performance comparison
91ecd2d9741b0577cc92Frame 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
91ecd2d974, dropped: noSlowest 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
1b0577cc92, dropped: noSlowest 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)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
5fa2520ad9Configuration 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
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T10:30:02Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The direct-to-staging path is coherent on inspection: the dropped-snapshot predicate is limited to large uncompressed snapshots that are not retained for comparison,
ReadTextureSurfacefills the selected span throughGuestMemory::ReadCommitted, and the newTextureoverload avoids the vector-to-staging copy. The four surface-layout cases and the negative control are useful evidence.What I checked
52a861028e91031a5ed68e844a763a085ee01e90.main:bc3e33f4e334996ab9ba5cbf8544942465be18f3.git merge-tree --write-treeis clean (ecf94663beed0ee0d00e430424beab911a2d679f).git diff --checkpasses andtools/check_conventions.pypasses against currentmain.Blocking items
main30be9b428b. Since thenmainhas changedShaderResources.cpp,Texture.cpp,Texture.hppand the driver test registration; those are also touched by this PR. The merge preview is clean, but these overlapping changes make the old runtime result insufficient for the integrated tree. Please merge/rebase currentmainand rerun the focused 25-test set, including the Vulkan validation comparison and negative control, on the resulting exact head.main5fa2520ad9plus a candidate rather than the current integrated head. Since the sampled-resource and texture paths changed onmainafter that baseline, please provide the required matched current-main/change capture pair, or demonstrate from the integrated diff and a current run that those intervening changes do not affect this measurement.Depends on: none. Please change it toDepends on: #10773and keep the stated order in the merge plan.The existing reports support the optimization and the earlier behavior, but do not cover these current integration and landing-order requirements. I will reassess after they are addressed.
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T08:51:44Z.
Review: APPROVED
Reviewed — approved
Dropped
Uncompressedsnapshots are now read straight into a pooled stagingBuffer. The merged tree builds and passes the related snapshot and sampled-cache tests on lavapipe. The new test fails onmain'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
e9b72ae83aa067744d220d8a33ae15a906e2ab20merged intomain4f41f4c375f5abb487dbd184fbc150f31994d762(merged tree307f0479be47bc7bd49c21ae3aa506d8ee504a3b), in a clean worktree. Debian 13 VM (Xeon Gold 6136), GCC 14.2.0, Release, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19).Results
git diff --checkcheck_conventions.pylibs(script)unwrap_self_…,vector_constant_factor_tininess) also fail onmainsnapshot,sampled_cache,staging,large_tracked,partially_resident)agc_snapshot_read_into_stagingagc_driver_native_depth_uniform_planes(see below)agc_snapshot_read_into_stagingandagc_driver_sampled_cache_budgetValidation Error, nowas not foundgit status --porcelainis emptyagc_snapshot_read_into_staging output (merged tree)
The
VUID-vkCmdDispatch-groupCountX-00386inagc_driver_native_depth_uniform_planesdoes not come from this PR. The test came tomainwithc9987271e3, after the validation baselined1ae628bc2, which is why the script reported it as "test not run on main". I rebuilt the test withmain's versions of the three production files this PR changes and ran it under the validation layer. It printed the sameVUID-vkCmdDispatch-groupCountX-00386four times, which matches the merged tree. The PR does not touch dispatch code.Negative control
I restored
Texture.hpp,ShaderResources.cppandTexture.cppfrommain, 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
0386e61741onmain6a3afa4deb") predate three commits:181f0ab5e7(BC5 producers and the GPU-clear guard row);38f795a674(the merge ofmainwith #10773 and #12246, which passeslayerRowsthrough the staging constructor);e9b72ae83a(the 1D-array-as-rows row).main(88a4bed5d3), and the merge commit says it was resolved.e9b72ae83aand update those lines, or state which head the hardware result is for. The tests on lavapipe here cover the current head.agc_snapshot_read_into_staging,recycleTestsandspareAgeTests(core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp:757,:774).I checked the code and found nothing wrong:
ShaderResources.cpp:1121) and is equivalent tomain's post-upload drop at:1143forUncompressedkeys.entry.generationissnapshotGeneration, andentry.untrackedis set only when no write is pending.Uncompressedkeys and kept snapshots keep the vector and the spare pool.Bufferis fully written byReadTextureSurfaceforUncompressedkeys, which the poisoned-buffer rows exercise, including the uncommitted-pages case.Buffer::Bytes()returns exactly the requested size, so the sizeRequireatTexture.cpp:400holds. Constructing with a staging buffer and a clear together is refused.5fa2520ad95e,85f41ae08dbc) and links to the traces.Depends on: #10773is satisfied bymain.Not verified
ReadProcessMemorypath ofGuestMemory::ReadCommittedinto a pooledBuffer.85f41ae08d), as the description says.