WIP: vk_pipeline_check: add no application cache mode #2170

Closed
leonida/mandy
ZroIsHere wants to merge 0 commits from fix/vk-pipeline-check-no-app-cache into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

ZroIsHere commented 2026-11-26 01:24:03 +00:00

Claimed: VK-PIPELINE-CHECK-NO-APP-CACHE

Follow-up to the driver-cache investigation in https://github.com/ubiquitarianism/leonida/issues/559.

Add --no-pipeline-cache to let vk_pipeline_check compare app-cache-enabled and app-cache-disabled pipeline creation. The option passes VK_NULL_HANDLE, skips cache creation and persistence, propagates through --isolate, and rejects a positional cache path. It leaves the default mode unchanged. The driver's own internal/on-disk caches may still affect results.

Validation: git diff --check passed. Tests and builds were not run.

AI-assisted: yes.

Claimed: VK-PIPELINE-CHECK-NO-APP-CACHE Follow-up to the driver-cache investigation in https://github.com/ubiquitarianism/leonida/issues/559. Add `--no-pipeline-cache` to let `vk_pipeline_check` compare app-cache-enabled and app-cache-disabled pipeline creation. The option passes `VK_NULL_HANDLE`, skips cache creation and persistence, propagates through `--isolate`, and rejects a positional cache path. It leaves the default mode unchanged. The driver's own internal/on-disk caches may still affect results. Validation: `git diff --check` passed. Tests and builds were not run. AI-assisted: yes.
Tyrannys commented 2026-11-27 14:51:11 +00:00

Independent verification of head 072a9275f merged into current main (ec91d695c), no conflicts. The PR says it was not built or run, so I built and ran it.

Machine: profile M (RTX 4070 SUPER 12 GB desktop, NVIDIA 621.01, Windows 11 Pro 26300, Ryzen 7 9800X3D), MSVC 14.52 (VS 2026, MSBuild generator), RelWithDebInfo, LEONIDA_SDL3_FETCH=ON. No game files.

Build: vk_pipeline_check builds with no new warnings. vk_pipeline_check_cli and vk_pipeline_check_stack pass.

Runs by hand on a small synthetic corpus I made (4 trivial compute shaders compiled with glslangValidator, index.json in the format pipeline_cache_seed_test uses; no game shaders):

run result
<dir> c.bin --no-pipeline-cache exit 2, --no-pipeline-cache cannot be combined with cache.bin
<dir> --no-pipeline-cache --cache-feedback 4/4 ok, 0 hits, 4 no hit reported, stderr says application pipeline cache: disabled (driver-internal caches may still be active), no file written
<dir> c.bin --cache-feedback (first) 4/4 ok, 0 hits, cache saved (25710 bytes)
<dir> c.bin --cache-feedback (second) 4/4 ok, 4 hits
<dir> --no-pipeline-cache --cache-feedback (after that) 4/4 ok, 0 hits
<dir> --no-pipeline-cache --stats st.csv 4/4 ok, statistics written
<dir> --no-pipeline-cache --isolate 4/4 ok

So on NVIDIA the option does what it says: the application cache hits go away even when the driver has just seen the same pipelines, and the default mode still hits.

Diff read: save_cache returns early when cache_path is empty, and the new check makes sure it is empty with --no-pipeline-cache, so vkGetPipelineCacheData is never called on a null cache. vkDestroyPipelineCache with VK_NULL_HANDLE is allowed.

Small doc point: docs/pipeline_check.md says --isolate is POSIX only, but --isolate ran here on Windows. That is not from this PR.

Full suite: this PR was tested together with #2173, #2152, #2170 and #2215 (they touch separate code) merged into main ec91d695c. ctest -j 6: 500/502; the two failures, xbox_present and d3d12_set_descriptor_heaps, fail on plain main here as well (known). Plain main baseline (first run in a fresh build dir): same two, plus xs_proxy_mock, d3d12_queue_handover_two_queues and timeouts in big_compile_gate and api_ref_state that still failed in a serial rerun there but pass on this tree. I take those as first-run noise on main, not as something this PR fixes. No new failure.

No problems found.

AI-assisted (Claude Code).

Independent verification of head `072a9275f` merged into current `main` (`ec91d695c`), no conflicts. The PR says it was not built or run, so I built and ran it. Machine: profile M (RTX 4070 SUPER 12 GB desktop, NVIDIA 621.01, Windows 11 Pro 26300, Ryzen 7 9800X3D), MSVC 14.52 (VS 2026, MSBuild generator), RelWithDebInfo, `LEONIDA_SDL3_FETCH=ON`. No game files. **Build:** `vk_pipeline_check` builds with no new warnings. `vk_pipeline_check_cli` and `vk_pipeline_check_stack` pass. **Runs by hand** on a small synthetic corpus I made (4 trivial compute shaders compiled with glslangValidator, `index.json` in the format `pipeline_cache_seed_test` uses; no game shaders): | run | result | |---|---| | `<dir> c.bin --no-pipeline-cache` | exit 2, `--no-pipeline-cache cannot be combined with cache.bin` | | `<dir> --no-pipeline-cache --cache-feedback` | 4/4 ok, `0 hits, 4 no hit reported`, stderr says `application pipeline cache: disabled (driver-internal caches may still be active)`, no file written | | `<dir> c.bin --cache-feedback` (first) | 4/4 ok, 0 hits, cache saved (25710 bytes) | | `<dir> c.bin --cache-feedback` (second) | 4/4 ok, **4 hits** | | `<dir> --no-pipeline-cache --cache-feedback` (after that) | 4/4 ok, 0 hits | | `<dir> --no-pipeline-cache --stats st.csv` | 4/4 ok, statistics written | | `<dir> --no-pipeline-cache --isolate` | 4/4 ok | So on NVIDIA the option does what it says: the application cache hits go away even when the driver has just seen the same pipelines, and the default mode still hits. **Diff read:** `save_cache` returns early when `cache_path` is empty, and the new check makes sure it is empty with `--no-pipeline-cache`, so `vkGetPipelineCacheData` is never called on a null cache. `vkDestroyPipelineCache` with `VK_NULL_HANDLE` is allowed. Small doc point: `docs/pipeline_check.md` says `--isolate` is POSIX only, but `--isolate` ran here on Windows. That is not from this PR. **Full suite:** this PR was tested together with #2173, #2152, #2170 and #2215 (they touch separate code) merged into `main` `ec91d695c`. `ctest -j 6`: 500/502; the two failures, `xbox_present` and `d3d12_set_descriptor_heaps`, fail on plain `main` here as well (known). Plain `main` baseline (first run in a fresh build dir): same two, plus `xs_proxy_mock`, `d3d12_queue_handover_two_queues` and timeouts in `big_compile_gate` and `api_ref_state` that still failed in a serial rerun there but pass on this tree. I take those as first-run noise on `main`, not as something this PR fixes. No new failure. No problems found. AI-assisted (Claude Code).
aslan2142 commented 2026-12-01 17:25:16 +00:00

Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.
Sign in to join this conversation.
No description provided.