Revert "dri: make use of dri_get_extensions_name(..) helper"
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 15 Nov 2016 18:01:20 +0000 (18:01 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 15 Nov 2016 18:15:15 +0000 (18:15 +0000)
This reverts commit 1a21d21580965eff751414d140b3c176eeee2eb3.

Pushed the wrong version of the patch.

src/egl/drivers/dri2/egl_dri2.c
src/gbm/backends/dri/gbm_dri.c
src/glx/dri_common.c

index 593dd0123308570ac722a59eff580c93fcbfb0a9..d9e2ad701b79586208acb8d9b875086d1a9ead01 100644 (file)
@@ -514,9 +514,8 @@ dri2_open_driver(_EGLDisplay *disp)
 
    _eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
 
-   get_extensions_name = dri_get_extensions_name(dri2_dpy->driver_name);
-
-   if (get_extensions_name) {
+   if (asprintf(&get_extensions_name, "%s_%s",
+                __DRI_DRIVER_GET_EXTENSIONS, dri2_dpy->driver_name) != -1) {
       get_extensions = dlsym(dri2_dpy->driver, get_extensions_name);
       if (get_extensions) {
          extensions = get_extensions();
index 4cb7f2775d9cc727b30e1e10ad3b70b5439d6ee3..5cd7318d57b6604196812cb7e3c7ca6ba3c119a6 100644 (file)
@@ -363,9 +363,8 @@ dri_open_driver(struct gbm_dri_device *dri)
       return NULL;
    }
 
-   get_extensions_name = dri_get_extensions_name(dri->base.driver_name);
-
-   if (get_extensions_name) {
+   if (asprintf(&get_extensions_name, "%s_%s",
+                __DRI_DRIVER_GET_EXTENSIONS, dri->base.driver_name) != -1) {
       const __DRIextension **(*get_extensions)(void);
 
       get_extensions = dlsym(dri->driver, get_extensions_name);
index 67cf3c86fa82327f35bb5333147f940d2a3d28bd..6728d38fa0a104b716bb9aeea9860b163c65ba85 100644 (file)
@@ -161,9 +161,10 @@ driGetDriverExtensions(void *handle, const char *driver_name)
 {
    const __DRIextension **extensions = NULL;
    const __DRIextension **(*get_extensions)(void);
-   char *get_extensions_name = dri_get_extensions_name(driver_name);
+   char *get_extensions_name;
 
-   if (get_extensions_name) {
+   if (asprintf(&get_extensions_name, "%s_%s",
+                __DRI_DRIVER_GET_EXTENSIONS, driver_name) != -1) {
       get_extensions = dlsym(handle, get_extensions_name);
       if (get_extensions) {
          free(get_extensions_name);