1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
diff --git a/glx/glxdri.c b/glx/glxdri.c
index 6122653..3f5fc2b 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -1042,8 +1042,11 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
goto handle_error;
}
+ char *real_dri_driver_path = getenv("XORG_DRI_DRIVER_PATH");
+ if (!real_dri_driver_path) real_dri_driver_path = dri_driver_path;
+
snprintf(filename, sizeof filename, "%s/%s_dri.so",
- dri_driver_path, driverName);
+ real_dri_driver_path, driverName);
screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
if (screen->driver == NULL) {
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index ed7fb4c..135b1c8 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -617,8 +617,11 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__glXInitExtensionEnableBits(screen->glx_enable_bits);
- snprintf(filename, sizeof filename,
- "%s/%s_dri.so", dri_driver_path, driverName);
+ char *real_dri_driver_path = getenv("XORG_DRI_DRIVER_PATH");
+ if (!real_dri_driver_path) real_dri_driver_path = dri_driver_path;
+
+ snprintf(filename, sizeof filename, "%s/%s_dri.so",
+ real_dri_driver_path, driverName);
screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
if (screen->driver == NULL) {
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index 44f658f..8922414 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -458,8 +458,11 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
screen->base.swapInterval = NULL;
screen->base.pScreen = pScreen;
+ char *real_dri_driver_path = getenv("XORG_DRI_DRIVER_PATH");
+ if (!real_dri_driver_path) real_dri_driver_path = dri_driver_path;
+
snprintf(filename, sizeof filename,
- "%s/%s_dri.so", dri_driver_path, driverName);
+ "%s/%s_dri.so", real_dri_driver_path, driverName);
screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
if (screen->driver == NULL) {
|