Skip to content

Commit a9da7fb

Browse files
fix(msl-out): populate TypeContext::access when printing for storage images
1 parent 48904f8 commit a9da7fb

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ Bottom level categories:
4848

4949
- Add `BufferBinding::buffer`, a public read accessor for the bound buffer, which was previously inaccessible to out-of-tree `wgpu_hal::Api` implementations. By @danlehmann in [#9820](https://github.com/gfx-rs/wgpu/pull/9820).
5050

51+
#### Metal
52+
53+
- Fix Naga's Metal backend crashing when a storage texture was used as a function argument. By @ErichDonGubler in [#????](https://github.com/gfx-rs/wgpu/pull/????).
54+
5155
#### GLES
5256

5357
- Add ANGLE as an opt-in OpenGL backend on Windows via `cfg(windows_angle)`, while keeping the `angle` feature for ANGLE on macOS/iOS. By @csmoe in [#9422](https://github.com/gfx-rs/wgpu/pull/9422).

cts_runner/test.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ webgpu:api,operation,rendering,color_target_state:blending,formats:*
5858
webgpu:api,operation,rendering,color_target_state:blending,GPUBlendComponent:*
5959
webgpu:api,operation,rendering,depth:*
6060
webgpu:api,operation,rendering,draw:*
61+
webgpu:api,operation,sampling,sampler_texture:sample_texture_combos:*
6162
webgpu:api,operation,shader_module,compilation_info:*
6263
webgpu:api,operation,uncapturederror:iff_uncaptured:*
6364
//FAIL: webgpu:api,operation,uncapturederror:onuncapturederror_order_wrt_addEventListener

naga/src/back/msl/writer.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6989,7 +6989,13 @@ template <typename A>
69896989
handle: arg.ty,
69906990
gctx: module.to_ctx(),
69916991
names: &self.names,
6992-
access: crate::StorageAccess::empty(),
6992+
access: match module.types[arg.ty].inner {
6993+
crate::TypeInner::Image {
6994+
class: crate::ImageClass::Storage { access, .. },
6995+
..
6996+
} => access,
6997+
_ => crate::StorageAccess::empty(),
6998+
},
69936999
first_time: false,
69947000
};
69957001
let separator = separate(

0 commit comments

Comments
 (0)