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

Merged
oneandonlydean merged 1 commit from upstream-pr/14839 into main 2026-11-01 20:17:52 +00:00
oneandonlydean commented 2026-11-01 19:24:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-11-01T19:24:41Z.


What

Reverts #13931 (merge d8b60b46ed).

With the default settings (shader cache enabled), every Vulkan device creation on our NVIDIA test machine segfaults in the PipelineBinaryStore constructor, right after vkGetPipelineKeyKHR for the global key (PipelineBinaryStore.cpp:127) returns VK_SUCCESS. Ten agc_driver tests that set their own environment without ANYPS5_NO_SHADER_CACHE reach that path and crash on main, for example agc_driver_small_copy_sync and the two agc_driver_address_passes tests. CI did not catch it because it runs on lavapipe and most AGC tests disable the shader cache. APS5_NO_PIPELINE_BINARIES=1 avoids the crash.

Whether the cause is the driver or how the call is made is not established yet. This is a plain revert so main is green on NVIDIA again; @liskeee, the work is welcome back in a new PR, and we're happy to run a candidate on the same machine. Details follow on #13931.

Tested

CachyOS (Linux 7.2.3), NVIDIA GeForce RTX 4090, driver 610.57.04, default shader cache, no APS5_NO_* variables. Tree identical to this branch (main f2d874c1fd plus the #13879 revert from #14823 and this revert):

  • the ten crashing agc_driver tests: 10/10 pass
  • agc_driver_dcc_keys_first_write: 2/2 pass
  • full agc_driver suite: 841/841 pass

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
  • 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 4090, driver 610.57.04, CachyOS Linux 7.2.3
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5110738246 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14839). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-11-01T19:24:41Z. --- ### What Reverts #13931 (merge d8b60b46ed). With the default settings (shader cache enabled), every Vulkan device creation on our NVIDIA test machine segfaults in the `PipelineBinaryStore` constructor, right after `vkGetPipelineKeyKHR` for the global key (`PipelineBinaryStore.cpp:127`) returns `VK_SUCCESS`. Ten `agc_driver` tests that set their own environment without `ANYPS5_NO_SHADER_CACHE` reach that path and crash on main, for example `agc_driver_small_copy_sync` and the two `agc_driver_address_passes` tests. CI did not catch it because it runs on lavapipe and most AGC tests disable the shader cache. `APS5_NO_PIPELINE_BINARIES=1` avoids the crash. Whether the cause is the driver or how the call is made is not established yet. This is a plain revert so main is green on NVIDIA again; @liskeee, the work is welcome back in a new PR, and we're happy to run a candidate on the same machine. Details follow on #13931. ### Tested CachyOS (Linux 7.2.3), NVIDIA GeForce RTX 4090, driver 610.57.04, default shader cache, no `APS5_NO_*` variables. Tree identical to this branch (main f2d874c1fd plus the #13879 revert from #14823 and this revert): - the ten crashing `agc_driver` tests: 10/10 pass - `agc_driver_dcc_keys_first_write`: 2/2 pass - full `agc_driver` suite: 841/841 pass ### 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 (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file - [x] No notes, investigation `.md` files or images added to the repository - [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 4090, driver 610.57.04, CachyOS Linux 7.2.3 - [x] AI-assisted: yes
MarcZX10 commented 2026-11-01 19:37:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:37:26Z.

Review: COMMENTED


Reviewed — approval withheld pending validation evidence

The revert is internally consistent and removes the pipeline-binary path, but I cannot verify the required matched Vulkan validation results from the PR evidence.

What I ran

Reviewed head d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa against base e0caf1360035286bd22b9f2a3030e97b880ffb28; the exact-head merge preview is clean. Environment: Debian 12 x86_64, Python 3.11.2, GCC 12.2.0; I did not compile or build.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14839
git diff --check e0caf1360035286bd22b9f2a3030e97b880ffb28...d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa
git grep -n -i -E 'PipelineBinaryStore|VK_KHR_PIPELINE_BINARY|APS5_NO_PIPELINE_BINARIES|pipeline_binary_store_tests|PipelineBinaryRun' d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa -- core docs
python3 tools/pr_abi_audit.py --base e0caf1360035286bd22b9f2a3030e97b880ffb28 --head d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa --json
gh pr checks 14839 --repo boykopovar/AnyPS5

Results

Check Result Note
Diff and conventions passed Whitespace check and local/hosted conventions pass.
Merge preview passed Clean against the exact base.
Removed-feature reference scan passed No remaining pipeline-binary implementation, flag or test references in core/ or docs/.
Export audit not applicable No exported functions changed.
Precheck automation failed Its isolated snapshot lacks workspace-only ABI and test-quality helpers; local fallback found no export changes.
Hosted checks not run Windows is pending; conventions, intake, labels, report, eligibility and library-portability pass; Linux and specialized jobs are skipped.
NVIDIA and C++ tests not run The PR reports hardware results; I did not run a build, CTest or GPU test.
Precheck table and captured command output
| Check | Status | Command / reason |
|---|---|---|
| build_and_compile | not_applicable | `The precheck deliberately does not configure, build, or compile AnyPS5.` |
| diff_check | passed | `git diff --check e0caf1360035286bd22b9f2a3030e97b880ffb28...d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa` |
| conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base e0caf1360035286bd22b9f2a3030e97b880ffb28 --head d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa --title revert(agc): keep driver pipeline caches and costly compute pipeline binaries across updates (#13931) --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/pr-body.md` |
| changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base e0caf1360035286bd22b9f2a3030e97b880ffb28 --head d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa --json` |
| python_syntax | not_applicable | `No changed Python implementation files.` |
| related_python_unit_tests | not_applicable | `No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.` |
| python_test_registration | not_applicable | `No changed test_*.py files.` |
| live_dependency_and_mergeability_check | passed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14839 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/stack` |
| build_dependent_cpp_tests | not_applicable | `Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.` |
| test_quality_heuristics | failed | `/usr/bin/python3 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/head-d6f1eccfe2a3-966d71d1/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/head-d6f1eccfe2a3-966d71d1 --json core/libs/prx/libSceAgcDriver/CMakeLists.txt core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp core/libs/prx/libSceAgcDriver/Graphics/include/PipelineBinaryStore.hpp core/libs/prx/libSceAgcDriver/Graphics/include/PipelineCache.hpp core/libs/prx/libSceAgcDriver/Graphics/src/PipelineBinaryStore.cpp core/libs/prx/libSceAgcDriver/Graphics/src/PipelineCache.cpp core/libs/prx/libSceAgcDriver/tests/PipelineBinaryRun.cmake core/libs/prx/libSceAgcDriver/tests/PipelineBinaryStore.cpp core/libs/prx/libSceAgcDriver/tests/PipelineCacheFailures.cpp core/libs/prx/libSceAgcDriver/tests/Recorder.cpp core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake core/libs/prx/libSceAgcDriver/tests/cmake/agc_pipeline_binary_store_tests.cmake core/libs/prx/libSceAgcDriver/tests/cmake/agc_pipeline_cache_allocation_tests.cmake docs/dev/ARCHITECTURE.md docs/dev/ENVIRONMENT.md docs/dev/debt/libSceAgcDriver.md docs/user/USAGE.md` |
| negative_controls | not_applicable | `No changed Python test module in tools/ can be run as a no-build base-source control.` |

The isolated-checkout helper errors were:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/head-d6f1eccfe2a3-966d71d1/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-14839-d6f1eccfe2a3/head-d6f1eccfe2a3-966d71d1/tools/pr_test_quality.py': [Errno 2] No such file or directory

The workspace ABI audit fallback printed:

status: not_applicable
symbols: 0
findings: 0

The full source-reference scan returned no matches (reference_scan_exit=1); git diff --check returned diff_check_exit=0.

gh pr checks 14839 --repo boykopovar/AnyPS5:

windows	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952622943
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952624585
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952623916
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952624429
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952623975
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952624213
conventions	pass	16s	https://github.com/boykopovar/AnyPS5/actions/runs/41341593972/job/124952585995
eligibility	pass	7s	https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952585537
intake	pass	4s	https://github.com/boykopovar/AnyPS5/actions/runs/41341593954/job/124952586639
labels	pass	9s	https://github.com/boykopovar/AnyPS5/actions/runs/41341593995/job/124952586816
library-portability	pass	1m42s	https://github.com/boykopovar/AnyPS5/actions/runs/41341593908/job/124952584939
report	pass	1m25s	https://github.com/boykopovar/AnyPS5/actions/runs/41341594061/job/124952585584

Negative control

Assertion Change to code under test Did the new test fail?
Device creation no longer crashes on the affected NVIDIA path No local mutation or GPU execution; the PR reports the revert passes the affected tests. Could not be exercised locally.

Findings

Blocking

None found in the revert diff. It removes the vkGetPipelineKeyKHR pipeline-binary path, its device setup, tests, registrations and documentation together. The revert also restores the source-version-scoped driver cache, so that cache is no longer retained across AnyPS5 updates; this is consistent with the stated full rollback.

Non-blocking

The repository requires AGC changes to include comparable validation-layer runs on main and the change, with no missing-layer message or new VUIDs. The PR reports a 4090 run and says affected tests crash on main, but I could not verify the required exact commands and logs from the PR description. The Windows hosted job is also pending, so approval is withheld.

Sources

Not verified

No local C++ build, CTest run, NVIDIA or other GPU run, console behavior, or validation-layer log comparison was performed. The PR’s hardware test results are author-reported. The hosted Windows job was pending; Linux and specialized jobs were skipped.

To get this to a good state

Please add the focused ctest -V results and validation logs for the affected tests on main and this head, including the requested-layer and VUID checks, or explain why a matched baseline cannot complete because it crashes. Once the Windows job finishes and that evidence is available, I will recheck the exact head and the same requirements.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729880036 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14839#pullrequestreview-5729880036). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T19:37:26Z. **Review:** COMMENTED --- # Reviewed — approval withheld pending validation evidence The revert is internally consistent and removes the pipeline-binary path, but I cannot verify the required matched Vulkan validation results from the PR evidence. ## What I ran Reviewed head `d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa` against base `e0caf1360035286bd22b9f2a3030e97b880ffb28`; the exact-head merge preview is clean. Environment: Debian 12 x86_64, Python 3.11.2, GCC 12.2.0; I did not compile or build. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14839 git diff --check e0caf1360035286bd22b9f2a3030e97b880ffb28...d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa git grep -n -i -E 'PipelineBinaryStore|VK_KHR_PIPELINE_BINARY|APS5_NO_PIPELINE_BINARIES|pipeline_binary_store_tests|PipelineBinaryRun' d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa -- core docs python3 tools/pr_abi_audit.py --base e0caf1360035286bd22b9f2a3030e97b880ffb28 --head d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa --json gh pr checks 14839 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | Whitespace check and local/hosted conventions pass. | | Merge preview | passed | Clean against the exact base. | | Removed-feature reference scan | passed | No remaining pipeline-binary implementation, flag or test references in `core/` or `docs/`. | | Export audit | not applicable | No exported functions changed. | | Precheck automation | failed | Its isolated snapshot lacks workspace-only ABI and test-quality helpers; local fallback found no export changes. | | Hosted checks | not run | Windows is pending; conventions, intake, labels, report, eligibility and library-portability pass; Linux and specialized jobs are skipped. | | NVIDIA and C++ tests | not run | The PR reports hardware results; I did not run a build, CTest or GPU test. | <details><summary>Precheck table and captured command output</summary> ```text | Check | Status | Command / reason | |---|---|---| | build_and_compile | not_applicable | `The precheck deliberately does not configure, build, or compile AnyPS5.` | | diff_check | passed | `git diff --check e0caf1360035286bd22b9f2a3030e97b880ffb28...d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa` | | conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base e0caf1360035286bd22b9f2a3030e97b880ffb28 --head d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa --title revert(agc): keep driver pipeline caches and costly compute pipeline binaries across updates (#13931) --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/pr-body.md` | | changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base e0caf1360035286bd22b9f2a3030e97b880ffb28 --head d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa --json` | | python_syntax | not_applicable | `No changed Python implementation files.` | | related_python_unit_tests | not_applicable | `No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.` | | python_test_registration | not_applicable | `No changed test_*.py files.` | | live_dependency_and_mergeability_check | passed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14839 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/stack` | | build_dependent_cpp_tests | not_applicable | `Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.` | | test_quality_heuristics | failed | `/usr/bin/python3 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/head-d6f1eccfe2a3-966d71d1/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/head-d6f1eccfe2a3-966d71d1 --json core/libs/prx/libSceAgcDriver/CMakeLists.txt core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp core/libs/prx/libSceAgcDriver/Graphics/include/PipelineBinaryStore.hpp core/libs/prx/libSceAgcDriver/Graphics/include/PipelineCache.hpp core/libs/prx/libSceAgcDriver/Graphics/src/PipelineBinaryStore.cpp core/libs/prx/libSceAgcDriver/Graphics/src/PipelineCache.cpp core/libs/prx/libSceAgcDriver/tests/PipelineBinaryRun.cmake core/libs/prx/libSceAgcDriver/tests/PipelineBinaryStore.cpp core/libs/prx/libSceAgcDriver/tests/PipelineCacheFailures.cpp core/libs/prx/libSceAgcDriver/tests/Recorder.cpp core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake core/libs/prx/libSceAgcDriver/tests/cmake/agc_pipeline_binary_store_tests.cmake core/libs/prx/libSceAgcDriver/tests/cmake/agc_pipeline_cache_allocation_tests.cmake docs/dev/ARCHITECTURE.md docs/dev/ENVIRONMENT.md docs/dev/debt/libSceAgcDriver.md docs/user/USAGE.md` | | negative_controls | not_applicable | `No changed Python test module in tools/ can be run as a no-build base-source control.` | ``` The isolated-checkout helper errors were: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14839-d6f1eccfe2a3/head-d6f1eccfe2a3-966d71d1/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-14839-d6f1eccfe2a3/head-d6f1eccfe2a3-966d71d1/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` The workspace ABI audit fallback printed: ```text status: not_applicable symbols: 0 findings: 0 ``` The full source-reference scan returned no matches (`reference_scan_exit=1`); `git diff --check` returned `diff_check_exit=0`. `gh pr checks 14839 --repo boykopovar/AnyPS5`: ```text windows pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952622943 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952624585 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952623916 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952624429 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952623975 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952624213 conventions pass 16s https://github.com/boykopovar/AnyPS5/actions/runs/41341593972/job/124952585995 eligibility pass 7s https://github.com/boykopovar/AnyPS5/actions/runs/41341594027/job/124952585537 intake pass 4s https://github.com/boykopovar/AnyPS5/actions/runs/41341593954/job/124952586639 labels pass 9s https://github.com/boykopovar/AnyPS5/actions/runs/41341593995/job/124952586816 library-portability pass 1m42s https://github.com/boykopovar/AnyPS5/actions/runs/41341593908/job/124952584939 report pass 1m25s https://github.com/boykopovar/AnyPS5/actions/runs/41341594061/job/124952585584 ``` </details> ## Negative control | Assertion | Change to code under test | Did the new test fail? | |---|---|---| | Device creation no longer crashes on the affected NVIDIA path | No local mutation or GPU execution; the PR reports the revert passes the affected tests. | Could not be exercised locally. | ## Findings ### Blocking None found in the revert diff. It removes the `vkGetPipelineKeyKHR` pipeline-binary path, its device setup, tests, registrations and documentation together. The revert also restores the source-version-scoped driver cache, so that cache is no longer retained across AnyPS5 updates; this is consistent with the stated full rollback. ### Non-blocking The repository requires AGC changes to include comparable validation-layer runs on `main` and the change, with no missing-layer message or new VUIDs. The PR reports a 4090 run and says affected tests crash on `main`, but I could not verify the required exact commands and logs from the PR description. The Windows hosted job is also pending, so approval is withheld. ## Sources - [Removed pipeline-binary initialization and normal pipeline creation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/d6f1eccfe2a31dc4c0244808f3afd8fd73ed0faa/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp) - [Reverted global pipeline-key call at the merged #13931 commit](https://github.com/boykopovar/AnyPS5/blob/d8b60b46ed425b117b6fae18900fe6ab81ed6661/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineBinaryStore.cpp#L121-L128) - [AGC validation-layer test requirement at the PR base](https://github.com/boykopovar/AnyPS5/blob/e0caf1360035286bd22b9f2a3030e97b880ffb28/CONTRIBUTING.md#L73) - [Maintainer’s NVIDIA crash report on #13931](https://github.com/boykopovar/AnyPS5/pull/13931#issuecomment-6562731964) ## Not verified No local C++ build, CTest run, NVIDIA or other GPU run, console behavior, or validation-layer log comparison was performed. The PR’s hardware test results are author-reported. The hosted Windows job was pending; Linux and specialized jobs were skipped. ## To get this to a good state Please add the focused `ctest -V` results and validation logs for the affected tests on `main` and this head, including the requested-layer and VUID checks, or explain why a matched baseline cannot complete because it crashes. Once the Windows job finishes and that evidence is available, I will recheck the exact head and the same requirements.
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!14839
No description provided.