skia2/resources/sksl/errors/MatrixToVectorCast3x3.sksl
John Stiles 6de2e1db03 Add support for matrix-to-vector conversions in SkSL.
GLSL supports casting vec4 into mat2 and vice versa, so SkSL should have
equivalent support. This CL allows the Compound constructor to take a
matrix as input, and fixes up backends to do the right thing when a
matrix shows up in the compound-constructor path.

Change-Id: I13289ad0a27ba59bddc3706093820594efebc693
Bug: skia:12067
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426003
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-07-09 17:55:22 +00:00

8 lines
270 B
Plaintext

// Expect 4 errors
const half3x3 testMatrix3x3 = half3x3(1, 2, 3, 4, 5, 6, 7, 8, 9);
half testScalar = half (testMatrix3x3);
half2 testVec2 = half2(testMatrix3x3);
half3 testVec3 = half3(testMatrix3x3);
half3 testVec4 = half4(testMatrix3x3);