Lines Matching refs:Attribute

21  * \brief Attribute location tests
70 return (iter == bindings.end() ? (deInt32)Attribute::LOC_UNDEF : iter->second);
73 bool hasAttributeAliasing (const vector<Attribute>& attributes, const map<string, deUint32>& bindings)
82 if (location != Attribute::LOC_UNDEF)
111 string generateAttributeDefinitions (const vector<Attribute>& attributes)
115 for (vector<Attribute>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter)
117 if (iter->getLayoutLocation() != Attribute::LOC_UNDEF)
123 << (iter->getArraySize() != Attribute::NOT_ARRAY ? "[" + de::toString(iter->getArraySize()) + "]" : "") << ";\n";
129 string generateConditionUniformDefinitions (const vector<Attribute>& attributes)
134 for (vector<Attribute>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter)
146 string generateToVec4Expression (const Attribute& attrib, int id=-1)
148 const string variableName(attrib.getName() + (attrib.getArraySize() != Attribute::NOT_ARRAY ? "[" + de::toString(id) + "]" : ""));
173 string generateOutputCode (const vector<Attribute>& attributes)
177 for (vector<Attribute>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter)
185 if (iter->getArraySize() == Attribute::NOT_ARRAY)
197 if (iter->getArraySize() == Attribute::NOT_ARRAY)
211 if (iter->getArraySize() == Attribute::NOT_ARRAY)
227 string generateVertexShaderTemplate (const vector<Attribute>& attributes)
254 string createVertexShaderSource (glu::RenderContext& renderCtx, const vector<Attribute>& attributes, bool attributeAliasing)
412 pair<deUint32, deUint32> createAndAttachShaders (TestLog& log, glu::RenderContext& renderCtx, deUint32 program, const vector<Attribute>& attributes, bool attributeAliasing)
483 void logAttributes (TestLog& log, const vector<Attribute>& attributes)
487 const Attribute& attrib = attributes[attribNdx];
492 << (attrib.getLayoutLocation() != Attribute::LOC_UNDEF ? ", Layout location " + de::toString(attrib.getLayoutLocation()) : "")
497 bool checkActiveAttribQuery (TestLog& log, const glw::Functions& gl, deUint32 program, const vector<Attribute>& attributes)
533 const Attribute& attrib = attributes[attribNdx];
547 if (attrib.getArraySize() == Attribute::NOT_ARRAY)
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)
608 const Attribute& attrib = attributes[attribNdx];
609 const deInt32 expectedLocation = (attrib.getLayoutLocation() != Attribute::LOC_UNDEF ? attrib.getLayoutLocation() : getBoundLocation(bindings, attrib.getName()));
616 << (attrib.getCondition() != Cond::COND_NEVER && expectedLocation != Attribute::LOC_UNDEF ? ", expected " + de::toString(expectedLocation) : "")
622 if (attrib.getCondition() != Cond::COND_NEVER && expectedLocation != Attribute::LOC_UNDEF && expectedLocation != location)
625 isOk &= (attrib.getCondition() == Cond::COND_NEVER || expectedLocation == Attribute::LOC_UNDEF || expectedLocation == location);
631 bool checkQuery (TestLog& log, const glw::Functions& gl, deUint32 program, const vector<Attribute>& attributes, const map<string, deUint32>& bindings)
643 return type.getName() + (arraySize != Attribute::NOT_ARRAY ? "_array_" + de::toString(arraySize) : "");
671 Attribute::Attribute (const AttribType& type, const string& name, deInt32 layoutLocation, const Cond& cond, int arraySize)
688 const vector<Attribute>& attributes,
694 const vector<Attribute>& reattachAttributes = vector<Attribute>())
713 tcu::ScopedLogSection section(log, "Attributes", "Attribute information");
819 vector<Attribute> attributes;
822 attributes.push_back(Attribute(m_type, "a_0", Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
844 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
846 vector<Attribute> attributes;
854 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx), Attribute::LOC_UNDEF, Cond::COND_ALWAYS, m_arraySize));
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)));
908 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
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)));
946 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
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)));
986 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
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));
1019 vector<Attribute> attributes;
1022 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0"));
1040 vector<Attribute> attributes;
1043 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0"));
1061 vector<Attribute> attributes;
1064 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0"));
1086 vector<Attribute> attributes;
1088 attributes.push_back(Attribute(m_type, "a_0", 3, Cond::COND_ALWAYS, m_arraySize));
1109 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
1111 vector<Attribute> attributes;
1118 attributes.push_back(Attribute(m_type, "a_" + de::toString(ndx), loc, Cond::COND_ALWAYS, m_arraySize));
1142 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
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));
1178 vector<Attribute> attributes;
1180 attributes.push_back(Attribute(m_type, "a_0", 3, Cond::COND_ALWAYS, m_arraySize));
1202 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
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));
1243 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
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));
1284 vector<Attribute> attributes;
1288 attributes.push_back(Attribute(vec4, "a_0"));
1289 attributes.push_back(Attribute(vec4, "a_1"));
1316 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
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)));
1359 const int arrayElementCount = (m_arraySize != Attribute::NOT_ARRAY ? m_arraySize : 1);
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)));
1405 vector<Attribute> attributes;
1406 vector<Attribute> reattachAttributes;
1408 attributes.push_back(Attribute(vec4, "a_0"));
1412 reattachAttributes.push_back(Attribute(vec2, "a_1"));
1429 vector<Attribute> attributes;
1432 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0", 1));
1450 vector<Attribute> attributes;
1453 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0", 1));
1471 vector<Attribute> attributes;
1474 attributes.push_back(Attribute(AttribType("vec4", 1, GL_FLOAT_VEC4), "a_0", 1));
1495 vector<Attribute> attributes;
1496 vector<Attribute> reattachAttributes;
1498 attributes.push_back(Attribute(vec4, "a_0", 2));
1502 reattachAttributes.push_back(Attribute(vec2, "a_1"));
1520 vector<Attribute> attributes;
1524 attributes.push_back(Attribute(vec4, "a_0", 1));
1525 attributes.push_back(Attribute(vec4, "a_1"));