Reland "Reland "Let client pass in full extension to GrVkBackendContext.""

This reverts commit dc13c21b1e49ca1e16251d01bd1062157c5c1c2b.

Reason for revert: fuchsia should be fixed

Original change's description:
> Revert "Reland "Let client pass in full extension to GrVkBackendContext.""
> 
> This reverts commit a782dcb3c407a7e30d7c1263bf9965792088e786.
> 
> Reason for revert: fuchsia changes reverted
> 
> Original change's description:
> > Reland "Let client pass in full extension to GrVkBackendContext."
> > 
> > This reverts commit cb92b26e5ca6063bcf1a922109b8224e0b6eb4da.
> > 
> > Reason for revert: <INSERT REASONING HERE>
> > 
> > Original change's description:
> > > Revert "Let client pass in full extension to GrVkBackendContext."
> > > 
> > > This reverts commit 45c9dab4c3ec43cedb28d1b8c08e166fe0c2e767.
> > > 
> > > Reason for revert: fucshia uses GrVkBackendContext. Need to revert earlier changes
> > > 
> > > Original change's description:
> > > > Let client pass in full extension to GrVkBackendContext.
> > > > 
> > > > Bug: skia:
> > > > Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
> > > > Reviewed-on: https://skia-review.googlesource.com/131880
> > > > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > 
> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > > 
> > > Change-Id: I1a765ff406c83cb234c3614b804fbed677d5a382
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:
> > > Reviewed-on: https://skia-review.googlesource.com/137901
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: skia:
> > Change-Id: I0af797c51dde705473e9afaccb1d4b4423e8c41e
> > Reviewed-on: https://skia-review.googlesource.com/138302
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> 
> Change-Id: Idf760d5ac6b82df33a4408079a0223be833058ad
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/138420
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: Ied1323b7197b600e895d85ac7e85d6f65985dabc
Reviewed-on: https://skia-review.googlesource.com/139002
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 9a17b73..5a19713 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -36,6 +36,7 @@
 #include "SkMipMap.h"
 #include "SkSLCompiler.h"
 #include "SkTo.h"
+
 #include "vk/GrVkTypes.h"
 
 #include <utility>
@@ -64,13 +65,27 @@
         return nullptr;
     }
 
-    sk_sp<const GrVkInterface> interface(new GrVkInterface(backendContext.fGetProc,
-                                         backendContext.fInstance,
-                                         backendContext.fDevice,
-                                         backendContext.fExtensions));
+    sk_sp<const GrVkInterface> interface;
 
-    if (!interface->validate(backendContext.fExtensions)) {
-        return nullptr;
+    if (backendContext.fVkExtensions) {
+        interface.reset(new GrVkInterface(backendContext.fGetProc,
+                                          backendContext.fInstance,
+                                          backendContext.fDevice,
+                                          backendContext.fVkExtensions));
+        if (!interface->validate(backendContext.fVkExtensions)) {
+            return nullptr;
+        }
+    } else {
+        // None of our current GrVkExtension flags actually affect the vulkan backend so we just
+        // make an empty GrVkExtensions and pass that to the GrVkInterface.
+        GrVkExtensions extensions;
+        interface.reset(new GrVkInterface(backendContext.fGetProc,
+                                          backendContext.fInstance,
+                                          backendContext.fDevice,
+                                          &extensions));
+        if (!interface->validate(&extensions)) {
+            return nullptr;
+        }
     }
 
     return sk_sp<GrGpu>(new GrVkGpu(context, options, backendContext, interface));
@@ -99,7 +114,7 @@
     fCompiler = new SkSL::Compiler();
 
     fVkCaps.reset(new GrVkCaps(options, this->vkInterface(), backendContext.fPhysicalDevice,
-                               backendContext.fFeatures, backendContext.fExtensions));
+                               backendContext.fFeatures));
     fCaps.reset(SkRef(fVkCaps.get()));
 
     VK_CALL(GetPhysicalDeviceProperties(backendContext.fPhysicalDevice, &fPhysDevProps));