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

Merged
JJenkx merged 1 commit from upstream-pr/9490 into main 2026-10-29 07:48:26 +00:00
JJenkx commented 2026-10-21 23:19:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T23:19:14Z.


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 29b6cc46af, 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


<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4959661595 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9490). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T23:19:14Z. --- ### 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](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr9490-head29b6cc46-maine7e3-linux-vulkan-validation.tar.gz). 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: ```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.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](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr9490-head29b6cc46-maine7e3-afterdream-clean-traces.tar.gz), SHA-256 `21635a6ab0611b7f58c6caa5e8954fe1393871b2523740f82c0e4f802c9de66c`. Digest excerpts, main then change (full output in the archive): ```text **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 29b6cc46afed, dropped: no ```json {"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
github-actions[bot] commented 2026-10-21 23:19:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T23:19:27Z.


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6328733582 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9490#issuecomment-6328733582). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T23:19:27Z. --- <!-- pr-labels-perf --> 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 commented 2026-10-21 23:26:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T23:26:00Z.

Review: CHANGES_REQUESTED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5607457839 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9490#pullrequestreview-5607457839). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T23:26:00Z. **Review:** CHANGES_REQUESTED --- 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.
JJenkx commented 2026-10-22 00:11:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T00:11:33Z.


@MarcZX10 Thanks, added to the description:

  • Two alternated APS5_TRACE_SECONDS=80:20 trace pairs on main 0c6a5bd59: p50 109.2/109.9 ms on main against 108.2/108.0 ms with the change.
  • Two pairs on top of #9421: 97.8/98.3 ms against 93.3/94.5 ms.
  • The summary lines and the trace_digest.py heads are in the description.
  • All eight traces, the digests and the committer profile are attached: 20261021-held-reads-env-once-PPSA13934.tar.gz.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6329437050 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9490#issuecomment-6329437050). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-22T00:11:33Z. --- @MarcZX10 Thanks, added to the description: - Two alternated `APS5_TRACE_SECONDS=80:20` trace pairs on `main` 0c6a5bd59: p50 109.2/109.9 ms on `main` against 108.2/108.0 ms with the change. - Two pairs on top of #9421: 97.8/98.3 ms against 93.3/94.5 ms. - The summary lines and the `trace_digest.py` heads are in the description. - All eight traces, the digests and the committer profile are attached: [20261021-held-reads-env-once-PPSA13934.tar.gz](https://github.com/JJenkx/AnyPS5/raw/windows/evidence-20261021/20261021-held-reads-env-once-PPSA13934.tar.gz).
MarcZX10 commented 2026-10-22 02:12:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T02:12:53Z.

Review: DISMISSED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5608491429 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9490#pullrequestreview-5608491429). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T02:12:53Z. **Review:** DISMISSED --- 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 commented 2026-10-22 02:12:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T02:12:54Z.


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331028072 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9490#issuecomment-6331028072). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T02:12:54Z. --- 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.
SoRadGaming commented 2026-10-22 14:48:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SoRadGaming on 2026-10-22T14:48:26Z.


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 4777caca3 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
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343662540 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9490#issuecomment-6343662540). Originally posted by [SoRadGaming](https://github.com/SoRadGaming) on 2026-10-22T14:48:26Z. --- 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` 4777caca3 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 commented 2026-10-22 14:58:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T14:58:07Z.


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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343872813 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9490#issuecomment-6343872813). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-22T14:58:07Z. --- @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`.
adriadam10 commented 2026-10-24 01:10:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-24T01:10:17Z.

Review: CHANGES_REQUESTED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5636029541 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9490#pullrequestreview-5636029541). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-24T01:10:17Z. **Review:** CHANGES_REQUESTED --- 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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9490
No description provided.