Skip to content

vk_pipeline_check: add no application cache mode - #2170

Draft
ZroIsHere wants to merge 1 commit into
ProjectLeonida:mainfrom
ZroIsHere:fix/vk-pipeline-check-no-app-cache
Draft

ZroIsHere wants to merge 1 commit into
ProjectLeonida:mainfrom
ZroIsHere:fix/vk-pipeline-check-no-app-cache

Conversation

@ZroIsHere

Copy link
Copy Markdown
Contributor

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

Follow-up to the driver-cache investigation in #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

Tyrannys commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants