Bug 1302087 - prevent fallback on default branch for case EbtSamplerCubeShadow. r?jrmuizel draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Mon, 12 Sep 2016 16:16:27 +0300
changeset 412604 0634227f892fbf774aeec005040ddb36cf94551d
parent 412489 cfdb7af3af2e92e95f71ca2f1672bf5433beeb89
child 531030 ebd0388008c67264e565705149b45468bffa2616
push id29217
push userbmo:bpostelnicu@mozilla.com
push dateMon, 12 Sep 2016 13:17:19 +0000
reviewersjrmuizel
bugs1302087
milestone51.0a1
Bug 1302087 - prevent fallback on default branch for case EbtSamplerCubeShadow. r?jrmuizel MozReview-Commit-ID: 66KoZz6bfJO
gfx/angle/src/compiler/translator/TextureFunctionHLSL.cpp
--- a/gfx/angle/src/compiler/translator/TextureFunctionHLSL.cpp
+++ b/gfx/angle/src/compiler/translator/TextureFunctionHLSL.cpp
@@ -388,51 +388,32 @@ void OutputTextureFunctionArgumentList(T
         default:
             UNREACHABLE();
     }
 
     if (textureFunction.offset)
     {
         switch (textureFunction.sampler)
         {
-            case EbtSampler2D:
-                out << ", int2 offset";
-                break;
             case EbtSampler3D:
-                out << ", int3 offset";
-                break;
-            case EbtSampler2DArray:
-                out << ", int2 offset";
-                break;
-            case EbtISampler2D:
-                out << ", int2 offset";
-                break;
             case EbtISampler3D:
-                out << ", int3 offset";
-                break;
-            case EbtISampler2DArray:
-                out << ", int2 offset";
-                break;
-            case EbtUSampler2D:
-                out << ", int2 offset";
-                break;
             case EbtUSampler3D:
                 out << ", int3 offset";
                 break;
+            case EbtSampler2D:
+            case EbtSampler2DArray:
+            case EbtISampler2D:
+            case EbtISampler2DArray:
+            case EbtUSampler2D:
             case EbtUSampler2DArray:
-                out << ", int2 offset";
-                break;
             case EbtSampler2DShadow:
+            case EbtSampler2DArrayShadow:
+            case EbtSamplerExternalOES:
                 out << ", int2 offset";
                 break;
-            case EbtSampler2DArrayShadow:
-                out << ", int2 offset";
-                break;
-            case EbtSamplerExternalOES:
-                out << ", int2 offset";
             default:
                 UNREACHABLE();
         }
     }
 
     if (textureFunction.method == TextureFunctionHLSL::TextureFunction::BIAS ||
         textureFunction.method == TextureFunctionHLSL::TextureFunction::LOD0BIAS)
     {