[PR #1417] vk_image_fuzz: enable shaderDrawParameters for the translated vertex shader #1446

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1417
Author: @whoalin1
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: vk-image-fuzz-drawparams


📝 Commits (1)

  • 285801f vk_image_fuzz: enable shaderDrawParameters for the translated vertex shader

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 runtime/test/vk_image_fuzz.cpp (+9 -0)

📄 Description

Claimed in the coordination issue: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147754867

What

Every translated vertex shader declares the SPIR-V DrawParameters capability (BaseVertex/BaseInstance for the zero-based v0/v3 inputs), but vk_image_fuzz never enabled VkPhysicalDeviceVulkan11Features::shaderDrawParameters. Under LEONIDA_VK_VALIDATION=1, vkCreateShaderModule fails with VUID-VkShaderModuleCreateInfo-pCode-08740 on every case, on both vendors — silently zeroing entire image_fuzz campaigns (found when a fuzz sweep's AMD image_fuzz run produced all-fail results that turned out to be this harness bug, not translator bugs). Without validation, drivers tolerate the missing feature.

Fix (+9 lines, one file): query VkPhysicalDeviceVulkan11Features with a separate vkGetPhysicalDeviceFeatures2 call and set enable11.shaderDrawParameters in the device-creation chain (Features2 → Vulkan12Features → Vulkan11Features), matching the shape used by vk_bindless_test/vk_sampler_test.

Tested

  • Before fix (e0b08c77d): image_fuzz --seed 1 first case fails on both GPUs with VUID-08740.
  • After fix, LEONIDA_VK_VALIDATION=1 + LEONIDA_PC_TAIL_UBO=1:
    • AMD Radeon iGPU (gfx1035, driver 24.10.24): seed 1 --programs 60 → 60/60 match; seed 2 --programs 30 → 30/30; 0 VUIDs.
    • NVIDIA RTX 4070 SUPER: seed 1 → 60/60; seed 2 → 30/30; 0 VUIDs.
  • vk_bindless_test and vk_sampler_test ctest entries also pass with validation on both GPUs (same chain shape already worked there).

AI-assisted (Devin).


🔄 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/1417 **Author:** [@whoalin1](https://github.com/whoalin1) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `vk-image-fuzz-drawparams` --- ### 📝 Commits (1) - [`285801f`](https://github.com/ubiquitarianism/leonida/commit/285801f0acbd73e75433b9e5f8e869054c900d45) vk_image_fuzz: enable shaderDrawParameters for the translated vertex shader ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/vk_image_fuzz.cpp` (+9 -0) </details> ### 📄 Description Claimed in the coordination issue: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147754867 ## What Every translated vertex shader declares the SPIR-V `DrawParameters` capability (BaseVertex/BaseInstance for the zero-based v0/v3 inputs), but `vk_image_fuzz` never enabled `VkPhysicalDeviceVulkan11Features::shaderDrawParameters`. Under `LEONIDA_VK_VALIDATION=1`, `vkCreateShaderModule` fails with `VUID-VkShaderModuleCreateInfo-pCode-08740` on **every case, on both vendors** — silently zeroing entire `image_fuzz` campaigns (found when a fuzz sweep's AMD image_fuzz run produced all-fail results that turned out to be this harness bug, not translator bugs). Without validation, drivers tolerate the missing feature. Fix (+9 lines, one file): query `VkPhysicalDeviceVulkan11Features` with a separate `vkGetPhysicalDeviceFeatures2` call and set `enable11.shaderDrawParameters` in the device-creation chain (`Features2 → Vulkan12Features → Vulkan11Features`), matching the shape used by `vk_bindless_test`/`vk_sampler_test`. ## Tested - Before fix (`e0b08c77d`): `image_fuzz --seed 1` first case fails on both GPUs with VUID-08740. - After fix, `LEONIDA_VK_VALIDATION=1` + `LEONIDA_PC_TAIL_UBO=1`: - AMD Radeon iGPU (gfx1035, driver 24.10.24): seed 1 `--programs 60` → **60/60 match**; seed 2 `--programs 30` → **30/30**; 0 VUIDs. - NVIDIA RTX 4070 SUPER: seed 1 → 60/60; seed 2 → 30/30; 0 VUIDs. - `vk_bindless_test` and `vk_sampler_test` ctest entries also pass with validation on both GPUs (same chain shape already worked there). AI-assisted (Devin). --- <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#1446
No description provided.