mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-04 11:15:46 +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>
20 lines
289 B
WebGPU Shading Language
20 lines
289 B
WebGPU Shading Language
fn distance_f9c9ee() {
|
|
var res = distance(1.0, 1.0);
|
|
}
|
|
|
|
@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();
|
|
}
|