authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2024-11-02 18:57:50+01:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2024-11-08 20:43:57+01:00
logb16252b17eced52f73007a1b28dafb2857054ca4
tree5ca60da9ec81a0b00405e904007e7d13d898c53c
parentd35dfc5a3ff48331473ca42b97f3a8cba7d4ad9b
signaturebadge-check Signed by SSH key SHA256:ZS52FNyUv2WUXvO4njmVaFVO46RHojFuOrxRc4LuKzg

spirv: make all vulkan structs Block for now


1 files changed, 8 insertions(+), 4 deletions(-)

src/codegen/spirv.zig+8-4
......@@ -1396,10 +1396,6 @@ const NavGen = struct {
13961396
13971397 const child_ty_id = try self.resolveType(child_ty, child_repr);
13981398
1399 if (storage_class == .Uniform or storage_class == .PushConstant) {
1400 try self.spv.decorate(child_ty_id, .Block);
1401 }
1402
14031399 try self.spv.sections.types_globals_constants.emit(self.spv.gpa, .OpTypePointer, .{
14041400 .id_result = result_id,
14051401 .storage_class = storage_class,
......@@ -1746,6 +1742,10 @@ const NavGen = struct {
17461742 defer self.gpa.free(type_name);
17471743 try self.spv.debugName(result_id, type_name);
17481744
1745 if (target.os.tag == .vulkan) {
1746 try self.spv.decorate(result_id, .Block); // Decorate all structs as block for now...
1747 }
1748
17491749 return result_id;
17501750 },
17511751 .struct_type => ip.loadStructType(ty.toIntern()),
......@@ -1791,6 +1791,10 @@ const NavGen = struct {
17911791 defer self.gpa.free(type_name);
17921792 try self.spv.debugName(result_id, type_name);
17931793
1794 if (target.os.tag == .vulkan) {
1795 try self.spv.decorate(result_id, .Block); // Decorate all structs as block for now...
1796 }
1797
17941798 return result_id;
17951799 },
17961800 .optional => {