perf(agc): pipelined draws on by default #1202

Merged
MichonGoddijn231849 merged 2 commits from upstream-pr/1202 into main 2026-10-15 10:30:29 +00:00
MichonGoddijn231849 commented 2026-10-07 17:29:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-07T17:29:10Z.


What

Turns the queue-0 draw pipeline from #1201 on by default:

  • APS5_PIPELINED_DRAWS is on (depth 8) unless set to 0.
  • APS5_EXACT_DRAW_WRITES is on unless set to 0: queued draws carry the exact color, DCC, CMASK, depth and stencil sizes instead of the estimates.
  • A pipelined DMA_DATA fill notes HTILE and CMASK fills in order, as the packet path does (Michon's commit; agc_driver_depth_fast_clear_submit failed without it with APS5_PIPELINE_DMA=1). APS5_PIPELINE_DMA itself stays opt-in here; making it the default is #6208.
  • ARCHITECTURE.md says the pipeline is on and how to turn it off.
  • The base tests (agc_driver, agc_driver_pm4_failure, agc_driver_draw_cache_reuse, ...) now run with the pipeline on, as asked in review; agc_driver_pm4_failure_inline and agc_driver_draw_cache_reuse_inline (APS5_PIPELINED_DRAWS=0) keep the inline path covered.

Reshaped after #1201 merged. Left out of the old head (backup: adriadam10/AnyPS5 branch backup/MichonGoddijn231849-perf-draw-path-trims, c653e9ea1d):

  • the snapshot ring, pipeline identity path, moved-word ring and code-hash memo of 1b1ff4546d: they conflict with main's own unwritten-snapshot and moved-word caches (98ce8af56d, b0001cb676), and the arena goes in its own PR as agreed above;
  • a1555a1659 (agc_driver/agc_driver_pm4_failure with the pipeline off): a failed commit now goes through ReportFailure (#1201), so they pass with it on;
  • c653e9ea1d, already merged with #1201.

Open review points from the thread: the loading hang (fill under the GPU lock) is fixed by c653e9ea1d in #1201; failed commits fail like the inline path (#1201); the CB metadata pass drains first (#1201, c50e23120c). The CMASK-of-DCC abort fma-rc saw on fda7dbf04 has no rerun since.

Tested

Linux, Ryzen 5 7535HS / Radeon 660M, RADV, GCC, ANYPS5_ENABLE_SPIRV_TOOLS=ON, ctest -R 'agc|shader' (595 tests):

  • defaults (pipeline on): 594/595
  • APS5_PIPELINED_DRAWS=0: 594/595
  • APS5_PIPELINE_DMA=1: 593/595; the extra failure is agc_driver's copiesToHostMemory count check (the copy is enqueued, the bytes are right), which is #6208's to settle
  • stress, --repeat until-fail:20 over the pipelined, fill, predication, label, draw-cache, failure, fast-clear and DMA tests with APS5_PIPELINE_DMA=1: 33/33

The only failure in every mode, agc_driver_tessellation, segfaults on main too on this GPU. Windows full build dispatched next.
Game reports on the pipeline (on #1201's c653e9ea1d): mrfelek Diablo II +51 %, Castlevania +67 % presents/s; JAB-dev Besiege 20→33, HSG2 19.5→36.6, Vampire Survivors 25-28→48-58. @fma-rc, an Astro's Playroom run on this head would tell whether the CMASK-of-DCC abort is still there.

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 in TechnicalDebt
  • 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: nothing (#1201 merged)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4776143236 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-07T17:29:10Z. --- ### What Turns the queue-0 draw pipeline from #1201 on by default: - `APS5_PIPELINED_DRAWS` is on (depth 8) unless set to `0`. - `APS5_EXACT_DRAW_WRITES` is on unless set to `0`: queued draws carry the exact color, DCC, CMASK, depth and stencil sizes instead of the estimates. - A pipelined `DMA_DATA` fill notes HTILE and CMASK fills in order, as the packet path does (Michon's commit; `agc_driver_depth_fast_clear_submit` failed without it with `APS5_PIPELINE_DMA=1`). `APS5_PIPELINE_DMA` itself stays opt-in here; making it the default is #6208. - ARCHITECTURE.md says the pipeline is on and how to turn it off. - The base tests (`agc_driver`, `agc_driver_pm4_failure`, `agc_driver_draw_cache_reuse`, ...) now run with the pipeline on, as asked in review; `agc_driver_pm4_failure_inline` and `agc_driver_draw_cache_reuse_inline` (`APS5_PIPELINED_DRAWS=0`) keep the inline path covered. Reshaped after #1201 merged. Left out of the old head (backup: `adriadam10/AnyPS5` branch `backup/MichonGoddijn231849-perf-draw-path-trims`, c653e9ea1d): - the snapshot ring, pipeline identity path, moved-word ring and code-hash memo of 1b1ff4546d: they conflict with `main`'s own unwritten-snapshot and moved-word caches (98ce8af56d, b0001cb676), and the arena goes in its own PR as agreed above; - a1555a1659 (`agc_driver`/`agc_driver_pm4_failure` with the pipeline off): a failed commit now goes through `ReportFailure` (#1201), so they pass with it on; - c653e9ea1d, already merged with #1201. Open review points from the thread: the loading hang (fill under the GPU lock) is fixed by c653e9ea1d in #1201; failed commits fail like the inline path (#1201); the CB metadata pass drains first (#1201, c50e23120c). The CMASK-of-DCC abort fma-rc saw on fda7dbf04 has no rerun since. ### Tested Linux, Ryzen 5 7535HS / Radeon 660M, RADV, GCC, `ANYPS5_ENABLE_SPIRV_TOOLS=ON`, `ctest -R 'agc|shader'` (595 tests): - defaults (pipeline on): 594/595 - `APS5_PIPELINED_DRAWS=0`: 594/595 - `APS5_PIPELINE_DMA=1`: 593/595; the extra failure is `agc_driver`'s `copiesToHostMemory` count check (the copy is enqueued, the bytes are right), which is #6208's to settle - stress, `--repeat until-fail:20` over the pipelined, fill, predication, label, draw-cache, failure, fast-clear and DMA tests with `APS5_PIPELINE_DMA=1`: 33/33 The only failure in every mode, `agc_driver_tessellation`, segfaults on `main` too on this GPU. Windows full build dispatched next. Game reports on the pipeline (on #1201's c653e9ea1d): mrfelek Diablo II +51 %, Castlevania +67 % presents/s; JAB-dev Besiege 20→33, HSG2 19.5→36.6, Vampire Survivors 25-28→48-58. @fma-rc, an Astro's Playroom run on this head would tell whether the CMASK-of-DCC abort is still there. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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: nothing (#1201 merged) - [x] AI-assisted: yes
fisherjoey commented 2026-10-08 08:03:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-08T08:03:10Z.


Test result: Demon's Souls on Linux/NVIDIA with #1202 (and #1201 under it) on by default

Setup: Nobara 44 x86-64, kernel 7.2, RTX 5070 Ti, NVIDIA 595.91.07. Demon's Souls (PPSA01341 v1.07), tutorial level (Outpost Passage), steady state for about 150 s after the HUD appears. Base is upstream main df16c4c2 plus #861, #864 and #157, our local fixes (including the NVIDIA dma-buf import guard) and a job-worker idle sleep for this title. The PR side is the same tree with this PR merged, plus #1071, which only touches shutdown. The merge conflicted in 5 files against our tree (Dispatch.cpp, WrittenBuffers.cpp, PacketExecution.cpp, Submission.cpp, ShaderResources.cpp), all because of our local changes. The only code fix it needed was our own noteLabelStore signature in commitLabel/commitDmaStore. Env: APS5_PROFILE_DRAW=1, APS5_TEXTURE_CACHE_MIB=8192, APS5_PIPELINE_CACHE_ENTRIES=4096, APS5_BINDLESS_SLOTS=48. Shader cache warm. The level is still CPU-bound on queue 0.

Two runs per side. Numbers are medians of the 10 s windows in the steady state:

base (runs 240, 242) with #1202 (runs 247, 248)
presents per 10 s 13, 15.5 21, 17
fps 1.30, 1.55 2.10, 1.70
queue 0 draw packets per 10 s 151k, 154k 214k, 213k
Graphics::Draw on queue 0 per 10 s 2239, 2232 ms 1554, 1554 ms
queue 0 direct dispatch 60.0, 57.6 us 53.6, 49.7 us
app.elf CPU 378 % (run 242) 380 %, 379 %

Median fps goes from 1.43 to 1.90 (+33 %), and both PR runs beat both base runs. Queue 0 spends about 0.7 s less per 10 s in Graphics::Draw while getting through about 40 % more draw packets. The run logs show no new error signatures, and the picture is unchanged. Driver ctest -j1: 412/413. The one failure (guest_force_tls_destructor) also fails on main.

Unrelated to this PR: both PR runs still crash at teardown when the window closes (one double free, one SIGSEGV), and so does the base.

AI-assisted: yes (an agent ran the builds, the game runs and the measurements).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6055519050 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6055519050). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-08T08:03:10Z. --- Test result: Demon's Souls on Linux/NVIDIA with #1202 (and #1201 under it) on by default Setup: Nobara 44 x86-64, kernel 7.2, RTX 5070 Ti, NVIDIA 595.91.07. Demon's Souls (PPSA01341 v1.07), tutorial level (Outpost Passage), steady state for about 150 s after the HUD appears. Base is upstream main df16c4c2 plus #861, #864 and #157, our local fixes (including the NVIDIA dma-buf import guard) and a job-worker idle sleep for this title. The PR side is the same tree with this PR merged, plus #1071, which only touches shutdown. The merge conflicted in 5 files against our tree (Dispatch.cpp, WrittenBuffers.cpp, PacketExecution.cpp, Submission.cpp, ShaderResources.cpp), all because of our local changes. The only code fix it needed was our own `noteLabelStore` signature in `commitLabel`/`commitDmaStore`. Env: APS5_PROFILE_DRAW=1, APS5_TEXTURE_CACHE_MIB=8192, APS5_PIPELINE_CACHE_ENTRIES=4096, APS5_BINDLESS_SLOTS=48. Shader cache warm. The level is still CPU-bound on queue 0. Two runs per side. Numbers are medians of the 10 s windows in the steady state: | | base (runs 240, 242) | with #1202 (runs 247, 248) | |---|---|---| | presents per 10 s | 13, 15.5 | 21, 17 | | fps | 1.30, 1.55 | 2.10, 1.70 | | queue 0 draw packets per 10 s | 151k, 154k | 214k, 213k | | Graphics::Draw on queue 0 per 10 s | 2239, 2232 ms | 1554, 1554 ms | | queue 0 direct dispatch | 60.0, 57.6 us | 53.6, 49.7 us | | app.elf CPU | 378 % (run 242) | 380 %, 379 % | Median fps goes from 1.43 to 1.90 (+33 %), and both PR runs beat both base runs. Queue 0 spends about 0.7 s less per 10 s in Graphics::Draw while getting through about 40 % more draw packets. The run logs show no new error signatures, and the picture is unchanged. Driver ctest -j1: 412/413. The one failure (guest_force_tls_destructor) also fails on main. Unrelated to this PR: both PR runs still crash at teardown when the window closes (one double free, one SIGSEGV), and so does the base. AI-assisted: yes (an agent ran the builds, the game runs and the measurements).
fisherjoey commented 2026-10-08 16:21:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-08T16:21:22Z.


@MichonGoddijn231849 a follow-up to the test result above, about your next step of keeping compute dispatches from draining the pipeline. On Demon's Souls that looks like the main remaining gap, so I wanted to check where you are with it before we write anything.

Per frame in the tutorial level (queue 0, same stack as above, ~2.2 fps, 448 ms on the worker):

GTA V (your thread) Demon's Souls
drawn draws ~1,800, nearly all pipelined 3,908, of which ~2,640 are DRAW_INDEX_INDIRECT and run inline on the worker
compute dispatches on queue 0 few 3,812 direct + 62 indirect, ~40-52 us each on the CPU
committer per draw ~23 us 21.6 us

The committer is ~4.6% busy here while the worker is pegged, so the time goes to the dispatch path and to indirect draws that #1201 doesn't pipeline. About 2.6k of the dispatches are one chain of small dispatches (program 0x248994d00, ~21 us of GPU each), and each one drains the pipeline before the next draw.

Two questions:

  • Are you working on dispatches that don't drain (or pipelining indirect draws)? If so I'll test your branch on this title rather than duplicate it.
  • If not, would you take that as a follow-up PR on top of #1202? I can bring Demon's Souls numbers on Linux/NVIDIA for either.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6064270963 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6064270963). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-08T16:21:22Z. --- @MichonGoddijn231849 a follow-up to the test result above, about your next step of keeping compute dispatches from draining the pipeline. On Demon's Souls that looks like the main remaining gap, so I wanted to check where you are with it before we write anything. Per frame in the tutorial level (queue 0, same stack as above, ~2.2 fps, 448 ms on the worker): | | GTA V (your thread) | Demon's Souls | |---|---|---| | drawn draws | ~1,800, nearly all pipelined | 3,908, of which ~2,640 are `DRAW_INDEX_INDIRECT` and run inline on the worker | | compute dispatches on queue 0 | few | 3,812 direct + 62 indirect, ~40-52 us each on the CPU | | committer per draw | ~23 us | 21.6 us | The committer is ~4.6% busy here while the worker is pegged, so the time goes to the dispatch path and to indirect draws that #1201 doesn't pipeline. About 2.6k of the dispatches are one chain of small dispatches (program `0x248994d00`, ~21 us of GPU each), and each one drains the pipeline before the next draw. Two questions: - Are you working on dispatches that don't drain (or pipelining indirect draws)? If so I'll test your branch on this title rather than duplicate it. - If not, would you take that as a follow-up PR on top of #1202? I can bring Demon's Souls numbers on Linux/NVIDIA for either.
MichonGoddijn231849 commented 2026-10-08 16:30:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-08T16:30:06Z.


@fisherjoey thanks, a second title with numbers is really useful, and the dispatch chain in Demon's Souls makes the case better than GTA V does.

  • Dispatches: yes, that's my next step. The design splits PrepareDispatch the way draws are split: stage A (capture, recompile, resources) on the worker, stage B (the recording) as an ordered commit item on the committer, so a dispatch no longer drains the pipeline; one reading what a preceding draw wrote stays ordered behind it. I'll put it up as a follow-up PR on top of #1202 and ping you when there's a branch to test on Demon's Souls.
  • Indirect draws: not on my list. A DRAW_INDEX_INDIRECT whose arguments the GPU wrote needs them read at commit time (or recorded as vkCmdDrawIndexedIndirect where the draw allows it). If you want to take that one, go ahead; it won't overlap with the dispatch work.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6064423707 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6064423707). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-08T16:30:06Z. --- @fisherjoey thanks, a second title with numbers is really useful, and the dispatch chain in Demon's Souls makes the case better than GTA V does. - Dispatches: yes, that's my next step. The design splits `PrepareDispatch` the way draws are split: stage A (capture, recompile, resources) on the worker, stage B (the recording) as an ordered commit item on the committer, so a dispatch no longer drains the pipeline; one reading what a preceding draw wrote stays ordered behind it. I'll put it up as a follow-up PR on top of #1202 and ping you when there's a branch to test on Demon's Souls. - Indirect draws: not on my list. A `DRAW_INDEX_INDIRECT` whose arguments the GPU wrote needs them read at commit time (or recorded as `vkCmdDrawIndexedIndirect` where the draw allows it). If you want to take that one, go ahead; it won't overlap with the dispatch work.
fisherjoey commented 2026-10-08 16:41:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-08T16:41:57Z.


Thanks, that split sounds right, and I'll test the dispatch branch on Demon's Souls when you ping. I'll take the indirect draws: DRAW_INDEX_INDIRECT with GPU-written arguments read at commit time, recorded as vkCmdDrawIndexedIndirect where the draw allows it. I'll put it up as a separate PR on top of #1202 with Demon's Souls numbers.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6064628714 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6064628714). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-08T16:41:57Z. --- Thanks, that split sounds right, and I'll test the dispatch branch on Demon's Souls when you ping. I'll take the indirect draws: `DRAW_INDEX_INDIRECT` with GPU-written arguments read at commit time, recorded as `vkCmdDrawIndexedIndirect` where the draw allows it. I'll put it up as a separate PR on top of #1202 with Demon's Souls numbers.
MichonGoddijn231849 commented 2026-10-08 18:23:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-08T18:23:04Z.


@fisherjoey the dispatch follow-up is up as #1747 (stacked on this one), behind APS5_PIPELINE_DISPATCH=1. A dispatch whose cache entry hits with a recipe becomes an ordered commit item; misses and reads of still-pending writes drain as before. GTA V shows no change (few dispatches between draws), so Demon's Souls numbers would be the real test.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6066347823 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6066347823). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-08T18:23:04Z. --- @fisherjoey the dispatch follow-up is up as #1747 (stacked on this one), behind `APS5_PIPELINE_DISPATCH=1`. A dispatch whose cache entry hits with a recipe becomes an ordered commit item; misses and reads of still-pending writes drain as before. GTA V shows no change (few dispatches between draws), so Demon's Souls numbers would be the real test.
fisherjoey commented 2026-10-08 22:55:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-08T22:55:22Z.


@MichonGoddijn231849 the indirect-draw part is up as #1896, stacked on this PR, behind APS5_PIPELINE_INDIRECT=1. On Demon's Souls it takes the level from 490 to 441 ms per frame across two 3+3 batches, with no argument-overlap drains (all of the title's indirect draws take the GPU-side path).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6070673519 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6070673519). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-08T22:55:22Z. --- @MichonGoddijn231849 the indirect-draw part is up as #1896, stacked on this PR, behind `APS5_PIPELINE_INDIRECT=1`. On Demon's Souls it takes the level from 490 to 441 ms per frame across two 3+3 batches, with no argument-overlap drains (all of the title's indirect draws take the GPU-side path).
MichonGoddijn231849 commented 2026-10-09 08:33:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-09T08:33:03Z.


Parked as a draft while I port the pipelined draw path onto #639. @fisherjoey thanks for #1896; once this stack is ported I'll ping you so it can follow on top.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6077391805 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6077391805). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-09T08:33:03Z. --- Parked as a draft while I port the pipelined draw path onto #639. @fisherjoey thanks for #1896; once this stack is ported I'll ping you so it can follow on top.
Raghav314 commented 2026-10-09 13:21:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-09T13:21:25Z.


Data point for the WordMask part of this: in Hades II (PPSA36082) gameplay on Linux / RTX 4090, ShaderMemory::Regions + TakeRecentRegions were about 18% of the draw thread (bit-by-bit run scan, every stage of every draw). With a word-at-a-time scan like yours they drop to about 1%, and gameplay went from 30-35 to about 45 fps.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6081737193 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6081737193). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-09T13:21:25Z. --- Data point for the WordMask part of this: in Hades II (PPSA36082) gameplay on Linux / RTX 4090, ShaderMemory::Regions + TakeRecentRegions were about 18% of the draw thread (bit-by-bit run scan, every stage of every draw). With a word-at-a-time scan like yours they drop to about 1%, and gameplay went from 30-35 to about 45 fps.
MichonGoddijn231849 commented 2026-10-09 14:39:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-09T14:39:42Z.


Thanks, that is a great data point. Good to see the word-at-a-time scan carry over to Hades II.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6083132651 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6083132651). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-09T14:39:42Z. --- Thanks, that is a great data point. Good to see the word-at-a-time scan carry over to Hades II.
JAB-dev commented 2026-10-11 16:44:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-11T16:44:19Z.


Tried the target refresh-proof memo on Hot Shots Golf 2 (PPSA06699, Windows, RTX 4070 SUPER), same demo loop, memo off vs on (2 runs each):

  • Average: 55.8 -> 57.0 and 55.1 -> 56.6 fps
  • Minimum: 33.1 -> 37.9 and 32.2 -> 37.6 fps
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6111302553 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6111302553). Originally posted by [JAB-dev](https://github.com/JAB-dev) on 2026-10-11T16:44:19Z. --- Tried the target refresh-proof memo on Hot Shots Golf 2 (PPSA06699, Windows, RTX 4070 SUPER), same demo loop, memo off vs on (2 runs each): - Average: 55.8 -> 57.0 and 55.1 -> 56.6 fps - Minimum: 33.1 -> 37.9 and 32.2 -> 37.6 fps
JAB-dev commented 2026-10-12 21:35:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-12T21:35:54Z.


Vampire Survivors (PPSA21703, Windows 11, RTX 4070 SUPER) with the pipelined draws on, against plain main.

  • main alone: about 25-28 FPS in heavy scenes (late run, many enemies and projectiles).
  • With this stack (#1193, #1201, #1202): 48-58 FPS over a 26-minute run at level 89 (clip in the Vampire Survivors discussion, #3745).
  • In the heaviest late-game scenes it still drops to about 38-40 FPS. There the worker thread and the committer thread are both near full, so the remaining cost is CPU-side.

Menus and level-up screens hold 60 FPS.

Second title on Windows after Hot Shots Golf 2, and the first where the stack is the difference between about 25 and about 50.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6133052589 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6133052589). Originally posted by [JAB-dev](https://github.com/JAB-dev) on 2026-10-12T21:35:54Z. --- Vampire Survivors (PPSA21703, Windows 11, RTX 4070 SUPER) with the pipelined draws on, against plain `main`. - `main` alone: about 25-28 FPS in heavy scenes (late run, many enemies and projectiles). - With this stack (#1193, #1201, #1202): 48-58 FPS over a 26-minute run at level 89 (clip in the Vampire Survivors discussion, #3745). - In the heaviest late-game scenes it still drops to about 38-40 FPS. There the worker thread and the committer thread are both near full, so the remaining cost is CPU-side. Menus and level-up screens hold 60 FPS. Second title on Windows after Hot Shots Golf 2, and the first where the stack is the difference between about 25 and about 50.
MichonGoddijn231849 commented 2026-10-13 16:02:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-13T16:02:17Z.


Rebased onto current main (a56c905df), on top of the rebased #1201 (#494 → #1191 → #1193 → #1201 → #1202). main moved a lot under this one, so I ported it rather than replaying it: the pipeline identity path, the snapshot ring with fresh copies and moved buffers, the code hash memo and the defaults are in. main has its own storage-image refresh proof now, so this PR's memo is gone. The shared draw-stage result and the two memos that never paid are left out. Details are in the description.

The DMA pipeline being on by default exposed a real bug: a pipelined DMA_DATA fill skipped the HTILE and CMASK notes from #374 and #419 (agc_driver_depth_fast_clear_submit failed). That's fixed in its own commit. The agc_* suite passes with the defaults and with the switches off.

@JAB-dev thanks for the Hot Shots Golf 2 and Vampire Survivors runs. These numbers were before the rebase, so a re-run on this head would be welcome.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6149732847 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6149732847). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-13T16:02:17Z. --- Rebased onto current `main` (a56c905df), on top of the rebased #1201 (#494 → #1191 → #1193 → #1201 → #1202). `main` moved a lot under this one, so I ported it rather than replaying it: the pipeline identity path, the snapshot ring with fresh copies and moved buffers, the code hash memo and the defaults are in. `main` has its own storage-image refresh proof now, so this PR's memo is gone. The shared draw-stage result and the two memos that never paid are left out. Details are in the description. The DMA pipeline being on by default exposed a real bug: a pipelined `DMA_DATA` fill skipped the HTILE and CMASK notes from #374 and #419 (`agc_driver_depth_fast_clear_submit` failed). That's fixed in its own commit. The `agc_*` suite passes with the defaults and with the switches off. @JAB-dev thanks for the Hot Shots Golf 2 and Vampire Survivors runs. These numbers were before the rebase, so a re-run on this head would be welcome.
winstrex commented 2026-10-13 17:11:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by winstrex on 2026-10-13T17:11:49Z.


The Pathless (PPSA01825, 02.000.000), main menu. Windows 11, RTX 5070 Ti, WinLibs GCC 15.2.0 Release. Base is main c422b57fb + #4491 (needed to reach the menu); the change is the same base with this PR's head merged, so the whole series (#494, #1191, #1193, #1201, #1202) with its defaults. Both merged cleanly. APS5_TRACE_SECONDS window of 12 s at the menu, warm caches, runs alternated base/change, 3 valid runs per side (runs lost to the Wwise crash of #361 were repeated):

frame time FPS
base 113.5 ± 4.9 ms 8.82 ± 0.39
series 78.3 ± 1.1 ms 12.78 ± 0.19

The base of this batch came out slower than an earlier batch on the same build a few hours before (100.3 ± 2.8 ms, 9.98 ± 0.28 FPS); against that one the series is -22 ms per frame (+28 % FPS).

In one trace of each side, queue worker 0x0 goes from 97 % busy to 89 %, and the GPU from 26 % of the time busy (31.0 ms per present) to 39 % (30.3 ms per present), so the GPU now waits less but the CPU side is still the limit. Window captures look correct on both sides (the menu background animates, so I did not compare frames pixel by pixel), and the logs show no errors on either side.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6151018326 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6151018326). Originally posted by [winstrex](https://github.com/winstrex) on 2026-10-13T17:11:49Z. --- The Pathless (PPSA01825, 02.000.000), main menu. Windows 11, RTX 5070 Ti, WinLibs GCC 15.2.0 Release. Base is `main` c422b57fb + #4491 (needed to reach the menu); the change is the same base with this PR's head merged, so the whole series (#494, #1191, #1193, #1201, #1202) with its defaults. Both merged cleanly. `APS5_TRACE_SECONDS` window of 12 s at the menu, warm caches, runs alternated base/change, 3 valid runs per side (runs lost to the Wwise crash of #361 were repeated): | | frame time | FPS | |---|---|---| | base | 113.5 ± 4.9 ms | 8.82 ± 0.39 | | series | 78.3 ± 1.1 ms | 12.78 ± 0.19 | The base of this batch came out slower than an earlier batch on the same build a few hours before (100.3 ± 2.8 ms, 9.98 ± 0.28 FPS); against that one the series is -22 ms per frame (+28 % FPS). In one trace of each side, queue worker 0x0 goes from 97 % busy to 89 %, and the GPU from 26 % of the time busy (31.0 ms per present) to 39 % (30.3 ms per present), so the GPU now waits less but the CPU side is still the limit. Window captures look correct on both sides (the menu background animates, so I did not compare frames pixel by pixel), and the logs show no errors on either side.
MichonGoddijn231849 commented 2026-10-13 17:20:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-13T17:20:06Z.


One more fix folded into the main commit: the pipeline identity memo held a thread_local with a destructor, which prx_thread_local_destructors refuses (MinGW frees those before they run). It uses ShaderRecompiler::ThreadOwned now, like the rest of the driver. prx_thread_local_destructors and the agc_* suite pass on Windows.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6151166671 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6151166671). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-13T17:20:06Z. --- One more fix folded into the main commit: the pipeline identity memo held a `thread_local` with a destructor, which `prx_thread_local_destructors` refuses (MinGW frees those before they run). It uses `ShaderRecompiler::ThreadOwned` now, like the rest of the driver. `prx_thread_local_destructors` and the `agc_*` suite pass on Windows.
fma-rc commented 2026-10-13 18:16:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-13T18:16:16Z.


Astro's Playroom (PPSA01325) does not get past its loading screen with this PR here (Linux, RTX 5080). Head fda7dbf04 plus the include from my comment on #1191, which it still needs to build on Linux, against its merge base a56c905df:

reached the level
merge base 2 of 3, at 96 and 99 s (one segfault at 44 s)
this PR 0 of 3: two sat until my 420 s limit, one aborted at 48 s

The abort is AGC graphics: a CMASK fast clear of a DCC color target, whose clear belongs in its DCC keys, was recorded.

In a fourth run I took all thread stacks 90 s after the log went silent. The driver thread is in Driver::dispatch -> GpuMutexType::lock(), the pipeline thread is in DrawPipeline::run -> Driver::commitDraw -> GpuMutexType::lock(), and the submitting guest thread waits in Driver::holdFlipBehindWorker. Every other driver thread is idle in its condition wait.

The previous head 823722d0d did the same in 7 runs (6 at the limit, 1 abort). 490 of 490 agc|shader tests pass. With #1201 alone the title loads and runs at 6.4 to 6.6 FPS against 6.0.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6152166020 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6152166020). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-13T18:16:16Z. --- Astro's Playroom (PPSA01325) does not get past its loading screen with this PR here (Linux, RTX 5080). Head fda7dbf04 plus the include from my comment on #1191, which it still needs to build on Linux, against its merge base a56c905df: | | reached the level | |---|---| | merge base | 2 of 3, at 96 and 99 s (one segfault at 44 s) | | this PR | 0 of 3: two sat until my 420 s limit, one aborted at 48 s | The abort is `AGC graphics: a CMASK fast clear of a DCC color target, whose clear belongs in its DCC keys, was recorded`. In a fourth run I took all thread stacks 90 s after the log went silent. The driver thread is in `Driver::dispatch` -> `GpuMutexType::lock()`, the pipeline thread is in `DrawPipeline::run` -> `Driver::commitDraw` -> `GpuMutexType::lock()`, and the submitting guest thread waits in `Driver::holdFlipBehindWorker`. Every other driver thread is idle in its condition wait. The previous head 823722d0d did the same in 7 runs (6 at the limit, 1 abort). 490 of 490 `agc|shader` tests pass. With #1201 alone the title loads and runs at 6.4 to 6.6 FPS against 6.0.
JAB-dev commented 2026-10-13 18:17:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-13T18:17:25Z.


Re-run on the rebased head (fda7dbf04) against main at a56c905df, Windows 11, RTX 4070 SUPER, 1080p:

  • Besiege (PPSA20313): 20.1 -> 33.1 FPS
  • Hot Shots Golf 2 (PPSA06699), 3D course: 19.5 -> 36.6 FPS (menus stay at 60)
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6152186345 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6152186345). Originally posted by [JAB-dev](https://github.com/JAB-dev) on 2026-10-13T18:17:25Z. --- Re-run on the rebased head (`fda7dbf04`) against `main` at `a56c905df`, Windows 11, RTX 4070 SUPER, 1080p: - Besiege (PPSA20313): 20.1 -> 33.1 FPS - Hot Shots Golf 2 (PPSA06699), 3D course: 19.5 -> 36.6 FPS (menus stay at 60)
oneandonlydean commented 2026-10-14 00:10:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T00:10:32Z.


Before the pipeline can be on by default:

  • the loading hang fma-rc reported above (dispatch and the committer both in GpuMutexType::lock(), the guest in holdFlipBehindWorker) and the CMASK-of-DCC abort;
  • a failed commit is printed and skipped (DrawPipeline.cpp:126-131), while main rethrows from the packet (PacketExecution.cpp:292-295). It should fail the same way, so agc_driver and agc_driver_pm4_failure pass with the pipeline on instead of being run with it off;
  • the CB metadata pass in precheckDraw ordered behind the queued draws, as you noted on #1201.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6157893087 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6157893087). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T00:10:32Z. --- Before the pipeline can be on by default: - the loading hang fma-rc reported above (dispatch and the committer both in `GpuMutexType::lock()`, the guest in `holdFlipBehindWorker`) and the CMASK-of-DCC abort; - a failed commit is printed and skipped (`DrawPipeline.cpp:126-131`), while main rethrows from the packet (`PacketExecution.cpp:292-295`). It should fail the same way, so `agc_driver` and `agc_driver_pm4_failure` pass with the pipeline on instead of being run with it off; - the CB metadata pass in `precheckDraw` ordered behind the queued draws, as you noted on #1201.
fisherjoey commented 2026-10-14 00:42:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-14T00:42:05Z.


Moving this here from #1895, as @oneandonlydean asked.

With this stack, a direct draw on queue 0 becomes a commit item and the packet worker moves on. An indirect draw (DRAW_INDIRECT, DRAW_INDEX_INDIRECT, DRAW_INDEX_INDIRECT_MULTI) still drains the pipeline and records Graphics::Draw inline on the worker, under the GPU mutex (the DrainReason::Indirect drain at the top of Driver::draw).

Most of Demon's Souls' draws are indirect, so most of its draw recording stays on the worker. Numbers from the tutorial level on Linux, RTX 5070 Ti, APS5_PROFILE_DRAW=1, per 10 s, on this PR's head as of 10-08 (before the 10-13 rebase):

  • DRAW_INDEX_INDIRECT: ~223k packets, 4.6 s of queue-0 time. Direct draw packets (DRAW_INDEX_OFFSET_2): ~19k.
  • Committer: 27k commits at 18 us, 5 % busy.
  • Graphics::Draw on the worker: 1.8-1.9 s.
  • Queue 0 is 96-97 % of the frame (470 of 490 ms).

All of these take the GPU-side argument path ([indirect] gpu-side, cpu-side 0), so the drain isn't protecting a CPU read of the arguments.

#1896 (draft) enqueues indirect draws as commit items and drains only when the argument range or the count dword overlaps a pending write. On the 10-08 head that took the frame from 490 to 441 ms. I'm rebasing it onto fda7dbf04 so its diff is only the indirect-draw files, and will post new Linux NVIDIA numbers there.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6158278583 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6158278583). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-14T00:42:05Z. --- Moving this here from #1895, as @oneandonlydean asked. With this stack, a direct draw on queue 0 becomes a commit item and the packet worker moves on. An indirect draw (`DRAW_INDIRECT`, `DRAW_INDEX_INDIRECT`, `DRAW_INDEX_INDIRECT_MULTI`) still drains the pipeline and records `Graphics::Draw` inline on the worker, under the GPU mutex (the `DrainReason::Indirect` drain at the top of `Driver::draw`). Most of Demon's Souls' draws are indirect, so most of its draw recording stays on the worker. Numbers from the tutorial level on Linux, RTX 5070 Ti, `APS5_PROFILE_DRAW=1`, per 10 s, on this PR's head as of 10-08 (before the 10-13 rebase): - `DRAW_INDEX_INDIRECT`: ~223k packets, 4.6 s of queue-0 time. Direct draw packets (`DRAW_INDEX_OFFSET_2`): ~19k. - Committer: 27k commits at 18 us, 5 % busy. - `Graphics::Draw` on the worker: 1.8-1.9 s. - Queue 0 is 96-97 % of the frame (470 of 490 ms). All of these take the GPU-side argument path (`[indirect] gpu-side`, cpu-side 0), so the drain isn't protecting a CPU read of the arguments. #1896 (draft) enqueues indirect draws as commit items and drains only when the argument range or the count dword overlaps a pending write. On the 10-08 head that took the frame from 490 to 441 ms. I'm rebasing it onto fda7dbf04 so its diff is only the indirect-draw files, and will post new Linux NVIDIA numbers there. AI-assisted: yes
fisherjoey commented 2026-10-14 01:13:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-14T01:13:22Z.


agc_driver_pattern_buffer_fill fails intermittently on this head when other agc tests run at the same time. Alone it passes.

Setup: Linux (Nobara 44, kernel 7.2), RTX 5070 Ti, driver 595.91.07, GCC 16.2, Release, ANYPS5_ENABLE_SPIRV_TOOLS=OFF. Each run is the test binary started directly while ctest -j5 -R agc -E pattern_buffer_fill loops in the background.

tree failed
main a56c905df (this stack's base) 0 of 80
this PR, fda7dbf04 19 of 80
fda7dbf04 + #1896 14 of 80

Every failure is the same line:

AGC graphics: fill did not observe preceding GPU results and labels at 0

That is the second half of PatternBufferFill.cpp: the labels to Control[0], Control[1] and Pattern[0] written between the two fills.

Switches on fda7dbf04, 30 runs each under the same load:

switch failed
none 5 of 30
APS5_PIPELINE_DMA=0 6 of 30
APS5_PIPELINED_DRAWS=0 0 of 30
APS5_PIPELINE_DRAIN_FILLS=1 0 of 30

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6158653702 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6158653702). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-14T01:13:22Z. --- `agc_driver_pattern_buffer_fill` fails intermittently on this head when other agc tests run at the same time. Alone it passes. Setup: Linux (Nobara 44, kernel 7.2), RTX 5070 Ti, driver 595.91.07, GCC 16.2, Release, `ANYPS5_ENABLE_SPIRV_TOOLS=OFF`. Each run is the test binary started directly while `ctest -j5 -R agc -E pattern_buffer_fill` loops in the background. | tree | failed | |---|---| | `main` a56c905df (this stack's base) | 0 of 80 | | this PR, fda7dbf04 | 19 of 80 | | fda7dbf04 + #1896 | 14 of 80 | Every failure is the same line: ``` AGC graphics: fill did not observe preceding GPU results and labels at 0 ``` That is the second half of `PatternBufferFill.cpp`: the labels to `Control[0]`, `Control[1]` and `Pattern[0]` written between the two fills. Switches on fda7dbf04, 30 runs each under the same load: | switch | failed | |---|---| | none | 5 of 30 | | `APS5_PIPELINE_DMA=0` | 6 of 30 | | `APS5_PIPELINED_DRAWS=0` | 0 of 30 | | `APS5_PIPELINE_DRAIN_FILLS=1` | 0 of 30 | AI-assisted: yes
fisherjoey commented 2026-10-14 04:53:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-14T04:53:37Z.


Demon's Souls stalls before the title screen on this head on Linux with NVIDIA. APS5_PIPELINE_DRAIN_FILLS=1 makes it go away. That switch also fixed the pattern_buffer_fill failure I posted above, so the two may be the same race. They don't match exactly: APS5_PIPELINED_DRAWS=0 fixed the test but doesn't fix this stall.

Setup: Linux (Nobara 44, kernel 7.2), RTX 5070 Ti, driver 595.91.07, GCC 16.2, Release, ANYPS5_ENABLE_SPIRV_TOOLS=OFF. Every run is a cold boot (empty shader cache), capped at 150 to 240 s, with no input, so the game stops at the title. The build is fda7dbf04 alone, with no other PRs merged. It does contain my #1896, but that only runs with APS5_PIPELINE_INDIRECT=1, which none of these runs set.

build / switch runs shaders compiled frames presented title
main 7a0c838ca 1 5544 title at 13 fps by t+123 yes
main 7a0c838ca + #5181 1 5544 title at 17 fps by t+123 yes
fda7dbf04 2 3992 2, still 2 at t+214 no
fda7dbf04, APS5_PIPELINED_DRAWS=0 1 3992 2 no
fda7dbf04, APS5_PIPELINE_DRAIN_FILLS=1 2 5544 title at 12 to 13 fps (the other run's FPS readout was blank) yes
fda7dbf04, APS5_TRACE_GPU=1 1 5544 title at 14 fps yes

The same stop (4025 shaders, 2 frames) also shows up three more times with #758 merged on top, with and without #5181, so those merges don't cause it.

When it stops, the main loop has started and ResourcePool::GatherResourceFileInfo() has finished (after 108 to 136 s). After that, nothing more compiles and no frame is presented, and the log shows no error. In a stack dump at t+200 the game's worker fibers are still running in game code. All seven AGC queue threads are in Driver::run → execute → waitMemory → PollSleep, but runs that reach the title show that same picture, so the dump does not identify the stuck wait.

With APS5_TRACE_GPU=1, which prints every wait, the game reached the title. That fits a race between the pipelined fill and the label or wait that follows it.

I don't have the address of the stuck wait yet. The driver's WAIT_REG_MEM timeout report does not fire here: WaitMemory.cpp:356 restarts the timer whenever packetsInFlight != 0, so the 1 s report at :361 is never reached while other queues have work in flight. A local build that never restarts the timer reached the title in its only run, so it didn't catch the stall either. Its long waits were all compute queues waiting for the game to set a flag to 1, and each one cleared.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6161187576 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6161187576). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-14T04:53:37Z. --- Demon's Souls stalls before the title screen on this head on Linux with NVIDIA. `APS5_PIPELINE_DRAIN_FILLS=1` makes it go away. That switch also fixed the `pattern_buffer_fill` failure I posted above, so the two may be the same race. They don't match exactly: `APS5_PIPELINED_DRAWS=0` fixed the test but doesn't fix this stall. Setup: Linux (Nobara 44, kernel 7.2), RTX 5070 Ti, driver 595.91.07, GCC 16.2, Release, `ANYPS5_ENABLE_SPIRV_TOOLS=OFF`. Every run is a cold boot (empty shader cache), capped at 150 to 240 s, with no input, so the game stops at the title. The build is fda7dbf04 alone, with no other PRs merged. It does contain my #1896, but that only runs with `APS5_PIPELINE_INDIRECT=1`, which none of these runs set. | build / switch | runs | shaders compiled | frames presented | title | |---|---|---|---|---| | main 7a0c838ca | 1 | 5544 | title at 13 fps by t+123 | yes | | main 7a0c838ca + #5181 | 1 | 5544 | title at 17 fps by t+123 | yes | | fda7dbf04 | 2 | 3992 | 2, still 2 at t+214 | no | | fda7dbf04, `APS5_PIPELINED_DRAWS=0` | 1 | 3992 | 2 | no | | fda7dbf04, `APS5_PIPELINE_DRAIN_FILLS=1` | 2 | 5544 | title at 12 to 13 fps (the other run's FPS readout was blank) | yes | | fda7dbf04, `APS5_TRACE_GPU=1` | 1 | 5544 | title at 14 fps | yes | The same stop (4025 shaders, 2 frames) also shows up three more times with #758 merged on top, with and without #5181, so those merges don't cause it. When it stops, the main loop has started and `ResourcePool::GatherResourceFileInfo()` has finished (after 108 to 136 s). After that, nothing more compiles and no frame is presented, and the log shows no error. In a stack dump at t+200 the game's worker fibers are still running in game code. All seven AGC queue threads are in `Driver::run` → `execute` → `waitMemory` → `PollSleep`, but runs that reach the title show that same picture, so the dump does not identify the stuck wait. With `APS5_TRACE_GPU=1`, which prints every wait, the game reached the title. That fits a race between the pipelined fill and the label or wait that follows it. I don't have the address of the stuck wait yet. The driver's WAIT_REG_MEM timeout report does not fire here: `WaitMemory.cpp:356` restarts the timer whenever `packetsInFlight != 0`, so the 1 s report at `:361` is never reached while other queues have work in flight. A local build that never restarts the timer reached the title in its only run, so it didn't catch the stall either. Its long waits were all compute queues waiting for the game to set a flag to 1, and each one cleared. AI-assisted: yes
fma-rc commented 2026-10-14 07:00:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-14T07:00:33Z.


A data point on a part of this PR that does not need the pipeline. A draw-snapshot arena like the one here (AllocateDrawSnapshot, small snapshots sliced from one buffer per batch) also pays off when the driver thread records draws inline, as it does on main.

Astro's Playroom (PPSA01325), heavy first-level scene, RTX 5080, Linux, upstream's trace with 3 s windows (no dropped events): on main 00f4b3351 plus eight local draw-thread changes, frame p50 is 84.3 to 88.1 ms over five runs with the arena and 95.8 ms in one run with only the arena taken out. Plain main is at 133 ms. The captured frames show the same picture.

Since the pipeline is held for the hang and the abort, the arena might be able to land on its own first.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6162802906 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6162802906). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-14T07:00:33Z. --- A data point on a part of this PR that does not need the pipeline. A draw-snapshot arena like the one here (`AllocateDrawSnapshot`, small snapshots sliced from one buffer per batch) also pays off when the driver thread records draws inline, as it does on `main`. Astro's Playroom (PPSA01325), heavy first-level scene, RTX 5080, Linux, upstream's trace with 3 s windows (no dropped events): on `main` 00f4b3351 plus eight local draw-thread changes, frame p50 is 84.3 to 88.1 ms over five runs with the arena and 95.8 ms in one run with only the arena taken out. Plain `main` is at 133 ms. The captured frames show the same picture. Since the pipeline is held for the hang and the abort, the arena might be able to land on its own first.
MichonGoddijn231849 commented 2026-10-14 08:36:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-14T08:36:22Z.


Thanks all, this is exactly what the stack needed. @winstrex @JAB-dev thanks for the numbers.

Before the pipeline can be on by default, in the order I'll take them:

  1. The fill race (@fisherjoey's agc_driver_pattern_buffer_fill, 19 of 80 here against 0 on main). I see the same intermittent failure on my side (fill did not observe preceding GPU results and labels at 0). That APS5_PIPELINE_DRAIN_FILLS=1 fixes it says a pipelined fill is ordered behind queued draws by its label but not by the writes it must see. This is probably also behind Demon's Souls stalling before its title screen.
  2. Astro's Playroom (@fma-rc): the hang with dispatch and the committer both in GpuMutexType::lock() and the guest in holdFlipBehindWorker, and the CMASK-of-DCC abort. The abort looks like the pipelined DMA_DATA fill path again: a fast clear recorded for a DCC target whose clear belongs in its keys.
  3. A failed commit rethrows from the packet, as main does (PacketExecution.cpp:292-295), so agc_driver and agc_driver_pm4_failure run with the pipeline on.
  4. The CB metadata pass in precheckDraw ordered behind the queued draws (owed from #1201).

@fisherjoey, indirect draws draining the pipeline: agreed, that's where Demon's Souls' draws go. It's a follow-up after this stack (the indirect arguments have to be read after the draws queued before them), not part of this PR.

@fma-rc thanks for the draw-snapshot arena data point on main. If it holds without the pipeline, it could go in on its own ahead of the stack.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6164329821 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6164329821). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-14T08:36:22Z. --- Thanks all, this is exactly what the stack needed. @winstrex @JAB-dev thanks for the numbers. Before the pipeline can be on by default, in the order I'll take them: 1. **The fill race** (@fisherjoey's `agc_driver_pattern_buffer_fill`, 19 of 80 here against 0 on `main`). I see the same intermittent failure on my side (`fill did not observe preceding GPU results and labels at 0`). That `APS5_PIPELINE_DRAIN_FILLS=1` fixes it says a pipelined fill is ordered behind queued draws by its label but not by the writes it must see. This is probably also behind Demon's Souls stalling before its title screen. 2. **Astro's Playroom** (@fma-rc): the hang with dispatch and the committer both in `GpuMutexType::lock()` and the guest in `holdFlipBehindWorker`, and the CMASK-of-DCC abort. The abort looks like the pipelined `DMA_DATA` fill path again: a fast clear recorded for a DCC target whose clear belongs in its keys. 3. **A failed commit rethrows** from the packet, as `main` does (`PacketExecution.cpp:292-295`), so `agc_driver` and `agc_driver_pm4_failure` run with the pipeline on. 4. **The CB metadata pass** in `precheckDraw` ordered behind the queued draws (owed from #1201). @fisherjoey, indirect draws draining the pipeline: agreed, that's where Demon's Souls' draws go. It's a follow-up after this stack (the indirect arguments have to be read after the draws queued before them), not part of this PR. @fma-rc thanks for the draw-snapshot arena data point on `main`. If it holds without the pipeline, it could go in on its own ahead of the stack.
oneandonlydean commented 2026-10-14 18:29:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T18:29:52Z.


@MichonGoddijn231849 there were two bugs in the pipelined fill path, both in Driver::fillBuffer (BufferFill.cpp):

  • A pattern fill reads its count and pattern from guest memory on the worker, while the labels or stores that write them can still be queued behind the committer. Under load it reads the old values: that is the pattern_buffer_fill failure (5 of 30 runs on fda7dbf04 here, 0 of 30 with the fix).
  • The same fill still holds the GPU lock (inputLock) when it calls Enqueue. With the pipeline full, Enqueue waits for the committer, and the committer's next item waits for that lock. That deadlock matches @fma-rc's stacks: commitDraw and dispatch both in GpuMutexType::lock(), the queue-0 worker in Enqueue's condition wait.

The fix drains only when a queued item writes the fill's input range (the same check the waits use), releases the input lock before Enqueue, and makes Enqueue throw if it has to wait for room while its thread holds the GPU lock. I pushed it to this branch as c653e9ea1d1, one commit on top of fda7dbf04, with a test that fails both ways without it (tests/execution/PipelinedFill.cpp). Drop or reshape it if you'd rather do it differently. The Linux build also needs @fma-rc's HostThreadLocal.hpp include fix from #1191 (it sits inside #ifdef _WIN32 in GuestBufferMemory.cpp); I left that to #1191.

@fisherjoey could you run Demon's Souls again on that commit, including one run with APS5_PIPELINED_DRAWS=0? The pipeline can't deadlock with that setting, so if that run still stops at 3992 shaders, the stall has another cause in the stack.

@fma-rc agreed. The arena is ready on its own without the switches (perf/draw-snapshot-arena-1014), and I'll open it once I have clean numbers.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6175452079 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6175452079). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T18:29:52Z. --- @MichonGoddijn231849 there were two bugs in the pipelined fill path, both in `Driver::fillBuffer` (BufferFill.cpp): - A pattern fill reads its count and pattern from guest memory on the worker, while the labels or stores that write them can still be queued behind the committer. Under load it reads the old values: that is the `pattern_buffer_fill` failure (5 of 30 runs on fda7dbf04 here, 0 of 30 with the fix). - The same fill still holds the GPU lock (`inputLock`) when it calls `Enqueue`. With the pipeline full, `Enqueue` waits for the committer, and the committer's next item waits for that lock. That deadlock matches @fma-rc's stacks: `commitDraw` and `dispatch` both in `GpuMutexType::lock()`, the queue-0 worker in `Enqueue`'s condition wait. The fix drains only when a queued item writes the fill's input range (the same check the waits use), releases the input lock before `Enqueue`, and makes `Enqueue` throw if it has to wait for room while its thread holds the GPU lock. I pushed it to this branch as c653e9ea1d1, one commit on top of fda7dbf04, with a test that fails both ways without it (`tests/execution/PipelinedFill.cpp`). Drop or reshape it if you'd rather do it differently. The Linux build also needs @fma-rc's `HostThreadLocal.hpp` include fix from #1191 (it sits inside `#ifdef _WIN32` in `GuestBufferMemory.cpp`); I left that to #1191. @fisherjoey could you run Demon's Souls again on that commit, including one run with `APS5_PIPELINED_DRAWS=0`? The pipeline can't deadlock with that setting, so if that run still stops at 3992 shaders, the stall has another cause in the stack. @fma-rc agreed. The arena is ready on its own without the switches (`perf/draw-snapshot-arena-1014`), and I'll open it once I have clean numbers.
mrfelek commented 2026-10-14 19:26:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-14T19:26:02Z.


Diablo II: Resurrected on this PR: about +51% presents per second

Title: PPSA03912, 01.039.000, standing in the Rogue Encampment
System: Linux, RTX 3080 Ti (NVIDIA 615.71.09)
This PR's head: c653e9ea1, pipeline on by default

The PR conflicts with current main, so I ran it on its own base: main a56c905df plus the four PRs the title needs, cherry-picked (#5003, #5205, #1186, #5779).

  • A = that base
  • B = A plus this PR

Results

Presents per 10 s over the steady windows, three alternating runs each (warm-up windows of 1 to 13 left out):

Run A B
1 37.2 57.0
2 36.9 55.8
3 37.0 54.6
Mean 37.0 55.8

That is about +51%. Six more launches of B later gave the same steady state (54 to 58).

What changed besides the frame rate

  • GPU idle gap per frame: 153 to 344 ms in A, 21 to 27 ms in B (runs without a startup dip).
  • Draw-cache lookups per 10 s: 83 to 96k in A, 141 to 147k in B.
  • Draw-cache hits per 10 s: A 83 to 144, B 136 to 141. That does not explain the gain, so it comes from the committer.

Stability while the world loads

I launched both builds repeatedly and classified each launch (11 with the PR, 6 without):

Launches Reached steady state The title's own load-time crash Problem that only showed with the PR
A 6 6 0 0
B 11 8 1 2

The title's own crash is a null lookup in its hash-table code (app.elf +0x1b99787); it also happens on other builds, about once in five launches. The two PR-only problems were both during loading:

  1. An abort, extended register semantics are not implemented (offset dword 0x31a731a7), thrown from VideoOutDriver::presentLoop.
  2. A stall: once the world started loading, presents per 10 s went 119, 12, 15, 1 and stayed there for over three minutes (no abort). One thread sat at about 99% CPU while about 70 others waited. A perf sample of that thread shows it in the game's own code (addresses inside app.elf plus guest memset and memmove), not in the driver. I could not get a usable core dump (it came out truncated), so I cannot say which routine it was.

One more thing

It does not build on Linux as pushed. GuestBufferMemory.cpp includes prx/libc/include/HostThreadLocal.hpp only under #ifdef _WIN32, but uses HostThreadLocal<ReadableRanges, ReadableRangesStorage>() at line 2061, so the compiler says "'HostThreadLocal' was not declared in this scope". I included the header unconditionally for these runs.

AI-assisted; the runs are from my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6176525558 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6176525558). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-14T19:26:02Z. --- ## Diablo II: Resurrected on this PR: about +51% presents per second **Title:** PPSA03912, 01.039.000, standing in the Rogue Encampment **System:** Linux, RTX 3080 Ti (NVIDIA 615.71.09) **This PR's head:** c653e9ea1, pipeline on by default The PR conflicts with current `main`, so I ran it on its own base: `main` a56c905df plus the four PRs the title needs, cherry-picked (#5003, #5205, #1186, #5779). - **A** = that base - **B** = A plus this PR ### Results Presents per 10 s over the steady windows, three alternating runs each (warm-up windows of 1 to 13 left out): | Run | A | B | |---|--:|--:| | 1 | 37.2 | 57.0 | | 2 | 36.9 | 55.8 | | 3 | 37.0 | 54.6 | | **Mean** | **37.0** | **55.8** | That is about **+51%**. Six more launches of B later gave the same steady state (54 to 58). ### What changed besides the frame rate - GPU idle gap per frame: 153 to 344 ms in A, 21 to 27 ms in B (runs without a startup dip). - Draw-cache lookups per 10 s: 83 to 96k in A, 141 to 147k in B. - Draw-cache hits per 10 s: A 83 to 144, B 136 to 141. That does not explain the gain, so it comes from the committer. ### Stability while the world loads I launched both builds repeatedly and classified each launch (11 with the PR, 6 without): | | Launches | Reached steady state | The title's own load-time crash | Problem that only showed with the PR | |---|--:|--:|--:|--:| | A | 6 | 6 | 0 | 0 | | B | 11 | 8 | 1 | 2 | The title's own crash is a null lookup in its hash-table code (`app.elf` +0x1b99787); it also happens on other builds, about once in five launches. The two PR-only problems were both during loading: 1. An abort, `extended register semantics are not implemented (offset dword 0x31a731a7)`, thrown from `VideoOutDriver::presentLoop`. 2. A stall: once the world started loading, presents per 10 s went 119, 12, 15, 1 and stayed there for over three minutes (no abort). One thread sat at about 99% CPU while about 70 others waited. A `perf` sample of that thread shows it in the game's own code (addresses inside `app.elf` plus guest `memset` and `memmove`), not in the driver. I could not get a usable core dump (it came out truncated), so I cannot say which routine it was. ### One more thing It does not build on Linux as pushed. `GuestBufferMemory.cpp` includes `prx/libc/include/HostThreadLocal.hpp` only under `#ifdef _WIN32`, but uses `HostThreadLocal<ReadableRanges, ReadableRangesStorage>()` at line 2061, so the compiler says "'HostThreadLocal' was not declared in this scope". I included the header unconditionally for these runs. AI-assisted; the runs are from my machine.
mrfelek commented 2026-10-14 21:40:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-14T21:40:32Z.


Diablo II with this PR: the GPU is now the limit (Nsight Systems trace)

Follow-up to the numbers above, same setup: PPSA03912 in the Rogue Encampment, Linux, RTX 3080 Ti (NVIDIA 615.71.09), this PR's head c653e9ea1 on main a56c905df plus the four PRs the title needs. Nsight Systems 2025.5, Vulkan trace, about 6 s in game with 44 presents (about 5.5 FPS).

What a frame does

Per frame (average) Calls Total in the capture
vkQueueSubmit ~60 2,651
vkCmdBindPipeline ~2,660 117,042
vkUpdateDescriptorSets ~3,150 138,805
vkAllocateDescriptorSets ~1,120 49,370
vkCreateBuffer ~400 17,703
vkCmdPipelineBarrier ~214 9,421

So there is about one pipeline bind per draw, a few thousand descriptor updates per frame, but few barriers.

Where the time goes

  • vkWaitForFences takes 2.3 s of the capture's 2.6 s of Vulkan API time (133 calls, about 17 ms each): the CPU spends most of its API time waiting for the GPU.
  • Merging every GPU workload range in the capture gives 100% busy over the whole window: the GPU timeline has no gaps.
  • nvidia-smi, 45 s in game: GPU utilization is 62% on plain main (mean, range 24 to 79%) and 86% with this PR (mean, range 50 to 100%).

So on main the title is limited by the CPU thread and the GPU waits for it; with the pipeline the CPU limit is mostly gone and the GPU is close to saturated. That puts the ceiling after this PR at roughly 155 ms of GPU time per frame (about 60 us for each of about 2,600 draws).

What I could not see

I have no GPU performance counters here (Nsight's GPU metrics need a driver permission I have not changed), so I cannot say which draws or passes make up that 155 ms. Candidates are the 3840x2160 targets, blending over large areas, and what each draw's sampled images need. If someone has a GPU capture tool, a frame of this title is a good case.

AI-assisted; the runs are from my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6179099032 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6179099032). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-14T21:40:32Z. --- ## Diablo II with this PR: the GPU is now the limit (Nsight Systems trace) Follow-up to the numbers above, same setup: PPSA03912 in the Rogue Encampment, Linux, RTX 3080 Ti (NVIDIA 615.71.09), this PR's head c653e9ea1 on `main` a56c905df plus the four PRs the title needs. Nsight Systems 2025.5, Vulkan trace, about 6 s in game with 44 presents (about 5.5 FPS). ### What a frame does | Per frame (average) | Calls | Total in the capture | |---|--:|--:| | `vkQueueSubmit` | ~60 | 2,651 | | `vkCmdBindPipeline` | ~2,660 | 117,042 | | `vkUpdateDescriptorSets` | ~3,150 | 138,805 | | `vkAllocateDescriptorSets` | ~1,120 | 49,370 | | `vkCreateBuffer` | ~400 | 17,703 | | `vkCmdPipelineBarrier` | ~214 | 9,421 | So there is about one pipeline bind per draw, a few thousand descriptor updates per frame, but few barriers. ### Where the time goes - `vkWaitForFences` takes 2.3 s of the capture's 2.6 s of Vulkan API time (133 calls, about 17 ms each): the CPU spends most of its API time waiting for the GPU. - Merging every GPU workload range in the capture gives 100% busy over the whole window: the GPU timeline has no gaps. - `nvidia-smi`, 45 s in game: GPU utilization is 62% on plain `main` (mean, range 24 to 79%) and **86% with this PR** (mean, range 50 to 100%). So on `main` the title is limited by the CPU thread and the GPU waits for it; with the pipeline the CPU limit is mostly gone and the GPU is close to saturated. That puts the ceiling after this PR at roughly 155 ms of GPU time per frame (about 60 us for each of about 2,600 draws). ### What I could not see I have no GPU performance counters here (Nsight's GPU metrics need a driver permission I have not changed), so I cannot say which draws or passes make up that 155 ms. Candidates are the 3840x2160 targets, blending over large areas, and what each draw's sampled images need. If someone has a GPU capture tool, a frame of this title is a good case. AI-assisted; the runs are from my machine.
mrfelek commented 2026-10-14 23:49:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-14T23:49:04Z.


Castlevania: Belmont's Curse on this PR: about +67% presents per second

Title: PPSA35399, 01.000.000 (Unity IL2CPP), in game after the opening cinematic
System: Linux, Ryzen 9 5950X, RTX 3080 Ti (NVIDIA 615.71.09)
This PR's head: c653e9ea1, on main a56c905df plus #5003, #5205, #1186 and #5779 (the same base as my Diablo II numbers above)
Also on both builds: #5456 (2D compare on 1D T#s) and c8662b6bc (alpha-to-coverage without a color target), because this title does not get to its first screen on a56c905df without them

Results

Each row is one run, about 2 minutes in game, steady-state windows of 10 s.

Build Presents per 10 s Draws per 10 s Time to record a draw FPS
Same base, without this PR 28–30 about 82k 49 µs 3.0
Same base, with this PR 47–56 (mostly 49–50) about 143k 30 µs 5.0
  • The PR records about 75% more draws per second, which is the whole gain: the title draws about 2,800 times per frame, so its frame rate is the draw rate divided by that.
  • The GPU still has room with the PR: about 58 ms busy and 140 ms idle per frame.
  • The same procedure on today's main (eea428ca8, without this PR) gives 35–36 presents per 10 s (3.5 FPS), so main has recovered part of the difference on its own. I have not rebased this PR onto it (it conflicts in 13 files).
  • One run per build, same scene right after skipping the cinematic.

Linux build

The PR does not build on Linux as pushed: GuestBufferMemory.cpp includes HostThreadLocal.hpp only under #ifdef _WIN32 (line 14) but uses HostThreadLocal at line 2061. This one-line change fixes it, and is the only change I made to the PR:

-#ifdef _WIN32
 #include "prx/libc/include/HostThreadLocal.hpp"
+#ifdef _WIN32
 #include <windows.h>

Stability matches what I reported above: this run was clean for about 2 minutes on each build.

AI-assisted; the runs are from my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6181027796 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6181027796). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-14T23:49:04Z. --- ## Castlevania: Belmont's Curse on this PR: about +67% presents per second **Title:** PPSA35399, 01.000.000 (Unity IL2CPP), in game after the opening cinematic **System:** Linux, Ryzen 9 5950X, RTX 3080 Ti (NVIDIA 615.71.09) **This PR's head:** c653e9ea1, on `main` a56c905df plus #5003, #5205, #1186 and #5779 (the same base as my Diablo II numbers above) **Also on both builds:** #5456 (2D compare on 1D T#s) and `c8662b6bc` (alpha-to-coverage without a color target), because this title does not get to its first screen on a56c905df without them ### Results Each row is one run, about 2 minutes in game, steady-state windows of 10 s. | Build | Presents per 10 s | Draws per 10 s | Time to record a draw | FPS | |---|---|---|---|---| | Same base, without this PR | 28–30 | about 82k | 49 µs | 3.0 | | Same base, with this PR | 47–56 (mostly 49–50) | about 143k | 30 µs | 5.0 | - The PR records about 75% more draws per second, which is the whole gain: the title draws about 2,800 times per frame, so its frame rate is the draw rate divided by that. - The GPU still has room with the PR: about 58 ms busy and 140 ms idle per frame. - The same procedure on today's `main` (eea428ca8, without this PR) gives 35–36 presents per 10 s (3.5 FPS), so `main` has recovered part of the difference on its own. I have not rebased this PR onto it (it conflicts in 13 files). - One run per build, same scene right after skipping the cinematic. ### Linux build The PR does not build on Linux as pushed: `GuestBufferMemory.cpp` includes `HostThreadLocal.hpp` only under `#ifdef _WIN32` (line 14) but uses `HostThreadLocal` at line 2061. This one-line change fixes it, and is the only change I made to the PR: ```diff -#ifdef _WIN32 #include "prx/libc/include/HostThreadLocal.hpp" +#ifdef _WIN32 #include <windows.h> ``` Stability matches what I reported above: this run was clean for about 2 minutes on each build. AI-assisted; the runs are from my machine.
github-actions[bot] commented 2026-10-15 03:31:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T03:31:19Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#4855 core/libs/prx/libSceAgcDriver/CMakeLists.txt L1642
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6183760311 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6183760311). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T03:31:19Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #4855 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L1642](https://github.com/boykopovar/AnyPS5/blob/e49ec591dc93c9e4dfaad8b6dbc0b995dd7830a0/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L1642) | | |
adriadam10 commented 2026-10-15 10:22:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T10:22:12Z.


Rebased after #1201 merged and reshaped (details in the description): this PR is now just the default switch (APS5_PIPELINED_DRAWS and APS5_EXACT_DRAW_WRITES on) plus the DMA_DATA metadata-fill fix. The snapshot ring and the other trims are out (they conflict with main's snapshot caches; the arena goes in its own PR). The base tests now run with the pipeline on, and *_inline variants cover the old path. Local agc|shader: 594/595 both on and off (only agc_driver_tessellation, red on main here), stress 33/33 ×20. Old head backed up at adriadam10/AnyPS5 backup/MichonGoddijn231849-perf-draw-path-trims.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6189846724 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1202#issuecomment-6189846724). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-15T10:22:12Z. --- Rebased after #1201 merged and reshaped (details in the description): this PR is now just the default switch (`APS5_PIPELINED_DRAWS` and `APS5_EXACT_DRAW_WRITES` on) plus the DMA_DATA metadata-fill fix. The snapshot ring and the other trims are out (they conflict with main's snapshot caches; the arena goes in its own PR). The base tests now run with the pipeline on, and `*_inline` variants cover the old path. Local `agc|shader`: 594/595 both on and off (only `agc_driver_tessellation`, red on main here), stress 33/33 ×20. Old head backed up at `adriadam10/AnyPS5` `backup/MichonGoddijn231849-perf-draw-path-trims`.
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!1202
No description provided.