Add a masked, XCB-capable mesa.
authorDonnie Berkholz <dberkholz@gentoo.org>
Mon, 9 Oct 2006 02:01:41 +0000 (02:01 +0000)
committerDonnie Berkholz <dberkholz@gentoo.org>
Mon, 9 Oct 2006 02:01:41 +0000 (02:01 +0000)
Package-Manager: portage-2.1.2_pre2-r5

media-libs/mesa/ChangeLog
media-libs/mesa/Manifest
media-libs/mesa/files/6.5.1-use-new-xcb-naming.patch [new file with mode: 0644]
media-libs/mesa/files/6.5.1-xcb-dont-unlock-twice.patch [new file with mode: 0644]
media-libs/mesa/files/digest-mesa-6.5.1-r2 [new file with mode: 0644]
media-libs/mesa/mesa-6.5.1-r2.ebuild [new file with mode: 0644]

index d32254f2cd605430c78adc0ad3d5c45d33c895e6..9bcf1960731a0461bcb861a64ae0c960898c57db 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for media-libs/mesa
 # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.117 2006/09/28 03:06:07 dberkholz Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.118 2006/10/09 02:01:41 dberkholz Exp $
+
+*mesa-6.5.1-r2 (09 Oct 2006)
+
+  09 Oct 2006; Donnie Berkholz <dberkholz@gentoo.org>;
+  +files/6.5.1-use-new-xcb-naming.patch,
+  +files/6.5.1-xcb-dont-unlock-twice.patch, +mesa-6.5.1-r2.ebuild:
+  Add a masked, XCB-capable mesa.
 
   28 Sep 2006; Donnie Berkholz <dberkholz@gentoo.org>; -mesa-6.5.1.ebuild:
   Clean out broken ebuild.
index 652fd8448df02044738070d93149a241d76d9467..d9c0252ba9eca7041da8d38b2d01ff6da51d466c 100644 (file)
@@ -18,6 +18,14 @@ AUX 6.5.1-freebsd-dri.patch 1255 RMD160 71ee7336e879d72a20095251899ec8c7472c6255
 MD5 b4af1ae8f957df589e6e0462cfa91dbf files/6.5.1-freebsd-dri.patch 1255
 RMD160 71ee7336e879d72a20095251899ec8c7472c6255 files/6.5.1-freebsd-dri.patch 1255
 SHA256 ddd69fc07866d1efda8a78d26708e821196e844c8d941e7fcc0e30afa18b0ed6 files/6.5.1-freebsd-dri.patch 1255
+AUX 6.5.1-use-new-xcb-naming.patch 52829 RMD160 3503ba00d57f35d4fc943057f79bacf1813f3852 SHA1 1e103c4bf3dce8d35dbb4fb7bb06797119384ce0 SHA256 b94d70e74209fe6c0a7e6e94b8c2ac0609ef45d585ad5ab034c0cc90d9c00e46
+MD5 ce93efe43e40d1b82c9184eaf02a75b1 files/6.5.1-use-new-xcb-naming.patch 52829
+RMD160 3503ba00d57f35d4fc943057f79bacf1813f3852 files/6.5.1-use-new-xcb-naming.patch 52829
+SHA256 b94d70e74209fe6c0a7e6e94b8c2ac0609ef45d585ad5ab034c0cc90d9c00e46 files/6.5.1-use-new-xcb-naming.patch 52829
+AUX 6.5.1-xcb-dont-unlock-twice.patch 655 RMD160 afc8427c541bbb271457e4983df2de023fa7ceda SHA1 03c75284254b8af926cbc42ed430662db0cd772f SHA256 d972afe88f70c5a1a14f66fdccca2f67d6d0f0d9e83c010e66dc577d4b3f15bd
+MD5 78ded8afd40dce99354591b6234cadf3 files/6.5.1-xcb-dont-unlock-twice.patch 655
+RMD160 afc8427c541bbb271457e4983df2de023fa7ceda files/6.5.1-xcb-dont-unlock-twice.patch 655
+SHA256 d972afe88f70c5a1a14f66fdccca2f67d6d0f0d9e83c010e66dc577d4b3f15bd files/6.5.1-xcb-dont-unlock-twice.patch 655
 AUX 64bit-fix-have-dix-config.patch 645 RMD160 4a05bcdab2828f9b5ad80df80d63d4767617b756 SHA1 9ad64261cbbbe6c3e897701dad2f4f0e2f67d4c7 SHA256 757a94fe2e76f6ea4d831a3aaf3fac7e344527239a10b014d6900af341e7abab
 MD5 0009bfb15983cd6258cde8ca9ec7134c files/64bit-fix-have-dix-config.patch 645
 RMD160 4a05bcdab2828f9b5ad80df80d63d4767617b756 files/64bit-fix-have-dix-config.patch 645
@@ -69,10 +77,14 @@ EBUILD mesa-6.5.1-r1.ebuild 8431 RMD160 c8f39590163a0363091e5898915910d7655dd497
 MD5 127021b9fe121391c9335fb8e3db3cf5 mesa-6.5.1-r1.ebuild 8431
 RMD160 c8f39590163a0363091e5898915910d7655dd497 mesa-6.5.1-r1.ebuild 8431
 SHA256 1f3ac26161de7c013d8618a0b934e3a9b59a9b2c90de6089b64e93822f704f12 mesa-6.5.1-r1.ebuild 8431
-MISC ChangeLog 21462 RMD160 4fafd51e519fbb4d60a5110604603b6a9eef3940 SHA1 edd5f23aa75e1c9622d5ffaafff03981d7f25713 SHA256 5c4ed38ba3c9b48b2a1629debc2ad21b192d05d2b331aebed05ee8a4df4a9dfc
-MD5 b70d392af68e4b5339a79a0284359a16 ChangeLog 21462
-RMD160 4fafd51e519fbb4d60a5110604603b6a9eef3940 ChangeLog 21462
-SHA256 5c4ed38ba3c9b48b2a1629debc2ad21b192d05d2b331aebed05ee8a4df4a9dfc ChangeLog 21462
+EBUILD mesa-6.5.1-r2.ebuild 8963 RMD160 5c3812adae55f58dce73dc495ba6524b07490abb SHA1 75f722306d1021fd000877c124068007f2049933 SHA256 9a14f2ad7518ccd36884d10066d02c7e2e50588e2f475fc8ba5f7754873c2972
+MD5 224351743658fa1b9a65cf5033be16ce mesa-6.5.1-r2.ebuild 8963
+RMD160 5c3812adae55f58dce73dc495ba6524b07490abb mesa-6.5.1-r2.ebuild 8963
+SHA256 9a14f2ad7518ccd36884d10066d02c7e2e50588e2f475fc8ba5f7754873c2972 mesa-6.5.1-r2.ebuild 8963
+MISC ChangeLog 21690 RMD160 063aa8a732576258b70bfde85debf66fd66f8550 SHA1 e54e56a6338ff9f5e5fd6f30d4aad21823f2ee13 SHA256 ecf597b772617d7d2bffa9e0d2fc66a1d1f14544ce8b7c04f81d6111f5ed0c92
+MD5 2d0e48bba32d17e8aad4ccfee49ad11c ChangeLog 21690
+RMD160 063aa8a732576258b70bfde85debf66fd66f8550 ChangeLog 21690
+SHA256 ecf597b772617d7d2bffa9e0d2fc66a1d1f14544ce8b7c04f81d6111f5ed0c92 ChangeLog 21690
 MISC metadata.xml 156 RMD160 c1274bdccf57603d580de0075ba07a35b7509560 SHA1 6f78f604e3d079d39189b40aaaa1ddb06182ad91 SHA256 5101ab0d4cc8c7125eea733c44e86962769bd77acaf53b69223b9cadcdd29055
 MD5 a37bab73e2f24b213932c30997d3d360 metadata.xml 156
 RMD160 c1274bdccf57603d580de0075ba07a35b7509560 metadata.xml 156
@@ -89,3 +101,6 @@ SHA256 5a5ab578d50f251808ddf18cd61f6e5518224168555fc288725a8466892b4f88 files/di
 MD5 c5825b910eaf2092a073b33f7db2d640 files/digest-mesa-6.5.1-r1 247
 RMD160 7e176dbe4570a0c74add11e3166b2596361d14f6 files/digest-mesa-6.5.1-r1 247
 SHA256 fcc814f186f772d396d230867bc9eeeaa1f1f348f6b53aa1bbcf23ff73ccde8f files/digest-mesa-6.5.1-r1 247
+MD5 c5825b910eaf2092a073b33f7db2d640 files/digest-mesa-6.5.1-r2 247
+RMD160 7e176dbe4570a0c74add11e3166b2596361d14f6 files/digest-mesa-6.5.1-r2 247
+SHA256 fcc814f186f772d396d230867bc9eeeaa1f1f348f6b53aa1bbcf23ff73ccde8f files/digest-mesa-6.5.1-r2 247
diff --git a/media-libs/mesa/files/6.5.1-use-new-xcb-naming.patch b/media-libs/mesa/files/6.5.1-use-new-xcb-naming.patch
new file mode 100644 (file)
index 0000000..857501a
--- /dev/null
@@ -0,0 +1,859 @@
+Index: src/glx/x11/indirect.c
+===================================================================
+RCS file: /cvs/mesa/Mesa/src/glx/x11/indirect.c,v
+retrieving revision 1.32
+retrieving revision 1.33
+diff -u -b -B -r1.32 -r1.33
+--- src/glx/x11/indirect.c     31 Aug 2006 20:41:16 -0000      1.32
++++ src/glx/x11/indirect.c     26 Sep 2006 23:56:20 -0000      1.33
+@@ -33,8 +33,8 @@
+ #include <GL/glxproto.h>
+ #ifdef USE_XCB
+-#include <X11/xcl.h>
+-#include <X11/XCB/xcb.h>
+-#include <X11/XCB/glx.h>
++#include <X11/Xlib-xcb.h>
++#include <xcb/xcb.h>
++#include <xcb/glx.h>
+ #endif /* USE_XCB */
+ #define __GLX_PAD(n) (((n) + 3) & ~3)
+@@ -280,9 +280,9 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxNewList(c, gc->currentContextTag, list, mode);
++        xcb_glx_new_list(c, gc->currentContextTag, list, mode);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
+         (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
+@@ -302,9 +302,9 @@
+     const GLuint cmdlen = 0;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxEndList(c, gc->currentContextTag);
++        xcb_glx_end_list(c, gc->currentContextTag);
+ #else
+         (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
+         UnlockDisplay(dpy); SyncHandle();
+@@ -366,9 +366,9 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxDeleteLists(c, gc->currentContextTag, list, range);
++        xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
+         (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
+@@ -389,9 +389,9 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGenListsRep *reply = XCBGlxGenListsReply(c, XCBGlxGenLists(c, gc->currentContextTag, range), NULL);
++        xcb_glx_gen_lists_reply_t *reply = xcb_glx_gen_lists_reply(c, xcb_glx_gen_lists(c, gc->currentContextTag, range), NULL);
+         retval = reply->ret_val;
+         free(reply);
+ #else
+@@ -3312,10 +3312,10 @@
+     const GLuint cmdlen = 28;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxReadPixelsRep *reply = XCBGlxReadPixelsReply(c, XCBGlxReadPixels(c, gc->currentContextTag, x, y, width, height, format, type, state->storePack.swapEndian, 0), NULL);
+-        (void)memcpy(pixels, XCBGlxReadPixelsData(reply), XCBGlxReadPixelsDataLength(reply) * sizeof(GLvoid));
++        xcb_glx_read_pixels_reply_t *reply = xcb_glx_read_pixels_reply(c, xcb_glx_read_pixels(c, gc->currentContextTag, x, y, width, height, format, type, state->storePack.swapEndian, 0), NULL);
++        (void)memcpy(pixels, xcb_glx_read_pixels_data(reply), xcb_glx_read_pixels_data_length(reply) * sizeof(GLvoid));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
+@@ -3384,10 +3384,10 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetClipPlaneRep *reply = XCBGlxGetClipPlaneReply(c, XCBGlxGetClipPlane(c, gc->currentContextTag, plane), NULL);
+-        (void)memcpy(equation, XCBGlxGetClipPlaneData(reply), XCBGlxGetClipPlaneDataLength(reply) * sizeof(GLdouble));
++        xcb_glx_get_clip_plane_reply_t *reply = xcb_glx_get_clip_plane_reply(c, xcb_glx_get_clip_plane(c, gc->currentContextTag, plane), NULL);
++        (void)memcpy(equation, xcb_glx_get_clip_plane_data(reply), xcb_glx_get_clip_plane_data_length(reply) * sizeof(GLdouble));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
+@@ -3408,13 +3408,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetLightfvRep *reply = XCBGlxGetLightfvReply(c, XCBGlxGetLightfv(c, gc->currentContextTag, light, pname), NULL);
+-        if (XCBGlxGetLightfvDataLength(reply) == 0)
++        xcb_glx_get_lightfv_reply_t *reply = xcb_glx_get_lightfv_reply(c, xcb_glx_get_lightfv(c, gc->currentContextTag, light, pname), NULL);
++        if (xcb_glx_get_lightfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetLightfvData(reply), XCBGlxGetLightfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_lightfv_data(reply), xcb_glx_get_lightfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
+@@ -3436,13 +3436,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetLightivRep *reply = XCBGlxGetLightivReply(c, XCBGlxGetLightiv(c, gc->currentContextTag, light, pname), NULL);
+-        if (XCBGlxGetLightivDataLength(reply) == 0)
++        xcb_glx_get_lightiv_reply_t *reply = xcb_glx_get_lightiv_reply(c, xcb_glx_get_lightiv(c, gc->currentContextTag, light, pname), NULL);
++        if (xcb_glx_get_lightiv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetLightivData(reply), XCBGlxGetLightivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_lightiv_data(reply), xcb_glx_get_lightiv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
+@@ -3464,13 +3464,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetMapdvRep *reply = XCBGlxGetMapdvReply(c, XCBGlxGetMapdv(c, gc->currentContextTag, target, query), NULL);
+-        if (XCBGlxGetMapdvDataLength(reply) == 0)
++        xcb_glx_get_mapdv_reply_t *reply = xcb_glx_get_mapdv_reply(c, xcb_glx_get_mapdv(c, gc->currentContextTag, target, query), NULL);
++        if (xcb_glx_get_mapdv_data_length(reply) == 0)
+             (void)memcpy(v, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(v, XCBGlxGetMapdvData(reply), XCBGlxGetMapdvDataLength(reply) * sizeof(GLdouble));
++        (void)memcpy(v, xcb_glx_get_mapdv_data(reply), xcb_glx_get_mapdv_data_length(reply) * sizeof(GLdouble));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
+@@ -3492,13 +3492,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetMapfvRep *reply = XCBGlxGetMapfvReply(c, XCBGlxGetMapfv(c, gc->currentContextTag, target, query), NULL);
+-        if (XCBGlxGetMapfvDataLength(reply) == 0)
++        xcb_glx_get_mapfv_reply_t *reply = xcb_glx_get_mapfv_reply(c, xcb_glx_get_mapfv(c, gc->currentContextTag, target, query), NULL);
++        if (xcb_glx_get_mapfv_data_length(reply) == 0)
+             (void)memcpy(v, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(v, XCBGlxGetMapfvData(reply), XCBGlxGetMapfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(v, xcb_glx_get_mapfv_data(reply), xcb_glx_get_mapfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
+@@ -3520,13 +3520,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetMapivRep *reply = XCBGlxGetMapivReply(c, XCBGlxGetMapiv(c, gc->currentContextTag, target, query), NULL);
+-        if (XCBGlxGetMapivDataLength(reply) == 0)
++        xcb_glx_get_mapiv_reply_t *reply = xcb_glx_get_mapiv_reply(c, xcb_glx_get_mapiv(c, gc->currentContextTag, target, query), NULL);
++        if (xcb_glx_get_mapiv_data_length(reply) == 0)
+             (void)memcpy(v, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(v, XCBGlxGetMapivData(reply), XCBGlxGetMapivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(v, xcb_glx_get_mapiv_data(reply), xcb_glx_get_mapiv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
+@@ -3548,13 +3548,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetMaterialfvRep *reply = XCBGlxGetMaterialfvReply(c, XCBGlxGetMaterialfv(c, gc->currentContextTag, face, pname), NULL);
+-        if (XCBGlxGetMaterialfvDataLength(reply) == 0)
++        xcb_glx_get_materialfv_reply_t *reply = xcb_glx_get_materialfv_reply(c, xcb_glx_get_materialfv(c, gc->currentContextTag, face, pname), NULL);
++        if (xcb_glx_get_materialfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetMaterialfvData(reply), XCBGlxGetMaterialfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_materialfv_data(reply), xcb_glx_get_materialfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
+@@ -3576,13 +3576,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetMaterialivRep *reply = XCBGlxGetMaterialivReply(c, XCBGlxGetMaterialiv(c, gc->currentContextTag, face, pname), NULL);
+-        if (XCBGlxGetMaterialivDataLength(reply) == 0)
++        xcb_glx_get_materialiv_reply_t *reply = xcb_glx_get_materialiv_reply(c, xcb_glx_get_materialiv(c, gc->currentContextTag, face, pname), NULL);
++        if (xcb_glx_get_materialiv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetMaterialivData(reply), XCBGlxGetMaterialivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_materialiv_data(reply), xcb_glx_get_materialiv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
+@@ -3604,13 +3604,13 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetPixelMapfvRep *reply = XCBGlxGetPixelMapfvReply(c, XCBGlxGetPixelMapfv(c, gc->currentContextTag, map), NULL);
+-        if (XCBGlxGetPixelMapfvDataLength(reply) == 0)
++        xcb_glx_get_pixel_mapfv_reply_t *reply = xcb_glx_get_pixel_mapfv_reply(c, xcb_glx_get_pixel_mapfv(c, gc->currentContextTag, map), NULL);
++        if (xcb_glx_get_pixel_mapfv_data_length(reply) == 0)
+             (void)memcpy(values, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(values, XCBGlxGetPixelMapfvData(reply), XCBGlxGetPixelMapfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(values, xcb_glx_get_pixel_mapfv_data(reply), xcb_glx_get_pixel_mapfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
+@@ -3631,13 +3631,13 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetPixelMapuivRep *reply = XCBGlxGetPixelMapuivReply(c, XCBGlxGetPixelMapuiv(c, gc->currentContextTag, map), NULL);
+-        if (XCBGlxGetPixelMapuivDataLength(reply) == 0)
++        xcb_glx_get_pixel_mapuiv_reply_t *reply = xcb_glx_get_pixel_mapuiv_reply(c, xcb_glx_get_pixel_mapuiv(c, gc->currentContextTag, map), NULL);
++        if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 0)
+             (void)memcpy(values, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(values, XCBGlxGetPixelMapuivData(reply), XCBGlxGetPixelMapuivDataLength(reply) * sizeof(GLuint));
++        (void)memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply), xcb_glx_get_pixel_mapuiv_data_length(reply) * sizeof(GLuint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
+@@ -3658,13 +3658,13 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetPixelMapusvRep *reply = XCBGlxGetPixelMapusvReply(c, XCBGlxGetPixelMapusv(c, gc->currentContextTag, map), NULL);
+-        if (XCBGlxGetPixelMapusvDataLength(reply) == 0)
++        xcb_glx_get_pixel_mapusv_reply_t *reply = xcb_glx_get_pixel_mapusv_reply(c, xcb_glx_get_pixel_mapusv(c, gc->currentContextTag, map), NULL);
++        if (xcb_glx_get_pixel_mapusv_data_length(reply) == 0)
+             (void)memcpy(values, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(values, XCBGlxGetPixelMapusvData(reply), XCBGlxGetPixelMapusvDataLength(reply) * sizeof(GLushort));
++        (void)memcpy(values, xcb_glx_get_pixel_mapusv_data(reply), xcb_glx_get_pixel_mapusv_data_length(reply) * sizeof(GLushort));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
+@@ -3686,10 +3686,10 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetPolygonStippleRep *reply = XCBGlxGetPolygonStippleReply(c, XCBGlxGetPolygonStipple(c, gc->currentContextTag, 0), NULL);
+-        (void)memcpy(mask, XCBGlxGetPolygonStippleData(reply), XCBGlxGetPolygonStippleDataLength(reply) * sizeof(GLubyte));
++        xcb_glx_get_polygon_stipple_reply_t *reply = xcb_glx_get_polygon_stipple_reply(c, xcb_glx_get_polygon_stipple(c, gc->currentContextTag, 0), NULL);
++        (void)memcpy(mask, xcb_glx_get_polygon_stipple_data(reply), xcb_glx_get_polygon_stipple_data_length(reply) * sizeof(GLubyte));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
+@@ -3710,13 +3710,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexEnvfvRep *reply = XCBGlxGetTexEnvfvReply(c, XCBGlxGetTexEnvfv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetTexEnvfvDataLength(reply) == 0)
++        xcb_glx_get_tex_envfv_reply_t *reply = xcb_glx_get_tex_envfv_reply(c, xcb_glx_get_tex_envfv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_tex_envfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetTexEnvfvData(reply), XCBGlxGetTexEnvfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_tex_envfv_data(reply), xcb_glx_get_tex_envfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
+@@ -3738,13 +3738,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexEnvivRep *reply = XCBGlxGetTexEnvivReply(c, XCBGlxGetTexEnviv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetTexEnvivDataLength(reply) == 0)
++        xcb_glx_get_tex_enviv_reply_t *reply = xcb_glx_get_tex_enviv_reply(c, xcb_glx_get_tex_enviv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_tex_enviv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetTexEnvivData(reply), XCBGlxGetTexEnvivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_tex_enviv_data(reply), xcb_glx_get_tex_enviv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
+@@ -3766,13 +3766,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexGendvRep *reply = XCBGlxGetTexGendvReply(c, XCBGlxGetTexGendv(c, gc->currentContextTag, coord, pname), NULL);
+-        if (XCBGlxGetTexGendvDataLength(reply) == 0)
++        xcb_glx_get_tex_gendv_reply_t *reply = xcb_glx_get_tex_gendv_reply(c, xcb_glx_get_tex_gendv(c, gc->currentContextTag, coord, pname), NULL);
++        if (xcb_glx_get_tex_gendv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetTexGendvData(reply), XCBGlxGetTexGendvDataLength(reply) * sizeof(GLdouble));
++        (void)memcpy(params, xcb_glx_get_tex_gendv_data(reply), xcb_glx_get_tex_gendv_data_length(reply) * sizeof(GLdouble));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
+@@ -3794,13 +3794,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexGenfvRep *reply = XCBGlxGetTexGenfvReply(c, XCBGlxGetTexGenfv(c, gc->currentContextTag, coord, pname), NULL);
+-        if (XCBGlxGetTexGenfvDataLength(reply) == 0)
++        xcb_glx_get_tex_genfv_reply_t *reply = xcb_glx_get_tex_genfv_reply(c, xcb_glx_get_tex_genfv(c, gc->currentContextTag, coord, pname), NULL);
++        if (xcb_glx_get_tex_genfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetTexGenfvData(reply), XCBGlxGetTexGenfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_tex_genfv_data(reply), xcb_glx_get_tex_genfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
+@@ -3822,13 +3822,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexGenivRep *reply = XCBGlxGetTexGenivReply(c, XCBGlxGetTexGeniv(c, gc->currentContextTag, coord, pname), NULL);
+-        if (XCBGlxGetTexGenivDataLength(reply) == 0)
++        xcb_glx_get_tex_geniv_reply_t *reply = xcb_glx_get_tex_geniv_reply(c, xcb_glx_get_tex_geniv(c, gc->currentContextTag, coord, pname), NULL);
++        if (xcb_glx_get_tex_geniv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetTexGenivData(reply), XCBGlxGetTexGenivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_tex_geniv_data(reply), xcb_glx_get_tex_geniv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
+@@ -3851,10 +3851,10 @@
+     const GLuint cmdlen = 20;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexImageRep *reply = XCBGlxGetTexImageReply(c, XCBGlxGetTexImage(c, gc->currentContextTag, target, level, format, type, state->storePack.swapEndian), NULL);
+-        (void)memcpy(pixels, XCBGlxGetTexImageData(reply), XCBGlxGetTexImageDataLength(reply) * sizeof(GLvoid));
++        xcb_glx_get_tex_image_reply_t *reply = xcb_glx_get_tex_image_reply(c, xcb_glx_get_tex_image(c, gc->currentContextTag, target, level, format, type, state->storePack.swapEndian), NULL);
++        (void)memcpy(pixels, xcb_glx_get_tex_image_data(reply), xcb_glx_get_tex_image_data_length(reply) * sizeof(GLvoid));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
+@@ -3880,13 +3880,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexParameterfvRep *reply = XCBGlxGetTexParameterfvReply(c, XCBGlxGetTexParameterfv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetTexParameterfvDataLength(reply) == 0)
++        xcb_glx_get_tex_parameterfv_reply_t *reply = xcb_glx_get_tex_parameterfv_reply(c, xcb_glx_get_tex_parameterfv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_tex_parameterfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetTexParameterfvData(reply), XCBGlxGetTexParameterfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_tex_parameterfv_data(reply), xcb_glx_get_tex_parameterfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
+@@ -3908,13 +3908,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexParameterivRep *reply = XCBGlxGetTexParameterivReply(c, XCBGlxGetTexParameteriv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetTexParameterivDataLength(reply) == 0)
++        xcb_glx_get_tex_parameteriv_reply_t *reply = xcb_glx_get_tex_parameteriv_reply(c, xcb_glx_get_tex_parameteriv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_tex_parameteriv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetTexParameterivData(reply), XCBGlxGetTexParameterivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_tex_parameteriv_data(reply), xcb_glx_get_tex_parameteriv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
+@@ -3936,13 +3936,13 @@
+     const GLuint cmdlen = 12;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexLevelParameterfvRep *reply = XCBGlxGetTexLevelParameterfvReply(c, XCBGlxGetTexLevelParameterfv(c, gc->currentContextTag, target, level, pname), NULL);
+-        if (XCBGlxGetTexLevelParameterfvDataLength(reply) == 0)
++        xcb_glx_get_tex_level_parameterfv_reply_t *reply = xcb_glx_get_tex_level_parameterfv_reply(c, xcb_glx_get_tex_level_parameterfv(c, gc->currentContextTag, target, level, pname), NULL);
++        if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetTexLevelParameterfvData(reply), XCBGlxGetTexLevelParameterfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_tex_level_parameterfv_data(reply), xcb_glx_get_tex_level_parameterfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv, cmdlen);
+@@ -3965,13 +3965,13 @@
+     const GLuint cmdlen = 12;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetTexLevelParameterivRep *reply = XCBGlxGetTexLevelParameterivReply(c, XCBGlxGetTexLevelParameteriv(c, gc->currentContextTag, target, level, pname), NULL);
+-        if (XCBGlxGetTexLevelParameterivDataLength(reply) == 0)
++        xcb_glx_get_tex_level_parameteriv_reply_t *reply = xcb_glx_get_tex_level_parameteriv_reply(c, xcb_glx_get_tex_level_parameteriv(c, gc->currentContextTag, target, level, pname), NULL);
++        if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetTexLevelParameterivData(reply), XCBGlxGetTexLevelParameterivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_tex_level_parameteriv_data(reply), xcb_glx_get_tex_level_parameteriv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv, cmdlen);
+@@ -3995,9 +3995,9 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxIsListRep *reply = XCBGlxIsListReply(c, XCBGlxIsList(c, gc->currentContextTag, list), NULL);
++        xcb_glx_is_list_reply_t *reply = xcb_glx_is_list_reply(c, xcb_glx_is_list(c, gc->currentContextTag, list), NULL);
+         retval = reply->ret_val;
+         free(reply);
+ #else
+@@ -4311,10 +4311,10 @@
+     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
+     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxAreTexturesResidentRep *reply = XCBGlxAreTexturesResidentReply(c, XCBGlxAreTexturesResident(c, gc->currentContextTag, n, textures), NULL);
+-        (void)memcpy(residences, XCBGlxAreTexturesResidentData(reply), XCBGlxAreTexturesResidentDataLength(reply) * sizeof(GLboolean));
++        xcb_glx_are_textures_resident_reply_t *reply = xcb_glx_are_textures_resident_reply(c, xcb_glx_are_textures_resident(c, gc->currentContextTag, n, textures), NULL);
++        (void)memcpy(residences, xcb_glx_are_textures_resident_data(reply), xcb_glx_are_textures_resident_data_length(reply) * sizeof(GLboolean));
+         retval = reply->ret_val;
+         free(reply);
+ #else
+@@ -4426,10 +4426,10 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGenTexturesRep *reply = XCBGlxGenTexturesReply(c, XCBGlxGenTextures(c, gc->currentContextTag, n), NULL);
+-        (void)memcpy(textures, XCBGlxGenTexturesData(reply), XCBGlxGenTexturesDataLength(reply) * sizeof(GLuint));
++        xcb_glx_gen_textures_reply_t *reply = xcb_glx_gen_textures_reply(c, xcb_glx_gen_textures(c, gc->currentContextTag, n), NULL);
++        (void)memcpy(textures, xcb_glx_gen_textures_data(reply), xcb_glx_gen_textures_data_length(reply) * sizeof(GLuint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
+@@ -4451,9 +4451,9 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxIsTextureRep *reply = XCBGlxIsTextureReply(c, XCBGlxIsTexture(c, gc->currentContextTag, texture), NULL);
++        xcb_glx_is_texture_reply_t *reply = xcb_glx_is_texture_reply(c, xcb_glx_is_texture(c, gc->currentContextTag, texture), NULL);
+         retval = reply->ret_val;
+         free(reply);
+ #else
+@@ -4672,10 +4672,10 @@
+     const GLuint cmdlen = 16;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetColorTableRep *reply = XCBGlxGetColorTableReply(c, XCBGlxGetColorTable(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
+-        (void)memcpy(table, XCBGlxGetColorTableData(reply), XCBGlxGetColorTableDataLength(reply) * sizeof(GLvoid));
++        xcb_glx_get_color_table_reply_t *reply = xcb_glx_get_color_table_reply(c, xcb_glx_get_color_table(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
++        (void)memcpy(table, xcb_glx_get_color_table_data(reply), xcb_glx_get_color_table_data_length(reply) * sizeof(GLvoid));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
+@@ -4700,13 +4700,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetColorTableParameterfvRep *reply = XCBGlxGetColorTableParameterfvReply(c, XCBGlxGetColorTableParameterfv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetColorTableParameterfvDataLength(reply) == 0)
++        xcb_glx_get_color_table_parameterfv_reply_t *reply = xcb_glx_get_color_table_parameterfv_reply(c, xcb_glx_get_color_table_parameterfv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetColorTableParameterfvData(reply), XCBGlxGetColorTableParameterfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_color_table_parameterfv_data(reply), xcb_glx_get_color_table_parameterfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv, cmdlen);
+@@ -4728,13 +4728,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetColorTableParameterivRep *reply = XCBGlxGetColorTableParameterivReply(c, XCBGlxGetColorTableParameteriv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetColorTableParameterivDataLength(reply) == 0)
++        xcb_glx_get_color_table_parameteriv_reply_t *reply = xcb_glx_get_color_table_parameteriv_reply(c, xcb_glx_get_color_table_parameteriv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetColorTableParameterivData(reply), XCBGlxGetColorTableParameterivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_color_table_parameteriv_data(reply), xcb_glx_get_color_table_parameteriv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv, cmdlen);
+@@ -4965,10 +4965,10 @@
+     const GLuint cmdlen = 16;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetConvolutionFilterRep *reply = XCBGlxGetConvolutionFilterReply(c, XCBGlxGetConvolutionFilter(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
+-        (void)memcpy(image, XCBGlxGetConvolutionFilterData(reply), XCBGlxGetConvolutionFilterDataLength(reply) * sizeof(GLvoid));
++        xcb_glx_get_convolution_filter_reply_t *reply = xcb_glx_get_convolution_filter_reply(c, xcb_glx_get_convolution_filter(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
++        (void)memcpy(image, xcb_glx_get_convolution_filter_data(reply), xcb_glx_get_convolution_filter_data_length(reply) * sizeof(GLvoid));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
+@@ -4993,13 +4993,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetConvolutionParameterfvRep *reply = XCBGlxGetConvolutionParameterfvReply(c, XCBGlxGetConvolutionParameterfv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetConvolutionParameterfvDataLength(reply) == 0)
++        xcb_glx_get_convolution_parameterfv_reply_t *reply = xcb_glx_get_convolution_parameterfv_reply(c, xcb_glx_get_convolution_parameterfv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetConvolutionParameterfvData(reply), XCBGlxGetConvolutionParameterfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_convolution_parameterfv_data(reply), xcb_glx_get_convolution_parameterfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv, cmdlen);
+@@ -5021,13 +5021,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetConvolutionParameterivRep *reply = XCBGlxGetConvolutionParameterivReply(c, XCBGlxGetConvolutionParameteriv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetConvolutionParameterivDataLength(reply) == 0)
++        xcb_glx_get_convolution_parameteriv_reply_t *reply = xcb_glx_get_convolution_parameteriv_reply(c, xcb_glx_get_convolution_parameteriv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetConvolutionParameterivData(reply), XCBGlxGetConvolutionParameterivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_convolution_parameteriv_data(reply), xcb_glx_get_convolution_parameteriv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv, cmdlen);
+@@ -5050,10 +5050,10 @@
+     const GLuint cmdlen = 16;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetHistogramRep *reply = XCBGlxGetHistogramReply(c, XCBGlxGetHistogram(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
+-        (void)memcpy(values, XCBGlxGetHistogramData(reply), XCBGlxGetHistogramDataLength(reply) * sizeof(GLvoid));
++        xcb_glx_get_histogram_reply_t *reply = xcb_glx_get_histogram_reply(c, xcb_glx_get_histogram(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
++        (void)memcpy(values, xcb_glx_get_histogram_data(reply), xcb_glx_get_histogram_data_length(reply) * sizeof(GLvoid));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
+@@ -5079,13 +5079,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetHistogramParameterfvRep *reply = XCBGlxGetHistogramParameterfvReply(c, XCBGlxGetHistogramParameterfv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetHistogramParameterfvDataLength(reply) == 0)
++        xcb_glx_get_histogram_parameterfv_reply_t *reply = xcb_glx_get_histogram_parameterfv_reply(c, xcb_glx_get_histogram_parameterfv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetHistogramParameterfvData(reply), XCBGlxGetHistogramParameterfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_histogram_parameterfv_data(reply), xcb_glx_get_histogram_parameterfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv, cmdlen);
+@@ -5107,13 +5107,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetHistogramParameterivRep *reply = XCBGlxGetHistogramParameterivReply(c, XCBGlxGetHistogramParameteriv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetHistogramParameterivDataLength(reply) == 0)
++        xcb_glx_get_histogram_parameteriv_reply_t *reply = xcb_glx_get_histogram_parameteriv_reply(c, xcb_glx_get_histogram_parameteriv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetHistogramParameterivData(reply), XCBGlxGetHistogramParameterivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_histogram_parameteriv_data(reply), xcb_glx_get_histogram_parameteriv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv, cmdlen);
+@@ -5136,10 +5136,10 @@
+     const GLuint cmdlen = 16;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetMinmaxRep *reply = XCBGlxGetMinmaxReply(c, XCBGlxGetMinmax(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
+-        (void)memcpy(values, XCBGlxGetMinmaxData(reply), XCBGlxGetMinmaxDataLength(reply) * sizeof(GLvoid));
++        xcb_glx_get_minmax_reply_t *reply = xcb_glx_get_minmax_reply(c, xcb_glx_get_minmax(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
++        (void)memcpy(values, xcb_glx_get_minmax_data(reply), xcb_glx_get_minmax_data_length(reply) * sizeof(GLvoid));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
+@@ -5165,13 +5165,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetMinmaxParameterfvRep *reply = XCBGlxGetMinmaxParameterfvReply(c, XCBGlxGetMinmaxParameterfv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetMinmaxParameterfvDataLength(reply) == 0)
++        xcb_glx_get_minmax_parameterfv_reply_t *reply = xcb_glx_get_minmax_parameterfv_reply(c, xcb_glx_get_minmax_parameterfv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetMinmaxParameterfvData(reply), XCBGlxGetMinmaxParameterfvDataLength(reply) * sizeof(GLfloat));
++        (void)memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply), xcb_glx_get_minmax_parameterfv_data_length(reply) * sizeof(GLfloat));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
+@@ -5193,13 +5193,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetMinmaxParameterivRep *reply = XCBGlxGetMinmaxParameterivReply(c, XCBGlxGetMinmaxParameteriv(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetMinmaxParameterivDataLength(reply) == 0)
++        xcb_glx_get_minmax_parameteriv_reply_t *reply = xcb_glx_get_minmax_parameteriv_reply(c, xcb_glx_get_minmax_parameteriv(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetMinmaxParameterivData(reply), XCBGlxGetMinmaxParameterivDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply), xcb_glx_get_minmax_parameteriv_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
+@@ -6578,9 +6578,9 @@
+     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
+     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxDeleteQueriesARB(c, gc->currentContextTag, n, ids);
++        xcb_glx_delete_queries_arb(c, gc->currentContextTag, n, ids);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
+         (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+@@ -6612,10 +6612,10 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGenQueriesARBRep *reply = XCBGlxGenQueriesARBReply(c, XCBGlxGenQueriesARB(c, gc->currentContextTag, n), NULL);
+-        (void)memcpy(ids, XCBGlxGenQueriesARBData(reply), XCBGlxGenQueriesARBDataLength(reply) * sizeof(GLuint));
++        xcb_glx_gen_queries_arb_reply_t *reply = xcb_glx_gen_queries_arb_reply(c, xcb_glx_gen_queries_arb(c, gc->currentContextTag, n), NULL);
++        (void)memcpy(ids, xcb_glx_gen_queries_arb_data(reply), xcb_glx_gen_queries_arb_data_length(reply) * sizeof(GLuint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
+@@ -6636,13 +6636,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetQueryObjectivARBRep *reply = XCBGlxGetQueryObjectivARBReply(c, XCBGlxGetQueryObjectivARB(c, gc->currentContextTag, id, pname), NULL);
+-        if (XCBGlxGetQueryObjectivARBDataLength(reply) == 0)
++        xcb_glx_get_query_objectiv_arb_reply_t *reply = xcb_glx_get_query_objectiv_arb_reply(c, xcb_glx_get_query_objectiv_arb(c, gc->currentContextTag, id, pname), NULL);
++        if (xcb_glx_get_query_objectiv_arb_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetQueryObjectivARBData(reply), XCBGlxGetQueryObjectivARBDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_query_objectiv_arb_data(reply), xcb_glx_get_query_objectiv_arb_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
+@@ -6664,13 +6664,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetQueryObjectuivARBRep *reply = XCBGlxGetQueryObjectuivARBReply(c, XCBGlxGetQueryObjectuivARB(c, gc->currentContextTag, id, pname), NULL);
+-        if (XCBGlxGetQueryObjectuivARBDataLength(reply) == 0)
++        xcb_glx_get_query_objectuiv_arb_reply_t *reply = xcb_glx_get_query_objectuiv_arb_reply(c, xcb_glx_get_query_objectuiv_arb(c, gc->currentContextTag, id, pname), NULL);
++        if (xcb_glx_get_query_objectuiv_arb_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetQueryObjectuivARBData(reply), XCBGlxGetQueryObjectuivARBDataLength(reply) * sizeof(GLuint));
++        (void)memcpy(params, xcb_glx_get_query_objectuiv_arb_data(reply), xcb_glx_get_query_objectuiv_arb_data_length(reply) * sizeof(GLuint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
+@@ -6692,13 +6692,13 @@
+     const GLuint cmdlen = 8;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxGetQueryivARBRep *reply = XCBGlxGetQueryivARBReply(c, XCBGlxGetQueryivARB(c, gc->currentContextTag, target, pname), NULL);
+-        if (XCBGlxGetQueryivARBDataLength(reply) == 0)
++        xcb_glx_get_queryiv_arb_reply_t *reply = xcb_glx_get_queryiv_arb_reply(c, xcb_glx_get_queryiv_arb(c, gc->currentContextTag, target, pname), NULL);
++        if (xcb_glx_get_queryiv_arb_data_length(reply) == 0)
+             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+         else
+-        (void)memcpy(params, XCBGlxGetQueryivARBData(reply), XCBGlxGetQueryivARBDataLength(reply) * sizeof(GLint));
++        (void)memcpy(params, xcb_glx_get_queryiv_arb_data(reply), xcb_glx_get_queryiv_arb_data_length(reply) * sizeof(GLint));
+         free(reply);
+ #else
+         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
+@@ -6721,9 +6721,9 @@
+     const GLuint cmdlen = 4;
+     if (__builtin_expect(dpy != NULL, 1)) {
+ #ifdef USE_XCB
+-        XCBConnection *c = XCBConnectionOfDisplay(dpy);
++        xcb_connection_t *c = XGetXCBConnection(dpy);
+         (void) __glXFlushRenderBuffer(gc, gc->pc);
+-        XCBGlxIsQueryARBRep *reply = XCBGlxIsQueryARBReply(c, XCBGlxIsQueryARB(c, gc->currentContextTag, id), NULL);
++        xcb_glx_is_query_arb_reply_t *reply = xcb_glx_is_query_arb_reply(c, xcb_glx_is_query_arb(c, gc->currentContextTag, id), NULL);
+         retval = reply->ret_val;
+         free(reply);
+ #else
+Index: src/glx/x11/glxext.c
+===================================================================
+RCS file: /cvs/mesa/Mesa/src/glx/x11/glxext.c,v
+retrieving revision 1.24
+retrieving revision 1.25
+diff -u -b -B -r1.24 -r1.25
+--- src/glx/x11/glxext.c       29 Aug 2006 15:38:19 -0000      1.24
++++ src/glx/x11/glxext.c       26 Sep 2006 23:56:20 -0000      1.25
+@@ -65,8 +65,8 @@
+ #ifdef USE_XCB
+-#include <X11/xcl.h>
+-#include <X11/XCB/xcb.h>
+-#include <X11/XCB/glx.h>
++#include <X11/Xlib-xcb.h>
++#include <xcb/xcb.h>
++#include <xcb/glx.h>
+ #endif
+ #include <assert.h>
+@@ -1284,7 +1284,7 @@
+ {
+     Display * const dpy = ctx->currentDpy;
+ #ifdef USE_XCB
+-    XCBConnection *c = XCBConnectionOfDisplay(dpy);
++    xcb_connection_t *c = XGetXCBConnection(dpy);
+ #else
+     xGLXRenderReq *req;
+ #endif /* USE_XCB */
+@@ -1292,7 +1292,7 @@
+     if ( (dpy != NULL) && (size > 0) ) {
+ #ifdef USE_XCB
+-      XCBGlxRender(c, ctx->currentContextTag, size, (char *)ctx->buf);
++      xcb_glx_render(c, ctx->currentContextTag, size, (char *)ctx->buf);
+ #else
+       /* Send the entire buffer as an X request */
+       LockDisplay(dpy);
+@@ -1335,8 +1335,8 @@
+ {
+     Display *dpy = gc->currentDpy;
+ #ifdef USE_XCB
+-    XCBConnection *c = XCBConnectionOfDisplay(dpy);
+-    XCBGlxRenderLarge(c, gc->currentContextTag, requestNumber, totalRequests, dataLen, data);
++    xcb_connection_t *c = XGetXCBConnection(dpy);
++    xcb_glx_render_large(c, gc->currentContextTag, requestNumber, totalRequests, dataLen, data);
+ #else
+     xGLXRenderLargeReq *req;
+     
diff --git a/media-libs/mesa/files/6.5.1-xcb-dont-unlock-twice.patch b/media-libs/mesa/files/6.5.1-xcb-dont-unlock-twice.patch
new file mode 100644 (file)
index 0000000..be68fcc
--- /dev/null
@@ -0,0 +1,20 @@
+Index: src/glx/x11/glxext.c
+===================================================================
+RCS file: /cvs/mesa/Mesa/src/glx/x11/glxext.c,v
+retrieving revision 1.27
+diff -u -b -B -r1.27 glxext.c
+--- src/glx/x11/glxext.c       7 Oct 2006 02:52:18 -0000       1.27
++++ src/glx/x11/glxext.c       9 Oct 2006 00:54:05 -0000
+@@ -1016,11 +1016,11 @@
+       if (!_XReply(dpy, (xReply*) &reply, 0, False)) {
+           /* Something is busted. Punt. */
+           UnlockDisplay(dpy);
++          SyncHandle();
+           FreeScreenConfigs(priv);
+           return GL_FALSE;
+       }
+-      UnlockDisplay(dpy);
+       if (!reply.numVisuals) {
+           /* This screen does not support GL rendering */
+           UnlockDisplay(dpy);
diff --git a/media-libs/mesa/files/digest-mesa-6.5.1-r2 b/media-libs/mesa/files/digest-mesa-6.5.1-r2
new file mode 100644 (file)
index 0000000..45b5cf1
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 c46f2c6646a270911b791dd8e1c2d977 MesaLib-6.5.1.tar.bz2 3138257
+RMD160 23f8714787b053b2c41d020c7af211a02e5beab3 MesaLib-6.5.1.tar.bz2 3138257
+SHA256 e2669c9757e37f9073f539d75ced7f8f7a45b6bbb16081929ca2a306cde59df0 MesaLib-6.5.1.tar.bz2 3138257
diff --git a/media-libs/mesa/mesa-6.5.1-r2.ebuild b/media-libs/mesa/mesa-6.5.1-r2.ebuild
new file mode 100644 (file)
index 0000000..09b3c28
--- /dev/null
@@ -0,0 +1,329 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-6.5.1-r2.ebuild,v 1.1 2006/10/09 02:01:41 dberkholz Exp $
+
+inherit eutils toolchain-funcs multilib flag-o-matic portability
+
+OPENGL_DIR="xorg-x11"
+
+MY_PN="${PN/m/M}"
+MY_P="${MY_PN}-${PV}"
+MY_SRC_P="${MY_PN}Lib-${PV}"
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mesa3d/${MY_SRC_P}.tar.bz2"
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE_VIDEO_CARDS="
+       video_cards_i810
+       video_cards_mach64
+       video_cards_mga
+       video_cards_none
+       video_cards_r128
+       video_cards_radeon
+       video_cards_s3virge
+       video_cards_savage
+       video_cards_sis
+       video_cards_sunffb
+       video_cards_tdfx
+       video_cards_trident
+       video_cards_via"
+IUSE="${IUSE_VIDEO_CARDS}
+       debug
+       doc
+       hardened
+       motif
+       nptl
+       xcb"
+
+RDEPEND="dev-libs/expat
+       x11-libs/libX11
+       x11-libs/libXext
+       x11-libs/libXxf86vm
+       x11-libs/libXi
+       x11-libs/libXmu
+       >=x11-libs/libdrm-2.0.2
+       x11-libs/libICE
+       app-admin/eselect-opengl
+       motif? ( virtual/motif )
+       doc? ( app-doc/opengl-manpages )
+       !<=x11-base/xorg-x11-6.9
+       xcb? ( x11-libs/libxcb )"
+DEPEND="${RDEPEND}
+       dev-util/pkgconfig
+       x11-misc/makedepend
+       x11-proto/inputproto
+       x11-proto/xextproto
+       !hppa? ( x11-proto/xf86driproto )
+       x11-proto/xf86vidmodeproto
+       >=x11-proto/glproto-1.4.8
+       motif? ( x11-proto/printproto )"
+
+S="${WORKDIR}/${MY_P}"
+
+# Think about: ggi, svga, fbcon, no-X configs
+
+if use debug; then
+       if ! has splitdebug ${FEATURES}; then
+               RESTRICT="${RESTRICT} nostrip"
+       fi
+fi
+
+pkg_setup() {
+       if use debug; then
+               strip-flags
+               append-flags -g
+       fi
+
+       append-flags -fno-strict-aliasing
+
+       if use x86-fbsd; then
+               CONFIG="freebsd-dri-x86"
+       elif use amd64-fbsd; then
+               CONFIG="freebsd-dri-amd64"
+       elif use kernel_FreeBSD; then
+               CONFIG="freebsd-dri"
+       elif use x86; then
+               CONFIG="linux-dri-x86"
+       elif use amd64; then
+               CONFIG="linux-dri-x86-64"
+       elif use ppc; then
+               CONFIG="linux-dri-ppc"
+       else
+               CONFIG="linux-dri"
+       fi
+}
+
+src_unpack() {
+       HOSTCONF="${S}/configs/${CONFIG}"
+
+       unpack ${A}
+       # Fixes for bug #146892
+       epatch "${FILESDIR}"/6.5.1-freebsd-dri.patch
+       cd ${S}
+       # FreeBSD 6.* doesn't have posix_memalign().
+       [[ ${CHOST} == *-freebsd6.* ]] && sed -i -e "s/-DHAVE_POSIX_MEMALIGN//" configs/freebsd{,-dri}
+
+       # Fixes for fd.o bug #8521
+       epatch "${FILESDIR}"/${PV}-xcb-dont-unlock-twice.patch 
+
+       # Use XCB API as of 1.0RC2
+       epatch "${FILESDIR}"/${PV}-use-new-xcb-naming.patch
+
+       # Don't compile debug code with USE=-debug - bug #125004
+       if ! use debug; then
+          einfo "Removing DO_DEBUG defs in dri drivers..."
+          find src/mesa/drivers/dri -name *.[hc] -exec egrep -l "\#define\W+DO_DEBUG\W+1" {} \; | xargs sed -i -re "s/\#define\W+DO_DEBUG\W+1/\#define DO_DEBUG 0/" ;
+       fi
+
+       # Set up libdir
+       echo "LIB_DIR = $(get_libdir)" >> ${HOSTCONF}
+
+       # Set default dri drivers directory
+       echo 'DRI_DRIVER_SEARCH_DIR = /usr/$(LIB_DIR)/dri' >> ${HOSTCONF}
+
+       # Do we want thread-local storage (TLS)?
+       if use nptl; then
+               echo "ARCH_FLAGS += -DGLX_USE_TLS" >> ${HOSTCONF}
+       fi
+
+       echo "X11_INCLUDES = `pkg-config --cflags-only-I x11`" >> ${HOSTCONF}
+       if use xcb; then
+               echo "DEFINES += -DUSE_XCB" >> ${HOSTCONF}
+               echo "X11_INCLUDES += `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I x11-xcb` `pkg-config --cflags-only-I xcb-glx`" >> ${HOSTCONF}
+               echo "GL_LIB_DEPS += `pkg-config --libs xcb` `pkg-config --libs x11-xcb` `pkg-config --libs xcb-glx`" >> ${HOSTCONF}
+       fi
+
+       # Configurable DRI drivers
+       if use video_cards_i810; then
+               add_drivers i810 i915 i965
+       fi
+       if use video_cards_mach64; then
+               add_drivers mach64
+       fi
+       if use video_cards_mga; then
+               add_drivers mga
+       fi
+       if use video_cards_r128; then
+               add_drivers r128
+       fi
+       if use video_cards_radeon; then
+               add_drivers radeon r200 r300
+       fi
+       if use video_cards_s3virge; then
+               add_drivers s3v
+       fi
+       if use video_cards_savage; then
+               add_drivers savage
+       fi
+       if use video_cards_sis; then
+               add_drivers sis
+       fi
+       if use video_cards_sunffb; then
+               add_drivers ffb
+       fi
+       if use video_cards_tdfx; then
+               add_drivers tdfx
+       fi
+       if use video_cards_trident; then
+               add_drivers trident
+       fi
+       if use video_cards_via; then
+               add_drivers unichrome
+       fi
+
+       # Set drivers to everything on which we ran add_drivers()
+       echo "DRI_DIRS = ${DRI_DRIVERS}" >> ${HOSTCONF}
+
+       if use hardened; then
+               einfo "Deactivating assembly code for hardened build"
+               echo "ASM_FLAGS =" >> ${HOSTCONF}
+               echo "ASM_SOURCES =" >> ${HOSTCONF}
+               echo "ASM_API =" >> ${HOSTCONF}
+       fi
+
+       if use sparc; then
+               einfo "Sparc assembly code is not working; deactivating"
+               echo "ASM_FLAGS =" >> ${HOSTCONF}
+               echo "ASM_SOURCES =" >> ${HOSTCONF}
+       fi
+
+       # Replace hardcoded /usr/X11R6 with this
+       echo "EXTRA_LIB_PATH = `pkg-config --libs-only-L x11`" >> ${HOSTCONF}
+
+       echo 'CFLAGS = $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)' >> ${HOSTCONF}
+       echo "OPT_FLAGS = ${CFLAGS}" >> ${HOSTCONF}
+       echo "CC = $(tc-getCC)" >> ${HOSTCONF}
+       echo "CXX = $(tc-getCXX)" >> ${HOSTCONF}
+       # bug #110840 - Build with PIC, since it hasn't been shown to slow it down
+       echo "PIC_FLAGS = -fPIC" >> ${HOSTCONF}
+
+       # Removed glut, since we have separate freeglut/glut ebuilds
+       # Remove EGL, since Brian Paul says it's not ready for a release
+       echo "SRC_DIRS = glx/x11 mesa glu glw" >> ${HOSTCONF}
+
+       # Get rid of glut includes
+       rm -f ${S}/include/GL/glut*h
+
+       # r200 breaks without this, since it's the only EGL-enabled driver so far
+       echo "USING_EGL = 0" >> ${HOSTCONF}
+
+       # Don't build EGL demos. EGL isn't ready for release, plus they produce a
+       # circular dependency with glut.
+       echo "PROGRAM_DIRS =" >> ${HOSTCONF}
+
+       # Documented in configs/default
+       if use motif; then
+               # Add -lXm
+               echo "GLW_LIB_DEPS += -lXm" >> ${HOSTCONF}
+               # Add GLwMDrawA.c
+               echo "GLW_SOURCES += GLwMDrawA.c" >> ${HOSTCONF}
+       fi
+}
+
+src_compile() {
+       emake -j1 ${CONFIG} || die "Build failed"
+}
+
+src_install() {
+       dodir /usr
+       make \
+               INSTALL_DIR="${D}/usr" \
+               DRI_DRIVER_INSTALL_DIR="${D}/usr/\$(LIB_DIR)/dri" \
+               INCLUDE_DIR="${D}/usr/include" \
+               install || die "Installation failed"
+
+       if ! use motif; then
+               rm ${D}/usr/include/GL/GLwMDrawA.h
+       fi
+
+       # Don't install private headers
+       rm ${D}/usr/include/GL/GLw*P.h
+
+       fix_opengl_symlinks
+       dynamic_libgl_install
+
+       # Install libtool archives
+       insinto /usr/$(get_libdir)
+       # (#67729) Needs to be lib, not $(get_libdir)
+       doins ${FILESDIR}/lib/libGLU.la
+       sed -e "s:\${libdir}:$(get_libdir):g" ${FILESDIR}/lib/libGL.la \
+               > ${D}/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la
+
+       # On *BSD libcs dlopen() and similar functions are present directly in
+       # libc.so and does not require linking to libdl. portability eclass takes
+       # care of finding the needed library (if needed) witht the dlopen_lib
+       # function.
+       sed -i -e 's:-ldl:'$(dlopen_lib)':g' \
+               ${D}/usr/$(get_libdir)/libGLU.la \
+               ${D}/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la
+
+       # Create the two-number versioned libs (.so.#.#), since only .so.# and
+       # .so.#.#.# were made
+       dosym libGLU.so.1.3.060501 /usr/$(get_libdir)/libGLU.so.1.3
+       dosym libGLw.so.1.0.0 /usr/$(get_libdir)/libGLw.so.1.0
+
+       # libGLU doesn't get the plain .so symlink either
+       dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so
+
+       # Figure out why libGL.so.1.5 is built (directfb), and why it's linked to
+       # as the default libGL.so.1
+}
+
+pkg_postinst() {
+       switch_opengl_implem
+}
+
+fix_opengl_symlinks() {
+       # Remove invalid symlinks
+       local LINK
+       for LINK in $(find ${D}/usr/$(get_libdir) \
+               -name libGL\.* -type l); do
+               rm -f ${LINK}
+       done
+       # Create required symlinks
+       if [[ ${CHOST} == *-freebsd* ]]; then
+               # FreeBSD doesn't use major.minor versioning, so the library is only
+               # libGL.so.1 and no libGL.so.1.2 is ever used there, thus only create
+               # libGL.so symlink and leave libGL.so.1 being the real thing
+               dosym libGL.so.1 /usr/$(get_libdir)/libGL.so
+       else
+               dosym libGL.so.1.2 /usr/$(get_libdir)/libGL.so
+               dosym libGL.so.1.2 /usr/$(get_libdir)/libGL.so.1
+       fi
+}
+
+dynamic_libgl_install() {
+       # next section is to setup the dynamic libGL stuff
+       ebegin "Moving libGL and friends for dynamic switching"
+               dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include}
+               local x=""
+               for x in ${D}/usr/$(get_libdir)/libGL.so* \
+                       ${D}/usr/$(get_libdir)/libGL.la \
+                       ${D}/usr/$(get_libdir)/libGL.a; do
+                       if [ -f ${x} -o -L ${x} ]; then
+                               # libGL.a cause problems with tuxracer, etc
+                               mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib
+                       fi
+               done
+               # glext.h added for #54984
+               for x in ${D}/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
+                       if [ -f ${x} -o -L ${x} ]; then
+                               mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include
+                       fi
+               done
+       eend 0
+}
+
+switch_opengl_implem() {
+               # Switch to the xorg implementation.
+               # Use new opengl-update that will not reset user selected
+               # OpenGL interface ...
+               echo
+               eselect opengl set --use-old ${OPENGL_DIR}
+}
+
+add_drivers() {
+       DRI_DRIVERS="${DRI_DRIVERS} $@"
+}