skia2/resources/sksl
John Stiles cc473cd92f Fix fuzzer-discovered error with swizzles.
Some paths through swizzle optimization would replace a swizzles with a
constructor--e.g. `float3(1, 2, 3).y` would be replaced with `float(2)`.
(Constructor::Convert was responsible for replacing this trivial
constructor with the literal `2.0`.)

The optimization code asserted that this replacement would succeed, but
the fuzzer managed to construct a counterexample where the constructor
rejected the value. Specifically, by nesting casts between int3 and
float3, it found a case where Constructor::Convert returned null because
the literal value was out of range for `int` types.

This assertion didn't really add value so removing it was harmless.
Constructor::Convert already reports an error when it fails, and null
returns are handled properly throughout.

Change-Id: I575d441ed90d6b696f6399941c3f6d84698794bc
Bug: oss-fuzz:44045
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499382
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-01-25 16:25:09 +00:00
..
blend Remove SkBlendMode from SkSL 2021-06-16 21:01:30 +00:00
errors Fix fuzzer-discovered error with swizzles. 2022-01-25 16:25:09 +00:00
es2_conformance Mark symbols starting with gl_ as reserved words. 2021-11-01 22:43:44 +00:00
folding Simplify control flow in switch test to unbreak iOS. 2022-01-13 14:49:06 +00:00
glsl Report an error if sk_LastFragColor is referenced without fbFetchSupport 2021-09-15 15:41:49 +00:00
inliner Allow inlining of functions with unassigned out-params. 2021-11-11 19:33:06 +00:00
intrinsics Rename SkSL's 2D cross product builtin function 2021-12-14 22:00:26 +00:00
metal Reland "Restrict where 'binding' and 'set' can appear" 2021-11-23 18:03:24 +00:00
runtime Fix assertion when debug-tracing a void-return function. 2021-12-10 14:39:05 +00:00
runtime_errors Update comments in FirstClassArrays test. 2022-01-06 18:53:34 +00:00
shared Reland "Better Matrix/Scalar testing" 2022-01-14 19:12:00 +00:00
spirv Disallow 'binding' and 'set' on push constants 2021-11-24 19:27:14 +00:00
workarounds Remove the "in blend modes randomly fail for all zero vec" workaround 2021-10-21 16:54:51 +00:00
README.txt
update_fuzzer.py Implement parser for ES2 conformance '.test' files. 2021-09-29 16:48:14 +00:00

This directory contains source files for testing skslc compilation.
The compiled output files are in the /tests/sksl/ directory.