---
src/glx/x11/glxcmds.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 1222625..565015e 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -45,6 +45,12 @@
#include "xf86dri.h"
#endif
+#if defined(USE_XCB)
+#include <X11/Xlib-xcb.h>
+#include <xcb/xcb.h>
+#include <xcb/glx.h>
+#endif
+
static const char __glXGLXClientVendorName[] = "SGI";
static const char __glXGLXClientVersion[] = "1.4";
@@ -750,8 +756,10 @@ PUBLIC void glXCopyContext(Display *dpy, GLXContext source,
*/
static Bool __glXIsDirect(Display *dpy, GLXContextID contextID)
{
+#if !defined(USE_XCB)
xGLXIsDirectReq *req;
xGLXIsDirectReply reply;
+#endif
CARD8 opcode;
opcode = __glXSetupForCommand(dpy);
@@ -759,6 +767,18 @@ static Bool __glXIsDirect(Display *dpy, GLXContextID
contextID)
return GL_FALSE;
}
+#ifdef USE_XCB
+ xcb_connection_t* c = XGetXCBConnection(dpy);
+ xcb_glx_is_direct_reply_t* reply =
+ xcb_glx_is_direct_reply(c,
+ xcb_glx_is_direct(c, contextID),
+ NULL);
+
+ const Bool is_direct = reply->is_direct ? True : False;
+ free(reply);
+
+ return is_direct;
+#else
/* Send the glXIsDirect request */
LockDisplay(dpy);
GetReq(GLXIsDirect,req);
@@ -770,6 +790,7 @@ static Bool __glXIsDirect(Display *dpy, GLXContextID
contextID)
SyncHandle();
return reply.isDirect;
+#endif /* USE_XCB */
}
/**
--
1.6.0.2
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev