writer/hlsl: Inline fallthrough case statements

FXC does not support fallthrough case statements (DXC does).

Fixed: tint:1082
Change-Id: I82e1add5455e438056259f773f34bf9db05970b4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60480
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Ben Clayton
2021-08-02 12:58:19 +00:00
committed by Tint LUCI CQ
parent 8ebff3dc85
commit c0fbce65d8
43 changed files with 385 additions and 142 deletions

View File

@@ -1,11 +1,12 @@
SKIP: FAILED
[numthreads(1, 1, 1)]
void f() {
int i = 0;
switch(i) {
case 0: {
/* fallthrough */
{
break;
}
}
default: {
break;
@@ -13,5 +14,3 @@ void f() {
}
return;
}
C:\src\tint\test\Shader@0x000001AF1A4F6940(5,5): error X3533: non-empty case statements must have break or return