perf(agc): queue CPU-path indirect draws on the draw pipeline #6931

Merged
AnthonyClemens merged 1 commit from upstream-pr/6931 into main 2026-10-19 14:48:13 +00:00
AnthonyClemens commented 2026-10-16 19:32:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AnthonyClemens on 2026-10-16T19:32:46Z.


What

CPU-path indirect draws (DRAW_INDIRECT, DRAW_INDEX_INDIRECT, DRAW_INDEX_INDIRECT_MULTI whose records the worker reads) drained queue 0's draw pipeline on entry and recorded every record on the worker. A title that draws mostly this way got no overlap between the worker capturing one draw and the committer recording the previous one.

With this change:

  • An indirect draw drains only when its records or its count overlap a write still queued on the pipeline.
  • Records it draws inline drain first, so their order is unchanged.
  • Its last drawn record is queued like a direct draw, carrying its DrawWriteRanges.
  • APS5_NO_PIPELINED_INDIRECT=1 drains at every indirect draw, as before.

docs/dev/ARCHITECTURE.md describes the new behaviour in the draw pipeline paragraph.

Related: #1896, a draft that pipelines both GPU-side and CPU-side indirect draws behind APS5_PIPELINE_INDIRECT on an older base. This PR is the CPU-side half alone, on current main and on by default, measured on a title whose draws take that path. GPU-side indirect draws still drain here, so #1896's GPU-side part can build on this.

Tested

Windows 11 (10.0.26200), AMD Radeon RX 9070 XT, AMD proprietary driver 26.9.1 (LLPC).

New test, agc_driver_pipelined_indirect_draw (about 4 s). It holds the committer with a blocking item and checks two things:

  • Queuing: two CPU-path indirect draws queue behind the blocker (the pipeline holds three items before it is released), and both draw what the same direct draw draws.
  • Ordering: an indirect draw whose record a queued label writes waits for that label, and draws with the written vertex count.

Each check fails with its half of the change reverted. With APS5_NO_PIPELINED_INDIRECT=1, it fails with "the indirect draws drained the pipeline instead of queuing behind it". With the overlap drain removed, it fails with "the indirect draw whose record a queued label wrote: byte 0 is 64, the direct draw wrote 255". It passed 8 of 8 repeated runs.

Existing tests: agc_driver_pipelined_*, agc_driver_indirect_patched_stage, agc_driver_indirect_arguments_written_ahead, agc_driver_draw_write_ranges and agc_driver_draw_offset_indices pass. tools/check_conventions.py passes.

Performance: Resident Evil 2 (PPSA04288), opening cutscene, seconds 300–360 of the run, 3840x2160.

Current main stops at RE2's title screen about 35 s in: "shader 0x2073ceae00 stage 5: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value". Local fixes that are not yet upstream get past it. So both captures come from one build of a local branch that carries this change and those fixes, c74326916c54. They differ only in APS5_NO_PIPELINED_INDIRECT=1, which restores main's drain.

The build is marked dirty because of an uncommitted diagnostic message in the draw cache's verify mode, which is off in both runs. Each capture followed a warm-up run of the scene. No APS5_PROFILE_* or other APS5_TRACE_* switch was set.

In this scene nearly every draw is a CPU-path indirect draw ("patched SGPR not folded" or "non-vertex path").

APS5_NO_PIPELINED_INDIRECT=1 (as main) this change
presents in 60 s 123 134
frame p50 / p90 / p99 466 / 498 / 685 ms 399 / 509 / 591 ms
Driver.Draw per frame 423 ms 283 ms
queue worker 0x0 busy 98.9 % 98.8 %

Over full 900 s runs with APS5_PROFILE_DRAW=1, the same section went from about 2,800–3,000 to about 3,400–3,800 draws per 10 s.

Summary lines:

{"commit":"c74326916c54","dirty":true,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"300","APS5_DUMP_SCALE":"4","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PIPELINED_INDIRECT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TEXTURE_CACHE_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"300:60"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.9.1 (LLPC)","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 300:60","first_present":1919,"ms":60019.196},"presents":123,"frame_ms":{"p50":466.081,"p90":497.594,"p99":684.964,"max":1674.306},"gpu_busy_ms_per_present":49.361,"worker_busy_pct":{"queue worker 0x0":98.890,"queue worker 0x38":88.840,"queue worker 0x20":59.042,"queue worker 0x28":94.170},"top_phases_ms_per_frame":{"Driver.Packet":1642.595,"Driver.Packet.memory_wait":1052.101,"Driver.Packet.draw":423.074,"Driver.Draw":422.937,"Driver.Draw.draw_and_resource_release":211.170,"Graphics.Draw":209.344,"Graphics.Draw.draw_and_resource_release":205.146,"Resources.Complete":196.454},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":60.002,"events_lost":282,"totals_full":false}},"trace":"aps5-trace-c74326916c54-29376.json.gz"}
{"commit":"c74326916c54","dirty":true,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"300","APS5_DUMP_SCALE":"4","APS5_LAZY_SHADER_PREPARE":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TEXTURE_CACHE_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"300:60"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.9.1 (LLPC)","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 300:60","first_present":2135,"ms":60383.965},"presents":134,"frame_ms":{"p50":399.265,"p90":509.367,"p99":590.792,"max":2150.802},"gpu_busy_ms_per_present":52.711,"worker_busy_pct":{"queue worker 0x0":98.825,"queue worker 0x38":87.265,"queue worker 0x20":54.771,"queue worker 0x28":93.237},"top_phases_ms_per_frame":{"Driver.Packet":1483.193,"Driver.Packet.memory_wait":925.699,"Driver.Packet.draw":283.511,"Driver.Draw":283.373,"Shader.DrawStage":194.729,"Driver.Draw.shader_compile_and_link":173.640,"Driver.Packet.dispatch":172.365,"Driver.Dispatch":170.731},"trace_dropped":false,"trace":"aps5-trace-c74326916c54-11312.json.gz"}

The first capture lost 282 worker events after 60.002 s, past the window's last present, so its totals are complete (totals_full: false).

Traces: aps5-trace-c74326916c54-29376.json.gz (change off) and aps5-trace-c74326916c54-11312.json.gz (change on), attached.

aps5-trace-c74326916c54-29376.json.gz
aps5-trace-c74326916c54-11312.json.gz

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
  • 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
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 9070 XT, AMD proprietary driver 26.9.1 (LLPC), Windows 11 (10.0.26200)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4893310938 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6931). Originally posted by [AnthonyClemens](https://github.com/AnthonyClemens) on 2026-10-16T19:32:46Z. --- ### What CPU-path indirect draws (`DRAW_INDIRECT`, `DRAW_INDEX_INDIRECT`, `DRAW_INDEX_INDIRECT_MULTI` whose records the worker reads) drained queue 0's draw pipeline on entry and recorded every record on the worker. A title that draws mostly this way got no overlap between the worker capturing one draw and the committer recording the previous one. With this change: - An indirect draw drains only when its records or its count overlap a write still queued on the pipeline. - Records it draws inline drain first, so their order is unchanged. - Its last drawn record is queued like a direct draw, carrying its `DrawWriteRanges`. - `APS5_NO_PIPELINED_INDIRECT=1` drains at every indirect draw, as before. `docs/dev/ARCHITECTURE.md` describes the new behaviour in the draw pipeline paragraph. Related: #1896, a draft that pipelines both GPU-side and CPU-side indirect draws behind `APS5_PIPELINE_INDIRECT` on an older base. This PR is the CPU-side half alone, on current `main` and on by default, measured on a title whose draws take that path. GPU-side indirect draws still drain here, so #1896's GPU-side part can build on this. ### Tested Windows 11 (10.0.26200), AMD Radeon RX 9070 XT, AMD proprietary driver 26.9.1 (LLPC). **New test, `agc_driver_pipelined_indirect_draw`** (about 4 s). It holds the committer with a blocking item and checks two things: - **Queuing:** two CPU-path indirect draws queue behind the blocker (the pipeline holds three items before it is released), and both draw what the same direct draw draws. - **Ordering:** an indirect draw whose record a queued label writes waits for that label, and draws with the written vertex count. Each check fails with its half of the change reverted. With `APS5_NO_PIPELINED_INDIRECT=1`, it fails with "the indirect draws drained the pipeline instead of queuing behind it". With the overlap drain removed, it fails with "the indirect draw whose record a queued label wrote: byte 0 is 64, the direct draw wrote 255". It passed 8 of 8 repeated runs. **Existing tests:** `agc_driver_pipelined_*`, `agc_driver_indirect_patched_stage`, `agc_driver_indirect_arguments_written_ahead`, `agc_driver_draw_write_ranges` and `agc_driver_draw_offset_indices` pass. `tools/check_conventions.py` passes. **Performance: Resident Evil 2 (PPSA04288), opening cutscene, seconds 300–360 of the run, 3840x2160.** Current `main` stops at RE2's title screen about 35 s in: "shader 0x2073ceae00 stage 5: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value". Local fixes that are not yet upstream get past it. So both captures come from one build of a local branch that carries this change and those fixes, `c74326916c54`. They differ only in `APS5_NO_PIPELINED_INDIRECT=1`, which restores `main`'s drain. The build is marked dirty because of an uncommitted diagnostic message in the draw cache's verify mode, which is off in both runs. Each capture followed a warm-up run of the scene. No `APS5_PROFILE_*` or other `APS5_TRACE_*` switch was set. In this scene nearly every draw is a CPU-path indirect draw ("patched SGPR not folded" or "non-vertex path"). | | `APS5_NO_PIPELINED_INDIRECT=1` (as `main`) | this change | |---|---|---| | presents in 60 s | 123 | 134 | | frame p50 / p90 / p99 | 466 / 498 / 685 ms | 399 / 509 / 591 ms | | `Driver.Draw` per frame | 423 ms | 283 ms | | queue worker 0x0 busy | 98.9 % | 98.8 % | Over full 900 s runs with `APS5_PROFILE_DRAW=1`, the same section went from about 2,800–3,000 to about 3,400–3,800 draws per 10 s. Summary lines: ```json {"commit":"c74326916c54","dirty":true,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"300","APS5_DUMP_SCALE":"4","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PIPELINED_INDIRECT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TEXTURE_CACHE_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"300:60"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.9.1 (LLPC)","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 300:60","first_present":1919,"ms":60019.196},"presents":123,"frame_ms":{"p50":466.081,"p90":497.594,"p99":684.964,"max":1674.306},"gpu_busy_ms_per_present":49.361,"worker_busy_pct":{"queue worker 0x0":98.890,"queue worker 0x38":88.840,"queue worker 0x20":59.042,"queue worker 0x28":94.170},"top_phases_ms_per_frame":{"Driver.Packet":1642.595,"Driver.Packet.memory_wait":1052.101,"Driver.Packet.draw":423.074,"Driver.Draw":422.937,"Driver.Draw.draw_and_resource_release":211.170,"Graphics.Draw":209.344,"Graphics.Draw.draw_and_resource_release":205.146,"Resources.Complete":196.454},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":60.002,"events_lost":282,"totals_full":false}},"trace":"aps5-trace-c74326916c54-29376.json.gz"} {"commit":"c74326916c54","dirty":true,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"300","APS5_DUMP_SCALE":"4","APS5_LAZY_SHADER_PREPARE":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TEXTURE_CACHE_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"300:60"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.9.1 (LLPC)","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 300:60","first_present":2135,"ms":60383.965},"presents":134,"frame_ms":{"p50":399.265,"p90":509.367,"p99":590.792,"max":2150.802},"gpu_busy_ms_per_present":52.711,"worker_busy_pct":{"queue worker 0x0":98.825,"queue worker 0x38":87.265,"queue worker 0x20":54.771,"queue worker 0x28":93.237},"top_phases_ms_per_frame":{"Driver.Packet":1483.193,"Driver.Packet.memory_wait":925.699,"Driver.Packet.draw":283.511,"Driver.Draw":283.373,"Shader.DrawStage":194.729,"Driver.Draw.shader_compile_and_link":173.640,"Driver.Packet.dispatch":172.365,"Driver.Dispatch":170.731},"trace_dropped":false,"trace":"aps5-trace-c74326916c54-11312.json.gz"} ``` The first capture lost 282 worker events after 60.002 s, past the window's last present, so its totals are complete (`totals_full: false`). Traces: `aps5-trace-c74326916c54-29376.json.gz` (change off) and `aps5-trace-c74326916c54-11312.json.gz` (change on), attached. [aps5-trace-c74326916c54-29376.json.gz](https://github.com/user-attachments/files/33570425/aps5-trace-c74326916c54-29376.json.gz) [aps5-trace-c74326916c54-11312.json.gz](https://github.com/user-attachments/files/33570427/aps5-trace-c74326916c54-11312.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] Unblocks: none - [x] GPUs tested: AMD Radeon RX 9070 XT, AMD proprietary driver 26.9.1 (LLPC), Windows 11 (10.0.26200) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-16 19:43:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T19:43:27Z.


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 1896 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 5404 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 5431 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 5441 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ARCHITECTURE.md
PR 6044 docs/dev/ARCHITECTURE.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 6539 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 6612 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 6636 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 6679 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 6924 docs/dev/ENVIRONMENT.md
PR 6941 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 6946 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ARCHITECTURE.md
docs/dev/ENVIRONMENT.md
PR 6947 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ARCHITECTURE.md
docs/dev/ENVIRONMENT.md
PR 7201 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 7332 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 7417 docs/dev/ENVIRONMENT.md
PR 7427 docs/dev/ENVIRONMENT.md
PR 7446 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 7457 docs/dev/ENVIRONMENT.md
PR 7484 docs/dev/ENVIRONMENT.md
PR 7604 docs/dev/ENVIRONMENT.md
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ARCHITECTURE.md
docs/dev/ENVIRONMENT.md
PR 7683 docs/dev/ENVIRONMENT.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6223353896 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6931#issuecomment-6223353896). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-16T19:43:27Z. --- <!-- pr-overlap --> 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 1896](https://www.github.com/boykopovar/AnyPS5/pull/1896) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 5404](https://www.github.com/boykopovar/AnyPS5/pull/5404) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 5431](https://www.github.com/boykopovar/AnyPS5/pull/5431) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp`<br>`docs/dev/ENVIRONMENT.md` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `docs/dev/ARCHITECTURE.md` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 6539](https://www.github.com/boykopovar/AnyPS5/pull/6539) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp`<br>`docs/dev/ENVIRONMENT.md` | | [PR 6679](https://www.github.com/boykopovar/AnyPS5/pull/6679) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 6924](https://www.github.com/boykopovar/AnyPS5/pull/6924) | `docs/dev/ENVIRONMENT.md` | | [PR 6941](https://www.github.com/boykopovar/AnyPS5/pull/6941) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp`<br>`docs/dev/ARCHITECTURE.md`<br>`docs/dev/ENVIRONMENT.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp`<br>`docs/dev/ARCHITECTURE.md`<br>`docs/dev/ENVIRONMENT.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp`<br>`docs/dev/ENVIRONMENT.md` | | [PR 7417](https://www.github.com/boykopovar/AnyPS5/pull/7417) | `docs/dev/ENVIRONMENT.md` | | [PR 7427](https://www.github.com/boykopovar/AnyPS5/pull/7427) | `docs/dev/ENVIRONMENT.md` | | [PR 7446](https://www.github.com/boykopovar/AnyPS5/pull/7446) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp` | | [PR 7457](https://www.github.com/boykopovar/AnyPS5/pull/7457) | `docs/dev/ENVIRONMENT.md` | | [PR 7484](https://www.github.com/boykopovar/AnyPS5/pull/7484) | `docs/dev/ENVIRONMENT.md` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `docs/dev/ENVIRONMENT.md` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp`<br>`docs/dev/ARCHITECTURE.md`<br>`docs/dev/ENVIRONMENT.md` | | [PR 7683](https://www.github.com/boykopovar/AnyPS5/pull/7683) | `docs/dev/ENVIRONMENT.md` |
CnRJay commented 2026-10-16 21:58:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-16T21:58:37Z.

Review: COMMENTED


Good PR: small, on by default, with a test that fails when either half is reverted and a before/after on a title that takes this path (RE2, 123 to 134 presents in 60 s, Driver.Draw 423 to 283 ms per frame).

Two things to tighten.

  • The pair is one run each, with APS5_DUMP_FRAMES* set (frame dumping at 4x scale) and a dirty build. Dumping perturbs exactly what is measured, and p90 is not better (498 to 509 ms) while queue worker 0 stays at 98.8% busy. Please post a pair without the dump switches, and a second pair to show the spread. The p50 gain is there but the tail is unchanged, so "faster" should say p50.
  • drawable() repeats the skip conditions of the record loop. If the loop skips a record for another reason (an index range, a rejected stage), lastDrawable can name a record that never reaches the enqueue, and the last real record falls through to the inline path: correct, but without the overlap the PR is for. A test with a trailing zero-count record and one with a trailing out-of-range index would show that the last record that does draw is the one queued.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5554157101 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6931#pullrequestreview-5554157101). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-10-16T21:58:37Z. **Review:** COMMENTED --- Good PR: small, on by default, with a test that fails when either half is reverted and a before/after on a title that takes this path (RE2, 123 to 134 presents in 60 s, `Driver.Draw` 423 to 283 ms per frame). Two things to tighten. - The pair is one run each, with `APS5_DUMP_FRAMES*` set (frame dumping at 4x scale) and a dirty build. Dumping perturbs exactly what is measured, and p90 is not better (498 to 509 ms) while queue worker 0 stays at 98.8% busy. Please post a pair without the dump switches, and a second pair to show the spread. The p50 gain is there but the tail is unchanged, so "faster" should say p50. - `drawable()` repeats the skip conditions of the record loop. If the loop skips a record for another reason (an index range, a rejected stage), `lastDrawable` can name a record that never reaches the enqueue, and the last real record falls through to the inline path: correct, but without the overlap the PR is for. A test with a trailing zero-count record and one with a trailing out-of-range index would show that the last record that does draw is the one queued.
parl0v commented 2026-10-16 22:13:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by parl0v on 2026-10-16T22:13:57Z.


Data point from a CPU-bound scene on Windows: RTX 3060 12 GB (NVIDIA 617.42), i5-12400F, Windows 10 19045, MinGW GCC Release. Minecraft Dungeons II (PPSA16064 01.100.100), title screen, no input, 200 s rows, APS5_PROFILE_DRAW=1 APS5_PROFILE_GPU=1; main bc3c0fc13 vs main + this PR, interleaved with five other PRs in one batch, two rounds. FPS is the mean of the last 10 [present] windows, GPU busy and idle gaps per frame over the last 8. This scene is CPU-bound on this machine (45-47 ms of idle gaps per frame).

libs FPS GPU busy idle gaps
main 6.70 / 6.60 105 / 106 ms 45 / 46 ms
+ this PR (a00773731) 6.68 / 6.69 (+0.5 %) 105 / 104 ms 45 / 45 ms

Within the run-to-run spread (about ±1.5 % here), no regression, 0 fatal.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6225712492 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6931#issuecomment-6225712492). Originally posted by [parl0v](https://github.com/parl0v) on 2026-10-16T22:13:57Z. --- Data point from a CPU-bound scene on Windows: RTX 3060 12 GB (NVIDIA 617.42), i5-12400F, Windows 10 19045, MinGW GCC Release. Minecraft Dungeons II (PPSA16064 01.100.100), title screen, no input, 200 s rows, `APS5_PROFILE_DRAW=1 APS5_PROFILE_GPU=1`; `main` bc3c0fc13 vs `main` + this PR, interleaved with five other PRs in one batch, two rounds. FPS is the mean of the last 10 `[present]` windows, GPU busy and idle gaps per frame over the last 8. This scene is CPU-bound on this machine (45-47 ms of idle gaps per frame). | libs | FPS | GPU busy | idle gaps | |---|---|---|---| | `main` | 6.70 / 6.60 | 105 / 106 ms | 45 / 46 ms | | + this PR (a00773731) | 6.68 / 6.69 (+0.5 %) | 105 / 104 ms | 45 / 45 ms | Within the run-to-run spread (about ±1.5 % here), no regression, 0 fatal. AI-assisted: yes (Claude Code)
marco-scheffler commented 2026-10-17 14:09:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by marco-scheffler on 2026-10-17T14:09:22Z.


Linux NVIDIA data point: Ubuntu 24.04.4, RTX 4000 SFF Ada Generation, driver 595.99.02, GCC 13.3.0, Release. This PR at a00773731 merged onto main c9e6c45de, full ctest on the RTX (ANYPS5_GPU=RTX, Xvfb with -DANYPS5_VIDEO_OUT_TEST_DRIVER=x11): no new failures. The only failures, video_out_flip_eop{,_main,_aftergpu} (#6616) and agc_driver_{f16_fma,fma_mix_f16}_denormal_modes, fail the same way on that main (0/5 serial with and without this PR).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234888648 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6931#issuecomment-6234888648). Originally posted by [marco-scheffler](https://github.com/marco-scheffler) on 2026-10-17T14:09:22Z. --- Linux NVIDIA data point: Ubuntu 24.04.4, RTX 4000 SFF Ada Generation, driver 595.99.02, GCC 13.3.0, Release. This PR at `a00773731` merged onto `main` `c9e6c45de`, full `ctest` on the RTX (`ANYPS5_GPU=RTX`, Xvfb with `-DANYPS5_VIDEO_OUT_TEST_DRIVER=x11`): no new failures. The only failures, `video_out_flip_eop{,_main,_aftergpu}` (#6616) and `agc_driver_{f16_fma,fma_mix_f16}_denormal_modes`, fail the same way on that `main` (0/5 serial with and without this PR).
github-actions[bot] commented 2026-10-19 12:36:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T12:36:54Z.


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:6267367882 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6931#issuecomment-6267367882). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T12:36:54Z. --- <!-- 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`.
adriadam10 commented 2026-10-19 14:48:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T14:48:57Z.


Rebased onto current main (only conflict: the adjacent ARCHITECTURE.md paragraph, both kept) and added the missing APS5_NO_PIPELINED_INDIRECT row to docs/dev/ENVIRONMENT.md, which check_conventions.py requires. The drain/overlap condition, the inline-record ordering and the new test (fails with either half reverted) were checked; full ctest passes on the rebased tree; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6270074296 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6931#issuecomment-6270074296). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T14:48:57Z. --- Rebased onto current `main` (only conflict: the adjacent ARCHITECTURE.md paragraph, both kept) and added the missing `APS5_NO_PIPELINED_INDIRECT` row to `docs/dev/ENVIRONMENT.md`, which `check_conventions.py` requires. The drain/overlap condition, the inline-record ordering and the new test (fails with either half reverted) were checked; full ctest passes on the rebased tree; merged.
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!6931
No description provided.