mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-11-22 13:25:43 +01:00
Add OpSelectionMerge
This commit is contained in:
parent
136dcf88a7
commit
48ddaf4913
@ -158,6 +158,9 @@ public:
|
||||
Ref LoopMerge(Ref merge_block, Ref continue_target, spv::LoopControlMask loop_control,
|
||||
const std::vector<Ref>& literals = {});
|
||||
|
||||
/// Declare a structured selection.
|
||||
Ref SelectionMerge(Ref merge_block, spv::SelectionControlMask selection_control);
|
||||
|
||||
/// The block label instruction: Any reference to a block is through this ref.
|
||||
Ref Label();
|
||||
|
||||
|
@ -19,6 +19,13 @@ Ref Module::LoopMerge(Ref merge_block, Ref continue_target, spv::LoopControlMask
|
||||
return AddCode(op);
|
||||
}
|
||||
|
||||
Ref Module::SelectionMerge(Ref merge_block, spv::SelectionControlMask selection_control) {
|
||||
Op* op{new Op(spv::Op::OpSelectionMerge)};
|
||||
op->Add(merge_block);
|
||||
AddEnum(op, selection_control);
|
||||
return AddCode(op);
|
||||
}
|
||||
|
||||
Ref Module::Label() {
|
||||
return AddCode(spv::Op::OpLabel, bound++);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user