f9ad6ec852
The fuzzer quickly discovered that the newly introduced mat2-to-vec4 conversion code did not account for integer vectors. We now handle `ivec4(mat2)` casts properly. This required some non-trivial restructuring of the logic, but in the vast majority of cases, the types will match and the end result will be identical. Change-Id: If07c2fe4b4345bd767384b1802374910f65cd3f0 Bug: oss-fuzz:35998 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426756 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
8 lines
264 B
Plaintext
8 lines
264 B
Plaintext
// Expect 3 errors
|
|
|
|
const half2x2 testMatrix2x2 = half2x2(1, 2, 3, 4);
|
|
int testScalar = int (testMatrix2x2);
|
|
int2 testVec2 = int2(testMatrix2x2);
|
|
int3 testVec3 = int3(testMatrix2x2);
|
|
int4 testVec4 = int4(testMatrix2x2); // not an error
|