Lines Matching refs:write

45 void GLSLCodeGenerator::write(skstd::string_view s) {
54 fOut->write(s.data(), s.length());
59 this->write(s);
72 fExtensions.write(name.data(), name.length());
146 this->write("struct ");
147 this->write(type.name());
155 this->write(" ");
156 this->write(f.fName);
158 this->write("[" + to_string(f.fType->columns()) + "]");
167 this->write(this->getTypeName(type));
244 this->write("((" + tmpVar1 + " = ");
246 this->write(") < (" + tmpVar2 + " = ");
248 this->write(") ? " + tmpVar1 + " : " + tmpVar2 + ")");
252 this->write("(1.0 / sqrt(");
254 this->write("))");
318 this->write(name + "(");
320 this->write(")");
406 this->write(name + "(");
408 this->write(")");
434 this->write(name + "(");
436 this->write(")");
455 this->write(name);
473 this->write("atan(");
475 this->write(", -1.0 * ");
477 this->write(")");
488 this->write("ldexp(");
490 this->write(", ");
492 this->write(" * -1)");
500 this->write("(" SKSL_RTFLIP_NAME ".y * dFdy");
521 this->write("((");
523 this->write(") * (");
525 this->write(") + (");
527 this->write("))");
534 this->write("(0.5 - sign(");
536 this->write(") * (0.5 - fract(abs(");
538 this->write("))))");
580 this->write("exp2(");
582 this->write(" * log2(");
584 this->write("))");
588 this->write("clamp(");
590 this->write(", 0.0, 1.0)");
651 this->write(fTextureFunctionOverride.c_str());
653 this->write("texture");
655 this->write(dim);
658 this->write("Proj");
676 this->write(function.mangledName());
678 this->write("(");
681 this->write(separator);
686 this->write(", -0.5");
688 this->write(closingParen);
699 this->write("(");
701 this->write("(1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) * ");
703 this->write(")");
729 this->write("(");
732 this->write(separator);
736 this->write(")");
753 this->write("sk_FragCoord_Resolved");
766 this->write("sk_FragCoord");
773 this->write("sk_FragColor");
775 this->write("gl_FragColor");
779 this->write("gl_SecondaryFragColorEXT");
793 this->write("sk_Clockwise");
796 this->write("gl_VertexID");
799 this->write("gl_InstanceID");
803 this->write(this->caps().fbFetchColorName());
810 this->write(ref.variable()->name());
817 this->write("[");
819 this->write("]");
829 this->write(".");
834 this->write("gl_Position");
836 this->write("gl_PointSize");
838 this->write(baseType.fields()[f.fieldIndex()].fName);
844 this->write(".");
847 this->write(&("x\0y\0z\0w\0"[c * 2]));
867 this->write("((" + tempMatrix1 + " = ");
869 this->write("), (" + tempMatrix2 + " = ");
871 this->write("), (" + tempMatrix1 + " ");
872 this->write(op.operatorName());
873 this->write(" " + tempMatrix2 + "))");
896 this->write("(");
905 this->write("sk_FragCoord_Workaround = (");
908 this->write(" ");
909 this->write(op.operatorName());
910 this->write(" ");
913 this->write(")");
916 this->write(")");
923 this->write("(");
930 this->write(" ? ");
937 this->write(" : ");
945 this->write(")");
952 this->write("(");
955 this->write(" ? ");
957 this->write(" : ");
960 this->write(")");
967 this->write("(");
969 this->write(p.getOperator().operatorName());
972 this->write(")");
979 this->write("(");
982 this->write(p.getOperator().operatorName());
984 this->write(")");
991 this->write(to_string(l.floatValue()));
996 this->write(to_string(l.intValue() & 0xffffffff) + "u");
998 this->write(to_string(l.intValue() & 0xffff) + "u");
1000 this->write(to_string(l.intValue()));
1005 this->write(l.boolValue() ? "true" : "false");
1015 this->write(" " + f.mangledName() + "(");
1024 this->write(separator);
1035 this->write(" " + param->name());
1037 this->write("[" + to_string(s) + "]");
1040 this->write(")");
1066 this->write(fFunctionHeader);
1067 this->write(buffer.str());
1079 this->write(layout + " ");
1084 this->write("flat ");
1087 this->write("noperspective ");
1091 this->write("const ");
1094 this->write("uniform ");
1098 this->write("inout ");
1102 this->write(fProgram.fConfig->fKind == ProgramKind::kVertex ? "attribute "
1105 this->write("in ");
1110 this->write("varying ");
1112 this->write("out ");
1136 this->write("}");
1138 this->write(" ");
1139 this->write(intf.instanceName());
1141 this->write("[");
1142 this->write(to_string(intf.arraySize()));
1143 this->write("]");
1184 this->write(this->getTypePrecision(type));
1191 this->write(" ");
1192 this->write(var.var().name());
1194 this->write("[");
1195 this->write(to_string(var.arraySize()));
1196 this->write("]");
1199 this->write(" = ");
1214 this->write(";");
1224 this->write(";");
1245 this->write("break;");
1248 this->write("continue;");
1251 this->write("discard;");
1255 this->write(";");
1279 this->write("}");
1284 this->write("if (");
1286 this->write(") ");
1289 this->write(" else ");
1297 this->write("while (");
1299 this->write(") ");
1304 this->write("for (");
1308 this->write("; ");
1321 this->write("; ");
1325 this->write(") ");
1331 this->write("do ");
1333 this->write(" while (");
1335 this->write(");");
1356 this->write("bool ");
1357 this->write(tmpVar);
1361 this->write("if (");
1362 this->write(tmpVar);
1365 this->write("if (!");
1374 this->write(tmpVar);
1379 this->write("}");
1387 this->write("int ");
1388 this->write(valueVar);
1389 this->write(" = ");
1391 this->write(", ");
1392 this->write(fallthroughVar);
1394 this->write("for (int ");
1395 this->write(loopVar);
1396 this->write(" = 0; ");
1397 this->write(loopVar);
1398 this->write(" < 1; ");
1399 this->write(loopVar);
1407 this->write("if ((");
1411 this->write(fallthroughVar);
1412 this->write(" > 0) || (");
1414 this->write(valueVar);
1415 this->write(" == ");
1420 // We write the entire case-block statement here, and then set `switchFallthrough`
1428 this->write(fallthroughVar);
1429 this->write(" = 1;");
1446 this->write("switch (");
1459 this->write("case ");
1474 this->write("}");
1478 this->write("return");
1480 this->write(" ");
1483 this->write(";");
1488 this->write(this->caps().versionDeclString());
1509 this->write("inout ");
1511 this->write("out ");
1514 this->write("mediump ");
1565 // Why don't we write things in their original order? Because the Inliner likes to move function
1586 this->write("highp ");
1588 this->write("vec4 sk_FragCoord_Workaround;\n");
1595 this->write("highp ");
1597 this->write("vec4 sk_FragCoord_Workaround;\n");
1608 this->write(String::printf("precision %s float;\n", precision));
1609 this->write(String::printf("precision %s sampler2D;\n", precision));
1611 this->write(String::printf("precision %s samplerExternalOES;\n", precision));
1614 this->write(String::printf("precision %s sampler2DRect;\n", precision));