msl: fix resource bindings for non-structures

This commit is contained in:
Dzmitry Malyshau committed 2022-02-06 00:12:10 -05:00
1 parent 0ce98d6411
commit 8e2e39e4d8
1 file changed
+1 -2
+1 -2
View File
@@ -2884,10 +2884,9 @@ impl<W: Write> Writer<W> {
if let Some(ref br) = var.binding {
let good = match options.per_stage_map[ep.stage].resources.get(br) {
Some(target) => match module.types[var.ty].inner {
crate::TypeInner::Struct { .. } => target.buffer.is_some(),
crate::TypeInner::Image { .. } => target.texture.is_some(),
crate::TypeInner::Sampler { .. } => target.sampler.is_some(),
_ => false,
_ => target.buffer.is_some(),
},
None => false,
};