spirv: make generic globals invocation-local

This commit is contained in:
Robin Voetter
2024-03-02 13:08:21 +01:00
parent 20d7bb68ac
commit 9b18125562
10 changed files with 1262 additions and 778 deletions

View File

@@ -53,6 +53,17 @@ pub fn emitRaw(
section.writeWord((@as(Word, @intCast(word_count << 16))) | @intFromEnum(opcode));
}
/// Write an entire instruction, including all operands
pub fn emitRawInstruction(
section: *Section,
allocator: Allocator,
opcode: Opcode,
operands: []const Word,
) !void {
try section.emitRaw(allocator, opcode, operands.len);
section.writeWords(operands);
}
pub fn emit(
section: *Section,
allocator: Allocator,