Commit Graph

1 Commits

Author SHA1 Message Date
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