mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-08 22:26:06 +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>
24 lines
285 B
Plaintext
24 lines
285 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
kernel 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;
|
|
}
|
|
|