[spv-out] put matrix decorations on arrays of matrices (#712)

This commit is contained in:
Dzmitry Malyshau
2021-04-12 12:12:19 -04:00
committed by GitHub
parent 202d3a6912
commit 9cd2b04c04

View File

@@ -886,11 +886,17 @@ impl Writer {
}
}
// The matrix decorations also go on arrays of matrices,
// so lets check this first.
let member_array_subty_inner = match arena[member.ty].inner {
crate::TypeInner::Array { base, .. } => &arena[base].inner,
ref other => other,
};
if let crate::TypeInner::Matrix {
columns,
rows: _,
width,
} = arena[member.ty].inner
} = *member_array_subty_inner
{
let byte_stride = match columns {
crate::VectorSize::Bi => 2 * width,