vk_pipeline_check: skip a module's missing features before vkCreateShaderModule #102

Open
github-bot wants to merge 1 commit from github-bot/gh-102 into main AGit
Owner

@⁠Andretuta on GitHub · 2026-11-24 02:18 UTC · original
ubiquitarianism:old-pr/9834 → main · +28 −26 · 1 files · 1 commits · draft

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

**@⁠Andretuta** on GitHub · 2026-11-24 02:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/102) `ubiquitarianism:old-pr/9834` → `main` · +28 −26 · 1 files · 1 commits · draft > 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)
The feature checks for SPIR-V capabilities and extensions (Float64, Int64,
FragmentBarycentricKHR, MinLod, mesh, geometry, clock, ...) and the
maintenance8 image Offset ran after the module was created. On a device
without the feature the checker then reported the shader as SKIPPED, but
the Khronos layer had already rejected the module
(VUID-VkShaderModuleCreateInfo-pCode-08740/08742, VUID-RuntimeSpirv-Offset-10213).

They now run in check_missing_module_feature, before the module is
created, as its comment already says they should. Skip reasons and
pipeline counts are unchanged; a skipped shader no longer counts as a
created module.

Intel Graphics (Meteor Lake, Xe-LPG), driver 101.8860, Windows 11, 270
synthetic fixtures, --jobs 1 --isolate under VK_LAYER_KHRONOS_validation:
38 validation errors before, 0 after; pipelines unchanged (cs 111/0/2,
ps 122/0/14, vs 18/0/0, gs 3/0/0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:44:32 +00:00
This pull request has changes conflicting with the target branch.
  • runtime/test/vk_pipeline_check.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/102/head:github-bot/gh-102'
git switch 'github-bot/gh-102'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-102'
git switch 'github-bot/gh-102'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-102'
git switch 'github-bot/gh-102'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-102'
git switch 'main'
git merge --squash 'github-bot/gh-102'
git switch 'main'
git merge --ff-only 'github-bot/gh-102'
git switch 'main'
git merge 'github-bot/gh-102'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.