skia2/resources/sksl/errors/VectorSlice.sksl

32 lines
1.1 KiB
Plaintext
Raw Normal View History

// 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
*%%*/