Skip to content

Commit aa8aa66

Browse files
authored
Merge pull request #23297 from igaryhe/dan/more-spirv-optype
spirv: Assemble OpTypeRuntimeArray.
2 parents 0312391 + 07c04bc commit aa8aa66

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/codegen/spirv/Assembler.zig

+9
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,15 @@ fn processTypeInstruction(self: *Assembler) !AsmValue {
357357
// and so some consideration must be taken when entering this in the type system.
358358
return self.todo("process OpTypeArray", .{});
359359
},
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+
},
360369
.OpTypePointer => blk: {
361370
const storage_class: StorageClass = @enumFromInt(operands[1].value);
362371
const child_type = try self.resolveRefId(operands[2].ref_id);

0 commit comments

Comments
 (0)