mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:20:51 +01:00
[PR #51] d3d12: refuse a pipeline whose shader needs VK_KHR_maintenance8 on a device without it #103
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#103
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/51
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9773📝 Commits (1)
29ffd11d3d12: refuse a pipeline whose shader needs VK_KHR_maintenance8 on a device without it📊 Changes
4 files changed (+41 additions, -2 deletions)
View changed files
📝
runtime/shims/d3d12_vulkan_device.cpp(+12 -0)📝
runtime/src/shader_library.h(+5 -0)📝
runtime/test/d3d12_mesh_test.cpp(+21 -1)📝
runtime/test/shader_library_test.cpp(+3 -1)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Finding: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7115210531 (by
@evilclanker9000; claimed as soon as the board accepted comments again)Depends on: none.
What and why
The translator records
needs_maintenance8: truefor shaders that sample with a texel offset outside a gather (the SPIR-VOffsetimage operand,tools/rdna2spirv.py), which is valid only withVK_KHR_maintenance8. The runtime never read the field (runtime/src/shader_library.h,ShaderEntry/load()), so on a device without the extension such a pipeline went to the driver as an invalid module instead of being refused with a reason.VulkanDeviceInfo::maintenance8already says whether the device enabled it.shader_library.h:ShaderEntry::needs_maintenance8, read from the index likeuses_code_base(absent or not a boolean: false).d3d12_vulkan_device.cpp: graphics (per stage) and compute pipeline creation refuse such a shader withE_NOTIMPLand one line naming it, beside the existing mesh-limit and workgroup-memory refusals.Tested
Windows 11, NVIDIA GeForce RTX 3070, driver 621.01, MSVC 19.44 (VS 2022 Build Tools), Vulkan SDK 1.4.363.1, on
main5d74c2723:shader_library_test: OK, with a new check that the flag is read and defaults to false.d3d12_mesh_test: OK. Its every-GPU block (the device it builds leavesmaintenance8off) now also creates a VS + PS pipeline whose PS entry hasneeds_maintenance8: true(refused,E_NOTIMPL, logsps_offset samples with a texel offset; the device has no VK_KHR_maintenance8) and the same pipeline with the unflagged PS (created).d3d12_vulkan_device.cppfails at the refusal check (the pipeline is created).ctest -C RelWithDebInfo: 256/262; the 6 failures are the same without this change (d3d12_vulkan_device#7125,d3d12_execute_indirect_validation#9002,d3d12_indirect_rt#6010,d3d12_depth_resolve,d3d12_bindless_churn_validatedunder-j#6221, andd3d12_pso_validation'sDYNAMIC_DEPTH_BIASparity on NVIDIA, which fails identically on the unchanged layer).No game files.
AI-assisted: yes (Claude).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.