Pass GrProgramInfo further down Vulkan call chain

This just resolves some lingering TODOs from:

https://skia-review.googlesource.com/c/skia/+/244118 (Add GrProgramInfo to centralize management of program information)

Bug: skia:9455
Change-Id: I58e8a4e039ba8369b381725be196dacf3bcd07c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247436
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/vk/GrVkOpsRenderPass.cpp b/src/gpu/vk/GrVkOpsRenderPass.cpp
index 864d82e..c58c412 100644
--- a/src/gpu/vk/GrVkOpsRenderPass.cpp
+++ b/src/gpu/vk/GrVkOpsRenderPass.cpp
@@ -450,15 +450,14 @@
     // same place (i.e., the target renderTargetProxy) that had best agree.
     SkASSERT(programInfo.origin() == fOrigin);
 
-    // TODO: just pass in GrProgramInfo
-    pipelineState->setAndBindUniforms(fGpu, fRenderTarget, fOrigin,
-                                      programInfo.primProc(), programInfo.pipeline(), currentCB);
+    pipelineState->setAndBindUniforms(fGpu, fRenderTarget, programInfo, currentCB);
 
     // Check whether we need to bind textures between each GrMesh. If not we can bind them all now.
     if (!programInfo.hasDynamicPrimProcTextures()) {
-        // TODO: just pass in GrProgramInfo
+        auto proxies = programInfo.hasFixedPrimProcTextures() ? programInfo.fixedPrimProcTextures()
+                                                              : nullptr;
         pipelineState->setAndBindTextures(fGpu, programInfo.primProc(), programInfo.pipeline(),
-                                          programInfo.primProcProxies(), currentCB);
+                                          proxies, currentCB);
     }
 
     if (!programInfo.pipeline().isScissorEnabled()) {
@@ -573,8 +572,7 @@
         if (hasDynamicTextures) {
             auto meshProxies = programInfo.dynamicPrimProcTextures(i);
             pipelineState->setAndBindTextures(fGpu, programInfo.primProc(), programInfo.pipeline(),
-                                              meshProxies,
-                                              this->currentCommandBuffer());
+                                              meshProxies, this->currentCommandBuffer());
         }
         SkASSERT(pipelineState);
         mesh.sendToGpu(this);
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp
index 6e7de88..b48f155 100644
--- a/src/gpu/vk/GrVkPipelineState.cpp
+++ b/src/gpu/vk/GrVkPipelineState.cpp
@@ -115,15 +115,13 @@
 
 void GrVkPipelineState::setAndBindUniforms(GrVkGpu* gpu,
                                            const GrRenderTarget* renderTarget,
-                                           GrSurfaceOrigin origin,
-                                           const GrPrimitiveProcessor& primProc,
-                                           const GrPipeline& pipeline,
+                                           const GrProgramInfo& programInfo,
                                            GrVkCommandBuffer* commandBuffer) {
-    this->setRenderTargetState(renderTarget, origin);
+    this->setRenderTargetState(renderTarget, programInfo.origin());
 
-    fGeometryProcessor->setData(fDataManager, primProc,
-                                GrFragmentProcessor::CoordTransformIter(pipeline));
-    GrFragmentProcessor::Iter iter(pipeline);
+    fGeometryProcessor->setData(fDataManager, programInfo.primProc(),
+                                GrFragmentProcessor::CoordTransformIter(programInfo.pipeline()));
+    GrFragmentProcessor::Iter iter(programInfo.pipeline());
     GrGLSLFragmentProcessor::Iter glslIter(fFragmentProcessors.get(), fFragmentProcessorCnt);
     const GrFragmentProcessor* fp = iter.next();
     GrGLSLFragmentProcessor* glslFP = glslIter.next();
@@ -136,9 +134,10 @@
 
     {
         SkIPoint offset;
-        GrTexture* dstTexture = pipeline.peekDstTexture(&offset);
+        GrTexture* dstTexture = programInfo.pipeline().peekDstTexture(&offset);
 
-        fXferProcessor->setData(fDataManager, pipeline.getXferProcessor(), dstTexture, offset);
+        fXferProcessor->setData(fDataManager, programInfo.pipeline().getXferProcessor(),
+                                dstTexture, offset);
     }
 
     // Get new descriptor set
diff --git a/src/gpu/vk/GrVkPipelineState.h b/src/gpu/vk/GrVkPipelineState.h
index 9d6fe0f..331bb01 100644
--- a/src/gpu/vk/GrVkPipelineState.h
+++ b/src/gpu/vk/GrVkPipelineState.h
@@ -53,8 +53,8 @@
 
     ~GrVkPipelineState();
 
-    void setAndBindUniforms(GrVkGpu*, const GrRenderTarget*, GrSurfaceOrigin,
-                            const GrPrimitiveProcessor&, const GrPipeline&, GrVkCommandBuffer*);
+    void setAndBindUniforms(GrVkGpu*, const GrRenderTarget*, const GrProgramInfo&,
+                            GrVkCommandBuffer*);
     /**
      * This must be called after setAndBindUniforms() since that function invalidates texture
      * bindings.