skia2/tests/sksl/folding
John Stiles dabb2891c4 Fold casts of known values at compile time.
A cast like `float(five)` or `int4(colorGreen)` will now detect const
variables and replace the expression with its compile-time constant
equivalent value. This can unblock further constant folding
opportunities.

(This CL is very similar in spirit to http://review.skia.org/404676)

Change-Id: If78a2091770777b0caaaec696fe15a0f55d88c24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405683
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-05-07 22:04:48 +00:00
..
ArrayFolding.glsl Add support for constant-folded array inequality checks. 2021-03-31 15:50:02 +00:00
AssignmentOps.glsl Performance experiment: disable control-flow analysis. 2021-03-08 19:41:19 +00:00
BoolFolding.glsl Allow compile-time intrinsic evaluation to read const variables. 2021-05-07 13:36:08 +00:00
CastFolding.glsl Fold casts of known values at compile time. 2021-05-07 22:04:48 +00:00
FloatFolding.glsl Revert "Inline functions of the form 'return (expr)' only." 2021-03-15 22:08:48 +00:00
IntFoldingES2.glsl Revert "Inline functions of the form 'return (expr)' only." 2021-03-15 22:08:48 +00:00
IntFoldingES3.glsl Revert "Inline functions of the form 'return (expr)' only." 2021-03-15 22:08:48 +00:00
MatrixFoldingES2.glsl Represent matrix resizes as a dedicated expression type. 2021-04-06 18:35:06 +00:00
MatrixFoldingES3.glsl Revert "Inline functions of the form 'return (expr)' only." 2021-03-15 22:08:48 +00:00
SelfAssignment.glsl Performance experiment: disable control-flow analysis. 2021-03-08 19:41:19 +00:00
ShortCircuitBoolFolding.glsl Revert "Inline functions of the form 'return (expr)' only." 2021-03-15 22:08:48 +00:00
SwizzleFolding.glsl Reland "Optimize away swizzles of constant variables." 2021-04-30 13:12:18 +00:00
VectorScalarFolding.glsl Mangle function names in GLSL. 2021-03-22 17:18:26 +00:00
VectorVectorFolding.glsl Mangle function names in GLSL. 2021-03-22 17:18:26 +00:00