aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen/spirv')
-rw-r--r--src/codegen/spirv/Section.zig10
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,