Lines Matching refs:glu
63 using glu::ShaderProgram;
64 using glu::StructType;
68 typedef bool (* dataTypePredicate)(glu::DataType);
74 static const glu::DataType s_testDataTypes[] =
76 glu::TYPE_FLOAT,
77 glu::TYPE_FLOAT_VEC2,
78 glu::TYPE_FLOAT_VEC3,
79 glu::TYPE_FLOAT_VEC4,
80 glu::TYPE_FLOAT_MAT2,
81 glu::TYPE_FLOAT_MAT2X3,
82 glu::TYPE_FLOAT_MAT2X4,
83 glu::TYPE_FLOAT_MAT3X2,
84 glu::TYPE_FLOAT_MAT3,
85 glu::TYPE_FLOAT_MAT3X4,
86 glu::TYPE_FLOAT_MAT4X2,
87 glu::TYPE_FLOAT_MAT4X3,
88 glu::TYPE_FLOAT_MAT4,
90 glu::TYPE_INT,
91 glu::TYPE_INT_VEC2,
92 glu::TYPE_INT_VEC3,
93 glu::TYPE_INT_VEC4,
95 glu::TYPE_UINT,
96 glu::TYPE_UINT_VEC2,
97 glu::TYPE_UINT_VEC3,
98 glu::TYPE_UINT_VEC4,
100 glu::TYPE_BOOL,
101 glu::TYPE_BOOL_VEC2,
102 glu::TYPE_BOOL_VEC3,
103 glu::TYPE_BOOL_VEC4,
105 glu::TYPE_SAMPLER_2D,
106 glu::TYPE_SAMPLER_CUBE
138 static inline int getSamplerNumLookupDimensions (const glu::DataType type) in getSamplerNumLookupDimensions()
142 case glu::TYPE_SAMPLER_2D: in getSamplerNumLookupDimensions()
143 case glu::TYPE_INT_SAMPLER_2D: in getSamplerNumLookupDimensions()
144 case glu::TYPE_UINT_SAMPLER_2D: in getSamplerNumLookupDimensions()
147 case glu::TYPE_SAMPLER_3D: in getSamplerNumLookupDimensions()
148 case glu::TYPE_INT_SAMPLER_3D: in getSamplerNumLookupDimensions()
149 case glu::TYPE_UINT_SAMPLER_3D: in getSamplerNumLookupDimensions()
150 case glu::TYPE_SAMPLER_2D_SHADOW: in getSamplerNumLookupDimensions()
151 case glu::TYPE_SAMPLER_2D_ARRAY: in getSamplerNumLookupDimensions()
152 case glu::TYPE_INT_SAMPLER_2D_ARRAY: in getSamplerNumLookupDimensions()
153 case glu::TYPE_UINT_SAMPLER_2D_ARRAY: in getSamplerNumLookupDimensions()
154 case glu::TYPE_SAMPLER_CUBE: in getSamplerNumLookupDimensions()
155 case glu::TYPE_INT_SAMPLER_CUBE: in getSamplerNumLookupDimensions()
156 case glu::TYPE_UINT_SAMPLER_CUBE: in getSamplerNumLookupDimensions()
159 case glu::TYPE_SAMPLER_CUBE_SHADOW: in getSamplerNumLookupDimensions()
160 case glu::TYPE_SAMPLER_2D_ARRAY_SHADOW: in getSamplerNumLookupDimensions()
169 static inline glu::DataType getSamplerLookupReturnType (const glu::DataType type) in getSamplerLookupReturnType()
173 case glu::TYPE_SAMPLER_2D: in getSamplerLookupReturnType()
174 case glu::TYPE_SAMPLER_CUBE: in getSamplerLookupReturnType()
175 case glu::TYPE_SAMPLER_2D_ARRAY: in getSamplerLookupReturnType()
176 case glu::TYPE_SAMPLER_3D: in getSamplerLookupReturnType()
177 return glu::TYPE_FLOAT_VEC4; in getSamplerLookupReturnType()
179 case glu::TYPE_UINT_SAMPLER_2D: in getSamplerLookupReturnType()
180 case glu::TYPE_UINT_SAMPLER_CUBE: in getSamplerLookupReturnType()
181 case glu::TYPE_UINT_SAMPLER_2D_ARRAY: in getSamplerLookupReturnType()
182 case glu::TYPE_UINT_SAMPLER_3D: in getSamplerLookupReturnType()
183 return glu::TYPE_UINT_VEC4; in getSamplerLookupReturnType()
185 case glu::TYPE_INT_SAMPLER_2D: in getSamplerLookupReturnType()
186 case glu::TYPE_INT_SAMPLER_CUBE: in getSamplerLookupReturnType()
187 case glu::TYPE_INT_SAMPLER_2D_ARRAY: in getSamplerLookupReturnType()
188 case glu::TYPE_INT_SAMPLER_3D: in getSamplerLookupReturnType()
189 return glu::TYPE_INT_VEC4; in getSamplerLookupReturnType()
191 case glu::TYPE_SAMPLER_2D_SHADOW: in getSamplerLookupReturnType()
192 case glu::TYPE_SAMPLER_CUBE_SHADOW: in getSamplerLookupReturnType()
193 case glu::TYPE_SAMPLER_2D_ARRAY_SHADOW: in getSamplerLookupReturnType()
194 return glu::TYPE_FLOAT; in getSamplerLookupReturnType()
198 return glu::TYPE_LAST; in getSamplerLookupReturnType()
202 template<glu::DataType T>
203 static bool dataTypeEquals (const glu::DataType t) in dataTypeEquals()
209 static bool dataTypeIsMatrixWithNRows (const glu::DataType t) in dataTypeIsMatrixWithNRows()
211 return glu::isDataTypeMatrix(t) && glu::getDataTypeMatrixNumRows(t) == N; in dataTypeIsMatrixWithNRows()
214 static bool typeContainsMatchingBasicType (const glu::VarType& type, const dataTypePredicate predic… in typeContainsMatchingBasicType()
231 static void getDistinctSamplerTypes (vector<glu::DataType>& dst, const glu::VarType& type) in getDistinctSamplerTypes()
235 const glu::DataType basicType = type.getBasicType(); in getDistinctSamplerTypes()
236 …if (glu::isDataTypeSampler(basicType) && std::find(dst.begin(), dst.end(), basicType) == dst.end()) in getDistinctSamplerTypes()
250 static int getNumSamplersInType (const glu::VarType& type) in getNumSamplersInType()
253 return glu::isDataTypeSampler(type.getBasicType()) ? 1 : 0; in getNumSamplersInType()
267 static glu::VarType generateRandomType (const int maxDepth, int& curStructIdx, vector<const StructT… in generateRandomType()
281 …return isArray ? glu::VarType(glu::VarType(structType), rnd.getInt(1, 5)) : glu::VarType(structTyp… in generateRandomType()
285 …const glu::DataType basicType = (glu::DataType)s_testDataTypes[rnd.getInt(0, DE_LENGTH_OF_ARRAY(s… in generateRandomType()
286 …const glu::Precision precision = glu::isDataTypeBoolOrBVec(basicType) ? glu::PRECISION_LAST : glu:… in generateRandomType()
287 …return isArray ? glu::VarType(glu::VarType(basicType, precision), rnd.getInt(1, 5)) : glu::VarType… in generateRandomType()
296 glu::DataType type;
329 glu::VarType type;
331 Uniform (const char* const name_, const glu::VarType& type_) : name(name_), type(type_) {} in Uniform()
374 vector<glu::DataType> getSamplerTypes (void) const in getSamplerTypes()
376 vector<glu::DataType> samplerTypes; in getSamplerTypes()
395 static UniformCollection* basic (const glu::DataType type, const char* const nameSuffix = "") in basic()
398 …const glu::Precision prec = glu::isDataTypeBoolOrBVec(type) ? glu::PRECISION_LAST : glu::PRECISIO… in basic()
399 …res->m_uniforms.push_back(Uniform((string("u_var") + nameSuffix).c_str(), glu::VarType(type, prec)… in basic()
403 static UniformCollection* basicArray (const glu::DataType type, const char* const nameSuffix = "") in basicArray()
406 …const glu::Precision prec = glu::isDataTypeBoolOrBVec(type) ? glu::PRECISION_LAST : glu::PRECISIO… in basicArray()
407 …res->m_uniforms.push_back(Uniform((string("u_var") + nameSuffix).c_str(), glu::VarType(glu::VarTyp… in basicArray()
411 …static UniformCollection* basicStruct (const glu::DataType type0, const glu::DataType type1, const… in basicStruct()
414 …const glu::Precision prec0 = glu::isDataTypeBoolOrBVec(type0) ? glu::PRECISION_LAST : glu::PRECIS… in basicStruct()
415 …const glu::Precision prec1 = glu::isDataTypeBoolOrBVec(type1) ? glu::PRECISION_LAST : glu::PRECIS… in basicStruct()
418 structType->addMember("m0", glu::VarType(type0, prec0)); in basicStruct()
419 structType->addMember("m1", glu::VarType(type1, prec1)); in basicStruct()
422 structType->addMember("m2", glu::VarType(glu::VarType(type0, prec0), 3)); in basicStruct()
423 structType->addMember("m3", glu::VarType(glu::VarType(type1, prec1), 3)); in basicStruct()
427 res->addUniform(Uniform((string("u_var") + nameSuffix).c_str(), glu::VarType(structType))); in basicStruct()
432 …static UniformCollection* structInArray (const glu::DataType type0, const glu::DataType type1, con… in structInArray()
435 res->getUniform(0).type = glu::VarType(res->getUniform(0).type, 3); in structInArray()
439 …static UniformCollection* nestedArraysStructs (const glu::DataType type0, const glu::DataType type… in nestedArraysStructs()
442 …const glu::Precision prec0 = glu::isDataTypeBoolOrBVec(type0) ? glu::PRECISION_LAST : glu::PRECI… in nestedArraysStructs()
443 …const glu::Precision prec1 = glu::isDataTypeBoolOrBVec(type1) ? glu::PRECISION_LAST : glu::PRECI… in nestedArraysStructs()
448 subSubStructType->addMember("mss0", glu::VarType(type0, prec0)); in nestedArraysStructs()
449 subSubStructType->addMember("mss1", glu::VarType(type1, prec1)); in nestedArraysStructs()
451 subStructType->addMember("ms0", glu::VarType(type1, prec1)); in nestedArraysStructs()
452 subStructType->addMember("ms1", glu::VarType(glu::VarType(type0, prec0), 2)); in nestedArraysStructs()
453 subStructType->addMember("ms2", glu::VarType(glu::VarType(subSubStructType), 2)); in nestedArraysStructs()
455 structType->addMember("m0", glu::VarType(type0, prec0)); in nestedArraysStructs()
456 structType->addMember("m1", glu::VarType(subStructType)); in nestedArraysStructs()
457 structType->addMember("m2", glu::VarType(type1, prec1)); in nestedArraysStructs()
463 res->addUniform(Uniform((string("u_var") + nameSuffix).c_str(), glu::VarType(structType))); in nestedArraysStructs()
470 …static const glu::DataType types[] = { glu::TYPE_FLOAT, glu::TYPE_INT_VEC3, glu::TYPE_UINT_VEC4, g… in multipleBasic()
485 static const glu::DataType types[] = { glu::TYPE_FLOAT, glu::TYPE_INT_VEC3, glu::TYPE_BOOL_VEC2 }; in multipleBasicArray()
500 static const glu::DataType types0[] = { glu::TYPE_FLOAT, glu::TYPE_INT, glu::TYPE_BOOL_VEC4 }; in multipleNestedArraysStructs()
501 …static const glu::DataType types1[] = { glu::TYPE_FLOAT_VEC4, glu::TYPE_INT_VEC4, glu::TYPE_BOOL }; in multipleNestedArraysStructs()
526 Uniform uniform(("u_var" + de::toString(i)).c_str(), glu::VarType()); in random()
560 DE_ASSERT(glu::isDataTypeSampler(sampler.type)); in getSamplerFillValue()
567 case glu::TYPE_FLOAT_VEC4: in getSamplerFillValue()
571 case glu::TYPE_UINT_VEC4: in getSamplerFillValue()
575 case glu::TYPE_INT_VEC4: in getSamplerFillValue()
579 case glu::TYPE_FLOAT: in getSamplerFillValue()
591 DE_ASSERT(glu::isDataTypeSampler(sampler.type)); in getSamplerUnitValue()
594 result.type = glu::TYPE_INT; in getSamplerUnitValue()
600 static glu::DataType getDataTypeTransposedMatrix (const glu::DataType original) in getDataTypeTransposedMatrix()
602 …return glu::getDataTypeMatrix(glu::getDataTypeMatrixNumRows(original), glu::getDataTypeMatrixNumCo… in getDataTypeTransposedMatrix()
607 DE_ASSERT(glu::isDataTypeMatrix(original.type)); in getTransposeMatrix()
609 const int rows = glu::getDataTypeMatrixNumRows(original.type); in getTransposeMatrix()
610 const int cols = glu::getDataTypeMatrixNumColumns(original.type); in getTransposeMatrix()
623 const int numElems = glu::getDataTypeScalarSize(value.type); in shaderVarValueStr()
627 result << glu::getDataTypeName(value.type) << "("; in shaderVarValueStr()
634 if (glu::isDataTypeFloatOrVec(value.type) || glu::isDataTypeMatrix(value.type)) in shaderVarValueStr()
636 else if (glu::isDataTypeIntOrIVec((value.type))) in shaderVarValueStr()
638 else if (glu::isDataTypeUintOrUVec((value.type))) in shaderVarValueStr()
640 else if (glu::isDataTypeBoolOrBVec((value.type))) in shaderVarValueStr()
642 else if (glu::isDataTypeSampler((value.type))) in shaderVarValueStr()
656 const int numElems = glu::getDataTypeScalarSize(value.type); in apiVarValueStr()
667 if (glu::isDataTypeFloatOrVec(value.type) || glu::isDataTypeMatrix(value.type)) in apiVarValueStr()
669 else if (glu::isDataTypeIntOrIVec((value.type))) in apiVarValueStr()
671 else if (glu::isDataTypeUintOrUVec((value.type))) in apiVarValueStr()
673 else if (glu::isDataTypeBoolOrBVec((value.type))) in apiVarValueStr()
675 else if (glu::isDataTypeSampler((value.type))) in apiVarValueStr()
687 static VarValue generateRandomVarValue (const glu::DataType type, Random& rnd, int samplerUnit = -1… in generateRandomVarValue()
689 const int numElems = glu::getDataTypeScalarSize(type); in generateRandomVarValue()
693 DE_ASSERT((samplerUnit >= 0) == (glu::isDataTypeSampler(type))); in generateRandomVarValue()
695 if (glu::isDataTypeFloatOrVec(type) || glu::isDataTypeMatrix(type)) in generateRandomVarValue()
700 else if (glu::isDataTypeIntOrIVec(type)) in generateRandomVarValue()
705 else if (glu::isDataTypeUintOrUVec(type)) in generateRandomVarValue()
710 else if (glu::isDataTypeBoolOrBVec(type)) in generateRandomVarValue()
715 else if (glu::isDataTypeSampler(type)) in generateRandomVarValue()
717 const glu::DataType texResultType = getSamplerLookupReturnType(type); in generateRandomVarValue()
718 const glu::DataType texResultScalarType = glu::getDataTypeScalarType(texResultType); in generateRandomVarValue()
719 const int texResultNumDims = glu::getDataTypeScalarSize(texResultType); in generateRandomVarValue()
727 … case glu::TYPE_FLOAT: result.val.samplerV.fillColor.floatV[i] = rnd.getFloat(0.0f, 1.0f); break; in generateRandomVarValue()
728 case glu::TYPE_INT: result.val.samplerV.fillColor.intV[i] = rnd.getInt(-10, 10); break; in generateRandomVarValue()
729 … case glu::TYPE_UINT: result.val.samplerV.fillColor.uintV[i] = (deUint32)rnd.getInt(0, 10); break; in generateRandomVarValue()
741 static VarValue generateZeroVarValue (const glu::DataType type) in generateZeroVarValue()
743 const int numElems = glu::getDataTypeScalarSize(type); in generateZeroVarValue()
747 if (glu::isDataTypeFloatOrVec(type) || glu::isDataTypeMatrix(type)) in generateZeroVarValue()
752 else if (glu::isDataTypeIntOrIVec(type)) in generateZeroVarValue()
757 else if (glu::isDataTypeUintOrUVec(type)) in generateZeroVarValue()
762 else if (glu::isDataTypeBoolOrBVec(type)) in generateZeroVarValue()
767 else if (glu::isDataTypeSampler(type)) in generateZeroVarValue()
769 const glu::DataType texResultType = getSamplerLookupReturnType(type); in generateZeroVarValue()
770 const glu::DataType texResultScalarType = glu::getDataTypeScalarType(texResultType); in generateZeroVarValue()
771 const int texResultNumDims = glu::getDataTypeScalarSize(texResultType); in generateZeroVarValue()
779 case glu::TYPE_FLOAT: result.val.samplerV.fillColor.floatV[i] = 0.12f * (float)i; break; in generateZeroVarValue()
780 case glu::TYPE_INT: result.val.samplerV.fillColor.intV[i] = -2 + i; break; in generateZeroVarValue()
781 case glu::TYPE_UINT: result.val.samplerV.fillColor.uintV[i] = 4 + i; break; in generateZeroVarValue()
795 const int size = glu::getDataTypeScalarSize(a.type); in apiVarValueEquals()
800 if (glu::isDataTypeFloatOrVec(a.type) || glu::isDataTypeMatrix(a.type)) in apiVarValueEquals()
806 else if (glu::isDataTypeIntOrIVec(a.type)) in apiVarValueEquals()
812 else if (glu::isDataTypeUintOrUVec(a.type)) in apiVarValueEquals()
818 else if (glu::isDataTypeBoolOrBVec(a.type)) in apiVarValueEquals()
824 else if (glu::isDataTypeSampler(a.type)) in apiVarValueEquals()
835 static VarValue getRandomBoolRepresentation (const VarValue& boolValue, const glu::DataType targetS… in getRandomBoolRepresentation()
837 DE_ASSERT(glu::isDataTypeBoolOrBVec(boolValue.type)); in getRandomBoolRepresentation()
839 const int size = glu::getDataTypeScalarSize(boolValue.type); in getRandomBoolRepresentation()
840 …const glu::DataType targetType = size == 1 ? targetScalarType : glu::getDataTypeVector(targetScal… in getRandomBoolRepresentation()
846 case glu::TYPE_INT: in getRandomBoolRepresentation()
860 case glu::TYPE_UINT: in getRandomBoolRepresentation()
870 case glu::TYPE_FLOAT: in getRandomBoolRepresentation()
909 class UniformCase : public TestCase, protected glu::CallLogWrapper
956 glu::DataType type;
965 const glu::DataType type_, in BasicUniform()
999 glu::DataType type;
1002 …BasicUniformReportRef (const char* const name_, const int minS, const int maxS, const glu::DataTyp… in BasicUniformReportRef()
1004 BasicUniformReportRef (const char* const name_, const glu::DataType type_, const bool used) in BasicUniformReportRef()
1014 glu::DataType type;
1018 …BasicUniformReportGL (const char* const name_, const int nameLength_, const int size_, const glu::… in BasicUniformReportGL()
1061 const glu::VarType& varType,
1078 vector<glu::Texture2D*> m_textures2d;
1079 vector<glu::TextureCube*> m_texturesCube;
1182 …cUniformsDst, vector<BasicUniformReportRef>& basicUniformReportsDst, const glu::VarType& varType, … in generateBasicUniforms()
1187 const glu::DataType type = varType.getBasicType(); in generateBasicUniforms()
1189 … : glu::isDataTypeSampler(type) ? generateRandomVarValue(type, rnd, samplerUnitCounter++) in generateBasicUniforms()
1213 const glu::DataType elemBasicType = varType.getElementType().getBasicType(); in generateBasicUniforms()
1215 …: glu::isDataTypeSampler(elemBasicType) ? generateRandomVarValue(elemBasicType, rnd, samplerUnitC… in generateBasicUniforms()
1240 const glu::StructMember& member = structType.getMember(i); in generateBasicUniforms()
1251 dst << glu::declare(m_uniformCollection->getStructType(i)) << ";\n"; in writeUniformDefinitions()
1254 …dst << "uniform " << glu::declare(m_uniformCollection->getUniform(i).type, m_uniformCollection->ge… in writeUniformDefinitions()
1265 …{ { glu::isDataTypeFloatOrVec, glu::isDataTypeMatrix }, "mediump float compare_float (med… in writeUniformDefinitions()
1266 …{ { dataTypeEquals<glu::TYPE_FLOAT_VEC2>, dataTypeIsMatrixWithNRows<2> }, "mediump float compare_… in writeUniformDefinitions()
1267 …{ { dataTypeEquals<glu::TYPE_FLOAT_VEC3>, dataTypeIsMatrixWithNRows<3> }, "mediump float compare_… in writeUniformDefinitions()
1268 …{ { dataTypeEquals<glu::TYPE_FLOAT_VEC4>, dataTypeIsMatrixWithNRows<4> }, "mediump float compare_… in writeUniformDefinitions()
1269 …{ { dataTypeEquals<glu::TYPE_FLOAT_MAT2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float comp… in writeUniformDefinitions()
1270 …{ { dataTypeEquals<glu::TYPE_FLOAT_MAT2X3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float co… in writeUniformDefinitions()
1271 …{ { dataTypeEquals<glu::TYPE_FLOAT_MAT2X4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float co… in writeUniformDefinitions()
1272 …{ { dataTypeEquals<glu::TYPE_FLOAT_MAT3X2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float co… in writeUniformDefinitions()
1273 …{ { dataTypeEquals<glu::TYPE_FLOAT_MAT3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float comp… in writeUniformDefinitions()
1274 …{ { dataTypeEquals<glu::TYPE_FLOAT_MAT3X4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float co… in writeUniformDefinitions()
1275 …{ { dataTypeEquals<glu::TYPE_FLOAT_MAT4X2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float co… in writeUniformDefinitions()
1276 …{ { dataTypeEquals<glu::TYPE_FLOAT_MAT4X3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float co… in writeUniformDefinitions()
1277 …{ { dataTypeEquals<glu::TYPE_FLOAT_MAT4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float comp… in writeUniformDefinitions()
1278 …{ { dataTypeEquals<glu::TYPE_INT>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_i… in writeUniformDefinitions()
1279 …{ { dataTypeEquals<glu::TYPE_INT_VEC2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compa… in writeUniformDefinitions()
1280 …{ { dataTypeEquals<glu::TYPE_INT_VEC3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compa… in writeUniformDefinitions()
1281 …{ { dataTypeEquals<glu::TYPE_INT_VEC4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compa… in writeUniformDefinitions()
1282 …{ { dataTypeEquals<glu::TYPE_UINT>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_… in writeUniformDefinitions()
1283 …{ { dataTypeEquals<glu::TYPE_UINT_VEC2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compa… in writeUniformDefinitions()
1284 …{ { dataTypeEquals<glu::TYPE_UINT_VEC3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compa… in writeUniformDefinitions()
1285 …{ { dataTypeEquals<glu::TYPE_UINT_VEC4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compa… in writeUniformDefinitions()
1286 …{ { dataTypeEquals<glu::TYPE_BOOL>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_… in writeUniformDefinitions()
1287 …{ { dataTypeEquals<glu::TYPE_BOOL_VEC2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compa… in writeUniformDefinitions()
1288 …{ { dataTypeEquals<glu::TYPE_BOOL_VEC3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compa… in writeUniformDefinitions()
1289 …{ { dataTypeEquals<glu::TYPE_BOOL_VEC4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compa… in writeUniformDefinitions()
1292 const vector<glu::DataType> samplerTypes = m_uniformCollection->getSamplerTypes(); in writeUniformDefinitions()
1301 if (glu::isDataTypeSampler(samplerTypes[i])) in writeUniformDefinitions()
1303 const glu::DataType retType = getSamplerLookupReturnType(samplerTypes[i]); in writeUniformDefinitions()
1320 if (glu::isDataTypeSampler(uniform.type)) in writeUniformCompareExpr()
1321 …dst << "compare_" << glu::getDataTypeName(getSamplerLookupReturnType(uniform.type)) << "(texture("… in writeUniformCompareExpr()
1323 dst << "compare_" << glu::getDataTypeName(uniform.type) << "(" << uniform.name; in writeUniformCompareExpr()
1406 DE_ASSERT(getSamplerLookupReturnType(value.type) == glu::TYPE_FLOAT_VEC4); in setupTexture()
1412 if (value.type == glu::TYPE_SAMPLER_2D) in setupTexture()
1414 …glu::Texture2D* texture = new glu::Texture2D(m_context.getRenderContext(), GL_RGBA, GL_UNSIGNED_B… in setupTexture()
1429 else if (value.type == glu::TYPE_SAMPLER_CUBE) in setupTexture()
1433 …glu::TextureCube* texture = new glu::TextureCube(m_context.getRenderContext(), GL_RGBA, GL_UNSIGN… in setupTexture()
1480 const glu::DataType reportedType = glu::getDataTypeFromGLType(reportedTypeGL); in getActiveUniforms()
1483 TCU_CHECK_MSG(reportedType != glu::TYPE_LAST, "Invalid uniform type"); in getActiveUniforms()
1485 …= " << reportedNameLength << ", size = " << reportedSize << ", type = " << glu::getDataTypeName(re… in getActiveUniforms()
1511 DE_ASSERT(reference.type != glu::TYPE_LAST); in getActiveUniforms()
1525 …log << TestLog::Message << "// FAILURE: wrong type reported, should be " << glu::getDataTypeName(r… in getActiveUniforms()
1609 …const glu::DataType reportedType = glu::getDataTypeFromGLType((deUint32)uniformTypeBuf[validNd… in getActiveUniformsiv()
1611 TCU_CHECK_MSG(reportedType != glu::TYPE_LAST, "Invalid uniform type"); in getActiveUniformsiv()
1616 << ", type = " << glu::getDataTypeName(reportedType) in getActiveUniformsiv()
1620 DE_ASSERT(reference.type != glu::TYPE_LAST); in getActiveUniformsiv()
1633 …log << TestLog::Message << "// FAILURE: wrong type reported, should be " << glu::getDataTypeName(r… in getActiveUniformsiv()
1724 const int size = glu::getDataTypeScalarSize(uniform.type); in getUniforms()
1731 value.type = glu::TYPE_INVALID; in getUniforms()
1747 if (glu::isDataTypeFloatOrVec(uniform.type) || glu::isDataTypeMatrix(uniform.type)) in getUniforms()
1749 else if (glu::isDataTypeIntOrIVec(uniform.type)) in getUniforms()
1751 else if (glu::isDataTypeUintOrUVec(uniform.type)) in getUniforms()
1753 else if (glu::isDataTypeBoolOrBVec(uniform.type)) in getUniforms()
1774 else if (glu::isDataTypeSampler(uniform.type)) in getUniforms()
1802 const int valSize = glu::getDataTypeScalarSize(uniform.type); in checkUniformDefaultValues()
1806 if (unifValue.type == glu::TYPE_INVALID) // This happens when glGetUniformLocation() returned -1. in checkUniformDefaultValues()
1822 if (glu::isDataTypeFloatOrVec(uniform.type) || glu::isDataTypeMatrix(uniform.type)) in checkUniformDefaultValues()
1824 else if (glu::isDataTypeIntOrIVec(uniform.type)) in checkUniformDefaultValues()
1826 else if (glu::isDataTypeUintOrUVec(uniform.type)) in checkUniformDefaultValues()
1828 else if (glu::isDataTypeBoolOrBVec(uniform.type)) in checkUniformDefaultValues()
1830 else if (glu::isDataTypeSampler(uniform.type)) in checkUniformDefaultValues()
1852 const glu::DataType boolApiType = m_features & FEATURE_BOOLEANAPITYPE_INT ? glu::TYPE_INT in assignUniforms()
1853 : m_features & FEATURE_BOOLEANAPITYPE_UINT ? glu::TYPE_UINT in assignUniforms()
1854 : glu::TYPE_FLOAT; in assignUniforms()
1876 const int typeSize = glu::getDataTypeScalarSize(uniform.type); in assignUniforms()
1877 …const bool assignByValue = m_features & FEATURE_UNIFORMFUNC_VALUE && !glu::isDataTypeMatrix(uni… in assignUniforms()
1895 …const VarValue apiValue = glu::isDataTypeBoolOrBVec(unifValue.type) ? getRandomBoolRepresentation(… in assignUniforms()
1896 : glu::isDataTypeSampler(unifValue.type) ? getSamplerUnitValue(unifValue) in assignUniforms()
1899 …valuesToAssign.push_back(glu::isDataTypeMatrix(apiValue.type) && transpose ? getTransposeMatrix(ap… in assignUniforms()
1901 if (glu::isDataTypeBoolOrBVec(uniform.type)) in assignUniforms()
1902 …log << TestLog::Message << "// Using type " << glu::getDataTypeName(boolApiType) << " to set boole… in assignUniforms()
1903 else if (glu::isDataTypeSampler(uniform.type)) in assignUniforms()
1909 if (glu::isDataTypeFloatOrVec(valuesToAssign[0].type)) in assignUniforms()
1943 else if (glu::isDataTypeMatrix(valuesToAssign[0].type)) in assignUniforms()
1954 …case glu::TYPE_FLOAT_MAT2: GLU_CHECK_CALL(glUniformMatrix2fv (location, (GLsizei)valuesToAssign.s… in assignUniforms()
1955 …case glu::TYPE_FLOAT_MAT3: GLU_CHECK_CALL(glUniformMatrix3fv (location, (GLsizei)valuesToAssign.s… in assignUniforms()
1956 …case glu::TYPE_FLOAT_MAT4: GLU_CHECK_CALL(glUniformMatrix4fv (location, (GLsizei)valuesToAssign.s… in assignUniforms()
1957 …case glu::TYPE_FLOAT_MAT2X3: GLU_CHECK_CALL(glUniformMatrix2x3fv (location, (GLsizei)valuesToAssig… in assignUniforms()
1958 …case glu::TYPE_FLOAT_MAT2X4: GLU_CHECK_CALL(glUniformMatrix2x4fv (location, (GLsizei)valuesToAssig… in assignUniforms()
1959 …case glu::TYPE_FLOAT_MAT3X2: GLU_CHECK_CALL(glUniformMatrix3x2fv (location, (GLsizei)valuesToAssig… in assignUniforms()
1960 …case glu::TYPE_FLOAT_MAT3X4: GLU_CHECK_CALL(glUniformMatrix3x4fv (location, (GLsizei)valuesToAssig… in assignUniforms()
1961 …case glu::TYPE_FLOAT_MAT4X2: GLU_CHECK_CALL(glUniformMatrix4x2fv (location, (GLsizei)valuesToAssig… in assignUniforms()
1962 …case glu::TYPE_FLOAT_MAT4X3: GLU_CHECK_CALL(glUniformMatrix4x3fv (location, (GLsizei)valuesToAssig… in assignUniforms()
1967 else if (glu::isDataTypeIntOrIVec(valuesToAssign[0].type)) in assignUniforms()
2001 else if (glu::isDataTypeUintOrUVec(valuesToAssign[0].type)) in assignUniforms()
2035 else if (glu::isDataTypeSampler(valuesToAssign[0].type)) in assignUniforms()
2062 if (unifValue.type == glu::TYPE_INVALID) // This happens when glGetUniformLocation() returned -1. in compareUniformValues()
2088 if (glu::isDataTypeSampler(basicUniforms[i].type)) in renderTest()
2092 …if (glu::isDataTypeSampler(basicUniforms[j].type) && basicUniforms[i].type != basicUniforms[j].typ… in renderTest()
2100 …if (glu::isDataTypeSampler(basicUniforms[i].type) && std::find(m_filledTextureUnits.begin(), m_fil… in renderTest()
2125 glu::readPixels(m_context.getRenderContext(), viewportX, viewportY, renderedImg.getAccess()); in renderTest()
2165 …const ShaderProgram program (m_context.getRenderContext(), glu::makeVtxFragSources(vertexSour… in iterate()
2641 const glu::DataType dataType = s_testDataTypes[dataTypeNdx]; in init()
2642 const char* const typeName = glu::getDataTypeName(dataType); in init()
2646 if (glu::isDataTypeScalar(dataType) || in init()
2647 (glu::isDataTypeVector(dataType) && glu::getDataTypeScalarSize(dataType) == 4) || in init()
2648 dataType == glu::TYPE_FLOAT_MAT4 || in init()
2649 dataType == glu::TYPE_SAMPLER_2D) in init()
2652 if (glu::isDataTypeScalar(dataType) || in init()
2653 dataType == glu::TYPE_FLOAT_MAT4 || in init()
2654 dataType == glu::TYPE_SAMPLER_2D) in init()
2656 …const glu::DataType secondDataType = glu::isDataTypeScalar(dataType) ? glu::getDataTypeVector(dat… in init()
2657 : dataType == glu::TYPE_FLOAT_MAT4 ? glu::TYPE_FLOAT_MAT2 in init()
2658 : dataType == glu::TYPE_SAMPLER_2D ? glu::TYPE_SAMPLER_CUBE in init()
2659 : glu::TYPE_LAST; in init()
2660 DE_ASSERT(secondDataType != glu::TYPE_LAST); in init()
2661 const char* const secondTypeName = glu::getDataTypeName(secondDataType); in init()
2768 …const bool containsBooleans = uniformCollection->containsMatchingBasicType(glu::isDataType… in init()
2833 …const bool containsBooleans = uniformCollection->containsMatchingBasicType(glu::isDataType… in init()
2837 …const bool containsMatrices = uniformCollection->containsMatchingBasicType(glu::isDataType… in init()