mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-03 18:55:39 +00:00
This CL adds const-eval for the `distance` builtin. Bug: tint:1581 Change-Id: Iee3af6474ace8e7baa230156f582f0a372f77cb7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111583 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
22 lines
335 B
WebGPU Shading Language
22 lines
335 B
WebGPU Shading Language
fn distance_f9c9ee() {
|
|
const arg_0 = 1.0;
|
|
const arg_1 = 1.0;
|
|
var res = distance(arg_0, arg_1);
|
|
}
|
|
|
|
@vertex
|
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
distance_f9c9ee();
|
|
return vec4<f32>();
|
|
}
|
|
|
|
@fragment
|
|
fn fragment_main() {
|
|
distance_f9c9ee();
|
|
}
|
|
|
|
@compute @workgroup_size(1)
|
|
fn compute_main() {
|
|
distance_f9c9ee();
|
|
}
|