diff options
| author | Robin Voetter <robin@voetter.nl> | 2023-11-22 22:16:28 +0100 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2023-11-24 17:50:11 +0100 |
| commit | decff512383e8ea8a52583ba0e39617fa24dc79d (patch) | |
| tree | 9921c53dbdb7a1d5b0f552e9d3adb6a7343c8cae /src/codegen/spirv | |
| parent | b4b1c4df640c9b40c303eef7d0364d01ec490a8e (diff) | |
| download | zig-decff512383e8ea8a52583ba0e39617fa24dc79d.tar.gz zig-decff512383e8ea8a52583ba0e39617fa24dc79d.zip | |
spirv: structured control flow
Diffstat (limited to 'src/codegen/spirv')
| -rw-r--r-- | src/codegen/spirv/Section.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/codegen/spirv/Section.zig b/src/codegen/spirv/Section.zig index f569512fdd..2ce11111a7 100644 --- a/src/codegen/spirv/Section.zig +++ b/src/codegen/spirv/Section.zig @@ -65,6 +65,16 @@ pub fn emit( section.writeOperands(opcode.Operands(), operands); } +pub fn emitBranch( + section: *Section, + allocator: Allocator, + target_label: spec.IdRef, +) !void { + try section.emit(allocator, .OpBranch, .{ + .target_label = target_label, + }); +} + pub fn emitSpecConstantOp( section: *Section, allocator: Allocator, |
