mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-04 20:25:56 +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
289 B
WebGPU Shading Language
22 lines
289 B
WebGPU Shading Language
enable f16;
|
|
|
|
fn trunc_cc2b0d() {
|
|
var res : f16 = trunc(1.5h);
|
|
}
|
|
|
|
@vertex
|
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
trunc_cc2b0d();
|
|
return vec4<f32>();
|
|
}
|
|
|
|
@fragment
|
|
fn fragment_main() {
|
|
trunc_cc2b0d();
|
|
}
|
|
|
|
@compute @workgroup_size(1)
|
|
fn compute_main() {
|
|
trunc_cc2b0d();
|
|
}
|