Repository navigation
perf(agc): run the dispatches a compute ring leaves unordered side by side - #9176
1 commit merged into
Conversation
|
This pull request is labeled |
|
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.
|
|
Run on AMD hardware. Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release,
|
CnRJay
left a comment
There was a problem hiding this comment.
The microbenchmark is a real signal (8 independent dispatches 0.80 ms against 6.3 ms with a barrier between each pair on an RTX 3080 Laptop). The design decides overlap from the absence of packets the game wrote, and that is the wrong evidence.
- "Unordered" here means no packet between the two dispatches other than
SET_SH_REGandNOP. That says the game didn't ask for ordering; it does not say the dispatches are independent. Titles that skip aCS_PARTIAL_FLUSH/ACQUIRE_MEMbetween two dispatches may still depend on the second starting after the first has launched, and nothing in the PR shows that none does. Before this PR the emulator imposed full ordering and hid that; now a dispatch that reads what the previous one wrote through the same memory (not the sameresourcesobject) runs concurrently with it. The PR's own tests only check that dispatches over separate resources keep their results. - The emulator already has the evidence the PR needs: the read and write ranges of each dispatch (
PassHazardsdoes it for draws in one render pass, and the staged-element code knows each element's extent). Overlap a dispatch only when its ranges are disjoint from the run's, and treat unknown accesses (BDA, indirect) as conflicting, the wayPassHazardsdoes. That makes overlap a proven-independent case and costs one range check; the packet-pattern rule makes it a guess. Please add that check, and a test where dispatch B reads what A writes, with onlySET_SH_REGbetween them, and requires B to see A's result. - The only measured effect on a game is in "our own tree (not
main)": overlap off added about 146 ms of summed GPU time per frame (+19%) on PPSA26344, with presents unchanged because the scene is CPU-bound. That is a GPU-time number on a scene where the frame rate doesn't move. Post the summary lines of main and this PR from the same scene, and one GPU-bound scene where the benefit would show in frame time. - NVIDIA only. AMD and Intel hardware run unordered dispatches differently; an AMD run of
agc_driver_dispatch_overlapand a game scene would show it's not specific to the NVIDIA barrier cost.
CnRJay
left a comment
There was a problem hiding this comment.
A data point for the hazard question in my earlier review: #9287, stacked on this PR, says "PPSA26344 v1.008: renders correctly in our tree with this change (geometry broke before the guards)" and adds a rule that "a dispatch does not join when one of its ranges overlaps a range of the run" when one side is a staged copy. So overlapping dispatches already produced wrong geometry on this title once the copies were allowed inside a run.
That shows the dispatch overlap in this PR needs the same guard in the base case: a dispatch must not join an open run when its read or write ranges overlap the ranges of the run (reads against writes, writes against writes), and unknown accesses (BDA, indirect) must conflict, not only the staged-copy case #9287 covers. Please add that check here, with a test where dispatch B reads what A wrote with only SET_SH_REG between them, rather than leaving it to a follow-up that depends on this one landing first.
0c93069 to
49625ed
Compare
|
Thanks, you're right that the packet pattern was the wrong evidence. No CS_PARTIAL_FLUSH between two dispatches only says the game didn't ask for ordering, not that the dispatches are independent, and #9287's geometry history shows what happens when that gap is left open. I've amended the commit so a dispatch joins an open run only when its accesses are disjoint from the run's: every bound buffer range counts as a read, every written range as a write, and storage images (including sampled views of them) are compared by image. Reads against writes and writes against writes conflict. An address-based or BDA build counts as writing all memory, and indirect, LDS, thread-dimension and staged dispatches never join.
You're also right that the main-vs-PR summary lines from one scene and a GPU-bound scene are still owed. In the part of Yotei's world we can reach we're CPU-bound in the committer, so frame time won't move there; I'll post both summary lines and look for a GPU-bound spot. We don't have AMD hardware either. Could someone with an AMD card run |
MarcZX10
left a comment
There was a problem hiding this comment.
Review
I reviewed the dispatch eligibility, access-range conflict checks, deferred barrier lifecycle, and the added ordering/hazard cases. I did not confirm a behavioral defect in the read/write conflict predicate from static inspection. I’m requesting changes because the branch is far behind current main, the performance report does not yet meet the repository’s evidence rule, and some active overlaps need to be recorded and coordinated.
Bring the branch and validation current
This head is 721 commits behind current main (merge base de4ef842b5). The tests in the description were run against that old base. Please rebase on current main, resolve any conflicts, and rerun the focused dispatch tests on both main and this head.
This changes the AGC driver, so the PR checklist also requires the focused tests on both revisions with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, and ANYPS5_REQUIRE_VULKAN=1 under ctest -V, including a comparison of new VUID- messages and confirmation the requested validation layer loaded. The reported Windows/WSL test counts and dispatch cases are useful, but the description does not report this comparison.
Performance report
The repo requires a perf PR to provide valid summary lines for main and the change from the same machine and scene, with traces. The current perf numbers missing label reflects the gap: the PPSA26344 result compares the feature enabled/disabled in “our own tree (not main),” and the 8-dispatch microbenchmark is not a main-versus-change scene report.
Please add same-scene, same-machine main and rebased-head summary lines and traces as described by the performance issue form. Keep the enabled/disabled run as a useful feature-isolation result, but label it separately from the required main comparison.
Open overlaps
The generated overlap report lists currently open #6946, #9508, and #7449 in code changed here; the PR body currently records #7920 and mentions #8278/#8992. In particular, #6946 changes packet execution ordering in the same function, #9508 is stacked on #6946, and #7449 touches the dispatch recording/barrier path. Please update the overlap notes, agree on integration order with the affected authors, and add a Depends on entry if this branch actually depends on another PR. The #7920 barrier interaction is already called out; please preserve that coordination as well.
Checks
git diff --check: passed.tools/check_conventions.pyagainst currentmain: passed.- Current CI: eligibility, conventions, labels, and report passed; Linux, Windows, register-context, relinker, ASan relinker, and write-watch jobs were skipped.
- I did not produce a local build/runtime result for this head in this session. The runtime results in the PR description are author-reported and are from the older base above.
The test matrix and explicit APS5_NO_DISPATCH_OVERLAP control are useful. I’ll revisit after the current-base validation, performance comparison, and overlap notes are updated.
…_NO_OVERLAP_RANGE_CHECK=1 off; an APS5_AB switch) Port of boykopovar#9176's range check: a dispatch joins an open run only when its buffer ranges and storage images are disjoint from the run's (reads against writes, writes against writes); address-based/BDA builds and bindless image dispatches count as accessing everything. [overlap-range] counts refusals, and conflicts that joined while the switch was set. AI-assisted: yes
49625ed to
baae58f
Compare
|
Thanks for the careful pass, especially the reminder that the validation-layer comparison is part of the checklist. I hadn't run it. I've rebased onto current Validation: I ran On performance, I've split the two results. The game number stays as a feature on/off result from our own tree, and it's labelled that way. A On overlaps, @AlxcBTW @hugodearaujo @Raghav314, I don't think there's an ordering dependency in either direction. Whoever lands second adds one condition:
If any of you would rather this one went first or last, tell me and I'll rebase to match. Details
|
|
@Celegans12 no preference on order from #7920's side, and your condition is the right one. With So a dispatch that writes markers should stay out of runs, as the NV checkpoint does: |
|
@hugodearaujo thanks, that works for me. If #7920 lands first, I'll add the |
baae58f to
45c6265
Compare
|
#7920 landed, so I've added the agreed condition while rebasing onto current |
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the access-range check and the rebase; I read the full diff and found no logic defect in the conflict predicate, the deferred-barrier flushes or the exclusions. What is left is the evidence rule for perf PRs (also asked by the labels bot on 2026-10-21):
- Paste the
aps5-summary.jsonlline of a capture with the change and one withAPS5_NO_DISPATCH_OVERLAP=1(that switch records every dispatch as before, so it is a valid baseline on the same tree, title, scene and machine), and add thetools/trace_digest.pyoutput of both. The "+146 ms GPU per frame" figure in Tested should come from those two captures, attached to the PR. - Once that is in, please ask @MarcZX10 to re-review: their CHANGES_REQUESTED is on the old head 49625ed, and the merge queue does not merge over it.
Overlap notes for #7449 (!mirrorCleared) and #9508 (heap-bound ranges visible to RunAccesses) are fine as written; whichever lands second adds its condition.
…PPSA26344 world, two pairs) Same tree (085bd8f), title, scene and machine; B runs add APS5_NO_DISPATCH_OVERLAP=1. AI-assisted: yes
|
I made the two captures you asked for, and then a second pair to show the spread. All four are warm runs of PPSA26344 v1.008 on our own tree (yotei/best, 085bd8f, which carries this change; not With overlap off, GPU time per present went from 845 to 952 ms in the first pair and from 856 to 1,059 ms in the second. That's +106 and +203 ms, so the mean is +155 ms (+18 %). The PR said +146 ms, which is inside that spread, so I've updated Tested with these numbers. What's new is the frame time. The old body said presents didn't change, but on this build frames are about 12 % longer with overlap off: median 1,932/1,938 ms on against 2,177/2,158 ms off, or 5.1 against 4.6 presents per 10 s in the window. The other phases ( I've kept the window
@MarcZX10, could you take another look when you have a moment? Your review was on the old head 49625ed. Since then I've rebased onto current DetailsThe window summary lines in short (the full lines are in the digests below):
The runs also wrote Setup: README env of yotei/best ( A1, overlap on: trace_digest.pyframes 880:16 from present 880: 16 presents, frame p50 1931.8 / p90 2174.0 / p99 2187.7 / max 2187.7 ms, GPU busy 845.3 ms per present {"commit":"085bd8f20325","dirty":false,"env":{"APS5_ASYNC_LANE":"51","APS5_BINDLESS_IMAGES":"1","APS5_BINDLESS_LAZY":"1","APS5_CACHE_SPIRV_BACKING":"1","APS5_COLD_SPIRV":"1","APS5_COLD_SPIRV_FILE":"1","APS5_DEFER_REFRESH_FLUSH":"1","APS5_DUMP_FRAMES":"300","APS5_DUMP_FRAMES_EVERY":"10","APS5_INLINE_SHADER_PREPARE":"1","APS5_MEM_STATS":"10","APS5_NO_ADDRESS_DRAW_REUSE":"1","APS5_NO_DRAW_AHEAD":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESULT_MEMO":"1","APS5_PAD_SCRIPT":"100:cross,106:cross,112:cross,118:cross,124:cross,130:cross,136:cross,142:cross,148:cross,154:cross,160:cross,166:cross,172:cross,178:cross,184:cross,190:cross,196:cross,202:cross,208:cross,214:cross,220:cross,226:cross,232:cross,238:cross,244:cross,250:cross,256:cross,262:cross,268:cross,274:cross,280:cross,286:cross,292:cross,298:cross,304:cross,310:cross,316:cross,322:cross,328:cross,334:cross,340:cross,346:cross,352:cross,358:cross,364:cross,370:cross,376:cross,382:cross,388:cross,394:cross,400:cross,406:cross,412:cross,418:cross,424:cross,430:cross,436:cross,442:cross,448:cross,454:cross,460:cross,466:cross,472:cross,478:cross,484:cross,490:cross,496:cross,502:cross,508:cross,514:cross,520:cross,526:cross,532:cross,538:cross,544:cross,550:cross,556:cross,562:cross,568:cross,574:cross,580:cross","APS5_PAD_SCRIPT_REPEAT":"","APS5_PIPELINE_INDIRECT":"1","APS5_PROFILE_DRAW":"1","APS5_PROFILE_GPU":"0","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_SPANNED_WAVE":"1","APS5_STAGING_DIFF":"1","APS5_TEXTURE_OVERFLOW_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_FRAMES":"880:16","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNNORM_WRAP_GUARD":"1"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Y\u00c5\u008dtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 880:16","first_present":880,"ms":31077.601},"presents":16,"frame_ms":{"p50":1931.814,"p90":2173.967,"p99":2187.742,"max":2187.742},"gpu_busy_ms_per_present":845.322,"worker_busy_pct":{"queue worker 0x0":91.11,"queue worker 0x52":60.58,"queue worker 0x53":60.163,"queue worker 0x20":73.777,"queue worker 0x30":83.971,"queue worker 0x48":3.984,"queue worker 0x38":85.615,"queue worker 0x51":6.237,"queue worker 0x50":34.757},"top_phases_ms_per_frame":{"Driver.Packet":9712.659,"Driver.Packet.memory_wait":6865.413,"Driver.Packet.dispatch":1237.273,"DrawPipeline.commit":1193.178,"Graphics.Draw":1087.744,"Driver.Packet.draw":1043.43,"Driver.Draw":1038.498,"Driver.Dispatch":987.341},"trace_dropped":false,"trace":"aps5-trace-085bd8f20325-22740.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 9674.3, Driver.WorkerWait 7533.4, Driver.WorkerWait.idle_and_completion_poll 7101.0, Driver.Packet.memory_wait 6865.3, Driver.Packet.dispatch 1236.4, DrawPipeline.commit 1191.0, Graphics.Draw 1087.0, Driver.Packet.draw 1042.8, Driver.Draw 1037.7, Driver.Dispatch 983.5 Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
B1, `APS5_NO_DISPATCH_OVERLAP=1`: trace_digest.pyframes 880:16 from present 880: 16 presents, frame p50 2177.1 / p90 2314.3 / p99 2782.2 / max 2782.2 ms, GPU busy 951.7 ms per present {"commit":"085bd8f20325","dirty":false,"env":{"APS5_ASYNC_LANE":"51","APS5_BINDLESS_IMAGES":"1","APS5_BINDLESS_LAZY":"1","APS5_CACHE_SPIRV_BACKING":"1","APS5_COLD_SPIRV":"1","APS5_COLD_SPIRV_FILE":"1","APS5_DEFER_REFRESH_FLUSH":"1","APS5_DUMP_FRAMES":"300","APS5_DUMP_FRAMES_EVERY":"10","APS5_INLINE_SHADER_PREPARE":"1","APS5_MEM_STATS":"10","APS5_NO_ADDRESS_DRAW_REUSE":"1","APS5_NO_DISPATCH_OVERLAP":"1","APS5_NO_DRAW_AHEAD":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESULT_MEMO":"1","APS5_PAD_SCRIPT":"100:cross,106:cross,112:cross,118:cross,124:cross,130:cross,136:cross,142:cross,148:cross,154:cross,160:cross,166:cross,172:cross,178:cross,184:cross,190:cross,196:cross,202:cross,208:cross,214:cross,220:cross,226:cross,232:cross,238:cross,244:cross,250:cross,256:cross,262:cross,268:cross,274:cross,280:cross,286:cross,292:cross,298:cross,304:cross,310:cross,316:cross,322:cross,328:cross,334:cross,340:cross,346:cross,352:cross,358:cross,364:cross,370:cross,376:cross,382:cross,388:cross,394:cross,400:cross,406:cross,412:cross,418:cross,424:cross,430:cross,436:cross,442:cross,448:cross,454:cross,460:cross,466:cross,472:cross,478:cross,484:cross,490:cross,496:cross,502:cross,508:cross,514:cross,520:cross,526:cross,532:cross,538:cross,544:cross,550:cross,556:cross,562:cross,568:cross,574:cross,580:cross","APS5_PAD_SCRIPT_REPEAT":"","APS5_PIPELINE_INDIRECT":"1","APS5_PROFILE_DRAW":"1","APS5_PROFILE_GPU":"0","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_SPANNED_WAVE":"1","APS5_STAGING_DIFF":"1","APS5_TEXTURE_OVERFLOW_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_FRAMES":"880:16","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNNORM_WRAP_GUARD":"1"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Y\u00c5\u008dtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 880:16","first_present":880,"ms":35189.383},"presents":16,"frame_ms":{"p50":2177.066,"p90":2314.313,"p99":2782.24,"max":2782.24},"gpu_busy_ms_per_present":951.726,"worker_busy_pct":{"queue worker 0x0":92.277,"queue worker 0x52":62.153,"queue worker 0x53":61.687,"queue worker 0x20":73.514,"queue worker 0x30":84.621,"queue worker 0x38":86.052,"queue worker 0x48":3.417,"queue worker 0x51":5.821,"queue worker 0x50":34.244},"top_phases_ms_per_frame":{"Driver.Packet":11075.374,"Driver.Packet.memory_wait":7858.848,"DrawPipeline.commit":1396.893,"Driver.Packet.dispatch":1350.259,"Graphics.Draw":1267.176,"Driver.Packet.draw":1249.199,"Driver.Draw":1243.574,"Graphics.Draw.draw_and_resource_release":1090.075},"trace_dropped":false,"trace":"aps5-trace-085bd8f20325-21492.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 11033.3, Driver.WorkerWait 8426.8, Driver.WorkerWait.idle_and_completion_poll 7924.8, Driver.Packet.memory_wait 7858.7, DrawPipeline.commit 1394.8, Driver.Packet.dispatch 1349.9, Graphics.Draw 1266.7, Driver.Packet.draw 1248.7, Driver.Draw 1242.9, Graphics.Draw.draw_and_resource_release 1084.2 Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
A2, overlap on: trace_digest.pyframes 880:16 from present 880: 16 presents, frame p50 1937.6 / p90 2060.0 / p99 2211.2 / max 2211.2 ms, GPU busy 856.3 ms per present {"commit":"085bd8f20325","dirty":false,"env":{"APS5_ASYNC_LANE":"51","APS5_BINDLESS_IMAGES":"1","APS5_BINDLESS_LAZY":"1","APS5_CACHE_SPIRV_BACKING":"1","APS5_COLD_SPIRV":"1","APS5_COLD_SPIRV_FILE":"1","APS5_DEFER_REFRESH_FLUSH":"1","APS5_DUMP_FRAMES":"300","APS5_DUMP_FRAMES_EVERY":"10","APS5_INLINE_SHADER_PREPARE":"1","APS5_MEM_STATS":"10","APS5_NO_ADDRESS_DRAW_REUSE":"1","APS5_NO_DRAW_AHEAD":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESULT_MEMO":"1","APS5_PAD_SCRIPT":"100:cross,106:cross,112:cross,118:cross,124:cross,130:cross,136:cross,142:cross,148:cross,154:cross,160:cross,166:cross,172:cross,178:cross,184:cross,190:cross,196:cross,202:cross,208:cross,214:cross,220:cross,226:cross,232:cross,238:cross,244:cross,250:cross,256:cross,262:cross,268:cross,274:cross,280:cross,286:cross,292:cross,298:cross,304:cross,310:cross,316:cross,322:cross,328:cross,334:cross,340:cross,346:cross,352:cross,358:cross,364:cross,370:cross,376:cross,382:cross,388:cross,394:cross,400:cross,406:cross,412:cross,418:cross,424:cross,430:cross,436:cross,442:cross,448:cross,454:cross,460:cross,466:cross,472:cross,478:cross,484:cross,490:cross,496:cross,502:cross,508:cross,514:cross,520:cross,526:cross,532:cross,538:cross,544:cross,550:cross,556:cross,562:cross,568:cross,574:cross,580:cross","APS5_PAD_SCRIPT_REPEAT":"","APS5_PIPELINE_INDIRECT":"1","APS5_PROFILE_DRAW":"1","APS5_PROFILE_GPU":"0","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_SPANNED_WAVE":"1","APS5_STAGING_DIFF":"1","APS5_TEXTURE_OVERFLOW_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_FRAMES":"880:16","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNNORM_WRAP_GUARD":"1"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Y\u00c5\u008dtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 880:16","first_present":880,"ms":31385.074},"presents":16,"frame_ms":{"p50":1937.559,"p90":2060.037,"p99":2211.216,"max":2211.216},"gpu_busy_ms_per_present":856.278,"worker_busy_pct":{"queue worker 0x0":91.266,"queue worker 0x52":61.732,"queue worker 0x20":74.975,"queue worker 0x53":61.337,"queue worker 0x30":84.428,"queue worker 0x38":86.006,"queue worker 0x48":3.921,"queue worker 0x51":6.531,"queue worker 0x50":33.876},"top_phases_ms_per_frame":{"Driver.Packet":9884.848,"Driver.Packet.memory_wait":6963.016,"Driver.Packet.dispatch":1271.66,"DrawPipeline.commit":1242.586,"Graphics.Draw":1125.27,"Driver.Packet.draw":1084.085,"Driver.Draw":1079.26,"Driver.Dispatch":982.31},"trace_dropped":false,"trace":"aps5-trace-085bd8f20325-14880.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 9847.5, Driver.WorkerWait 7508.8, Driver.WorkerWait.idle_and_completion_poll 7114.3, Driver.Packet.memory_wait 6962.9, Driver.Packet.dispatch 1270.9, DrawPipeline.commit 1240.6, Graphics.Draw 1124.8, Driver.Packet.draw 1083.5, Driver.Draw 1078.5, Driver.Dispatch 978.5 Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
B2, `APS5_NO_DISPATCH_OVERLAP=1`: trace_digest.pyframes 880:16 from present 880: 16 presents, frame p50 2158.3 / p90 2471.0 / p99 2544.9 / max 2544.9 ms, GPU busy 1059.1 ms per present {"commit":"085bd8f20325","dirty":false,"env":{"APS5_ASYNC_LANE":"51","APS5_BINDLESS_IMAGES":"1","APS5_BINDLESS_LAZY":"1","APS5_CACHE_SPIRV_BACKING":"1","APS5_COLD_SPIRV":"1","APS5_COLD_SPIRV_FILE":"1","APS5_DEFER_REFRESH_FLUSH":"1","APS5_DUMP_FRAMES":"300","APS5_DUMP_FRAMES_EVERY":"10","APS5_INLINE_SHADER_PREPARE":"1","APS5_MEM_STATS":"10","APS5_NO_ADDRESS_DRAW_REUSE":"1","APS5_NO_DISPATCH_OVERLAP":"1","APS5_NO_DRAW_AHEAD":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESULT_MEMO":"1","APS5_PAD_SCRIPT":"100:cross,106:cross,112:cross,118:cross,124:cross,130:cross,136:cross,142:cross,148:cross,154:cross,160:cross,166:cross,172:cross,178:cross,184:cross,190:cross,196:cross,202:cross,208:cross,214:cross,220:cross,226:cross,232:cross,238:cross,244:cross,250:cross,256:cross,262:cross,268:cross,274:cross,280:cross,286:cross,292:cross,298:cross,304:cross,310:cross,316:cross,322:cross,328:cross,334:cross,340:cross,346:cross,352:cross,358:cross,364:cross,370:cross,376:cross,382:cross,388:cross,394:cross,400:cross,406:cross,412:cross,418:cross,424:cross,430:cross,436:cross,442:cross,448:cross,454:cross,460:cross,466:cross,472:cross,478:cross,484:cross,490:cross,496:cross,502:cross,508:cross,514:cross,520:cross,526:cross,532:cross,538:cross,544:cross,550:cross,556:cross,562:cross,568:cross,574:cross,580:cross","APS5_PAD_SCRIPT_REPEAT":"","APS5_PIPELINE_INDIRECT":"1","APS5_PROFILE_DRAW":"1","APS5_PROFILE_GPU":"0","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_SPANNED_WAVE":"1","APS5_STAGING_DIFF":"1","APS5_TEXTURE_OVERFLOW_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_FRAMES":"880:16","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNNORM_WRAP_GUARD":"1"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Y\u00c5\u008dtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 880:16","first_present":880,"ms":35180.498},"presents":16,"frame_ms":{"p50":2158.311,"p90":2470.962,"p99":2544.854,"max":2544.854},"gpu_busy_ms_per_present":1059.102,"worker_busy_pct":{"queue worker 0x0":92.738,"queue worker 0x52":61.141,"queue worker 0x53":60.719,"queue worker 0x20":73.194,"queue worker 0x30":85.392,"queue worker 0x38":87.458,"queue worker 0x48":3.821,"queue worker 0x51":6.21,"queue worker 0x50":35.085},"top_phases_ms_per_frame":{"Driver.Packet":11117.026,"Driver.Packet.memory_wait":7757.51,"Driver.Packet.dispatch":1456.715,"DrawPipeline.commit":1395.699,"Graphics.Draw":1246.875,"Driver.Packet.draw":1235.832,"Driver.Draw":1230.033,"Driver.Dispatch":1155.94},"trace_dropped":false,"trace":"aps5-trace-085bd8f20325-13716.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 11073.7, Driver.WorkerWait 8377.8, Driver.WorkerWait.idle_and_completion_poll 7872.7, Driver.Packet.memory_wait 7757.4, Driver.Packet.dispatch 1456.3, DrawPipeline.commit 1393.7, Graphics.Draw 1246.4, Driver.Packet.draw 1235.4, Driver.Draw 1229.4, Driver.Dispatch 1152.7 Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
|
|
@adriadam10 I've added myself as a co-assignee here (you stay on it). #9287 and #9289 build on this PR and have already passed review on our side, so I'd like to get this one reviewed too and keep both moving. If you'd rather keep it to yourself, just say so and I'll step back. |
|
@adriadam10 I've added |
|
@adriadam10 could you take another look at your performance-evidence request? @Celegans12 posted the captures with the same tree and overlap off as the baseline, as you suggested (#9176 (comment)), plus the menu main/change summaries (#9176 (comment)), on |
45c6265 to
ed7f07c
Compare
|
RADV rerun on the current head Setup: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31, Mesa 26.2.5), Release,
|
|
Independent Linux/NVIDIA check.
Scene check, not a counterexample: Demon's Souls (tutorial), 1920x1080, warm shader cache, same pad script, 180 s runs, with overlap on versus |
|
An AMD RDNA 4 run on Windows of Windows 11 Pro 10.0.22631, AMD Radeon RX 9070 XT (
AI-assisted: yes (Claude Code) |
ed7f07c to
0bf3f6f
Compare
|
I rebased the dispatch-overlap stack onto The focused Windows/NVIDIA pass is 7/7, including overlap on/off; the five shared controls also pass on main. VVL was inserted, shader caches were disabled, and neither side emitted a VUID. I also added the contributor AMD/NVIDIA reports to the body, explicitly tied to the previous head. The earlier Linux and title measurements remain historical evidence; I did not rerun the game. The shared baseline used main's exact runtime sources with only an unrelated test fixture added. The dependency order remains #9176 → #9287 → #9289. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (2, not counted against this PR)Validated but not compared (2, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 424 tests)Skipped (42)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. |
… side Every dispatch records a barrier before and after itself, and on NVIDIA any barrier between two dispatches drains the GPU. A dispatch of a compute ring (queue != 0) with only SET_SH_REG and plain NOPs between it and the ring's previous dispatch in the same submission may join that dispatch's run: it records no leading barrier, and the run's trailing barrier is deferred until any other command records it. It joins only when its buffer ranges and storage images are disjoint from the run's (reads against writes, writes against writes); an address-based or BDA build counts as accessing everything, and a run never takes the same resources object twice. A dispatch that records GPU checkpoints (NV checkpoints or AMD buffer markers) never joins. APS5_NO_DISPATCH_OVERLAP=1 turns it off. AI-assisted: yes
0bf3f6f to
80ff401
Compare
✅ 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 (5 IDs in 481 tests)Skipped (45)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. |
|
@adriadam10 @MarcZX10 could you each take another look? Both CHANGES_REQUESTED reviews are on old heads ( What was asked and where it is now:
If anything is still missing, please say what, and we'll get it done. |
bfd8b8c
…_NO_OVERLAP_RANGE_CHECK=1 off; an APS5_AB switch) Port of boykopovar#9176's range check: a dispatch joins an open run only when its buffer ranges and storage images are disjoint from the run's (reads against writes, writes against writes); address-based/BDA builds and bindless image dispatches count as accessing everything. [overlap-range] counts refusals, and conflicts that joined while the switch was set. AI-assisted: yes
…step 1) Step 1 of plan-1111c-converge (D:\PS5\status\plan-1111c-converge.md): main 1c8c0ef merged into slice 1 (cc72bbc) under the decided dispositions (D:\PS5\status\rebase\conv-dispositions.md): R2a keeps the fork's path and adds main's missing lines, R2b keeps both behind their own switches with no default change, R2c takes main only for the marked rows (compute scratch pool a46f050/boykopovar#12764, boykopovar#10228, boykopovar#10382 read-only expression, boykopovar#6867 where present). Resolver logs, one per group, with every hunk, rule and drop: - conv1-log-A.md: Texture.*, DepthSurface.* (HTILE GPU expansion R2a with main's recorder/device keys, Texture ctor order depthCompare, hostMemory, layerRows, clear) - conv1-log-B.md: ShaderResources, GuestBufferMemory, Recorder (fork overlap and lane signatures, STAGING_DIFF beside main's changed copy-back, fork host import budget kept, main's default 4 GiB reserve dropped) - conv1-log-C.md: Graphics Draw, Execution/** (scratch pool R2c, shape memo on the fork's committer pipeline, DrawTail sites on the fork's locals) - conv1-log-D1.md: core/shader (request wire version and FormatVersion 153, spec id 57728 for the unnormalized wrap guard, main's masked result memo not ported: E1 accepted drop) - conv1-log-D2.md: tests, CMake fragments, docs, libc, other libs, and the four escalations: mesh window descriptor set moved to 4 (fork's bindless heap keeps 3), BDA fault buffer = main's shared slot arena carrying the fork's counters, profiling and range index, BufferPool tests ported onto the fork's MockDevice, fork HostImportBudget expectations. All logs are under D:\PS5\status\rebase\. First-build fixes folded in (the merge did not compile without them): duplicate declarations or definitions left by the auto-merge (main's dispatch overlap block and PendingLeaseSerial in Recorder.cpp, main's overlap locals in VulkanDevice.cpp, RunAccesses, HasGpuCopies/MemoryOwner, ZeroFetchSlack, supplied, main38, main's MatchHtileBufferMaskClear twin and its test, CheckRepeatedNeighbourStores), braces and a split string literal (Texture.cpp, GuestBufferMemory.cpp, Dispatch.cpp), the fork's run copy-back path kept over main's afterRunSelf (R2a, boykopovar#9176 row), main's formatTable restored for genericFormattedStore, DeviceProcLookups restored, SharedCode API in fork callers, fork names in main tests (StorageImageTable, Enqueue prepare slot), test stubs and GpuWindowSampler sources for main's new test targets. The blend-path exclusivity (D1 E2) follows as its own commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Compute-ring dispatches separated only by SET_SH_REG/NOP share a run when their buffer/image accesses are disjoint. Queue 0 and unsupported dispatch kinds stay ordered; unknown/BDA accesses conflict with everything and a resource owner cannot join twice.
APS5_NO_DISPATCH_OVERLAP=1restores separate dispatches.#7449 mirror clears must remain outside runs; #9508 heap buffers must remain visible to the access checks.
Tested
Windows 11, MinGW-w64 GCC 15.2.0, Release,
-DBUILD_TESTING=ON, SPIR-V Tools off; based onmaina043b04.80ff4017eedd:agc_driver_dispatch_overlap/agc_driver_dispatch_overlap_off, 2/2 NVIDIA and 2/2 Windows lavapipe, once each. Build/registration pass; Vulkan required, cache off, Khronos 1.4.363 loaded, no skips/VUIDs/sync diagnostics; 30 s local limit.Historical Yōtei 1.008 title-menu counters (2026-10-24) omit CPU and other worker/phase fields: full baseline, full change. They do not establish an FPS gain.
Not tested in this carry: Linux, macOS, titles/FPS or console behavior. Earlier negative controls are historical.
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)Historical summary excerpts; all retained values unchanged
{"commit":"a5a2c946a3a9","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":11388.409},"presents":60,"frame_ms":{"p50":132.237,"p90":378.788,"p99":2488.458,"max":2488.458},"gpu_busy_ms_per_present":76.739,"trace_dropped":false,"trace":"aps5-trace-a5a2c946a3a9-16452.json.gz","worker_busy_pct":{"queue worker 0x0":61.336},"top_phases_ms_per_frame":{"Driver.Packet":363.867}} {"commit":"a147cc357739","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":12217.213},"presents":60,"frame_ms":{"p50":132.067,"p90":416.048,"p99":2879.104,"max":2879.104},"gpu_busy_ms_per_present":81.511,"trace_dropped":false,"trace":"aps5-trace-a147cc357739-23988.json.gz","worker_busy_pct":{"queue worker 0x0":57.048},"top_phases_ms_per_frame":{"Driver.Packet":360.996}}