commit b16252b17eced52f73007a1b28dafb2857054ca4 (tree)
parent d35dfc5a3ff48331473ca42b97f3a8cba7d4ad9b
Author: Robin Voetter <robin@voetter.nl>
Date: Sat, 2 Nov 2024 18:57:50 +0100
spirv: make all vulkan structs Block for now
Diffstat:
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig
@@ -1396,10 +1396,6 @@ const NavGen = struct {
const child_ty_id = try self.resolveType(child_ty, child_repr);
- if (storage_class == .Uniform or storage_class == .PushConstant) {
- try self.spv.decorate(child_ty_id, .Block);
- }
-
try self.spv.sections.types_globals_constants.emit(self.spv.gpa, .OpTypePointer, .{
.id_result = result_id,
.storage_class = storage_class,
@@ -1746,6 +1742,10 @@ const NavGen = struct {
defer self.gpa.free(type_name);
try self.spv.debugName(result_id, type_name);
+ if (target.os.tag == .vulkan) {
+ try self.spv.decorate(result_id, .Block); // Decorate all structs as block for now...
+ }
+
return result_id;
},
.struct_type => ip.loadStructType(ty.toIntern()),
@@ -1791,6 +1791,10 @@ const NavGen = struct {
defer self.gpa.free(type_name);
try self.spv.debugName(result_id, type_name);
+ if (target.os.tag == .vulkan) {
+ try self.spv.decorate(result_id, .Block); // Decorate all structs as block for now...
+ }
+
return result_id;
},
.optional => {