perf(agc): allow disabling graphics library registration warmup #5551

Merged
fdfawef324 merged 1 commit from upstream-pr/5551 into main 2026-10-14 12:46:51 +00:00
fdfawef324 commented 2026-10-13 23:40:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-13T23:40:20Z.


What

Shader registration eagerly materializes default results for graphics-library warmup, including shaders that may never be used. Add APS5_NO_LIBRARY_PREBUILD=1 to skip that optional materialization and warmup. Required source handles, shader ABI preparation and compilation at actual use remain available. Unset, 0 and other values preserve existing behavior; the option is read once per process.

The change does not modify compiled shader contents, disk-cache format or dependencies.

Tested

Windows native Vulkan tests on the GPU below, using matched baseline and candidate builds on 30f961266:

  • Baseline unset/0: native readback passes. Baseline 1: fails specifically because registration-default materialization is retained.
  • Candidate unset/0/1: all pass in separate processes without skips, using the same prepared source handles, variant IDs and bounded push ranges for a 64×64 all-white GPU readback.
  • Existing prepared-graphics fixture passes, including null pixel, vertex, geometry and tessellation preparation.
  • Baseline/candidate SourceVersion is equal; Format29 is unchanged. Conventions, diff and test-registration checks pass.

No title memory or FPS improvement is claimed. A separate integration comparison reached the same Demon's Souls capture checkpoint in 152.6 seconds with either build; sampled peak private memory was 18.21 GB versus 18.05 GB, which is inconclusive. Dreaming Sarah's integration menu checkpoint remained at 59.94 FPS.

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; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none claimed
  • GPUs tested: NVIDIA GeForce RTX 3060 12 GB, driver 591.86 (32.0.15.9186), Vulkan 1.4.325, Windows Server 2025 10.0.26100
  • AI-assisted: yes

Co-Authored-By: Codex [email protected]

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4850870233 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5551). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-13T23:40:20Z. --- ### What Shader registration eagerly materializes default results for graphics-library warmup, including shaders that may never be used. Add `APS5_NO_LIBRARY_PREBUILD=1` to skip that optional materialization and warmup. Required source handles, shader ABI preparation and compilation at actual use remain available. Unset, `0` and other values preserve existing behavior; the option is read once per process. The change does not modify compiled shader contents, disk-cache format or dependencies. ### Tested Windows native Vulkan tests on the GPU below, using matched baseline and candidate builds on `30f961266`: - Baseline unset/`0`: native readback passes. Baseline `1`: fails specifically because registration-default materialization is retained. - Candidate unset/`0`/`1`: all pass in separate processes without skips, using the same prepared source handles, variant IDs and bounded push ranges for a 64×64 all-white GPU readback. - Existing prepared-graphics fixture passes, including null pixel, vertex, geometry and tessellation preparation. - Baseline/candidate SourceVersion is equal; Format29 is unchanged. Conventions, diff and test-registration checks pass. No title memory or FPS improvement is claimed. A separate integration comparison reached the same Demon's Souls capture checkpoint in 152.6 seconds with either build; sampled peak private memory was 18.21 GB versus 18.05 GB, which is inconclusive. Dreaming Sarah's integration menu checkpoint remained at 59.94 FPS. ### 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 - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none claimed - [x] GPUs tested: NVIDIA GeForce RTX 3060 12 GB, driver 591.86 (32.0.15.9186), Vulkan 1.4.325, Windows Server 2025 10.0.26100 - [x] AI-assisted: yes Co-Authored-By: Codex <[email protected]>
github-actions[bot] commented 2026-10-14 02:51:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T02:51:10Z.


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
#5631 core/libs/prx/libSceAgcDriver/tests/execution/PreparedGraphics.cpp L311, L356-357
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6159795943 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5551#issuecomment-6159795943). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T02:51:10Z. --- <!-- 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 | |---|---|---|---| | #5631 | `core/libs/prx/libSceAgcDriver/tests/execution/PreparedGraphics.cpp` [L311](https://github.com/boykopovar/AnyPS5/blob/fce397b509d4769c2d11833cd6d7cbfa6a3cf1bf/core/libs/prx/libSceAgcDriver/tests/execution/PreparedGraphics.cpp#L311), [L356-357](https://github.com/boykopovar/AnyPS5/blob/fce397b509d4769c2d11833cd6d7cbfa6a3cf1bf/core/libs/prx/libSceAgcDriver/tests/execution/PreparedGraphics.cpp#L356-L357) | | |
xXPBSXx commented 2026-10-14 03:43:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T03:43:34Z.


Windows test of #5551: Windows 10 (19045), MinGW-w64 GCC 15.2, Release, ninja -j 4, ctest called directly; GPU selected by the execution tests (Selected GPU log line): NVIDIA GeForce RTX 4080 SUPER. Tree: main a14ae8e23 + merge of PR head 1d4c372e3a4d4efc8c92bd33eedd66cbfd76c2d5 (local merge 39dc13ea4, no conflict). Logs: rtx5551_*_N.log, rtx5551_result.txt.
4 ctest targets, 3 runs each, exit code 0 in 12 of 12 runs: agc_driver_prepared_graphics, agc_driver_prepared_graphics_prebuild_0, agc_driver_prepared_graphics_prebuild_1, agc_driver_prepared_graphics_prebuild_unset.
Test selection: the PR changes a file under tests/execution/, which libSceAgcDriver/CMakeLists.txt:1132 globs (one ctest target per file), and registers its test variants in CMakeLists.txt; the four target names above are the ones ctest -N lists for them.
Not tested: that the new or changed tests fail without the change (no baseline run), other ctest targets, the AMD GPU unless named above, Linux, a title run.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6160391401 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5551#issuecomment-6160391401). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-14T03:43:34Z. --- Windows test of #5551: Windows 10 (19045), MinGW-w64 GCC 15.2, Release, `ninja -j 4`, ctest called directly; GPU selected by the execution tests (`Selected GPU` log line): NVIDIA GeForce RTX 4080 SUPER. Tree: `main` `a14ae8e23` + merge of PR head `1d4c372e3a4d4efc8c92bd33eedd66cbfd76c2d5` (local merge `39dc13ea4`, no conflict). Logs: `rtx5551_*_N.log`, `rtx5551_result.txt`. 4 ctest targets, 3 runs each, exit code 0 in 12 of 12 runs: `agc_driver_prepared_graphics`, `agc_driver_prepared_graphics_prebuild_0`, `agc_driver_prepared_graphics_prebuild_1`, `agc_driver_prepared_graphics_prebuild_unset`. Test selection: the PR changes a file under `tests/execution/`, which `libSceAgcDriver/CMakeLists.txt:1132` globs (one ctest target per file), and registers its test variants in `CMakeLists.txt`; the four target names above are the ones `ctest -N` lists for them. Not tested: that the new or changed tests fail without the change (no baseline run), other ctest targets, the AMD GPU unless named above, Linux, a title run. AI-assisted (Claude Code).
fdfawef324 commented 2026-10-14 03:59:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-14T03:59:32Z.


Thanks for the exact-head Windows reruns. The 12 successful PreparedGraphics runs add RTX 4080 SUPER coverage for the default and environment-switch variants on your merged build. I will keep that evidence separate from the baseline failure check and the untested title/performance cases, as you noted.

AI-assisted: yes.

Co-Authored-By: Codex [email protected]

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6160571669 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5551#issuecomment-6160571669). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-14T03:59:32Z. --- Thanks for the exact-head Windows reruns. The 12 successful PreparedGraphics runs add RTX 4080 SUPER coverage for the default and environment-switch variants on your merged build. I will keep that evidence separate from the baseline failure check and the untested title/performance cases, as you noted. AI-assisted: yes. Co-Authored-By: Codex <[email protected]>
adriadam10 commented 2026-10-14 12:15:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T12:15:10Z.


Checked on Linux (RADV): the PR merged onto main builds, and agc_driver_prepared_graphics plus the three new prebuild_{unset,0,1} tests pass. With the ShaderRegistry.cpp change reverted, prebuild_1 fails and unset/0 pass, as the description says. The default path is unchanged. Windows RTX 4080 SUPER runs from @xXPBSXx (12/12) cover the Windows side; merging once the full Build is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6168099565 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5551#issuecomment-6168099565). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-14T12:15:10Z. --- Checked on Linux (RADV): the PR merged onto main builds, and `agc_driver_prepared_graphics` plus the three new `prebuild_{unset,0,1}` tests pass. With the `ShaderRegistry.cpp` change reverted, `prebuild_1` fails and unset/`0` pass, as the description says. The default path is unchanged. Windows RTX 4080 SUPER runs from @xXPBSXx (12/12) cover the Windows side; merging once the full Build is green.
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!5551
No description provided.