mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2026-01-05 05:59:18 +01:00
Add OpCompositeConstruct
This commit is contained in:
parent
5830eca337
commit
44043bca56
2 changed files with 12 additions and 0 deletions
|
|
@ -69,4 +69,12 @@ Id Module::OpCompositeExtract(Id result_type, Id composite,
|
|||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::OpCompositeConstruct(Id result_type, const std::vector<Id>& ids) {
|
||||
assert(ids.size() >= 1);
|
||||
auto op{std::make_unique<Op>(spv::Op::OpCompositeConstruct, bound++,
|
||||
result_type)};
|
||||
op->Add(ids);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue