GrShaderCaps always stores config texture swizzles.

Previously the swizzles were all "rgba" when GL texture swizzle was
used. This made it impossible to know the component mapping in that
case from API-neutral code.

Change-Id: I5e55fec87f0de2f8d43d8dc7759125482fccd91c
Bug: skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218280
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp
index 24c7b49..7ca3e33 100644
--- a/src/gpu/GrShaderCaps.cpp
+++ b/src/gpu/GrShaderCaps.cpp
@@ -55,6 +55,9 @@
     fHalfIs32Bits = false;
     fHasLowFragmentPrecision = false;
     fUnsignedSupport = false;
+    // Backed API support is required to be able to make swizzle-neutral shaders (e.g.
+    // GL_ARB_texture_swizzle).
+    fTextureSwizzleAppliedInShader = true;
     fBuiltinFMASupport = false;
 
     fVersionDeclString = nullptr;
@@ -130,6 +133,8 @@
     writer->appendBool("float == fp32", fFloatIs32Bits);
     writer->appendBool("half == fp32", fHalfIs32Bits);
     writer->appendBool("Has poor fragment precision", fHasLowFragmentPrecision);
+    writer->appendBool("Unsigned support", fUnsignedSupport);
+    writer->appendBool("Texture swizzle applied in shader", fTextureSwizzleAppliedInShader);
     writer->appendBool("Builtin fma() support", fBuiltinFMASupport);
 
     writer->appendS32("Max FS Samplers", fMaxFragmentSamplers);