summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-03-12 16:09:23 +1000
committerDave Airlie <airlied@redhat.com>2012-05-03 11:12:21 +0100
commit444159aae6a0a9b9cc0514f34ba754469b0d2dc2 (patch)
treeb1a71535e712f6f6bcdab9aaaa510a7b4cd97d2e
parent1bd3dafeca90f1293acd9b9ab63bf617139bfacf (diff)
prime-support for mesaprime
-rw-r--r--src/glx/dri2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glx/dri2.c b/src/glx/dri2.c
index b1b5013d048..ccac633ce6a 100644
--- a/src/glx/dri2.c
+++ b/src/glx/dri2.c
@@ -277,7 +277,11 @@ DRI2Connect(Display * dpy, XID window, char **driverName, char **deviceName)
req->reqType = info->codes->major_opcode;
req->dri2ReqType = X_DRI2Connect;
req->window = window;
+
req->driverType = DRI2DriverDRI;
+ if (getenv("DRI_PRIME"))
+ req->driverType |= (1 << DRI2DriverPrimeShift);
+
if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
UnlockDisplay(dpy);
SyncHandle();