Lines Matching refs:op
248 std::ostringstream& op = isVertexCase ? vtx : frag; in createGenericLoopCase() local
284 op << "uniform ${COUNTER_PRECISION} int " << getIntUniformName(numLoopIters) << ";\n"; in createGenericLoopCase()
289 … op << "uniform ${COUNTER_PRECISION} float " << getFloatFractionUniformName(numLoopIters) << ";\n"; in createGenericLoopCase()
292 op << "uniform ${COUNTER_PRECISION} float uf_one;\n"; in createGenericLoopCase()
328 op << " ${PRECISION} vec4 res = coords;\n"; in createGenericLoopCase()
382 op << " for (" + loopCountDeclStr + "; " + loopCmpStr + "; " + incrementStr + ")\n"; in createGenericLoopCase()
383 op << " {\n"; in createGenericLoopCase()
384 op << loopBody; in createGenericLoopCase()
385 op << " }\n"; in createGenericLoopCase()
389 op << "\t" << loopCountDeclStr + ";\n"; in createGenericLoopCase()
390 op << " while (" + loopCmpStr + ")\n"; in createGenericLoopCase()
391 op << " {\n"; in createGenericLoopCase()
392 op << loopBody; in createGenericLoopCase()
393 op << "\t\t" + incrementStr + ";\n"; in createGenericLoopCase()
394 op << " }\n"; in createGenericLoopCase()
398 op << "\t" << loopCountDeclStr + ";\n"; in createGenericLoopCase()
399 op << " do\n"; in createGenericLoopCase()
400 op << " {\n"; in createGenericLoopCase()
401 op << loopBody; in createGenericLoopCase()
402 op << "\t\t" + incrementStr + ";\n"; in createGenericLoopCase()
403 op << " } while (" + loopCmpStr + ");\n"; in createGenericLoopCase()
446 std::ostringstream& op = isVertexCase ? vtx : frag; in createSpecialLoopCase() local
477 op << "uniform bool ub_true;\n"; in createSpecialLoopCase()
479 …op << "uniform ${COUNTER_PRECISION} int ui_zero, ui_one, ui_two, ui_three, ui_four, ui_five, ui_si… in createSpecialLoopCase()
481 op << "uniform ${COUNTER_PRECISION} int ui_oneHundredOne;\n"; in createSpecialLoopCase()
509 op << " ${PRECISION} vec4 res = coords;\n"; in createSpecialLoopCase()
524 op << " ${FOR_LOOP} {}\n"; in createSpecialLoopCase()
529 op << " for (;;) { break; res = res.yzwx; }\n"; in createSpecialLoopCase()
534 op << " for (;;) { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
539 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
540 op << " for (;;) { res = res.yzwx; if (i == ${ONE}) break; i++; }\n"; in createSpecialLoopCase()
544 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
550 op << " ${FOR_LOOP} { res = res.yzwx; res = res.yzwx; }\n"; in createSpecialLoopCase()
556 op << " ${FOR_LOOP} res = res.yzwx, res = res.yzwx;\n"; in createSpecialLoopCase()
562 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
568 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
572 op << " for (int i = 0; i < (ub_true ? ${ITER_COUNT} : 0); i++) res = res.yzwx;\n"; in createSpecialLoopCase()
577 op << " ${FOR_LOOP} { if (i == ${TWO}) continue; res = res.yzwx; }\n"; in createSpecialLoopCase()
581 op << " ${FOR_LOOP} { res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
586 op << " ${FOR_LOOP} { continue; }\n"; in createSpecialLoopCase()
591 op << " ${FOR_LOOP} { if (i == ${TWO}) continue; res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
596 op << " ${FOR_LOOP} { if (i == ${TWO}) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
601 op << " ${FOR_LOOP} { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
605 op << " for (int i = 0; i < ${ITER_COUNT}; ++i) { res = res.yzwx; }\n"; in createSpecialLoopCase()
609 op << " ${FOR_LOOP} { res = res.yzwx; }\n"; in createSpecialLoopCase()
615 op << " ${FOR_LOOP} { if (i == 0) continue; else if (i == 3) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
619 …op << " for (${COUNTER_PRECISION} ivec4 i = ivec4(0, 1, ${ITER_COUNT}, 0); i.x < i.z; i.x += i.y) … in createSpecialLoopCase()
624 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
630 op << " ${COUNTER_PRECISION} int i;\n"; in createSpecialLoopCase()
631 op << " for (i = 0; i < ${TWO}; i++) { res = res.yzwx; }\n"; in createSpecialLoopCase()
632 op << " for (; i < ${ITER_COUNT}; i++) { res = res.yzwx; }\n"; in createSpecialLoopCase()
637 op << " for (${COUNTER_PRECISION} int i = 0; i < ${TWO}; i++)\n"; in createSpecialLoopCase()
638 op << " {\n"; in createSpecialLoopCase()
639 op << " for (${COUNTER_PRECISION} int j = 0; j < ${ITER_COUNT}; j++)\n"; in createSpecialLoopCase()
640 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
641 op << " }\n"; in createSpecialLoopCase()
646 op << " for (${COUNTER_PRECISION} int i = 0; i < ${ITER_COUNT}; i++)\n"; in createSpecialLoopCase()
647 op << " {\n"; in createSpecialLoopCase()
648 op << " for (${COUNTER_PRECISION} int j = 0; j < ${TWO}; j++)\n"; in createSpecialLoopCase()
649 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
650 op << " for (${COUNTER_PRECISION} int j = 0; j < ${ONE}; j++)\n"; in createSpecialLoopCase()
651 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
652 op << " }\n"; in createSpecialLoopCase()
657 op << " ${FOR_LOOP}\n"; in createSpecialLoopCase()
658 op << " {\n"; in createSpecialLoopCase()
659 op << " res = coords; // ignore outer loop effect \n"; in createSpecialLoopCase()
660 op << " for (${COUNTER_PRECISION} int j = 0; j < ${TWO}; j++)\n"; in createSpecialLoopCase()
661 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
662 op << " }\n"; in createSpecialLoopCase()
667 op << " ${FOR_LOOP}\n"; in createSpecialLoopCase()
668 op << " {\n"; in createSpecialLoopCase()
669 op << " res = coords.wxyz;\n"; in createSpecialLoopCase()
670 op << " for (${COUNTER_PRECISION} int j = 0; j < ${TWO}; j++)\n"; in createSpecialLoopCase()
671 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
672 op << " coords = res;\n"; in createSpecialLoopCase()
673 op << " }\n"; in createSpecialLoopCase()
695 op << " ${WHILE_LOOP} {}\n"; in createSpecialLoopCase()
700 op << " while (true) { break; res = res.yzwx; }\n"; in createSpecialLoopCase()
705 op << " while (true) { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
710 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
711 op << " while (true) { res = res.yzwx; if (i == ${ONE}) break; i++; }\n"; in createSpecialLoopCase()
715 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
721 op << " ${WHILE_LOOP} { res = res.yzwx; res = res.yzwx; }\n"; in createSpecialLoopCase()
727 op << " ${WHILE_LOOP} res = res.yzwx, res = res.yzwx;\n"; in createSpecialLoopCase()
733 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
739 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
743 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
744 op << " while (i < (ub_true ? ${ITER_COUNT} : 0)) { res = res.yzwx; i++; }\n"; in createSpecialLoopCase()
749 op << " ${WHILE_LOOP} { if (i == ${TWO}) continue; res = res.yzwx; }\n"; in createSpecialLoopCase()
753 op << " ${WHILE_LOOP} { res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
758 op << " ${WHILE_LOOP} { continue; }\n"; in createSpecialLoopCase()
763 op << " ${WHILE_LOOP} { if (i == ${ONE}) continue; res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
768 op << " ${WHILE_LOOP} { if (i == ${THREE}) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
773 op << " ${WHILE_LOOP} { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
778 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
779 op << " while (++i < ${ITER_COUNT}) { res = res.yzwx; }\n"; in createSpecialLoopCase()
783 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
784 op << " while (i++ < ${ITER_COUNT}) { res = res.yzwx; }\n"; in createSpecialLoopCase()
790 op << " ${WHILE_LOOP} { if (i == 0) continue; else if (i == 3) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
794 op << " ${COUNTER_PRECISION} ivec4 i = ivec4(0, 1, ${ITER_COUNT}, 0);\n"; in createSpecialLoopCase()
795 op << " while (i.x < i.z) { res = res.yzwx; i.x += i.y; }\n"; in createSpecialLoopCase()
800 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
806 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
807 op << " while (i++ < ${TWO}) { res = res.yzwx; }\n"; in createSpecialLoopCase()
808 op << " while (i++ < ${ITER_COUNT}) { res = res.yzwx; }\n"; // \note skips one iteration in createSpecialLoopCase()
813 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
814 op << " while (i++ < ${TWO})\n"; in createSpecialLoopCase()
815 op << " {\n"; in createSpecialLoopCase()
816 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
817 op << " while (j++ < ${ITER_COUNT})\n"; in createSpecialLoopCase()
818 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
819 op << " }\n"; in createSpecialLoopCase()
824 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
825 op << " while (i++ < ${ITER_COUNT})\n"; in createSpecialLoopCase()
826 op << " {\n"; in createSpecialLoopCase()
827 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
828 op << " while (j++ < ${ONE})\n"; in createSpecialLoopCase()
829 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
830 op << " while (j++ < ${THREE})\n"; // \note skips one iteration in createSpecialLoopCase()
831 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
832 op << " }\n"; in createSpecialLoopCase()
837 op << " ${WHILE_LOOP}\n"; in createSpecialLoopCase()
838 op << " {\n"; in createSpecialLoopCase()
839 op << " res = coords; // ignore outer loop effect \n"; in createSpecialLoopCase()
840 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
841 op << " while (j++ < ${TWO})\n"; in createSpecialLoopCase()
842 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
843 op << " }\n"; in createSpecialLoopCase()
848 op << " ${WHILE_LOOP}\n"; in createSpecialLoopCase()
849 op << " {\n"; in createSpecialLoopCase()
850 op << " res = coords.wxyz;\n"; in createSpecialLoopCase()
851 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
852 op << " while (j++ < ${TWO})\n"; in createSpecialLoopCase()
853 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
854 op << " coords = res;\n"; in createSpecialLoopCase()
855 op << " }\n"; in createSpecialLoopCase()
879 op << " ${DO_WHILE_PRE} {} ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
884 op << " do { break; res = res.yzwx; } while (true);\n"; in createSpecialLoopCase()
889 op << " do { res = res.yzwx; break; } while (true);\n"; in createSpecialLoopCase()
894 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
895 op << " do { res = res.yzwx; if (i == ${ONE}) break; i++; } while (true);\n"; in createSpecialLoopCase()
899 op << " ${DO_WHILE_PRE} res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
905 op << " ${DO_WHILE_PRE} { res = res.yzwx; res = res.yzwx; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
911 op << " ${DO_WHILE_PRE} res = res.yzwx, res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
921 op << " ${DO_WHILE_PRE} res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
925 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
926 op << " do { res = res.yzwx; } while (++i < (ub_true ? ${ITER_COUNT} : 0));\n"; in createSpecialLoopCase()
931 op << " ${DO_WHILE_PRE} { if (i == ${TWO}) continue; res = res.yzwx; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
935 op << " ${DO_WHILE_PRE} { res = res.yzwx; continue; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
940 op << " ${DO_WHILE_PRE} { continue; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
945 …op << " ${DO_WHILE_PRE} { if (i == ${TWO}) continue; res = res.yzwx; continue; } ${DO_WHILE_POST}\… in createSpecialLoopCase()
950 op << " ${DO_WHILE_PRE} { res = res.yzwx; if (i == ${ONE}) break; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
955 op << " ${DO_WHILE_PRE} { res = res.yzwx; break; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
959 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
960 op << " do { res = res.yzwx; } while (++i < ${ITER_COUNT});\n"; in createSpecialLoopCase()
965 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
966 op << " do { res = res.yzwx; } while (i++ < ${ITER_COUNT});\n"; in createSpecialLoopCase()
972 …op << " ${DO_WHILE_PRE} { if (i == 0) continue; else if (i == 3) break; res = res.yzwx; } ${DO_WHI… in createSpecialLoopCase()
976 op << " ${COUNTER_PRECISION} ivec4 i = ivec4(0, 1, ${ITER_COUNT}, 0);\n"; in createSpecialLoopCase()
977 op << " do { res = res.yzwx; } while ((i.x += i.y) < i.z);\n"; in createSpecialLoopCase()
982 op << " ${DO_WHILE_PRE} res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
988 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
989 op << " do { res = res.yzwx; } while (++i < ${TWO});\n"; in createSpecialLoopCase()
990 op << " do { res = res.yzwx; } while (++i < ${ITER_COUNT});\n"; in createSpecialLoopCase()
995 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
996 op << " do\n"; in createSpecialLoopCase()
997 op << " {\n"; in createSpecialLoopCase()
998 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
999 op << " do\n"; in createSpecialLoopCase()
1000 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1001 op << " while (++j < ${ITER_COUNT});\n"; in createSpecialLoopCase()
1002 op << " } while (++i < ${TWO});\n"; in createSpecialLoopCase()
1007 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
1008 op << " do\n"; in createSpecialLoopCase()
1009 op << " {\n"; in createSpecialLoopCase()
1010 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1011 op << " do\n"; in createSpecialLoopCase()
1012 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1013 op << " while (++j < ${TWO});\n"; in createSpecialLoopCase()
1014 op << " do\n"; in createSpecialLoopCase()
1015 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1016 op << " while (++j < ${THREE});\n"; in createSpecialLoopCase()
1017 op << " } while (++i < ${ITER_COUNT});\n"; in createSpecialLoopCase()
1022 op << " ${DO_WHILE_PRE}\n"; in createSpecialLoopCase()
1023 op << " {\n"; in createSpecialLoopCase()
1024 op << " res = coords; // ignore outer loop effect \n"; in createSpecialLoopCase()
1025 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1026 op << " do\n"; in createSpecialLoopCase()
1027 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1028 op << " while (++j < ${TWO});\n"; in createSpecialLoopCase()
1029 op << " } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1034 op << " ${DO_WHILE_PRE}\n"; in createSpecialLoopCase()
1035 op << " {\n"; in createSpecialLoopCase()
1036 op << " res = coords.wxyz;\n"; in createSpecialLoopCase()
1037 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1038 op << " while (j++ < ${TWO})\n"; in createSpecialLoopCase()
1039 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1040 op << " coords = res;\n"; in createSpecialLoopCase()
1041 op << " } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()