[Mesa-dev] [PATCH] gbm: extension name: replace '-' with '_'
Christian Gmeiner
christian.gmeiner at gmail.com
Sat Jan 16 00:50:50 PST 2016
Driver loading for imx-drm gallium driver fails, as the current
implementation expects __driDriverGetExtensions_NAME_drm. In order
to get the driver successfully loaded to we need to transform
__driDriverGetExtensions_imx-drm to __driDriverGetExtensions_imx_drm.
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
src/gbm/backends/dri/gbm_dri.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 57cdeac..35c7fb9 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -354,6 +354,12 @@ dri_open_driver(struct gbm_dri_device *dri)
__DRI_DRIVER_GET_EXTENSIONS, dri->base.driver_name) != -1) {
const __DRIextension **(*get_extensions)(void);
+ /* replace - with _ */
+ for (unsigned i = 0; i < strlen(get_extensions_name); i++) {
+ if (get_extensions_name[i] == '-')
+ get_extensions_name[i] = '_';
+ }
+
get_extensions = dlsym(dri->driver, get_extensions_name);
free(get_extensions_name);
--
2.5.0
More information about the mesa-dev
mailing list