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