Skip to content

perf(agc): read APS5_NO_QUEUED_DRAW_READ_ORDER once in the held-read check - #9490

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
JJenkx:windows/held-reads-env-once
Oct 29, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
JJenkx:windows/held-reads-env-once

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

DrawPipeline::HeldReads looked up APS5_NO_QUEUED_DRAW_READ_ORDER for each nonempty range query. It now caches whether the option is present once per process, as WaitMemory.cpp already does for this option. The range checks and queued-read ordering remain intact.

Independent Windows profiles in the earlier comments identify repeated getenv calls in this hot path. They motivate the change; they are not a new before/after frame-rate result.

Tested

Refreshed as 29b6cc46afed2d6dadc6191986cb07ac6693eae1, one commit directly on main e7e3e9c1984c293f06bff08428b8c89b7b932ac2, with no merge commits. The complete source file equals current main plus the original two-line lookup change.

Fresh Linux qualification on AMD Radeon RX 6650 XT (RADV NAVI23), stock Mesa26.2.4, Arch Linux7.2.9, GCC/Release:

  • Coherent libs, relinker and focused test builds pass for main and the change.
  • The same26 focused queued-read, pipelined draw/dispatch, texture-flush, prepared-graphics and shutdown groups each pass three repeats on each arm: 156 successful invocations.
  • 17 groups per arm create physical Vulkan instances, with loader-confirmed VK_LAYER_KHRONOS_validation insertion. The other9 are no-device regression paths. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and the requested layer are set for both arms; Mesa's shader cache is disabled.
  • Zero VUID errors, missing-layer warnings, skipped or not-run tests in either arm. Conventions and whitespace checks pass.

The earlier dirty-head trace pair remains excluded. The clean native pair below provides distinct-commit summaries/traces and digests, with no Linux speedup claim.

Download exact-head Linux builds, per-group logs/JUnit, source pins and reviewed patch. SHA-256 047c4840394a85c94ceeaf063fd0aa118c842802a37909c4f96755adf5fdb5cb.

Clean native performance capture

Afterdream PPSA18391, content02.000.000, opening dialogue held after the same scripted Cross presses at20/45/70s. Same Linux machine/session, RX6650XT/RADV, 3840x2160 guest output in the same1536x864 window on DP-2. Both windows were inactive in all10 focus samples during the80-100s capture. Both scenes were run before capture to warm their private caches and restarted with empty private writable state. Converted app/module bytes are identical between arms; only current built libraries differ. Game logs stayed attached to a terminal. Only APS5_TRACE_SECONDS=80:20 and trace capacity were enabled, with no diagnostic GPU dumps/profiling and no concurrent builds.

Distinct clean commits: main e7e3e9c1984c293f06bff08428b8c89b7b932ac2 and PR 29b6cc46afed2d6dadc6191986cb07ac6693eae1. Both exit normally, restore configuration and report zero dropped trace events. The scene remains capped at about60FPS: p50 16.683ms on both arms, p99 16.705ms main /16.716ms change. This single pair shows no Linux FPS benefit. Estimated other-host CPU load averaged15.94% main /11.49% change, so it is not evidence of a CPU-cost improvement either. The independent Windows profiles above remain separate supporting evidence; our Windows host is user-paused.

Summary lines, main then change:

{"commit":"e7e3e9c1984c","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"80:20"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA18391","title":"Afterdream","content_version":"02.000.000","resolution":"3840x2160","window":{"spec":"seconds 80:20","first_present":4727,"ms":20003.310},"presents":1199,"frame_ms":{"p50":16.683,"p90":16.691,"p99":16.705,"max":16.743},"gpu_busy_ms_per_present":10.322,"worker_busy_pct":{"queue worker 0x0":98.894},"top_phases_ms_per_frame":{"VideoOut.Flip":16.641,"Driver.Packet":16.453,"VideoOut.Flip.vblank_wait":15.751,"Driver.Packet.rendering_wait":10.538,"Driver.Packet.draw":3.837,"Driver.Draw":3.807,"Graphics.Draw":3.401,"Graphics.Draw.draw_and_resource_release":2.915},"trace_dropped":false,"trace":"aps5-trace-e7e3e9c1984c-2104047.json.gz"}
{"commit":"29b6cc46afed","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"80:20"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA18391","title":"Afterdream","content_version":"02.000.000","resolution":"3840x2160","window":{"spec":"seconds 80:20","first_present":4759,"ms":20003.318},"presents":1199,"frame_ms":{"p50":16.683,"p90":16.690,"p99":16.716,"max":16.738},"gpu_busy_ms_per_present":10.589,"worker_busy_pct":{"queue worker 0x0":98.939},"top_phases_ms_per_frame":{"VideoOut.Flip":16.639,"Driver.Packet":16.461,"VideoOut.Flip.vblank_wait":16.031,"Driver.Packet.rendering_wait":11.181,"Driver.Packet.draw":3.414,"Driver.Draw":3.388,"Graphics.Draw":3.101,"Graphics.Draw.draw_and_resource_release":2.684},"trace_dropped":false,"trace":"aps5-trace-29b6cc46afed-2140796.json.gz"}

Both clean traces, full tools/trace_digest.py outputs, native reports, source pins and harness, SHA-256 21635a6ab0611b7f58c6caa5e8954fe1393871b2523740f82c0e4f802c9de66c.

Digest excerpts, main then change (full output in the archive):

**seconds 80:20** from present 4727: 1199 presents, frame p50 16.7 / p90 16.7 / p99 16.7 / max 16.7 ms, GPU busy 10.3 ms per present
AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit e7e3e9c1984c, dropped: no

```json
{"commit":"e7e3e9c1984c","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"80:20"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA18391","title":"Afterdream","content_version":"02.000.000","resolution":"3840x2160","window":{"spec":"seconds 80:20","first_present":4727,"ms":20003.31},"presents":1199,"frame_ms":{"p50":16.683,"p90":16.691,"p99":16.705,"max":16.743},"gpu_busy_ms_per_present":10.322,"worker_busy_pct":{"queue worker 0x0":98.894},"top_phases_ms_per_frame":{"VideoOut.Flip":16.641,"Driver.Packet":16.453,"VideoOut.Flip.vblank_wait":15.751,"Driver.Packet.rendering_wait":10.538,"Driver.Packet.draw":3.837,"Driver.Draw":3.807,"Graphics.Draw":3.401,"Graphics.Draw.draw_and_resource_release":2.915},"trace_dropped":false,"trace":"aps5-trace-e7e3e9c1984c-2104047.json.gz"}

seconds 80:20 from present 4759: 1199 presents, frame p50 16.7 / p90 16.7 / p99 16.7 / max 16.7 ms, GPU busy 10.6 ms per present
AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 29b6cc4, dropped: no

{"commit":"29b6cc46afed","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"80:20"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA18391","title":"Afterdream","content_version":"02.000.000","resolution":"3840x2160","window":{"spec":"seconds 80:20","first_present":4759,"ms":20003.318},"presents":1199,"frame_ms":{"p50":16.683,"p90":16.69,"p99":16.716,"max":16.738},"gpu_busy_ms_per_present":10.589,"worker_busy_pct":{"queue worker 0x0":98.939},"top_phases_ms_per_frame":{"VideoOut.Flip":16.639,"Driver.Packet":16.461,"VideoOut.Flip.vblank_wait":16.031,"Driver.Packet.rendering_wait":11.181,"Driver.Packet.draw":3.414,"Driver.Draw":3.388,"Graphics.Draw":3.101,"Graphics.Draw.draw_and_resource_release":2.684},"trace_dropped":false,"trace":"aps5-trace-29b6cc46afed-2140796.json.gz"}

### Checklist
- [x] Based on current `main`; no other open PR implements the same functions
- [x] One topic per PR; follow-ups go in a new PR
- [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md)
- [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file
- [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR)
- [x] New third-party code is a submodule built from source
- [x] Generic behaviour, not specific to one title
- [x] Depends on: none
- [x] Fixes: none
- [x] Unblocks: none
- [x] GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.4, Arch Linux 7.2.9 (fresh main/change tests); older Windows results remain in prior comments.
- [x] AI-assisted: yes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@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.

The report has useful comparative timing measurements, but it does not yet meet the repository-required evidence for a speed claim. CONTRIBUTING.md requires the aps5-summary.jsonl summary lines from main and the change for the same title, scene, and machine, with both traces attached and the output of tools/trace_digest.py. The PR explicitly says it has no trace pair or digest yet, and the automated report check requested those artifacts. Please add the required summaries, traces, and digest before this performance change is considered ready.

@github-actions

github-actions Bot commented Oct 21, 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 6188 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
PR 9898 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp

@github-actions github-actions Bot removed the perf numbers missing perf pull request without a before and after summary line label Oct 22, 2026
@JJenkx

JJenkx commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Thanks, added to the description:

@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.

The new report is much more complete: it includes same-machine Spirit of the Island traces, digests and multiple comparison pairs. Two repository-required checks are still missing. First, the shown main/change trace heads both identify 0c6a5bd59 as dirty; CONTRIBUTING.md requires valid summary lines with different commits, and the automated perf numbers missing label depends on that pair. Please capture main and this committed change from the same scene and machine with distinct commit IDs, and ensure the traces correspond to those summaries. Second, this modifies the AGC driver, so please add the same focused Vulkan tests on main and this change with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation on the same GPU, confirm the layer loaded in both logs, and compare for new VUID- lines. No local tests were run here; hosted product/relinker jobs are skipped.

@MarcZX10

Copy link
Copy Markdown
Contributor

The submitted trace archive and digest are useful. One detail blocks the required performance evidence: the displayed digest heads for both arms report commit 0c6a5bd59 (dirty), so they do not identify distinct main/change commits. Please attach a pair captured from distinct commits after the change is committed. Please also add the AGC main/change focused Vulkan validation-layer comparison described in CONTRIBUTING.md; the current report does not include those logs or layer/VUID checks.

@JJenkx
JJenkx force-pushed the windows/held-reads-env-once branch from 5c0e20e to cfca4e5 Compare October 22, 2026 05:42
@github-actions github-actions Bot added the agc libSceAgc* label Oct 22, 2026
@SoRadGaming

Copy link
Copy Markdown
Contributor

Another data point for this change, from ASTRO BOT (PPSA21564) in the Crash Site hub. Here the per-call getenv costs more than the 7.3 % above.

Setup

  • Windows 11, Ryzen 7 5800X3D, RX 9070 XT, Adrenalin 26.8.1, WinLibs GCC 15.2 Release.
  • Tree: main 4777cac plus local experiments (all switches identical in both arms), so this is not plain main.
  • Both arms use the same build; only libSceAgcDriver.prx differs. One is built with HeldReads as on main (per-call getenv). The other reads the variable once into a static, the same change as this PR.
  • 3 interleaved rounds on an idle PC (other processes 7-9 % CPU). Each run is 90 s from hub entry; hold is the steady part after the first 25 s.

Before profile: with the per-call version, a steady-state APS5_SAMPLE_COMMITTER window put 16.3 % of the draw committer's samples in DrawPipeline::HeldReads, 14.8 % of them in ucrtbase under it. Its callers were StorageTexture::FlushPending from InPlaceDrawInput, CachedStorageSurface's refresh and cachedTexture's revalidation.

Results: per-commit times come from the driver's own committer timer (mean of the last three 10 s windows).

per-call getenv (main) read once (this PR)
hub hold FPS 10.44 / 10.50 / 10.55 (mean 10.50) 11.68 / 11.61 / 11.74 (mean 11.68, +11.2 %)
whole run FPS 9.59 / 9.85 / 10.10 10.86 / 11.16 / 11.20 (+12.4 %)
hold 1 % low FPS 8.85 / 9.13 / 9.08 10.33 / 10.32 / 10.56
draw committer, µs per commit 25.8 / 25.4 / 25.2 21.9 / 22.1 / 21.8
commits per 10 s ~335k ~372k

@JJenkx

JJenkx commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@SoRadGaming thank you. A second title, a different GPU and a committer profile pinning the time on getenv under DrawPipeline::HeldReads make this much stronger than my single scene. I've linked your measurement from the description, noting that it's your data on a tree with local experiments in both arms, not plain main.

@tibzejoker

Copy link
Copy Markdown
Contributor

A third title: GTA V (PPSA04264), open world from a resumed save. Windows 11, RTX 4090 616.92, i9-13900K, WinLibs GCC 15.2 Release.

Tree: main 3bbd232 + #9730 + #9181 + #9159 (GTA needs these to run today) + #9445 + #9421, with APS5_MIMALLOC=1. I took an APS5_SAMPLE_COMMITTER profile of about 5 minutes of open world (the snapshot at Story start subtracted) and symbolized it with addr2line -i. The committer was 84 % busy.

GTA's share is lower than Spirit of the Island (7.3 %) and ASTRO BOT. It is the same cost on a third title and a different CPU vendor, and a static read removes it.

AI-assisted: yes (Claude Code)

@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @tibzejoker. A third title on a different CPU vendor and GPU, with the cost in the same getenv path, is what the per-draw read needed beyond the two profiles I had.

On my side, the Windows validation-layer run on head 89e66ea537 is clean: main and this PR both pass 26/26 in 3 of 3 runs, with 0 VUID. The matched main/PR official trace pair on PPSA13934 is still pending. Its six arms aborted at startup because this machine's display was off, so I have no FPS claim to add yet. I'll post the pair when it reruns.

@adriadam10 adriadam10 self-assigned this Oct 23, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The change itself looks right: APS5_NO_QUEUED_DRAW_READ_ORDER is read once into a static in HeldReads, as WaitMemory.cpp already does, and the cost is confirmed by three independent profiles. The merge queue refused it only because @MarcZX10's CHANGES_REQUESTED is still open, and an approval from us doesn't clear another reviewer's request. Two things are left, as he asked:

  • A main/change trace pair from distinct, non-dirty commits (aps5-summary.jsonl lines and trace_digest.py output, same title, scene and machine), captured after the change is committed. The pair in the description reports 0c6a5bd59 (dirty) for both arms, and the one you said was pending on 2026-10-23 isn't posted yet.
  • The focused AGC validation comparison on the current head cfca4e5d4a: the 26/26 and 0 VUID you posted is for 89e66ea537. Please post the logs for both arms showing the validation layer loaded (no was not found but was requested by env var VK_INSTANCE_LAYERS), and the VUID- comparison.

Once both are in the PR, @MarcZX10 can clear his review and this can go to the queue.

…check

DrawPipeline::HeldReads called std::getenv on every call. It runs for
each StorageTexture::FlushPending, which InPlaceDrawInput calls while the
draw committer records a draw. On Windows, UCRT's getenv takes the
environment lock and scans the block on each call: on the title screen of
Spirit of the Island (PPSA13934), 375 of the draw committer's 5124
steady-state samples (7.3 %) were in ucrtbase under HeldReads, against
under 0.3 % for the range scan itself.

The variable is now read once into a static, as WaitMemory.cpp already
does for the same variable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JJenkx
JJenkx force-pushed the windows/held-reads-env-once branch from cfca4e5 to 29b6cc4 Compare October 25, 2026 05:29
@JJenkx

JJenkx commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed on current main as 29b6cc46afed2d6dadc6191986cb07ac6693eae1 (parent e7e3e9c1984c293f06bff08428b8c89b7b932ac2, one commit). The existing lookup change is preserved; fresh same-host main/change builds and26 groups ×3 repeats per arm pass (156 invocations). Seventeen groups per arm load Khronos validation on the physical RX6650XT;9 are no-device paths. No VUIDs, missing-layer warnings or skips.

This addresses the stale-head Vulkan qualification part of the review. The clean committed native performance pair/digest remains outstanding, and the description now clearly excludes the earlier dirty-head comparison from qualifying evidence. No FPS gain or new Windows run is claimed.

Logs, JUnit, pins and patch, SHA-256 047c4840394a85c94ceeaf063fd0aa118c842802a37909c4f96755adf5fdb5cb.

AI-assisted: yes (Codex).

@github-actions github-actions Bot added the perf numbers missing perf pull request without a before and after summary line label Oct 25, 2026
@JJenkx

JJenkx commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Added a clean committed native pair for the remaining trace-evidence request: Afterdream PPSA18391 opening dialogue, warmed caches, same machine/scene/settings and window state, main e7e3e9c1984c against PR 29b6cc46afed. Both traces report dirty:false and zero dropped events; both native runs closed normally. The description now contains both raw summary lines and digest excerpts.

This Linux scene is60FPS-capped: median16.683ms in both arms, p99 16.705/16.716ms. One pair and differing background CPU load do not establish a speed or CPU-cost improvement. No new Windows run is claimed; the independent Windows profiles remain separately attributed.

Traces, full digests, pins and native reports, SHA-256 21635a6ab0611b7f58c6caa5e8954fe1393871b2523740f82c0e4f802c9de66c. The same-head focused Vulkan comparison remains linked in the description.

AI-assisted: yes (Codex).

@github-actions github-actions Bot removed the perf numbers missing perf pull request without a before and after summary line label Oct 25, 2026
@thuanquang

Copy link
Copy Markdown
Contributor

A Windows data point from Persona 5 Royal (PPSA05110, own dump), casino gameplay: Windows 11 26200, Ryzen 5 5600X, RX 6700 XT (AMD 32.0.21045.16010), WinLibs GCC 15.2.0 r7, Release. The title needs four open PRs to load and run (#10887, #10614, #10913, #7844), so every build below is main plus those four.

  • Before perf(agc): skip the queued-draw read check when a storage flush stores nothing #8911 (main 3a2c51afd2 + the four): a draw-committer sample (APS5_SAMPLE_COMMITTER, 170 s of gameplay, shared GPU) puts DrawPipeline::HeldReads at 6.6 % of the committer's samples, 5.6 % of them in ucrtbase under it, the per-call getenv this PR removes. The caller is StorageTexture::FlushPending from InPlaceDrawInput.
  • After perf(agc): skip the queued-draw read check when a storage flush stores nothing #8911 (main 73ad397dba + the four): the same sample (480-650 s, gameplay from 519 s) puts HeldReads at 0.1 %. On this title's caller path, nothingToStore() now returns before HeldReads is reached.
  • Exclusive-GPU pairs on that base: base d36642f3b8 against base + this PR's commit (d068ce15c3, a cherry-pick of 29b6cc46af; git diff between them equals this PR's diff). Warm caches, same route, 10 s summary windows in gameplay only, two interleaved batches. This PR: 137.3 and 142.5 presents/10 s. Base: 86.9 and 153.9; the 86.9 leg ran while another process was using the GPU (video decode). In the 10 s traces the draw committer is busy 43.8 ms per frame on the clean base leg, and 46.5 and 48.5 ms with this PR. So on current main this title has nothing left to gain here, and I have no speed pair to offer.

This isn't an argument against the change: the lookup is still per call wherever HeldReads runs, and the earlier profiles here came from other callers (GTA V's through Revalidate → cachedTexture). It only means P5R, after #8911, can't supply the before/after numbers.

AI-assisted: yes (Claude Code)

@JJenkx

JJenkx commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 @oneandonlydean The two evidence requests are now covered on published head 29b6cc46afed2d6dadc6191986cb07ac6693eae1:

  • Focused main/change Vulkan logs, SHA-256 047c4840394a85c94ceeaf063fd0aa118c842802a37909c4f96755adf5fdb5cb: 26 groups ×3 on each arm, 156 passing invocations total. Seventeen physical groups per arm load Khronos validation; nine are no-device paths. No skips, missing-layer warnings or VUIDs.
  • Clean native pair, summaries and trace digests, SHA-256 21635a6ab0611b7f58c6caa5e8954fe1393871b2523740f82c0e4f802c9de66c: distinct committed main e7e3e9c1984c and PR 29b6cc46afed, both dirty:false, the same Afterdream scene/machine/settings/requested seconds window, and zero dropped events. Raw summaries and digests are in the description too.

Both archives' hashes and the clean summary fields were rechecked for this follow-up. These remain the previously posted runs, with their original source pins. The Linux scene is capped at about 60 FPS (p50 16.683ms on both arms), and differing background CPU load prevents a CPU-cost improvement claim. No new speed or Windows result is claimed.

Please re-review these attachments and update the earlier changes-requested review if they satisfy the two requests, so the queue can proceed.

AI-assisted: yes.

@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 28, 2026 12:43

Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.

@adriadam10
adriadam10 merged commit f4b33f1 into boykopovar:main Oct 29, 2026
13 of 14 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the diff against the description: APS5_NO_QUEUED_DRAW_READ_ORDER is read once into a static in HeldReads, as WaitMemory.cpp already does, with no other behaviour change. Both points from the earlier requests are now covered on the current head: a clean main/change trace pair with distinct commits and dirty:false, and the focused AGC validation run on both arms with the layer loaded and no VUIDs. The cost itself is confirmed by independent profiles on GTA V, ASTRO BOT and Persona 5 Royal; merged.

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

Labels

agc libSceAgc* perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants