• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Fails with "D3D compile failed with value cannot be NaN, isnan() may not be necessary.  /Gis may force isnan() to be performed"
2fn Bad(index: u32, rd: vec3<f32>) -> vec3<f32> {
3  var normal: vec3<f32> = vec3<f32>(0.0);
4  normal[index] = -sign(rd[index]);
5  return normalize(normal);
6}
7
8[[block]] struct S { v : vec3<f32>; i : u32; };
9[[binding(0), group(0)]] var<storage, read_write> io : S;
10[[stage(compute), workgroup_size(1)]]
11fn main([[builtin(local_invocation_index)]] idx : u32) {
12    io.v = Bad(io.i, io.v);
13}
14