[PR #102] vk_pipeline_check: skip a module's missing features before vkCreateShaderModule #153

Open
opened 2026-11-26 20:16:58 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/102
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-pr/9834


📝 Commits (1)

  • 42f55be vk_pipeline_check: skip a module's missing features before vkCreateShaderModule

📊 Changes

1 file changed (+28 additions, -26 deletions)

View changed files

📝 runtime/test/vk_pipeline_check.cpp (+28 -26)

📄 Description

Carried over from old PR 9834 by Killurassoul in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9834, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
Killurassoul: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claimed in the coordination issue: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7115409238

What and why

vk_pipeline_check checks a shader's needs in two places: check_missing_module_feature before vkCreateShaderModule ("These capability requirements apply as soon as the module is passed to Vulkan") and check_missing_feature after it. The meta.features list (Float64, Int64, FragmentBarycentricKHR, MinLod, mesh, geometry, shader clock, draw parameters, ...) and the maintenance8 image Offset were in the second one. Each of them is a SPIR-V capability, extension or operand that the Khronos layer checks when the module is created, so on a device without the feature the checker printed SKIPPED for a module the layer had already rejected:

  • VUID-VkShaderModuleCreateInfo-pCode-08740 (capability declared, feature missing): Float64, FragmentBarycentricKHR, MinLod
  • VUID-VkShaderModuleCreateInfo-pCode-08742 (extension declared): SPV_KHR_fragment_shader_barycentric
  • VUID-RuntimeSpirv-Offset-10213 (Offset outside a gather without maintenance8)

Those checks now run in check_missing_module_feature. Pipeline counts are unchanged. A skip reason can change on a device that lacks both a feature and a float control the same shader needs, because the module-level check now runs first: on MoltenVK (no shaderFloat64, no shaderSignedZeroInfNanPreserveFloat64) the four f64 fixtures report no shaderFloat64 instead of no shaderSignedZeroInfNanPreserveFloat64 (measured by @us3r40456 below). A skipped shader no longer counts as a created module, as the existing comment at the early skip says ("No module was attempted, so only the pipeline skip is counted"). Float-control and push-constant checks stay after module creation; I did not see them reported by the layer on these GPUs.

Tested

Windows 11 (10.0.26300), MSVC 19.44 (VS 2022 Build Tools), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, llvm-mc 23.1.6 (conda-forge). Input: the 270 synthetic fixtures from runtime/test/shaders/build.py (270/270 pass spirv-val). No game files.

vk_pipeline_check <spirv> --jobs 1 --isolate with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:

GPU, driver validation errors cs pipelines ps pipelines vs gs
Intel Graphics (Meteor Lake, Xe-LPG), 101.8860 main 6312c057f 38 111 ok / 0 failed / 2 skipped 122 / 0 / 14 18 / 0 / 0 3 / 0 / 0
this PR 0 111 / 0 / 2 122 / 0 / 14 18 / 0 / 0 3 / 0 / 0
NVIDIA RTX 2000 Ada Laptop, 621.14 this PR 0 113 / 0 / 0 136 / 0 / 0 18 / 0 / 0 3 / 0 / 0

ctest -R "pipeline_check|pipeline_summary|large_module|bindless": 7/7 passed.

AI-assisted (Claude Code, Claude Opus 5.5).

🤖 Generated with Claude Code


🔄 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/102 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-pr/9834` --- ### 📝 Commits (1) - [`42f55be`](https://github.com/ubiquitarianism/leonida/commit/42f55beebf13c196144559ca188093892612a2d3) vk_pipeline_check: skip a module's missing features before vkCreateShaderModule ### 📊 Changes **1 file changed** (+28 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/vk_pipeline_check.cpp` (+28 -26) </details> ### 📄 Description > Carried over from **old PR 9834** by `Killurassoul` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9834`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `Killurassoul`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Claimed in the coordination issue: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7115409238 ### What and why `vk_pipeline_check` checks a shader's needs in two places: `check_missing_module_feature` before `vkCreateShaderModule` ("These capability requirements apply as soon as the module is passed to Vulkan") and `check_missing_feature` after it. The `meta.features` list (Float64, Int64, FragmentBarycentricKHR, MinLod, mesh, geometry, shader clock, draw parameters, ...) and the maintenance8 image `Offset` were in the second one. Each of them is a SPIR-V capability, extension or operand that the Khronos layer checks when the module is created, so on a device without the feature the checker printed `SKIPPED` for a module the layer had already rejected: - `VUID-VkShaderModuleCreateInfo-pCode-08740` (capability declared, feature missing): Float64, FragmentBarycentricKHR, MinLod - `VUID-VkShaderModuleCreateInfo-pCode-08742` (extension declared): `SPV_KHR_fragment_shader_barycentric` - `VUID-RuntimeSpirv-Offset-10213` (Offset outside a gather without maintenance8) Those checks now run in `check_missing_module_feature`. Pipeline counts are unchanged. A skip reason can change on a device that lacks both a feature and a float control the same shader needs, because the module-level check now runs first: on MoltenVK (no `shaderFloat64`, no `shaderSignedZeroInfNanPreserveFloat64`) the four f64 fixtures report `no shaderFloat64` instead of `no shaderSignedZeroInfNanPreserveFloat64` (measured by `@us3r40456` below). A skipped shader no longer counts as a created module, as the existing comment at the early skip says ("No module was attempted, so only the pipeline skip is counted"). Float-control and push-constant checks stay after module creation; I did not see them reported by the layer on these GPUs. ### Tested Windows 11 (10.0.26300), MSVC 19.44 (VS 2022 Build Tools), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, llvm-mc 23.1.6 (conda-forge). Input: the 270 synthetic fixtures from `runtime/test/shaders/build.py` (270/270 pass spirv-val). No game files. `vk_pipeline_check <spirv> --jobs 1 --isolate` with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`: | GPU, driver | | validation errors | cs pipelines | ps pipelines | vs | gs | |---|---|---|---|---|---|---| | Intel Graphics (Meteor Lake, Xe-LPG), 101.8860 | main 6312c057f | 38 | 111 ok / 0 failed / 2 skipped | 122 / 0 / 14 | 18 / 0 / 0 | 3 / 0 / 0 | | | this PR | **0** | 111 / 0 / 2 | 122 / 0 / 14 | 18 / 0 / 0 | 3 / 0 / 0 | | NVIDIA RTX 2000 Ada Laptop, 621.14 | this PR | 0 | 113 / 0 / 0 | 136 / 0 / 0 | 18 / 0 / 0 | 3 / 0 / 0 | `ctest -R "pipeline_check|pipeline_summary|large_module|bindless"`: 7/7 passed. AI-assisted (Claude Code, Claude Opus 5.5). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#153
No description provided.