skia2/tests/sksl/blend
Arman Uguray 5f16ed4c58 [sksl] Special-case unary negation on matrix types in MSL/SPIR-V
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>
2022-03-01 20:14:46 +00:00
..
BlendClear.asm.frag
BlendClear.glsl
BlendClear.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendClearStandaloneSettings.glsl
BlendColor.asm.frag Use unordered comparisons for != in SPIR-V. 2022-02-25 22:22:43 +00:00
BlendColor.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColor.metal Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColorBurn.asm.frag Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColorBurn.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColorBurn.metal Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColorBurnStandaloneSettings.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColorDodge.asm.frag Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColorDodge.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColorDodge.metal Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColorDodgeStandaloneSettings.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendColorStandaloneSettings.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendDarken.asm.frag
BlendDarken.glsl
BlendDarken.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendDarkenStandaloneSettings.glsl
BlendDifference.asm.frag
BlendDifference.glsl
BlendDifference.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendDifferenceStandaloneSettings.glsl
BlendDst.asm.frag
BlendDst.glsl
BlendDst.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendDstAtop.asm.frag
BlendDstAtop.glsl
BlendDstAtop.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendDstAtopStandaloneSettings.glsl
BlendDstIn.asm.frag
BlendDstIn.glsl
BlendDstIn.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendDstInStandaloneSettings.glsl
BlendDstOut.asm.frag
BlendDstOut.glsl
BlendDstOut.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendDstOutStandaloneSettings.glsl
BlendDstOver.asm.frag
BlendDstOver.glsl
BlendDstOver.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendDstOverStandaloneSettings.glsl
BlendDstStandaloneSettings.glsl
BlendExclusion.asm.frag
BlendExclusion.glsl
BlendExclusion.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendExclusionStandaloneSettings.glsl
BlendHardLight.asm.frag Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendHardLight.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendHardLight.metal Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendHardLightStandaloneSettings.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendHue.asm.frag Use unordered comparisons for != in SPIR-V. 2022-02-25 22:22:43 +00:00
BlendHue.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendHue.metal Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendHueStandaloneSettings.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendLighten.asm.frag
BlendLighten.glsl
BlendLighten.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendLightenStandaloneSettings.glsl
BlendLuminosity.asm.frag Use unordered comparisons for != in SPIR-V. 2022-02-25 22:22:43 +00:00
BlendLuminosity.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendLuminosity.metal Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendLuminosityStandaloneSettings.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendModulate.asm.frag
BlendModulate.glsl
BlendModulate.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendModulateStandaloneSettings.glsl
BlendMultiply.asm.frag
BlendMultiply.glsl
BlendMultiply.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendMultiplyStandaloneSettings.glsl
BlendOverlay.asm.frag Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendOverlay.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendOverlay.metal Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendOverlayStandaloneSettings.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendPlus.asm.frag Revert "Vectorize scalars in SPIR-V using ConstructorSplat." 2021-05-14 14:29:33 +00:00
BlendPlus.glsl
BlendPlus.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendPlusStandaloneSettings.glsl
BlendSaturation.asm.frag Use unordered comparisons for != in SPIR-V. 2022-02-25 22:22:43 +00:00
BlendSaturation.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendSaturation.metal Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendSaturationStandaloneSettings.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendScreen.asm.frag
BlendScreen.glsl
BlendScreen.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendScreenStandaloneSettings.glsl
BlendSoftLight.asm.frag [sksl] Special-case unary negation on matrix types in MSL/SPIR-V 2022-03-01 20:14:46 +00:00
BlendSoftLight.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendSoftLight.metal Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendSoftLightStandaloneSettings.glsl Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
BlendSrc.asm.frag
BlendSrc.glsl
BlendSrc.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendSrcAtop.asm.frag
BlendSrcAtop.glsl
BlendSrcAtop.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendSrcAtopStandaloneSettings.glsl
BlendSrcIn.asm.frag
BlendSrcIn.glsl
BlendSrcIn.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendSrcInStandaloneSettings.glsl
BlendSrcOut.asm.frag
BlendSrcOut.glsl
BlendSrcOut.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendSrcOutStandaloneSettings.glsl
BlendSrcOver.asm.frag
BlendSrcOver.glsl
BlendSrcOver.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendSrcOverStandaloneSettings.glsl
BlendSrcStandaloneSettings.glsl
BlendXor.asm.frag
BlendXor.glsl
BlendXor.metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
BlendXorStandaloneSettings.glsl