Update vulkan features (again) to support extension features.

We need to handle all the possible ways a client is allowed to initialize
features on Vulkan.

Bug: skia:
Change-Id: I98b1dee2efa2c22c26ce093c590c7ccd0b626969
Reviewed-on: https://skia-review.googlesource.com/145530
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index 24af9d7..7f67f7c 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -16,7 +16,7 @@
 #include "vk/GrVkExtensions.h"
 
 GrVkCaps::GrVkCaps(const GrContextOptions& contextOptions, const GrVkInterface* vkInterface,
-                   VkPhysicalDevice physDev, const VkPhysicalDeviceFeatures& features,
+                   VkPhysicalDevice physDev, const VkPhysicalDeviceFeatures2& features,
                    uint32_t instanceVersion, const GrVkExtensions& extensions)
     : INHERITED(contextOptions) {
     fMustDoCopiesFromOrigin = false;
@@ -203,7 +203,7 @@
 }
 
 void GrVkCaps::init(const GrContextOptions& contextOptions, const GrVkInterface* vkInterface,
-                    VkPhysicalDevice physDev, const VkPhysicalDeviceFeatures& features,
+                    VkPhysicalDevice physDev, const VkPhysicalDeviceFeatures2& features,
                     const GrVkExtensions& extensions) {
 
     VkPhysicalDeviceProperties properties;
@@ -346,7 +346,7 @@
 
 void GrVkCaps::initGrCaps(const VkPhysicalDeviceProperties& properties,
                           const VkPhysicalDeviceMemoryProperties& memoryProperties,
-                          const VkPhysicalDeviceFeatures& features) {
+                          const VkPhysicalDeviceFeatures2& features) {
     // So GPUs, like AMD, are reporting MAX_INT support vertex attributes. In general, there is no
     // need for us ever to support that amount, and it makes tests which tests all the vertex
     // attribs timeout looping over that many. For now, we'll cap this at 64 max and can raise it if
@@ -375,11 +375,11 @@
     fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag;
 
     fOversizedStencilSupport = true;
-    fSampleShadingSupport = features.sampleRateShading;
+    fSampleShadingSupport = features.features.sampleRateShading;
 }
 
 void GrVkCaps::initShaderCaps(const VkPhysicalDeviceProperties& properties,
-                              const VkPhysicalDeviceFeatures& features) {
+                              const VkPhysicalDeviceFeatures2& features) {
     GrShaderCaps* shaderCaps = fShaderCaps.get();
     shaderCaps->fVersionDeclString = "#version 330\n";
 
@@ -420,10 +420,10 @@
 
     shaderCaps->fShaderDerivativeSupport = true;
 
-    shaderCaps->fGeometryShaderSupport = features.geometryShader;
+    shaderCaps->fGeometryShaderSupport = features.features.geometryShader;
     shaderCaps->fGSInvocationsSupport = shaderCaps->fGeometryShaderSupport;
 
-    shaderCaps->fDualSourceBlendingSupport = features.dualSrcBlend;
+    shaderCaps->fDualSourceBlendingSupport = features.features.dualSrcBlend;
 
     shaderCaps->fIntegerSupport = true;
     shaderCaps->fVertexIDSupport = true;