vkback: enable compute shader derivatives #33

Manually merged
github merged 2 commits from github-bot/gh-33 into gh-pr/33/base 2026-12-01 08:27:27 +00:00 AGit
Owner

@⁠TheRifai on GitHub · 2026-11-30 23:48 UTC · original
TheRifai:vkback-compute-derivatives → main · +18 −0 · 2 files · 2 commits · merged 2026-12-01 08:24 UTC

What

The title's compute and mesh programs declare the SPIR-V ComputeDerivativesKHR capability and SPV_KHR_compute_shader_derivatives. The device now enables VK_KHR_compute_shader_derivatives with the KHR feature struct in umem's full_features device (the live device), and in vkback's own Dev::new for the offline tools.

ash 0.38 carries only the NV alias's shorter struct; KHR adds meshAndTaskShaderDerivatives and reuses the NV sType, so a matching struct is defined in umem and chained.

Why

Under the validation layer on the house scene:

  • Before (f85217a, baseline after #18-#28): 15 distinct VUIDs, including
    • VUID-VkShaderModuleCreateInfo-pCode-08740 (capability declared, feature not enabled)
    • VUID-VkShaderModuleCreateInfo-pCode-08742 (SPIR-V extension declared, device extension not enabled)
    • VUID-RuntimeSpirv-meshAndTaskShaderDerivatives-10153
  • After: 12 distinct VUIDs; those three are gone and no new VUID appears.

RADV accepted the shaders without the feature, which is why the picture did not change; the layer is the only visible difference.

Test

VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, house save, 140 s run, errors only, on GE-Proton11-15; VUID lists compared as distinct lines.

**@⁠TheRifai** on GitHub · 2026-11-30 23:48 UTC · [original](https://github.com/vktory6/VKtory/pull/33) `TheRifai:vkback-compute-derivatives` → `main` · +18 −0 · 2 files · 2 commits · merged 2026-12-01 08:24 UTC ## What The title's compute and mesh programs declare the SPIR-V `ComputeDerivativesKHR` capability and `SPV_KHR_compute_shader_derivatives`. The device now enables `VK_KHR_compute_shader_derivatives` with the KHR feature struct in umem's `full_features` device (the live device), and in vkback's own `Dev::new` for the offline tools. ash 0.38 carries only the NV alias's shorter struct; KHR adds `meshAndTaskShaderDerivatives` and reuses the NV sType, so a matching struct is defined in umem and chained. ## Why Under the validation layer on the house scene: - Before (`f85217a`, baseline after #18-#28): 15 distinct VUIDs, including - `VUID-VkShaderModuleCreateInfo-pCode-08740` (capability declared, feature not enabled) - `VUID-VkShaderModuleCreateInfo-pCode-08742` (SPIR-V extension declared, device extension not enabled) - `VUID-RuntimeSpirv-meshAndTaskShaderDerivatives-10153` - After: 12 distinct VUIDs; those three are gone and no new VUID appears. RADV accepted the shaders without the feature, which is why the picture did not change; the layer is the only visible difference. ## Test `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, house save, 140 s run, errors only, on GE-Proton11-15; VUID lists compared as distinct lines.
The title's compute and mesh programs declare the SPIR-V
ComputeDerivativesKHR capability and SPV_KHR_compute_shader_derivatives, so
the device has to enable VK_KHR_compute_shader_derivatives with the KHR
feature struct. Without it the validation layer reports
VkShaderModuleCreateInfo-pCode-08740/-08742 and
RuntimeSpirv-meshAndTaskShaderDerivatives-10153.

The live device is umem's full_features device, so the extension and feature
are added there (and to vkback's own Dev::new for the offline tools). ash 0.38
carries only the NV alias's shorter struct; KHR adds
meshAndTaskShaderDerivatives and reuses the NV sType, so a matching struct is
defined in umem.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 23:52:50 +00:00
github-bot force-pushed github-bot/gh-33 from 461c1742a5 to 124ee33b2d 2026-12-01 08:10:34 +00:00 Compare
VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR has two booleans, the same struct and sType as the NV one ash
0.38 carries; meshAndTaskShaderDerivatives is a property (VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR),
not a feature. The extension name stays, as a c-string literal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot changed target branch from main to gh-pr/33/base 2026-12-01 08:27:25 +00:00
github manually merged commit 35a4af4e11 into gh-pr/33/base 2026-12-01 08:27:27 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 08:24 UTC · original

Merged, thanks! One commit of mine on top (35a4af4): the feature struct is now ash's PhysicalDeviceComputeShaderDerivativesFeaturesNV. The KHR struct has the same two booleans and the same sType, so a hand-written copy wasn't needed. The extension name sits as one constant in umem.

Check on the reference system (RX 9070 XT): tests and policy pass. In the house-scene validation run, VkShaderModuleCreateInfo-pCode-08740, -08742 and RuntimeSpirv-meshAndTaskShaderDerivatives-10153 are gone, with nothing new. They're off the validation list.

**@⁠vktory6** on GitHub · 2026-12-01 08:24 UTC · [original](https://github.com/vktory6/VKtory/pull/33#issuecomment-7305272427) Merged, thanks! One commit of mine on top (35a4af4): the feature struct is now ash's `PhysicalDeviceComputeShaderDerivativesFeaturesNV`. The KHR struct has the same two booleans and the same sType, so a hand-written copy wasn't needed. The extension name sits as one constant in umem. Check on the reference system (RX 9070 XT): tests and policy pass. In the house-scene validation run, `VkShaderModuleCreateInfo-pCode-08740`, `-08742` and `RuntimeSpirv-meshAndTaskShaderDerivatives-10153` are gone, with nothing new. They're off the validation list.
This discussion has been locked. Commenting is limited to contributors.
No description provided.