dawn-cmake/test/intrinsics/repeated_use.wgsl
Ben Clayton c2fa68e551 Migrate more tests from Ignore() to phony-assignment
The `Ignore()` intrinsic is about to be deprecated, so don't use it for testing.

Bug: tint:1213
Change-Id: I314ecaeb9a9c337c7b6980189054120a74807ebd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67066
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-22 00:21:44 +00:00

21 lines
585 B
WebGPU Shading Language

// Check that for backends that generate intrinsic helpers, repeated use of the
// same intrinsic overload results in single helper being generated.
[[stage(compute), workgroup_size(1)]]
fn main() {
_ = isNormal(vec4<f32>());
_ = isNormal(vec4<f32>(1.));
_ = isNormal(vec4<f32>(1., 2., 3., 4.));
_ = isNormal(vec3<f32>());
_ = isNormal(vec3<f32>(1.));
_ = isNormal(vec3<f32>(1., 2., 3.));
_ = isNormal(vec2<f32>());
_ = isNormal(vec2<f32>(1.));
_ = isNormal(vec2<f32>(1., 2.));
_ = isNormal(1.);
_ = isNormal(2.);
_ = isNormal(3.);
}