summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2011-01-13 00:27:45 +0800
committerChia-I Wu <[email protected]>2011-01-13 18:10:38 +0800
commit655e4598927728a663f4cfcd6babdf7e5ad83f77 (patch)
treefa937088bf0e27f51311c86dfbc016c103331f00 /src/egl/drivers/dri2
parenta4a38dcf61f141297a083ccac217200947d57b0d (diff)
egl: Simplify driver matching.
Add initialization options that drv->API.Initialize should support. Replace drv->Probe by TestOnly initialization option and simplify _eglMatchDriver.
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index f6bca4abf72..2e827f4f3e5 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1472,10 +1472,14 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
{
switch (disp->Platform) {
case _EGL_PLATFORM_X11:
+ if (disp->Options.TestOnly)
+ return EGL_TRUE;
return dri2_initialize_x11(drv, disp);
#ifdef HAVE_LIBUDEV
case _EGL_PLATFORM_DRM:
+ if (disp->Options.TestOnly)
+ return EGL_TRUE;
return dri2_initialize_drm(drv, disp);
#endif