mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-03 13:11:34 +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>
28 lines
347 B
GLSL
28 lines
347 B
GLSL
#version 310 es
|
|
|
|
void f() {
|
|
int i = 0;
|
|
int result = 0;
|
|
switch(i) {
|
|
case 0: {
|
|
result = 10;
|
|
break;
|
|
}
|
|
case 1:
|
|
default: {
|
|
result = 22;
|
|
break;
|
|
}
|
|
case 2: {
|
|
result = 33;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
void main() {
|
|
f();
|
|
return;
|
|
}
|