Remove switch fall-through on HLSL

Remove fall-through from non-empty labels in switch statements.

Tested with dEQP-GLES3.functional.shaders.*switch*. All pass except for tests
that require dFdx/dFdy, which fail for an unrelated reason.

Additional test coverage could still be useful for cases where a label is
terminated by a continue or return statement.

BUG=angle:921

Change-Id: I4741867789a9308d66d0adeabdaf83907106e2d2
Reviewed-on: https://chromium-review.googlesource.com/254550
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index b626f1f..fce12f1 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -17,6 +17,7 @@
 #include "compiler/translator/FlagStd140Structs.h"
 #include "compiler/translator/InfoSink.h"
 #include "compiler/translator/NodeSearch.h"
+#include "compiler/translator/RemoveSwitchFallThrough.h"
 #include "compiler/translator/RewriteElseBlocks.h"
 #include "compiler/translator/SearchSymbol.h"
 #include "compiler/translator/StructureHLSL.h"
@@ -2276,6 +2277,7 @@
 {
     if (node->getStatementList())
     {
+        node->setStatementList(RemoveSwitchFallThrough::removeFallThrough(node->getStatementList()));
         outputTriplet(visit, "switch (", ") ", "");
         // The curly braces get written when visiting the statementList aggregate
     }