Lines Matching refs:op
279 std::ostringstream& op = isVertexCase ? vtx : frag; in createGenericLoopCase() local
311 op << "uniform ${COUNTER_PRECISION} int " << getIntUniformName(numLoopIters) << ";\n"; in createGenericLoopCase()
316 … op << "uniform ${COUNTER_PRECISION} float " << getFloatFractionUniformName(numLoopIters) << ";\n"; in createGenericLoopCase()
319 op << "uniform ${COUNTER_PRECISION} float uf_one;\n"; in createGenericLoopCase()
355 op << " ${PRECISION} vec4 res = coords;\n"; in createGenericLoopCase()
409 op << " for (" + loopCountDeclStr + "; " + loopCmpStr + "; " + incrementStr + ")\n"; in createGenericLoopCase()
410 op << " {\n"; in createGenericLoopCase()
411 op << loopBody; in createGenericLoopCase()
412 op << " }\n"; in createGenericLoopCase()
416 op << "\t" << loopCountDeclStr + ";\n"; in createGenericLoopCase()
417 op << " while (" + loopCmpStr + ")\n"; in createGenericLoopCase()
418 op << " {\n"; in createGenericLoopCase()
419 op << loopBody; in createGenericLoopCase()
420 op << "\t\t" + incrementStr + ";\n"; in createGenericLoopCase()
421 op << " }\n"; in createGenericLoopCase()
425 op << "\t" << loopCountDeclStr + ";\n"; in createGenericLoopCase()
426 op << " do\n"; in createGenericLoopCase()
427 op << " {\n"; in createGenericLoopCase()
428 op << loopBody; in createGenericLoopCase()
429 op << "\t\t" + incrementStr + ";\n"; in createGenericLoopCase()
430 op << " } while (" + loopCmpStr + ");\n"; in createGenericLoopCase()
487 std::ostringstream& op = isVertexCase ? vtx : frag; in createSpecialLoopCase() local
514 op << "uniform bool ub_true;\n"; in createSpecialLoopCase()
516 …op << "uniform ${COUNTER_PRECISION} int ui_zero, ui_one, ui_two, ui_three, ui_four, ui_five, ui_si… in createSpecialLoopCase()
518 op << "uniform ${COUNTER_PRECISION} int ui_oneHundredOne;\n"; in createSpecialLoopCase()
525 op << "\n${PRECISION} vec4 func (in ${PRECISION} vec4 coords) { return coords.yzwx; }\n"; in createSpecialLoopCase()
527 op << "\nvoid func (inout ${PRECISION} vec4 coords) { coords = coords.yzwx; }\n"; in createSpecialLoopCase()
552 op << " ${PRECISION} vec4 res = coords;\n"; in createSpecialLoopCase()
567 op << " ${FOR_LOOP} {}\n"; in createSpecialLoopCase()
572 op << " for (;;) { break; res = res.yzwx; }\n"; in createSpecialLoopCase()
577 op << " for (;;) { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
582 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
583 op << " for (;;) { res = res.yzwx; if (i == ${ONE}) break; i++; }\n"; in createSpecialLoopCase()
587 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
593 op << " ${FOR_LOOP} { res = res.yzwx; res = res.yzwx; }\n"; in createSpecialLoopCase()
599 op << " ${FOR_LOOP} res = res.yzwx, res = res.yzwx;\n"; in createSpecialLoopCase()
605 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
611 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
615 op << " for (int i = 0; i < (ub_true ? ${ITER_COUNT} : 0); i++) res = res.yzwx;\n"; in createSpecialLoopCase()
620 op << " ${FOR_LOOP} { if (i == ${TWO}) continue; res = res.yzwx; }\n"; in createSpecialLoopCase()
624 op << " ${FOR_LOOP} { res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
629 op << " ${FOR_LOOP} { continue; }\n"; in createSpecialLoopCase()
634 op << " ${FOR_LOOP} { if (i == ${TWO}) continue; res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
639 op << " ${FOR_LOOP} { if (i == ${TWO}) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
644 op << " ${FOR_LOOP} { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
648 op << " for (int i = 0; i < ${ITER_COUNT}; ++i) { res = res.yzwx; }\n"; in createSpecialLoopCase()
652 op << " ${FOR_LOOP} { res = res.yzwx; }\n"; in createSpecialLoopCase()
658 op << " ${FOR_LOOP} { if (i == 0) continue; else if (i == 3) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
662 …op << " for (${COUNTER_PRECISION} ivec4 i = ivec4(0, 1, ${ITER_COUNT}, 0); i.x < i.z; i.x += i.y) … in createSpecialLoopCase()
667 op << " ${FOR_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
673 op << " ${COUNTER_PRECISION} int i;\n"; in createSpecialLoopCase()
674 op << " for (i = 0; i < ${TWO}; i++) { res = res.yzwx; }\n"; in createSpecialLoopCase()
675 op << " for (; i < ${ITER_COUNT}; i++) { res = res.yzwx; }\n"; in createSpecialLoopCase()
680 op << " for (${COUNTER_PRECISION} int i = 0; i < ${TWO}; i++)\n"; in createSpecialLoopCase()
681 op << " {\n"; in createSpecialLoopCase()
682 op << " for (${COUNTER_PRECISION} int j = 0; j < ${ITER_COUNT}; j++)\n"; in createSpecialLoopCase()
683 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
684 op << " }\n"; in createSpecialLoopCase()
689 op << " for (${COUNTER_PRECISION} int i = 0; i < ${ITER_COUNT}; i++)\n"; in createSpecialLoopCase()
690 op << " {\n"; in createSpecialLoopCase()
691 op << " for (${COUNTER_PRECISION} int j = 0; j < ${TWO}; j++)\n"; in createSpecialLoopCase()
692 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
693 op << " for (${COUNTER_PRECISION} int j = 0; j < ${ONE}; j++)\n"; in createSpecialLoopCase()
694 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
695 op << " }\n"; in createSpecialLoopCase()
700 op << " ${FOR_LOOP}\n"; in createSpecialLoopCase()
701 op << " {\n"; in createSpecialLoopCase()
702 op << " res = coords; // ignore outer loop effect \n"; in createSpecialLoopCase()
703 op << " for (${COUNTER_PRECISION} int j = 0; j < ${TWO}; j++)\n"; in createSpecialLoopCase()
704 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
705 op << " }\n"; in createSpecialLoopCase()
710 op << " ${FOR_LOOP}\n"; in createSpecialLoopCase()
711 op << " {\n"; in createSpecialLoopCase()
712 op << " res = coords.wxyz;\n"; in createSpecialLoopCase()
713 op << " for (${COUNTER_PRECISION} int j = 0; j < ${TWO}; j++)\n"; in createSpecialLoopCase()
714 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
715 op << " coords = res;\n"; in createSpecialLoopCase()
716 op << " }\n"; in createSpecialLoopCase()
721 op << " ${FOR_LOOP} if (i < 2) res = res.yzwx;\n"; in createSpecialLoopCase()
726 op << " ${FOR_LOOP}\n"; in createSpecialLoopCase()
727 op << " {\n"; in createSpecialLoopCase()
728 op << " res = func(res);\n"; in createSpecialLoopCase()
729 op << " }\n"; in createSpecialLoopCase()
734 op << " ${FOR_LOOP}\n"; in createSpecialLoopCase()
735 op << " {\n"; in createSpecialLoopCase()
736 op << " func(res);\n"; in createSpecialLoopCase()
737 op << " }\n"; in createSpecialLoopCase()
759 op << " ${WHILE_LOOP} {}\n"; in createSpecialLoopCase()
764 op << " while (true) { break; res = res.yzwx; }\n"; in createSpecialLoopCase()
769 op << " while (true) { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
774 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
775 op << " while (true) { res = res.yzwx; if (i == ${ONE}) break; i++; }\n"; in createSpecialLoopCase()
779 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
785 op << " ${WHILE_LOOP} { res = res.yzwx; res = res.yzwx; }\n"; in createSpecialLoopCase()
791 op << " ${WHILE_LOOP} res = res.yzwx, res = res.yzwx;\n"; in createSpecialLoopCase()
797 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
803 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
807 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
808 op << " while (i < (ub_true ? ${ITER_COUNT} : 0)) { res = res.yzwx; i++; }\n"; in createSpecialLoopCase()
813 op << " ${WHILE_LOOP} { if (i == ${TWO}) continue; res = res.yzwx; }\n"; in createSpecialLoopCase()
817 op << " ${WHILE_LOOP} { res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
822 op << " ${WHILE_LOOP} { continue; }\n"; in createSpecialLoopCase()
827 op << " ${WHILE_LOOP} { if (i == ${ONE}) continue; res = res.yzwx; continue; }\n"; in createSpecialLoopCase()
832 op << " ${WHILE_LOOP} { if (i == ${THREE}) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
837 op << " ${WHILE_LOOP} { res = res.yzwx; break; }\n"; in createSpecialLoopCase()
842 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
843 op << " while (++i < ${ITER_COUNT}) { res = res.yzwx; }\n"; in createSpecialLoopCase()
847 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
848 op << " while (i++ < ${ITER_COUNT}) { res = res.yzwx; }\n"; in createSpecialLoopCase()
854 op << " ${WHILE_LOOP} { if (i == 0) continue; else if (i == 3) break; res = res.yzwx; }\n"; in createSpecialLoopCase()
858 op << " ${COUNTER_PRECISION} ivec4 i = ivec4(0, 1, ${ITER_COUNT}, 0);\n"; in createSpecialLoopCase()
859 op << " while (i.x < i.z) { res = res.yzwx; i.x += i.y; }\n"; in createSpecialLoopCase()
864 op << " ${WHILE_LOOP} res = res.yzwx;\n"; in createSpecialLoopCase()
870 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
871 op << " while (i++ < ${TWO}) { res = res.yzwx; }\n"; in createSpecialLoopCase()
872 op << " while (i++ < ${ITER_COUNT}) { res = res.yzwx; }\n"; // \note skips one iteration in createSpecialLoopCase()
877 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
878 op << " while (i++ < ${TWO})\n"; in createSpecialLoopCase()
879 op << " {\n"; in createSpecialLoopCase()
880 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
881 op << " while (j++ < ${ITER_COUNT})\n"; in createSpecialLoopCase()
882 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
883 op << " }\n"; in createSpecialLoopCase()
888 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
889 op << " while (i++ < ${ITER_COUNT})\n"; in createSpecialLoopCase()
890 op << " {\n"; in createSpecialLoopCase()
891 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
892 op << " while (j++ < ${ONE})\n"; in createSpecialLoopCase()
893 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
894 op << " while (j++ < ${THREE})\n"; // \note skips one iteration in createSpecialLoopCase()
895 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
896 op << " }\n"; in createSpecialLoopCase()
901 op << " ${WHILE_LOOP}\n"; in createSpecialLoopCase()
902 op << " {\n"; in createSpecialLoopCase()
903 op << " res = coords; // ignore outer loop effect \n"; in createSpecialLoopCase()
904 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
905 op << " while (j++ < ${TWO})\n"; in createSpecialLoopCase()
906 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
907 op << " }\n"; in createSpecialLoopCase()
912 op << " ${WHILE_LOOP}\n"; in createSpecialLoopCase()
913 op << " {\n"; in createSpecialLoopCase()
914 op << " res = coords.wxyz;\n"; in createSpecialLoopCase()
915 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
916 op << " while (j++ < ${TWO})\n"; in createSpecialLoopCase()
917 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
918 op << " coords = res;\n"; in createSpecialLoopCase()
919 op << " }\n"; in createSpecialLoopCase()
924 op << " ${WHILE_LOOP} if (i < 2) res = res.yzwx;\n"; in createSpecialLoopCase()
929 op << " ${WHILE_LOOP}\n"; in createSpecialLoopCase()
930 op << " {\n"; in createSpecialLoopCase()
931 op << " res = func(res);\n"; in createSpecialLoopCase()
932 op << " }\n"; in createSpecialLoopCase()
937 op << " ${WHILE_LOOP}\n"; in createSpecialLoopCase()
938 op << " {\n"; in createSpecialLoopCase()
939 op << " func(res);\n"; in createSpecialLoopCase()
940 op << " }\n"; in createSpecialLoopCase()
964 op << " ${DO_WHILE_PRE} {} ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
969 op << " do { break; res = res.yzwx; } while (true);\n"; in createSpecialLoopCase()
974 op << " do { res = res.yzwx; break; } while (true);\n"; in createSpecialLoopCase()
979 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
980 op << " do { res = res.yzwx; if (i == ${ONE}) break; i++; } while (true);\n"; in createSpecialLoopCase()
984 op << " ${DO_WHILE_PRE} res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
990 op << " ${DO_WHILE_PRE} { res = res.yzwx; res = res.yzwx; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
996 op << " ${DO_WHILE_PRE} res = res.yzwx, res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1006 op << " ${DO_WHILE_PRE} res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1010 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
1011 op << " do { res = res.yzwx; } while (++i < (ub_true ? ${ITER_COUNT} : 0));\n"; in createSpecialLoopCase()
1016 op << " ${DO_WHILE_PRE} { if (i == ${TWO}) continue; res = res.yzwx; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1020 op << " ${DO_WHILE_PRE} { res = res.yzwx; continue; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1025 op << " ${DO_WHILE_PRE} { continue; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1030 …op << " ${DO_WHILE_PRE} { if (i == ${TWO}) continue; res = res.yzwx; continue; } ${DO_WHILE_POST}\… in createSpecialLoopCase()
1035 op << " ${DO_WHILE_PRE} { res = res.yzwx; if (i == ${ONE}) break; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1040 op << " ${DO_WHILE_PRE} { res = res.yzwx; break; } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1044 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
1045 op << " do { res = res.yzwx; } while (++i < ${ITER_COUNT});\n"; in createSpecialLoopCase()
1050 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
1051 op << " do { res = res.yzwx; } while (i++ < ${ITER_COUNT});\n"; in createSpecialLoopCase()
1057 …op << " ${DO_WHILE_PRE} { if (i == 0) continue; else if (i == 3) break; res = res.yzwx; } ${DO_WHI… in createSpecialLoopCase()
1061 op << " ${COUNTER_PRECISION} ivec4 i = ivec4(0, 1, ${ITER_COUNT}, 0);\n"; in createSpecialLoopCase()
1062 op << " do { res = res.yzwx; } while ((i.x += i.y) < i.z);\n"; in createSpecialLoopCase()
1067 op << " ${DO_WHILE_PRE} res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1073 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
1074 op << " do { res = res.yzwx; } while (++i < ${TWO});\n"; in createSpecialLoopCase()
1075 op << " do { res = res.yzwx; } while (++i < ${ITER_COUNT});\n"; in createSpecialLoopCase()
1080 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
1081 op << " do\n"; in createSpecialLoopCase()
1082 op << " {\n"; in createSpecialLoopCase()
1083 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1084 op << " do\n"; in createSpecialLoopCase()
1085 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1086 op << " while (++j < ${ITER_COUNT});\n"; in createSpecialLoopCase()
1087 op << " } while (++i < ${TWO});\n"; in createSpecialLoopCase()
1092 op << " ${COUNTER_PRECISION} int i = 0;\n"; in createSpecialLoopCase()
1093 op << " do\n"; in createSpecialLoopCase()
1094 op << " {\n"; in createSpecialLoopCase()
1095 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1096 op << " do\n"; in createSpecialLoopCase()
1097 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1098 op << " while (++j < ${TWO});\n"; in createSpecialLoopCase()
1099 op << " do\n"; in createSpecialLoopCase()
1100 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1101 op << " while (++j < ${THREE});\n"; in createSpecialLoopCase()
1102 op << " } while (++i < ${ITER_COUNT});\n"; in createSpecialLoopCase()
1107 op << " ${DO_WHILE_PRE}\n"; in createSpecialLoopCase()
1108 op << " {\n"; in createSpecialLoopCase()
1109 op << " res = coords; // ignore outer loop effect \n"; in createSpecialLoopCase()
1110 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1111 op << " do\n"; in createSpecialLoopCase()
1112 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1113 op << " while (++j < ${TWO});\n"; in createSpecialLoopCase()
1114 op << " } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1119 op << " ${DO_WHILE_PRE}\n"; in createSpecialLoopCase()
1120 op << " {\n"; in createSpecialLoopCase()
1121 op << " res = coords.wxyz;\n"; in createSpecialLoopCase()
1122 op << " ${COUNTER_PRECISION} int j = 0;\n"; in createSpecialLoopCase()
1123 op << " while (j++ < ${TWO})\n"; in createSpecialLoopCase()
1124 op << " res = res.yzwx;\n"; in createSpecialLoopCase()
1125 op << " coords = res;\n"; in createSpecialLoopCase()
1126 op << " } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1131 op << " ${DO_WHILE_PRE} if (i < 2) res = res.yzwx; ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1136 op << " ${DO_WHILE_PRE}\n"; in createSpecialLoopCase()
1137 op << " {\n"; in createSpecialLoopCase()
1138 op << " res = func(res);\n"; in createSpecialLoopCase()
1139 op << " } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()
1144 op << " ${DO_WHILE_PRE}\n"; in createSpecialLoopCase()
1145 op << " {\n"; in createSpecialLoopCase()
1146 op << " func(res);\n"; in createSpecialLoopCase()
1147 op << " } ${DO_WHILE_POST}\n"; in createSpecialLoopCase()