Lines Matching refs:glu

110 inline bool supportsSignedZero (glu::Precision precision)
114 return precision == glu::PRECISION_HIGHP;
136 static int getMinMantissaBits (glu::Precision precision)
144 DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(bits) == glu::PRECISION_LAST);
154 CommonFunctionCase (Context& context, const char* name, const char* description, glu::ShaderType shaderType);
168 glu::ShaderType m_shaderType;
178 CommonFunctionCase::CommonFunctionCase (Context& context, const char* name, const char* description, glu::ShaderType shaderType)
184 m_spec.version = glu::GLSL_VERSION_300_ES;
245 // \todo [2013-08-08 pyry] Make generic utility and move to glu?
271 const glu::VarType& type;
274 VarValue (const glu::VarType& type_, const void* value_) : type(type_), value(value_) {}
281 const glu::DataType basicType = varValue.type.getBasicType();
282 const glu::DataType scalarType = glu::getDataTypeScalarType(basicType);
283 const int numComponents = glu::getDataTypeScalarSize(basicType);
286 str << glu::getDataTypeName(basicType) << "(";
295 case glu::TYPE_FLOAT: str << HexFloat(((const float*)varValue.value)[compNdx]); break;
296 case glu::TYPE_INT: str << ((const deInt32*)varValue.value)[compNdx]; break;
297 case glu::TYPE_UINT: str << tcu::toHex(((const deUint32*)varValue.value)[compNdx]); break;
298 case glu::TYPE_BOOL: str << HexBool(((const deUint32*)varValue.value)[compNdx]); break;
377 static std::string getCommonFuncCaseName (glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
379 return string(glu::getDataTypeName(baseType)) + getPrecisionPostfix(precision) + getShaderTypePostfix(shaderType);
385 AbsCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
388 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
389 m_spec.outputs.push_back(Symbol("out0", glu::VarType(baseType, precision)));
409 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
410 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
411 const int scalarSize = glu::getDataTypeScalarSize(type);
413 if (glu::isDataTypeFloatOrVec(type))
421 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
422 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
423 const int scalarSize = glu::getDataTypeScalarSize(type);
425 if (glu::isDataTypeFloatOrVec(type))
467 SignCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
470 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
471 m_spec.outputs.push_back(Symbol("out0", glu::VarType(baseType, precision)));
491 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
492 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
493 const int scalarSize = glu::getDataTypeScalarSize(type);
495 if (glu::isDataTypeFloatOrVec(type))
514 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
515 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
516 const int scalarSize = glu::getDataTypeScalarSize(type);
518 if (glu::isDataTypeFloatOrVec(type))
521 const deUint32 maxUlpDiff = precision == glu::PRECISION_LOWP ? getMaxUlpDiffFromBits(getMinMantissaBits(precision)) : 0;
573 RoundEvenCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
576 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
577 m_spec.outputs.push_back(Symbol("out0", glu::VarType(baseType, precision)));
591 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
592 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
593 const int scalarSize = glu::getDataTypeScalarSize(type);
597 if (precision != glu::PRECISION_LOWP)
612 if (precision == glu::PRECISION_MEDIUMP)
621 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
622 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
624 const int scalarSize = glu::getDataTypeScalarSize(type);
626 if (precision == glu::PRECISION_HIGHP || precision == glu::PRECISION_MEDIUMP)
684 ModfCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
687 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
688 m_spec.outputs.push_back(Symbol("out0", glu::VarType(baseType, precision)));
689 m_spec.outputs.push_back(Symbol("out1", glu::VarType(baseType, precision)));
703 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
704 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
705 const int scalarSize = glu::getDataTypeScalarSize(type);
712 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
713 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
715 const int scalarSize = glu::getDataTypeScalarSize(type);
728 const int bitsLost = precision != glu::PRECISION_HIGHP ? numBitsLostInOp(in0, refOut0) : 0;
750 IsnanCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
753 DE_ASSERT(glu::isDataTypeFloatOrVec(baseType));
755 const int vecSize = glu::getDataTypeScalarSize(baseType);
756 const glu::DataType boolType = vecSize > 1 ? glu::getDataTypeBoolVec(vecSize) : glu::TYPE_BOOL;
758 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
759 m_spec.outputs.push_back(Symbol("out0", glu::VarType(boolType, glu::PRECISION_LAST)));
766 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
767 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
768 const int scalarSize = glu::getDataTypeScalarSize(type);
789 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
790 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
791 const int scalarSize = glu::getDataTypeScalarSize(type);
793 if (precision == glu::PRECISION_HIGHP)
831 IsinfCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
834 DE_ASSERT(glu::isDataTypeFloatOrVec(baseType));
836 const int vecSize = glu::getDataTypeScalarSize(baseType);
837 const glu::DataType boolType = vecSize > 1 ? glu::getDataTypeBoolVec(vecSize) : glu::TYPE_BOOL;
839 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
840 m_spec.outputs.push_back(Symbol("out0", glu::VarType(boolType, glu::PRECISION_LAST)));
847 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
848 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
849 const int scalarSize = glu::getDataTypeScalarSize(type);
870 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
871 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
872 const int scalarSize = glu::getDataTypeScalarSize(type);
874 if (precision == glu::PRECISION_HIGHP)
912 FloatBitsToUintIntCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType, bool outIsSigned)
915 const int vecSize = glu::getDataTypeScalarSize(baseType);
916 const glu::DataType intType = outIsSigned ? (vecSize > 1 ? glu::getDataTypeIntVec(vecSize) : glu::TYPE_INT)
917 : (vecSize > 1 ? glu::getDataTypeUintVec(vecSize) : glu::TYPE_UINT);
919 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
920 m_spec.outputs.push_back(Symbol("out0", glu::VarType(intType, glu::PRECISION_HIGHP)));
934 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
935 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
936 const int scalarSize = glu::getDataTypeScalarSize(type);
943 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
944 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
945 const int scalarSize = glu::getDataTypeScalarSize(type);
972 FloatBitsToIntCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
981 FloatBitsToUintCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
990 BitsToFloatCase (Context& context, glu::DataType baseType, glu::ShaderType shaderType)
991 : CommonFunctionCase(context, getCommonFuncCaseName(baseType, glu::PRECISION_HIGHP, shaderType).c_str(), glu::isDataTypeIntOrIVec(baseType) ? "intBitsToFloat" : "uintBitsToFloat", shaderType)
993 const bool inIsSigned = glu::isDataTypeIntOrIVec(baseType);
994 const int vecSize = glu::getDataTypeScalarSize(baseType);
995 const glu::DataType floatType = vecSize > 1 ? glu::getDataTypeFloatVec(vecSize) : glu::TYPE_FLOAT;
997 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, glu::PRECISION_HIGHP)));
998 m_spec.outputs.push_back(Symbol("out0", glu::VarType(floatType, glu::PRECISION_HIGHP)));
1005 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1006 const int scalarSize = glu::getDataTypeScalarSize(type);
1015 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1016 const int scalarSize = glu::getDataTypeScalarSize(type);
1040 FloorCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
1043 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
1044 m_spec.outputs.push_back(Symbol("out0", glu::VarType(baseType, precision)));
1058 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1059 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1060 const int scalarSize = glu::getDataTypeScalarSize(type);
1065 if (precision == glu::PRECISION_MEDIUMP)
1074 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1075 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1076 const int scalarSize = glu::getDataTypeScalarSize(type);
1078 if (precision == glu::PRECISION_HIGHP || precision == glu::PRECISION_MEDIUMP)
1136 TruncCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
1139 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
1140 m_spec.outputs.push_back(Symbol("out0", glu::VarType(baseType, precision)));
1154 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1155 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1156 const int scalarSize = glu::getDataTypeScalarSize(type);
1171 if (precision == glu::PRECISION_MEDIUMP)
1180 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1181 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1182 const int scalarSize = glu::getDataTypeScalarSize(type);
1184 if (precision == glu::PRECISION_HIGHP || precision == glu::PRECISION_MEDIUMP)
1244 RoundCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
1247 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
1248 m_spec.outputs.push_back(Symbol("out0", glu::VarType(baseType, precision)));
1262 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1263 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1264 const int scalarSize = glu::getDataTypeScalarSize(type);
1268 if (precision != glu::PRECISION_LOWP)
1283 if (precision == glu::PRECISION_MEDIUMP)
1292 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1293 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1295 const int scalarSize = glu::getDataTypeScalarSize(type);
1297 if (precision == glu::PRECISION_HIGHP || precision == glu::PRECISION_MEDIUMP)
1372 CeilCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
1375 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
1376 m_spec.outputs.push_back(Symbol("out0", glu::VarType(baseType, precision)));
1390 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1391 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1392 const int scalarSize = glu::getDataTypeScalarSize(type);
1398 if (precision == glu::PRECISION_MEDIUMP)
1407 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1408 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1410 const int scalarSize = glu::getDataTypeScalarSize(type);
1412 if (precision == glu::PRECISION_HIGHP || precision == glu::PRECISION_MEDIUMP)
1477 FractCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
1480 m_spec.inputs.push_back(Symbol("in0", glu::VarType(baseType, precision)));
1481 m_spec.outputs.push_back(Symbol("out0", glu::VarType(baseType, precision)));
1495 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1496 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1497 const int scalarSize = glu::getDataTypeScalarSize(type);
1501 if (precision != glu::PRECISION_LOWP)
1516 if (precision == glu::PRECISION_MEDIUMP)
1525 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1526 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1528 const int scalarSize = glu::getDataTypeScalarSize(type);
1530 if (precision == glu::PRECISION_HIGHP || precision == glu::PRECISION_MEDIUMP)
1601 const glu::DataType scalarTypes[] =
1603 glu::TYPE_FLOAT,
1604 glu::TYPE_INT,
1605 glu::TYPE_UINT
1610 const glu::DataType scalarType = scalarTypes[scalarTypeNdx];
1612 if ((!floatTypes && scalarType == glu::TYPE_FLOAT) ||
1613 (!intTypes && scalarType == glu::TYPE_INT) ||
1614 (!uintTypes && scalarType == glu::TYPE_UINT))
1619 for (int prec = glu::PRECISION_LOWP; prec <= glu::PRECISION_HIGHP; prec++)
1621 for (int shaderType = glu::SHADERTYPE_VERTEX; shaderType <= glu::SHADERTYPE_FRAGMENT; shaderType++)
1622 group->addChild(new TestClass(parent->getContext(), glu::DataType(scalarType + vecSize - 1), glu::Precision(prec), glu::ShaderType(shaderType)));
1662 const glu::DataType intType = vecSize > 1 ? glu::getDataTypeIntVec(vecSize) : glu::TYPE_INT;
1663 const glu::DataType uintType = vecSize > 1 ? glu::getDataTypeUintVec(vecSize) : glu::TYPE_UINT;
1665 for (int shaderType = glu::SHADERTYPE_VERTEX; shaderType <= glu::SHADERTYPE_FRAGMENT; shaderType++)
1667 intGroup->addChild(new BitsToFloatCase(m_context, intType, glu::ShaderType(shaderType)));
1668 uintGroup->addChild(new BitsToFloatCase(m_context, uintType, glu::ShaderType(shaderType)));