fix(agc): include draw committer work in CPU traces #6341
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6341"
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 JJenkx on 2026-10-15T12:22:34Z.
What
The pipelined draw committer does not call
PerformanceTrace::BindThreadon main. Its existing timed scopes therefore disappear from CPU traces and phase totals even when the summary saystrace_dropped: false.Register the thread once as
draw committer. Tracing-disabled execution gets no event buffer; draw scheduling and renderer policy are unchanged. This is a profiling correction, with no FPS or title compatibility claim. It does not establish complete coverage of other background threads.One linear topic commit rebased onto main
84c1a4d9a26429cb483ec963195cff8ef25d128b:4de8f7a41c19b2736da31a978a957bcd47e08725. The additive CMake conflict retains main's storage-file-write timeout and suspend-drain setting alongside this PR's trace tests. Main's handoff-spin implementation is retained. Independent of #6188.Tested
Rebase validation on main
84c1a4d9a2: Release with bundled dependencies buildslibs,agc_driver_draw_pipeline_trace_tests, andagc_performance_trace_tests. All three focused CTest cases pass without skips (0.06 seconds). The local validated commitb03061dcc6and public head4de8f7a41chave the identical Git tree7073af7897ccb32275f6e3a0d80d5815650afa58. Conventions and whitespace checks pass. Native evidence below remains from the earlier source pins; this rebase is not a new title-performance measurement.Arch Linux 7.2.9-arch1-1, GCC 16.2.1 Release, Ryzen 9 7950X. Full
libs,agc_driver_draw_pipeline_trace_testsandagc_performance_trace_testsbuild. The published SPIRV-Tools revision7f2d9ee926f98fc77a3ed1e1e0f113b8c9c49458is clean; bundled dependencies are enabled, with no private dependency changes.agc_driver_draw_pipeline_trace,agc_driver_draw_pipeline_trace_disabled,agc_performance_trace: 3/3 pass, no skips, 0.05 seconds. The real DrawPipeline fixture verifies slices and accumulated totals; the separate unconfigured process checks that no committer trace buffer exists.draw committer CPU spans are absent from the trace. A current-main native trace independently confirms that the track is absent without this topic.Native trace visibility
Override 2: Super Mech League PPSA01907, v01.007.000, main menu with no input. RX 6650 XT / RADV Mesa 26.2.4-arch1.1, 1920x1080 guest output, 3072x1728 window. This earlier full runtime uses main
4524944396dfe91bd7c6949a3d7ac01935a2b840plus topic9f45b3b24816f26ddff8930c13fe1e9f6556c220. The populated shader and pipeline caches are retained.APS5_TRACE_SECONDS=60:10, documented buffer capacityAPS5_TRACE_EVENTS=4194304, no additional diagnostic feature switch or log redirection; no builds, tests or debugger sampling during capture.The completed capture has 498 presents,
trace_dropped: false, and adraw committertrack containing 46,111Graphics.Draw, 6,812Recorder.Submitand 496Recorder.Syncslices. The digest accounts for about 10.2 ms of committer busy work per present in this capture. The run closes normally after 93.23 seconds and restores the temporary udmabuf limit. The title renders its UI but its 3D scene is very dark; this is trace-visibility evidence, not visual-correctness or full-playability evidence.Validation, trace and digest:
committer-main452-validation-public.json,committer-main452.trace.json.gz,committer-main452-trace-digest.txt. The separate main-onlymain452-pipelined.trace.json.gzalso has no dropped events but lacks the committer track. It records a different scene/window and is not used for a speed comparison. Timing-only traces contain no guest code or memory.Independent validation
EdouardSence tested Astro Bot PPSA21567 on Linux / RX 9070 XT, RADV Mesa 26.2.4, main
eb901bcf4plus this topic (be83ad3eb). Their trace contains the committer'sGraphics.Draw/Recorder.Submitscopes and reports the thread intrace_dropped_threadswhen its buffer fills. Their older-baseline comparison supports visibility, not a speedup. The original investigation is in Astro bring-up; earlier traces cannot gain the missing spans retroactively.Amoenus independently validated the exact current topic head on Windows, in composition
29318982baon main376c040294: full relinker/library build and all three focused groups pass three fresh processes each. Removing only the committer registration makes the enabled-trace test fail 3/3; restoring the source restores all passes. These fixtures create no Vulkan device. The updated report also records a completed RTX 5080 Sonic title replay in compositione4fccf25feincorporating main05171bc66b, reaching menus and changing nighttime story cinematics. That replay uses periodic summaries only, so it does not establish a separate draw-committer event lane or title speedup. An explicit full event-window capture remains the Windows title visibility check;worker_busy_pctintentionally lists only queue-worker threads.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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:30:05Z.
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/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cppL134core/libs/prx/libSceAgcDriver/CMakeLists.txtL1865Some 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/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cppImported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-16T12:43:03Z.
Checked on a title, Linux / RX 9070 XT (RADV Mesa 26.2.4). The build was
maineb901bcf4with this PR merged (be83ad3eb), and the scene was Astro Bot PPSA21567-lvl hub_crashsitewithAPS5_TRACE_SECONDS=60:60.With this PR, the trace has a
draw committerthread.trace_digest.pyreports it at 19.4 ms per frame inside slices, mostlyGraphics.Draw16.0 andRecorder.Submit3.2, and it shows up intrace_dropped_threadsonce its buffer fills (16.2 s into the window). Frame times stayed the same as on a slightly oldermain(aff725bf6) without it (p50 124.4 ms here vs 123.8 and 126.2 ms in two runs there), as the description says.Numbers and context: https://github.com/boykopovar/AnyPS5/discussions/357#discussioncomment-18973709
Tested and written by Claude (AI assistant) on a contributor's machine. AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-16T22:19:18Z.
Additional native title coverage for the committer trace binding: Override 2 PPSA01907 01.007.000, animated main menu, 1920x1080, RX 6650 XT / RADV Mesa 26.2.4 / Linux 7.2.9. Clean integration 46458ceb4584 on main
e9a3343a2includes this PR plus the declared #6959/#6934/#6913/#862/#6781 title fixes; it is not an isolated performance comparison.Warm shader/driver caches, no validation or RenderDoc mapped, stdout and stderr verified /dev/pts/1, only APS5_TRACE_SECONDS=100:45 as the trace switch, no input during capture. The completed window has 1,996 presents: p50 22.361 ms, p90 25.318 ms, p99 28.577 ms; GPU busy 18.181 ms/present. The draw committer is present in the trace, and the complete scope totals include Graphics.Draw at 11.771 ms/present. No speedup is claimed for this instrumentation change.
Detailed events overflowed after 8.342 s on queue worker 0 and 16.451 s on the committer; both report totals_full=false. Their summary scope totals are complete, but digest values reconstructed from the truncated timelines are not whole-window CPU averages. The native run closed normally at 243.23 s / exit 0 and restored its temporary kernel limit.
Source, trace, summary line, digest, protocol and limits.
AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-18T19:20:58Z.
Independent Windows validation of head
683673a8246422d1e6e1a1b272421fe14adfc679.I merged the exact PR head, retaining its authorship, into our Sonic bring-up composition on main
376c040294370ce7de355485947d5d00a9417e29: tested composition29318982ba, validation branch. The delta from its pre-PR parent is exactly this PR's three files / 62 added lines. This is validation of a composition, not a pristine PR-head build.Windows 11 Enterprise 26200, WinLibs GCC 15.2.0 Release:
agc_driver_draw_pipeline_trace,agc_driver_draw_pipeline_trace_disabledandagc_performance_traceeach pass three fresh processes. Slowest selected execution was 0.07 s; no skips or timeouts.PerformanceTrace::BindThread("draw committer")and rebuilding makes the enabled-trace test fail 3/3 withdraw committer CPU spans are absent from the trace. The disabled-trace and existing performance-trace groups still pass three runs each.c4c2b3aa73.Reproduction commands for the positive/restored groups:
These checks exercise the real draw-committer queue and trace collection without creating a Vulkan device: they confirm its name, nonempty slices/totals and disabled-trace behavior. No physical-GPU execution or title speedup is claimed for these tests.
Title event-trace confirmation — 2026-10-19
The promised ordinary Sonic PPSA99902 check now confirms this visibility on composed fork
7ce7fa53f3, incorporating main0c25997a5aand the now-merged #6341. Matching full Windows relinker/library and affected fixture builds pass; the game retains its original converted executable and unchanged original inputs/configuration.An explicit
APS5_TRACE_SECONDS=120:10,APS5_TRACE_EVENTS=1048576window closed normally: 134 presents over 10,115.031 ms,dirty=false,trace_dropped=false, and notrace buffer fullmarker.The full Chrome trace contains a separate
draw committertrack, tracetid=2, distinct from queue workertid=1and presentertid=3. These are trace track IDs, not native Windows thread IDs. It holds 56,989 complete CPU slices, including:Graphics.Draw: 17,420Graphics.Draw.draw_and_resource_release: 17,420Resources.Prepare: 14,037Resources.Complete: 6,293Recorder.Submit: 1,157Recorder.Reap: 404The remaining slices are validation and label-lock scopes. Actual device: RTX 5080 / NVIDIA 610.62 (32.0.16.1062), Windows 11 Enterprise 26200; Khronos 1.4.363 insertion verified from loader output. The normal system implicit layers also loaded. The game reached its title menu and accepted ordinary Start/Cross input; the longer observation remains in progress.
Trace retained as
aps5-trace-7ce7fa53f32e-70852.json.gz, SHA-256decc014ac74517f0c452fc7f572c3e97ba015e7870fca8d6bbd167da14a865da. The 1,053,662-byte compressed file and parsed verification receipt are preserved locally.This closes the separate event-lane visibility check. It is not a title speedup, steady-gameplay benchmark, full-playability result, or explanation of the earlier guest fence/watchdog messages.
worker_busy_pctstill intentionally lists queue workers only; the full event track is the relevant evidence here. The earlier CPU tests/controls above keep their original pins.Earlier title observations and the previously pending check
Our completed Sonic PPSA99902 diagnostic at pre-PR integration
0e7fba38b5has queue-worker/presenter/GPU tracks but no draw-committer track. The completed title run reaches initial gameplay, movement and 7 rings; pinned title result and limits. The diagnostic600:10trace window captured loading, not that gameplay scene, and is not a performance benchmark. A separate RTX 5080 title replay including the credited PR head is now complete at integratione4fccf25fe, incorporating main05171bc66b: menus and changing nighttime story cinematics within a configured 3,600-second observation, with runtime/archive restoration independently verified. Completed title evidence and diagnostic limits.That replay used periodic summaries only, so it does not yet provide a separate draw-committer event lane. Source inspection confirms
worker_busy_pctdeliberately lists only names beginningqueue worker, while phase totals aggregate all registered threads. An absent committer percentage is therefore expected schema, not evidence that this patch failed. A title run with an explicit full event window remains the next visibility check; no title speedup or underlying fence-failure cause is claimed. Existing Linux/title evidence above retains its own pins.AI-assisted validation/reporting: yes, Codex; author responsible.