6de2e1db03
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>
8 lines
272 B
Plaintext
8 lines
272 B
Plaintext
// Expect 3 errors
|
|
|
|
const half2x2 testMatrix2x2 = half2x2(1, 2, 3, 4);
|
|
half testScalar = half (testMatrix2x2);
|
|
half2 testVec2 = half2(testMatrix2x2);
|
|
half3 testVec3 = half3(testMatrix2x2);
|
|
half4 testVec4 = half4(testMatrix2x2); // not an error
|