Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a1439aa
Implement bindless buffers on metal
mate-h Feb 20, 2026
1aafa4a
Fix CI and changelog
mate-h Feb 20, 2026
96ed0d9
Update changelog
mate-h Feb 20, 2026
84c28e6
Address feedback
mate-h Feb 22, 2026
733c4d9
Merge branch 'trunk' into m/bindless-buffer-metal
mate-h Mar 19, 2026
a641b92
Add snapshot test
mate-h Mar 19, 2026
5f767e1
Update changelog
mate-h Mar 19, 2026
896cc2d
Fixes to naga writer for snapshot tests
mate-h Mar 19, 2026
51b2282
Address feedback for adapter
mate-h Mar 23, 2026
a4744f8
Restructure bindless argument buffer setup
mate-h Mar 23, 2026
f065633
Merge branch 'trunk' into m/bindless-buffer-metal
mate-h Mar 23, 2026
85a1f8b
Apply style suggestions while keeping rw and cargo fmt
mate-h Mar 23, 2026
3ab9b22
Fix CI
mate-h Mar 23, 2026
3ab5704
Merge branch 'trunk' into m/bindless-buffer-metal
mate-h Mar 24, 2026
8bb1f46
Fix struct arrow syntax for nested fields
mate-h Mar 28, 2026
c7acf4e
Merge branch 'trunk' into m/bindless-buffer-metal
mate-h Mar 30, 2026
75a438d
Test with Xcode capture
mate-h Mar 30, 2026
8dd9a39
Stop using tier 1 encoder and simplify
mate-h Mar 30, 2026
222ec14
Merge branch 'trunk' into m/bindless-buffer-metal
mate-h Mar 30, 2026
5400203
Element wise storage buffer sizes and binding array counts from pipel…
mate-h Mar 31, 2026
af8ebe7
Merge branch 'trunk' into m/bindless-buffer-metal
mate-h Apr 12, 2026
42d7e56
CI format
mate-h Apr 12, 2026
1fc93f1
Merge branch 'trunk' into m/bindless-buffer-metal
mate-h Jun 26, 2026
c18ef12
Code style feedback
mate-h Jun 26, 2026
a8485e3
MSL snapshot for unbounded arrays
mate-h Jun 26, 2026
42fd861
Address feedback comments
mate-h Jun 26, 2026
163cf62
Unbounded binding arrays in SPIRV output
mate-h Jun 26, 2026
9abbad3
Clippy
mate-h Jun 26, 2026
766c388
MSL writer for partially bound binding arrays
mate-h Jun 27, 2026
838c4f0
Remove Xcode Capture workaround
mate-h Jun 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ By @stuartparmenter in [#9658](https://github.com/gfx-rs/wgpu/pull/9658).
- Add `metal::Queue::add_wait_event` / `add_signal_event` (with `remove_*` companions) to stage `MTLSharedEvent` waits/signals on the next `Queue::submit`, for GPU-side interop with foreign APIs. Waits run on an internal CB committed before user CBs. By @AdrianEddy in [#9483](https://github.com/gfx-rs/wgpu/pull/9483).
- Unconditionally enable `Features::CLIP_DISTANCES`. By @ErichDonGubler in [#9270](https://github.com/gfx-rs/wgpu/pull/9270).
- Added full support for mesh shaders, including in WGSL shaders. By @inner-daemons in [#8739](https://github.com/gfx-rs/wgpu/pull/8739).
- Fixed structure field names incorrectly ignoring reserved keywords in the Metal (MSL) backend. By @39ali [#9379](https://github.com/gfx-rs/wgpu/pull/9379).
- Added support for bindless storage buffers (buffer binding arrays) on Metal. By @mate-h in [#9081](https://github.com/gfx-rs/wgpu/pull/9081).
- Added `DropCallback`s to Metal textures. By @jerzywilczek in [#9634](https://github.com/gfx-rs/wgpu/pull/9634).

#### GLES
Expand Down
33 changes: 33 additions & 0 deletions naga/src/back/msl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,39 @@ pub struct PipelineOptions {
/// vertex_buffer_mappings are used during shader translation to
/// support vertex pulling.
pub vertex_buffer_mappings: Vec<VertexBufferMapping>,

/// For each storage `binding_array` in the pipeline layout, the number of
/// elements that layout declares, keyed by `ResourceBinding`.
/// The MSL writer uses this to report the number of elements in an unbounded `binding_array`.
#[cfg_attr(
feature = "deserialize",
serde(deserialize_with = "deserialize_binding_array_length_map")
)]
pub binding_array_length_map: crate::FastHashMap<crate::ResourceBinding, u32>,
}

#[cfg(feature = "deserialize")]
#[derive(serde::Deserialize)]
struct BindingArrayLengthMapSerialization {
resource_binding: crate::ResourceBinding,
count: u32,
}

#[cfg(feature = "deserialize")]
fn deserialize_binding_array_length_map<'de, D>(
deserializer: D,
) -> Result<crate::FastHashMap<crate::ResourceBinding, u32>, D::Error>
where
D: serde::Deserializer<'de>,
{
use serde::Deserialize;

let vec = Vec::<BindingArrayLengthMapSerialization>::deserialize(deserializer)?;
let mut map = crate::FastHashMap::default();
for item in vec {
map.insert(item.resource_binding, item.count);
}
Ok(map)
}

impl Options {
Expand Down
Loading