Repository navigation
Conversation
…device without it The translator records needs_maintenance8 for shaders that sample with a texel offset outside a gather (the SPIR-V Offset image operand), but the runtime never read it: on a device without VK_KHR_maintenance8 such a pipeline went to the driver as invalid SPIR-V. ShaderLibrary::load() now reads the flag, and graphics and compute pipeline creation refuse such a shader with E_NOTIMPL and a reason, as they already do for mesh limits and workgroup memory. Finding: ProjectLeonida#9677 (comment) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finding: #9677 (comment) (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_deviced3d12_vulkan_device: check PC CreateReservedResource2 behind the Xbox proxy, not through slot 78 #7125,d3d12_execute_indirect_validationd3d12: ExecuteIndirect bounds the span max_count * stride, and checks the offset at max_count 0 #9002,d3d12_indirect_rtd3d12: an ARRAY_OF_POINTERS entry below the arena is not an overflow (d3d12_indirect_rt on NVIDIA) #6010,d3d12_depth_resolve,d3d12_bindless_churn_validatedunder-jd3d12_bindless_churn_test: a temp folder per process, so its two ctest entries no longer delete each other's shader #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