skia2/tests/sksl
John Stiles 973009b04b Clean up type coercion code and IRGenerator::checkValid().
When coercing a type, we would previously call checkValid() so we could
detect function-references and type-references, so we could get a nicer
error message.

It turns out that we can just do the "is this a type-reference/
function-reference?" check directly inside coerce() and get the same
improved error messages. Since we should be coercing all our values to
the right type, and type/function-references aren't coercible to
anything, this should catch them all. I don't expect any of these
to survive all the way to the end of IR generation.

(In case one of these types does slip through, I've left the error case
in checkValid, but I've also put in an assertion. If the fuzzer can
make that assertion fire, we are probably missing a call to coerce()
somewhere.)

This cleanup is meant to help migrate coerce() out of IRGenerator.

Change-Id: I031809adf439b1766048768b782c57e7f2494006
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/371479
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-17 22:39:48 +00:00
..
blend Use guarded_divide in more blend functions 2021-02-10 21:59:26 +00:00
errors Clean up type coercion code and IRGenerator::checkValid(). 2021-02-17 22:39:48 +00:00
folding Fix alpha channel in SelfAssignment test. 2021-02-11 14:41:15 +00:00
fp Add bool2/bool3/bool4 to GrSLType. 2021-02-02 00:25:29 +00:00
glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
inliner Add test to demonstrate out-param semantics violation. 2021-02-16 14:28:49 +00:00
intrinsics Add tests to demonstrate SPIR-V error with intrinsics. 2021-02-16 15:46:01 +00:00
metal Allow repeated params in Metal out-params helper. 2021-02-16 15:45:45 +00:00
runtime Tweak GlobalVariables.rte test, and adjust .stage output 2021-02-17 22:13:19 +00:00
runtime_errors Runtime Effects: Disallow all operators on arrays or arrays-in-structs 2021-02-17 18:05:04 +00:00
shared Fix SPIR-V bug with swizzled out parameters. 2021-02-12 15:21:27 +00:00
spirv Improve memory layout handling in SPIRV generator 2021-01-22 22:16:48 +00:00
workarounds Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
README.txt Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00

This directory contains skslc-compiled output from matching source files
in the /resources/sksl/ directory.