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 `saturate` builtin. Bug: tint:1581 Change-Id: I3729ea5b381b04b73bbe1bc8e03e5ce65c27e082 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107362 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
20 lines
308 B
WebGPU Shading Language
20 lines
308 B
WebGPU Shading Language
fn saturate_6bcddf() {
|
|
var res : vec3<f32> = saturate(vec3<f32>(2.0f));
|
|
}
|
|
|
|
@vertex
|
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
saturate_6bcddf();
|
|
return vec4<f32>();
|
|
}
|
|
|
|
@fragment
|
|
fn fragment_main() {
|
|
saturate_6bcddf();
|
|
}
|
|
|
|
@compute @workgroup_size(1)
|
|
fn compute_main() {
|
|
saturate_6bcddf();
|
|
}
|