fixed byte/ubyte types in SPIR-V output

Bug: oss-fuzz:15313
Change-Id: Id694413b5c4de41b4e64ed45b732aaa4c52b5f1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240198
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp
index d74ae2e..7342e20 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -2478,10 +2478,12 @@
         type = ConstantType::kInt;
     } else if (i.fType == *fContext.fUInt_Type) {
         type = ConstantType::kUInt;
-    } else if (i.fType == *fContext.fShort_Type) {
+    } else if (i.fType == *fContext.fShort_Type || i.fType == *fContext.fByte_Type) {
         type = ConstantType::kShort;
-    } else if (i.fType == *fContext.fUShort_Type) {
+    } else if (i.fType == *fContext.fUShort_Type || i.fType == *fContext.fUByte_Type) {
         type = ConstantType::kUShort;
+    } else {
+        SkASSERT(false);
     }
     std::pair<ConstantValue, ConstantType> key(i.fValue, type);
     auto entry = fNumberConstants.find(key);