msl: fix resource bindings for non-structures

This commit is contained in:
Dzmitry Malyshau
2022-02-05 23:58:01 -05:00
parent 0ce98d6411
commit 8e2e39e4d8

View File

@@ -2884,10 +2884,9 @@ impl<W: Write> Writer<W> {
if let Some(ref br) = var.binding { if let Some(ref br) = var.binding {
let good = match options.per_stage_map[ep.stage].resources.get(br) { let good = match options.per_stage_map[ep.stage].resources.get(br) {
Some(target) => match module.types[var.ty].inner { Some(target) => match module.types[var.ty].inner {
crate::TypeInner::Struct { .. } => target.buffer.is_some(),
crate::TypeInner::Image { .. } => target.texture.is_some(), crate::TypeInner::Image { .. } => target.texture.is_some(),
crate::TypeInner::Sampler { .. } => target.sampler.is_some(), crate::TypeInner::Sampler { .. } => target.sampler.is_some(),
_ => false, _ => target.buffer.is_some(),
}, },
None => false, None => false,
}; };