spirv: structured control flow

This commit is contained in:
Robin Voetter
2023-11-22 22:16:28 +01:00
parent b4b1c4df64
commit decff51238
2 changed files with 606 additions and 113 deletions

View File

@@ -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,