Skip to content

Commit eb7ef13

Browse files
committed
abi layout: make insert_value() support Array, Vector, Matrix
1 parent 076ae52 commit eb7ef13

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3007,6 +3007,9 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
30073007
fn insert_value(&mut self, agg_val: Self::Value, elt: Self::Value, idx: u64) -> Self::Value {
30083008
let field_type = match self.lookup_type(agg_val.ty) {
30093009
SpirvType::Adt { field_types, .. } => field_types[idx as usize],
3010+
SpirvType::Array { element, .. }
3011+
| SpirvType::Vector { element, .. }
3012+
| SpirvType::Matrix { element, .. } => element,
30103013
other => self.fatal(format!("insert_value not implemented on type {other:?}")),
30113014
};
30123015

0 commit comments

Comments
 (0)