mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-06 21:25:58 +00:00
This CL adds const-eval for `trunc`. Bug: tint:1581 Change-Id: If58f79ea70fe490746e30ed118d847c61edd8023 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110173 Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
22 lines
306 B
WebGPU Shading Language
22 lines
306 B
WebGPU Shading Language
enable f16;
|
|
|
|
fn trunc_a56109() {
|
|
var res : vec2<f16> = trunc(vec2<f16>(1.5h));
|
|
}
|
|
|
|
@vertex
|
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
trunc_a56109();
|
|
return vec4<f32>();
|
|
}
|
|
|
|
@fragment
|
|
fn fragment_main() {
|
|
trunc_a56109();
|
|
}
|
|
|
|
@compute @workgroup_size(1)
|
|
fn compute_main() {
|
|
trunc_a56109();
|
|
}
|