Lines Matching full:vec4
69 "in highp vec4 a_position;\n"
70 "in highp vec4 a_color;\n"
71 "out highp vec4 v_geom_FragColor;\n"
79 "layout(location = 0) out mediump vec4 fragColor;\n"
80 "in mediump vec4 v_frag_FragColor;\n"
85 static const char* const s_expandShaderSourceGeometryBody = "in highp vec4 v_geom_FragColor[];\n"
86 "out highp vec4 v_frag_FragColor;\n"
90 " const highp vec4 offset0 = vec4(-0.07, -0.01, 0.0, 0.0);\n"
91 " const highp vec4 offset1 = vec4( 0.03, -0.03, 0.0, 0.0);\n"
92 " const highp vec4 offset2 = vec4(-0.01, 0.08, 0.0, 0.0);\n"
93 " highp vec4 yoffset = float(gl_PrimitiveIDIn) * vec4(0.02, 0.1, 0.0, 0.0);\n"
235 const tcu::Vec4 offsets[] =
237 tcu::Vec4(-0.07f, -0.01f, 0.0f, 0.0f),
238 tcu::Vec4( 0.03f, -0.03f, 0.0f, 0.0f),
239 tcu::Vec4(-0.01f, 0.08f, 0.0f, 0.0f)
241 const tcu::Vec4 yoffset = float(packets[ndx].primitiveIDIn) * tcu::Vec4(0.02f, 0.1f, 0, 0);
342 const tcu::Vec4 positions[] =
344 tcu::Vec4(-0.5f, 0.5f, 0.0f, 0.0f),
345 tcu::Vec4( 0.0f, 0.1f, 0.0f, 0.0f),
346 tcu::Vec4( 0.5f, 0.5f, 0.0f, 0.0f),
347 tcu::Vec4( 0.7f, -0.2f, 0.0f, 0.0f),
348 tcu::Vec4( 0.2f, 0.2f, 0.0f, 0.0f),
349 tcu::Vec4( 0.4f, -0.3f, 0.0f, 0.0f),
379 str << "in highp vec4 v_geom_FragColor[];\n"
380 "out highp vec4 v_frag_FragColor;\n"
384 " const highp vec4 position0 = vec4(-0.5, 0.5, 0.0, 0.0);\n"
385 " const highp vec4 position1 = vec4( 0.0, 0.1, 0.0, 0.0);\n"
386 " const highp vec4 position2 = vec4( 0.5, 0.5, 0.0, 0.0);\n"
387 " const highp vec4 position3 = vec4( 0.7, -0.2, 0.0, 0.0);\n"
388 " const highp vec4 position4 = vec4( 0.2, 0.2, 0.0, 0.0);\n"
389 " const highp vec4 position5 = vec4( 0.4, -0.3, 0.0, 0.0);\n"
449 const tcu::Vec4 color = rr::readVertexAttribFloat(inputs[1], packets[ndx]->instanceNdx, packets[ndx]->vertexNdx);
482 rr::writeFragmentOutput(context, packetNdx, fragNdx, 0, tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f));
506 const tcu::Vec4 vertexOffset(-0.2f, -0.2f, 0, 0);
511 const tcu::Vec4 inputColor = tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f);
535 output.EmitVertex(tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f) + vertexOffset, 1.0f, outputs, packets[ndx].primitiveIDIn);
536 output.EmitVertex(tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f) + vertexOffset, 1.0f, outputs, packets[ndx].primitiveIDIn);
537 output.EmitVertex(tcu::Vec4(1.0f, 1.0f, 0.0f, 1.0f) + vertexOffset, 1.0f, outputs, packets[ndx].primitiveIDIn);
548 tcu::Vec4 inputColor;
555 inputColor = tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f);
620 "in highp vec4 a_position;\n"
621 "in highp vec4 a_color;\n";
633 vertexSource << "out highp vec4 v_geom_" << i << ";\n";
662 "layout(location = 0) out mediump vec4 fragColor;\n";
665 fragmentSource << "in mediump vec4 v_frag_" << i << ";\n";
672 fragmentSource << "\tfragColor = vec4(1.0, 0.0, 0.0, 1.0);\n";
696 geometrySource << "in highp vec4 v_geom_" << i << "[];\n";
698 geometrySource << "out highp vec4 v_frag_" << i << ";\n";
702 "\thighp vec4 offset = vec4(-0.2, -0.2, 0.0, 0.0);\n"
703 "\thighp vec4 inputColor;\n\n";
710 geometrySource << "\tinputColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
711 "\tgl_Position = vec4(" << ((vertexNdx==0) ? ("0.0, 0.0") : ((vertexNdx==1) ? ("1.0, 0.0") : ("1.0, 1.0"))) << ", 0.0, 1.0) + offset;\n"
719 geometrySource << "\tinputColor = vec4(1.0, 0.0, 0.0, 1.0);\n";
836 output.EmitVertex(vertex->position + tcu::Vec4(2 * ndx * colWidth, 0.0, 0.0, 0.0), vertex->pointSize, vertex->outputs, packets[packetNdx].primitiveIDIn);
837 output.EmitVertex(vertex->position + tcu::Vec4(2 * ndx * colWidth, rowHeight, 0.0, 0.0), vertex->pointSize, vertex->outputs, packets[packetNdx].primitiveIDIn);
857 str << "in highp vec4 v_geom_FragColor[];\n"
858 "out highp vec4 v_frag_FragColor;\n"
875 " gl_Position = gl_in[0].gl_Position + vec4(float(ndx) * 2.0 * colWidth, 0.0, 0.0, 0.0);\n"
879 " gl_Position = gl_in[0].gl_Position + vec4(float(ndx) * 2.0 * colWidth, rowHeight, 0.0, 0.0);\n"
950 const tcu::Vec4 red = tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f);
951 const tcu::Vec4 green = tcu::Vec4(0.0f, 1.0f, 0.0f, 1.0f);
952 const tcu::Vec4 blue = tcu::Vec4(0.0f, 0.0f, 1.0f, 1.0f);
953 const tcu::Vec4 yellow = tcu::Vec4(1.0f, 1.0f, 0.0f, 1.0f);
954 const tcu::Vec4 colors[4] = { yellow, red, green, blue };
964 const tcu::Vec4 color = colors[context.primitiveID % 4];
979 const tcu::Vec4 red = tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f);
980 const tcu::Vec4 green = tcu::Vec4(0.0f, 1.0f, 0.0f, 1.0f);
981 const tcu::Vec4 blue = tcu::Vec4(0.0f, 0.0f, 1.0f, 1.0f);
982 const tcu::Vec4 yellow = tcu::Vec4(1.0f, 1.0f, 0.0f, 1.0f);
983 const tcu::Vec4 colors[4] = { red, green, blue, yellow };
994 fragColor = tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f);
1002 output.EmitVertex(vertex->position + tcu::Vec4(0.05f, 0.0f, 0.0f, 0.0f), 1.0f, &fragColor, packets[packetNdx].primitiveIDIn);
1003 output.EmitVertex(vertex->position - tcu::Vec4(0.05f, 0.0f, 0.0f, 0.0f), 1.0f, &fragColor, packets[packetNdx].primitiveIDIn);
1004 output.EmitVertex(vertex->position + tcu::Vec4(0.0f, 0.05f, 0.0f, 0.0f), 1.0f, &fragColor, packets[packetNdx].primitiveIDIn);
1010 output.EmitVertex(vertex->position + tcu::Vec4(0.05f, 0.0f, 0.0f, 0.0f), 1.0f, vertex->outputs, primitiveID);
1011 output.EmitVertex(vertex->position - tcu::Vec4(0.05f, 0.0f, 0.0f, 0.0f), 1.0f, vertex->outputs, primitiveID);
1012 output.EmitVertex(vertex->position + tcu::Vec4(0.0f, 0.05f, 0.0f, 0.0f), 1.0f, vertex->outputs, primitiveID);
1052 buf << "in highp vec4 v_geom_pointSize[];\n";
1054 buf << "in highp vec4 v_geom_primitiveID[];\n";
1057 buf << "out highp vec4 v_frag_FragColor;\n";
1067 " v_frag_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n"
1072 buf << " const highp vec4 red = vec4(1.0, 0.0, 0.0, 1.0);\n"
1073 " const highp vec4 green = vec4(0.0, 1.0, 0.0, 1.0);\n"
1074 " const highp vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);\n"
1075 " const highp vec4 yellow = vec4(1.0, 1.0, 0.0, 1.0);\n"
1076 " const highp vec4 colors[4] = vec4[4](red, green, blue, yellow);\n"
1078 " gl_Position = gl_in[0].gl_Position + vec4(0.05, 0.0, 0.0, 0.0);\n"
1082 " gl_Position = gl_in[0].gl_Position - vec4(0.05, 0.0, 0.0, 0.0);\n"
1086 " gl_Position = gl_in[0].gl_Position + vec4(0.0, 0.05, 0.0, 0.0);\n"
1092 buf << " gl_Position = gl_in[0].gl_Position + vec4(0.05, 0.0, 0.0, 0.0);\n"
1096 " gl_Position = gl_in[0].gl_Position - vec4(0.05, 0.0, 0.0, 0.0);\n"
1100 " gl_Position = gl_in[0].gl_Position + vec4(0.0, 0.05, 0.0, 0.0);\n"
1118 "in highp vec4 a_position;\n";
1121 buf << "in highp vec4 a_pointSize;\n";
1123 buf << "in highp vec4 a_primitiveID;\n";
1126 buf << "out highp vec4 v_geom_pointSize;\n";
1128 buf << "out highp vec4 v_geom_primitiveID;\n";
1153 "layout(location = 0) out mediump vec4 fragColor;\n"
1156 " const mediump vec4 red = vec4(1.0, 0.0, 0.0, 1.0);\n"
1157 " const mediump vec4 green = vec4(0.0, 1.0, 0.0, 1.0);\n"
1158 " const mediump vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);\n"
1159 " const mediump vec4 yellow = vec4(1.0, 1.0, 0.0, 1.0);\n"
1160 " const mediump vec4 colors[4] = vec4[4](yellow, red, green, blue);\n"
1254 const tcu::Vec4 red = tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f);
1255 const tcu::Vec4 green = tcu::Vec4(0.0f, 1.0f, 0.0f, 1.0f);
1256 const tcu::Vec4 blue = tcu::Vec4(0.0f, 0.0f, 1.0f, 1.0f);
1257 const tcu::Vec4 yellow = tcu::Vec4(1.0f, 1.0f, 0.0f, 1.0f);
1258 const tcu::Vec4 colors[4] = { red, green, blue, yellow };
1264 tcu::Vec4 color = tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f);
1269 color = tcu::Vec4((emitCount < 10) ? (0.0f) : (1.0f), (emitCount > 10) ? (0.0f) : (1.0f), 1.0f, 1.0f);
1285 const tcu::Vec4 texColor = m_sampler.sampler.tex2D->sample(texCoord.x(), texCoord.y(), 0.0f);
1308 const tcu::Vec4 basePosition = (m_instanced) ?
1309 (vertex->position + tcu::Vec4(deFloatCos(float(invocationID)), deFloatSin(float(invocationID)), 0.0f, 0.0f) * 0.5f) :
1311 const tcu::Vec4 position0 = basePosition + tcu::Vec4(deFloatCos(angle), deFloatSin(angle), 0.0f, 0.0f) * 0.15f;
1312 const tcu::Vec4 position1 = basePosition + tcu::Vec4(deFloatCos(angle), -deFloatSin(angle), 0.0f, 0.0f) * 0.15f;
1348 buf << "in highp vec4 v_geom_emitCount[];\n";
1350 buf << "in highp vec4 v_geom_vertexNdx[];\n"
1353 buf << "in highp vec4 v_geom_vertexNdx[];\n"
1356 buf << "out highp vec4 v_frag_FragColor;\n"
1365 buf << " highp vec4 attrEmitCounts = v_geom_emitCount[0];\n"
1377 " highp vec4 texColor = texture(u_sampler, texCoord);\n"
1396 buf << " highp vec4 color = vec4((emitCount < 10) ? (0.0) : (1.0), (emitCount > 10) ? (0.0) : (1.0), 1.0, 1.0);\n";
1401 " const highp vec4 red = vec4(1.0, 0.0, 0.0, 1.0);\n"
1402 " const highp vec4 green = vec4(0.0, 1.0, 0.0, 1.0);\n"
1403 " const highp vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);\n"
1404 " const highp vec4 yellow = vec4(1.0, 1.0, 0.0, 1.0);\n"
1405 " const highp vec4 colors[4] = vec4[4](red, green, blue, yellow);\n"
1406 " highp vec4 color = colors[int(primitiveNdx)];\n";
1412 " highp vec4 basePos = " << ((instanced) ? ("gl_in[0].gl_Position + 0.5 * vec4(cos(float(gl_InvocationID)), sin(float(gl_InvocationID)), 0.0, 0.0)") : ("gl_in[0].gl_Position")) << ";\n"
1416 " gl_Position = basePos + vec4(cos(angle), sin(angle), 0.0, 0.0) * 0.15;\n"
1419 " gl_Position = basePos + vec4(cos(angle), -sin(angle), 0.0, 0.0) * 0.15;\n"
1433 "in highp vec4 a_position;\n";
1437 buf << "in highp vec4 a_emitCount;\n";
1438 buf << "out highp vec4 v_geom_emitCount;\n";
1442 buf << "in highp vec4 a_vertexNdx;\n";
1443 buf << "out highp vec4 v_geom_vertexNdx;\n";
1533 const tcu::Vec4 position0 = vertex->position + tcu::Vec4(deFloatCos(l_angle) * (l_radius - 0.1f), deFloatSin(l_angle) * (l_radius - 0.1f), 0.0f, 0.0f);
1534 const tcu::Vec4 position1 = vertex->position + tcu::Vec4(deFloatCos(l_angle+0.1f) * l_radius, deFloatSin(l_angle+0.1f) * l_radius, 0.0f, 0.0f);
1535 const tcu::Vec4 position2 = vertex->position + tcu::Vec4(deFloatCos(l_angle-0.1f) * l_radius, deFloatSin(l_angle-0.1f) * l_radius, 0.0f, 0.0f);
1540 tipColor = tcu::Vec4(1.0, 1.0, 0.0, 1.0) * packets[packetNdx].vertices[0]->outputs[0].get<float>();
1541 baseColor = tcu::Vec4(1.0, 0.0, 0.0, 1.0) * packets[packetNdx].vertices[0]->outputs[0].get<float>();
1550 const tcu::Vec4 color = tcu::Vec4(float(invocationID % 2), (((invocationID / 2) % 2) == 0) ? (1.0f) : (0.0f), 1.0f, 1.0f);
1551 const tcu::Vec4 basePosition = vertex->position + tcu::Vec4(deFloatCos(l_angle) * l_radius, deFloatSin(l_angle) * l_radius, 0.0f, 0.0f);
1561 output.EmitVertex(basePosition + tcu::Vec4(deFloatCos(subAngle) * 0.1f, deFloatSin(subAngle) * 0.1f, 0.0f, 0.0f), 0.0f, &outColor, packets[packetNdx].primitiveIDIn);
1562 output.EmitVertex(basePosition + tcu::Vec4(deFloatCos(subAngle) * 0.1f, deFloatSin(subAngle) * -0.1f, 0.0f, 0.0f), 0.0f, &outColor, packets[packetNdx].primitiveIDIn);
1566 output.EmitVertex(basePosition + tcu::Vec4(-0.1f, 0.0f, 0.0f, 0.0f), 0.0f, &outColor, packets[packetNdx].primitiveIDIn);
1583 "in highp vec4 v_geom_FragColor[];\n"
1584 "out highp vec4 v_frag_FragColor;\n"
1594 buf << " v_frag_FragColor = vec4(1.0, 1.0, 0.0, 1.0) * v_geom_FragColor[0];\n"
1595 " gl_Position = gl_in[0].gl_Position + vec4(cos(l_angle) * (l_radius - 0.1), sin(l_angle) * (l_radius - 0.1), 0.0, 0.0);\n"
1598 " v_frag_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * v_geom_FragColor[0];\n"
1599 " gl_Position = gl_in[0].gl_Position + vec4(cos(l_angle+0.1) * l_radius, sin(l_angle+0.1) * l_radius, 0.0, 0.0);\n"
1602 " v_frag_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * v_geom_FragColor[0];\n"
1603 " gl_Position = gl_in[0].gl_Position + vec4(cos(l_angle-0.1) * l_radius, sin(l_angle-0.1) * l_radius, 0.0, 0.0);\n"
1608 buf << " highp vec4 l_color = vec4(float(gl_InvocationID % 2), (((gl_InvocationID / 2) % 2) == 0) ? (1.0) : (0.0), 1.0, 1.0);\n"
1609 " highp vec4 basePosition = gl_in[0].gl_Position + vec4(cos(l_angle) * l_radius, sin(l_angle) * l_radius, 0.0, 0.0);\n"
1617 " gl_Position = basePosition + vec4(cos(sub_angle) * 0.1, sin(sub_angle) * 0.1, 0.0, 0.0);\n"
1621 " gl_Position = basePosition + vec4(cos(sub_angle) * 0.1, sin(sub_angle) * -0.1, 0.0, 0.0);\n"
1627 " gl_Position = basePosition + vec4(-0.1, 0.0, 0.0, 0.0);\n"
1699 rr::writeFragmentOutput(context, packetNdx, fragNdx, 0, tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f));
1709 const tcu::Vec4 basePosition = vertex->position;
1711 const tcu::Vec4 centerPosition = basePosition + tcu::Vec4(deFloatCos(phase), deFloatSin(phase), 0.0f, 0.0f) * 0.1f;
1713 output.EmitVertex(centerPosition + tcu::Vec4( 0.0f, -0.1f, 0.0f, 0.0f), 0.0f, DE_NULL, packets[packetNdx].primitiveIDIn);
1714 output.EmitVertex(centerPosition + tcu::Vec4(-0.05f, 0.0f, 0.0f, 0.0f), 0.0f, DE_NULL, packets[packetNdx].primitiveIDIn);
1715 output.EmitVertex(centerPosition + tcu::Vec4( 0.05f, 0.0f, 0.0f, 0.0f), 0.0f, DE_NULL, packets[packetNdx].primitiveIDIn);
1723 "in highp vec4 a_position;\n"
1724 "in highp vec4 a_offset;\n"
1734 "layout(location = 0) out mediump vec4 fragColor;\n"
1737 " fragColor = vec4(1.0, 1.0, 1.0, 1.0);\n"
1752 " highp vec4 basePosition = gl_in[0].gl_Position;\n"
1754 " highp vec4 centerPosition = basePosition + 0.1 * vec4(cos(phase), sin(phase), 0.0, 0.0);\n"
1756 " gl_Position = centerPosition + vec4( 0.00, -0.1, 0.0, 0.0);\n"
1758 " gl_Position = centerPosition + vec4(-0.05, 0.0, 0.0, 0.0);\n"
1760 " gl_Position = centerPosition + vec4( 0.05, 0.0, 0.0, 0.0);\n"
1813 std::vector<tcu::Vec4> m_vertexPosData;
1814 std::vector<tcu::Vec4> m_vertexAttrData;
1991 const tcu::Vec4 offset(-0.5f, -0.2f, 0.0f, 1.0f);
1994 m_vertexPosData[ 0] = tcu::Vec4( 0, 0, 0.0f, 0.0f) * scale + offset;
1995 m_vertexPosData[ 1] = tcu::Vec4(-1, -1, 0.0f, 0.0f) * scale + offset;
1996 m_vertexPosData[ 2] = tcu::Vec4( 0, -1, 0.0f, 0.0f) * scale + offset;
1997 m_vertexPosData[ 3] = tcu::Vec4( 1, 1, 0.0f, 0.0f) * scale + offset;
1998 m_vertexPosData[ 4] = tcu::Vec4( 1, 0, 0.0f, 0.0f) * scale + offset;
1999 m_vertexPosData[ 5] = tcu::Vec4( 0, -2, 0.0f, 0.0f) * scale + offset;
2000 m_vertexPosData[ 6] = tcu::Vec4( 1, -1, 0.0f, 0.0f) * scale + offset;
2001 m_vertexPosData[ 7] = tcu::Vec4( 2, 1, 0.0f, 0.0f) * scale + offset;
2002 m_vertexPosData[ 8] = tcu::Vec4( 2, 0, 0.0f, 0.0f) * scale + offset;
2003 m_vertexPosData[ 9] = tcu::Vec4( 1, -2, 0.0f, 0.0f) * scale + offset;
2004 m_vertexPosData[10] = tcu::Vec4( 2, -1, 0.0f, 0.0f) * scale + offset;
2005 m_vertexPosData[11] = tcu::Vec4( 3, 0, 0.0f, 0.0f) * scale + offset;
2010 m_vertexAttrData[i] = (i % 2 == 0) ? tcu::Vec4(1, 1, 1, 1) : tcu::Vec4(1, 0, 0, 1);
2034 ctx.bufferData(GL_ARRAY_BUFFER, m_vertexPosData.size() * sizeof(tcu::Vec4), &m_vertexPosData[0], GL_STATIC_DRAW);
2043 ctx.bufferData(GL_ARRAY_BUFFER, m_vertexAttrData.size() * sizeof(tcu::Vec4), &m_vertexAttrData[0], GL_STATIC_DRAW);
2183 m_vertexPosData[0] = tcu::Vec4(0, 0, 0, 1);
2186 m_vertexAttrData[0] = tcu::Vec4(1, 1, 1, 1);
2217 m_vertexPosData[0] = tcu::Vec4(0.5f, 0.0f, 0.0f, 1.0f);
2218 m_vertexPosData[1] = tcu::Vec4(0.0f, 0.5f, 0.0f, 1.0f);
2219 m_vertexPosData[2] = tcu::Vec4(0.1f, 0.0f, 0.0f, 1.0f);
2222 m_vertexAttrData[0] = tcu::Vec4(0.7f, 0.4f, 0.6f, 1.0f);
2223 m_vertexAttrData[1] = tcu::Vec4(0.9f, 0.2f, 0.5f, 1.0f);
2224 m_vertexAttrData[2] = tcu::Vec4(0.1f, 0.8f, 0.3f, 1.0f);
2306 const tcu::Vec4 vertexPosData (0, 0, 0, 1);
2317 Vec4), vertexPosData.m_data, GL_STATIC_DRAW);
2382 const int componentsPerVertex = 4 + 4; // vec4 pos, vec4 color
2457 m_vertexPosData[ndx] = tcu::Vec4(-1.0f, ((float)ndx) / m_primitiveCount * 2.0f - 1.0f, 0.0f, 1.0f);
2458 m_vertexAttrData[ndx] = (ndx % 2 == 0) ? tcu::Vec4(1, 1, 1, 1) : tcu::Vec4(1, 0, 0, 1);
2515 m_vertexPosData[0] = tcu::Vec4( 0.5f, 0.0f, 0.0f, 1.0f);
2516 m_vertexPosData[1] = tcu::Vec4( 0.0f, 0.5f, 0.0f, 1.0f);
2517 m_vertexPosData[2] = tcu::Vec4(-0.7f, -0.1f, 0.0f, 1.0f);
2518 m_vertexPosData[3] = tcu::Vec4(-0.1f, -0.7f, 0.0f, 1.0f);
2521 m_vertexAttrData[0] = tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f);
2522 m_vertexAttrData[1] = tcu::Vec4(1.0f, 0.0f, 0.0f, 0.0f);
2523 m_vertexAttrData[2] = tcu::Vec4(2.0f, 0.0f, 0.0f, 0.0f);
2524 m_vertexAttrData[3] = tcu::Vec4(3.0f, 0.0f, 0.0f, 0.0f);
2582 bool verifyImageSingleColoredRow (const tcu::Surface& layer, float rowWidthRatio, const tcu::Vec4& color, bool logging = true);
2895 " gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n"
2910 "in highp vec4 a_position;\n"
2938 "layout(location = 0) out mediump vec4 fragColor;\n"
2941 " fragColor = vec4(((gl_Layer % 2) == 1) ? 1.0 : 0.5,\n"
2975 "out highp vec4 v_frag_FragColor;\n"
2982 buf << " const highp vec4 white = vec4(1.0, 1.0, 1.0, 1.0);\n\n"
2983 " gl_Position = vec4(-1.0, -1.0, 0.0, 1.0);\n"
2986 " gl_Position = vec4(-1.0, 1.0, 0.0, 1.0);\n"
2989 " gl_Position = vec4( 0.0, -1.0, 0.0, 1.0);\n"
2992 " gl_Position = vec4( 0.0, 1.0, 0.0, 1.0);\n"
2998 buf << " const highp vec4 white = vec4(1.0, 1.0, 1.0, 1.0);\n\n"
2999 " gl_Position = vec4(-1.0, -1.0, 0.0, 1.0);\n"
3003 " gl_Position = vec4(-1.0, 1.0, 0.0, 1.0);\n"
3007 " gl_Position = vec4( 0.0, -1.0, 0.0, 1.0);\n"
3011 " gl_Position = vec4( 0.0, 1.0, 0.0, 1.0);\n"
3020 buf << " const highp vec4 white = vec4(1.0, 1.0, 1.0, 1.0);\n"
3021 " const highp vec4 red = vec4(1.0, 0.0, 0.0, 1.0);\n"
3022 " const highp vec4 green = vec4(0.0, 1.0, 0.0, 1.0);\n"
3023 " const highp vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);\n"
3024 " const highp vec4 yellow = vec4(1.0, 1.0, 0.0, 1.0);\n"
3025 " const highp vec4 magenta = vec4(1.0, 0.0, 1.0, 1.0);\n"
3026 " const highp vec4 colors[6] = vec4[6](white, red, green, blue, yellow, magenta);\n\n"
3029 " gl_Position = vec4(-1.0, -1.0, 0.0, 1.0);\n"
3033 " gl_Position = vec4(-1.0, 1.0, 0.0, 1.0);\n"
3037 " gl_Position = vec4( 0.0, -1.0, 0.0, 1.0);\n"
3041 " gl_Position = vec4( 0.0, 1.0, 0.0, 1.0);\n"
3052 buf << " const highp vec4 white = vec4(1.0, 1.0, 1.0, 1.0);\n\n"
3058 " gl_Position = vec4(posX, 1.0, 0.0, 1.0);\n"
3062 " gl_Position = vec4(posX, -1.0, 0.0, 1.0);\n"
3072 buf << " const highp vec4 white = vec4(1.0, 1.0, 1.0, 1.0);\n"
3073 " const highp vec4 red = vec4(1.0, 0.0, 0.0, 1.0);\n"
3074 " const highp vec4 green = vec4(0.0, 1.0, 0.0, 1.0);\n"
3075 " const highp vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);\n"
3076 " const highp vec4 yellow = vec4(1.0, 1.0, 0.0, 1.0);\n"
3077 " const highp vec4 magenta = vec4(1.0, 0.0, 1.0, 1.0);\n"
3078 " const highp vec4 colors[6] = vec4[6](white, red, green, blue, yellow, magenta);\n"
3080 " gl_Position = vec4(-1.0, -1.0, 0.0, 1.0);\n"
3084 " gl_Position = vec4(-1.0, 1.0, 0.0, 1.0);\n"
3088 " gl_Position = vec4( 0.0, -1.0, 0.0, 1.0);\n"
3092 " gl_Position = vec4( 0.0, 1.0, 0.0, 1.0);\n"
3100 buf << " const highp vec4 white = vec4(1.0, 1.0, 1.0, 1.0);\n"
3107 " gl_Position = vec4(-1.0, -1.0, 0.0, 1.0);\n"
3111 " gl_Position = vec4(-1.0, 1.0, 0.0, 1.0);\n"
3115 " gl_Position = vec4(aEnd, -1.0, 0.0, 1.0);\n"
3121 " gl_Position = vec4(-1.0, 1.0, 0.0, 1.0);\n"
3125 " gl_Position = vec4(bEnd, 1.0, 0.0, 1.0);\n"
3129 " gl_Position = vec4(bEnd, -1.0, 0.0, 1.0);\n"
3137 buf << " const highp vec4 white = vec4(1.0, 1.0, 1.0, 1.0);\n\n"
3138 " gl_Position = vec4(-1.0, -1.0, 0.0, 1.0);\n"
3142 " gl_Position = vec4(-1.0, 1.0, 0.0, 1.0);\n"
3146 " gl_Position = vec4( 0.0, -1.0, 0.0, 1.0);\n"
3151 " gl_Position = vec4(-1.0, 1.0, 0.0, 1.0);\n"
3155 " gl_Position = vec4( 0.0, -1.0, 0.0, 1.0);\n"
3159 " gl_Position = vec4( 0.0, 1.0, 0.0, 1.0);\n"
3179 buf << "layout(location = 0) out mediump vec4 fragColor;\n";
3213 " fragColor = vec4(1.0, 0.0, 1.0, 1.0);\n";
3264 static const tcu::Vec4 fullscreenQuad[4] =
3266 tcu::Vec4(-1.0f, -1.0f, 0.0f, 1.0f),
3267 tcu::Vec4(-1.0f, 1.0f, 0.0f, 1.0f),
3268 tcu::Vec4( 1.0f, -1.0f, 0.0f, 1.0f),
3269 tcu::Vec4( 1.0f, 1.0f, 0.0f, 1.0f),
3314 const tcu::Vec4 white = tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f);
3315 const tcu::Vec4 red = tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f);
3316 const tcu::Vec4 green = tcu::Vec4(0.0f, 1.0f, 0.0f, 1.0f);
3317 const tcu::Vec4 blue = tcu::Vec4(0.0f, 0.0f, 1.0f, 1.0f);
3318 const tcu::Vec4 yellow = tcu::Vec4(1.0f, 1.0f, 0.0f, 1.0f);
3319 const tcu::Vec4 magenta = tcu::Vec4(1.0f, 0.0f, 1.0f, 1.0f);
3320 const tcu::Vec4 colors[6] = { white, red, green, blue, yellow, magenta };
3351 const tcu::Vec4 layerColor((layerNdx % 2 == 1) ? (1.0f) : (0.5f),
3385 bool LayeredRenderCase::verifyImageSingleColoredRow (const tcu::Surface& layer, float rowWidthRatio, const tcu::Vec4& barColor, bool logging)
3483 const tcu::Vec4 white = tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f);
3630 const int componentsPerVertex = 4 + 4; // vec4 pos, vec4 color
3744 m_vertexPosData[0] = tcu::Vec4( 0.5f, 0.0f, 0.0f, 1.0f);
3745 m_vertexPosData[1] = tcu::Vec4( 0.0f, 0.5f, 0.0f, 1.0f);
3746 m_vertexPosData[2] = tcu::Vec4(-0.7f, -0.1f, 0.0f, 1.0f);
3747 m_vertexPosData[3] = tcu::Vec4(-0.1f, -0.7f, 0.0f, 1.0f);
3751 m_vertexAttrData[0] = tcu::Vec4(((VaryingOutputCountShader::EMIT_COUNT_VERTEX_0 == -1) ? ((float)m_maxEmitCount) : ((float)VaryingOutputCountShader::EMIT_COUNT_VERTEX_0)), 0.0f, 0.0f, 0.0f);
3752 m_vertexAttrData[1] = tcu::Vec4(((VaryingOutputCountShader::EMIT_COUNT_VERTEX_1 == -1) ? ((float)m_maxEmitCount) : ((float)VaryingOutputCountShader::EMIT_COUNT_VERTEX_1)), 0.0f, 0.0f, 0.0f);
3753 m_vertexAttrData[2] = tcu::Vec4(((VaryingOutputCountShader::EMIT_COUNT_VERTEX_2 == -1) ? ((float)m_maxEmitCount) : ((float)VaryingOutputCountShader::EMIT_COUNT_VERTEX_2)), 0.0f, 0.0f, 0.0f);
3754 m_vertexAttrData[3] = tcu::Vec4(((VaryingOutputCountShader::EMIT_COUNT_VERTEX_3 == -1) ? ((float)m_maxEmitCount) : ((float)VaryingOutputCountShader::EMIT_COUNT_VERTEX_3)), 0.0f, 0.0f, 0.0f);
3758 m_vertexAttrData[0] = tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f);
3759 m_vertexAttrData[1] = tcu::Vec4(1.0f, 0.0f, 0.0f, 0.0f);
3760 m_vertexAttrData[2] = tcu::Vec4(2.0f, 0.0f, 0.0f, 0.0f);
3761 m_vertexAttrData[3] = tcu::Vec4(3.0f, 0.0f, 0.0f, 0.0f);
3772 m_vertexPosData[0] = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
3784 m_vertexAttrData[0] = tcu::Vec4((float)emitCounts[0], (float)emitCounts[1], (float)emitCounts[2], (float)emitCounts[3]);
3789 m_vertexAttrData[0] = tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f);
3835 " gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n"
3838 "layout(location = 0) out mediump vec4 fragColor;\n"
3841 " fragColor = vec4(0.0, 0.0, 0.0, 0.0);\n"
3845 " gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n"
4268 m_vertexPosData[0] = tcu::Vec4(0.0f,-0.3f, 0.0f, 1.0f);
4269 m_vertexPosData[1] = tcu::Vec4(0.2f, 0.3f, 0.0f, 1.0f);
4272 m_vertexAttrData[0] = tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f);
4273 m_vertexAttrData[1] = tcu::Vec4(0.8f, 0.8f, 0.8f, 1.0f);
4342 m_vertexPosData[0] = tcu::Vec4( 0.0f, 0.0f, 0.0f, 1.0f);
4344 m_vertexAttrData[0] = tcu::Vec4( 0.5f, 0.0f, 0.0f, 0.0f);
4345 m_vertexAttrData[1] = tcu::Vec4( 0.0f, 0.5f, 0.0f, 0.0f);
4346 m_vertexAttrData[2] = tcu::Vec4(-0.7f, -0.1f, 0.0f, 0.0f);
4347 m_vertexAttrData[3] = tcu::Vec4(-0.1f, -0.7f, 0.0f, 0.0f);
4348 m_vertexAttrData[4] = tcu::Vec4(-0.8f, -0.7f, 0.0f, 0.0f);
4349 m_vertexAttrData[5] = tcu::Vec4(-0.9f, 0.6f, 0.0f, 0.0f);
4350 m_vertexAttrData[6] = tcu::Vec4(-0.8f, 0.3f, 0.0f, 0.0f);
4351 m_vertexAttrData[7] = tcu::Vec4(-0.1f, 0.1f, 0.0f, 0.0f);
4419 " gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n"
4422 "layout(location = 0) out mediump vec4 fragColor;\n"
4425 " fragColor = vec4(0.0, 0.0, 0.0, 0.0);\n"
4437 " gl_Position = vec4(0.0, 0.0, 0.0, fArray[0]);\n"
4551 static const tcu::Vec4 vertexData[8*2] =
4553 tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f), tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
4554 tcu::Vec4(0.1f, 0.0f, 0.0f, 1.0f), tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
4555 tcu::Vec4(0.2f, 0.0f, 0.0f, 1.0f), tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
4556 tcu::Vec4(0.3f, 0.0f, 0.0f, 1.0f), tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
4557 tcu::Vec4(0.4f, 0.0f, 0.0f, 1.0f), tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
4558 tcu::Vec4(0.5f, 0.0f, 0.0f, 1.0f), tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
4559 tcu::Vec4(0.6f, 0.0f, 0.0f, 1.0f), tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
4560 tcu::Vec4(0.7f, 0.0f, 0.0f, 1.0f), tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
4575 gl.vertexAttribPointer(positionLocation, 4, GL_FLOAT, GL_FALSE, 2 * sizeof(tcu::Vec4), DE_NULL);
4580 gl.vertexAttribPointer(oneLocation, 4, GL_FLOAT, GL_FALSE, 2 * sizeof(tcu::Vec4), (const tcu::Vec4*)DE_NULL + 1);
4624 "in highp vec4 a_position;\n"
4625 "in highp vec4 a_one;\n"
4626 "out highp vec4 v_one;\n"
4633 "layout(location = 0) out mediump vec4 fragColor;\n"
4636 " fragColor = vec4(1.0, 1.0, 1.0, 1.0);\n"
4647 "in highp vec4 v_one[];\n"
4653 " gl_Position = gl_in[0].gl_Position + vec4(0.0, 0.1, 0.0, 0.0);\n"
4655 " gl_Position = gl_in[0].gl_Position + vec4(0.1, 0.0, 0.0, 0.0);\n"
4657 " gl_Position = gl_in[0].gl_Position - vec4(0.1, 0.0, 0.0, 0.0);\n"
4668 " gl_Position = gl_in[0].gl_Position + vec4(0.0, 0.1, 0.0, 0.0);\n"
4670 " gl_Position = gl_in[0].gl_Position + vec4(0.1, 0.0, 0.0, 0.0);\n"
4672 " gl_Position = gl_in[0].gl_Position - vec4(0.0, 0.1, 0.0, 0.0);\n"
4674 " gl_Position = gl_in[0].gl_Position - vec4(0.1, 0.0, 0.0, 0.0);\n"
4684 " gl_Position = gl_in[0].gl_Position + vec4(0.0, 0.1, 0.0, 0.0);\n"
4686 " gl_Position = gl_in[0].gl_Position + vec4(0.1, 0.0, 0.0, 0.0);\n"
4692 " gl_Position = gl_in[0].gl_Position - vec4(0.1, 0.0, 0.0, 0.0);\n"
4703 " gl_Position = gl_in[0].gl_Position + vec4(0.0, 0.1, 0.0, 0.0);\n"
4705 " gl_Position = gl_in[0].gl_Position + vec4(0.1, 0.0, 0.0, 0.0);\n"
4707 " gl_Position = gl_in[0].gl_Position - vec4(0.1, 0.0, 0.0, 0.0);\n"
5034 "uniform highp vec4 u_position;\n"
5040 "layout(location = 0) out mediump vec4 fragColor;\n"
5043 " fragColor = vec4(1.0, 1.0, 1.0, 1.0);\n"
5049 "uniform highp vec4 u_offset;\n"
5229 static const tcu::Vec4 arrayData[] =
5231 tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f),
5232 tcu::Vec4(1.0f, 0.0f, 0.0f, 0.0f),
5233 tcu::Vec4(2.0f, 0.0f, 0.0f, 0.0f),
5234 tcu::Vec4(3.0f, 0.0f, 0.0f, 0.0f),
5236 static const tcu::Vec4 offsetData[] =
5238 tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f),
5239 tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f),
5240 tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f),
5241 tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f),
5453 "in highp vec4 a_position;\n"
5454 "in highp vec4 a_offset;\n"
5455 "out highp vec4 tf_value;\n"
5462 vec4 fragColor;\n"
5465 " fragColor = vec4(1.0);\n"
5571 static const tcu::Vec4 arrayData[] =
5573 tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
5574 tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
5575 tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
5576 tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f),
5599 const int feedbackCount = 5 * 4; // 5x vec4
5745 "in highp vec4 a_position;\n"
5751 "layout(location = 0) out mediump vec4 fragColor;\n"
5754 " fragColor = vec4(1.0);\n"