skia2/tests/sksl
John Stiles d774558eb1 Implement compile-time optimization for mix().
mix() has many overloads:
$genType mix($genType x, $genType y, $genType a);
$genType mix($genType x, $genType y, float a);
$genHType mix($genHType x, $genHType y, $genHType a);
$genHType mix($genHType x, $genHType y, half a);
$genType mix($genType x, $genType y, $genBType a);
$genHType mix($genHType x, $genHType y, $genBType a);
$genIType mix($genIType x, $genIType y, $genBType a);
$genBType mix($genBType x, $genBType y, $genBType a);

The top half were simple to implement via `evaluate_3_way_intrinsic`.

The bottom half--`x, y, $genBType`--required adding basic support into
`evaluate_n_way_intrinsic_of_type` for mixed argument types, since `x`
and `y` could be of any numeric type, but `a` is always boolean.
Fortunately, this didn't require major changes.

Change-Id: I015471f053c90d5a5c3ac67cc230d0f90950ff60
Bug: skia:12034
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414443
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-06-01 19:36:05 +00:00
..
blend Revert "Vectorize scalars in SPIR-V using ConstructorSplat." 2021-05-14 14:29:33 +00:00
dslfp Large simplification of the CType mapper logic in SkSL 2021-05-18 21:40:14 +00:00
errors Add test for literals that overflow int64. 2021-06-01 17:34:23 +00:00
folding Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
fp Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
glsl Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
inliner Reland "Eliminate unreachable code during optimization." 2021-05-20 20:02:15 +00:00
intrinsics Implement compile-time optimization for mix(). 2021-06-01 19:36:05 +00:00
metal Enable proper testing of matrix-scalar ops. 2021-05-17 17:36:22 +00:00
runtime Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
runtime_errors Evaluate single-argument generic intrinsics at compile time. 2021-05-10 14:50:50 +00:00
shared Prevent overflow of integral types during constant-folding. 2021-05-27 20:12:57 +00:00
spirv Enable proper testing of matrix-scalar ops. 2021-05-17 17:36:22 +00:00
workarounds Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +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.