Lines Matching refs:argument
31 // The meaning of a compound constructor containing a single argument varies significantly in
32 // GLSL/SkSL, depending on the argument type.
34 std::unique_ptr<Expression>& argument = args.front();
35 if (type.isVector() && argument->type().isVector() &&
36 argument->type().componentType() == type.componentType() &&
37 argument->type().slotCount() > type.slotCount()) {
49 context.fErrors->error(line, "'" + argument->type().displayName() +
55 if (argument->type().isScalar()) {
70 } else if (argument->type().isVector()) {
73 if (type.isVector() && argument->type().columns() == type.columns()) {
74 return ConstructorCompoundCast::Make(context, line, type, std::move(argument));
76 } else if (argument->type().isMatrix()) {
81 // destination type with the argument's rows/columns. (This will be a no-op if it's
85 argument->type().columns(),
86 argument->type().rows());
87 argument = ConstructorCompoundCast::Make(context, line, typecastType,
88 std::move(argument));
92 std::move(argument));
97 if (type.isVector() && type.columns() == 4 && argument->type().slotCount() == 4) {
100 const Type& vectorType = argument->type().componentType().toCompound(context,
113 // For more complex cases, we walk the argument list and fix up the arguments as needed.
186 SkDEBUGFAIL("argument-list slot count doesn't match constructor-type slot count");