Lines Matching refs:op
226 std::ostringstream& op = isVertexCase ? vtx : frag; in createGenericLoopCase() local
262 op << "uniform ${COUNTER_PRECISION} int " << getIntUniformName(numLoopIters) << ";\n"; in createGenericLoopCase()
267 … op << "uniform ${COUNTER_PRECISION} float " << getFloatFractionUniformName(numLoopIters) << ";\n"; in createGenericLoopCase()
270 op << "uniform ${COUNTER_PRECISION} float uf_one;\n"; in createGenericLoopCase()
306 op << " ${PRECISION} vec4 res = coords;\n"; in createGenericLoopCase()
363 op << " for (" + loopCountDeclStr + "; " + loopCmpStr + "; " + incrementStr + ")\n"; in createGenericLoopCase()
364 op << " {\n"; in createGenericLoopCase()
365 op << loopBody; in createGenericLoopCase()
366 op << " }\n"; in createGenericLoopCase()
370 op << "\t" << loopCountDeclStr + ";\n"; in createGenericLoopCase()
371 op << " while (" + loopCmpStr + ")\n"; in createGenericLoopCase()
372 op << " {\n"; in createGenericLoopCase()
373 op << loopBody; in createGenericLoopCase()
374 op << "\t\t" + incrementStr + ";\n"; in createGenericLoopCase()
375 op << " }\n"; in createGenericLoopCase()
379 op << "\t" << loopCountDeclStr + ";\n"; in createGenericLoopCase()
380 op << " do\n"; in createGenericLoopCase()
381 op << " {\n"; in createGenericLoopCase()
382 op << loopBody; in createGenericLoopCase()
383 op << "\t\t" + incrementStr + ";\n"; in createGenericLoopCase()
384 op << " } while (" + loopCmpStr + ");\n"; in createGenericLoopCase()
430 std::ostringstream& op = isVertexCase ? vtx : frag; in createSpecialLoopCase() local
461 op << "uniform bool ub_true;\n"; in createSpecialLoopCase()
463 …op << "uniform ${COUNTER_PRECISION} int ui_zero, ui_one, ui_two, ui_three, ui_four, ui_five, ui_si… in createSpecialLoopCase()
465 op << "uniform ${COUNTER_PRECISION} int ui_oneHundredOne;\n"; in createSpecialLoopCase()
493 op << " ${PRECISION} vec4 res = coords;\n"; in createSpecialLoopCase()
508 op << " ${FOR_LOOP} {}\n"; in createSpecialLoopCase()
513 op << " for (;;) { break; res = res.yzwx; }\n"; in createSpecialLoopCase()
518 op << " for (;;) { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
523 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
524 op << " for (;;) { res = res.yzwx; if (i == ${ONE}) break; i++; }\n"; in createSpecialLoopCase()
528 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
534 op << " ${FOR_LOOP} { res = res.yzwx; res = res.yzwx; }\n"; in createSpecialLoopCase()
540 op << " ${FOR_LOOP} res = res.yzwx, res = res.yzwx;\n"; in createSpecialLoopCase()
546 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
552 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
556 op << " for (int i = 0; i < (ub_true ? ${ITER_COUNT} : 0); i++) res = res.yzwx;\n"; in createSpecialLoopCase()
561 op << " ${FOR_LOOP} { if (i == ${TWO}) continue; res = res.yzwx; }\n"; in createSpecialLoopCase()
565 op << " ${FOR_LOOP} { res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
570 op << " ${FOR_LOOP} { continue; }\n"; in createSpecialLoopCase()
575 op << " ${FOR_LOOP} { if (i == ${TWO}) continue; res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
580 op << " ${FOR_LOOP} { if (i == ${TWO}) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
585 op << " ${FOR_LOOP} { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
589 op << " for (int i = 0; i < ${ITER_COUNT}; ++i) { res = res.yzwx; }\n"; in createSpecialLoopCase()
593 op << " ${FOR_LOOP} { res = res.yzwx; }\n"; in createSpecialLoopCase()
599 op << " ${FOR_LOOP} { if (i == 0) continue; else if (i == 3) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
603 …op << " for (${COUNTER_PRECISION} ivec4 i = ivec4(0, 1, ${ITER_COUNT}, 0); i.x < i.z; i.x += i.y) … in createSpecialLoopCase()
609 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
615 op << " ${COUNTER_PRECISION} int i;\n"; in createSpecialLoopCase()
616 op << " for (i = 0; i < ${TWO}; i++) { res = res.yzwx; }\n"; in createSpecialLoopCase()
617 op << " for (; i < ${ITER_COUNT}; i++) { res = res.yzwx; }\n"; in createSpecialLoopCase()
622 op << " for (${COUNTER_PRECISION} int i = 0; i < ${TWO}; i++)\n"; in createSpecialLoopCase()
623 op << " {\n"; in createSpecialLoopCase()
624 op << " for (${COUNTER_PRECISION} int j = 0; j < ${ITER_COUNT}; j++)\n"; in createSpecialLoopCase()
625 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
626 op << " }\n"; in createSpecialLoopCase()
631 op << " for (${COUNTER_PRECISION} int i = 0; i < ${ITER_COUNT}; i++)\n"; in createSpecialLoopCase()
632 op << " {\n"; in createSpecialLoopCase()
633 op << " for (${COUNTER_PRECISION} int j = 0; j < ${TWO}; j++)\n"; in createSpecialLoopCase()
634 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
635 op << " for (${COUNTER_PRECISION} int j = 0; j < ${ONE}; j++)\n"; in createSpecialLoopCase()
636 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
637 op << " }\n"; in createSpecialLoopCase()
642 op << " ${FOR_LOOP}\n"; in createSpecialLoopCase()
643 op << " {\n"; in createSpecialLoopCase()
644 op << " res = coords; // ignore outer loop effect \n"; in createSpecialLoopCase()
645 op << " for (${COUNTER_PRECISION} int j = 0; j < ${TWO}; j++)\n"; in createSpecialLoopCase()
646 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
647 op << " }\n"; in createSpecialLoopCase()
652 op << " ${FOR_LOOP}\n"; in createSpecialLoopCase()
653 op << " {\n"; in createSpecialLoopCase()
654 op << " res = coords.wxyz;\n"; in createSpecialLoopCase()
655 op << " for (${COUNTER_PRECISION} int j = 0; j < ${TWO}; j++)\n"; in createSpecialLoopCase()
656 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
657 op << " coords = res;\n"; in createSpecialLoopCase()
658 op << " }\n"; in createSpecialLoopCase()
683 op << " ${WHILE_LOOP} {}\n"; in createSpecialLoopCase()
688 op << " while (true) { break; res = res.yzwx; }\n"; in createSpecialLoopCase()
693 op << " while (true) { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
698 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
699 op << " while (true) { res = res.yzwx; if (i == ${ONE}) break; i++; }\n"; in createSpecialLoopCase()
703 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
709 op << " ${WHILE_LOOP} { res = res.yzwx; res = res.yzwx; }\n"; in createSpecialLoopCase()
715 op << " ${WHILE_LOOP} res = res.yzwx, res = res.yzwx;\n"; in createSpecialLoopCase()
721 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
727 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
731 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
732 op << " while (i < (ub_true ? ${ITER_COUNT} : 0)) { res = res.yzwx; i++; }\n"; in createSpecialLoopCase()
737 op << " ${WHILE_LOOP} { if (i == ${TWO}) continue; res = res.yzwx; }\n"; in createSpecialLoopCase()
741 op << " ${WHILE_LOOP} { res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
746 op << " ${WHILE_LOOP} { continue; }\n"; in createSpecialLoopCase()
751 op << " ${WHILE_LOOP} { if (i == ${ONE}) continue; res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
756 op << " ${WHILE_LOOP} { if (i == ${THREE}) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
761 op << " ${WHILE_LOOP} { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
766 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
767 op << " while (++i < ${ITER_COUNT}) { res = res.yzwx; }\n"; in createSpecialLoopCase()
771 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
772 op << " while (i++ < ${ITER_COUNT}) { res = res.yzwx; }\n"; in createSpecialLoopCase()
778 op << " ${WHILE_LOOP} { if (i == 0) continue; else if (i == 3) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
782 op << " ${COUNTER_PRECISION} ivec4 i = ivec4(0, 1, ${ITER_COUNT}, 0);\n"; in createSpecialLoopCase()
783 op << " while (i.x < i.z) { res = res.yzwx; i.x += i.y; }\n"; in createSpecialLoopCase()
788 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
794 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
795 op << " while (i++ < ${TWO}) { res = res.yzwx; }\n"; in createSpecialLoopCase()
796 op << " while (i++ < ${ITER_COUNT}) { res = res.yzwx; }\n"; // \note skips one iteration in createSpecialLoopCase()
801 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
802 op << " while (i++ < ${TWO})\n"; in createSpecialLoopCase()
803 op << " {\n"; in createSpecialLoopCase()
804 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
805 op << " while (j++ < ${ITER_COUNT})\n"; in createSpecialLoopCase()
806 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
807 op << " }\n"; in createSpecialLoopCase()
812 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
813 op << " while (i++ < ${ITER_COUNT})\n"; in createSpecialLoopCase()
814 op << " {\n"; in createSpecialLoopCase()
815 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
816 op << " while (j++ < ${ONE})\n"; in createSpecialLoopCase()
817 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
818 op << " while (j++ < ${THREE})\n"; // \note skips one iteration in createSpecialLoopCase()
819 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
820 op << " }\n"; in createSpecialLoopCase()
825 op << " ${WHILE_LOOP}\n"; in createSpecialLoopCase()
826 op << " {\n"; in createSpecialLoopCase()
827 op << " res = coords; // ignore outer loop effect \n"; in createSpecialLoopCase()
828 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
829 op << " while (j++ < ${TWO})\n"; in createSpecialLoopCase()
830 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
831 op << " }\n"; in createSpecialLoopCase()
836 op << " ${WHILE_LOOP}\n"; in createSpecialLoopCase()
837 op << " {\n"; in createSpecialLoopCase()
838 op << " res = coords.wxyz;\n"; in createSpecialLoopCase()
839 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
840 op << " while (j++ < ${TWO})\n"; in createSpecialLoopCase()
841 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
842 op << " coords = res;\n"; in createSpecialLoopCase()
843 op << " }\n"; in createSpecialLoopCase()
870 op << " ${DO_WHILE_PRE} {} ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
875 op << " do { break; res = res.yzwx; } while (true);\n"; in createSpecialLoopCase()
880 op << " do { res = res.yzwx; break; } while (true);\n"; in createSpecialLoopCase()
885 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
886 op << " do { res = res.yzwx; if (i == ${ONE}) break; i++; } while (true);\n"; in createSpecialLoopCase()
890 op << " ${DO_WHILE_PRE} res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
896 op << " ${DO_WHILE_PRE} { res = res.yzwx; res = res.yzwx; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
902 op << " ${DO_WHILE_PRE} res = res.yzwx, res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
912 op << " ${DO_WHILE_PRE} res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
916 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
917 op << " do { res = res.yzwx; } while (++i < (ub_true ? ${ITER_COUNT} : 0));\n"; in createSpecialLoopCase()
922 op << " ${DO_WHILE_PRE} { if (i == ${TWO}) continue; res = res.yzwx; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
926 op << " ${DO_WHILE_PRE} { res = res.yzwx; continue; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
931 op << " ${DO_WHILE_PRE} { continue; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
936 …op << " ${DO_WHILE_PRE} { if (i == ${TWO}) continue; res = res.yzwx; continue; } ${DO_WHILE_POST}\… in createSpecialLoopCase()
941 op << " ${DO_WHILE_PRE} { res = res.yzwx; if (i == ${ONE}) break; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
946 op << " ${DO_WHILE_PRE} { res = res.yzwx; break; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
950 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
951 op << " do { res = res.yzwx; } while (++i < ${ITER_COUNT});\n"; in createSpecialLoopCase()
956 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
957 op << " do { res = res.yzwx; } while (i++ < ${ITER_COUNT});\n"; in createSpecialLoopCase()
963 op << " ${DO_WHILE_PRE} { if (i == 0) continue; else if (i == 3) break; res = res.yzwx; } " in createSpecialLoopCase()
968 op << " ${COUNTER_PRECISION} ivec4 i = ivec4(0, 1, ${ITER_COUNT}, 0);\n"; in createSpecialLoopCase()
969 op << " do { res = res.yzwx; } while ((i.x += i.y) < i.z);\n"; in createSpecialLoopCase()
974 op << " ${DO_WHILE_PRE} res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
980 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
981 op << " do { res = res.yzwx; } while (++i < ${TWO});\n"; in createSpecialLoopCase()
982 op << " do { res = res.yzwx; } while (++i < ${ITER_COUNT});\n"; in createSpecialLoopCase()
987 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
988 op << " do\n"; in createSpecialLoopCase()
989 op << " {\n"; in createSpecialLoopCase()
990 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
991 op << " do\n"; in createSpecialLoopCase()
992 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
993 op << " while (++j < ${ITER_COUNT});\n"; in createSpecialLoopCase()
994 op << " } while (++i < ${TWO});\n"; in createSpecialLoopCase()
999 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
1000 op << " do\n"; in createSpecialLoopCase()
1001 op << " {\n"; in createSpecialLoopCase()
1002 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1003 op << " do\n"; in createSpecialLoopCase()
1004 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1005 op << " while (++j < ${TWO});\n"; in createSpecialLoopCase()
1006 op << " do\n"; in createSpecialLoopCase()
1007 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1008 op << " while (++j < ${THREE});\n"; in createSpecialLoopCase()
1009 op << " } while (++i < ${ITER_COUNT});\n"; in createSpecialLoopCase()
1014 op << " ${DO_WHILE_PRE}\n"; in createSpecialLoopCase()
1015 op << " {\n"; in createSpecialLoopCase()
1016 op << " res = coords; // ignore outer loop effect \n"; in createSpecialLoopCase()
1017 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1018 op << " do\n"; in createSpecialLoopCase()
1019 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1020 op << " while (++j < ${TWO});\n"; in createSpecialLoopCase()
1021 op << " } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1026 op << " ${DO_WHILE_PRE}\n"; in createSpecialLoopCase()
1027 op << " {\n"; in createSpecialLoopCase()
1028 op << " res = coords.wxyz;\n"; in createSpecialLoopCase()
1029 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1030 op << " while (j++ < ${TWO})\n"; in createSpecialLoopCase()
1031 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1032 op << " coords = res;\n"; in createSpecialLoopCase()
1033 op << " } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()