Home | History | Annotate | Download | only in functional

Lines Matching defs:op

340 	std::ostringstream& op = isVertexCase ? vtx : frag;
361 op << "uniform mediump int ui_zero, ui_one, ui_two, ui_three;\n";
363 op << "uniform mediump int ui_four;\n";
365 op << "uniform ${PRECISION} ${VAR_TYPE} u_arr[${ARRAY_LEN}];\n";
377 op << " ${PRECISION} ${VAR_TYPE} res = ${VAR_TYPE}(0.0);\n";
380 op << " res += u_arr[0];\n";
381 op << " res += u_arr[1];\n";
382 op << " res += u_arr[2];\n";
383 op << " res += u_arr[3];\n";
387 op << " res += u_arr[ui_zero];\n";
388 op << " res += u_arr[ui_one];\n";
389 op << " res += u_arr[ui_two];\n";
390 op << " res += u_arr[ui_three];\n";
394 op << " for (int i = 0; i < 4; i++)\n";
395 op << " res += u_arr[i];\n";
400 op << " for (int i = 0; i < ui_four; i++)\n";
401 op << " res += u_arr[i];\n";
446 std::ostringstream& op = isVertexCase ? vtx : frag;
467 op << "uniform mediump int ui_zero, ui_one, ui_two, ui_three;\n";
470 op << "uniform mediump int ui_four;\n";
483 op << " ${PRECISION} ${VAR_TYPE} coords = ${VAR_TYPE}(a_coords);\n";
485 op << " ${PRECISION} ${VAR_TYPE} coords = ${VAR_TYPE}(v_coords);\n";
487 op << " ${PRECISION} ${VAR_TYPE} arr[${ARRAY_LEN}];\n";
490 op << " arr[0] = ${VAR_TYPE}(coords);\n";
491 op << " arr[1] = ${VAR_TYPE}(coords) * 0.5;\n";
492 op << " arr[2] = ${VAR_TYPE}(coords) * 0.25;\n";
493 op << " arr[3] = ${VAR_TYPE}(coords) * 0.125;\n";
497 op << " arr[ui_zero] = ${VAR_TYPE}(coords);\n";
498 op << " arr[ui_one] = ${VAR_TYPE}(coords) * 0.5;\n";
499 op << " arr[ui_two] = ${VAR_TYPE}(coords) * 0.25;\n";
500 op << " arr[ui_three] = ${VAR_TYPE}(coords) * 0.125;\n";
504 op << " for (int i = 0; i < 4; i++)\n";
505 op << " {\n";
506 op << " arr[i] = ${VAR_TYPE}(coords);\n";
507 op << " coords = coords * 0.5;\n";
508 op << " }\n";
513 op << " for (int i = 0; i < ui_four; i++)\n";
514 op << " {\n";
515 op << " arr[i] = ${VAR_TYPE}(coords);\n";
516 op << " coords = coords * 0.5;\n";
517 op << " }\n";
521 op << " ${PRECISION} ${VAR_TYPE} res = ${VAR_TYPE}(0.0);\n";
524 op << " res += arr[0];\n";
525 op
526 op << " res += arr[2];\n";
527 op << " res += arr[3];\n";
531 op << " res += arr[ui_zero];\n";
532 op << " res += arr[ui_one];\n";
533 op << " res += arr[ui_two];\n";
534 op << " res += arr[ui_three];\n";
538 op << " for (int i = 0; i < 4; i++)\n";
539 op << " res += arr[i];\n";
544 op << " for (int i = 0; i < ui_four; i++)\n";
545 op << " res += arr[i];\n";
606 std::ostringstream& op = isVertexCase ? vtx : frag;
631 op << "uniform mediump int ui_zero";
632 if (vecLen >= 2) op << ", ui_one";
633 if (vecLen >= 3) op << ", ui_two";
634 if (vecLen >= 4) op << ", ui_three";
635 op << ";\n";
639 op << "uniform mediump int " << vecLenName << ";\n";
652 op << " ${PRECISION} ${VAR_TYPE} coords = ${VAR_TYPE}(a_coords);\n";
654 op << " ${PRECISION} ${VAR_TYPE} coords = ${VAR_TYPE}(v_coords);\n";
656 op << " ${PRECISION} ${VAR_TYPE} tmp;\n";
658 op << " tmp = coords.${SWIZZLE} * vec4(1.0, 0.5, 0.25, 0.125).${SWIZZLE};\n";
661 op << " tmp.x = coords.x;\n";
662 if (vecLen >= 2) op << " tmp.y = coords.y * 0.5;\n";
663 if (vecLen >= 3) op << " tmp.z = coords.z * 0.25;\n";
664 if (vecLen >= 4) op << " tmp.w = coords.w * 0.125;\n";
668 op << " tmp[0] = coords.x;\n";
669 if (vecLen >= 2) op << " tmp[1] = coords.y * 0.5;\n";
670 if (vecLen >= 3) op << " tmp[2] = coords.z * 0.25;\n";
671 if (vecLen >= 4) op << " tmp[3] = coords.w * 0.125;\n";
675 op << " tmp[ui_zero] = coords.x;\n";
676 if (vecLen >= 2) op << " tmp[ui_one] = coords.y * 0.5;\n";
677 if (vecLen >= 3) op << " tmp[ui_two] = coords.z * 0.25;\n";
678 if (vecLen >= 4) op << " tmp[ui_three] = coords.w * 0.125;\n";
682 op << " for (int i = 0; i < " << vecLen << "; i++)\n";
683 op << " {\n";
684 op << " tmp[i] = coords.x;\n";
685 op << " coords = coords.${ROT_SWIZZLE} * 0.5;\n";
686 op << " }\n";
691 op << " for (int i = 0; i < " << vecLenName << "; i++)\n";
692 op << " {\n";
693 op << " tmp[i] = coords.x;\n";
694 op << " coords = coords.${ROT_SWIZZLE} * 0.5;\n";
695 op << " }\n";
699 op << " ${PRECISION} float res = 0.0;\n";
701 op << " res = dot(tmp, ${VAR_TYPE}(1.0));\n";
704 op << " res += tmp.x;\n";
705 if (vecLen >= 2) op << " res += tmp.y;\n";
706 if (vecLen >= 3) op << " res += tmp.z;\n";
707 if (vecLen >= 4) op << " res += tmp.w;\n";
711 op << " res += tmp[0];\n";
712 if (vecLen >= 2) op << " res += tmp[1];\n";
713 if (vecLen >= 3) op << " res += tmp[2];\n";
714 if (vecLen >= 4) op << " res += tmp[3];\n";
718 op << " res += tmp[ui_zero];\n";
719 if (vecLen >= 2) op << " res += tmp[ui_one];\n";
720 if (vecLen >= 3) op << " res += tmp[ui_two];\n";
721 if (vecLen >= 4) op << " res += tmp[ui_three];\n";
725 op << " for (int i = 0; i < " << vecLen << "; i++)\n";
726 op << " res += tmp[i];\n";
731 op << " for (int i = 0; i < " << vecLenName << "; i++)\n";
732 op << " res += tmp[i];\n";
806 std::ostringstream& op = isVertexCase ? vtx : frag;
833 op << "uniform mediump int ui_zero";
834 if (numCols >= 2) op << ", ui_one";
835 if (numCols >= 3) op << ", ui_two";
836 if (numCols >= 4) op << ", ui_three";
837 op << ";\n";
841 op << "uniform mediump int " << matSizeName << ";\n";
854 op << " ${PRECISION} vec4 coords = a_coords;\n";
856 op << " ${PRECISION} vec4 coords = v_coords;\n";
858 op << " ${PRECISION} ${MAT_TYPE} tmp;\n";
861 op << " tmp[0] = ${VEC_TYPE}(coords);\n";
862 if (numCols >= 2) op << " tmp[1] = ${VEC_TYPE}(coords.yzwx) * 0.5;\n";
863 if (numCols >= 3) op << " tmp[2] = ${VEC_TYPE}(coords.zwxy) * 0.25;\n";
864 if (numCols >= 4) op << " tmp[3] = ${VEC_TYPE}(coords.wxyz) * 0.125;\n";
868 op << " tmp[ui_zero] = ${VEC_TYPE}(coords);\n";
869 if (numCols >= 2) op << " tmp[ui_one] = ${VEC_TYPE}(coords.yzwx) * 0.5;\n";
870 if (numCols >= 3) op << " tmp[ui_two] = ${VEC_TYPE}(coords.zwxy) * 0.25;\n";
871 if (numCols >= 4) op << " tmp[ui_three] = ${VEC_TYPE}(coords.wxyz) * 0.125;\n";
875 op << " for (int i = 0; i < " << numCols << "; i++)\n";
876 op << " {\n";
877 op << " tmp[i] = ${VEC_TYPE}(coords);\n";
878 op << " coords = coords.yzwx * 0.5;\n";
879 op << " }\n";
884 op << " for (int i = 0; i < " << matSizeName << "; i++)\n";
885 op << " {\n";
886 op << " tmp[i] = ${VEC_TYPE}(coords);\n";
887 op << " coords = coords.yzwx * 0.5;\n";
888 op << " }\n";
892 op << " ${PRECISION} ${VEC_TYPE} res = ${VEC_TYPE}(0.0);\n";
895 op << " res += tmp[0];\n";
896 if (numCols >= 2) op << " res += tmp[1];\n";
897 if (numCols >= 3) op << " res += tmp[2];\n";
898 if (numCols >= 4) op << " res += tmp[3];\n";
902 op << " res += tmp[ui_zero];\n";
903 if (numCols >= 2) op << " res += tmp[ui_one];\n";
904 if (numCols >= 3) op << " res += tmp[ui_two];\n";
905 if (numCols >= 4) op << " res += tmp[ui_three];\n";
909 op << " for (int i = 0; i < " << numCols << "; i++)\n";
910 op << " res += tmp[i];\n";
915 op << " for (int i = 0; i < " << matSizeName << "; i++)\n";
916 op << " res += tmp[i];\n";