dawn-cmake/test/builtins/repeated_use.wgsl
Ben Clayton b85e692aa7 Rename 'intrinsic' to 'builtin'
This matches the term used in the WGSL spec.

Change-Id: I4603332b828450c126ef806f1064ed54f372013f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78787
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-02-02 23:07:11 +00:00

21 lines
582 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.);
}