diff options
author | Eric Anholt <[email protected]> | 2018-11-15 14:22:16 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-11-16 15:38:18 -0800 |
commit | c2b515379bfc669660133bb2d25e50bb04ac0d66 (patch) | |
tree | e1af6406e849b58eda76de3ef68fc25626de2a21 /src/glx/dri_glx.c | |
parent | 7076e9f116c2060a7f28680178d96c188c7177df (diff) |
glx: Move DRI extensions pointer loading to driOpenDriver().
The only thing you do with a dri driver handle is get the extensions
pointer, so just fold it in to simplify the callers.
v2: Add the declaration of driGetDriverExtensions() that got lost in a
rebase.
Reviewed-by: Eric Engestrom <[email protected]> (v1)
Reviewed-by: Emil Velikov <[email protected]> (v1)
Diffstat (limited to 'src/glx/dri_glx.c')
-rw-r--r-- | src/glx/dri_glx.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index 5c4346cec0d..6e9412d3fb1 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -199,15 +199,9 @@ clear_driver_config_cache() static char * get_driver_config(const char *driverName) { - void *handle = driOpenDriver(driverName); - const __DRIextension **extensions; - - if (!handle) - return NULL; - + void *handle; char *config = NULL; - - extensions = driGetDriverExtensions(handle, driverName); + const __DRIextension **extensions = driOpenDriver(driverName, &handle); if (extensions) { for (int i = 0; extensions[i]; i++) { if (strcmp(extensions[i]->name, __DRI_CONFIG_OPTIONS) != 0) @@ -918,11 +912,7 @@ driCreateScreen(int screen, struct glx_display *priv) goto cleanup; } - psc->driver = driOpenDriver(driverName); - if (psc->driver == NULL) - goto cleanup; - - extensions = dlsym(psc->driver, __DRI_DRIVER_EXTENSIONS); + extensions = driOpenDriver(driverName, &psc->driver); if (extensions == NULL) { ErrorMessageF("driver exports no extensions (%s)\n", dlerror()); goto cleanup; |