summaryrefslogtreecommitdiffstats
path: root/src/glx/dri_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri_common.c')
-rw-r--r--src/glx/dri_common.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index f1d1164571e..22ba248cfb0 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -188,9 +188,24 @@ driOpenDriver(const char *driverName)
}
_X_HIDDEN const __DRIextension **
-driGetDriverExtensions(void *handle)
+driGetDriverExtensions(void *handle, const char *driver_name)
{
const __DRIextension **extensions = NULL;
+ const __DRIextension **(*get_extensions)(void);
+ char *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);
+ return get_extensions();
+ } else {
+ InfoMessageF("driver does not expose %s(): %s\n",
+ get_extensions_name, dlerror());
+ free(get_extensions_name);
+ }
+ }
extensions = dlsym(handle, __DRI_DRIVER_EXTENSIONS);
if (extensions == NULL) {