mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-15 20:01:22 +00:00
This CL adds parsing for the WGSL `while` statement. Bug: tint:1425 Change-Id: Ibce5e28568935ca4f51b5ac33e7a60af7a916b4a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93540 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
12 lines
170 B
Plaintext
12 lines
170 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
int f() {
|
|
int i = 0;
|
|
while((i < 4)) {
|
|
i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)));
|
|
}
|
|
return i;
|
|
}
|
|
|