diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig index 9197a0959f..3c4037abc7 100644 --- 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 => {