skia2/resources/sksl/folding
John Stiles 55dc5c8325 Fix assertion in constant-folder when using float4(mat2) casts.
The no-op-arithmetic simplifier was written before we allowed casting a
mat2x2 to a float4, and did not expect a matrix inside a vector ctor.
The expression `float4(myMat2) * float4(anything)` would assert when we
tried to determine if `myMat2` was a constant zero or constant one.

The code has been rewritten to use getConstantSubexpression and now
allows matrices inside.

Change-Id: Id625141256bf89d816c57d2d21f16b0ec252c158
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440858
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-20 14:04:52 +00:00
..
ArrayFolding.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
AssignmentOps.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
BoolFolding.sksl Optimize not() intrinsic. 2021-05-11 14:08:39 +00:00
CastFolding.sksl Add test demonstrating missed opportunities with casts. 2021-05-07 22:04:16 +00:00
FloatFolding.sksl Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
IntFoldingES2.sksl Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
IntFoldingES3.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
MatrixFoldingES2.sksl Fix assertion in constant-folder when using float4(mat2) casts. 2021-08-20 14:04:52 +00:00
MatrixFoldingES3.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
SelfAssignment.sksl Enforce consistency in swizzle domains. 2021-07-09 20:30:22 +00:00
ShortCircuitBoolFolding.sksl Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
SwizzleFolding.sksl Add test demonstrating swizzled constant folding. 2021-04-29 15:59:37 +00:00
VectorScalarFolding.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
VectorVectorFolding.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00