Revert "Reland "[ganesh] Fix uniformity error in atlas multitexture lookup SkSL""

This reverts commit c701d191f801ed67d6882232028a61dbeeca9296.

Reason for revert: Some GMs are unreasonably broken following the change (dftext_blob_persp and persp_shaders_aa).

Original change's description:
> Reland "[ganesh] Fix uniformity error in atlas multitexture lookup SkSL"
>
> This is a reland of commit d42e84911d954b318f3d7008a5b66b7bf3b07a06
>
> Original change's description:
> > [ganesh] Fix uniformity error in atlas multitexture lookup SkSL
> >
> > The atlas_multitexture_lookup utility generates SkSL that conditionally
> > selects a texture/sampler pair to sample at a given coordinate. This
> > involves branching on a non-uniform variable. Using sampleLod allows the
> > conditional sampling to remain while satisfying Dawn's uniformity
> > analysis.
> >
> > Bug: skia:13780, skia:13786
> > Change-Id: I5ff4c63572b43637c980f3b77233cd3634538cdb
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/589216
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Arman Uguray <armansito@google.com>
>
> Change-Id: I9deecd9c3a93e90d46a6f7a15c36105b59f856cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/589984
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Arman Uguray <armansito@google.com>

Change-Id: I3a31f9cb7aafebfb8ce1d035ada732704ced6f0f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/591261
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ganesh/effects/GrAtlasedShaderHelpers.h b/src/gpu/ganesh/effects/GrAtlasedShaderHelpers.h
index 5bfa9a4..347844e 100644
--- a/src/gpu/ganesh/effects/GrAtlasedShaderHelpers.h
+++ b/src/gpu/ganesh/effects/GrAtlasedShaderHelpers.h
@@ -87,30 +87,14 @@
         return;
     }
 
-    // Conditionally load from the indexed texture sampler. We intentionally sample without implicit
-    // derivatives to avoid undefined behavior in branches (and satisfy Dawn's uniformity analysis).
-    // Atlas textures are not mipped so it's OK to always use mip-level 0.
-    //
-    // On OpenGL versions that lack explicit LOD support (GLSL <1.3, GLSL ES <3.0, WebGL 1) we
-    // fallback to sampling with implicit derivatives in branches. For mip-mapepd textures this
-    // would still be considered undefined behavior by the GLSL ES 1.00 specification, but we don't
-    // worry about this because the texture is assumed to be not mip-mapped and we expect shader
-    // compilers to flatten these branches.
-    auto lookup = [&](int idx) {
-        if (args.fShaderCaps->fExplicitTextureLodSupport) {
-            args.fFragBuilder->appendTextureLookupExplicitLod(
-                    args.fTexSamplers[idx], coordName, "0.0");
-        } else {
-            args.fFragBuilder->appendTextureLookup(args.fTexSamplers[idx], coordName);
-        }
-    };
+    // conditionally load from the indexed texture sampler
     for (int i = 0; i < numTextureSamplers-1; ++i) {
         args.fFragBuilder->codeAppendf("if (%s == %d) { %s = ", texIdx.fsIn(), i, colorName);
-        lookup(i);
+        args.fFragBuilder->appendTextureLookup(args.fTexSamplers[i], coordName);
         args.fFragBuilder->codeAppend("; } else ");
     }
     args.fFragBuilder->codeAppendf("{ %s = ", colorName);
-    lookup(numTextureSamplers - 1);
+    args.fFragBuilder->appendTextureLookup(args.fTexSamplers[numTextureSamplers - 1], coordName);
     args.fFragBuilder->codeAppend("; }");
 }
 
diff --git a/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.cpp
index b7787e3..29c860c 100644
--- a/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.cpp
@@ -110,25 +110,6 @@
     this->appendColorGamutXform(lookup.c_str(), colorXformHelper);
 }
 
-void GrGLSLShaderBuilder::appendTextureLookupExplicitLod(SkString* out,
-                                                         SamplerHandle samplerHandle,
-                                                         const char* coordName,
-                                                         const char* lod) const {
-    const char* sampler = fProgramBuilder->samplerVariable(samplerHandle);
-    out->appendf("sampleLod(%s, %s, %s)", sampler, coordName, lod);
-    append_texture_swizzle(out, fProgramBuilder->samplerSwizzle(samplerHandle));
-}
-
-void GrGLSLShaderBuilder::appendTextureLookupExplicitLod(
-        SamplerHandle samplerHandle,
-        const char* coordName,
-        const char* lod,
-        GrGLSLColorSpaceXformHelper* colorXformHelper) {
-    SkString lookup;
-    this->appendTextureLookupExplicitLod(&lookup, samplerHandle, coordName, lod);
-    this->appendColorGamutXform(lookup.c_str(), colorXformHelper);
-}
-
 void GrGLSLShaderBuilder::appendTextureLookupAndBlend(
         const char* dst,
         SkBlendMode mode,
diff --git a/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.h b/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.h
index 8cda8f8..fd74d15 100644
--- a/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.h
+++ b/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.h
@@ -41,18 +41,6 @@
                              const char* coordName,
                              GrGLSLColorSpaceXformHelper* colorXformHelper = nullptr);
 
-    /** Versions of the above that don't rely on implicit derivatives by using an explicit
-        mip-level
-        */
-    void appendTextureLookupExplicitLod(SkString* out,
-                                        SamplerHandle,
-                                        const char* coordName,
-                                        const char* lod) const;
-    void appendTextureLookupExplicitLod(SamplerHandle,
-                                        const char* coordName,
-                                        const char* lod,
-                                        GrGLSLColorSpaceXformHelper* colorXformHelper = nullptr);
-
     /** Does the work of appendTextureLookup and blends the result by dst, treating the texture
         lookup as the src input to the blend. The dst is assumed to be half4 and the result is
         always a half4. If dst is nullptr we use half4(1) as the blend dst. */