Set Skia sksl generator to use registered magic number.
Change-Id: I7acde3743f5495fc22acd10d6aee966443f5046a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456639
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp b/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp
index aeae383..8e8f552 100644
--- a/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp
@@ -32,7 +32,10 @@
namespace SkSL {
-static const int32_t SKSL_MAGIC = 0x0; // FIXME: we should probably register a magic number
+// Skia's magic number is 31 and goes in the top 16 bits. We can use the lower bits to version the
+// sksl generator if we want.
+// https://github.com/KhronosGroup/SPIRV-Headers/blob/master/include/spirv/spir-v.xml#L84
+static const int32_t SKSL_MAGIC = 0x001F0000;
void SPIRVCodeGenerator::setupIntrinsics() {
#define ALL_GLSL(x) std::make_tuple(kGLSL_STD_450_IntrinsicOpcodeKind, GLSLstd450 ## x, \