mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-12 16:15:55 +00:00
This CL updates the WGSL parser to parse `default` as a case selector value. Bug: tint:1633 Change-Id: I57661d25924e36bec5c03f96399c557fb7bbf760 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106382 Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com> Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
21 lines
251 B
HLSL
21 lines
251 B
HLSL
[numthreads(1, 1, 1)]
|
|
void f() {
|
|
int i = 0;
|
|
int result = 0;
|
|
switch(i) {
|
|
default: {
|
|
result = 10;
|
|
break;
|
|
}
|
|
case 1: {
|
|
result = 22;
|
|
break;
|
|
}
|
|
case 2: {
|
|
result = 33;
|
|
break;
|
|
}
|
|
}
|
|
return;
|
|
}
|