fix: dynamic uniform/storage buffer offsets (#343) - #348
Merged
Conversation
Vulkan: bufferBindingTypeToVk() now returns VK_DESCRIPTOR_TYPE_*_DYNAMIC when HasDynamicOffset is true. DescriptorCounts tracks dynamic counts separately. Descriptor pool includes dynamic pool sizes. Matches Rust wgpu-hal conv.rs:834-858. Software: buildExecutionContext() checks HasDynamicOffset per-binding before consuming from dynamic offsets array. BindGroupLayout stores entries for HasDynamicOffset lookup. DX12: documented as TODO — requires root CBV descriptor architecture (Rust wgpu-hal dx12/command.rs:1175-1236). GLES + Metal already correct (unchanged). Fixes #343
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
Dynamic uniform/storage buffer offsets silently ignored on Vulkan and Software backends.
Root Cause
bufferBindingTypeToVk()always returned static descriptor types, ignoringHasDynamicOffset. Vulkan driver silently ignored dynamic offsets when layout is static.Fixed
VK_DESCRIPTOR_TYPE_*_BUFFER_DYNAMICwhenHasDynamicOffsettrue. DescriptorCounts + pool sizes updated. Matches Rust wgpu-halconv.rs:834-858.buildExecutionContext()checksHasDynamicOffsetper-binding before consuming offset.Fixes #343
Test plan