| ... | @@ -2288,7 +2288,7 @@ fn resolveType(cg: *CodeGen, ty: Type, repr: Repr) Error!Id { | ... | @@ -2288,7 +2288,7 @@ fn resolveType(cg: *CodeGen, ty: Type, repr: Repr) Error!Id { |
| 2288 | }), | 2288 | }), |
| 2289 | }, | 2289 | }, |
| 2290 | }; | 2290 | }; |
| 2291 | const child_ty_id = try cg.resolveType(child_ty, .indirect); | 2291 | const child_ty_id = try cg.pointeeType(ptr_info.flags.address_space, child_ty, false); |
| 2292 | const storage_class = cg.storageClass(ptr_info.flags.address_space); | 2292 | const storage_class = cg.storageClass(ptr_info.flags.address_space); |
| 2293 | const ptr_ty_id = try cg.ptrType(child_ty_id, storage_class); | 2293 | const ptr_ty_id = try cg.ptrType(child_ty_id, storage_class); |
| 2294 | | 2294 | |
| ... | @@ -4218,13 +4218,16 @@ const MemoryOptions = struct { | ... | @@ -4218,13 +4218,16 @@ const MemoryOptions = struct { |
| 4218 | fn needsLayout(cg: *CodeGen, as: std.lang.AddressSpace, pointee_ty: Type) bool { | 4218 | fn needsLayout(cg: *CodeGen, as: std.lang.AddressSpace, pointee_ty: Type) bool { |
| 4219 | const target = cg.zcu.getTarget(); | 4219 | const target = cg.zcu.getTarget(); |
| 4220 | if (target.os.tag != .vulkan and target.os.tag != .opengl) return false; | 4220 | if (target.os.tag != .vulkan and target.os.tag != .opengl) return false; |
| 4221 | switch (as) { | 4221 | return switch (as) { |
| 4222 | .uniform, .push_constant, .storage_buffer => {}, | 4222 | .uniform, |
| 4223 | else => return false, | 4223 | .push_constant, |
| 4224 | } | 4224 | .storage_buffer, |
| 4225 | return switch (pointee_ty.zigTypeTag(cg.zcu)) { | 4225 | .physical_storage_buffer, |
| 4226 | .@"struct", .@"union", .array => true, | 4226 | => switch (pointee_ty.zigTypeTag(cg.zcu)) { |
| 4227 | .spirv => pointee_ty.isSpirvRuntimeArray(cg.zcu), | 4227 | .@"struct", .@"union", .array => true, |
| | 4228 | .spirv => pointee_ty.isSpirvRuntimeArray(cg.zcu), |
| | 4229 | else => false, |
| | 4230 | }, |
| 4228 | else => false, | 4231 | else => false, |
| 4229 | }; | 4232 | }; |
| 4230 | } | 4233 | } |