a456175a07
This was (crudely) automated with shell scripts: http://go/paste/5484300603490304 Change-Id: Ic9e1c93112772d303d1158eb26d995f27b439eba Bug: skia:12665 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505637 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
// Expect 9 errors
|
|
|
|
// SkSL does not support shrinking a vector via casting.
|
|
// A vector-slice can be performed in SkSL (or GLSL) by using a swizzle instead.
|
|
|
|
const half4 h4 = half4(0);
|
|
const half3 h3 = half3(h4);
|
|
const half2 h2 = half2(h4);
|
|
const half h = half (h4);
|
|
|
|
const int4 i4 = int4(0);
|
|
const int3 i3 = int3(i4);
|
|
const int2 i2 = int2(i4);
|
|
const int i = int (i4);
|
|
|
|
const bool4 b4 = bool4(false);
|
|
const bool3 b3 = bool3(b4);
|
|
const bool2 b2 = bool2(b4);
|
|
const bool b = bool (b4);
|
|
|
|
/*%%*
|
|
'half4' is not a valid parameter to 'half3' constructor; use '.xyz' instead
|
|
'half4' is not a valid parameter to 'half2' constructor; use '.xy' instead
|
|
'half4' is not a valid parameter to 'half' constructor; use '.x' instead
|
|
'int4' is not a valid parameter to 'int3' constructor; use '.xyz' instead
|
|
'int4' is not a valid parameter to 'int2' constructor; use '.xy' instead
|
|
'int4' is not a valid parameter to 'int' constructor; use '.x' instead
|
|
'bool4' is not a valid parameter to 'bool3' constructor; use '.xyz' instead
|
|
'bool4' is not a valid parameter to 'bool2' constructor; use '.xy' instead
|
|
'bool4' is not a valid parameter to 'bool' constructor; use '.x' instead
|
|
*%%*/
|