Skip to content

Commit

Permalink
[spv-out] Fix duplicate scalar OpType
Browse files Browse the repository at this point in the history
  • Loading branch information
Napokue committed Nov 13, 2020
1 parent 8b56f3e commit 5edc296
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/back/spv/writer.rs
Expand Up @@ -189,7 +189,16 @@ impl Writer {
*e.get()
} else {
match lookup_ty {
LookupType::Handle(handle) => self.write_type_declaration_arena(arena, handle),
LookupType::Handle(handle) => match arena[handle].inner {
crate::TypeInner::Scalar { kind, width } => self.get_type_id(
arena,
LookupType::Local(LocalType::Scalar {
kind,
width,
}),
),
_ => self.write_type_declaration_arena(arena, handle),
},
LookupType::Local(local_ty) => self.write_type_declaration_local(arena, local_ty),
}
}
Expand Down

0 comments on commit 5edc296

Please sign in to comment.