Normalize storage of shader strings in the cache
Adds a tag that can be used to verify the expected type
of shaders. My follow-up CL that adds SkSL editing to
Vulkan relies heavily on this.
Change-Id: Ifda420c2dcbaff07cdf1b8157d0ece02b1ab6c78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210262
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tools/viewer/Viewer.h b/tools/viewer/Viewer.h
index 1c02e3a..8cc2f21 100644
--- a/tools/viewer/Viewer.h
+++ b/tools/viewer/Viewer.h
@@ -194,8 +194,9 @@
sk_sp<const SkData> fKey;
SkString fKeyString;
- SkSL::Program::Inputs fInputs;
- SkSL::String fShader[kGrShaderTypeCount];
+ SkFourByteTag fShaderType;
+ SkSL::String fShader[kGrShaderTypeCount];
+ SkSL::Program::Inputs fInputs[kGrShaderTypeCount];
};
sk_gpu_test::MemoryCache fPersistentCache;