Lines Matching defs:attributes

73 bool hasAttributeAliasing (const vector<Attribute>& attributes, const map<string, deUint32>& bindings)
77 for (int attribNdx = 0; attribNdx < (int)attributes.size(); attribNdx++)
79 const deInt32 location = getBoundLocation(bindings, attributes[attribNdx].getName());
80 const deUint32 size = attributes[attribNdx].getType().getLocationSize();
111 string generateAttributeDefinitions (const vector<Attribute>& attributes)
115 for (vector<Attribute>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter)
129 string generateConditionUniformDefinitions (const vector<Attribute>& attributes)
134 for (vector<Attribute>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter)
173 string generateOutputCode (const vector<Attribute>& attributes)
177 for (vector<Attribute>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter)
227 string generateVertexShaderTemplate (const vector<Attribute>& attributes)
234 src << generateAttributeDefinitions(attributes)
236 << generateConditionUniformDefinitions(attributes)
244 src << generateOutputCode(attributes);
254 string createVertexShaderSource (glu::RenderContext& renderCtx, const vector<Attribute>& attributes, bool attributeAliasing)
260 const tcu::StringTemplate vertexShaderTemplate(generateVertexShaderTemplate(attributes));
412 pair<deUint32, deUint32> createAndAttachShaders (TestLog& log, glu::RenderContext& renderCtx, deUint32 program, const vector<Attribute>& attributes, bool attributeAliasing)
415 const string vertexShaderSource = createVertexShaderSource(renderCtx, attributes, attributeAliasing);
483 void logAttributes (TestLog& log, const vector<Attribute>& attributes)
485 for (int attribNdx = 0; attribNdx < (int)attributes.size(); attribNdx++)
487 const Attribute& attrib = attributes[attribNdx];
497 bool checkActiveAttribQuery (TestLog& log, const glw::Functions& gl, deUint32 program, const vector<Attribute>& attributes)
531 for (int attribNdx = 0; attribNdx < (int)attributes.size(); attribNdx++)
533 const Attribute& attrib = attributes[attribNdx];
579 for (int attribNdx = 0; attribNdx < (int)attributes.size(); attribNdx++)
581 const Attribute& attrib = attributes[attribNdx];
602 bool checkAttribLocationQuery (TestLog& log, const glw::Functions& gl, deUint32 program, const vector<Attribute>& attributes, const map<string, deUint32>& bindings)
606 for (int attribNdx = 0; attribNdx < (int)attributes.size(); attribNdx++)
608 const Attribute& attrib = attributes[attribNdx];
631 bool checkQuery (TestLog& log, const glw::Functions& gl, deUint32 program, const vector<Attribute>& attributes, const map<string, deUint32>& bindings)
633 bool isOk = checkActiveAttribQuery(log, gl, program, attributes);
635 if (!checkAttribLocationQuery(log, gl, program, attributes, bindings))
688 const vector<Attribute>& attributes,
714 logAttributes(testCtx.getLog(), attributes);
725 shaders = createAndAttachShaders(log, renderCtx, program, attributes, hasAttributeAliasing(attributes, activeBindings));
738 if (!checkQuery(log, gl, program, attributes, activeBindings))
745 if (!checkQuery(log, gl, program, attributes, activeBindings))
761 if (!checkQuery(log, gl, program, attributes, activeBindings))
819 vector<Attribute> attributes;
822 attributes.push_back(Attribute(m_type, "a_0", Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
825 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
846 vector<Attribute> attributes;
854 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx), Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
859 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
881 vector<Attribute> attributes;
884 attributes.push_back(Attribute(m_type, "a_0", Attribute::LOC_UNDEF, Cond("A", true), m_arraySize));
885 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_1", Attribute::LOC_UNDEF, Cond("A", false)));
889 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
910 vector<Attribute> attributes;
918 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx), Attribute::LOC_UNDEF, Cond("A", true)));
921 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx + maxAttributes), Attribute::LOC_UNDEF, Cond("A", false)));
926 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
948 vector<Attribute> attributes;
952 attributes.push_back(Attribute(vec4, "a_0"));
955 attributes.push_back(Attribute(m_type, "a_1", Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
960 attributes.push_back(Attribute(vec4, "a_" + de::toString(ndx)));
966 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
988 vector<Attribute> attributes;
996 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx), Attribute::LOC_UNDEF, Cond("A")));
999 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx + maxAttributes), Attribute::LOC_UNDEF, Cond::COND_NEVER));
1004 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
1019 vector<Attribute> attributes;
1022 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0"));
1025 runTest(m_testCtx, m_renderCtx, attributes, bindings, noBindings, noBindings, false);
1040 vector<Attribute> attributes;
1043 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0"));
1046 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
1061 vector<Attribute> attributes;
1064 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0"));
1067 runTest(m_testCtx, m_renderCtx, attributes, noBindings, noBindings, bindings, false);
1086 vector<Attribute> attributes;
1088 attributes.push_back(Attribute(m_type, "a_0", 3, Cond::COND_ALWAYS, m_arraySize));
1090 runTest(m_testCtx, m_renderCtx, attributes, noBindings, noBindings, noBindings, false);
1111 vector<Attribute> attributes;
1118 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx), loc, Cond::COND_ALWAYS, m_arraySize));
1122 runTest(m_testCtx, m_renderCtx, attributes, noBindings, noBindings, noBindings, false);
1144 vector<Attribute> attributes;
1147 attributes.push_back(Attribute(vec4, "a_0", 0));
1149 attributes.push_back(Attribute(m_type, "a_1", Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
1154 attributes.push_back(Attribute(vec4, "a_" + de::toString(ndx), loc));
1158 runTest(m_testCtx, m_renderCtx, attributes, noBindings, noBindings, noBindings, false);
1178 vector<Attribute> attributes;
1180 attributes.push_back(Attribute(m_type, "a_0", 3, Cond::COND_ALWAYS, m_arraySize));
1183 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
1205 vector<Attribute> attributes;
1213 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx), loc, Cond::COND_ALWAYS, m_arraySize));
1216 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx), Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
1223 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
1246 vector<Attribute> attributes;
1249 attributes.push_back(Attribute(vec4, "a_0"));
1252 attributes.push_back(Attribute(m_type, "a_1", Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
1258 attributes.push_back(Attribute(vec4, "a_" + de::toString(ndx), loc));
1261 attributes.push_back(Attribute(vec4, "a_" + de::toString(ndx), loc));
1268 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
1284 vector<Attribute> attributes;
1288 attributes.push_back(Attribute(vec4, "a_0"));
1289 attributes.push_back(Attribute(vec4, "a_1"));
1296 runTest(m_testCtx, m_renderCtx, attributes, noBindings, preLinkBindings, postLinkBindings, true);
1318 vector<Attribute> attributes;
1323 attributes.push_back(Attribute(vec4, "a_0"));
1326 attributes.push_back(Attribute(m_type, "a_1", Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
1331 attributes.push_back(Attribute(vec4, "a_" + de::toString(ndx)));
1339 runTest(m_testCtx, m_renderCtx, attributes, noBindings, preLinkBindings, postLinkBindings, true);
1363 vector<Attribute> attributes;
1366 attributes.push_back(Attribute(vec4, "a_0"));
1369 attributes.push_back(Attribute(m_type, "a_1", Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
1375 attributes.push_back(Attribute(vec4, "a_" + de::toString(ndx), loc));
1378 attributes.push_back(Attribute(vec4, "a_" + de::toString(ndx)));
1387 runTest(m_testCtx, m_renderCtx, attributes, noBindings, preLinkBindings, postLinkBindings, true);
1405 vector<Attribute> attributes;
1408 attributes.push_back(Attribute(vec4, "a_0"));
1414 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false, true, reattachAttributes);
1429 vector<Attribute> attributes;
1432 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0", 1));
1435 runTest(m_testCtx, m_renderCtx, attributes, bindings, noBindings, noBindings, false);
1450 vector<Attribute> attributes;
1453 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0", 1));
1456 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false);
1471 vector<Attribute> attributes;
1474 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0", 1));
1477 runTest(m_testCtx, m_renderCtx, attributes, noBindings, noBindings, bindings, false);
1495 vector<Attribute> attributes;
1498 attributes.push_back(Attribute(vec4, "a_0", 2));
1504 runTest(m_testCtx, m_renderCtx, attributes, noBindings, bindings, noBindings, false, true, reattachAttributes);
1520 vector<Attribute> attributes;
1524 attributes.push_back(Attribute(vec4, "a_0", 1));
1525 attributes.push_back(Attribute(vec4, "a_1"));
1532 runTest(m_testCtx, m_renderCtx, attributes, noBindings, preLinkBindings, postLinkBindings, true);