Fix fuzzer-discovered error with matrix-vector folding.
Previously, `cast_expression` assumed that its input would be castable
to the destination type. Now, it is defensive and returns null if its
input isn't convertible. Call sites for `cast_expression` and
`negate_expression` now explicitly check for null returns and fall
through cleanly.
Added several additional unit tests to verify this behavior. (I expect
these tests will expose a bug on at least one or two GPUs.)
Change-Id: I73bf599ffb46a365f37207f6c5403a30e94a4b76
Bug: oss-fuzz:49574
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/564056
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
3 files changed