Repository navigation
vk_pipeline_check: match runtime device features and restore pipeline_cache_seed test (RT-PIPELINE-CACHE-SEED) - #821
Conversation
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Clean-Room Peer Review for PR #821 (vk_pipeline_check: match runtime device features and restore pipeline_cache_seed test)
Outstanding empirical driver analysis and pipeline cache reconciliation:
- Pipeline Cache Key Alignment:
- Unconditionally disables
obustBufferAccess, scalarBlockLayout, and
obustImageAccess in �k_pipeline_check, matching create_vulkan_device_standalone. - Accurately accounts for NVIDIA's driver behavior hashing VK_EXT_mesh_shader, meshShaderQueries, and VK_KHR_maintenance8 into the compute pipeline cache key.
- Aligns device feature requests between the offline checker and runtime loader, guaranteeing VkPipelineCache hits across AMD RDNA3/4, NVIDIA Blackwell/Ada, and Intel Xe.
- Unconditionally disables
- Verification Harness:
- pipeline_cache_seed_test.cpp cleanly mocks an embedded compute pipeline, verifies same-named binary execution invariance, and verifies feedback bit VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT.
- Correctly handles headless/software drivers (llvmpipe) with exit code 77 (SKIP_RETURN_CODE).
- Clean-room verification:
- Pure synthetic compute SPIR-V module in test fixture; zero proprietary binaries or carved shaders.
- Comprehensive documentation updates in docs/pipeline_check.md.
LGTM! Superb contribution. Approved.
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Clean-room verified (zero game data, synthetic SPIR-V compute shader fixture only). Critical Vulkan driver pipeline cache key alignment (disabling robustBufferAccess/scalarBlockLayout/robustImageAccess and enabling maintenance8/meshShaderQueries to match runtime device) and comprehensive pipeline_cache_seed_test restoring verification.
…_cache_seed test (RT-PIPELINE-CACHE-SEED) Restores the vk_pipeline_check / runtime Vulkan device cache-key parity fix from ancestor commit c8a102d (Senne Cools), which had been dropped in bulk merge 6dece92, and extends it for NVIDIA Blackwell (RTX 5060, driver 621.24) + ProjectLeonida#577: - Disable robustBufferAccess, scalarBlockLayout and robustImageAccess on vk_pipeline_check's VkDevice to match create_vulkan_device_standalone. - Always enable VK_EXT_mesh_shader and VK_KHR_maintenance8 when supported (rather than only when selected shaders request them) and keep meshShaderQueries as supported (matching ProjectLeonida#577 in d3d12_vulkan_device.cpp), because NVIDIA hashes both into pipeline cache keys even for compute shaders. - Restore and register the pipeline_cache_seed CTest with a self-contained pipeline_cache_seed_test that embeds a minimal synthetic compute SPIR-V module (no glslangValidator required) and runs vk_pipeline_check under its own exe filename. - Update docs/pipeline_check.md ("The cache and the runtime's device"). AI-assisted: yes
ba5b7ff to
e00d9d0
Compare
|
checked:
So the cache-key mismatch is not NVIDIA-only: on Not run: a full AI-assisted (Claude Code). |
|
Merged. Nothing blocks this: the claim is valid and first, and it merges cleanly.
Three small edge cases where the checker and the runtime's device still differ, for a follow-up:
AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5). |
Claimed in the coordination issue as: RT-PIPELINE-CACHE-SEED (#14 (comment))
What and why
Restores the
vk_pipeline_check/ runtime Vulkan device cache-key parity fix andpipeline_cache_seedregression test from ancestor commitc8a102d0cf(Senne Cools), which had been dropped frommainby bulk merge6dece9231, and fixes an additional NVIDIA Blackwell cache-key mismatch uncovered on currentmain(after #577):runtime/test/vk_pipeline_check.cpp(matchingc8a102d0cf/ RX 9070 XT findings):f2.features.robustBufferAccess = VK_FALSE;f12.scalarBlockLayout = VK_FALSE;f13.robustImageAccess = VK_FALSE;meshShaderQueriesonruntime/test/vk_pipeline_check.cpp(measured on NVIDIA GeForce RTX 5060 Laptop GPU, driver 621.24):VkApplicationInfo::pApplicationName), a cache written byvk_pipeline_checkstill missed on RTX 5060 while a self-written cache hit.VK_EXT_mesh_shader(includingmeshShaderQueries = VK_TRUE, whichcreate_vulkan_device_standaloneenables since d3d12/vulkan: a mesh segment's clipping invocations come from a mesh-primitives query (D3D-MESH-CLIPPING-COUNTER) #577) andVK_KHR_maintenance8into the pipeline cache key even for compute pipelines.vk_pipeline_checkpreviously enabled both extensions only when selected shaders requested them and forcedmesh.meshShaderQueries = VK_FALSE. It now enables both whenever supported and preservesmeshShaderQueries.pipeline_cache_seedCTest (runtime/test/pipeline_cache_seed_test.cpp+runtime/CMakeLists.txt):LocalSize(1, 1, 1)), so the test builds and runs withoutglslangValidatoror CMake script wrappers while matchingtests/test_ctest_registration.py(everySKIPprints and returns77).vk_pipeline_check.exeviaCopyFileWunder its own executable filename into a temporary directory, runs it viaCreateProcessW(inheriting environment /LEONIDA_VK_DEVICE), seeds aVkPipelineCacheoncreate_vulkan_device_standalone, and assertsVK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT(or skips with 77 where no Vulkan 1.3 device or self-cache-hit support exists).docs/pipeline_check.md):### The cache and the runtime's deviceand adds the Windows 11 Intel RaptorLake-S iGPU and NVIDIA GeForce RTX 5060 Laptop GPU (driver 621.24) measurements.Tested
vcvars64.bat && cmake --build runtime/build, MSVC 19.44, RelWithDebInfo): clean, 0 errors, 0/W4 /permissive- /utf-8warnings in all touched targets.pipeline_cache_seedond0da7dadebefore any feature clears):NVIDIA GeForce RTX 5060 Laptop GPU: FAIL (exit 8 / 1 —vk_pipeline_checkcache missed on runtime device while self-written cache hit).Intel(R) RaptorLake-S Mobile Graphics Controller: FAIL (exit 8 / 1 — cache missed).robustBufferAccess,scalarBlockLayout,robustImageAccess):Intel(R) RaptorLake-S Mobile Graphics Controller: PASS (ok: vk_pipeline_check cache hits on the runtime's device, exit 0).NVIDIA GeForce RTX 5060 Laptop GPU(driver 621.24): still FAIL (exit 8 / 1).VK_EXT_mesh_shaderwithmeshShaderQueries+VK_KHR_maintenance8when supported):NVIDIA GeForce RTX 5060 Laptop GPU):vk_pipeline_check_cli,vk_pipeline_check_stack,pipeline_cache_seed-> 3/3 Passed (ok: vk_pipeline_check cache hits on the runtime's device (NVIDIA GeForce RTX 5060 Laptop GPU)).LEONIDA_VK_DEVICE="RTX 5060":pipeline_cache_seed-> 1/1 Passed (exit 0).LEONIDA_VK_DEVICE="Intel":pipeline_cache_seed-> 1/1 Passed (ok: vk_pipeline_check cache hits on the runtime's device (Intel(R) RaptorLake-S Mobile Graphics Controller), exit 0).python -I tests/test_ctest_registration.py-> 4/4 OKpython -I tests/test_docs_list_items.py-> 3/3 OKpython -I tests/test_docs_repeated_lines.py-> 2/2 OKpython -I tests/test_docs_table_ids.py-> 2/2 OKpython -I tests/test_text_write_line_endings.py-> 3/3 OKpython -I scripts/check_no_game_data.py runtime/test/vk_pipeline_check.cpp runtime/test/pipeline_cache_seed_test.cpp runtime/CMakeLists.txt docs/pipeline_check.md-> exit 0git diff --check-> cleanGPUs tested: NVIDIA GeForce RTX 5060 Laptop GPU (driver 621.24) and Intel(R) RaptorLake-S Mobile Graphics Controller on Windows 11, MSVC 19.44 RelWithDebInfo. No game files.
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)