aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-06-15 19:57:47 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-07-07 22:59:52 -0400
commitca02266157ee72e41068672c8ca6f928fcbf6fdf (patch)
treed827ad6e5d0d311c4fca7fa83a32a98d3d201ac4 /src/codegen/spirv.zig
parent525f341f33af9b8aad53931fd5511f00a82cb090 (diff)
downloadzig-ca02266157ee72e41068672c8ca6f928fcbf6fdf.tar.gz
zig-ca02266157ee72e41068672c8ca6f928fcbf6fdf.zip
Zcu: pass `PerThread` to intern pool string functions
Diffstat (limited to 'src/codegen/spirv.zig')
-rw-r--r--src/codegen/spirv.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig
index 95874a5d65..92cff8b2d0 100644
--- a/src/codegen/spirv.zig
+++ b/src/codegen/spirv.zig
@@ -1753,7 +1753,7 @@ const DeclGen = struct {
}
const field_name = struct_type.fieldName(ip, field_index).unwrap() orelse
- try ip.getOrPutStringFmt(mod.gpa, "{d}", .{field_index}, .no_embedded_nulls);
+ try ip.getOrPutStringFmt(mod.gpa, pt.tid, "{d}", .{field_index}, .no_embedded_nulls);
try member_types.append(try self.resolveType(field_ty, .indirect));
try member_names.append(field_name.toSlice(ip));
}
@@ -3012,7 +3012,7 @@ const DeclGen = struct {
// Append the actual code into the functions section.
try self.spv.addFunction(spv_decl_index, self.func);
- const fqn = try decl.fullyQualifiedName(self.pt.zcu);
+ const fqn = try decl.fullyQualifiedName(self.pt);
try self.spv.debugName(result_id, fqn.toSlice(ip));
// Temporarily generate a test kernel declaration if this is a test function.
@@ -3041,7 +3041,7 @@ const DeclGen = struct {
.storage_class = final_storage_class,
});
- const fqn = try decl.fullyQualifiedName(self.pt.zcu);
+ const fqn = try decl.fullyQualifiedName(self.pt);
try self.spv.debugName(result_id, fqn.toSlice(ip));
try self.spv.declareDeclDeps(spv_decl_index, &.{});
},
@@ -3086,7 +3086,7 @@ const DeclGen = struct {
try self.func.body.emit(self.spv.gpa, .OpFunctionEnd, {});
try self.spv.addFunction(spv_decl_index, self.func);
- const fqn = try decl.fullyQualifiedName(self.pt.zcu);
+ const fqn = try decl.fullyQualifiedName(self.pt);
try self.spv.debugNameFmt(initializer_id, "initializer of {}", .{fqn.fmt(ip)});
try self.spv.sections.types_globals_constants.emit(self.spv.gpa, .OpExtInst, .{