Lines Matching refs:Vec4
63 tcu::Vec4 min;
64 tcu::Vec4 max;
109 tcu::Vec4 vertexBox;
259 { tcu::Vec4( 0.0f, 0.0f, 0.0f, 0.0f), tcu::Vec4( 0.0f, 0.0f, 0.0f, 0.0f) },
260 { tcu::Vec4(-0.0f, -0.0f, -0.0f, -0.0f), tcu::Vec4( 0.0f, 0.0f, 0.0f, -0.0f) },
261 { tcu::Vec4( 0.0f, 0.0f, 0.0f, 0.0f), tcu::Vec4( 1.0f, 1.0f, 1.0f, -1.0f) },
262 { tcu::Vec4( 2.0f, 2.0f, 2.0f, 2.0f), tcu::Vec4( 1.5f, 1.5f, 1.5f, 1.0f) },
263 { tcu::Vec4( 1.0f, 1.0f, 1.0f, 1.0f), tcu::Vec4(-1.0f, -1.0f, -1.0f, -1.0f) },
264 { tcu::Vec4( 1.0f, 1.0f, 1.0f, 0.3f), tcu::Vec4(-1.0f, -1.0f, -1.0f, -1.2f) },
568 virtual void getAttributeData (std::vector<tcu::Vec4>& data) const = 0;
721 std::vector<tcu::Vec4> data;
727 gl.bufferData(GL_ARRAY_BUFFER, (int)(data.size() * sizeof(tcu::Vec4)), &data[0], GL_STATIC_DRAW);
781 config.bbox.min = tcu::Vec4(config.patternPos.x(), config.patternPos.y(), 0.0f, 1.0f);
782 config.bbox.max = tcu::Vec4(config.patternPos.x() + config.patternSize.x(), config.patternPos.y() + config.patternSize.y(), 0.0f, 1.0f);
811 tcu::Vec4 vertexBox;
910 return "vec4 mirrorX(in highp vec4 p)\n"
915 " return vec4(2.0 * patternCenter.x - p.x, p.y, p.z, p.w);\n"
919 return "vec4 mirrorY(in highp vec4 p)\n"
924 " return vec4(p.x, 2.0 * patternCenter.y - p.y, p.z, p.w);\n"
936 " highp vec4 wc = vec4(floor((v_bbox_clipMin.x * 0.5 + 0.5) * float(u_viewportSize.x) - v_bbox_expansionSize/2.0),\n"
970 void getAttributeData (std::vector<tcu::Vec4>& data) const;
1004 "in highp vec4 a_position;\n"
1005 "in highp vec4 a_color;\n"
1006 "out highp vec4 vtx_color;\n"
1007 "uniform highp vec4 u_posScale;\n"
1012 buf << "uniform highp vec4 u_primitiveBBoxMin;\n"
1013 "uniform highp vec4 u_primitiveBBoxMax;\n"
1025 " gl_Position = vec4(a_position.xy * patternScale + patternOffset, a_position.z, a_position.w);\n"
1052 "in mediump vec4 " << colorInputName << ";\n"
1053 "layout(location = 0) out mediump vec4 o_color;\n"
1058 " mediump vec4 baseColor = " << colorInputName << ";\n"
1064 " o_color = vec4(baseColor.r, baseColor.g, blueChannel, baseColor.a);\n"
1079 "in highp vec4 vtx_color[];\n"
1080 "out highp vec4 tess_ctrl_color[];\n"
1082 "uniform highp vec4 u_posScale;\n";
1086 buf << "uniform highp vec4 u_primitiveBBoxMin;\n"
1087 "uniform highp vec4 u_primitiveBBoxMax;\n";
1101 buf << "vec4 transformVec(in highp vec4 p)\n"
1122 " highp vec4 bboxMin = min(min(transformVec(gl_in[0].gl_Position),\n"
1125 " highp vec4 bboxMax = max(max(transformVec(gl_in[0].gl_Position),\n"
1132 " highp vec4 bboxMin = u_primitiveBBoxMin;\n"
1133 " highp vec4 bboxMax = u_primitiveBBoxMax;\n";
1160 "in highp vec4 tess_ctrl_color[];\n"
1161 "out highp vec4 tess_color;\n"
1162 "uniform highp vec4 u_posScale;\n"
1198 "in highp vec4 " << colorInputName << "[3];\n"
1199 "out highp vec4 geo_color;\n"
1200 "uniform highp vec4 u_posScale;\n"
1219 " highp vec4 p0 = mirrorX(gl_in[0].gl_Position);\n"
1220 " highp vec4 p1 = mirrorX(gl_in[1].gl_Position);\n"
1221 " highp vec4 p2 = mirrorX(gl_in[2].gl_Position);\n"
1222 " highp vec4 pCentroid = vec4((p0.xyz + p1.xyz + p2.xyz) / 3.0, 1.0);\n"
1223 " highp vec4 triangleColor = " << colorInputName << "[0];\n"
1249 void GridRenderCase::getAttributeData (std::vector<tcu::Vec4>& data) const
1251 const tcu::Vec4 green (0.0f, 1.0f, 0.0f, 1.0f);
1252 const tcu::Vec4 yellow (1.0f, 1.0f, 0.0f, 1.0f);
1267 const tcu::Vec4& cellColor = ((cellX+cellY)%2 == 0) ? (green) : (yellow);
1269 data[(ndx * 6 + 0) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(cellX+0) / float(m_gridSize), float(cellY+0) / float(m_gridSize), 0.0f, 1.0f);
1271 data[(ndx * 6 + 1) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(cellX+1) / float(m_gridSize), float(cellY+1) / float(m_gridSize), 0.0f, 1.0f);
1273 data[(ndx * 6 + 2) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(cellX+0) / float(m_gridSize), float(cellY+1) / float(m_gridSize), 0.0f, 1.0f);
1275 data[(ndx * 6 + 3) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(cellX+0) / float(m_gridSize), float(cellY+0) / float(m_gridSize), 0.0f, 1.0f);
1277 data[(ndx * 6 + 4) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(cellX+1) / float(m_gridSize), float(cellY+0) / float(m_gridSize), 0.0f, 1.0f);
1279 data[(ndx * 6 + 5) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(cellX+1) / float(m_gridSize), float(cellY+1) / float(m_gridSize), 0.0f, 1.0f);
1457 void getAttributeData (std::vector<tcu::Vec4>& data) const;
1514 "in highp vec4 a_position;\n"
1515 "in highp vec4 a_color;\n"
1516 "out highp vec4 vtx_color;\n"
1517 "uniform highp vec4 u_posScale;\n"
1523 buf << "uniform highp vec4 u_primitiveBBoxMin;\n"
1524 "uniform highp vec4 u_primitiveBBoxMax;\n"
1535 " gl_Position = vec4(a_position.xy * patternScale + patternOffset, a_position.z, a_position.w);\n"
1560 "in mediump vec4 " << colorInputName << ";\n"
1561 "layout(location = 0) out mediump vec4 o_color;\n"
1566 " mediump vec4 baseColor = " << colorInputName << ";\n"
1572 " o_color = vec4(redChannel, baseColor.g, baseColor.b, baseColor.a);\n"
1587 "in highp vec4 vtx_color[];\n"
1588 "out highp vec4 tess_ctrl_color[];\n"
1590 "uniform highp vec4 u_posScale;\n"
1595 buf << "uniform highp vec4 u_primitiveBBoxMin;\n"
1596 "uniform highp vec4 u_primitiveBBoxMax;\n";
1610 buf << "vec4 transformVec(in highp vec4 p)\n"
1629 " highp vec4 bboxMin = min(transformVec(gl_in[0].gl_Position),\n"
1631 " highp vec4 bboxMax = max(transformVec(gl_in[0].gl_Position),\n"
1637 " highp vec4 bboxMin = u_primitiveBBoxMin;\n"
1638 " highp vec4 bboxMax = u_primitiveBBoxMax;\n";
1664 "in highp vec4 tess_ctrl_color[];\n"
1665 "out highp vec4 tess_color;\n"
1666 "uniform highp vec4 u_posScale;\n"
1698 "in highp vec4 " << colorInputName << "[2];\n"
1699 "out highp vec4 geo_color;\n"
1700 "uniform highp vec4 u_posScale;\n"
1720 " highp vec4 p0 = mirrorX(gl_in[0].gl_Position);\n"
1721 " highp vec4 p1 = mirrorX(gl_in[1].gl_Position);\n"
1722 " highp vec4 lineColor = " << colorInputName << "[0];\n"
1758 void LineRenderCase::getAttributeData (std::vector<tcu::Vec4>& data) const
1760 const tcu::Vec4 green (0.0f, 1.0f, 0.0f, 1.0f);
1761 const tcu::Vec4 blue (0.0f, 0.0f, 1.0f, 1.0f);
1780 data[(ndx * 2 + 0) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(minorCoord) / float(m_patternSide), float(majorCoord) / float(m_patternSide), 0.0f, 1.0f);
1782 data[(ndx * 2 + 1) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(minorCoord) / float(m_patternSide), float(majorCoord + 1) / float(m_patternSide), 0.0f, 1.0f);
1787 data[(ndx * 2 + 0) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(majorCoord) / float(m_patternSide), float(minorCoord) / float(m_patternSide), 0.0f, 1.0f);
1789 data[(ndx * 2 + 1) * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(majorCoord + 1) / float(m_patternSide), float(minorCoord) / float(m_patternSide), 0.0f, 1.0f);
2404 void getAttributeData (std::vector<tcu::Vec4>& data) const;
2417 std::vector<tcu::Vec4> m_attribData;
2467 m_attribData = std::vector<tcu::Vec4>();
2478 "in highp vec4 a_position;\n"
2479 "in highp vec4 a_color;\n"
2480 "out highp vec4 vtx_color;\n"
2481 "uniform highp vec4 u_posScale;\n"
2486 buf << "uniform highp vec4 u_primitiveBBoxMin;\n"
2487 "uniform highp vec4 u_primitiveBBoxMax;\n"
2502 << " gl_Position = vec4(a_position.xy * patternScale + patternOffset, a_position.z, a_position.w);\n"
2529 "in mediump vec4 " << colorInputName << ";\n"
2530 "layout(location = 0) out mediump vec4 o_color;\n"
2535 " mediump vec4 baseColor = " << colorInputName << ";\n"
2541 " o_color = vec4(redChannel, baseColor.g, baseColor.b, baseColor.a);\n"
2558 "in highp vec4 vtx_color[];\n"
2559 "out highp vec4 tess_ctrl_color[];\n"
2561 "uniform highp vec4 u_posScale;\n";
2565 buf << "uniform highp vec4 u_primitiveBBoxMin;\n"
2566 "uniform highp vec4 u_primitiveBBoxMax;\n";
2579 buf << "vec4 transformVec(in highp vec4 p)\n"
2611 " highp vec4 bboxMin = transformVec(gl_in[0].gl_Position) - vec4(minExpansion * patternScale, 0.0, 0.0);\n"
2612 " highp vec4 bboxMax = transformVec(gl_in[0].gl_Position) + vec4(maxExpansion * patternScale, 0.0, 0.0);\n";
2617 " highp vec4 bboxMin = u_primitiveBBoxMin;\n"
2618 " highp vec4 bboxMax = u_primitiveBBoxMax;\n";
2644 "in highp vec4 tess_ctrl_color[];\n"
2645 "out highp vec4 tess_color;\n"
2646 "uniform highp vec4 u_posScale;\n"
2659 " highp vec4 offset = vec4((gl_TessCoord.xy * 2.0 - vec2(1.0)) * 0.07 * patternScale, 0.0, 0.0);\n"
2686 "in highp vec4 " << colorInputName << "[1];\n"
2687 "out highp vec4 geo_color;\n"
2688 "uniform highp vec4 u_posScale;\n"
2701 " highp vec4 p0 = mirrorX(gl_in[0].gl_Position);\n"
2702 " highp vec4 pointColor = " << colorInputName << "[0];\n"
2708 " highp vec4 offsets[3] =\n"
2709 " vec4[3](\n"
2710 " vec4( 0.05 * patternScale.x, 0.03 * patternScale.y, 0.0, 0.0),\n"
2711 " vec4(-0.01 * patternScale.x,-0.02 * patternScale.y, 0.0, 0.0),\n"
2712 " vec4(-0.05 * patternScale.x, 0.02 * patternScale.y, 0.0, 0.0)\n"
2743 config.bbox.min -= tcu::Vec4(0.07f * patternScale.x(), 0.07f * patternScale.y(), 0.0f, 0.0f);
2744 config.bbox.max += tcu::Vec4(0.07f * patternScale.x(), 0.07f * patternScale.y(), 0.0f, 0.0f);
2748 config.bbox.min -= tcu::Vec4(0.05f * patternScale.x(), 0.02f * patternScale.y(), 0.0f, 0.0f);
2749 config.bbox.max += tcu::Vec4(0.05f * patternScale.x(), 0.03f * patternScale.y(), 0.0f, 0.0f);
2758 const tcu::Vec4 green (0.0f, 1.0f, 0.0f, 1.0f);
2759 const tcu::Vec4 blue (0.0f, 0.0f, 1.0f, 1.0f);
2777 m_attribData[ndx * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(float(minorCoord) / float(m_numStripes), float(majorCoord) / float(m_numStripes), 0.0f, 1.0f);
2782 m_attribData[ndx * VA_NUM_ATTRIB_VECS + VA_POS_VEC_NDX] = tcu::Vec4(((float)majorCoord + 0.5f) / float(m_numStripes), ((float)minorCoord + 0.5f) / float(m_numStripes), 0.0f, 1.0f);
2788 void PointRenderCase::getAttributeData (std::vector<tcu::Vec4>& data) const
3315 tcu::Vec4 bboxMin;
3316 tcu::Vec4 bboxMax;
3411 "in highp vec4 a_position;\n"
3412 "out highp vec4 v_position;\n"
3419 "in mediump vec4 v_position;\n"
3420 "layout(location=0) out mediump vec4 dEQP_FragColor;\n"
3423 " const mediump vec4 green = vec4(0.0, 1.0, 0.0, 1.0);\n"
3424 " const mediump vec4 yellow = vec4(1.0, 1.0, 0.0, 1.0);\n"
3438 static const tcu::Vec4 s_quadCoords[] =
3440 tcu::Vec4(-1.0f, -1.0f, 0.0f, 1.0f),
3441 tcu::Vec4(-1.0f, 1.0f, 0.0f, 1.0f),
3442 tcu::Vec4( 1.0f, -1.0f, 0.0f, 1.0f),
3443 tcu::Vec4( 1.0f, 1.0f, 0.0f, 1.0f),
3698 void generateAttributeData (std::vector<tcu::Vec4>& data) const;
3710 tcu::Vec4 color1;
3711 tcu::Vec4 color2;
3801 std::vector<tcu::Vec4> data;
3807 gl.bufferData(GL_ARRAY_BUFFER, (int)(sizeof(tcu::Vec4) * data.size()), &data[0], GL_STATIC_DRAW);
3820 m_layers[layerNdx].color1 = (layerNdx == 0) ? (tcu::Vec4(0.0f, 1.0f, 0.0f, 1.0f)) : (tcu::Vec4(0.0f, 0.0f, 1.0f, 1.0f));
3821 m_layers[layerNdx].color2 = (layerNdx == 0) ? (tcu::Vec4(1.0f, 1.0f, 0.0f, 1.0f)) : (tcu::Vec4(1.0f, 0.0f, 1.0f, 1.0f));
3909 "in highp vec4 a_position;\n"
3910 "in highp vec4 a_colorMix;\n"
3911 "out highp vec4 vtx_colorMix;\n";
3929 " gl_Position = vec4(a_position.xy, dummyZ, 1.0);\n"
3933 " gl_Position = vec4(a_position.xy, writtenZ * u_depthScale + u_depthBias, 1.0);\n";
3948 "in mediump vec4 " << colorMixName << ";\n";
3953 buf << "layout(location = 0) out mediump vec4 o_color;\n"
3954 "uniform highp vec4 u_color1;\n"
3955 "uniform highp vec4 u_color2;\n"
3981 "in highp vec4 vtx_colorMix[];\n"
3982 "out highp vec4 tess_ctrl_colorMix[];\n"
3995 " highp vec4 minBound = vec4(min(min(vec3(gl_in[0].gl_Position.xy, gl_in[0].gl_Position.w * u_depthScale + u_depthBias),\n"
3998 " highp vec4 maxBound = vec4(max(max(vec3(gl_in[0].gl_Position.xy, gl_in[0].gl_Position.w * u_depthScale + u_depthBias),\n"
4008 " ${PRIM_GL_BOUNDING_BOX}[0] = minBound - vec4(0.0, 0.0, nedPadding, 0.0);\n"
4009 " ${PRIM_GL_BOUNDING_BOX}[1] = maxBound + vec4(0.0, 0.0, posPadding, 0.0);\n";
4025 "in highp vec4 tess_ctrl_colorMix[];\n"
4026 "out highp vec4 tess_eval_colorMix;\n";
4038 " highp vec4 tessellatedPos = gl_TessCoord.x * gl_in[0].gl_Position + gl_TessCoord.y * gl_in[1].gl_Position + gl_TessCoord.z * gl_in[2].gl_Position;\n";
4043 " gl_Position = vec4(tessellatedPos.xy, dummyZ, 1.0);\n"
4047 " gl_Position = vec4(tessellatedPos.xy, writtenZ * u_depthScale + u_depthBias, 1.0);\n";
4055 void DepthDrawCase::generateAttributeData (std::vector<tcu::Vec4>& data) const
4057 const tcu::Vec4 color1 (0.0f, 0.0f, 0.0f, 0.0f); // mix weights
4058 const tcu::Vec4 color2 (1.0f, 1.0f, 1.0f, 1.0f);
4073 const tcu::Vec4& cellColor = ((cellX+cellY)%2 == 0) ? (color1) : (color2);
4075 data[ndx * 6 * 2 + 0] = tcu::Vec4(float(cellX+0) / float(m_gridSize) * 2.0f - 1.0f, float(cellY+0) / float(m_gridSize) * 2.0f - 1.0f, 0.0f, 0.0f); data[ndx * 6 * 2 + 1] = cellColor;
4076 data[ndx * 6 * 2 + 2] = tcu::Vec4(float(cellX+1) / float(m_gridSize) * 2.0f - 1.0f, float(cellY+1) / float(m_gridSize) * 2.0f - 1.0f, 0.0f, 0.0f); data[ndx * 6 * 2 + 3] = cellColor;
4077 data[ndx * 6 * 2 + 4] = tcu::Vec4(float(cellX+0) / float(m_gridSize) * 2.0f - 1.0f, float(cellY+1) / float(m_gridSize) * 2.0f - 1.0f, 0.0f, 0.0f); data[ndx * 6 * 2 + 5] = cellColor;
4078 data[ndx * 6 * 2 + 6] = tcu::Vec4(float(cellX+0) / float(m_gridSize) * 2.0f - 1.0f, float(cellY+0) / float(m_gridSize) * 2.0f - 1.0f, 0.0f, 0.0f); data[ndx * 6 * 2 + 7] = cellColor;
4079 data[ndx * 6 * 2 + 8] = tcu::Vec4(float(cellX+1) / float(m_gridSize) * 2.0f - 1.0f, float(cellY+0) / float(m_gridSize) * 2.0f - 1.0f, 0.0f, 0.0f); data[ndx * 6 * 2 + 9] = cellColor;
4080 data[ndx * 6 * 2 + 10] = tcu::Vec4(float(cellX+1) / float(m_gridSize) * 2.0f - 1.0f, float(cellY+1) / float(m_gridSize) * 2.0f - 1.0f, 0.0f, 0.0f); data[ndx * 6 * 2 + 11] = cellColor;
4182 std::vector<tcu::Vec4> m_objectVertices;
4240 m_objectVertices = std::vector<tcu::Vec4>();
4316 m_objectVertices.push_back(tcu::Vec4(posX, posY, posZ, posW));
4321 gl.bufferData(GL_ARRAY_BUFFER, (int)(m_objectVertices.size() * sizeof(tcu::Vec4)), &m_objectVertices[0], GL_STATIC_DRAW);
4364 const tcu::Vec4 yellow (1.0f, 1.0f, 0.0f, 1.0f);
4365 const tcu::Vec4 green (0.0f, 1.0f, 0.0f, 1.0f);
4392 gl.vertexAttribPointer(positionAttribLoc, 4, GL_FLOAT, GL_FALSE, (int)sizeof(tcu::Vec4), DE_NULL);
4402 tcu::Vec4 bboxMin;
4403 tcu::Vec4 bboxMax;
4407 bboxMin = tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f);
4408 bboxMax = tcu::Vec4(-1.0f, -1.0f, -1.0f, -1.0f);
4442 const tcu::Vec4 color = tcu::mix(green, yellow, rnd.getFloat() * 0.4f); // greenish
4535 "in highp vec4 a_position;\n"
4536 "out highp vec4 v_vertex_color;\n"
4542 " v_vertex_color = vec4(redComponent, 1.0, 0.0, 1.0);\n"
4546 "in mediump vec4 v_color;\n"
4547 "layout(location = 0) out mediump vec4 o_color;\n"
4558 "in highp vec4 v_tess_eval_color[];\n"
4559 "out highp vec4 v_color;\n"
4592 "in highp vec4 v_vertex_color[];\n"
4593 "out highp vec4 v_tess_eval_color[];\n"
4782 std::vector<tcu::Vec4> data (gridSize * gridSize * 2 * 3);
4801 data[ndx * 3 + 0] = tcu::Vec4(float(cellX+0) / float(gridSize), (float(cellY+0) / float(gridSize)) * 2.0f - 1.0f, 0.0f, 1.0f);
4802 data[ndx * 3 + 1] = tcu::Vec4(float(cellX+1) / float(gridSize), (float(cellY+1) / float(gridSize)) * 2.0f - 1.0f, 0.0f, 1.0f);
4803 data[ndx * 3 + 2] = tcu::Vec4(float(cellX+0) / float(gridSize), (float(cellY+1) / float(gridSize)) * 2.0f - 1.0f, 0.0f, 1.0f);
4807 data[ndx * 3 + 0] = tcu::Vec4(float(cellX+0) / float(gridSize), (float(cellY+0) / float(gridSize)) * 2.0f - 1.0f, 0.0f, 1.0f);
4808 data[ndx * 3 + 1] = tcu::Vec4(float(cellX+1) / float(gridSize), (float(cellY+0) / float(gridSize)) * 2.0f - 1.0f, 0.0f, 1.0f);
4809 data[ndx * 3 + 2] = tcu::Vec4(float(cellX+1) / float(gridSize), (float(cellY+1) / float(gridSize)) * 2.0f - 1.0f, 0.0f, 1.0f);
4815 gl.bufferData(GL_ARRAY_BUFFER, (int)(data.size() * sizeof(tcu::Vec4)), &data[0], GL_STATIC_DRAW);
4896 "in highp vec4 v_vertex_color[];\n"
4897 "out highp vec4 v_tess_eval_color[];\n"