skia2/tests/sksl
John Stiles 28054added Optimize ternary tests that check a const variable.
This enables the ternary to be optimized away in code like:
   const bool SHINY = true;
   color = SHINY ? add_shine(x) : x; // to --> `color = add_shine(x);`

Without constant propagation.

Also, I added a unit test for ternary expression simplification; I
wasn't able to find an existing one.

When the optimization flag is disabled, this CL actually removes the
optimization of `true ? x : y` --> `x` entirely; previously, this
substitution would be made regardless of optimization settings.

Change-Id: I93a8b9d4027902d35f8a19cfd6417170b209d056
Bug: skia:11343
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379297
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-03-05 21:41:05 +00:00
..
blend Revert "Disable control-flow analysis in SkSL. (Performance experiment)" 2021-03-04 15:20:09 +00:00
errors Detect functions that fail to return a value, without using CFG. 2021-03-04 22:47:05 +00:00
folding Revert "Disable control-flow analysis in SkSL. (Performance experiment)" 2021-03-04 15:20:09 +00:00
fp Add new style key information to several core effects 2021-03-04 14:49:07 +00:00
glsl Remove specific blend mode layout qualifiers 2021-02-23 15:45:55 +00:00
inliner Revert "Disable control-flow analysis in SkSL. (Performance experiment)" 2021-03-04 15:20:09 +00:00
intrinsics Revert "Disable control-flow analysis in SkSL. (Performance experiment)" 2021-03-04 15:20:09 +00:00
metal Revert "Disable control-flow analysis in SkSL. (Performance experiment)" 2021-03-04 15:20:09 +00:00
runtime Avoid generating unused variables in the Inliner. 2021-02-25 19:18:19 +00:00
runtime_errors Align SkSL const rules more closely with GLSL 2021-02-26 17:44:11 +00:00
shared Optimize ternary tests that check a const variable. 2021-03-05 21:41:05 +00:00
spirv Improve memory layout handling in SPIRV generator 2021-01-22 22:16:48 +00:00
workarounds Revert "Disable control-flow analysis in SkSL. (Performance experiment)" 2021-03-04 15:20:09 +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.