Lines Matching defs:value

516 static string shaderVarValueStr (const VarValue& value)
518 const int numElems = glu::getDataTypeScalarSize(value.type);
522 result << glu::getDataTypeName(value.type) << "(";
529 if (glu::isDataTypeFloatOrVec(value.type) || glu::isDataTypeMatrix(value.type))
530 result << de::floatToString(value.val.floatV[i], 2);
531 else if (glu::isDataTypeIntOrIVec((value.type)))
532 result << de::toString(value.val.intV[i]);
533 else if (glu::isDataTypeBoolOrBVec((value.type)))
534 result << (value.val.boolV[i] ? "true" : "false");
535 else if (glu::isDataTypeSampler((value.type)))
536 result << shaderVarValueStr(getSamplerFillValue(value));
547 static string apiVarValueStr (const VarValue& value)
549 const int numElems = glu::getDataTypeScalarSize(value.type);
560 if (glu::isDataTypeFloatOrVec(value.type) || glu::isDataTypeMatrix(value.type))
561 result << de::floatToString(value.val.floatV[i], 2);
562 else if (glu::isDataTypeIntOrIVec((value.type)))
563 result << de::toString(value.val.intV[i]);
564 else if (glu::isDataTypeBoolOrBVec((value.type)))
565 result << (value.val.boolV[i] ? "true" : "false");
566 else if (glu::isDataTypeSampler((value.type)))
567 result << value.val.samplerV.unit;
756 // UNIFORMFUNC_VALUE: use pass-by-value versions of uniform assignment funcs, e.g. glUniform1f(), where possible. If not given, use pass-by-pointer versions.
792 VarValue finalValue; //!< The value we ultimately want to set for this uniform.
870 // Check that every uniform has the default (zero) value.
872 // Assign the basicUniforms[].finalValue values for uniforms. \note rnd parameter is for booleans (true can be any nonzero value).
904 void setupTexture (const VarValue& value);
1007 const VarValue value = m_features & FEATURE_UNIFORMVALUE_ZERO ? generateZeroVarValue(type)
1011 basicUniformsDst.push_back(BasicUniform(varName, varType.getBasicType(), isActive, value));
1033 const VarValue value = m_features & FEATURE_UNIFORMVALUE_ZERO ? generateZeroVarValue(elemBasicType)
1037 basicUniformsDst.push_back(BasicUniform(indexedName.c_str(), elemBasicType, isCurElemActive, value, arrayRootName.c_str(), elemNdx, size));
1196 void UniformCase::setupTexture (const VarValue& value)
1202 const tcu::Vec4 color = vec4FromPtr(&value.val.samplerV.fillColor[0]);
1204 if (value.type == glu::TYPE_SAMPLER_2D)
1213 GLU_CHECK_CALL(glActiveTexture(GL_TEXTURE0 + value.val.samplerV.unit));
1214 m_filledTextureUnits.push_back(value.val.samplerV.unit);
1221 else if (value.type == glu::TYPE_SAMPLER_CUBE)
1235 GLU_CHECK_CALL(glActiveTexture(GL_TEXTURE0 + value.val.samplerV.unit));
1236 m_filledTextureUnits.push_back(value.val.samplerV.unit);
1358 VarValue value;
1360 deMemset(&value, 0xcd, sizeof(value)); // Initialize to known garbage.
1364 value.type = glu::TYPE_INVALID;
1365 valuesDst.push_back(value);
1374 value.type = uniform.type;
1376 DE_STATIC_ASSERT(sizeof(GLint) == sizeof(value.val.intV[0]));
1377 DE_STATIC_ASSERT(sizeof(GLfloat) == sizeof(value.val.floatV[0]));
1380 GLU_CHECK_CALL(glGetUniformfv(programGL, location, &value.val.floatV[0]));
1382 GLU_CHECK_CALL(glGetUniformiv(programGL, location, &value.val.intV[0]));
1387 GLU_CHECK_CALL(glGetUniformiv(programGL, location, &value.val.intV[0]));
1389 value.val.boolV[i] = value.val.intV[i] != 0;
1393 GLU_CHECK_CALL(glGetUniformfv(programGL, location, &value.val.floatV[0]));
1395 value.val.boolV[i] = value.val.floatV[i] != 0.0f;
1402 value.val.samplerV.unit = unit;
1407 valuesDst.push_back(value);
1409 log << TestLog::Message << "// Got " << uniform.name << " value " << apiVarValueStr(value) << TestLog::EndMessage;
1440 log << TestLog::Message << "// FAILURE: uniform " << uniform.name << " has non-zero initial value" << TestLog::EndMessage; \
1456 log << TestLog::Message << "// FAILURE: uniform " << uniform.name << " has non-zero initial value" << TestLog::EndMessage;
1521 log << TestLog::Message << "// Using type " << glu::getDataTypeName(boolApiType) << " to set boolean value " << apiVarValueStr(unifValue) << " for " << curName << TestLog::EndMessage;
1645 log << TestLog::Message << "// FAILURE: value obtained with glGetUniform*() for uniform " << uniform.name << " differs from value set with glUniform*()" << TestLog::EndMessage;
1807 CHECKMETHOD_RENDER, //!< Check values by rendering with the value-checking shader.
1898 case ASSIGNMETHOD_VALUE: return "Assign values by-value";
1929 const ScopedLogSection section(log, "UniformAssign", "Uniform value assignments");
1940 const ScopedLogSection section(log, "GetUniforms", "Uniform value query");
2028 PERFORM_AND_CHECK(getUniforms(uniformDefaultValues, basicUniforms, programGL), "GetUniformDefaults", "Uniform default value query");
2038 const ScopedLogSection section(log, "UniformAssign", "Uniform value assignments");
2043 PERFORM_AND_CHECK(getUniforms(uniformValues, basicUniforms, programGL), "GetUniforms", "Uniform value query");
2206 TestCaseGroup* const valueGroup = new TestCaseGroup(m_context, "value", "Uniform value tests");