5f16ed4c58
MSL does not support the unary "-" operator on matrix types. Similarly the SPIR-V OpFNegate/OpSNegate operations only work on scalar and vector type. * An expression such as "-<mat>" is now transformed to "-1.0 * <mat>" when generating MSL. * The same expression now generates a component-wise negation in SPIR-V, matching what glslang outputs for GLSL. * A unary "+" is now treated as NOP for MSL, matching the SPIR-V backend. An expression such as "+<expr>" is now evaluated as "<expr>". * The shared/Negation.sksl has been moved to folding/ as much of its contents exercise constant-folding of comparison expressions. * The shared/UnaryPositiveNegative.sksl test has been extended to exercise scalar and matrix types. NOTE: The SPIR-V backend changes have caused a minor re-ordering of SSA IDs generated when writing out a prefix-expression. The affected gold files have been updated. Bug: skia:12627, skia:12992 Change-Id: Iec5cdafc591aed7e49b3b52bda42a02661380bab Reviewed-on: https://skia-review.googlesource.com/c/skia/+/513976 Auto-Submit: Arman Uguray <armansito@google.com> Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Arman Uguray <armansito@google.com> |
||
---|---|---|
.. | ||
ArrayFolding.glsl | ||
ArraySizeFolding.glsl | ||
AssignmentOps.glsl | ||
BoolFolding.glsl | ||
CastFolding.glsl | ||
FloatFolding.glsl | ||
IntFoldingES2.glsl | ||
IntFoldingES3.glsl | ||
MatrixFoldingES2.glsl | ||
MatrixFoldingES3.glsl | ||
Negation.glsl | ||
SelfAssignment.glsl | ||
ShortCircuitBoolFolding.glsl | ||
SwitchCaseFolding.glsl | ||
SwizzleFolding.glsl | ||
VectorScalarFolding.glsl | ||
VectorVectorFolding.glsl |