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/gpu/effects/GrSkSLFP.cpp b/src/gpu/effects/GrSkSLFP.cpp
index ab553be..235755b 100644
--- a/src/gpu/effects/GrSkSLFP.cpp
+++ b/src/gpu/effects/GrSkSLFP.cpp
@@ -212,7 +212,8 @@
 GrGLSLFragmentProcessor* GrSkSLFP::onCreateGLSLInstance() const {
     // Note: This is actually SkSL (again) but with inline format specifiers.
     SkSL::PipelineStageArgs args;
-    fEffect->toPipelineStage(fInputs->data(), fShaderCaps.get(), fShaderErrorHandler, &args);
+    SkAssertResult(fEffect->toPipelineStage(fInputs->data(), fShaderCaps.get(), fShaderErrorHandler,
+                                            &args));
     return new GrGLSLSkSLFP(std::move(args));
 }