diff options
author | Eric Anholt <[email protected]> | 2013-09-27 15:36:59 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-10-24 14:04:20 -0700 |
commit | 80806c98ef9892abb225965f29027c9b201749ec (patch) | |
tree | ef44273ca7e699957cd10b0a2372dee9ac350964 /src/glx/dri_common.c | |
parent | 7463abd37d65abd4d87abe314e0629c853dd9bca (diff) |
glx: Move the driver extension-loading to a helper function.
I'm planning on doing driver extension parsing from 3 places, and making
the extension loading step a bit longer.
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/glx/dri_common.c')
-rw-r--r-- | src/glx/dri_common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 5f199e9fde4..f1d1164571e 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -187,6 +187,20 @@ driOpenDriver(const char *driverName) return handle; } +_X_HIDDEN const __DRIextension ** +driGetDriverExtensions(void *handle) +{ + const __DRIextension **extensions = NULL; + + extensions = dlsym(handle, __DRI_DRIVER_EXTENSIONS); + if (extensions == NULL) { + ErrorMessageF("driver exports no extensions (%s)\n", dlerror()); + return NULL; + } + + return extensions; +} + static GLboolean __driGetMSCRate(__DRIdrawable *draw, int32_t * numerator, int32_t * denominator, |