Use VkPipelineCaches during VkPipeline creation

BUG=skia:5037
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1756493002

Review URL: https://codereview.chromium.org/1756493002
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 6b36cdb..a208aed 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -180,6 +180,8 @@
     fVkCaps.reset(new GrVkCaps(options, fInterface, physDev));
     fCaps.reset(SkRef(fVkCaps.get()));
 
+    fResourceProvider.init();
+
     fCurrentCmdBuffer = fResourceProvider.createCommandBuffer();
     SkASSERT(fCurrentCmdBuffer);
     fCurrentCmdBuffer->begin(this);
@@ -267,6 +269,9 @@
     }
 
     // TODO: We're ignoring MIP levels here.
+    if (texels.empty() || !texels.begin()->fPixels) {
+        return false;
+    }
 
     // We assume Vulkan doesn't do sRGB <-> linear conversions when reading and writing pixels.
     if (GrPixelConfigIsSRGB(surface->config()) != GrPixelConfigIsSRGB(config)) {
@@ -537,7 +542,7 @@
     }
 
     // TODO: We're ignoring MIP levels here.
-    if (!texels.empty()) {
+    if (!texels.empty() && texels.begin()->fPixels) {
         if (!this->uploadTexData(tex, 0, 0, desc.fWidth, desc.fHeight, desc.fConfig,
                                  texels.begin()->fPixels, texels.begin()->fRowBytes)) {
             tex->unref();