Validate function return and parameter types in IR generator

Prevents invalid types from making it to the pipeline stage generator,
when it's too late to do anything.

Bug: oss-fuzz:24542
Change-Id: I8b6fa2afd5d586b0e60bea82e0ec4f3ae43de973
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307656
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index e41967a..36b9391 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -1794,7 +1794,7 @@
     }
     write_stringstream(fExtraFunctions, *rawOut);
     write_stringstream(body, *rawOut);
-    return true;
+    return 0 == fErrors.errorCount();
 }
 
 }