Mesa (master): egl_dri2: try swrastg_dri if swrast_dri fails

Chia-I Wu olv at kemper.freedesktop.org
Mon Jun 13 04:20:25 UTC 2011


Module: Mesa
Branch: master
Commit: 77e031a1c423affde99934f0fd059d49852e2729
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=77e031a1c423affde99934f0fd059d49852e2729

Author: Chia-I Wu <olv at lunarg.com>
Date:   Wed Jun  8 16:33:56 2011 +0800

egl_dri2: try swrastg_dri if swrast_dri fails

Per libGL.

---

 src/egl/drivers/dri2/egl_dri2.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index a38bff5..d430145 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -416,6 +416,12 @@ dri2_load_driver_swrast(_EGLDisplay *disp)
 
    dri2_dpy->driver_name = "swrast";
    extensions = dri2_open_driver(disp);
+   if (!extensions) {
+      /* try again with swrastg */
+      dri2_dpy->driver_name = "swrastg";
+      extensions = dri2_open_driver(disp);
+   }
+
    if (!extensions)
       return EGL_FALSE;
 




More information about the mesa-commit mailing list