Home | History | Annotate | Download | only in functional

Lines Matching refs:Vec4

51 static tcu::Vec4 genRandomVector (de::Random& rnd)
53 tcu::Vec4 retVal;
208 std::vector<tcu::Vec4> triangles (numTriangles * 3 * 2);
214 const tcu::Vec4 vertex1 = genRandomVector(rnd);
215 const tcu::Vec4 vertex2 = genRandomVector(rnd);
216 const tcu::Vec4 vertex3 = vertex2 + genRandomVector(rnd) * 0.01f; // generate narrow triangles
234 gl.bufferData(GL_ARRAY_BUFFER, (int)(triangles.size() * sizeof(tcu::Vec4)), &triangles[0], GL_STATIC_DRAW);
278 const tcu::Vec4 red = tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f);
279 const tcu::Vec4 green = tcu::Vec4(0.0f, 1.0f, 0.0f, 1.0f);
280 const tcu::Vec4 color = (passNdx == 0) ? (red) : (green);
288 gl.vertexAttribPointer (positionLoc, 4, GL_FLOAT, GL_FALSE, sizeof(tcu::Vec4), DE_NULL);
320 const tcu::Vec4 red = tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f);
321 const tcu::Vec4 green = tcu::Vec4(0.0f, 1.0f, 0.0f, 1.0f);
322 const tcu::Vec4 color = (passNdx == 0) ? (red) : (green);
333 gl.vertexAttribPointer (positionLoc, 4, GL_FLOAT, GL_FALSE, sizeof(tcu::Vec4), DE_NULL);
414 const char* const BasicInvarianceTest::s_basicFragmentShader = "uniform mediump vec4 u_color;\n"
415 "varying mediump vec4 v_unrelated;\n"
418 " mediump float blue = dot(v_unrelated, vec4(1.0, 1.0, 1.0, 1.0));\n"
419 " gl_FragColor = vec4(u_color.r, u_color.g, blue, u_color.a);\n"
511 "${IN} ${IN_PREC} vec4 a_input;\n"
512 "${OUT} mediump vec4 v_unrelated;\n"
520 "${IN} ${IN_PREC} vec4 a_input;\n"
521 "${OUT} mediump vec4 v_unrelated;\n"
525 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
534 "${IN} ${IN_PREC} vec4 a_input;\n"
535 "${OUT} mediump vec4 v_unrelated;\n"
539 " ${IN_PREC} vec4 a = ${HIGH_VALUE} * a_input.zzxx + a_input.xzxy - ${HIGH_VALUE} * a_input.zzxx;\n"
540 " ${IN_PREC} vec4 b = ${HIGH_VALUE} * a_input.zzxx;\n"
541 " ${IN_PREC} vec4 c = b - ${HIGH_VALUE} * a_input.zzxx + a_input.xzxy;\n"
542 " ${IN_PREC} vec4 d = (${LOW_VALUE} * a_input.yzxx) * (${LOW_VALUE} * a_input.yzzw) * (1.1*${LOW_VALUE_INV} * a_input.yzxx) * (${LOW_VALUE_INV} * a_input.xzzy);\n"
543 " ${IN_PREC} vec4 e = ((${LOW_VALUE} * a_input.yzxx) * (1.1*${LOW_VALUE_INV} * a_input.yzxx)) * ((${LOW_VALUE_INV} * a_input.xzzy) * (${LOW_VALUE} * a_input.yzzw));\n"
548 "${IN} ${IN_PREC} vec4 a_input;\n"
549 "${OUT} mediump vec4 v_unrelated;\n"
553 " ${IN_PREC} vec4 b = ${HIGH_VALUE} * a_input.zzxx;\n"
554 " ${IN_PREC} vec4 c = b - ${HIGH_VALUE} * a_input.zzxx + a_input.xzxy;\n"
555 " ${IN_PREC} vec4 e = ((${LOW_VALUE} * a_input.yzxx) * (1.1*${LOW_VALUE_INV} * a_input.yzxx)) * ((${LOW_VALUE_INV} * a_input.xzzy) * (${LOW_VALUE} * a_input.yzzw));\n"
556 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
564 "${IN} ${IN_PREC} vec4 a_input;\n"
565 "${OUT} mediump vec4 v_unrelated;\n"
569 " ${IN_PREC} vec4 a = ${MEDIUM_VALUE} * (a_input.xxxx + a_input.yyyy);\n"
570 " ${IN_PREC} vec4 b = (${MEDIUM_VALUE} * (a_input.xxxx + a_input.yyyy)) * (${MEDIUM_VALUE} * (a_input.xxxx + a_input.yyyy)) / ${MEDIUM_VALUE} / ${MEDIUM_VALUE};\n"
571 " ${IN_PREC} vec4 c = a * a;\n"
572 " ${IN_PREC} vec4 d = c / ${MEDIUM_VALUE} / ${MEDIUM_VALUE};\n"
577 "${IN} ${IN_PREC} vec4 a_input;\n"
578 "${OUT} mediump vec4 v_unrelated;\n"
582 " ${IN_PREC} vec4 a = ${MEDIUM_VALUE} * (a_input.xxxx + a_input.yyyy);\n"
583 " ${IN_PREC} vec4 c = a * a;\n"
584 " ${IN_PREC} vec4 d = c / ${MEDIUM_VALUE} / ${MEDIUM_VALUE};\n"
585 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
593 "${IN} ${IN_PREC} vec4 a_input;\n"
594 "${OUT} mediump vec4 v_unrelated;\n"
599 " ${IN_PREC} vec4 a = a_input.xxyx * 0.7;\n"
600 " ${IN_PREC} vec4 b = a_input.yxyz * 0.7;\n"
601 " ${IN_PREC} vec4 c = a_input.zxyx * 0.5;\n"
602 " ${IN_PREC} vec4 f = x*a + x*b + x*c;\n"
604 " ${IN_PREC} vec4 g = x * (a + b + c);\n"
608 "${IN} ${IN_PREC} vec4 a_input;\n"
609 "${OUT} mediump vec4 v_unrelated;\n"
614 " ${IN_PREC} vec4 a = a_input.xxyx * 0.7;\n"
615 " ${IN_PREC} vec4 b = a_input.yxyz * 0.7;\n"
616 " ${IN_PREC} vec4 c = a_input.zxyx * 0.5;\n"
617 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
618 " ${IN_PREC} vec4 g = x * (a + b + c);\n"
630 const char* const normalizationStrUsed = (minPrecision == glu::PRECISION_LOWP) ? ("vec4(fract(used2).xyz, 0.0)") : ("vec4(fract(used2 / 1.0e2).xyz - fract(used2 / 1.0e3).xyz, 0.0)");
631 const char* const normalizationStrUnrelated = (minPrecision == glu::PRECISION_LOWP) ? ("vec4(fract(unrelated2).xyz, 0.0)") : ("vec4(fract(unrelated2 / 1.0e2).xyz - fract(unrelated2 / 1.0e3).xyz, 0.0)");
635 "${IN} ${IN_PREC} vec4 a_input;\n"
636 "${OUT} ${UNRELATED_PREC} vec4 v_unrelated;\n"
640 " ${UNRELATED_PREC} vec4 unrelated0 = a_input + vec4(0.1, 0.2, 0.3, 0.4);\n"
641 " ${UNRELATED_PREC} vec4 unrelated1 = vec4(${MULTIPLIER}) * unrelated0.xywz + unrelated0;\n"
642 " ${UNRELATED_PREC} vec4 unrelated2 = refract(unrelated1, unrelated0, distance(unrelated0, unrelated1));\n"
644 " ${IN_PREC} vec4 used0 = a_input + vec4(0.1, 0.2, 0.3, 0.4);\n"
645 " ${IN_PREC} vec4 used1 = vec4(${MULTIPLIER}) * used0.xywz + used0;\n"
646 " ${IN_PREC} vec4 used2 = refract(used1, used0, distance(used0, used1));\n"
654 "${IN} ${IN_PREC} vec4 a_input;\n"
655 "${OUT} ${UNRELATED_PREC} vec4 v_unrelated;\n"
659 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
660 " ${IN_PREC} vec4 used0 = a_input + vec4(0.1, 0.2, 0.3, 0.4);\n"
661 " ${IN_PREC} vec4 used1 = vec4(${MULTIPLIER}) * used0.xywz + used0;\n"
662 " ${IN_PREC} vec4 used2 = refract(used1, used0, distance(used0, used1));\n"
676 "${IN} ${IN_PREC} vec4 a_input;\n"
677 "${OUT} highp vec4 v_unrelated;\n"
681 " ${IN_PREC} vec4 value = a_input;\n"
682 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
688 " gl_Position = vec4(value.xyz / ${LOOP_NORM_LITERAL} + a_input.xyz * 0.1, 1.0);\n"
691 "${IN} ${IN_PREC} vec4 a_input;\n"
692 "${OUT} highp vec4 v_unrelated;\n"
696 " ${IN_PREC} vec4 value = a_input;\n"
697 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
702 " gl_Position = vec4(value.xyz / ${LOOP_NORM_LITERAL} + a_input.xyz * 0.1, 1.0);\n"
707 "${IN} ${IN_PREC} vec4 a_input;\n"
708 "${OUT} mediump vec4 v_unrelated;\n"
712 " ${IN_PREC} vec4 value = a_input;\n"
719 " gl_Position = vec4(value.xyz / ${LOOP_NORM_LITERAL} + a_input.xyz * 0.1, 1.0);\n"
722 "${IN} ${IN_PREC} vec4 a_input;\n"
723 "${OUT} mediump vec4 v_unrelated;\n"
727 " ${IN_PREC} vec4 value = a_input;\n"
728 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
733 " gl_Position = vec4(value.xyz / ${LOOP_NORM_LITERAL} + a_input.xyz * 0.1, 1.0);\n"
738 "${IN} ${IN_PREC} vec4 a_input;\n"
739 "${OUT} mediump vec4 v_unrelated;\n"
743 " ${IN_PREC} vec4 value = a_input;\n"
744 " v_unrelated = vec4(0.0, 0.0, -1.0, 1.0);\n"
749 " gl_Position = a_input + 0.05 * vec4(fract(value.xyz / 1.0e${LOOP_NORM_FRACT_EXP}), 1.0);\n"
755 "${IN} ${IN_PREC} vec4 a_input;\n"
756 "${OUT} mediump vec4 v_unrelated;\n"
760 " ${IN_PREC} vec4 value = a_input;\n"
761 " v_unrelated = vec4(0.0, 0.0, -1.0, 1.0);\n"
766 " gl_Position = a_input + 0.05 * vec4(fract(value.xyz / 1.0e${LOOP_NORM_FRACT_EXP}), 1.0);\n"
768 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
774 "${IN} ${IN_PREC} vec4 a_input;\n"
775 "${OUT} mediump vec4 v_unrelated;\n"
779 " ${IN_PREC} vec4 value = a_input;\n"
780 " gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n"
781 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
785 " gl_Position += vec4(value.xyz / ${SUM_LOOP_NORM_LITERAL} + a_input.xyz * 0.1, 1.0);\n"
790 "${IN} ${IN_PREC} vec4 a_input;\n"
791 "${OUT} mediump vec4 v_unrelated;\n"
795 " ${IN_PREC} vec4 value = a_input;\n"
796 " gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n"
797 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
801 " gl_Position += vec4(value.xyz / ${SUM_LOOP_NORM_LITERAL} + a_input.xyz * 0.1, 1.0);\n"
807 "${IN} ${IN_PREC} vec4 a_input;\n"
808 "${OUT} mediump vec4 v_unrelated;\n"
812 " ${IN_PREC} vec4 position = vec4(0.0, 0.0, 0.0, 0.0);\n"
813 " ${IN_PREC} vec4 value1 = a_input;\n"
814 " ${IN_PREC} vec4 value2 = a_input;\n"
815 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
826 " gl_Position = a_input + 0.05 * vec4(fract(position.xyz / 1.0e${LOOP_NORM_FRACT_EXP}), 1.0);\n"
829 "${IN} ${IN_PREC} vec4 a_input;\n"
830 "${OUT} mediump vec4 v_unrelated;\n"
834 " ${IN_PREC} vec4 position = vec4(0.0, 0.0, 0.0, 0.0);\n"
835 " ${IN_PREC} vec4 value2 = a_input;\n"
836 " v_unrelated = vec4(0.0, 0.0, 0.0, 0.0);\n"
842 " gl_Position = a_input + 0.05 * vec4(fract(position.xyz / 1.0e${LOOP_NORM_FRACT_EXP}), 1.0);\n"