blob: d1d1fdc3bef7ad7b278cb34c7cf09c0745c77d4d [file] [log] [blame]
float2 tint_bitcast_from_f16(vector<float16_t, 4> src) {
uint4 r = f32tof16(float4(src));
return asfloat(uint2((r.x & 0xffff) | ((r.y & 0xffff) << 16), (r.z & 0xffff) | ((r.w & 0xffff) << 16)));
}
[numthreads(1, 1, 1)]
void f() {
vector<float16_t, 4> a = vector<float16_t, 4>(float16_t(1.0h), float16_t(2.0h), float16_t(3.0h), float16_t(-4.0h));
float2 b = tint_bitcast_from_f16(a);
return;
}