Add support for immuatable samplers in vulkan.

For ycbcr conversions we need add immutable samplers to the creation of
the VkPipeline via the descriptor set layout.

Bug: skia:
Change-Id: I5eea6037191fd34d26d49f58533035316158cacd
Reviewed-on: https://skia-review.googlesource.com/c/171642
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/GrPrimitiveProcessor.cpp b/src/gpu/GrPrimitiveProcessor.cpp
index b84af68..672056c 100644
--- a/src/gpu/GrPrimitiveProcessor.cpp
+++ b/src/gpu/GrPrimitiveProcessor.cpp
@@ -55,8 +55,9 @@
 
 GrPrimitiveProcessor::TextureSampler::TextureSampler(GrTextureType textureType,
                                                      GrPixelConfig config,
-                                                     const GrSamplerState& samplerState) {
-    this->reset(textureType, config, samplerState);
+                                                     const GrSamplerState& samplerState,
+                                                     uint32_t extraSamplerKey) {
+    this->reset(textureType, config, samplerState, extraSamplerKey);
 }
 
 GrPrimitiveProcessor::TextureSampler::TextureSampler(GrTextureType textureType,
@@ -68,12 +69,15 @@
 
 void GrPrimitiveProcessor::TextureSampler::reset(GrTextureType textureType,
                                                  GrPixelConfig config,
-                                                 const GrSamplerState& samplerState) {
+                                                 const GrSamplerState& samplerState,
+                                                 uint32_t extraSamplerKey) {
     SkASSERT(kUnknown_GrPixelConfig != config);
     fSamplerState = samplerState;
     fSamplerState.setFilterMode(clamp_filter(textureType, samplerState.filter()));
     fTextureType = textureType;
     fConfig = config;
+    fExtraSamplerKey = extraSamplerKey;
+    SkASSERT(!fExtraSamplerKey || textureType == GrTextureType::kExternal);
 }
 
 void GrPrimitiveProcessor::TextureSampler::reset(GrTextureType textureType,