authorgravatar for i@dan.gamesdan <i@dan.games> 2025-03-07 18:33:21+08:00
committergravatar for i@dan.gamesdan <i@dan.games> 2025-03-19 11:45:35+08:00
log07c04bcd83c636b2f8b6115655200da4cb2b18fe
treea3de5a2e8a1c4e57b228fd697f1b6ffc7d09fb51
parent03123916e55a9c0c8b66f748a62b7a4a64203535

spirv: Assemble OpTypeRuntimeArray.


1 files changed, 9 insertions(+), 0 deletions(-)

src/codegen/spirv/Assembler.zig+9
...@@ -357,6 +357,15 @@ fn processTypeInstruction(self: *Assembler) !AsmValue {...@@ -357,6 +357,15 @@ fn processTypeInstruction(self: *Assembler) !AsmValue {
357 // and so some consideration must be taken when entering this in the type system.357 // and so some consideration must be taken when entering this in the type system.
358 return self.todo("process OpTypeArray", .{});358 return self.todo("process OpTypeArray", .{});
359 },359 },
360 .OpTypeRuntimeArray => blk: {
361 const element_type = try self.resolveRefId(operands[1].ref_id);
362 const result_id = self.spv.allocId();
363 try section.emit(self.spv.gpa, .OpTypeRuntimeArray, .{
364 .id_result = result_id,
365 .element_type = element_type,
366 });
367 break :blk result_id;
368 },
360 .OpTypePointer => blk: {369 .OpTypePointer => blk: {
361 const storage_class: StorageClass = @enumFromInt(operands[1].value);370 const storage_class: StorageClass = @enumFromInt(operands[1].value);
362 const child_type = try self.resolveRefId(operands[2].ref_id);371 const child_type = try self.resolveRefId(operands[2].ref_id);