From a1cb9563f6a421220f87692f16251f3628c8cf6c Mon Sep 17 00:00:00 2001 From: Ali Cheraghi Date: Fri, 1 Nov 2024 02:03:33 +0330 Subject: spirv: Uniform/PushConstant variables - Rename GPU address spaces to match with SPIR-V spec. - Emit `Block` Decoration for Uniform/PushConstant variables. - Don't emit `OpTypeForwardPointer` for non-opencl targets. (there's still a false-positive about recursive structs) Signed-off-by: Ali Cheraghi --- src/codegen/spirv/Module.zig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/codegen/spirv/Module.zig') 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 { -- cgit v1.2.3