diff options
Diffstat (limited to 'src/glx/x11')
-rw-r--r-- | src/glx/x11/dri_glx.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index b703c4fa9e..7ac80eb74d 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -222,6 +222,15 @@ static __DRIdriver *OpenDriver(const char *driverName) void *handle = NULL; + /* If TLS support is enabled, try to open the TLS version of the driver + * binary first. If that fails, try the non-TLS version. + */ +#ifdef GLX_USE_TLS + snprintf(realDriverName, 200, "%s/tls/%s_dri.so", libDir, driverName); + InfoMessageF("OpenDriver: trying %s\n", realDriverName); + handle = dlopen(realDriverName, RTLD_NOW | RTLD_GLOBAL); +#endif + if ( handle == NULL ) { snprintf(realDriverName, 200, "%s/%s_dri.so", libDir, driverName); InfoMessageF("OpenDriver: trying %s\n", realDriverName); |