Revert "egl: drop EGL driver `name`"
authorMarek Olšák <marek.olsak@amd.com>
Wed, 18 Oct 2017 18:22:58 +0000 (20:22 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 18 Oct 2017 18:23:24 +0000 (20:23 +0200)
This reverts commit 6414d6bd8d2897f4ba643357fe3037f3acd60879.

This is needed to apply the next revert.

src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/haiku/egl_haiku.cpp
src/egl/main/eglapi.c
src/egl/main/egldriver.c
src/egl/main/egldriver.h

index f9fc71e51bf0a63daadb386c1d55acb0a8ae29a2..0750dc1946988ed064defff2f6fd65154ea2d1bf 100644 (file)
@@ -3244,4 +3244,6 @@ _eglInitDriver(_EGLDriver *dri2_drv)
    dri2_drv->API.GLInteropQueryDeviceInfo = dri2_interop_query_device_info;
    dri2_drv->API.GLInteropExportObject = dri2_interop_export_object;
    dri2_drv->API.DupNativeFenceFDANDROID = dri2_dup_native_fence_fd;
+
+   dri2_drv->Name = "DRI2";
 }
index 0b56653395a94ac1f303e066f5124ff4068daacc..590e43f00fb96b051fb4d610e4761280425fe058 100644 (file)
@@ -325,5 +325,7 @@ _eglInitDriver(_EGLDriver *driver)
 
        driver->API.SwapBuffers = haiku_swap_buffers;
 
+       driver->Name = "Haiku";
+
        TRACE("API Calls defined\n");
 }
index 36d69688146b6d913946bca8ff9475b1e6d36bf5..38fc9311cb8da3ed5f6f7a53ed91f011562fc498 100644 (file)
@@ -615,7 +615,8 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
       _eglCreateExtensionsString(disp);
       _eglCreateAPIsString(disp);
       snprintf(disp->VersionString, sizeof(disp->VersionString),
-               "%d.%d", disp->Version / 10, disp->Version % 10);
+               "%d.%d (%s)", disp->Version / 10, disp->Version % 10,
+               disp->Driver->Name);
    }
 
    /* Update applications version of major and minor if not NULL */
index 1ff37850e05f729dd35a9536c805c8dd4d17530f..9d77cb6e97b5454542275b814013398c52f2ba60 100644 (file)
@@ -98,6 +98,8 @@ _eglMatchDriver(_EGLDisplay *dpy)
    }
 
    if (best_drv) {
+      _eglLog(_EGL_DEBUG, "the best driver is %s",
+            best_drv->Name);
       dpy->Driver = best_drv;
       dpy->Initialized = EGL_TRUE;
    }
index 5695fc06ffb03102cc6434bcd12789baa34b1a52..ba12a060cab7f7c6c22311418fb0f3e6209c2b20 100644 (file)
@@ -75,6 +75,8 @@ extern "C" {
  */
 struct _egl_driver
 {
+   const char *Name;  /**< name of this driver */
+
    _EGLAPI API;  /**< EGL API dispatch table */
 };