Skip to content

fix(agc): identify programs in slow dispatch summaries - #23484

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
JJenkx:fix/agc-slow-dispatch-program-address-20261119
Nov 27, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
JJenkx:fix/agc-slow-dispatch-program-address-20261119

Conversation

@JJenkx

@JJenkx JJenkx commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

What

Include the guest program address in the existing APS5_PROFILE_DRAW slow-dispatch completion summary. A phase already prints the address when that phase exceeds one second, but a dispatch spending 100–1000 ms in resource upload only prints its group dimensions and SPIR-V word count. Repeated dispatches therefore cannot reliably be linked to the matching shader_<address>.req dump.

This adds program=0x... to the existing summary using the address already held by DispatchTimer. The 100 ms threshold, phase accounting and synchronization behavior are unchanged. No performance improvement is claimed.

Overlap: the required branch scan inspected 2,002 open PRs and flagged 47 conflicting shared-file branches for manual review. Their exact source patches were compared; none changes this completion-summary attribution. The related hunks concern compute-pipeline creation. #16753 was also checked: its bookkeeping changes leave this summary without an address. No implementation from another PR is included.

Tested

Pinned main 1040e183a758 versus change 8d8bf554bdf1, same Linux machine and AMD Radeon RX 6650 XT (RADV Mesa 26.2.7, Linux 7.2.14-arch1-1), Khronos validation 1.4.363.

  • Full SDK builds for both pins; frozen native and raw AGC modules verified against their source markers and hashes.
  • Identical seven-case focused gate: main 7/7 passed; change 7/7 passed; zero skipped and zero VUID errors. Five GPU test families produce six validation-layer insertions per arm; two shader-request/tool checks are CPU-only. Logs confirm the physical GPU and layer insertion without missing-layer warnings.
  • Both arms deliberately use the same copied-writer label-order fixture from test(agc): force a copied allocation in label ordering checks #23479 (4349fe5f2605), which forces a real copied allocation on this GPU. It links against each arm's own AGC SDK; public-header compatibility and binary hashes checked. This is supplemental test setup, not a production dependency. Other fixtures use their respective arm's frozen build.
  • Environment: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer; complete CTest registrations, linkage and verbose logs are attached.
  • Conventions pass; a merge-tree check against newer main e20e467101ca is clean.

A bounded Mortal Shell II (PPSA34008, discussion #8844) diagnostic completed in 242.6 s with exit 0. The new summary linked 103 slow dispatches across five program addresses to private captured requests; the most frequent program had 60 slow calls and upload phases up to 809.63 ms. Shared assets, normalized inputs, SDK bank and kernel setting remained unchanged; mounts were removed and no native process remained. Reviewed window captures are nearly black, with a skip prompt first and a faint menu later; gameplay/rendering correctness is not established. Request dumping and profiling alter timing, so this run is not a performance comparison.

Patch, complete focused-test logs, exact CTest registrations, source/binary provenance and selected native profiler lines, SHA-256 3ea9dd66c563c72577704ad670946a6a65ba2f06e32b2995e097abf8d2352570. Downloaded archive and all 30 payload hashes verified. Game code, shader requests, SPIR-V and full title logs remain private.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.7, Linux 7.2.14-arch1-1
  • AI-assisted: yes

@github-actions github-actions Bot added the agc libSceAgc* label Nov 19, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 1395 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4847 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7643 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9289 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10652 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11435 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11436 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12944 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 15343 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 15548 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 16571 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 16831 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 16953 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 17056 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 18082 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 18173 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 19557 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20030 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20111 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20172 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20248 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20315 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20519 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21059 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21211 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21238 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22001 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22071 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22190 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22424 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22531 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22647 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22692 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 23244 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 24661 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 25010 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 26165 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 26613 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The changed summary uses the program address already stored by DispatchTimer, and the inspected call paths pass that timer the dispatch’s address.

What I ran

Reviewed head 8d8bf554bdf11768365a8e19823f902f586d24a2 using repo_read.py to inspect the prepared diff and targeted source lines. No tests or builds were run. The changed source file was read only in the relevant range; its full text was excluded because it is too large for the review folder.

Results

Check Result Note
Diff and description passed One changed line
Targeted source review passed Address field and dispatch timer call paths inspected
Build and tests not run No independent run performed

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full VulkanDevice.cpp file and the author-reported builds, focused tests, GPU run, and merge-tree check were not independently verified. No other files were changed.

To get this to a good state

Nothing is required.

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head 8d8bf554bd, applied with git apply on main fd4aeed483 together with the other 29 PRs of one batch (#17478, #21223, #24030, #24201, #14202, #18889, #19531, #21641, #21773, #22468, #22471, #23239, #23255, #23869, #23992, #24311, #18425, #21195, #21255, #22989, #23507, #23886, #14582, #17878, #19666, #19899, #20138, #21656, #21746). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
none: no test of its own in this PR - -

Whole batch: the full ctest -j 12 (6522 tests) on the RTX 3080 has 4 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. The 2125 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants