blob: 7aa6321fb423bd3be25b354ce2c9e52eba2d6e8d [file] [log] [blame]
dan sinclair999d93a2024-08-15 20:42:57 +00001SKIP: INVALID
Zhaoming Jiang6c4de8b2023-07-17 09:37:19 +00002
3uint tint_bitcast_from_f16(vector<float16_t, 2> src) {
4 uint2 r = f32tof16(float2(src));
5 return asuint(uint((r.x & 0xffff) | ((r.y & 0xffff) << 16)));
6}
7
8[numthreads(1, 1, 1)]
9void f() {
Antonio Maioranocf2f4d62024-08-22 05:37:05 +000010 vector<float16_t, 2> a = vector<float16_t, 2>(float16_t(1.0h), float16_t(2.0h));
11 uint b = tint_bitcast_from_f16(a);
Zhaoming Jiang6c4de8b2023-07-17 09:37:19 +000012 return;
13}
14FXC validation failure:
Antonio Maiorano4f97c0e2024-08-22 05:42:29 +000015<scrubbed_path>(1,35-43): error X3000: syntax error: unexpected token 'float16_t'
16<scrubbed_path>(2,29-31): error X3004: undeclared identifier 'src'
17<scrubbed_path>(2,22-32): error X3014: incorrect number of arguments to numeric-type constructor
Zhaoming Jiang6c4de8b2023-07-17 09:37:19 +000018
Antonio Maioranoaef59572024-08-23 21:30:37 +000019
20tint executable returned error: exit status 1