Lines Matching defs:rnd
534 static void genAttributeData (const Attribute& attrib, deUint8* basePtr, int stride, int numElements, de::Random& rnd)
553 case glu::PRECISION_LOWP: *comp = 0.0f + 0.25f*(float)rnd.getInt(0, 4); break;
554 case glu::PRECISION_MEDIUMP: *comp = rnd.getFloat(-1e3f, 1e3f); break;
555 case glu::PRECISION_HIGHP: *comp = rnd.getFloat(-1e5f, 1e5f); break;
565 case glu::PRECISION_LOWP: *comp = (int)signExtend(rnd.getUint32()&0xff, 8); break;
566 case glu::PRECISION_MEDIUMP: *comp = (int)signExtend(rnd.getUint32()&0xffff, 16); break;
567 case glu::PRECISION_HIGHP: *comp = (int)rnd.getUint32(); break;
577 case glu::PRECISION_LOWP: *comp = rnd.getUint32()&0xff; break;
578 case glu::PRECISION_MEDIUMP: *comp = rnd.getUint32()&0xffff; break;
579 case glu::PRECISION_HIGHP: *comp = rnd.getUint32(); break;
590 static void genInputData (const vector<Attribute>& attributes, int numInputs, int inputStride, deUint8* inputBasePtr, de::Random& rnd)
598 *((float*)(ptr+ 0)) = rnd.getFloat(-1.2f, 1.2f);
599 *((float*)(ptr+ 4)) = rnd.getFloat(-1.2f, 1.2f);
600 *((float*)(ptr+ 8)) = rnd.getFloat(-1.2f, 1.2f);
601 *((float*)(ptr+12)) = rnd.getFloat(0.1f, 2.0f);
611 *((float*)ptr) = rnd.getFloat(1.0f, 8.0f);
621 genAttributeData(*attrib, inputBasePtr, inputStride, numInputs, rnd);
1069 de::Random rnd (seed);
1076 int viewportX = rnd.getInt(0, width-viewportW);
1077 int viewportY = rnd.getInt(0, height-viewportH);
1094 genInputData(m_attributes, numInputs, m_inputStride, &inputData[0], rnd);
1452 de::Random rnd (m_seed);
1453 bool usePosition = rnd.getFloat() < positionWeight;
1454 bool usePointSize = rnd.getFloat() < pointSizeWeight;
1455 int numAttribVectorsToUse = rnd.getInt(1, maxAttributeVectors - 1/*position*/ - (usePointSize ? 1 : 0));
1469 glu::DataType type = rnd.choose<glu::DataType>(begin, end);
1470 glu::Precision precision = rnd.choose<glu::Precision>(&precisions[0], &precisions[0]+DE_LENGTH_OF_ARRAY(precisions));
1472 ? rnd.choose<Interpolation>(&interpModes[0], &interpModes[0]+DE_LENGTH_OF_ARRAY(interpModes))
1477 bool useArray = rnd.getFloat() < arrayWeight;
1478 int arrayLen = useArray ? rnd.getInt(1, maxArrayLen) : 1;
1502 const bool captureFull = m_elementCapture ? (rnd.getFloat() < captureFullArrayWeight) : true;
1519 rnd.choose(tfCandidates.begin(), tfCandidates.end(), tfVaryings.begin(), (int)tfVaryings.size());
1520 rnd.shuffle(tfVaryings.begin(), tfVaryings.end());