From 2cb9ab53dd3ae6850a2611b01695f7449d24614d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 18 Oct 2017 20:22:58 +0200 Subject: [PATCH] Revert "egl: drop EGL driver `name`" This reverts commit 6414d6bd8d2897f4ba643357fe3037f3acd60879. This is needed to apply the next revert. --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ src/egl/drivers/haiku/egl_haiku.cpp | 2 ++ src/egl/main/eglapi.c | 3 ++- src/egl/main/egldriver.c | 2 ++ src/egl/main/egldriver.h | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index f9fc71e..0750dc1 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -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"; } diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 0b56653..590e43f 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -325,5 +325,7 @@ _eglInitDriver(_EGLDriver *driver) driver->API.SwapBuffers = haiku_swap_buffers; + driver->Name = "Haiku"; + TRACE("API Calls defined\n"); } diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 36d6968..38fc931 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -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 */ diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index 1ff3785..9d77cb6 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -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; } diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index 5695fc0..ba12a06 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -75,6 +75,8 @@ extern "C" { */ struct _egl_driver { + const char *Name; /**< name of this driver */ + _EGLAPI API; /**< EGL API dispatch table */ }; -- 2.7.4