skia2/resources/sksl
John Stiles f89a8122a4 Fix flaws in minus-prefix optimization.
We had a logic bug when attempting to optimize the following code:
    const vecN x = vecN(a, b, c);
    -x;

The goal was to replace `-x` with `vecN(-a, -b, -c)` but we accidentally
tried to cast the `x` VariableReference to a Constructor. We
unfortunately didn't cover this in any of our test cases, but the fuzzer
managed to synthesize it by mixing and matching elements from its new
corpus.

This affected several different constructor types: splat, diagonal-
matrix, compound and array.

Change-Id: I10dd2460ab26ba3e820b0cff5db091368fb7e648
Bug: oss-fuzz:37764, oss-fuzz:37861
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443407
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-08-30 20:40:17 +00:00
..
blend Remove SkBlendMode from SkSL 2021-06-16 21:01:30 +00:00
errors Remove support for unsized arrays 2021-08-27 22:14:16 +00:00
folding Remove 0/x arithmetic simplification. 2021-08-24 19:18:41 +00:00
glsl Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
inliner Remove enum support from SkSL 2021-07-09 14:03:15 +00:00
intrinsics Reland "Add ES3 intrinsics isinf/isnan to public SkSL ES3." 2021-08-25 19:01:22 +00:00
metal Enable proper testing of matrix-scalar ops. 2021-05-17 17:36:22 +00:00
runtime Convert internal sample() calls to shade/filter/blend 2021-08-24 21:03:44 +00:00
runtime_errors Convert internal sample() calls to shade/filter/blend 2021-08-24 21:03:44 +00:00
shared Fix flaws in minus-prefix optimization. 2021-08-30 20:40:17 +00:00
spirv Fix parsing error with SPIR-V negating a uint. 2021-08-25 17:52:50 +00:00
workarounds Add a workaround for "ldexp(..., -x)" on Mac/Radeon/GLSL 2021-06-08 01:39:38 +00:00
README.txt
update_fuzzer.py Add script to update the SkSL fuzzer corpus automatically. 2021-08-26 13:51:44 +00:00

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