diff options
| author | Robin Voetter <robin@voetter.nl> | 2024-11-01 03:44:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-01 03:44:37 +0100 |
| commit | ba5f57616f69c01aa6faa5bcabab2d58969cf335 (patch) | |
| tree | 8b9b301c895be30f53f74a9a7e70b12cddcb534b /src/codegen/spirv/Module.zig | |
| parent | 3f7fac5fff9beed535a7674679a5e2c1f3cd74d2 (diff) | |
| parent | 38345d590949b0c88d83bccb259364f02a59a90e (diff) | |
| download | zig-ba5f57616f69c01aa6faa5bcabab2d58969cf335.tar.gz zig-ba5f57616f69c01aa6faa5bcabab2d58969cf335.zip | |
Merge pull request #21861 from alichraghi/master
spirv: push constants and small fixes
Diffstat (limited to 'src/codegen/spirv/Module.zig')
| -rw-r--r-- | src/codegen/spirv/Module.zig | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/codegen/spirv/Module.zig b/src/codegen/spirv/Module.zig index 94787e06b9..f4af74b3aa 100644 --- a/src/codegen/spirv/Module.zig +++ b/src/codegen/spirv/Module.zig @@ -402,9 +402,7 @@ pub fn resolveString(self: *Module, string: []const u8) !IdRef { return id; } -pub fn structType(self: *Module, types: []const IdRef, maybe_names: ?[]const []const u8) !IdRef { - const result_id = self.allocId(); - +pub fn structType(self: *Module, result_id: IdResult, types: []const IdRef, maybe_names: ?[]const []const u8) !void { try self.sections.types_globals_constants.emit(self.gpa, .OpTypeStruct, .{ .id_result = result_id, .id_ref = types, @@ -416,8 +414,6 @@ pub fn structType(self: *Module, types: []const IdRef, maybe_names: ?[]const []c try self.memberDebugName(result_id, @intCast(i), name); } } - - return result_id; } pub fn boolType(self: *Module) !IdRef { |
