Lines Matching refs:rnd
66 de::Random rnd(m_seed); in init() local
68 int numShared = m_maxSharedBlocks > 0 ? rnd.getInt(1, m_maxSharedBlocks) : 0; in init()
69 …int numVtxBlocks = m_maxVertexBlocks-numShared > 0 ? rnd.getInt(1, m_maxVertexBlocks-numShared) : … in init()
70 …int numFragBlocks = m_maxFragmentBlocks-numShared > 0 ? rnd.getInt(1, m_maxFragmentBlocks-numShare… in init()
73 generateBlock(rnd, DECLARE_VERTEX|DECLARE_FRAGMENT); in init()
76 generateBlock(rnd, DECLARE_VERTEX); in init()
79 generateBlock(rnd, DECLARE_FRAGMENT); in init()
82 void RandomUniformBlockCase::generateBlock (de::Random& rnd, deUint32 layoutFlags) in generateBlock() argument
88 …int numInstances = (m_maxInstances > 0 && rnd.getFloat() < instanceArrayWeight) ? rnd.getInt(0… in generateBlock()
89 int numUniforms = rnd.getInt(1, m_maxBlockMembers); in generateBlock()
94 if (numInstances > 0 || rnd.getBool()) in generateBlock()
107 layoutFlags |= rnd.choose<deUint32>(layoutFlagCandidates.begin(), layoutFlagCandidates.end()); in generateBlock()
112 …layoutFlags |= rnd.choose<deUint32>(&matrixCandidates[0], &matrixCandidates[DE_LENGTH_OF_ARRAY(mat… in generateBlock()
118 generateUniform(rnd, block); in generateBlock()
139 void RandomUniformBlockCase::generateUniform (de::Random& rnd, UniformBlock& block) in generateUniform() argument
146 VarType type = generateType(rnd, 0, true); in generateUniform()
148 flags |= (unusedOk && rnd.getFloat() < unusedVtxWeight) ? UNUSED_VERTEX : 0; in generateUniform()
149 flags |= (unusedOk && rnd.getFloat() < unusedFragWeight) ? UNUSED_FRAGMENT : 0; in generateUniform()
156 VarType RandomUniformBlockCase::generateType (de::Random& rnd, int typeDepth, bool arrayOk) in generateType() argument
161 if (typeDepth < m_maxStructDepth && rnd.getFloat() < structWeight) in generateType()
167 int numMembers = rnd.getInt(1, m_maxStructMembers); in generateType()
171 memberTypes.push_back(generateType(rnd, typeDepth+1, true)); in generateType()
181 flags |= (unusedOk && rnd.getFloat() < unusedVtxWeight) ? UNUSED_VERTEX : 0; in generateType()
182 flags |= (unusedOk && rnd.getFloat() < unusedFragWeight) ? UNUSED_FRAGMENT : 0; in generateType()
189 else if (m_maxArrayLength > 0 && arrayOk && rnd.getFloat() < arrayWeight) in generateType()
192 const int arrayLength = rnd.getInt(1, m_maxArrayLength); in generateType()
193 VarType elementType = generateType(rnd, typeDepth, arraysOfArraysOk); in generateType()
233 glu::DataType type = rnd.choose<glu::DataType>(typeCandidates.begin(), typeCandidates.end()); in generateType()
240 …flags |= rnd.choose<deUint32>(&precisionCandidates[0], &precisionCandidates[DE_LENGTH_OF_ARRAY(pre… in generateType()