diff --git a/src/gpu/GrProgramInfo.cpp b/src/gpu/GrProgramInfo.cpp
index 43b307a..34e6459 100644
--- a/src/gpu/GrProgramInfo.cpp
+++ b/src/gpu/GrProgramInfo.cpp
@@ -31,25 +31,26 @@
 }
 
 void GrProgramInfo::checkAllInstantiated() const {
-    for (auto [sampler, fp] : GrFragmentProcessor::PipelineTextureSamplerRange(this->pipeline())) {
-        SkASSERT(sampler.proxy()->isInstantiated());
-    }
+    this->pipeline().visitProxies([](GrSurfaceProxy* proxy, GrMipMapped) {
+        SkASSERT(proxy->isInstantiated());
+        return true;
+    });
 }
 
 void GrProgramInfo::checkMSAAAndMIPSAreResolved() const {
-    for (auto [sampler, fp] : GrFragmentProcessor::PipelineTextureSamplerRange(this->pipeline())) {
-        GrTexture* tex = sampler.peekTexture();
+    this->pipeline().visitTextureEffects([](const GrTextureEffect& te) {
+        GrTexture* tex = te.texture();
         SkASSERT(tex);
 
         // Ensure mipmaps were all resolved ahead of time by the DAG.
-        if (GrSamplerState::Filter::kMipMap == sampler.samplerState().filter() &&
+        if (GrSamplerState::Filter::kMipMap == te.samplerState().filter() &&
             (tex->width() != 1 || tex->height() != 1)) {
-            // There are some cases where we might be given a non-mipmapped texture with a mipmap
-            // filter. See skbug.com/7094.
+            // There are some cases where we might be given a non-mipmapped texture with a
+            // mipmap filter. See skbug.com/7094.
             SkASSERT(tex->texturePriv().mipMapped() != GrMipMapped::kYes ||
                      !tex->texturePriv().mipMapsAreDirty());
         }
-    }
+    });
 }
 
 #endif
