mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-05 14:13:39 +00:00
This CL adds const-eval for the `normalize` builtin. Bug: tint:1581 Change-Id: I6d5ba3e0ba507921137ca90c4caefa9daf88f735 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111740 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
20 lines
295 B
WebGPU Shading Language
20 lines
295 B
WebGPU Shading Language
fn normalize_584e47() {
|
|
var res = normalize(vec2(1.0));
|
|
}
|
|
|
|
@vertex
|
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
normalize_584e47();
|
|
return vec4<f32>();
|
|
}
|
|
|
|
@fragment
|
|
fn fragment_main() {
|
|
normalize_584e47();
|
|
}
|
|
|
|
@compute @workgroup_size(1)
|
|
fn compute_main() {
|
|
normalize_584e47();
|
|
}
|