dawn-cmake/test/tint/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.msl

150 lines
6.5 KiB
Plaintext

#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
device T& operator[](size_t i) device { return elements[i]; }
const device T& operator[](size_t i) const device { return elements[i]; }
thread T& operator[](size_t i) thread { return elements[i]; }
const thread T& operator[](size_t i) const thread { return elements[i]; }
threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
T elements[N];
};
struct S_tint_packed_vec3 {
/* 0x0000 */ packed_float3 v;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
};
struct S {
float3 v;
};
void f(const constant S_tint_packed_vec3* const tint_symbol) {
float3 v = float3((*(tint_symbol)).v);
float x = (*(tint_symbol)).v[0];
float y = (*(tint_symbol)).v[1];
float z = (*(tint_symbol)).v[2];
float2 xx = float3((*(tint_symbol)).v).xx;
float2 xy = float3((*(tint_symbol)).v).xy;
float2 xz = float3((*(tint_symbol)).v).xz;
float2 yx = float3((*(tint_symbol)).v).yx;
float2 yy = float3((*(tint_symbol)).v).yy;
float2 yz = float3((*(tint_symbol)).v).yz;
float2 zx = float3((*(tint_symbol)).v).zx;
float2 zy = float3((*(tint_symbol)).v).zy;
float2 zz = float3((*(tint_symbol)).v).zz;
float3 xxx = float3((*(tint_symbol)).v).xxx;
float3 xxy = float3((*(tint_symbol)).v).xxy;
float3 xxz = float3((*(tint_symbol)).v).xxz;
float3 xyx = float3((*(tint_symbol)).v).xyx;
float3 xyy = float3((*(tint_symbol)).v).xyy;
float3 xyz = float3((*(tint_symbol)).v).xyz;
float3 xzx = float3((*(tint_symbol)).v).xzx;
float3 xzy = float3((*(tint_symbol)).v).xzy;
float3 xzz = float3((*(tint_symbol)).v).xzz;
float3 yxx = float3((*(tint_symbol)).v).yxx;
float3 yxy = float3((*(tint_symbol)).v).yxy;
float3 yxz = float3((*(tint_symbol)).v).yxz;
float3 yyx = float3((*(tint_symbol)).v).yyx;
float3 yyy = float3((*(tint_symbol)).v).yyy;
float3 yyz = float3((*(tint_symbol)).v).yyz;
float3 yzx = float3((*(tint_symbol)).v).yzx;
float3 yzy = float3((*(tint_symbol)).v).yzy;
float3 yzz = float3((*(tint_symbol)).v).yzz;
float3 zxx = float3((*(tint_symbol)).v).zxx;
float3 zxy = float3((*(tint_symbol)).v).zxy;
float3 zxz = float3((*(tint_symbol)).v).zxz;
float3 zyx = float3((*(tint_symbol)).v).zyx;
float3 zyy = float3((*(tint_symbol)).v).zyy;
float3 zyz = float3((*(tint_symbol)).v).zyz;
float3 zzx = float3((*(tint_symbol)).v).zzx;
float3 zzy = float3((*(tint_symbol)).v).zzy;
float3 zzz = float3((*(tint_symbol)).v).zzz;
float4 xxxx = float3((*(tint_symbol)).v).xxxx;
float4 xxxy = float3((*(tint_symbol)).v).xxxy;
float4 xxxz = float3((*(tint_symbol)).v).xxxz;
float4 xxyx = float3((*(tint_symbol)).v).xxyx;
float4 xxyy = float3((*(tint_symbol)).v).xxyy;
float4 xxyz = float3((*(tint_symbol)).v).xxyz;
float4 xxzx = float3((*(tint_symbol)).v).xxzx;
float4 xxzy = float3((*(tint_symbol)).v).xxzy;
float4 xxzz = float3((*(tint_symbol)).v).xxzz;
float4 xyxx = float3((*(tint_symbol)).v).xyxx;
float4 xyxy = float3((*(tint_symbol)).v).xyxy;
float4 xyxz = float3((*(tint_symbol)).v).xyxz;
float4 xyyx = float3((*(tint_symbol)).v).xyyx;
float4 xyyy = float3((*(tint_symbol)).v).xyyy;
float4 xyyz = float3((*(tint_symbol)).v).xyyz;
float4 xyzx = float3((*(tint_symbol)).v).xyzx;
float4 xyzy = float3((*(tint_symbol)).v).xyzy;
float4 xyzz = float3((*(tint_symbol)).v).xyzz;
float4 xzxx = float3((*(tint_symbol)).v).xzxx;
float4 xzxy = float3((*(tint_symbol)).v).xzxy;
float4 xzxz = float3((*(tint_symbol)).v).xzxz;
float4 xzyx = float3((*(tint_symbol)).v).xzyx;
float4 xzyy = float3((*(tint_symbol)).v).xzyy;
float4 xzyz = float3((*(tint_symbol)).v).xzyz;
float4 xzzx = float3((*(tint_symbol)).v).xzzx;
float4 xzzy = float3((*(tint_symbol)).v).xzzy;
float4 xzzz = float3((*(tint_symbol)).v).xzzz;
float4 yxxx = float3((*(tint_symbol)).v).yxxx;
float4 yxxy = float3((*(tint_symbol)).v).yxxy;
float4 yxxz = float3((*(tint_symbol)).v).yxxz;
float4 yxyx = float3((*(tint_symbol)).v).yxyx;
float4 yxyy = float3((*(tint_symbol)).v).yxyy;
float4 yxyz = float3((*(tint_symbol)).v).yxyz;
float4 yxzx = float3((*(tint_symbol)).v).yxzx;
float4 yxzy = float3((*(tint_symbol)).v).yxzy;
float4 yxzz = float3((*(tint_symbol)).v).yxzz;
float4 yyxx = float3((*(tint_symbol)).v).yyxx;
float4 yyxy = float3((*(tint_symbol)).v).yyxy;
float4 yyxz = float3((*(tint_symbol)).v).yyxz;
float4 yyyx = float3((*(tint_symbol)).v).yyyx;
float4 yyyy = float3((*(tint_symbol)).v).yyyy;
float4 yyyz = float3((*(tint_symbol)).v).yyyz;
float4 yyzx = float3((*(tint_symbol)).v).yyzx;
float4 yyzy = float3((*(tint_symbol)).v).yyzy;
float4 yyzz = float3((*(tint_symbol)).v).yyzz;
float4 yzxx = float3((*(tint_symbol)).v).yzxx;
float4 yzxy = float3((*(tint_symbol)).v).yzxy;
float4 yzxz = float3((*(tint_symbol)).v).yzxz;
float4 yzyx = float3((*(tint_symbol)).v).yzyx;
float4 yzyy = float3((*(tint_symbol)).v).yzyy;
float4 yzyz = float3((*(tint_symbol)).v).yzyz;
float4 yzzx = float3((*(tint_symbol)).v).yzzx;
float4 yzzy = float3((*(tint_symbol)).v).yzzy;
float4 yzzz = float3((*(tint_symbol)).v).yzzz;
float4 zxxx = float3((*(tint_symbol)).v).zxxx;
float4 zxxy = float3((*(tint_symbol)).v).zxxy;
float4 zxxz = float3((*(tint_symbol)).v).zxxz;
float4 zxyx = float3((*(tint_symbol)).v).zxyx;
float4 zxyy = float3((*(tint_symbol)).v).zxyy;
float4 zxyz = float3((*(tint_symbol)).v).zxyz;
float4 zxzx = float3((*(tint_symbol)).v).zxzx;
float4 zxzy = float3((*(tint_symbol)).v).zxzy;
float4 zxzz = float3((*(tint_symbol)).v).zxzz;
float4 zyxx = float3((*(tint_symbol)).v).zyxx;
float4 zyxy = float3((*(tint_symbol)).v).zyxy;
float4 zyxz = float3((*(tint_symbol)).v).zyxz;
float4 zyyx = float3((*(tint_symbol)).v).zyyx;
float4 zyyy = float3((*(tint_symbol)).v).zyyy;
float4 zyyz = float3((*(tint_symbol)).v).zyyz;
float4 zyzx = float3((*(tint_symbol)).v).zyzx;
float4 zyzy = float3((*(tint_symbol)).v).zyzy;
float4 zyzz = float3((*(tint_symbol)).v).zyzz;
float4 zzxx = float3((*(tint_symbol)).v).zzxx;
float4 zzxy = float3((*(tint_symbol)).v).zzxy;
float4 zzxz = float3((*(tint_symbol)).v).zzxz;
float4 zzyx = float3((*(tint_symbol)).v).zzyx;
float4 zzyy = float3((*(tint_symbol)).v).zzyy;
float4 zzyz = float3((*(tint_symbol)).v).zzyz;
float4 zzzx = float3((*(tint_symbol)).v).zzzx;
float4 zzzy = float3((*(tint_symbol)).v).zzzy;
float4 zzzz = float3((*(tint_symbol)).v).zzzz;
}