Lines Matching refs:glu
71 const glu::VarType& type;
74 VarValue (const glu::VarType& type_, const void* value_) : type(type_), value(value_) {}
81 const glu::DataType basicType = varValue.type.getBasicType();
82 const glu::DataType scalarType = glu::getDataTypeScalarType(basicType);
83 const int numComponents = glu::getDataTypeScalarSize(basicType);
86 str << glu::getDataTypeName(basicType) << "(";
95 case glu::TYPE_FLOAT: str << HexFloat(((const float*)varValue.value)[compNdx]); break;
96 case glu::TYPE_INT: str << ((const deInt32*)varValue.value)[compNdx]; break;
97 case glu::TYPE_UINT: str << tcu::toHex(((const deUint32*)varValue.value)[compNdx]); break;
98 case glu::TYPE_BOOL: str << (((const deUint32*)varValue.value)[compNdx] != 0 ? "true" : "false"); break;
111 inline int getShaderUintBitCount (glu::ShaderType shaderType, glu::Precision precision)
116 DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(bitCounts) == glu::PRECISION_LAST);
137 static void generateRandomInputData (de::Random& rnd, glu::ShaderType shaderType, glu::DataType dataType, glu::Precision precision, deUint32* dst, int numValues)
139 const int scalarSize = glu::getDataTypeScalarSize(dataType);
142 const bool isUnsigned = glu::isDataTypeUintOrUVec(dataType);
165 IntegerFunctionCase (Context& context, const char* name, const char* description, glu::ShaderType shaderType);
179 glu::ShaderType m_shaderType;
189 IntegerFunctionCase::IntegerFunctionCase (Context& context, const char* name, const char* description, glu::ShaderType shaderType)
195 m_spec.version = glu::getContextTypeGLSLVersion(context.getRenderContext().getType());
322 static std::string getIntegerFuncCaseName (glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
324 return string(glu::getDataTypeName(baseType)) + getPrecisionPostfix(precision) + getShaderTypePostfix(shaderType);
330 UaddCarryCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
333 m_spec.inputs.push_back(Symbol("x", glu::VarType(baseType, precision)));
334 m_spec.inputs.push_back(Symbol("y", glu::VarType(baseType, precision)));
335 m_spec.outputs.push_back(Symbol("sum", glu::VarType(baseType, precision)));
336 m_spec.outputs.push_back(Symbol("carry", glu::VarType(baseType, glu::PRECISION_LOWP)));
343 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
344 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
345 const int scalarSize = glu::getDataTypeScalarSize(type);
348 const bool isSigned = glu::isDataTypeIntOrIVec(type);
397 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
398 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
399 const int scalarSize = glu::getDataTypeScalarSize(type);
426 UsubBorrowCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
429 m_spec.inputs.push_back(Symbol("x", glu::VarType(baseType, precision)));
430 m_spec.inputs.push_back(Symbol("y", glu::VarType(baseType, precision)));
431 m_spec.outputs.push_back(Symbol("diff", glu::VarType(baseType, precision)));
432 m_spec.outputs.push_back(Symbol("carry", glu::VarType(baseType, glu::PRECISION_LOWP)));
439 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
440 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
441 const int scalarSize = glu::getDataTypeScalarSize(type);
444 const bool isSigned = glu::isDataTypeIntOrIVec(type);
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);
520 UmulExtendedCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
523 m_spec.inputs.push_back(Symbol("x", glu::VarType(baseType, precision)));
524 m_spec.inputs.push_back(Symbol("y", glu::VarType(baseType, precision)));
525 m_spec.outputs.push_back(Symbol("msb", glu::VarType(baseType, precision)));
526 m_spec.outputs.push_back(Symbol("lsb", glu::VarType(baseType, precision)));
533 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
534 // const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
535 const int scalarSize = glu::getDataTypeScalarSize(type);
583 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
584 const int scalarSize = glu::getDataTypeScalarSize(type);
610 ImulExtendedCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
613 m_spec.inputs.push_back(Symbol("x", glu::VarType(baseType, precision)));
614 m_spec.inputs.push_back(Symbol("y", glu::VarType(baseType, precision)));
615 m_spec.outputs.push_back(Symbol("msb", glu::VarType(baseType, precision)));
616 m_spec.outputs.push_back(Symbol("lsb", glu::VarType(baseType, precision)));
623 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
624 // const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
625 const int scalarSize = glu::getDataTypeScalarSize(type);
674 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
675 const int scalarSize = glu::getDataTypeScalarSize(type);
701 BitfieldExtractCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
704 m_spec.inputs.push_back(Symbol("value", glu::VarType(baseType, precision)));
705 m_spec.inputs.push_back(Symbol("offset", glu::VarType(glu::TYPE_INT, precision)));
706 m_spec.inputs.push_back(Symbol("bits", glu::VarType(glu::TYPE_INT, precision)));
707 m_spec.outputs.push_back(Symbol("extracted", glu::VarType(baseType, precision)));
714 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
715 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
716 const bool ignoreSign = precision != glu::PRECISION_HIGHP && glu::isDataTypeIntOrIVec(type);
736 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
737 const bool isSigned = glu::isDataTypeIntOrIVec(type);
738 const int scalarSize = glu::getDataTypeScalarSize(type);
774 BitfieldInsertCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
777 m_spec.inputs.push_back(Symbol("base", glu::VarType(baseType, precision)));
778 m_spec.inputs.push_back(Symbol("insert", glu::VarType(baseType, precision)));
779 m_spec.inputs.push_back(Symbol("offset", glu::VarType(glu::TYPE_INT, precision)));
780 m_spec.inputs.push_back(Symbol("bits", glu::VarType(glu::TYPE_INT, precision)));
781 m_spec.outputs.push_back(Symbol("result", glu::VarType(baseType, precision)));
788 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
789 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
811 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
812 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
813 const int scalarSize = glu::getDataTypeScalarSize(type);
851 BitfieldReverseCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
854 m_spec.inputs.push_back(Symbol("value", glu::VarType(baseType, precision)));
855 m_spec.outputs.push_back(Symbol("result", glu::VarType(baseType, glu::PRECISION_HIGHP)));
862 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
863 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
871 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
872 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
874 const int scalarSize = glu::getDataTypeScalarSize(type);
897 BitCountCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
900 const int vecSize = glu::getDataTypeScalarSize(baseType);
901 const glu::DataType intType = vecSize == 1 ? glu::TYPE_INT : glu::getDataTypeIntVec(vecSize);
903 m_spec.inputs.push_back(Symbol("value", glu::VarType(baseType, precision)));
904 m_spec.outputs.push_back(Symbol("count", glu::VarType(intType, glu::PRECISION_LOWP)));
911 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
912 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
920 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
921 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
923 const int scalarSize = glu::getDataTypeScalarSize(type);
957 FindLSBCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
960 const int vecSize = glu::getDataTypeScalarSize(baseType);
961 const glu::DataType intType = vecSize == 1 ? glu::TYPE_INT : glu::getDataTypeIntVec(vecSize);
963 m_spec.inputs.push_back(Symbol("value", glu::VarType(baseType, precision)));
964 m_spec.outputs.push_back(Symbol("lsb", glu::VarType(intType, glu::PRECISION_LOWP)));
971 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
972 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
980 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
981 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
982 const int scalarSize = glu::getDataTypeScalarSize(type);
1017 FindMSBCase (Context& context, glu::DataType baseType, glu::Precision precision, glu::ShaderType shaderType)
1020 const int vecSize = glu::getDataTypeScalarSize(baseType);
1021 const glu::DataType intType = vecSize == 1 ? glu::TYPE_INT : glu::getDataTypeIntVec(vecSize);
1023 m_spec.inputs.push_back(Symbol("value", glu::VarType(baseType, precision)));
1024 m_spec.outputs.push_back(Symbol("msb", glu::VarType(intType, glu::PRECISION_LOWP)));
1031 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1032 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1040 const glu::DataType type = m_spec.inputs[0].varType.getBasicType();
1041 const glu::Precision precision = m_spec.inputs[0].varType.getPrecision();
1042 const bool isSigned = glu::isDataTypeIntOrIVec(type);
1043 const int scalarSize = glu::getDataTypeScalarSize(type);
1079 const glu::DataType scalarTypes[] =
1081 glu::TYPE_INT,
1082 glu::TYPE_UINT
1087 const glu::DataType scalarType = scalarTypes[scalarTypeNdx];
1089 if ((!intTypes && scalarType == glu::TYPE_INT) || (!uintTypes && scalarType == glu::TYPE_UINT))
1094 for (int prec = glu::PRECISION_LOWP; prec <= glu::PRECISION_HIGHP; prec++)
1096 if (prec != glu::PRECISION_HIGHP && !allPrec)
1099 for (int shaderTypeNdx = 0; shaderTypeNdx < glu::SHADERTYPE_LAST; shaderTypeNdx++)
1102 group->addChild(new TestClass(parent->getContext(), glu::DataType(scalarType + vecSize - 1), glu::Precision(prec), glu::ShaderType(shaderTypeNdx)));
1113 VS = (1<<glu::SHADERTYPE_VERTEX),
1114 FS = (1<<glu::SHADERTYPE_FRAGMENT),
1115 CS = (1<<glu::SHADERTYPE_COMPUTE),
1116 GS = (1<<glu::SHADERTYPE_GEOMETRY),
1117 TC = (1<<glu::SHADERTYPE_TESSELLATION_CONTROL),
1118 TE = (1<<glu::SHADERTYPE_TESSELLATION_EVALUATION),