[PR #821] [MERGED] vk_pipeline_check: match runtime device features and restore pipeline_cache_seed test (RT-PIPELINE-CACHE-SEED) #859

Closed
opened 2026-11-26 20:19:17 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/821
Author: @Taffyyy-ops
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142

Base: main ← Head: fix/vk-pipeline-cache-seed


📝 Commits (1)

  • e00d9d0 vk_pipeline_check: match runtime device features and restore pipeline_cache_seed test (RT-PIPELINE-CACHE-SEED)

📊 Changes

4 files changed (+473 additions, -13 deletions)

View changed files

📝 docs/pipeline_check.md (+23 -0)
📝 runtime/CMakeLists.txt (+11 -0)
➕ runtime/test/pipeline_cache_seed_test.cpp (+418 -0)
📝 runtime/test/vk_pipeline_check.cpp (+21 -13)

📄 Description

Claimed in the coordination issue as: RT-PIPELINE-CACHE-SEED (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133460538)

What and why

Restores the vk_pipeline_check / runtime Vulkan device cache-key parity fix and pipeline_cache_seed regression test from ancestor commit c8a102d0cf (Senne Cools), which had been dropped from main by bulk merge 6dece9231, and fixes an additional NVIDIA Blackwell cache-key mismatch uncovered on current main (after #577):

  1. Disable three features in runtime/test/vk_pipeline_check.cpp (matching c8a102d0cf / RX 9070 XT findings):
    • f2.features.robustBufferAccess = VK_FALSE;
    • f12.scalarBlockLayout = VK_FALSE;
    • f13.robustImageAccess = VK_FALSE;
  2. Match runtime optional extensions and meshShaderQueries on runtime/test/vk_pipeline_check.cpp (measured on NVIDIA GeForce RTX 5060 Laptop GPU, driver 621.24):
    • Even with those three features disabled (and even with minimal core/1.1/1.2/1.3 feature parity and matching VkApplicationInfo::pApplicationName), a cache written by vk_pipeline_check still missed on RTX 5060 while a self-written cache hit.
    • Leave-one-out / isolated probing showed NVIDIA driver 621.24 hashes both VK_EXT_mesh_shader (including meshShaderQueries = VK_TRUE, which create_vulkan_device_standalone enables since #577) and VK_KHR_maintenance8 into the pipeline cache key even for compute pipelines.
    • vk_pipeline_check previously enabled both extensions only when selected shaders requested them and forced mesh.meshShaderQueries = VK_FALSE. It now enables both whenever supported and preserves meshShaderQueries.
  3. Self-contained pipeline_cache_seed CTest (runtime/test/pipeline_cache_seed_test.cpp + runtime/CMakeLists.txt):
    • Embeds the minimal valid compute SPIR-V module directly (35 words, LocalSize(1, 1, 1)), so the test builds and runs without glslangValidator or CMake script wrappers while matching tests/test_ctest_registration.py (every SKIP prints and returns 77).
    • Copies vk_pipeline_check.exe via CopyFileW under its own executable filename into a temporary directory, runs it via CreateProcessW (inheriting environment / LEONIDA_VK_DEVICE), seeds a VkPipelineCache on create_vulkan_device_standalone, and asserts VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT (or skips with 77 where no Vulkan 1.3 device or self-cache-hit support exists).
  4. Documentation (docs/pipeline_check.md):
    • Restores ### The cache and the runtime's device and adds the Windows 11 Intel RaptorLake-S iGPU and NVIDIA GeForce RTX 5060 Laptop GPU (driver 621.24) measurements.

Tested

  • Build (vcvars64.bat && cmake --build runtime/build, MSVC 19.44, RelWithDebInfo): clean, 0 errors, 0 /W4 /permissive- /utf-8 warnings in all touched targets.
  • BEFORE (pipeline_cache_seed on d0da7dade before any feature clears):
    • NVIDIA GeForce RTX 5060 Laptop GPU: FAIL (exit 8 / 1 — vk_pipeline_check cache missed on runtime device while self-written cache hit).
    • Intel(R) RaptorLake-S Mobile Graphics Controller: FAIL (exit 8 / 1 — cache missed).
  • AFTER the 3 feature clears alone (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).
  • AFTER full fix (adding VK_EXT_mesh_shader with meshShaderQueries + VK_KHR_maintenance8 when supported):
    • Default (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 & hygiene checks:
    • python -I tests/test_ctest_registration.py -> 4/4 OK
    • python -I tests/test_docs_list_items.py -> 3/3 OK
    • python -I tests/test_docs_repeated_lines.py -> 2/2 OK
    • python -I tests/test_docs_table_ids.py -> 2/2 OK
    • python -I tests/test_text_write_line_endings.py -> 3/3 OK
    • python -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 0
    • git diff --check -> clean

GPUs 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

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/821 **Author:** [@Taffyyy-ops](https://github.com/Taffyyy-ops) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `fix/vk-pipeline-cache-seed` --- ### 📝 Commits (1) - [`e00d9d0`](https://github.com/ubiquitarianism/leonida/commit/e00d9d05bc065234ce68aa2db829a6cf8ea2b389) vk_pipeline_check: match runtime device features and restore pipeline_cache_seed test (RT-PIPELINE-CACHE-SEED) ### 📊 Changes **4 files changed** (+473 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `docs/pipeline_check.md` (+23 -0) 📝 `runtime/CMakeLists.txt` (+11 -0) ➕ `runtime/test/pipeline_cache_seed_test.cpp` (+418 -0) 📝 `runtime/test/vk_pipeline_check.cpp` (+21 -13) </details> ### 📄 Description Claimed in the coordination issue as: RT-PIPELINE-CACHE-SEED (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133460538) ### What and why Restores the `vk_pipeline_check` / runtime Vulkan device cache-key parity fix and `pipeline_cache_seed` regression test from ancestor commit `c8a102d0cf` (Senne Cools), which had been dropped from `main` by bulk merge `6dece9231`, and fixes an additional NVIDIA Blackwell cache-key mismatch uncovered on current `main` (after #577): 1. **Disable three features in `runtime/test/vk_pipeline_check.cpp`** (matching `c8a102d0cf` / RX 9070 XT findings): - `f2.features.robustBufferAccess = VK_FALSE;` - `f12.scalarBlockLayout = VK_FALSE;` - `f13.robustImageAccess = VK_FALSE;` 2. **Match runtime optional extensions and `meshShaderQueries` on `runtime/test/vk_pipeline_check.cpp`** (measured on NVIDIA GeForce RTX 5060 Laptop GPU, driver 621.24): - Even with those three features disabled (and even with minimal core/1.1/1.2/1.3 feature parity and matching `VkApplicationInfo::pApplicationName`), a cache written by `vk_pipeline_check` still missed on RTX 5060 while a self-written cache hit. - Leave-one-out / isolated probing showed NVIDIA driver 621.24 hashes **both** `VK_EXT_mesh_shader` (including `meshShaderQueries = VK_TRUE`, which `create_vulkan_device_standalone` enables since #577) **and** `VK_KHR_maintenance8` into the pipeline cache key even for compute pipelines. - `vk_pipeline_check` previously enabled both extensions only when selected shaders requested them and forced `mesh.meshShaderQueries = VK_FALSE`. It now enables both whenever supported and preserves `meshShaderQueries`. 3. **Self-contained `pipeline_cache_seed` CTest (`runtime/test/pipeline_cache_seed_test.cpp` + `runtime/CMakeLists.txt`):** - Embeds the minimal valid compute SPIR-V module directly (35 words, `LocalSize(1, 1, 1)`), so the test builds and runs without `glslangValidator` or CMake script wrappers while matching `tests/test_ctest_registration.py` (every `SKIP` prints and returns `77`). - Copies `vk_pipeline_check.exe` via `CopyFileW` under its own executable filename into a temporary directory, runs it via `CreateProcessW` (inheriting environment / `LEONIDA_VK_DEVICE`), seeds a `VkPipelineCache` on `create_vulkan_device_standalone`, and asserts `VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT` (or skips with 77 where no Vulkan 1.3 device or self-cache-hit support exists). 4. **Documentation (`docs/pipeline_check.md`):** - Restores `### The cache and the runtime's device` and adds the Windows 11 Intel RaptorLake-S iGPU and NVIDIA GeForce RTX 5060 Laptop GPU (driver 621.24) measurements. ### Tested - **Build (`vcvars64.bat && cmake --build runtime/build`, MSVC 19.44, RelWithDebInfo):** clean, 0 errors, 0 `/W4 /permissive- /utf-8` warnings in all touched targets. - **BEFORE (`pipeline_cache_seed` on `d0da7dade` before any feature clears):** - `NVIDIA GeForce RTX 5060 Laptop GPU`: FAIL (exit 8 / 1 — `vk_pipeline_check` cache missed on runtime device while self-written cache hit). - `Intel(R) RaptorLake-S Mobile Graphics Controller`: FAIL (exit 8 / 1 — cache missed). - **AFTER the 3 feature clears alone (`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). - **AFTER full fix (adding `VK_EXT_mesh_shader` with `meshShaderQueries` + `VK_KHR_maintenance8` when supported):** - Default (`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 & hygiene checks:** - `python -I tests/test_ctest_registration.py` -> 4/4 OK - `python -I tests/test_docs_list_items.py` -> 3/3 OK - `python -I tests/test_docs_repeated_lines.py` -> 2/2 OK - `python -I tests/test_docs_table_ids.py` -> 2/2 OK - `python -I tests/test_text_write_line_endings.py` -> 3/3 OK - `python -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 0 - `git diff --check` -> clean GPUs 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 - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:17 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#859
No description provided.