Lines Matching refs:op
378 std::ostringstream& op = isVertexCase ? vtx : frag; in createUniformArrayCase() local
395 op << "uniform mediump int ui_zero, ui_one, ui_two, ui_three;\n"; in createUniformArrayCase()
397 op << "uniform mediump int ui_four;\n"; in createUniformArrayCase()
399 op << "uniform ${PRECISION} ${VAR_TYPE} u_arr[${ARRAY_LEN}];\n"; in createUniformArrayCase()
411 op << " ${PRECISION} ${VAR_TYPE} res = ${VAR_TYPE}(0.0);\n"; in createUniformArrayCase()
414 op << " res += u_arr[0];\n"; in createUniformArrayCase()
415 op << " res += u_arr[1];\n"; in createUniformArrayCase()
416 op << " res += u_arr[2];\n"; in createUniformArrayCase()
417 op << " res += u_arr[3];\n"; in createUniformArrayCase()
421 op << " res += u_arr[ui_zero];\n"; in createUniformArrayCase()
422 op << " res += u_arr[ui_one];\n"; in createUniformArrayCase()
423 op << " res += u_arr[ui_two];\n"; in createUniformArrayCase()
424 op << " res += u_arr[ui_three];\n"; in createUniformArrayCase()
428 op << " for (int i = 0; i < 4; i++)\n"; in createUniformArrayCase()
429 op << " res += u_arr[i];\n"; in createUniformArrayCase()
434 op << " for (int i = 0; i < ui_four; i++)\n"; in createUniformArrayCase()
435 op << " res += u_arr[i];\n"; in createUniformArrayCase()
488 std::ostringstream& op = isVertexCase ? vtx : frag; in createTmpArrayCase() local
505 op << "uniform mediump int ui_zero, ui_one, ui_two, ui_three;\n"; in createTmpArrayCase()
508 op << "uniform mediump int ui_four;\n"; in createTmpArrayCase()
521 op << " ${PRECISION} ${VAR_TYPE} coords = ${VAR_TYPE}(a_coords);\n"; in createTmpArrayCase()
523 op << " ${PRECISION} ${VAR_TYPE} coords = ${VAR_TYPE}(v_coords);\n"; in createTmpArrayCase()
525 op << " ${PRECISION} ${VAR_TYPE} arr[${ARRAY_LEN}];\n"; in createTmpArrayCase()
528 op << " arr[0] = ${VAR_TYPE}(coords);\n"; in createTmpArrayCase()
529 op << " arr[1] = ${VAR_TYPE}(coords) * 0.5;\n"; in createTmpArrayCase()
530 op << " arr[2] = ${VAR_TYPE}(coords) * 0.25;\n"; in createTmpArrayCase()
531 op << " arr[3] = ${VAR_TYPE}(coords) * 0.125;\n"; in createTmpArrayCase()
535 op << " arr[ui_zero] = ${VAR_TYPE}(coords);\n"; in createTmpArrayCase()
536 op << " arr[ui_one] = ${VAR_TYPE}(coords) * 0.5;\n"; in createTmpArrayCase()
537 op << " arr[ui_two] = ${VAR_TYPE}(coords) * 0.25;\n"; in createTmpArrayCase()
538 op << " arr[ui_three] = ${VAR_TYPE}(coords) * 0.125;\n"; in createTmpArrayCase()
542 op << " for (int i = 0; i < 4; i++)\n"; in createTmpArrayCase()
543 op << " {\n"; in createTmpArrayCase()
544 op << " arr[i] = ${VAR_TYPE}(coords);\n"; in createTmpArrayCase()
545 op << " coords = coords * 0.5;\n"; in createTmpArrayCase()
546 op << " }\n"; in createTmpArrayCase()
551 op << " for (int i = 0; i < ui_four; i++)\n"; in createTmpArrayCase()
552 op << " {\n"; in createTmpArrayCase()
553 op << " arr[i] = ${VAR_TYPE}(coords);\n"; in createTmpArrayCase()
554 op << " coords = coords * 0.5;\n"; in createTmpArrayCase()
555 op << " }\n"; in createTmpArrayCase()
559 op << " ${PRECISION} ${VAR_TYPE} res = ${VAR_TYPE}(0.0);\n"; in createTmpArrayCase()
562 op << " res += arr[0];\n"; in createTmpArrayCase()
563 op << " res += arr[1];\n"; in createTmpArrayCase()
564 op << " res += arr[2];\n"; in createTmpArrayCase()
565 op << " res += arr[3];\n"; in createTmpArrayCase()
569 op << " res += arr[ui_zero];\n"; in createTmpArrayCase()
570 op << " res += arr[ui_one];\n"; in createTmpArrayCase()
571 op << " res += arr[ui_two];\n"; in createTmpArrayCase()
572 op << " res += arr[ui_three];\n"; in createTmpArrayCase()
576 op << " for (int i = 0; i < 4; i++)\n"; in createTmpArrayCase()
577 op << " res += arr[i];\n"; in createTmpArrayCase()
582 op << " for (int i = 0; i < ui_four; i++)\n"; in createTmpArrayCase()
583 op << " res += arr[i];\n"; in createTmpArrayCase()
652 std::ostringstream& op = isVertexCase ? vtx : frag; in createVectorSubscriptCase() local
673 op << "uniform mediump int ui_zero"; in createVectorSubscriptCase()
674 if (vecLen >= 2) op << ", ui_one"; in createVectorSubscriptCase()
675 if (vecLen >= 3) op << ", ui_two"; in createVectorSubscriptCase()
676 if (vecLen >= 4) op << ", ui_three"; in createVectorSubscriptCase()
677 op << ";\n"; in createVectorSubscriptCase()
681 op << "uniform mediump int " << vecLenName << ";\n"; in createVectorSubscriptCase()
694 op << " ${PRECISION} ${VAR_TYPE} coords = ${VAR_TYPE}(a_coords);\n"; in createVectorSubscriptCase()
696 op << " ${PRECISION} ${VAR_TYPE} coords = ${VAR_TYPE}(v_coords);\n"; in createVectorSubscriptCase()
698 op << " ${PRECISION} ${VAR_TYPE} tmp;\n"; in createVectorSubscriptCase()
700 op << " tmp = coords.${SWIZZLE} * vec4(1.0, 0.5, 0.25, 0.125).${SWIZZLE};\n"; in createVectorSubscriptCase()
703 op << " tmp.x = coords.x;\n"; in createVectorSubscriptCase()
704 if (vecLen >= 2) op << " tmp.y = coords.y * 0.5;\n"; in createVectorSubscriptCase()
705 if (vecLen >= 3) op << " tmp.z = coords.z * 0.25;\n"; in createVectorSubscriptCase()
706 if (vecLen >= 4) op << " tmp.w = coords.w * 0.125;\n"; in createVectorSubscriptCase()
710 op << " tmp[0] = coords.x;\n"; in createVectorSubscriptCase()
711 if (vecLen >= 2) op << " tmp[1] = coords.y * 0.5;\n"; in createVectorSubscriptCase()
712 if (vecLen >= 3) op << " tmp[2] = coords.z * 0.25;\n"; in createVectorSubscriptCase()
713 if (vecLen >= 4) op << " tmp[3] = coords.w * 0.125;\n"; in createVectorSubscriptCase()
717 op << " tmp[ui_zero] = coords.x;\n"; in createVectorSubscriptCase()
718 if (vecLen >= 2) op << " tmp[ui_one] = coords.y * 0.5;\n"; in createVectorSubscriptCase()
719 if (vecLen >= 3) op << " tmp[ui_two] = coords.z * 0.25;\n"; in createVectorSubscriptCase()
720 if (vecLen >= 4) op << " tmp[ui_three] = coords.w * 0.125;\n"; in createVectorSubscriptCase()
724 op << " for (int i = 0; i < " << vecLen << "; i++)\n"; in createVectorSubscriptCase()
725 op << " {\n"; in createVectorSubscriptCase()
726 op << " tmp[i] = coords.x;\n"; in createVectorSubscriptCase()
727 op << " coords = coords.${ROT_SWIZZLE} * 0.5;\n"; in createVectorSubscriptCase()
728 op << " }\n"; in createVectorSubscriptCase()
733 op << " for (int i = 0; i < " << vecLenName << "; i++)\n"; in createVectorSubscriptCase()
734 op << " {\n"; in createVectorSubscriptCase()
735 op << " tmp[i] = coords.x;\n"; in createVectorSubscriptCase()
736 op << " coords = coords.${ROT_SWIZZLE} * 0.5;\n"; in createVectorSubscriptCase()
737 op << " }\n"; in createVectorSubscriptCase()
741 op << " ${PRECISION} float res = 0.0;\n"; in createVectorSubscriptCase()
743 op << " res = dot(tmp, ${VAR_TYPE}(1.0));\n"; in createVectorSubscriptCase()
746 op << " res += tmp.x;\n"; in createVectorSubscriptCase()
747 if (vecLen >= 2) op << " res += tmp.y;\n"; in createVectorSubscriptCase()
748 if (vecLen >= 3) op << " res += tmp.z;\n"; in createVectorSubscriptCase()
749 if (vecLen >= 4) op << " res += tmp.w;\n"; in createVectorSubscriptCase()
753 op << " res += tmp[0];\n"; in createVectorSubscriptCase()
754 if (vecLen >= 2) op << " res += tmp[1];\n"; in createVectorSubscriptCase()
755 if (vecLen >= 3) op << " res += tmp[2];\n"; in createVectorSubscriptCase()
756 if (vecLen >= 4) op << " res += tmp[3];\n"; in createVectorSubscriptCase()
760 op << " res += tmp[ui_zero];\n"; in createVectorSubscriptCase()
761 if (vecLen >= 2) op << " res += tmp[ui_one];\n"; in createVectorSubscriptCase()
762 if (vecLen >= 3) op << " res += tmp[ui_two];\n"; in createVectorSubscriptCase()
763 if (vecLen >= 4) op << " res += tmp[ui_three];\n"; in createVectorSubscriptCase()
767 op << " for (int i = 0; i < " << vecLen << "; i++)\n"; in createVectorSubscriptCase()
768 op << " res += tmp[i];\n"; in createVectorSubscriptCase()
773 op << " for (int i = 0; i < " << vecLenName << "; i++)\n"; in createVectorSubscriptCase()
774 op << " res += tmp[i];\n"; in createVectorSubscriptCase()
838 std::ostringstream& op = isVertexCase ? vtx : frag; in createMatrixSubscriptCase() local
860 op << "uniform mediump int ui_zero"; in createMatrixSubscriptCase()
861 if (matSize >= 2) op << ", ui_one"; in createMatrixSubscriptCase()
862 if (matSize >= 3) op << ", ui_two"; in createMatrixSubscriptCase()
863 if (matSize >= 4) op << ", ui_three"; in createMatrixSubscriptCase()
864 op << ";\n"; in createMatrixSubscriptCase()
868 op << "uniform mediump int " << matSizeName << ";\n"; in createMatrixSubscriptCase()
881 op << " ${PRECISION} vec4 coords = a_coords;\n"; in createMatrixSubscriptCase()
883 op << " ${PRECISION} vec4 coords = v_coords;\n"; in createMatrixSubscriptCase()
885 op << " ${PRECISION} ${MAT_TYPE} tmp;\n"; in createMatrixSubscriptCase()
888 op << " tmp[0] = ${VEC_TYPE}(coords);\n"; in createMatrixSubscriptCase()
889 if (matSize >= 2) op << " tmp[1] = ${VEC_TYPE}(coords.yzwx) * 0.5;\n"; in createMatrixSubscriptCase()
890 if (matSize >= 3) op << " tmp[2] = ${VEC_TYPE}(coords.zwxy) * 0.25;\n"; in createMatrixSubscriptCase()
891 if (matSize >= 4) op << " tmp[3] = ${VEC_TYPE}(coords.wxyz) * 0.125;\n"; in createMatrixSubscriptCase()
895 op << " tmp[ui_zero] = ${VEC_TYPE}(coords);\n"; in createMatrixSubscriptCase()
896 if (matSize >= 2) op << " tmp[ui_one] = ${VEC_TYPE}(coords.yzwx) * 0.5;\n"; in createMatrixSubscriptCase()
897 if (matSize >= 3) op << " tmp[ui_two] = ${VEC_TYPE}(coords.zwxy) * 0.25;\n"; in createMatrixSubscriptCase()
898 if (matSize >= 4) op << " tmp[ui_three] = ${VEC_TYPE}(coords.wxyz) * 0.125;\n"; in createMatrixSubscriptCase()
902 op << " for (int i = 0; i < " << matSize << "; i++)\n"; in createMatrixSubscriptCase()
903 op << " {\n"; in createMatrixSubscriptCase()
904 op << " tmp[i] = ${VEC_TYPE}(coords);\n"; in createMatrixSubscriptCase()
905 op << " coords = coords.yzwx * 0.5;\n"; in createMatrixSubscriptCase()
906 op << " }\n"; in createMatrixSubscriptCase()
911 op << " for (int i = 0; i < " << matSizeName << "; i++)\n"; in createMatrixSubscriptCase()
912 op << " {\n"; in createMatrixSubscriptCase()
913 op << " tmp[i] = ${VEC_TYPE}(coords);\n"; in createMatrixSubscriptCase()
914 op << " coords = coords.yzwx * 0.5;\n"; in createMatrixSubscriptCase()
915 op << " }\n"; in createMatrixSubscriptCase()
919 op << " ${PRECISION} ${VEC_TYPE} res = ${VEC_TYPE}(0.0);\n"; in createMatrixSubscriptCase()
922 op << " res += tmp[0];\n"; in createMatrixSubscriptCase()
923 if (matSize >= 2) op << " res += tmp[1];\n"; in createMatrixSubscriptCase()
924 if (matSize >= 3) op << " res += tmp[2];\n"; in createMatrixSubscriptCase()
925 if (matSize >= 4) op << " res += tmp[3];\n"; in createMatrixSubscriptCase()
929 op << " res += tmp[ui_zero];\n"; in createMatrixSubscriptCase()
930 if (matSize >= 2) op << " res += tmp[ui_one];\n"; in createMatrixSubscriptCase()
931 if (matSize >= 3) op << " res += tmp[ui_two];\n"; in createMatrixSubscriptCase()
932 if (matSize >= 4) op << " res += tmp[ui_three];\n"; in createMatrixSubscriptCase()
936 op << " for (int i = 0; i < " << matSize << "; i++)\n"; in createMatrixSubscriptCase()
937 op << " res += tmp[i];\n"; in createMatrixSubscriptCase()
942 op << " for (int i = 0; i < " << matSizeName << "; i++)\n"; in createMatrixSubscriptCase()
943 op << " res += tmp[i];\n"; in createMatrixSubscriptCase()