egl: make it clear which platform x11 backend is being used (dri2 or 3)
authorMartin Peres <martin.peres@linux.intel.com>
Fri, 30 Oct 2015 15:16:35 +0000 (17:16 +0200)
committerMartin Peres <martin.peres@linux.intel.com>
Tue, 17 Nov 2015 15:26:20 +0000 (17:26 +0200)
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
Reviewed-by: Boyan Ding <boyan.j.ding@gmail.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.co.uk>
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/platform_x11.c
src/egl/drivers/dri2/platform_x11_dri3.c

index ba16b94e651e08f74d1e09b1923da9ea9772a43e..d34b16119e29f3963e3f87bfcca2a9d7ba8fcf10 100644 (file)
@@ -391,13 +391,13 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
    void *field;
 
    for (i = 0; extensions[i]; i++) {
-      _eglLog(_EGL_DEBUG, "DRI2: found extension `%s'", extensions[i]->name);
+      _eglLog(_EGL_DEBUG, "found extension `%s'", extensions[i]->name);
       for (j = 0; matches[j].name; j++) {
         if (strcmp(extensions[i]->name, matches[j].name) == 0 &&
             extensions[i]->version >= matches[j].version) {
            field = ((char *) dri2_dpy + matches[j].offset);
            *(const __DRIextension **) field = extensions[i];
-           _eglLog(_EGL_INFO, "DRI2: found extension %s version %d",
+           _eglLog(_EGL_INFO, "found extension %s version %d",
                    extensions[i]->name, extensions[i]->version);
         }
       }
@@ -406,7 +406,7 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
    for (j = 0; matches[j].name; j++) {
       field = ((char *) dri2_dpy + matches[j].offset);
       if (*(const __DRIextension **) field == NULL) {
-        _eglLog(_EGL_WARNING, "DRI2: did not find extension %s version %d",
+         _eglLog(_EGL_WARNING, "did not find extension %s version %d",
                 matches[j].name, matches[j].version);
         ret = EGL_FALSE;
       }
index 9dd5defd6a689d25f1f4eaa23d6328ad5ffa7d86..08cbf2d8393f80d7acd45a9ab0ec056071cf3b9d 100644 (file)
@@ -1280,7 +1280,7 @@ dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay *disp)
    }
 
    if (xcb_connection_has_error(dri2_dpy->conn)) {
-      _eglLog(_EGL_WARNING, "DRI2: xcb_connect failed");
+      _eglLog(_EGL_WARNING, "DRI3: xcb_connect failed");
       goto cleanup_dpy;
    }
 
@@ -1332,6 +1332,8 @@ dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay *disp)
     */
    dri2_dpy->vtbl = &dri3_x11_display_vtbl;
 
+   _eglLog(_EGL_INFO, "Using DRI3");
+
    return EGL_TRUE;
 
  cleanup_configs:
@@ -1429,6 +1431,8 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
     */
    dri2_dpy->vtbl = &dri2_x11_display_vtbl;
 
+   _eglLog(_EGL_INFO, "Using DRI2");
+
    return EGL_TRUE;
 
  cleanup_configs:
index aaafd1d67087cc83e71265184b5a4b8b3ae079b8..8e4a131b11a0fef09a737dc2f4a9e820d0bf7cf2 100644 (file)
@@ -492,7 +492,7 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy)
    dri3_query =
       xcb_dri3_query_version_reply(dri2_dpy->conn, dri3_query_cookie, &error);
    if (dri3_query == NULL || error != NULL) {
-      _eglLog(_EGL_WARNING, "DRI2: failed to query dri3 version");
+      _eglLog(_EGL_WARNING, "DRI3: failed to query the version");
       free(dri3_query);
       free(error);
       return EGL_FALSE;
@@ -503,7 +503,7 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy)
       xcb_present_query_version_reply(dri2_dpy->conn,
                                       present_query_cookie, &error);
    if (present_query == NULL || error != NULL) {
-      _eglLog(_EGL_WARNING, "DRI2: failed to query Present version");
+      _eglLog(_EGL_WARNING, "DRI3: failed to query Present version");
       free(present_query);
       free(error);
       return EGL_FALSE;
@@ -520,10 +520,10 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy)
    dri2_dpy->fd = loader_dri3_open(dri2_dpy->conn, screen->root, 0);
    if (dri2_dpy->fd < 0) {
       int conn_error = xcb_connection_has_error(dri2_dpy->conn);
-      _eglLog(_EGL_WARNING, "DRI2: Screen seem not DRI3 capable");
+      _eglLog(_EGL_WARNING, "DRI3: Screen seems not DRI3 capable");
 
       if (conn_error)
-         _eglLog(_EGL_WARNING, "DRI2: Failed to initialize DRI3");
+         _eglLog(_EGL_WARNING, "DRI3: Failed to initialize");
 
       return EGL_FALSE;
    }
@@ -532,7 +532,7 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy)
 
    dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd, 0);
    if (!dri2_dpy->driver_name) {
-      _eglLog(_EGL_WARNING, "DRI2: No driver found");
+      _eglLog(_EGL_WARNING, "DRI3: No driver found");
       close(dri2_dpy->fd);
       return EGL_FALSE;
    }