Allow choosing random input count in builtin_functions.precision tests
authorPyry Haulos <phaulos@google.com>
Thu, 19 Mar 2015 17:56:10 +0000 (10:56 -0700)
committerPyry Haulos <phaulos@google.com>
Thu, 19 Mar 2015 17:56:10 +0000 (10:56 -0700)
Builtin function precision tests now use --deqp-test-iteration-count=N
command line option, if given, to choose number of random input vectors.
Otherwise default sample count of 16k is used.

Change-Id: Ib9990d607c0d7bf114d8ae4fc52a19f612205114

modules/glshared/glsBuiltinPrecisionTests.cpp

index c7f103b..66a8c85 100644 (file)
@@ -5217,6 +5217,9 @@ void addBuiltinPrecisionTests (TestContext&                                       testCtx,
                                                           const vector<ShaderType>&    shaderTypes,
                                                           TestCaseGroup&                               dstGroup)
 {
+       const int                                               userRandoms     = testCtx.getCommandLine().getTestIterationCount();
+       const int                                               defRandoms      = 16384;
+       const int                                               numRandoms      = userRandoms > 0 ? userRandoms : defRandoms;
        const FloatFormat                               highp           (-126, 127, 23, true,
                                                                                                 tcu::MAYBE,    // subnormals
                                                                                                 tcu::YES,              // infinities
@@ -5227,7 +5230,7 @@ void addBuiltinPrecisionTests (TestContext&                                       testCtx,
        // exponent and support for subnormals.
        const FloatFormat                               lowp            (0, 0, 7, false, tcu::YES);
        const PrecisionTestContext              ctx                     (testCtx, renderCtx, highp, mediump, lowp,
-                                                                                                shaderTypes, 16384);
+                                                                                                shaderTypes, numRandoms);
 
        for (size_t ndx = 0; ndx < cases.getFactories().size(); ++ndx)
                dstGroup.addChild(createFuncGroup(ctx, *cases.getFactories()[ndx]));