perf(agc): stage raw buffer elements a dispatch sweeps #6486
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6486"
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 karanvora2599 on 2026-10-15T17:08:10Z.
What
A compute dispatch that reads and writes most of a raw (stride 0) guest buffer now gets the device-local staging that @oneandonlydean's rule from
2688b7646already gives strided buffers, up to 16 MiB. This extends their rule; it doesn't replace it.Title. PPSA99005, the PS5 OpenGL Showcase (Game bring-up #6289). @MiguelAdolfsen's #6189 reports its slow scene, and their #6202 addresses the storage round trip described there. This PR addresses the other large cost in the same frame: the particle dispatch.
Background. Since
2688b7646, a written V# element that the shader also reads (bufferRead) is staged in device memory up to 16 MiB when the direct dispatch's threads × V# stride cover at least half of it (ShaderResources::addGuestBuffer). A raw buffer has stride 0, so it never passes the test and keeps the 2 MiB written window. GL and Vulkan-style storage buffers compiled by Mesa are raw buffers, so they stay bound in place in the host import, however hard the dispatch sweeps them.The PS5 OpenGL Showcase (PPSA99005) is such a case.
particle_csruns 262,144 threads over an 8 MiB SSBO; each thread loads and stores its own 32-byte record. Bound in place, that dispatch takes about 53 ms of GPU per frame on an RTX 4060 Laptop. Staged, it takes about 0.1 ms plus 2.2 ms of bulk copies. WithAPS5_NO_HOST_IMPORT=1it still takes about 60 ms, so the cost is the shader's own loads and stores to host memory, not the import.How.
BufferResource::maxByteExtent: immediate offset plus access width).DescriptorBindingBuildernow copies it into a newDescriptorBinding::bufferExtent, one entry per guest buffer element, likebufferRead.addGuestBufferuses it as the record size when the V# stride is 0: swept meansread && dispatchThreads != 0 && recordBytes != 0 && dispatchThreads × recordBytes × 2 ≥ size. Strided elements are unchanged.2fb7a77acdid forbufferRead(format 24). Users' shader caches are rebuilt once after the update. The binding plan is what the driver reads at bind time; the IR resource list it comes from is not kept with it.Why results don't change. Staging is the existing path: copy in before the dispatch, bind the device-local buffer in the import's place, copy the whole element back after it. Only the decision to take it changes, for raw elements a dispatch reads, writes and covers.
Where it matters. Raw storage buffers a dispatch sweeps, between 2 and 16 MiB. A kernel that touches few records of a large raw pool stays in place, as the rule intends: 1,024 threads × 32 bytes against 4 MiB is not swept. A raw element whose accesses carry a large immediate offset (up to 4,095 bytes) overstates its record size; the worst case is a needless copy of at most 16 MiB in and out.
Tested
Windows 11, MinGW-w64 GCC 15.2.0, Release.
92cdc7b62.51cee9031(bc15be99a). The conflict wasmain's newguestBufferByteshelper next toaddGuestBuffer, and both are kept. Disk-cache format 37 is still free there. Rebuilt on that base:agc_read_written_stagingandagc_shader_disk_cachepass on all three devices;main51cee9031(warm-up of each, then main / PR / PR / main) repeats the result. GPU busy per present goes from 121.6 / 119.2 ms to 71.7 / 71.6 ms, frame p50 from 199 / 198 ms to 150 / 152 ms, and presents per 10 s from 51 / 51 to 67 / 66. These four traces are in the trace comment below.PS5 OpenGL Showcase (PPSA99005, v1.0.2), RTX 4060 Laptop (Ada), driver 591.86, Windows 11. Measured in the default scene with
APS5_TRACE_SECONDS=15:10andAPS5_SPIRV_OPT=none, alternating main / this PR / this PR / main, after a warm-up run of each. Summary lines (frame_ms,gpu_busy_ms_per_present) are below; the four traces are in the trace comment below, with the rebased runs.92cdc7b62With
APS5_PROFILE_GPU=1 APS5_TRACE_STAGING=1:particle_cs) takes about 53 ms per dispatch. Only the 384 KiB and 40-byte elements are staged.The rest of the frame is the storage write-backs #6202 addresses, and draws.
Summary lines (main ab1, PR ab1, PR ab2, main ab2) and [gputime] excerpts
APS5_PROFILE_GPU=1, main, then this PR (by-program part):On main,
APS5_NO_HOST_IMPORT=1leaves the dispatch at about 60 ms, so the cost is the shader's access to host memory, not the import.agc_read_written_staging(new ctest entry runningreadWrittenStagingTests, which only ran in the no-argument mode ofagc_driver_recorder_tests, so CI never ran it). New raw cases:It passes on the RTX 4060, the Intel UHD (run with
VK_LOADER_DRIVERS_DISABLE=*nv-vk*, since this test picks the discrete GPU) and lavapipe.Negative check: with the sweep test back to
descriptor.Stride()alone, as on main, it fails witha dispatch sweeping a read and written 4 MiB raw element bound it in place.agc_shader_disk_cacheround-tripsbufferExtent.Every
agc_test (600), one at a time, at this PR:agc_driver_store_over_untrackedfails (the first result was not stored). It only stores, so this change doesn't reach it. #6412 reports the same failure on main, starting ataf4e074a0; on my machine it passes with a build from beforeaf4e074a0.VK_LOADER_DRIVERS_DISABLE=*nv-vk*, so the recorder tests run on it too): passes or skips except the following, none of which goes through buffer staging. I haven't compared these two against main on this device:agc_driver_ds_swizzle, and the image-table tests (bindless_images,image_sint8,image_table,image_table_cache_bounds,image_table_reuse): these also fail on maine858dbd78on this device;agc_import_watch, at the Windows import probe's settle queue, andagc_sample_dumps, a segfault;agc_driver_store_over_untracked.agc_import_watchandstore_over_untracked, plus segfaults indepth_fast_clear_submit,depth_storage_dispatch,sample_mask_depth_stencil,stencil_ref_export_unused,stencil_replayandstencil_replay_no_gpl. The stencil ones pass when run alone; the others are the known intermittent lavapipe crashes.The no-argument run of
agc_driver_recorder_testsstops atkeyProofTests((9) a scan under a pending write was kept), also in a build of main760ffa683, before reachingreadWrittenStagingTests. That's why the new entry runs the staging test on its own.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)DescriptorBindingfield, extendsaddGuestBufferand takes disk-cache format 37), as #5875, #6032 and #6296 do for the format line. Whichever lands second rebases and takes the next format number.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T17:29:22Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/shader/recompiler/ShaderDiskCache.cppL88-90core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppL425core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL1835, L3965core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppL87core/shader/recompiler/Recompiler.hppL452core/shader/recompiler/ShaderDiskCache.cppL90, L432, L460core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL3964-3965core/shader/recompiler/ShaderDiskCache.hppL16core/shader/recompiler/ShaderDiskCache.hppL16core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL1835core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL3983core/libs/prx/libSceAgcDriver/tests/Recorder.cppL2634, L2636-2637, L2652, L2657-2660core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppL425core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL1835, L3965core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppL437core/shader/recompiler/Recompiler.hppL452core/shader/recompiler/ShaderDiskCache.cppL90, L432, L460Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/shader/recompiler/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.cppImported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-16T17:26:15Z.
Rebase handoff — rebased onto current
main(authorship unchanged). One conflict, thestatic_assertsize pins inShaderDiskCache.cpp: this PR'sbufferExtentfield landsDescriptorBindingat 616 as expected, butRecompileResultmeasures 464 in the merged tree rather than the PR's 472 —mainrestructured it while this PR was in flight, so the +8 the PR saw no longer applies. The assert is pinned to the merged actual (464); the encoder/decoder changes forbufferExtentthemselves merged cleanly.Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV):tools/check_conventions.py --base origin/mainpassesmainregression (agc_driver_tessellationsegfault, #4727), not this PRTo pick it up:
Head is
7920ad274.Imported from boykopovar/AnyPS5. Originally posted by karanvora2599 on 2026-10-18T00:57:57Z.
Rebased onto
main51cee9031(bc15be99a). Thanks @blawesom for the rebase handoff. I redid it on my side; the conflict there wasmain's newguestBufferByteshelper next toaddGuestBuffer, and both are kept. On this toolchainRecompileResultis still 472 onmaintoo, so only theDescriptorBindingpin moves (592 → 616), and disk-cache format 37 is still free.agc_read_written_stagingandagc_shader_disk_cachepass on the RTX 4060, the Intel UHD and lavapipe. The Showcase A/B on the new base repeats the result:main51cee9031The traces for both the original table and this one are attached below.
Imported from boykopovar/AnyPS5. Originally posted by karanvora2599 on 2026-10-18T01:28:34Z.
Traces for the Showcase runs (PPSA99005, RTX 4060 Laptop, driver 591.86,
APS5_TRACE_SECONDS=15:10,APS5_SPIRV_OPT=none), in run order.The table in the description (10cb276d1, this change on main
92cdc7b62):92cdc7b62, ab1: main-ab1-aps5-trace-92cdc7b6224c-6344.json.gz92cdc7b62, ab2: main-ab2-aps5-trace-92cdc7b6224c-19044.json.gzThe rebased head bc15be99a against main
51cee9031(my comment above):51cee9031, ab1: main-ab1-aps5-trace-51cee90311b4-38040.json.gz51cee9031, ab2: main-ab2-aps5-trace-51cee90311b4-21064.json.gzEach file's summary line is in the description or in that comment, in the same order.
Imported from boykopovar/AnyPS5. Originally posted by karanvora2599 on 2026-10-18T08:16:56Z.
A data point for the case where #6202 lands first, since both change the PS5 OpenGL Showcase (PPSA99005). Same laptop and scene as the description: RTX 4060 Laptop, driver 591.86,
APS5_TRACE_SECONDS=15:10,APS5_SPIRV_OPT=none, basemain51cee9031. I merged #6202 (60229fae6) locally without conflicts, on its own (8864cfdf3) and on top of this PR (5e8e38b35). The runs were 45 s each, interleaved, in this order; runs 7-10 were a second round, after a warm-up of #6202 on its own.mainmainWith #6202 in, this PR still takes the frame from about 97 ms to 46 ms, and the GPU time per present from about 84 ms to 34 ms. The title's own counter agrees: about 5.0 fps on
main, 6.5 with this PR, 9.7 with #6202 and 19.5 with both.With both,
APS5_PROFILE_GPU=1puts 31-39 ms per present in the 18 draws.particle_cs(0x21f3d9000) is down to about 0.1 ms per dispatch, and the staging copies take about 2 ms per present.agc_read_written_stagingandagc_driver_array_layer_targetpass on the merge.Thanks @MiguelAdolfsen for #6202.