Lines Matching defs:function
1675 /** Returns a string describing GL API function represented by user-provided enum.
1677 * @param func Uniform function to return the string for.
1679 * @return As per description. [?] will be returned if the function was not recognized.
1879 * This function can throw a TestError exception if the implementation misbehaves.
2130 /** Tells whether user-specified uniform function corresponds to one of the
2133 * @param func Uniform function enum to use for the query.
2327 TCU_FAIL("Unrecognized uniform function");
2425 TCU_FAIL("Unrecognized uniform function");
2545 TCU_FAIL("Unrecognized uniform function");
2685 TCU_FAIL("Unrecognized uniform function");
2774 TCU_FAIL("Unrecognized uniform function");
2798 * function (as per spec).
2826 for (int function = static_cast<int>(UNIFORM_FUNCTION_FIRST);
2827 function < static_cast<int>(UNIFORM_FUNCTION_COUNT); function++)
2829 _uniform_function e_function = static_cast<_uniform_function>(function);
2924 TCU_FAIL("Unrecognized function");
2926 } /* switch (function) */
2935 "double-precision uniform function "
2949 * with the function.
2961 /* API function */ /* Uniform location */ /* Count (dv functions only) */
2986 _uniform_function function = (_uniform_function)data[n_check * 3 + 0];
2990 switch (function)
3021 } /* switch (function) */
3026 m_testCtx.getLog() << tcu::TestLog::Message << getUniformFunctionString(function)
3027 << "() function did not generate GL_INVALID_OPERATION error when called for"
3040 * with the function.
3069 for (int function = static_cast<int>(UNIFORM_FUNCTION_FIRST);
3070 function < static_cast<int>(UNIFORM_FUNCTION_COUNT); ++function)
3072 switch (static_cast<_uniform_function>(function))
3131 } /* switch (function) */
3137 << getUniformFunctionString(static_cast<_uniform_function>(function))
3138 << "() function did not generate GL_INVALID_OPERATION error when called for"
3160 for (int function = static_cast<int>(UNIFORM_FUNCTION_FIRST); function < static_cast<int>(UNIFORM_FUNCTION_COUNT);
3161 function++)
3165 switch (static_cast<_uniform_function>(function))
3222 TCU_FAIL("Unrecognized uniform function");
3232 << getUniformFunctionString(static_cast<_uniform_function>(function))
5966 * This function DOES NOT use any GL API. It only calculates & stores the values
6053 /** Initializes all program & shader objects required to run the test. The function also
7278 * This function may throw a TestError exception if GL implementation misbehaves.
7724 * This function can throw a TestError exception if a GL error is detected
7800 * This function may throw a TestError exception if GL implementation reports
8245 * This function can throw TestError exceptions if GL implementation reports
9601 /* Declare main() function */
10286 /** This function should only be called if GL_ARB_vertex_attrib_64bit extension is supported.
10439 * This function can throw TestError exceptions if GL implementation reports
11537 * This function can throw a TestError exception if the implementation misbehaves.
12693 * *_AGAINT_SCALAR enums are used to call glsl function with mixed scalar and genDType arguments.
12811 * arguments for the function in question. The result of the
12815 * Reference function implementation from pre-DEQP CTS framework
12826 BuiltinFunctionTest(deqp::Context& context, std::string caseName, FunctionEnum function,
12832 /** Base class of functionObject. Main goal of it is to keep function details toghether and hide calling code.
12897 /* Typedefs for gl.uniform* function pointers */
12907 functionObject* getFunctionObject(FunctionEnum function, const typeDetails& type);
12924 bool isFunctionImplemented(FunctionEnum function, const typeDetails& type) const;
12938 bool test(FunctionEnum function, const typeDetails& type);
12968 * Rather than writing a new floating point comparison function, I am
12975 /** Implementations of function objects required by "BuiltinFunctionTest"
13072 /** Base of unary function classes
13098 /** Unary function class. It treats input argument as one variable.
13130 /** Unary function class. It treats input argument as separate components.
13234 /** Base of binary function classes.
13272 /** Binary function class. It treats input arguments as two variables.
13309 /** Binary function class. It treats input arguments as separate components.
13353 /** Base of tenary function classes.
13395 /** Tenary function class. It treats input arguments as three variables.
13439 /** Tenary function class. It treats input arguments as separate components.
13488 BuiltinFunctionTest::BuiltinFunctionTest(deqp::Context& context, std::string caseName, FunctionEnum function,
13493 , m_function(function)
13647 /** Get function enumeration
13656 /** Get function name
13888 /** Create instance of function object for given function enumeration and type
13890 * @param function Function enumeration
13895 BuiltinFunctionTest::functionObject* BuiltinFunctionTest::getFunctionObject(FunctionEnum function,
13915 switch (function)
13920 function, "abs", de::abs, variable_type /* res_type */, variable_type /* arg_type */);
13925 function, "ceil", ceil, variable_type /* res_type */, variable_type /* arg_type */);
13929 return new FunctionObject::tenaryByComponent(function, "clamp", Math::clamp, variable_type /* res_type */,
13935 return new FunctionObject::tenaryByComponent(function, "clamp", Math::clamp, variable_type /* res_type */,
13942 function, "cross", tcu::cross);
13949 return new FunctionObject::unary<glw::GLdouble /* ResT */, DMat2 /* ArgT */>(function, "determinant",
13952 return new FunctionObject::unary<glw::GLdouble /* ResT */, DMat3 /* ArgT */>(function, "determinant",
13955 return new FunctionObject::unary<glw::GLdouble /* ResT */, DMat4 /* ArgT */>(function, "determinant",
13967 function, "distance", tcu::distance);
13970 function, "distance", tcu::distance);
13973 function, "distance", tcu::distance);
13986 function, "dot", tcu::dot);
13989 function, "dot", tcu::dot);
13992 function, "dot", tcu::dot);
14005 function, "equal", Math::equal);
14008 function, "equal", Math::equal);
14011 function, "equal", Math::equal);
14025 function, "faceforward", tcu::faceForward);
14029 function, "faceforward", tcu::faceForward);
14033 function, "faceforward", tcu::faceForward);
14043 function, "floor", floor, variable_type /* res_type */, variable_type /* arg_type */);
14047 return new FunctionObject::tenaryByComponent(function, "fma", Math::fma, variable_type /* res_type */,
14054 function, "fract", Math::fract, variable_type /* res_type */, variable_type /* arg_type */);
14060 function, "frexp", Math::frexp, variable_type /* res_type */, variable_type /* arg_type */,
14069 function, "greaterThan", Math::greaterThan);
14072 function, "greaterThan", Math::greaterThan);
14075 function, "greaterThan", Math::greaterThan);
14088 function, "greaterThanEqual", Math::greaterThanEqual);
14091 function, "greaterThanEqual", Math::greaterThanEqual);
14094 function, "greaterThanEqual", Math::greaterThanEqual);
14106 return new FunctionObject::unary<DMat2 /* ResT */, DMat2 /* ArgT */>(function, "inverse", Math::inverse);
14108 return new FunctionObject::unary<DMat3 /* ResT */, DMat3 /* ArgT */>(function, "inverse", Math::inverse);
14110 return new FunctionObject::unary<DMat4 /* ResT */, DMat4 /* ArgT */>(function, "inverse", Math::inverse);
14120 function, "inversesqrt", Math::inverseSqrt, variable_type /* res_type */, variable_type /* arg_type */);
14126 function, "ldexp", ::ldexp, variable_type /* res_type */, variable_type /* arg1_type */,
14135 function, "lessThan", Math::lessThan);
14138 function, "lessThan", Math::lessThan);
14141 function, "lessThan", Math::lessThan);
14154 function, "lessThanEqual", Math::lessThanEqual);
14157 function, "lessThanEqual", Math::lessThanEqual);
14160 function, "lessThanEqual", Math::lessThanEqual);
14172 return new FunctionObject::unary<glw::GLdouble /* ResT */, tcu::DVec2 /* ArgT */>(function, "length",
14175 return new FunctionObject::unary<glw::GLdouble /* ResT */, tcu::DVec3 /* ArgT */>(function, "length",
14178 return new FunctionObject::unary<glw::GLdouble /* ResT */, tcu::DVec4 /* ArgT */>(function, "length",
14190 function, "matrixCompMult", Math::multiply, variable_type /* res_type */, variable_type /* arg1_type */,
14197 function, "max", Math::max, variable_type /* res_type */, variable_type /* arg1_type */,
14204 function, "max", Math::max, variable_type /* res_type */, variable_type /* arg1_type */,
14211 function, "min", Math::min, variable_type /* res_type */, variable_type /* arg1_type */,
14218 function, "min", Math::min, variable_type /* res_type */, variable_type /* arg1_type */,
14223 return new FunctionObject::tenaryByComponent(function, "mix", Math::mix, variable_type /* res_type */,
14231 function, "mod", Math::mod, variable_type /* res_type */, variable_type /* arg1_type */,
14238 function, "mod", Math::mod, variable_type /* res_type */, variable_type /* arg1_type */,
14245 function, "modf", Math::modf, variable_type /* res_type */, variable_type /* arg_type */,
14253 return new FunctionObject::unary<tcu::DVec2 /* ResT */, tcu::DVec2 /* ArgT */>(function, "normalize",
14256 return new FunctionObject::unary<tcu::DVec3 /* ResT */, tcu::DVec3 /* ArgT */>(function, "normalize",
14259 return new FunctionObject::unary<tcu::DVec4 /* ResT */, tcu::DVec4 /* ArgT */>(function, "normalize",
14273 function, "notEqual", Math::notEqual);
14276 function, "notEqual", Math::notEqual);
14279 function, "notEqual", Math::notEqual);
14292 function, "outerProduct", Math::outerProduct);
14295 function, "outerProduct", Math::outerProduct);
14298 function, "outerProduct", Math::outerProduct);
14301 function, "outerProduct", Math::outerProduct);
14304 function, "outerProduct", Math::outerProduct);
14307 function, "outerProduct", Math::outerProduct);
14310 function, "outerProduct", Math::outerProduct);
14313 function, "outerProduct", Math::outerProduct);
14316 function, "outerProduct", Math::outerProduct);
14325 return new FunctionObject::unary<glw::GLdouble /* ResT */, tcu::UVec2 /* ArgT */>(function, "packDouble2x32",
14334 function, "reflect", tcu::reflect);
14337 function, "reflect", tcu::reflect);
14340 function, "reflect", tcu::reflect);
14354 function, "refract", tcu::refract);
14358 function, "refract", tcu::refract);
14362 function, "refract", tcu::refract);
14372 function, "round", Math::round, variable_type /* res_type */, variable_type /* arg_type */);
14377 function, "roundEven", Math::roundEven, variable_type /* res_type */, variable_type /* arg_type */);
14382 function, "sign", Math::sign, variable_type /* res_type */, variable_type /* arg_type */);
14386 return new FunctionObject::tenaryByComponent(function, "smoothstep", Math::smoothStep,
14392 return new FunctionObject::tenaryByComponent(function, "smoothstep", Math::smoothStep,
14399 function, "sqrt", sqrt, variable_type /* res_type */, variable_type /* arg_type */);
14405 function, "step", Math::step, variable_type /* res_type */, variable_type /* arg1_type */,
14412 function, "step", Math::step, variable_type /* res_type */, scalar_type /* arg1_type */,
14420 return new FunctionObject::unary<DMat2 /* ResT */, DMat2 /* ArgT */>(function, "transpose",
14423 return new FunctionObject::unary<DMat2x3 /* ResT */, DMat3x2 /* ArgT */>(function, "transpose",
14426 return new FunctionObject::unary<DMat2x4 /* ResT */, DMat4x2 /* ArgT */>(function, "transpose",
14429 return new FunctionObject::unary<DMat3 /* ResT */, DMat3 /* ArgT */>(function, "transpose",
14432 return new FunctionObject::unary<DMat3x2 /* ResT */, DMat2x3 /* ArgT */>(function, "transpose",
14435 return new FunctionObject::unary<DMat3x4 /* ResT */, DMat4x3 /* ArgT */>(function, "transpose",
14438 return new FunctionObject::unary<DMat4 /* ResT */, DMat4 /* ArgT */>(function, "transpose",
14441 return new FunctionObject::unary<DMat4x2 /* ResT */, DMat2x4 /* ArgT */>(function, "transpose",
14444 return new FunctionObject::unary<DMat4x3 /* ResT */, DMat3x4 /* ArgT */>(function, "transpose",
14455 function, "trunc", Math::trunc, variable_type /* res_type */, variable_type /* arg_type */);
14459 return new FunctionObject::unary<tcu::UVec2 /* ResT */, glw::GLdouble /* ArgT */>(function, "unpackDouble2x32",
14465 function, "isnan", Math::isnan_impl, uint_type /* res_type */, variable_type /* arg_type */);
14470 function, "isinf", Math::isinf_impl, uint_type /* res_type */, variable_type /* arg_type */);
14650 /** Check if given combination of function and type is implemented
14652 * @param function Function enumeration
14655 * @return true if function is available for given type, false otherwise
14657 bool BuiltinFunctionTest::isFunctionImplemented(FunctionEnum function, const typeDetails& type) const
14713 bool result = look_up_table[function][type.m_general_type];
14717 switch (function)
14953 /** Prepare input data and expected results for given function object
14982 /** Prepare source code of vertex shader for given function object. Result is stored in m_vertex_shader_code.
15107 /** Test single function with one type
15109 * param function Function enumeration
15112 * @return true if test pass (or function is not available for <type>), false otherwise
15114 bool BuiltinFunctionTest::test(FunctionEnum function, const typeDetails& type)
15118 /* Skip if function is not implemented for type */
15119 if (false == isFunctionImplemented(function, type))
15125 de::UniquePtr<functionObject> function_object(getFunctionObject(function, type));
15259 /** Checks if function result is an acceptable edge case
15452 FunctionEnum function;
15513 builin->addChild(new BuiltinFunctionTest(m_context, caseName, bf.function, typeDefinition[j]));