skia2/tests/sksl
John Stiles 4d1a935835 Avoid error cascades when casting out-of-range scalar values.
Previously, when attempting to cast a huge value to an int, SkSL would
report an error, then return the IR for
`ScalarCast(Int, FloatLiteral(huge-value))` . Now, to minimize the blast
radius of the error, we report the error but return `IntLiteral(0)`.
We've already reported an error, so there's no need to preserve the
value, and zero is less likely to produce follow-up errors.

(A similar approach is used here and worked well: https://osscs.corp.google.com/skia/skia/+/main:src/sksl/ir/SkSLConstructorCompoundCast.cpp;l=57-59)

Change-Id: Ie8e8d48380cb963466d1f47d123d64e3301cf87c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499563
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-01-25 23:13:28 +00:00
..
blend Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
errors Avoid error cascades when casting out-of-range scalar values. 2022-01-25 23:13:28 +00:00
folding Implement constant folding for componentwise matrix-matrix ops. 2022-01-25 17:52:31 +00:00
glsl Report an error if sk_LastFragColor is referenced without fbFetchSupport 2021-09-15 15:41:49 +00:00
inliner Fix up test SkSLInlineWithInoutArgument. 2022-01-25 21:33:45 +00:00
intrinsics Revert "[skslc] Generate .hlsl test output files" 2022-01-25 04:57:15 +00:00
metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
runtime Made SkSL type aliases into first-class objects 2022-01-05 16:20:19 +00:00
runtime_errors Update comments in FirstClassArrays test. 2022-01-06 18:53:34 +00:00
shared Remove old test outputs. 2022-01-25 22:42:56 +00:00
spirv Roll SPIRV-Headers and SPIRV-Tools 2021-11-19 19:22:54 +00:00
workarounds Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +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.