[Mesa-dev] [PATCH 3/6] egl/x11: fetch the device_name prior to driver_name

Emil Velikov emil.l.velikov at gmail.com
Wed Jul 29 09:19:04 PDT 2015


With the follow up commits we're about to further reshuffle things. Thus
we'll honour our our driver_name lookup (src/loader), and use the one
provided by xserver as a fall-back.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/egl/drivers/dri2/platform_x11.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 92e733a..2e97070 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -579,17 +579,17 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
       return EGL_FALSE;
    }
 
-   driver_name = xcb_dri2_connect_driver_name (connect);
-   dri2_dpy->driver_name =
-      strndup(driver_name,
-              xcb_dri2_connect_driver_name_length(connect));
-
    device_name = xcb_dri2_connect_device_name (connect);
 
    dri2_dpy->device_name =
       strndup(device_name,
               xcb_dri2_connect_device_name_length(connect));
 
+   driver_name = xcb_dri2_connect_driver_name (connect);
+   dri2_dpy->driver_name =
+      strndup(driver_name,
+              xcb_dri2_connect_driver_name_length(connect));
+
    if (dri2_dpy->device_name == NULL || dri2_dpy->driver_name == NULL) {
       free(dri2_dpy->device_name);
       free(dri2_dpy->driver_name);
-- 
2.4.5



More information about the mesa-dev mailing list