mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-15 20:01:22 +00:00
This transform was attempting to remove builtins with no side effects, such as a call with abstract int/float args, which is unhandled by this transform. For example, this would cause the transform to ICE: _ = clamp(1, 2, 3); Fixes ClusterFuzz issue crbug.com/1348739. Bug: chromium:1348739 Change-Id: Ie355eb36c6c020417c2d93f2dc434c11dbb72d1f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97880 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
21 lines
607 B
WebGPU Shading Language
21 lines
607 B
WebGPU Shading Language
// Check that for backends that generate builtin helpers, repeated use of the
|
|
// same builtin overload results in single helper being generated.
|
|
@compute @workgroup_size(1)
|
|
fn main() {
|
|
let a = degrees(vec4<f32>());
|
|
let b = degrees(vec4<f32>(1.));
|
|
let c = degrees(vec4<f32>(1., 2., 3., 4.));
|
|
|
|
let d = degrees(vec3<f32>());
|
|
let e = degrees(vec3<f32>(1.));
|
|
let f = degrees(vec3<f32>(1., 2., 3.));
|
|
|
|
let g = degrees(vec2<f32>());
|
|
let h = degrees(vec2<f32>(1.));
|
|
let i = degrees(vec2<f32>(1., 2.));
|
|
|
|
let j = degrees(1.);
|
|
let k = degrees(2.);
|
|
let l = degrees(3.);
|
|
}
|