dawn-cmake/test/tint/statements/switch/case_default_mixed.wgsl.expected.glsl
dan sinclair f148f0891b [WGSL] Allow default as a case selector
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>
2022-10-19 15:55:02 +00:00

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;
}