feat(agc): keep driver pipeline caches and costly compute pipeline binaries across updates #13931

Merged
liskeee merged 6 commits from upstream-pr/13931 into main 2026-11-01 14:22:45 +00:00
liskeee commented 2026-10-31 13:06:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by liskeee on 2026-10-31T13:06:48Z.


What

A large compute pipeline can take many minutes to build in the driver (#13538 reports 13 minutes on an RTX 4090), and today every AnyPS5 update throws that work away. Two changes keep it, with review fixes on top:

1. fix(agc): preserve driver pipeline caches across source updates (+ fix(agc): skip unchanged periodic pipeline cache snapshots). The driver blob moves out of the source-version directory, which every AnyPS5 update replaces with a new one (the old one is removed after 14 unused days), and a compatible legacy blob is imported once. SaveNow and the final save now write a content change of equal size (it was skipped before), while the 10-second background save keeps its cheap size-and-header check and copies nothing while the cache is unchanged. An incomplete snapshot no longer replaces the previous file.

 <shader cache dir>/
 ├── <source version>/
-│   └── vk-pipelines-<vendor>-<device>-<driver>-<uuid>.bin   # not reused after an AnyPS5 update
+└── driver/
+    └── vk-pipelines-<vendor>-<device>-<driver>-<uuid>.bin   # kept; the driver still validates it

2. feat(agc): persist costly compute pipeline binaries (+ fix(agc): retain driver cache fallback after binary capture failures and fix(agc): disable pipeline binaries with outdated wrapping layers). Costly compute pipelines are stored with VK_KHR_pipeline_binary and restored without a rebuild:

 create compute pipeline
+  recipe >= APS5_PIPELINE_BINARY_MIN_WORDS (100000):
+    key = full recipe (SPIR-V, specialization, layout, flags, subgroup size)
+          + driver fingerprint + the extension's global key
+    stored binary, recipe and keys match -> create from the binary
+    no binary and no marker              -> build with capture (null pipeline cache, as pNext-09617 requires)
+      built in >= APS5_PIPELINE_BINARY_MIN_MS (1000) -> store the binary atomically
+      faster, or the capture failed      -> remember the recipe in a .bin.threshold file
   everything else, and marked recipes: vkCreateComputePipelines through the driver cache

Anything missing, corrupt, rejected or mismatched falls back to a normal build. APS5_NO_PIPELINE_BINARIES turns the store off. The store also stays off when an enabled VK_LAYER_KHRONOS_validation or VK_LAYER_LUNARG_gfxreconstruct is older than Vulkan 1.3.294, because such a layer wraps handles but does not know the extension's commands. A marker never replaces a captured binary. Lowering the time threshold retries a recipe that was below it, but not one whose capture failed; a driver update retries both, because the key holds the driver fingerprint.

Rollback: reverting the PR restores today's behaviour. At run time, APS5_NO_PIPELINE_BINARIES turns the binary store off (the driver cache stays in its new place), and deleting the cache directory resets both caches. Blast radius: compute pipeline creation and disk use. Nothing is evicted yet; the debt entry and USAGE.md say so first.

Overlap: #9508 replaces the compute creation call this touches, #11435 adds a pipeline-cache option beside the new store, and #7622 edits PipelineCache.cpp's includes. The pr-overlap bot also lists open PRs that touch neighbouring lines in VulkanDevice.cpp, Recorder.cpp, USAGE.md and the debt file. These are textual neighbours, not duplicates; I am happy to rebase on whichever lands first.

Tested

Windows 11 Pro 25H2 (build 26200), NVIDIA GeForce RTX 4080, driver 610.88.

  • Ratchet & Clank: Rift Apart (PPSA01474), functional check of the restore path on real content, not a performance measurement: in one run the store captured a 1,988,739-word compute pipeline ([pipeline-binary] built key=bb77041da96ad820 words=1988739), and the next run restored it from the store instead of building it again. This PR makes no frame-time claim, so there are no aps5-summary.jsonl lines; main cannot reach that pipeline in this title.
  • Synthetic tests (each well under 30 s): equal-size snapshot write, incomplete snapshot kept, periodic save without a copy while the cache is unchanged, also right after loading it (failed before the review fix), legacy blob import, key changes for each tested recipe and driver field, threshold persistence and lowering, competing writers (a below-threshold marker must not erase a captured binary), a failed capture remembered so the next run uses the driver cache (failed before the review fix), the layer guard (old validation or gfxreconstruct layers and failed enumeration switch the store off, other layers do not), rejection and corruption fallback, opt-out, missing entry points, and a cross-process capture, restore and corruption run through the real Vulkan path.
  • Validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1), selection agc_(pipeline_cache|pipeline_binary|pipeline_journal|driver_recorder|driver_pipeline_journal): main b8f0a6b202 14/14, this branch 19/19; zero VUID- and zero missing-layer messages in both.
  • AMD Radeon RX 6700 XT, driver 26.10.1, Windows 11 Enterprise (build 22621), run by @JJenkx at 8727a380d7: all 114 CTest entries of agc_driver_recorder_tests, agc_pipeline_binary_store_tests and agc_pipeline_cache_allocation_tests pass 3 of 3 runs with the validation layer, no VUIDs.
  • Full suite (at 8727a380d7): 3,171 passed. The failures in my restricted runner are permission errors in shared-memory, mlock and JIT-mapping tests, plus guest_wide_formatting (cp1250 zone name, #10987); none of them touches these files.
  • tools/check_conventions.py --base origin/main: all checks passed.

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4080, driver 610.88, Windows 11 Pro 25H2 (build 26200); AMD Radeon RX 6700 XT, driver 26.10.1, Windows 11 Enterprise (build 22621), run by @JJenkx at 8727a380d7
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5097768731 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13931). Originally posted by [liskeee](https://github.com/liskeee) on 2026-10-31T13:06:48Z. --- ### What A large compute pipeline can take many minutes to build in the driver (#13538 reports 13 minutes on an RTX 4090), and today every AnyPS5 update throws that work away. Two changes keep it, with review fixes on top: **1. `fix(agc): preserve driver pipeline caches across source updates`** (+ `fix(agc): skip unchanged periodic pipeline cache snapshots`). The driver blob moves out of the source-version directory, which every AnyPS5 update replaces with a new one (the old one is removed after 14 unused days), and a compatible legacy blob is imported once. `SaveNow` and the final save now write a content change of equal size (it was skipped before), while the 10-second background save keeps its cheap size-and-header check and copies nothing while the cache is unchanged. An incomplete snapshot no longer replaces the previous file. ```diff <shader cache dir>/ ├── <source version>/ -│ └── vk-pipelines-<vendor>-<device>-<driver>-<uuid>.bin # not reused after an AnyPS5 update +└── driver/ + └── vk-pipelines-<vendor>-<device>-<driver>-<uuid>.bin # kept; the driver still validates it ``` **2. `feat(agc): persist costly compute pipeline binaries`** (+ `fix(agc): retain driver cache fallback after binary capture failures` and `fix(agc): disable pipeline binaries with outdated wrapping layers`). Costly compute pipelines are stored with `VK_KHR_pipeline_binary` and restored without a rebuild: ```diff create compute pipeline + recipe >= APS5_PIPELINE_BINARY_MIN_WORDS (100000): + key = full recipe (SPIR-V, specialization, layout, flags, subgroup size) + + driver fingerprint + the extension's global key + stored binary, recipe and keys match -> create from the binary + no binary and no marker -> build with capture (null pipeline cache, as pNext-09617 requires) + built in >= APS5_PIPELINE_BINARY_MIN_MS (1000) -> store the binary atomically + faster, or the capture failed -> remember the recipe in a .bin.threshold file everything else, and marked recipes: vkCreateComputePipelines through the driver cache ``` Anything missing, corrupt, rejected or mismatched falls back to a normal build. `APS5_NO_PIPELINE_BINARIES` turns the store off. The store also stays off when an enabled `VK_LAYER_KHRONOS_validation` or `VK_LAYER_LUNARG_gfxreconstruct` is older than Vulkan 1.3.294, because such a layer wraps handles but does not know the extension's commands. A marker never replaces a captured binary. Lowering the time threshold retries a recipe that was below it, but not one whose capture failed; a driver update retries both, because the key holds the driver fingerprint. **Rollback:** reverting the PR restores today's behaviour. At run time, `APS5_NO_PIPELINE_BINARIES` turns the binary store off (the driver cache stays in its new place), and deleting the cache directory resets both caches. **Blast radius:** compute pipeline creation and disk use. Nothing is evicted yet; the debt entry and USAGE.md say so first. Overlap: #9508 replaces the compute creation call this touches, #11435 adds a pipeline-cache option beside the new store, and #7622 edits PipelineCache.cpp's includes. The pr-overlap bot also lists open PRs that touch neighbouring lines in VulkanDevice.cpp, Recorder.cpp, USAGE.md and the debt file. These are textual neighbours, not duplicates; I am happy to rebase on whichever lands first. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11 Pro 25H2 (build 26200), NVIDIA GeForce RTX 4080, driver 610.88. - **Ratchet & Clank: Rift Apart (PPSA01474)**, functional check of the restore path on real content, not a performance measurement: in one run the store captured a 1,988,739-word compute pipeline (`[pipeline-binary] built key=bb77041da96ad820 words=1988739`), and the next run restored it from the store instead of building it again. This PR makes no frame-time claim, so there are no `aps5-summary.jsonl` lines; `main` cannot reach that pipeline in this title. - **Synthetic tests** (each well under 30 s): equal-size snapshot write, incomplete snapshot kept, periodic save without a copy while the cache is unchanged, also right after loading it (failed before the review fix), legacy blob import, key changes for each tested recipe and driver field, threshold persistence and lowering, competing writers (a below-threshold marker must not erase a captured binary), a failed capture remembered so the next run uses the driver cache (failed before the review fix), the layer guard (old validation or gfxreconstruct layers and failed enumeration switch the store off, other layers do not), rejection and corruption fallback, opt-out, missing entry points, and a cross-process capture, restore and corruption run through the real Vulkan path. - **Validation layer** (`VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`), selection `agc_(pipeline_cache|pipeline_binary|pipeline_journal|driver_recorder|driver_pipeline_journal)`: `main` b8f0a6b202 14/14, this branch 19/19; zero `VUID-` and zero missing-layer messages in both. - **AMD Radeon RX 6700 XT**, driver 26.10.1, Windows 11 Enterprise (build 22621), run by @JJenkx at 8727a380d7: all 114 CTest entries of `agc_driver_recorder_tests`, `agc_pipeline_binary_store_tests` and `agc_pipeline_cache_allocation_tests` pass 3 of 3 runs with the validation layer, no VUIDs. - **Full suite** (at 8727a380d7): 3,171 passed. The failures in my restricted runner are permission errors in shared-memory, mlock and JIT-mapping tests, plus `guest_wide_formatting` (cp1250 zone name, #10987); none of them touches these files. - `tools/check_conventions.py --base origin/main`: all checks passed. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4080, driver 610.88, Windows 11 Pro 25H2 (build 26200); AMD Radeon RX 6700 XT, driver 26.10.1, Windows 11 Enterprise (build 22621), run by @JJenkx at 8727a380d7 - [x] AI-assisted: yes
MarcZX10 commented 2026-10-31 13:12:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T13:12:38Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The PR claims a pipeline-creation speed improvement but does not include the matched performance captures required by the repository contribution rules.

What I ran

Reviewed head 8727a380d7a8ff14a8a65b40c31ba3ef83a85864 against base cd087bd12c258cf6dbb82e203bafd20d9fe2596c; the precheck reports a clean merge preview. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No build or C++ tests were run locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13931
gh pr diff 13931 --repo boykopovar/AnyPS5

Results

Check Result
git diff --check Passed
Repository conventions and PR template Passed
Merge preview Clean against main at cd087bd12c258cf6dbb82e203bafd20d9fe2596c
ABI audit and test-quality helper Could not execute: the helper scripts are absent from the isolated PR checkout; this PR changes no exports and no Python tests
Hosted CI Intake, conventions, and labels passed on the exact head at the final refresh
Tests The PR description reports 18/18 focused Vulkan CTests on an RTX 4080 and 3,171 full-suite passes, with some unrelated restricted-runner failures. I did not independently run these tests.
Unedited precheck output
All conventions checks passed.
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13931-8727a380d7a8/head-8727a380d7a8-ab4a4570/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13931-8727a380d7a8/head-8727a380d7a8-ab4a4570/tools/pr_test_quality.py': [Errno 2] No such file or directory

git diff --check produced no output. The precheck report records both head and base unchanged at completion.

Findings

Blocking

The PR description claims that a 1,988,739-word pipeline took about 32 minutes to build and 202.7 ms to restore. The repository requires a speed claim to include aps5-summary.jsonl lines for main and the change from the same machine and scene, the corresponding traces, and the performance-report evidence. The PR currently provides driver log timings but no matched summary lines, trace attachments, or trace_digest.py output. Please add the required matched artifacts, or remove the unsupported speed claim and describe the measured scope accurately.

Non-blocking

None identified in this source review.

Sources

Not verified

I did not build or run the new C++ tests locally. The author-reported test results are not independently confirmed here; other GPUs and console behavior were not tested by me.

To get this to a good state

Add the matched main/PR summaries, traces, and digest output required for the speed claim, or revise the claim to match the evidence provided. I will rerun the relevant checks on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722843172 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13931#pullrequestreview-5722843172). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T13:12:38Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The PR claims a pipeline-creation speed improvement but does not include the matched performance captures required by the repository contribution rules. ## What I ran Reviewed head `8727a380d7a8ff14a8a65b40c31ba3ef83a85864` against base `cd087bd12c258cf6dbb82e203bafd20d9fe2596c`; the precheck reports a clean merge preview. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No build or C++ tests were run locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13931 gh pr diff 13931 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | `git diff --check` | Passed | | Repository conventions and PR template | Passed | | Merge preview | Clean against `main` at `cd087bd12c258cf6dbb82e203bafd20d9fe2596c` | | ABI audit and test-quality helper | Could not execute: the helper scripts are absent from the isolated PR checkout; this PR changes no exports and no Python tests | | Hosted CI | Intake, conventions, and labels passed on the exact head at the final refresh | | Tests | The PR description reports 18/18 focused Vulkan CTests on an RTX 4080 and 3,171 full-suite passes, with some unrelated restricted-runner failures. I did not independently run these tests. | <details><summary>Unedited precheck output</summary> ```text All conventions checks passed. /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13931-8727a380d7a8/head-8727a380d7a8-ab4a4570/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13931-8727a380d7a8/head-8727a380d7a8-ab4a4570/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` `git diff --check` produced no output. The precheck report records both head and base unchanged at completion. </details> ## Findings ### Blocking The PR description claims that a 1,988,739-word pipeline took about 32 minutes to build and 202.7 ms to restore. The repository requires a speed claim to include `aps5-summary.jsonl` lines for `main` and the change from the same machine and scene, the corresponding traces, and the performance-report evidence. The PR currently provides driver log timings but no matched summary lines, trace attachments, or `trace_digest.py` output. Please add the required matched artifacts, or remove the unsupported speed claim and describe the measured scope accurately. ### Non-blocking None identified in this source review. ## Sources - [Contribution rule for speed claims, pinned to the reviewed base](https://github.com/boykopovar/AnyPS5/blob/cd087bd12c258cf6dbb82e203bafd20d9fe2596c/CONTRIBUTING.md#L69) - [Performance report requirements, pinned to the reviewed base](https://github.com/boykopovar/AnyPS5/blob/cd087bd12c258cf6dbb82e203bafd20d9fe2596c/.github/ISSUE_TEMPLATE/performance.yml) ## Not verified I did not build or run the new C++ tests locally. The author-reported test results are not independently confirmed here; other GPUs and console behavior were not tested by me. ## To get this to a good state Add the matched `main`/PR summaries, traces, and digest output required for the speed claim, or revise the claim to match the evidence provided. I will rerun the relevant checks on the updated head.
MarcZX10 commented 2026-10-31 13:59:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T13:59:55Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The prior performance-report gap has been addressed, but the periodic saver now copies the full Vulkan cache under an exclusive lock every ten seconds even when nothing changed.

What I ran

Reviewed head 8727a380d7a8ff14a8a65b40c31ba3ef83a85864 against base cd087bd12c258cf6dbb82e203bafd20d9fe2596c; the live dependency/mergeability check passed and the PR head and base stayed unchanged during the precheck. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. No C++ compiler or build was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13931
git diff --check cd087bd12c258cf6dbb82e203bafd20d9fe2596c...8727a380d7a8ff14a8a65b40c31ba3ef83a85864

Results

Check Result
Diff check Passed
Conventions and PR template Passed
Live dependency and mergeability Passed
Export ABI and test-quality helpers Not executable in the isolated precheck checkout: those local helper files are absent there; this is not a PR-source failure.
C++ build and tests Not run; initial review checks do not build.
Precheck output
Conclusion: checks failed
Head unchanged at completion: True
Base unchanged at completion: True
All conventions checks passed.

The precheck's overall checks failed status is from its inability to find the optional local pr_abi_audit.py and pr_test_quality.py helpers in its isolated checkout; the diff, conventions, and live mergeability checks passed.

Findings

Blocking

PipelineCache::save(false, false) runs on the 10-second saver thread. The new path removes the previous unchanged-size/unchanged-header fast return, then takes PipelineCacheSynchronization::SnapshotLock and copies the entire VkPipelineCache payload with vkGetPipelineCacheData before comparing its hash with the settled header. That exclusive lock blocks LockForPipelineUse, so an unchanged large cache can stall pipeline creation on every saver tick. The later equality check avoids rewriting the file, but it occurs only after the full snapshot copy. Please restore a cheap unchanged check for periodic SaveUnlessBusy saves while retaining full-content comparison for explicit/final saves where same-size changes must be detected.

Non-blocking

None.

Sources

Not verified

  • Runtime cost on a large real driver cache; I have not run matched performance captures.
  • C++ build, CTest, GPU behavior, or console behavior.

To get this to a good state

Keep periodic saves from taking a full exclusive snapshot when both the cached size and on-disk header are unchanged, while preserving the same-size-change check for explicit/final saves. I will rerun the same checks on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5723059240 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13931#pullrequestreview-5723059240). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T13:59:55Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The prior performance-report gap has been addressed, but the periodic saver now copies the full Vulkan cache under an exclusive lock every ten seconds even when nothing changed. ## What I ran Reviewed head `8727a380d7a8ff14a8a65b40c31ba3ef83a85864` against base `cd087bd12c258cf6dbb82e203bafd20d9fe2596c`; the live dependency/mergeability check passed and the PR head and base stayed unchanged during the precheck. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. No C++ compiler or build was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13931 git diff --check cd087bd12c258cf6dbb82e203bafd20d9fe2596c...8727a380d7a8ff14a8a65b40c31ba3ef83a85864 ``` ## Results | Check | Result | |---|---| | Diff check | Passed | | Conventions and PR template | Passed | | Live dependency and mergeability | Passed | | Export ABI and test-quality helpers | Not executable in the isolated precheck checkout: those local helper files are absent there; this is not a PR-source failure. | | C++ build and tests | Not run; initial review checks do not build. | <details><summary>Precheck output</summary> ```text Conclusion: checks failed Head unchanged at completion: True Base unchanged at completion: True All conventions checks passed. ``` The precheck's overall `checks failed` status is from its inability to find the optional local `pr_abi_audit.py` and `pr_test_quality.py` helpers in its isolated checkout; the diff, conventions, and live mergeability checks passed. </details> ## Findings ### Blocking `PipelineCache::save(false, false)` runs on the 10-second saver thread. The new path removes the previous unchanged-size/unchanged-header fast return, then takes `PipelineCacheSynchronization::SnapshotLock` and copies the entire `VkPipelineCache` payload with `vkGetPipelineCacheData` before comparing its hash with the settled header. That exclusive lock blocks `LockForPipelineUse`, so an unchanged large cache can stall pipeline creation on every saver tick. The later equality check avoids rewriting the file, but it occurs only after the full snapshot copy. Please restore a cheap unchanged check for periodic `SaveUnlessBusy` saves while retaining full-content comparison for explicit/final saves where same-size changes must be detected. ### Non-blocking None. ## Sources - [Periodic save loop and full snapshot path at this head](https://github.com/boykopovar/AnyPS5/blob/8727a380d7a8ff14a8a65b40c31ba3ef83a85864/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineCache.cpp#L231-L330) - [Ten-second save interval and shared/exclusive synchronization locks](https://github.com/boykopovar/AnyPS5/blob/8727a380d7a8ff14a8a65b40c31ba3ef83a85864/core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp#L39-L46) - [Periodic saver and explicit/final save call sites](https://github.com/boykopovar/AnyPS5/blob/8727a380d7a8ff14a8a65b40c31ba3ef83a85864/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineCache.cpp#L331-L348) ## Not verified - Runtime cost on a large real driver cache; I have not run matched performance captures. - C++ build, CTest, GPU behavior, or console behavior. ## To get this to a good state Keep periodic saves from taking a full exclusive snapshot when both the cached size and on-disk header are unchanged, while preserving the same-size-change check for explicit/final saves. I will rerun the same checks on the updated head.
MarcZX10 commented 2026-10-31 16:53:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T16:53:21Z.

Review: APPROVED


Re-checked — new head, looks good

The updated head fixes the periodic cache snapshot regression and retains the driver-cache fallback when pipeline-binary capture fails.

What I ran

Reviewed head e65ab33664a8351420b0e7bf890e87d9c7abee12 against the PR base cd087bd12c258cf6dbb82e203bafd20d9fe2596c; the live merge preview is clean against current main at 474030e58424fefdb65e5df9f3820810fbb4553c. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. I did not invoke a compiler or build locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13931 --output-dir /tmp/anyps5-13931-update-precheck
gh pr checks 13931 -R boykopovar/AnyPS5

I also inspected the complete PR diff and update discussion, including the periodic-save logic, binary-capture failure markers, active-layer check, and added tests. The precheck ran its live dependency/mergeability check against current main.

Results

Check Result
Diff whitespace check Passed
Repository conventions and PR template Passed
Live dependency and mergeability preview Passed; clean against current main at 474030e58424fefdb65e5df9f3820810fbb4553c
Current GitHub checks conventions and labels passed on the exact head; no upstream build/test job is present in this check rollup
ABI and test-quality helper scripts Not executable in the isolated precheck checkout because those helper files are absent there; this PR changes no public exports or Python tests. I manually inspected the new C++ assertions.
Focused Vulkan tests Not run locally. The author reports 14/14 selected tests on main (b8f0a6b202) and 19/19 on this head using an RTX 4080 with validation enabled and no VUIDs.
NVIDIA GPU CI report Not run by me. TechLevelZero reports a successful build and 2,432 passed tests on this exact head, with five failures reported as not new (four also fail on its main baseline and one is unstable there), plus 51 skips. Its run merged the PR head onto older main 73f4f7e; it is useful corroborating evidence, not a current-main run.
C++ build, local CTest, physical console Not run by me
Unedited precheck command output

Conventions stdout:

All conventions checks passed.

ABI helper stderr:

/usr/bin/python3: can't open file '/tmp/anyps5-13931-update-precheck/head-e65ab33664a8-c37535f0/tools/pr_abi_audit.py': [Errno 2] No such file or directory

Test-quality helper stderr:

/usr/bin/python3: can't open file '/tmp/anyps5-13931-update-precheck/head-e65ab33664a8-c37535f0/tools/pr_test_quality.py': [Errno 2] No such file or directory

The precheck's recorded conclusions were diff_check: passed, conventions_and_pr_template: passed, and live_dependency_and_mergeability_check: passed. These are report statuses; the successful diff check produced no output.

Findings

Blocking

None found in the updated head.

Non-blocking

  • The periodic-save update restores the cheap unchanged-cache path while retaining full snapshots for explicit/final saves. The new cases cover unchanged reopened caches, same-size changes, and legacy import.
  • Capture failures now leave a marker so later runs use the ordinary driver-cache path instead of retrying capture on every run. The added tests cover extraction failure, oversized data, rejected capture, reopening, and a lowered time threshold.
  • The layer guard disables pipeline binaries if active-layer enumeration fails or an older validation/gfxreconstruct layer is present; its tests cover these branches. I did not independently reproduce the reported NVIDIA layer crash.

Sources

Not verified

  • I did not independently run the author-reported Vulkan CTests or the NVIDIA GPU CI suite.
  • No local C++ build/CTest, macOS/Linux test matrix, or physical-console behavior was run by me.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5723876978 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13931#pullrequestreview-5723876978). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T16:53:21Z. **Review:** APPROVED --- # Re-checked — new head, looks good The updated head fixes the periodic cache snapshot regression and retains the driver-cache fallback when pipeline-binary capture fails. ## What I ran Reviewed head `e65ab33664a8351420b0e7bf890e87d9c7abee12` against the PR base `cd087bd12c258cf6dbb82e203bafd20d9fe2596c`; the live merge preview is clean against current `main` at `474030e58424fefdb65e5df9f3820810fbb4553c`. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. I did not invoke a compiler or build locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13931 --output-dir /tmp/anyps5-13931-update-precheck gh pr checks 13931 -R boykopovar/AnyPS5 ``` I also inspected the complete PR diff and update discussion, including the periodic-save logic, binary-capture failure markers, active-layer check, and added tests. The precheck ran its live dependency/mergeability check against current `main`. ## Results | Check | Result | |---|---| | Diff whitespace check | Passed | | Repository conventions and PR template | Passed | | Live dependency and mergeability preview | Passed; clean against current `main` at `474030e58424fefdb65e5df9f3820810fbb4553c` | | Current GitHub checks | `conventions` and `labels` passed on the exact head; no upstream build/test job is present in this check rollup | | ABI and test-quality helper scripts | Not executable in the isolated precheck checkout because those helper files are absent there; this PR changes no public exports or Python tests. I manually inspected the new C++ assertions. | | Focused Vulkan tests | Not run locally. The author reports 14/14 selected tests on `main` (`b8f0a6b202`) and 19/19 on this head using an RTX 4080 with validation enabled and no VUIDs. | | NVIDIA GPU CI report | Not run by me. TechLevelZero reports a successful build and 2,432 passed tests on this exact head, with five failures reported as not new (four also fail on its `main` baseline and one is unstable there), plus 51 skips. Its run merged the PR head onto older `main` `73f4f7e`; it is useful corroborating evidence, not a current-main run. | | C++ build, local CTest, physical console | Not run by me | <details><summary>Unedited precheck command output</summary> Conventions stdout: ```text All conventions checks passed. ``` ABI helper stderr: ```text /usr/bin/python3: can't open file '/tmp/anyps5-13931-update-precheck/head-e65ab33664a8-c37535f0/tools/pr_abi_audit.py': [Errno 2] No such file or directory ``` Test-quality helper stderr: ```text /usr/bin/python3: can't open file '/tmp/anyps5-13931-update-precheck/head-e65ab33664a8-c37535f0/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` The precheck's recorded conclusions were `diff_check: passed`, `conventions_and_pr_template: passed`, and `live_dependency_and_mergeability_check: passed`. These are report statuses; the successful diff check produced no output. </details> ## Findings ### Blocking None found in the updated head. ### Non-blocking - The periodic-save update restores the cheap unchanged-cache path while retaining full snapshots for explicit/final saves. The new cases cover unchanged reopened caches, same-size changes, and legacy import. - Capture failures now leave a marker so later runs use the ordinary driver-cache path instead of retrying capture on every run. The added tests cover extraction failure, oversized data, rejected capture, reopening, and a lowered time threshold. - The layer guard disables pipeline binaries if active-layer enumeration fails or an older validation/gfxreconstruct layer is present; its tests cover these branches. I did not independently reproduce the reported NVIDIA layer crash. ## Sources - [Updated pipeline-cache save path](https://github.com/boykopovar/AnyPS5/blob/e65ab33664a8351420b0e7bf890e87d9c7abee12/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineCache.cpp) - [Capture fallback and layer compatibility logic](https://github.com/boykopovar/AnyPS5/blob/e65ab33664a8351420b0e7bf890e87d9c7abee12/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineBinaryStore.cpp) - [Updated regression tests](https://github.com/boykopovar/AnyPS5/blob/e65ab33664a8351420b0e7bf890e87d9c7abee12/core/libs/prx/libSceAgcDriver/tests/PipelineCacheFailures.cpp) - [Binary-store and layer-guard tests](https://github.com/boykopovar/AnyPS5/blob/e65ab33664a8351420b0e7bf890e87d9c7abee12/core/libs/prx/libSceAgcDriver/tests/PipelineBinaryStore.cpp) ## Not verified - I did not independently run the author-reported Vulkan CTests or the NVIDIA GPU CI suite. - No local C++ build/CTest, macOS/Linux test matrix, or physical-console behavior was run by me.
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!13931
No description provided.