Store push constants setting in persistent cache.

When generating the SkSL for a given shader we've already made some
decisions about whether to use push constants or not. However, the
SkSL->SPIR-V generator needs to know this in case it adds a uniform
(namely RTHeight).

Change-Id: Id8767924fff4e01227aca5f6fd6f8d5386e357bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378321
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/GrPersistentCacheUtils.h b/src/gpu/GrPersistentCacheUtils.h
index e0d3cbf..379dbb5 100644
--- a/src/gpu/GrPersistentCacheUtils.h
+++ b/src/gpu/GrPersistentCacheUtils.h
@@ -28,7 +28,7 @@
 };
 
 // Increment this whenever the serialization format of cached shaders changes
-static constexpr int kCurrentVersion = 2;
+static constexpr int kCurrentVersion = 3;
 
 static inline sk_sp<SkData> PackCachedShaders(SkFourByteTag shaderType,
                                               const SkSL::String shaders[],
@@ -53,6 +53,7 @@
             writer.writeBool(meta->fSettings->fFlipY);
             writer.writeBool(meta->fSettings->fFragColorIsInOut);
             writer.writeBool(meta->fSettings->fForceHighPrecision);
+            writer.writeBool(meta->fSettings->fUsePushConstants);
         }
 
         writer.writeInt(meta->fAttributeNames.count());
@@ -99,6 +100,7 @@
             meta->fSettings->fFlipY              = reader->readBool();
             meta->fSettings->fFragColorIsInOut   = reader->readBool();
             meta->fSettings->fForceHighPrecision = reader->readBool();
+            meta->fSettings->fUsePushConstants   = reader->readBool();
         }
 
         meta->fAttributeNames.resize(reader->readInt());