spirv: decorate arrays stride

This commit is contained in:
Ali Cheraghi 2024-10-31 01:42:00 +03:30
parent a1cb9563f6
commit c07b3c8279
No known key found for this signature in database
GPG Key ID: 7AD1F6DBB6B5A0DA

View File

@ -1640,7 +1640,9 @@ const NavGen = struct {
// can be lowered to ptrAccessChain instead of manually performing the math.
return try self.arrayType(1, elem_ty_id);
} else {
return try self.arrayType(total_len, elem_ty_id);
const result_id = try self.arrayType(total_len, elem_ty_id);
try self.spv.decorate(result_id, .{ .ArrayStride = .{ .array_stride = @intCast(elem_ty.abiSize(zcu)) } });
return result_id;
}
},
.@"fn" => switch (repr) {