Lines Matching defs:rnd

295 			de::Random rnd(0);
297 return eglu::getConfigID(m_eglTestCtx.getLibrary(), m_display, configs[rnd.getInt(0, (int)configs.size()-1)]);
368 de::Random rnd(m_iterNdx);
369 const int numAttribs = rnd.getInt(0, (int)m_attribSet.size()*2);
371 std::vector<std::pair<EGLenum, EGLint> > attributes = genRandomAttributes(m_attribSet, numAttribs, rnd);
379 template <int MinVal, int MaxVal> static EGLint getInt (de::Random& rnd)
381 return rnd.getInt(MinVal, MaxVal);
384 static EGLint getBool (de::Random& rnd)
386 return rnd.getBool() ? EGL_TRUE : EGL_FALSE;
389 static EGLint getBufferType (de::Random& rnd)
392 return rnd.choose<EGLint>(types, types+DE_LENGTH_OF_ARRAY(types));
395 static EGLint getConfigCaveat (de::Random& rnd)
398 return rnd.choose<EGLint>(caveats, caveats+DE_LENGTH_OF_ARRAY(caveats));
401 static EGLint getApiBits (de::Random& rnd)
404 api |= rnd.getBool() ? EGL_OPENGL_BIT : 0;
405 api |= rnd.getBool() ? EGL_OPENGL_ES_BIT : 0;
406 api |= rnd.getBool() ? EGL_OPENGL_ES2_BIT : 0;
407 api |= rnd.getBool() ? EGL_OPENVG_BIT : 0;
411 static EGLint getSurfaceType (de::Random& rnd)
414 bits |= rnd.getBool() ? EGL_WINDOW_BIT : 0;
415 bits |= rnd.getBool() ? EGL_PIXMAP_BIT : 0;
416 bits |= rnd.getBool() ? EGL_PBUFFER_BIT : 0;
423 EGLint (*getValue)(de::Random& rnd);
426 std::vector<std::pair<EGLenum, EGLint> > genRandomAttributes (const std::set<EGLenum>& attribSet, int numAttribs, de::Random& rnd)
474 AttribSpec spec = rnd.choose<AttribSpec>(candidates.begin(), candidates.end());
475 out.push_back(std::make_pair(spec.attribute, spec.getValue(rnd)));