skia2/tests/sksl/spirv
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
..
ConstantVectorFromVector.asm.frag Evaluate single-argument generic intrinsics at compile time. 2021-05-10 14:50:50 +00:00
InterfaceBlockPushConstant.asm.frag Roll SPIRV-Headers and SPIRV-Tools 2021-11-19 19:22:54 +00:00
LayoutMultipleOf4.asm.frag Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
LayoutOutOfOrder.asm.frag Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
OpaqueTypeInArray.asm.frag Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
Ossfuzz35916.asm.frag Improve SPIR-V handling of RTFlip when running the fuzzer. 2021-08-17 22:31:10 +00:00
Ossfuzz37627.asm.frag [sksl] Special-case unary negation on matrix types in MSL/SPIR-V 2022-03-01 20:14:46 +00:00
Ossfuzz44096.asm.frag Move backend-specific error tests out of errors/ test folder. 2022-02-08 14:18:46 +00:00
UnusedInterfaceBlock.asm.frag Move backend-specific error tests out of errors/ test folder. 2022-02-08 14:18:46 +00:00