Lines Matching refs:glu

64 using glu::ShaderProgram;
65 using glu::StructType;
69 typedef bool (* dataTypePredicate)(glu::DataType);
78 static const glu::DataType s_testDataTypes[] =
80 glu::TYPE_FLOAT,
81 glu::TYPE_FLOAT_VEC2,
82 glu::TYPE_FLOAT_VEC3,
83 glu::TYPE_FLOAT_VEC4,
84 glu::TYPE_FLOAT_MAT2,
85 glu::TYPE_FLOAT_MAT2X3,
86 glu::TYPE_FLOAT_MAT2X4,
87 glu::TYPE_FLOAT_MAT3X2,
88 glu::TYPE_FLOAT_MAT3,
89 glu::TYPE_FLOAT_MAT3X4,
90 glu::TYPE_FLOAT_MAT4X2,
91 glu::TYPE_FLOAT_MAT4X3,
92 glu::TYPE_FLOAT_MAT4,
94 glu::TYPE_INT,
95 glu::TYPE_INT_VEC2,
96 glu::TYPE_INT_VEC3,
97 glu::TYPE_INT_VEC4,
99 glu::TYPE_UINT,
100 glu::TYPE_UINT_VEC2,
101 glu::TYPE_UINT_VEC3,
102 glu::TYPE_UINT_VEC4,
104 glu::TYPE_BOOL,
105 glu::TYPE_BOOL_VEC2,
106 glu::TYPE_BOOL_VEC3,
107 glu::TYPE_BOOL_VEC4,
109 glu::TYPE_SAMPLER_2D,
110 glu::TYPE_SAMPLER_CUBE
142 static inline int getSamplerNumLookupDimensions (const glu::DataType type)
146 case glu::TYPE_SAMPLER_2D:
147 case glu::TYPE_INT_SAMPLER_2D:
148 case glu::TYPE_UINT_SAMPLER_2D:
151 case glu::TYPE_SAMPLER_3D:
152 case glu::TYPE_INT_SAMPLER_3D:
153 case glu::TYPE_UINT_SAMPLER_3D:
154 case glu::TYPE_SAMPLER_2D_SHADOW:
155 case glu::TYPE_SAMPLER_2D_ARRAY:
156 case glu::TYPE_INT_SAMPLER_2D_ARRAY:
157 case glu::TYPE_UINT_SAMPLER_2D_ARRAY:
158 case glu::TYPE_SAMPLER_CUBE:
159 case glu::TYPE_INT_SAMPLER_CUBE:
160 case glu::TYPE_UINT_SAMPLER_CUBE:
163 case glu::TYPE_SAMPLER_CUBE_SHADOW:
164 case glu::TYPE_SAMPLER_2D_ARRAY_SHADOW:
173 static inline glu::DataType getSamplerLookupReturnType (const glu::DataType type)
177 case glu::TYPE_SAMPLER_2D:
178 case glu::TYPE_SAMPLER_CUBE:
179 case glu::TYPE_SAMPLER_2D_ARRAY:
180 case glu::TYPE_SAMPLER_3D:
181 return glu::TYPE_FLOAT_VEC4;
183 case glu::TYPE_UINT_SAMPLER_2D:
184 case glu::TYPE_UINT_SAMPLER_CUBE:
185 case glu::TYPE_UINT_SAMPLER_2D_ARRAY:
186 case glu::TYPE_UINT_SAMPLER_3D:
187 return glu::TYPE_UINT_VEC4;
189 case glu::TYPE_INT_SAMPLER_2D:
190 case glu::TYPE_INT_SAMPLER_CUBE:
191 case glu::TYPE_INT_SAMPLER_2D_ARRAY:
192 case glu::TYPE_INT_SAMPLER_3D:
193 return glu::TYPE_INT_VEC4;
195 case glu::TYPE_SAMPLER_2D_SHADOW:
196 case glu::TYPE_SAMPLER_CUBE_SHADOW:
197 case glu::TYPE_SAMPLER_2D_ARRAY_SHADOW:
198 return glu::TYPE_FLOAT;
202 return glu::TYPE_LAST;
206 template<glu::DataType T>
207 static bool dataTypeEquals (const glu::DataType t)
213 static bool dataTypeIsMatrixWithNRows (const glu::DataType t)
215 return glu::isDataTypeMatrix(t) && glu::getDataTypeMatrixNumRows(t) == N;
218 static bool typeContainsMatchingBasicType (const glu::VarType& type, const dataTypePredicate predicate)
235 static void getDistinctSamplerTypes (vector<glu::DataType>& dst, const glu::VarType& type)
239 const glu::DataType basicType = type.getBasicType();
240 if (glu::isDataTypeSampler(basicType) && std::find(dst.begin(), dst.end(), basicType) == dst.end())
254 static int getNumSamplersInType (const glu::VarType& type)
257 return glu::isDataTypeSampler(type.getBasicType()) ? 1 : 0;
276 glu::DataType type;
309 glu::VarType type;
311 Uniform (const char* const name_, const glu::VarType& type_) : name(name_), type(type_) {}
354 vector<glu::DataType> getSamplerTypes (void) const
356 vector<glu::DataType> samplerTypes;
375 static UniformCollection* basic (const glu::DataType type, const char* const nameSuffix = "")
378 const glu::Precision prec = glu::isDataTypeBoolOrBVec(type) ? glu::PRECISION_LAST : glu::PRECISION_MEDIUMP;
379 res->m_uniforms.push_back(Uniform((string("u_var") + nameSuffix).c_str(), glu::VarType(type, prec)));
383 static UniformCollection* basicArray (const glu::DataType type, const char* const nameSuffix = "")
386 const glu::Precision prec = glu::isDataTypeBoolOrBVec(type) ? glu::PRECISION_LAST : glu::PRECISION_MEDIUMP;
387 res->m_uniforms.push_back(Uniform((string("u_var") + nameSuffix).c_str(), glu::VarType(glu::VarType(type, prec), 3)));
391 static UniformCollection* basicStruct (const glu::DataType type0, const glu::DataType type1, const bool containsArrays, const char* const nameSuffix = "")
394 const glu::Precision prec0 = glu::isDataTypeBoolOrBVec(type0) ? glu::PRECISION_LAST : glu::PRECISION_MEDIUMP;
395 const glu::Precision prec1 = glu::isDataTypeBoolOrBVec(type1) ? glu::PRECISION_LAST : glu::PRECISION_MEDIUMP;
398 structType->addMember("m0", glu::VarType(type0, prec0));
399 structType->addMember("m1", glu::VarType(type1, prec1));
402 structType->addMember("m2", glu::VarType(glu::VarType(type0, prec0), 3));
403 structType->addMember("m3", glu::VarType(glu::VarType(type1, prec1), 3));
407 res->addUniform(Uniform((string("u_var") + nameSuffix).c_str(), glu::VarType(structType)));
412 static UniformCollection* structInArray (const glu::DataType type0, const glu::DataType type1, const bool containsArrays, const char* const nameSuffix = "")
415 res->getUniform(0).type = glu::VarType(res->getUniform(0).type, 3);
419 static UniformCollection* nestedArraysStructs (const glu::DataType type0, const glu::DataType type1, const char* const nameSuffix = "")
422 const glu::Precision prec0 = glu::isDataTypeBoolOrBVec(type0) ? glu::PRECISION_LAST : glu::PRECISION_MEDIUMP;
423 const glu::Precision prec1 = glu::isDataTypeBoolOrBVec(type1) ? glu::PRECISION_LAST : glu::PRECISION_MEDIUMP;
428 subSubStructType->addMember("mss0", glu::VarType(type0, prec0));
429 subSubStructType->addMember("mss1", glu::VarType(type1, prec1));
431 subStructType->addMember("ms0", glu::VarType(type1, prec1));
432 subStructType->addMember("ms1", glu::VarType(glu::VarType(type0, prec0), 2));
433 subStructType->addMember("ms2", glu::VarType(glu::VarType(subSubStructType), 2));
435 structType->addMember("m0", glu::VarType(type0, prec0));
436 structType->addMember("m1", glu::VarType(subStructType));
437 structType->addMember("m2", glu::VarType(type1, prec1));
443 res->addUniform(Uniform((string("u_var") + nameSuffix).c_str(), glu::VarType(structType)));
450 static const glu::DataType types[] = { glu::TYPE_FLOAT, glu::TYPE_INT_VEC3, glu::TYPE_UINT_VEC4, glu::TYPE_FLOAT_MAT3, glu::TYPE_BOOL_VEC2 };
465 static const glu::DataType types[] = { glu::TYPE_FLOAT, glu::TYPE_INT_VEC3, glu::TYPE_BOOL_VEC2 };
480 static const glu::DataType types0[] = { glu::TYPE_FLOAT, glu::TYPE_INT, glu::TYPE_BOOL_VEC4 };
481 static const glu::DataType types1[] = { glu::TYPE_FLOAT_VEC4, glu::TYPE_INT_VEC4, glu::TYPE_BOOL };
511 DE_ASSERT(glu::isDataTypeSampler(sampler.type));
518 case glu::TYPE_FLOAT_VEC4:
522 case glu::TYPE_UINT_VEC4:
526 case glu::TYPE_INT_VEC4:
530 case glu::TYPE_FLOAT:
542 DE_ASSERT(glu::isDataTypeSampler(sampler.type));
545 result.type = glu::TYPE_INT;
551 static glu::DataType getDataTypeTransposedMatrix (const glu::DataType original)
553 return glu::getDataTypeMatrix(glu::getDataTypeMatrixNumRows(original), glu::getDataTypeMatrixNumColumns(original));
558 DE_ASSERT(glu::isDataTypeMatrix(original.type));
560 const int rows = glu::getDataTypeMatrixNumRows(original.type);
561 const int cols = glu::getDataTypeMatrixNumColumns(original.type);
574 const int numElems = glu::getDataTypeScalarSize(value.type);
578 result << glu::getDataTypeName(value.type) << "(";
585 if (glu::isDataTypeFloatOrVec(value.type) || glu::isDataTypeMatrix(value.type))
587 else if (glu::isDataTypeIntOrIVec((value.type)))
589 else if (glu::isDataTypeUintOrUVec((value.type)))
591 else if (glu::isDataTypeBoolOrBVec((value.type)))
593 else if (glu::isDataTypeSampler((value.type)))
607 const int numElems = glu::getDataTypeScalarSize(value.type);
618 if (glu::isDataTypeFloatOrVec(value.type) || glu::isDataTypeMatrix(value.type))
620 else if (glu::isDataTypeIntOrIVec((value.type)))
622 else if (glu::isDataTypeUintOrUVec((value.type)))
624 else if (glu::isDataTypeBoolOrBVec((value.type)))
626 else if (glu::isDataTypeSampler((value.type)))
638 static VarValue generateRandomVarValue (const glu::DataType type, Random& rnd, int samplerUnit = -1 /* Used if type is a sampler type. \note Samplers' unit numbers are not randomized. */)
640 const int numElems = glu::getDataTypeScalarSize(type);
644 DE_ASSERT((samplerUnit >= 0) == (glu::isDataTypeSampler(type)));
646 if (glu::isDataTypeFloatOrVec(type) || glu::isDataTypeMatrix(type))
651 else if (glu::isDataTypeIntOrIVec(type))
656 else if (glu::isDataTypeUintOrUVec(type))
661 else if (glu::isDataTypeBoolOrBVec(type))
666 else if (glu::isDataTypeSampler(type))
668 const glu::DataType texResultType = getSamplerLookupReturnType(type);
669 const glu::DataType texResultScalarType = glu::getDataTypeScalarType(texResultType);
670 const int texResultNumDims = glu::getDataTypeScalarSize(texResultType);
678 case glu::TYPE_FLOAT: result.val.samplerV.fillColor.floatV[i] = rnd.getFloat(0.0f, 1.0f); break;
679 case glu::TYPE_INT: result.val.samplerV.fillColor.intV[i] = rnd.getInt(-10, 10); break;
680 case glu::TYPE_UINT: result.val.samplerV.fillColor.uintV[i] = (deUint32)rnd.getInt(0, 10); break;
694 const int size = glu::getDataTypeScalarSize(a.type);
699 if (glu::isDataTypeFloatOrVec(a.type) || glu::isDataTypeMatrix(a.type))
705 else if (glu::isDataTypeIntOrIVec(a.type))
711 else if (glu::isDataTypeUintOrUVec(a.type))
717 else if (glu::isDataTypeBoolOrBVec(a.type))
723 else if (glu::isDataTypeSampler(a.type))
734 static VarValue getRandomBoolRepresentation (const VarValue& boolValue, const glu::DataType targetScalarType, Random& rnd)
736 DE_ASSERT(glu::isDataTypeBoolOrBVec(boolValue.type));
738 const int size = glu::getDataTypeScalarSize(boolValue.type);
739 const glu::DataType targetType = size == 1 ? targetScalarType : glu::getDataTypeVector(targetScalarType, size);
745 case glu::TYPE_INT:
759 case glu::TYPE_UINT:
769 case glu::TYPE_FLOAT:
803 class UniformCase : public TestCase, protected glu::CallLogWrapper
846 glu::DataType type;
855 const glu::DataType type_,
889 glu::DataType type;
892 BasicUniformReportRef (const char* const name_, const int minS, const int maxS, const glu::DataType type_, const bool used)
894 BasicUniformReportRef (const char* const name_, const glu::DataType type_, const bool used)
898 // Get uniform values with glGetUniform*() and put to valuesDst. Uniforms that get -1 from glGetUniformLocation() get glu::TYPE_INVALID.
917 const glu::VarType& varType,
934 vector<glu::Texture2D*> m_textures2d;
935 vector<glu::TextureCube*> m_texturesCube;
1000 void UniformCase::generateBasicUniforms (vector<BasicUniform>& basicUniformsDst, vector<BasicUniformReportRef>& basicUniformReportsDst, const glu::VarType& varType, const char* const varName, const bool isParentActive, int& samplerUnitCounter, Random& rnd) const
1005 const glu::DataType type = varType.getBasicType();
1006 const VarValue value = glu::isDataTypeSampler(type) ? generateRandomVarValue(type, rnd, samplerUnitCounter++)
1030 const glu::DataType elemBasicType = varType.getElementType().getBasicType();
1031 const VarValue value = glu::isDataTypeSampler(elemBasicType) ? generateRandomVarValue(elemBasicType, rnd, samplerUnitCounter++)
1056 const glu::StructMember& member = structType.getMember(i);
1067 dst << glu::declare(m_uniformCollection->getStructType(i)) << ";\n";
1070 dst << "uniform " << glu::declare(m_uniformCollection->getUniform(i).type, m_uniformCollection->getUniform(i).name.c_str()) << ";\n";
1081 { { glu::isDataTypeFloatOrVec, glu::isDataTypeMatrix }, "mediump float compare_float (mediump float a, mediump float b) { return abs(a - b) < 0.05 ? 1.0 : 0.0; }" },
1082 { { dataTypeEquals<glu::TYPE_FLOAT_VEC2>, dataTypeIsMatrixWithNRows<2> }, "mediump float compare_vec2 (mediump vec2 a, mediump vec2 b) { return compare_float(a.x, b.x)*compare_float(a.y, b.y); }" },
1083 { { dataTypeEquals<glu::TYPE_FLOAT_VEC3>, dataTypeIsMatrixWithNRows<3> }, "mediump float compare_vec3 (mediump vec3 a, mediump vec3 b) { return compare_float(a.x, b.x)*compare_float(a.y, b.y)*compare_float(a.z, b.z); }" },
1084 { { dataTypeEquals<glu::TYPE_FLOAT_VEC4>, dataTypeIsMatrixWithNRows<4> }, "mediump float compare_vec4 (mediump vec4 a, mediump vec4 b) { return compare_float(a.x, b.x)*compare_float(a.y, b.y)*compare_float(a.z, b.z)*compare_float(a.w, b.w); }" },
1085 { { dataTypeEquals<glu::TYPE_FLOAT_MAT2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_mat2 (mediump mat2 a, mediump mat2 b) { return compare_vec2(a[0], b[0])*compare_vec2(a[1], b[1]); }" },
1086 { { dataTypeEquals<glu::TYPE_FLOAT_MAT2X3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_mat2x3 (mediump mat2x3 a, mediump mat2x3 b){ return compare_vec3(a[0], b[0])*compare_vec3(a[1], b[1]); }" },
1087 { { dataTypeEquals<glu::TYPE_FLOAT_MAT2X4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_mat2x4 (mediump mat2x4 a, mediump mat2x4 b){ return compare_vec4(a[0], b[0])*compare_vec4(a[1], b[1]); }" },
1088 { { dataTypeEquals<glu::TYPE_FLOAT_MAT3X2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_mat3x2 (mediump mat3x2 a, mediump mat3x2 b){ return compare_vec2(a[0], b[0])*compare_vec2(a[1], b[1])*compare_vec2(a[2], b[2]); }" },
1089 { { dataTypeEquals<glu::TYPE_FLOAT_MAT3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_mat3 (mediump mat3 a, mediump mat3 b) { return compare_vec3(a[0], b[0])*compare_vec3(a[1], b[1])*compare_vec3(a[2], b[2]); }" },
1090 { { dataTypeEquals<glu::TYPE_FLOAT_MAT3X4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_mat3x4 (mediump mat3x4 a, mediump mat3x4 b){ return compare_vec4(a[0], b[0])*compare_vec4(a[1], b[1])*compare_vec4(a[2], b[2]); }" },
1091 { { dataTypeEquals<glu::TYPE_FLOAT_MAT4X2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_mat4x2 (mediump mat4x2 a, mediump mat4x2 b){ return compare_vec2(a[0], b[0])*compare_vec2(a[1], b[1])*compare_vec2(a[2], b[2])*compare_vec2(a[3], b[3]); }" },
1092 { { dataTypeEquals<glu::TYPE_FLOAT_MAT4X3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_mat4x3 (mediump mat4x3 a, mediump mat4x3 b){ return compare_vec3(a[0], b[0])*compare_vec3(a[1], b[1])*compare_vec3(a[2], b[2])*compare_vec3(a[3], b[3]); }" },
1093 { { dataTypeEquals<glu::TYPE_FLOAT_MAT4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_mat4 (mediump mat4 a, mediump mat4 b) { return compare_vec4(a[0], b[0])*compare_vec4(a[1], b[1])*compare_vec4(a[2], b[2])*compare_vec4(a[3], b[3]); }" },
1094 { { dataTypeEquals<glu::TYPE_INT>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_int (mediump int a, mediump int b) { return a == b ? 1.0 : 0.0; }" },
1095 { { dataTypeEquals<glu::TYPE_INT_VEC2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_ivec2 (mediump ivec2 a, mediump ivec2 b) { return a == b ? 1.0 : 0.0; }" },
1096 { { dataTypeEquals<glu::TYPE_INT_VEC3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_ivec3 (mediump ivec3 a, mediump ivec3 b) { return a == b ? 1.0 : 0.0; }" },
1097 { { dataTypeEquals<glu::TYPE_INT_VEC4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_ivec4 (mediump ivec4 a, mediump ivec4 b) { return a == b ? 1.0 : 0.0; }" },
1098 { { dataTypeEquals<glu::TYPE_UINT>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_uint (mediump uint a, mediump uint b) { return a == b ? 1.0 : 0.0; }" },
1099 { { dataTypeEquals<glu::TYPE_UINT_VEC2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_uvec2 (mediump uvec2 a, mediump uvec2 b) { return a == b ? 1.0 : 0.0; }" },
1100 { { dataTypeEquals<glu::TYPE_UINT_VEC3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_uvec3 (mediump uvec3 a, mediump uvec3 b) { return a == b ? 1.0 : 0.0; }" },
1101 { { dataTypeEquals<glu::TYPE_UINT_VEC4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_uvec4 (mediump uvec4 a, mediump uvec4 b) { return a == b ? 1.0 : 0.0; }" },
1102 { { dataTypeEquals<glu::TYPE_BOOL>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_bool (bool a, bool b) { return a == b ? 1.0 : 0.0; }" },
1103 { { dataTypeEquals<glu::TYPE_BOOL_VEC2>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_bvec2 (bvec2 a, bvec2 b) { return a == b ? 1.0 : 0.0; }" },
1104 { { dataTypeEquals<glu::TYPE_BOOL_VEC3>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_bvec3 (bvec3 a, bvec3 b) { return a == b ? 1.0 : 0.0; }" },
1105 { { dataTypeEquals<glu::TYPE_BOOL_VEC4>, dataTypeEquals<glu::TYPE_INVALID> }, "mediump float compare_bvec4 (bvec4 a, bvec4 b) { return a == b ? 1.0 : 0.0; }" }
1108 const vector<glu::DataType> samplerTypes = m_uniformCollection->getSamplerTypes();
1117 if (glu::isDataTypeSampler(samplerTypes[i]))
1119 const glu::DataType retType = getSamplerLookupReturnType(samplerTypes[i]);
1136 if (glu::isDataTypeSampler(uniform.type))
1137 dst << "compare_" << glu::getDataTypeName(getSamplerLookupReturnType(uniform.type)) << "(texture(" << uniform.name << ", vec" << getSamplerNumLookupDimensions(uniform.type) << "(0.0))";
1139 dst << "compare_" << glu::getDataTypeName(uniform.type) << "(" << uniform.name;
1222 DE_ASSERT(getSamplerLookupReturnType(value.type) == glu::TYPE_FLOAT_VEC4);
1228 if (value.type == glu::TYPE_SAMPLER_2D)
1230 glu::Texture2D* texture = new glu::Texture2D(m_context.getRenderContext(), GL_RGBA, GL_UNSIGNED_BYTE, width, height);
1245 else if (value.type == glu::TYPE_SAMPLER_CUBE)
1248 glu::TextureCube* texture = new glu::TextureCube(m_context.getRenderContext(), GL_RGBA, GL_UNSIGNED_BYTE, width);
1283 const int size = glu::getDataTypeScalarSize(uniform.type);
1290 value.type = glu::TYPE_INVALID;
1306 if (glu::isDataTypeFloatOrVec(uniform.type) || glu::isDataTypeMatrix(uniform.type))
1308 else if (glu::isDataTypeIntOrIVec(uniform.type))
1310 else if (glu::isDataTypeUintOrUVec(uniform.type))
1312 else if (glu::isDataTypeBoolOrBVec(uniform.type))
1333 else if (glu::isDataTypeSampler(uniform.type))
1355 const glu::DataType boolApiType = m_features & FEATURE_BOOLEANAPITYPE_INT ? glu::TYPE_INT
1356 : m_features & FEATURE_BOOLEANAPITYPE_UINT ? glu::TYPE_UINT
1357 : glu::TYPE_FLOAT;
1379 const int typeSize = glu::getDataTypeScalarSize(uniform.type);
1380 const bool assignByValue = m_features & FEATURE_UNIFORMFUNC_VALUE && !glu::isDataTypeMatrix(uniform.type) && numValuesToAssign == 1;
1398 const VarValue apiValue = glu::isDataTypeBoolOrBVec(unifValue.type) ? getRandomBoolRepresentation(unifValue, boolApiType, rnd)
1399 : glu::isDataTypeSampler(unifValue.type) ? getSamplerUnitValue(unifValue)
1402 valuesToAssign.push_back(glu::isDataTypeMatrix(apiValue.type) && transpose ? getTransposeMatrix(apiValue) : apiValue);
1404 if (glu::isDataTypeBoolOrBVec(uniform.type))
1405 log << TestLog::Message << "// Using type " << glu::getDataTypeName(boolApiType) << " to set boolean value " << apiVarValueStr(unifValue) << " for " << curName << TestLog::EndMessage;
1406 else if (glu::isDataTypeSampler(uniform.type))
1412 if (glu::isDataTypeFloatOrVec(valuesToAssign[0].type))
1446 else if (glu::isDataTypeMatrix(valuesToAssign[0].type))
1457 case glu::TYPE_FLOAT_MAT2: GLU_CHECK_CALL(glProgramUniformMatrix2fv (programGL, location, (GLsizei)valuesToAssign.size(), transposeGL, &buffer[0])); break;
1458 case glu::TYPE_FLOAT_MAT3: GLU_CHECK_CALL(glProgramUniformMatrix3fv (programGL, location, (GLsizei)valuesToAssign.size(), transposeGL, &buffer[0])); break;
1459 case glu::TYPE_FLOAT_MAT4: GLU_CHECK_CALL(glProgramUniformMatrix4fv (programGL, location, (GLsizei)valuesToAssign.size(), transposeGL, &buffer[0])); break;
1460 case glu::TYPE_FLOAT_MAT2X3: GLU_CHECK_CALL(glProgramUniformMatrix2x3fv (programGL, location, (GLsizei)valuesToAssign.size(), transposeGL, &buffer[0])); break;
1461 case glu::TYPE_FLOAT_MAT2X4: GLU_CHECK_CALL(glProgramUniformMatrix2x4fv (programGL, location, (GLsizei)valuesToAssign.size(), transposeGL, &buffer[0])); break;
1462 case glu::TYPE_FLOAT_MAT3X2: GLU_CHECK_CALL(glProgramUniformMatrix3x2fv (programGL, location, (GLsizei)valuesToAssign.size(), transposeGL, &buffer[0])); break;
1463 case glu::TYPE_FLOAT_MAT3X4: GLU_CHECK_CALL(glProgramUniformMatrix3x4fv (programGL, location, (GLsizei)valuesToAssign.size(), transposeGL, &buffer[0])); break;
1464 case glu::TYPE_FLOAT_MAT4X2: GLU_CHECK_CALL(glProgramUniformMatrix4x2fv (programGL, location, (GLsizei)valuesToAssign.size(), transposeGL, &buffer[0])); break;
1465 case glu::TYPE_FLOAT_MAT4X3: GLU_CHECK_CALL(glProgramUniformMatrix4x3fv (programGL, location, (GLsizei)valuesToAssign.size(), transposeGL, &buffer[0])); break;
1470 else if (glu::isDataTypeIntOrIVec(valuesToAssign[0].type))
1504 else if (glu::isDataTypeUintOrUVec(valuesToAssign[0].type))
1538 else if (glu::isDataTypeSampler(valuesToAssign[0].type))
1565 if (unifValue.type == glu::TYPE_INVALID) // This happens when glGetUniformLocation() returned -1.
1591 if (glu::isDataTypeSampler(basicUniforms[i].type))
1595 if (glu::isDataTypeSampler(basicUniforms[j].type) && basicUniforms[i].type != basicUniforms[j].type)
1603 if (glu::isDataTypeSampler(basicUniforms[i].type) && std::find(m_filledTextureUnits.begin(), m_filledTextureUnits.end(), basicUniforms[i].finalValue.val.samplerV.unit) == m_filledTextureUnits.end())
1624 const glu::VertexArrayBinding binding = glu::va::Float("a_position", 4, 4, 0, &position[0]);
1626 glu::draw(m_context.getRenderContext(), program.getProgram(), 1, &binding, glu::pr::Triangles(DE_LENGTH_OF_ARRAY(indices), &indices[0]));
1627 glu::readPixels(m_context.getRenderContext(), viewportX, viewportY, renderedImg.getAccess());
1668 const ShaderProgram program (m_context.getRenderContext(), glu::makeVtxFragSources(vertexSource, fragmentSource));
1674 const ShaderProgram dummyProgram (m_context.getRenderContext(), glu::makeVtxFragSources("#version 310 es\n"
1909 const glu::DataType dataType = s_testDataTypes[dataTypeNdx];
1910 const char* const typeName = glu::getDataTypeName(dataType);
1914 if (glu::isDataTypeScalar(dataType) ||
1915 (glu::isDataTypeVector(dataType) && glu::getDataTypeScalarSize(dataType) == 4) ||
1916 dataType == glu::TYPE_FLOAT_MAT4 ||
1917 dataType == glu::TYPE_SAMPLER_2D)
1920 if (glu::isDataTypeScalar(dataType) ||
1921 dataType == glu::TYPE_FLOAT_MAT4 ||
1922 dataType == glu::TYPE_SAMPLER_2D)
1924 const glu::DataType secondDataType = glu::isDataTypeScalar(dataType) ? glu::getDataTypeVector(dataType, 4)
1925 : dataType == glu::TYPE_FLOAT_MAT4 ? glu::TYPE_FLOAT_MAT2
1926 : dataType == glu::TYPE_SAMPLER_2D ? glu::TYPE_SAMPLER_CUBE
1927 : glu::TYPE_LAST;
1928 DE_ASSERT(secondDataType != glu::TYPE_LAST);
1929 const char* const secondTypeName = glu::getDataTypeName(secondDataType);
1972 const bool containsBooleans = uniformCollection->containsMatchingBasicType(glu::isDataTypeBoolOrBVec);
1976 const bool containsMatrices = uniformCollection->containsMatchingBasicType(glu::isDataTypeMatrix);