dawn-cmake/test/statements/switch
Antonio Maiorano 02acf59184 HLSL backend: work around FXC ignoring switch with only default case
In HLSL code, if a switch statement has only a default case, FXC will
effectively ignore the code in that case. In this change, we detect this
and work around it by emitting the code in the default block without the
switch.

Bug: tint:1188
Change-Id: I69b405cdb4c669fb093eb49aa138923419dcf8f8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/68440
Kokoro: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@chromium.org>
2021-11-05 20:39:07 +00:00
..
common.wgsl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
common.wgsl.expected.hlsl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
common.wgsl.expected.msl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
common.wgsl.expected.spvasm HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
common.wgsl.expected.wgsl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
fallthrough.wgsl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
fallthrough.wgsl.expected.hlsl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
fallthrough.wgsl.expected.msl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
fallthrough.wgsl.expected.spvasm HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
fallthrough.wgsl.expected.wgsl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
only_default_case.wgsl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
only_default_case.wgsl.expected.hlsl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
only_default_case.wgsl.expected.msl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
only_default_case.wgsl.expected.spvasm HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00
only_default_case.wgsl.expected.wgsl HLSL backend: work around FXC ignoring switch with only default case 2021-11-05 20:39:07 +00:00