bring in changes from 6.4 branch
[mesa.git] / src / glx / x11 / indirect.c
index 48739bb741d3c1c815a468c6bac1d035ebc54652..2a4db6578a78149ca2ca5f773efc73dcaae3e7cb 100644 (file)
@@ -1,7 +1,7 @@
 /* DO NOT EDIT - This file generated automatically by glX_proto_send.py (from Mesa) script */
 
 /*
- * (C) Copyright IBM Corporation 2004
+ * (C) Copyright IBM Corporation 2004, 2005
  * All Rights Reserved.
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
 #include <GL/gl.h>
 #include "indirect.h"
 #include "glxclient.h"
-#include "size.h"
+#include "indirect_size.h"
 #include <GL/glxproto.h>
+#ifdef USE_XCB
+#include <X11/xcl.h>
+#include <X11/XCB/xcb.h>
+#include <X11/XCB/glx.h>
+#endif /* USE_XCB */
 
 #define __GLX_PAD(n) (((n) + 3) & ~3)
 
-#  if defined(__i386__) && defined(__GNUC__)
+#  if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
 #    define FASTCALL __attribute__((fastcall))
 #  else
 #    define FASTCALL
 #    define NOINLINE
 #  endif
 
+#if !defined __GNUC__ || __GNUC__ < 3
+#  define __builtin_expect(x, y) x
+#endif
+
 /* If the size and opcode values are known at compile-time, this will, on
  * x86 at least, emit them with a single instruction.
  */
          temp.s[0] = (size); temp.s[1] = (op); \
          *((int *)(dest)) = temp.i; } while(0)
 
-static NOINLINE CARD32
-read_reply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_array )
+NOINLINE CARD32
+__glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_array )
 {
     xGLXSingleReply reply;
     
     (void) _XReply(dpy, (xReply *) & reply, 0, False);
     if (size != 0) {
-       if ((reply.size >= 1) || reply_is_always_array) {
-           const GLint bytes = (reply_is_always_array) 
-             ? (4 * reply.length) : (reply.size * size);
-           const GLint extra = 4 - (bytes & 3);
-
-           _XRead(dpy, dest, bytes);
-           if ( extra != 0 ) {
-               _XEatData(dpy, extra);
-           }
-       }
-       else {
-           (void) memcpy( dest, &(reply.pad3), size);
-       }
+        if ((reply.length > 0) || reply_is_always_array) {
+            const GLint bytes = (reply_is_always_array) 
+              ? (4 * reply.length) : (reply.size * size);
+            const GLint extra = 4 - (bytes & 3);
+
+            _XRead(dpy, dest, bytes);
+            if ( extra < 4 ) {
+                _XEatData(dpy, extra);
+            }
+        }
+        else {
+            (void) memcpy( dest, &(reply.pad3), size);
+        }
     }
 
     return reply.retval;
 }
 
+NOINLINE void
+__glXReadPixelReply( Display *dpy, __GLXcontext * gc, unsigned max_dim,
+    GLint width, GLint height, GLint depth, GLenum format, GLenum type,
+    void * dest, GLboolean dimensions_in_reply )
+{
+    xGLXSingleReply reply;
+    GLint size;
+    
+    (void) _XReply(dpy, (xReply *) & reply, 0, False);
+
+    if ( dimensions_in_reply ) {
+        width  = reply.pad3;
+        height = reply.pad4;
+        depth  = reply.pad5;
+       
+       if ((height == 0) || (max_dim < 2)) { height = 1; }
+       if ((depth  == 0) || (max_dim < 3)) { depth  = 1; }
+    }
+
+    size = reply.length * 4;
+    if (size != 0) {
+        void * buf = Xmalloc( size );
+
+        if ( buf == NULL ) {
+            _XEatData(dpy, size);
+            __glXSetError(gc, GL_OUT_OF_MEMORY);
+        }
+        else {
+            const GLint extra = 4 - (size & 3);
+
+            _XRead(dpy, buf, size);
+            if ( extra < 4 ) {
+                _XEatData(dpy, extra);
+            }
+
+            __glEmptyImage(gc, 3, width, height, depth, format, type,
+                           buf, dest);
+            Xfree(buf);
+        }
+    }
+}
+
 #define X_GLXSingle 0
 
-static NOINLINE GLubyte *
-setup_single_request( __GLXcontext * gc, GLint sop, GLint cmdlen )
+NOINLINE FASTCALL GLubyte *
+__glXSetupSingleRequest( __GLXcontext * gc, GLint sop, GLint cmdlen )
 {
     xGLXSingleReq * req;
     Display * const dpy = gc->currentDpy;
@@ -95,8 +146,8 @@ setup_single_request( __GLXcontext * gc, GLint sop, GLint cmdlen )
     return (GLubyte *)(req) + sz_xGLXSingleReq;
 }
 
-static NOINLINE GLubyte *
-setup_vendor_request( __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen )
+NOINLINE FASTCALL GLubyte *
+__glXSetupVendorRequest( __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen )
 {
     xGLXVendorPrivateReq * req;
     Display * const dpy = gc->currentDpy;
@@ -111,16 +162,29 @@ setup_vendor_request( __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen )
     return (GLubyte *)(req) + sz_xGLXVendorPrivateReq;
 }
 
+const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
+
+#define zero                        (__glXDefaultPixelStore+0)
+#define one                         (__glXDefaultPixelStore+8)
+#define default_pixel_store_1D      (__glXDefaultPixelStore+4)
+#define default_pixel_store_1D_size 20
+#define default_pixel_store_2D      (__glXDefaultPixelStore+4)
+#define default_pixel_store_2D_size 20
+#define default_pixel_store_3D      (__glXDefaultPixelStore+0)
+#define default_pixel_store_3D_size 36
+#define default_pixel_store_4D      (__glXDefaultPixelStore+0)
+#define default_pixel_store_4D_size 36
+
 static FASTCALL NOINLINE void
 generic_3_byte( GLint rop, const void * ptr )
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    const GLuint cmdlen = 7;
+    const GLuint cmdlen = 8;
 
     emit_header(gc->pc, rop, cmdlen);
-    (void) memcpy((void *)(gc->pc + 4), ptr, 3);
+    (void) memcpy((void *)(gc->pc + 4), ptr, 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 static FASTCALL NOINLINE void
@@ -132,19 +196,19 @@ generic_4_byte( GLint rop, const void * ptr )
     emit_header(gc->pc, rop, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), ptr, 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 static FASTCALL NOINLINE void
 generic_6_byte( GLint rop, const void * ptr )
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    const GLuint cmdlen = 10;
+    const GLuint cmdlen = 12;
 
     emit_header(gc->pc, rop, cmdlen);
-    (void) memcpy((void *)(gc->pc + 4), ptr, 6);
+    (void) memcpy((void *)(gc->pc + 4), ptr, 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 static FASTCALL NOINLINE void
@@ -156,7 +220,7 @@ generic_8_byte( GLint rop, const void * ptr )
     emit_header(gc->pc, rop, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), ptr, 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 static FASTCALL NOINLINE void
@@ -168,7 +232,7 @@ generic_12_byte( GLint rop, const void * ptr )
     emit_header(gc->pc, rop, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), ptr, 12);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 static FASTCALL NOINLINE void
@@ -180,7 +244,7 @@ generic_16_byte( GLint rop, const void * ptr )
     emit_header(gc->pc, rop, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), ptr, 16);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 static FASTCALL NOINLINE void
@@ -192,7 +256,7 @@ generic_24_byte( GLint rop, const void * ptr )
     emit_header(gc->pc, rop, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), ptr, 24);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 static FASTCALL NOINLINE void
@@ -204,7 +268,7 @@ generic_32_byte( GLint rop, const void * ptr )
     emit_header(gc->pc, rop, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), ptr, 32);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLsop_NewList 101
@@ -214,12 +278,17 @@ __indirect_glNewList(GLuint list, GLenum mode)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_NewList, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxNewList(c, gc->currentContextTag, list, mode);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&mode), 4);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -231,10 +300,15 @@ __indirect_glEndList(void)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 0;
-    (void) dpy;
-    if (dpy != NULL) {
-        (void) setup_single_request(gc, X_GLsop_EndList, cmdlen);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxEndList(c, gc->currentContextTag);
+#else
+        (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -244,13 +318,11 @@ void
 __indirect_glCallList(GLuint list)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CallList, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&list), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_CallLists 2
@@ -258,30 +330,30 @@ void
 __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glCallLists_size(type);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
-    if (dpy == NULL) return;
-    if ( ((gc->pc + cmdlen) > gc->bufEnd)
-         || (cmdlen > gc->maxSmallRenderCommandSize)) {
-        (void) __glXFlushRenderBuffer(gc, gc->pc);
-    }
-    if (cmdlen <= gc->maxSmallRenderCommandSize) {
-        emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
-        (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
-        (void) memcpy((void *)(gc->pc + 8), (void *)(&type), 4);
-        (void) memcpy((void *)(gc->pc + 12), (void *)(lists), (compsize * n));
-        gc->pc += cmdlen;
-        if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
-    }
-    else {
-        const GLint op = X_GLrop_CallLists;
-        const GLuint cmdlenLarge = cmdlen + 4;
-        (void) memcpy((void *)(gc->pc + 0), (void *)(&op), 4);
-        (void) memcpy((void *)(gc->pc + 4), (void *)(&cmdlenLarge), 4);
-        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
-        (void) memcpy((void *)(gc->pc + 12), (void *)(&type), 4);
-        __glXSendLargeCommand(gc, gc->pc, 16, lists, (compsize * n));
+    if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
+            (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
+            (void) memcpy((void *)(gc->pc + 8), (void *)(&type), 4);
+            (void) memcpy((void *)(gc->pc + 12), (void *)(lists), (compsize * n));
+            gc->pc += cmdlen;
+            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_CallLists;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 8), (void *)(&n), 4);
+            (void) memcpy((void *)(pc + 12), (void *)(&type), 4);
+            __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
+        }
     }
 }
 
@@ -292,12 +364,17 @@ __indirect_glDeleteLists(GLuint list, GLsizei range)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_DeleteLists, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxDeleteLists(c, gc->currentContextTag, list, range);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&range), 4);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -310,12 +387,19 @@ __indirect_glGenLists(GLsizei range)
     Display * const dpy = gc->currentDpy;
     GLuint retval = (GLuint) 0;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GenLists, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGenListsRep *reply = XCBGlxGenListsReply(c, XCBGlxGenLists(c, gc->currentContextTag, range), NULL);
+        retval = reply->ret_val;
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&range), 4);
-        retval = (GLuint) read_reply(gc->currentDpy, 0, NULL, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return retval;
 }
@@ -325,13 +409,11 @@ void
 __indirect_glListBase(GLuint base)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&base), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Begin 4
@@ -339,13 +421,56 @@ void
 __indirect_glBegin(GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Begin, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_Bitmap 5
+void
+__indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
+    const GLuint cmdlen = 48 + __GLX_PAD(compsize);
+    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
+            (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
+            (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
+            (void) memcpy((void *)(gc->pc + 32), (void *)(&xorig), 4);
+            (void) memcpy((void *)(gc->pc + 36), (void *)(&yorig), 4);
+            (void) memcpy((void *)(gc->pc + 40), (void *)(&xmove), 4);
+            (void) memcpy((void *)(gc->pc + 44), (void *)(&ymove), 4);
+            if (compsize > 0) {
+                (*gc->fillImage)(gc, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
+            }
+            else {
+                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
+            }
+            gc->pc += cmdlen;
+            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_Bitmap;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 28), (void *)(&width), 4);
+            (void) memcpy((void *)(pc + 32), (void *)(&height), 4);
+            (void) memcpy((void *)(pc + 36), (void *)(&xorig), 4);
+            (void) memcpy((void *)(pc + 40), (void *)(&yorig), 4);
+            (void) memcpy((void *)(pc + 44), (void *)(&xmove), 4);
+            (void) memcpy((void *)(pc + 48), (void *)(&ymove), 4);
+            __glXSendLargeImage(gc, compsize, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52, pc + 8);
+        }
+    }
 }
 
 #define X_GLrop_Color3bv 6
@@ -353,15 +478,13 @@ void
 __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
     (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color3bv 6
@@ -376,15 +499,13 @@ void
 __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color3dv 7
@@ -399,15 +520,13 @@ void
 __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color3fv 8
@@ -422,15 +541,13 @@ void
 __indirect_glColor3i(GLint red, GLint green, GLint blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color3iv 9
@@ -445,15 +562,13 @@ void
 __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color3sv 10
@@ -468,15 +583,13 @@ void
 __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
     (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color3ubv 11
@@ -491,15 +604,13 @@ void
 __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color3uiv 12
@@ -514,15 +625,13 @@ void
 __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color3usv 13
@@ -537,16 +646,14 @@ void
 __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
     (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
     (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color4bv 14
@@ -561,16 +668,14 @@ void
 __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 36;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
     (void) memcpy((void *)(gc->pc + 28), (void *)(&alpha), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color4dv 15
@@ -585,16 +690,14 @@ void
 __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color4fv 16
@@ -609,16 +712,14 @@ void
 __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color4iv 17
@@ -633,16 +734,14 @@ void
 __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
     (void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color4sv 18
@@ -657,16 +756,14 @@ void
 __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
     (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
     (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color4ubv 19
@@ -681,16 +778,14 @@ void
 __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color4uiv 20
@@ -705,16 +800,14 @@ void
 __indirect_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
     (void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Color4usv 21
@@ -729,13 +822,11 @@ void
 __indirect_glEdgeFlag(GLboolean flag)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_EdgeFlagv 22
@@ -743,13 +834,11 @@ void
 __indirect_glEdgeFlagv(const GLboolean * flag)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(flag), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_End 23
@@ -757,12 +846,10 @@ void
 __indirect_glEnd(void)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_End, cmdlen);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Indexdv 24
@@ -770,13 +857,11 @@ void
 __indirect_glIndexd(GLdouble c)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Indexdv 24
@@ -791,13 +876,11 @@ void
 __indirect_glIndexf(GLfloat c)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Indexfv 25
@@ -812,13 +895,11 @@ void
 __indirect_glIndexi(GLint c)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Indexiv 26
@@ -833,13 +914,11 @@ void
 __indirect_glIndexs(GLshort c)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Indexsv 27
@@ -847,13 +926,11 @@ void
 __indirect_glIndexsv(const GLshort * c)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(c), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Normal3bv 28
@@ -861,15 +938,13 @@ void
 __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 1);
     (void) memcpy((void *)(gc->pc + 5), (void *)(&ny), 1);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&nz), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Normal3bv 28
@@ -884,15 +959,13 @@ void
 __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&ny), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&nz), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Normal3dv 29
@@ -907,15 +980,13 @@ void
 __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Normal3fv 30
@@ -930,15 +1001,13 @@ void
 __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Normal3iv 31
@@ -953,15 +1022,13 @@ void
 __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&ny), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&nz), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Normal3sv 32
@@ -976,14 +1043,12 @@ void
 __indirect_glRasterPos2d(GLdouble x, GLdouble y)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos2dv 33
@@ -998,14 +1063,12 @@ void
 __indirect_glRasterPos2f(GLfloat x, GLfloat y)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos2fv 34
@@ -1020,14 +1083,12 @@ void
 __indirect_glRasterPos2i(GLint x, GLint y)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos2iv 35
@@ -1042,14 +1103,12 @@ void
 __indirect_glRasterPos2s(GLshort x, GLshort y)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos2sv 36
@@ -1064,15 +1123,13 @@ void
 __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos3dv 37
@@ -1087,15 +1144,13 @@ void
 __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos3fv 38
@@ -1110,15 +1165,13 @@ void
 __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos3iv 39
@@ -1133,15 +1186,13 @@ void
 __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos3sv 40
@@ -1156,16 +1207,14 @@ void
 __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 36;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
     (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos4dv 41
@@ -1180,16 +1229,14 @@ void
 __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos4fv 42
@@ -1204,16 +1251,14 @@ void
 __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos4iv 43
@@ -1228,16 +1273,14 @@ void
 __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
     (void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_RasterPos4sv 44
@@ -1252,16 +1295,14 @@ void
 __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 36;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y1), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&x2), 8);
     (void) memcpy((void *)(gc->pc + 28), (void *)(&y2), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Rectdv 45
@@ -1269,14 +1310,12 @@ void
 __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 36;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 16);
     (void) memcpy((void *)(gc->pc + 20), (void *)(v2), 16);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Rectfv 46
@@ -1284,16 +1323,14 @@ void
 __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Rectfv 46
@@ -1301,14 +1338,12 @@ void
 __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Rectiv 47
@@ -1316,16 +1351,14 @@ void
 __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Rectiv 47
@@ -1333,14 +1366,12 @@ void
 __indirect_glRectiv(const GLint * v1, const GLint * v2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Rectsv 48
@@ -1348,16 +1379,14 @@ void
 __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&y1), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&x2), 2);
     (void) memcpy((void *)(gc->pc + 10), (void *)(&y2), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Rectsv 48
@@ -1365,14 +1394,12 @@ void
 __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v2), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord1dv 49
@@ -1380,13 +1407,11 @@ void
 __indirect_glTexCoord1d(GLdouble s)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord1dv 49
@@ -1401,13 +1426,11 @@ void
 __indirect_glTexCoord1f(GLfloat s)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord1fv 50
@@ -1422,13 +1445,11 @@ void
 __indirect_glTexCoord1i(GLint s)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord1iv 51
@@ -1443,13 +1464,11 @@ void
 __indirect_glTexCoord1s(GLshort s)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord1sv 52
@@ -1457,13 +1476,11 @@ void
 __indirect_glTexCoord1sv(const GLshort * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(v), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord2dv 53
@@ -1471,14 +1488,12 @@ void
 __indirect_glTexCoord2d(GLdouble s, GLdouble t)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord2dv 53
@@ -1493,14 +1508,12 @@ void
 __indirect_glTexCoord2f(GLfloat s, GLfloat t)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord2fv 54
@@ -1515,14 +1528,12 @@ void
 __indirect_glTexCoord2i(GLint s, GLint t)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord2iv 55
@@ -1537,14 +1548,12 @@ void
 __indirect_glTexCoord2s(GLshort s, GLshort t)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord2sv 56
@@ -1559,15 +1568,13 @@ void
 __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord3dv 57
@@ -1582,15 +1589,13 @@ void
 __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord3fv 58
@@ -1605,15 +1610,13 @@ void
 __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord3iv 59
@@ -1628,15 +1631,13 @@ void
 __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord3sv 60
@@ -1651,16 +1652,14 @@ void
 __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 36;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
     (void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord4dv 61
@@ -1675,16 +1674,14 @@ void
 __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord4fv 62
@@ -1699,16 +1696,14 @@ void
 __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord4iv 63
@@ -1723,16 +1718,14 @@ void
 __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2);
     (void) memcpy((void *)(gc->pc + 10), (void *)(&q), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexCoord4sv 64
@@ -1747,14 +1740,12 @@ void
 __indirect_glVertex2d(GLdouble x, GLdouble y)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex2dv 65
@@ -1769,14 +1760,12 @@ void
 __indirect_glVertex2f(GLfloat x, GLfloat y)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex2fv 66
@@ -1791,14 +1780,12 @@ void
 __indirect_glVertex2i(GLint x, GLint y)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex2iv 67
@@ -1813,14 +1800,12 @@ void
 __indirect_glVertex2s(GLshort x, GLshort y)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex2sv 68
@@ -1835,15 +1820,13 @@ void
 __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex3dv 69
@@ -1858,15 +1841,13 @@ void
 __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex3fv 70
@@ -1881,15 +1862,13 @@ void
 __indirect_glVertex3i(GLint x, GLint y, GLint z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex3iv 71
@@ -1904,15 +1883,13 @@ void
 __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex3sv 72
@@ -1927,16 +1904,14 @@ void
 __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 36;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
     (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex4dv 73
@@ -1951,16 +1926,14 @@ void
 __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex4fv 74
@@ -1975,16 +1948,14 @@ void
 __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex4iv 75
@@ -1999,16 +1970,14 @@ void
 __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
     (void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Vertex4sv 76
@@ -2023,14 +1992,12 @@ void
 __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 40;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(equation), 32);
     (void) memcpy((void *)(gc->pc + 36), (void *)(&plane), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ColorMaterial 78
@@ -2038,14 +2005,12 @@ void
 __indirect_glColorMaterial(GLenum face, GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_CullFace 79
@@ -2053,13 +2018,11 @@ void
 __indirect_glCullFace(GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Fogf 80
@@ -2067,14 +2030,12 @@ void
 __indirect_glFogf(GLenum pname, GLfloat param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Fogfv 81
@@ -2082,15 +2043,13 @@ void
 __indirect_glFogfv(GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glFogfv_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Fogi 82
@@ -2098,14 +2057,12 @@ void
 __indirect_glFogi(GLenum pname, GLint param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Fogiv 83
@@ -2113,15 +2070,13 @@ void
 __indirect_glFogiv(GLenum pname, const GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glFogiv_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_FrontFace 84
@@ -2129,13 +2084,11 @@ void
 __indirect_glFrontFace(GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Hint 85
@@ -2143,14 +2096,12 @@ void
 __indirect_glHint(GLenum target, GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Hint, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Lightf 86
@@ -2158,15 +2109,13 @@ void
 __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Lightfv 87
@@ -2174,16 +2123,14 @@ void
 __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glLightfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Lighti 88
@@ -2191,15 +2138,13 @@ void
 __indirect_glLighti(GLenum light, GLenum pname, GLint param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Lightiv 89
@@ -2207,16 +2152,14 @@ void
 __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glLightiv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LightModelf 90
@@ -2224,14 +2167,12 @@ void
 __indirect_glLightModelf(GLenum pname, GLfloat param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LightModelfv 91
@@ -2239,15 +2180,13 @@ void
 __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glLightModelfv_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LightModeli 92
@@ -2255,14 +2194,12 @@ void
 __indirect_glLightModeli(GLenum pname, GLint param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LightModeliv 93
@@ -2270,15 +2207,13 @@ void
 __indirect_glLightModeliv(GLenum pname, const GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glLightModeliv_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LineStipple 94
@@ -2286,14 +2221,12 @@ void
 __indirect_glLineStipple(GLint factor, GLushort pattern)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pattern), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LineWidth 95
@@ -2301,13 +2234,11 @@ void
 __indirect_glLineWidth(GLfloat width)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&width), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Materialf 96
@@ -2315,15 +2246,13 @@ void
 __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Materialfv 97
@@ -2331,16 +2260,14 @@ void
 __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glMaterialfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Materiali 98
@@ -2348,15 +2275,13 @@ void
 __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Materialiv 99
@@ -2364,16 +2289,14 @@ void
 __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glMaterialiv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PointSize 100
@@ -2381,13 +2304,11 @@ void
 __indirect_glPointSize(GLfloat size)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&size), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PolygonMode 101
@@ -2395,31 +2316,45 @@ void
 __indirect_glPolygonMode(GLenum face, GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
-#define X_GLrop_Scissor 103
+#define X_GLrop_PolygonStipple 102
 void
-__indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+__indirect_glPolygonStipple(const GLubyte * mask)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
-    const GLuint cmdlen = 20;
-    (void) dpy;
-    emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
+    const GLuint compsize = (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
+    const GLuint cmdlen = 24 + __GLX_PAD(compsize);
+    emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
+    if (compsize > 0) {
+        (*gc->fillImage)(gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, gc->pc + 24, gc->pc + 4);
+    }
+    else {
+        (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
+    }
+    gc->pc += cmdlen;
+    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_Scissor 103
+void
+__indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 20;
+    emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ShadeModel 104
@@ -2427,13 +2362,11 @@ void
 __indirect_glShadeModel(GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexParameterf 105
@@ -2441,15 +2374,13 @@ void
 __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexParameterfv 106
@@ -2457,16 +2388,14 @@ void
 __indirect_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glTexParameterfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexParameteri 107
@@ -2474,15 +2403,13 @@ void
 __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexParameteriv 108
@@ -2490,16 +2417,76 @@ void
 __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glTexParameteriv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+static void
+__glx_TexImage_1D2D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels )
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = __glImageSize(width, height, 1, format, type, target);
+    const GLuint cmdlen = 56 + __GLX_PAD(compsize);
+    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, opcode, cmdlen);
+            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
+            (void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4);
+            (void) memcpy((void *)(gc->pc + 32), (void *)(&internalformat), 4);
+            (void) memcpy((void *)(gc->pc + 36), (void *)(&width), 4);
+            (void) memcpy((void *)(gc->pc + 40), (void *)(&height), 4);
+            (void) memcpy((void *)(gc->pc + 44), (void *)(&border), 4);
+            (void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4);
+            (void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4);
+            if ((compsize > 0) && (pixels != NULL)) {
+                (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 56, gc->pc + 4);
+            }
+            else {
+                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
+            }
+            gc->pc += cmdlen;
+            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = opcode;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
+            (void) memcpy((void *)(pc + 32), (void *)(&level), 4);
+            (void) memcpy((void *)(pc + 36), (void *)(&internalformat), 4);
+            (void) memcpy((void *)(pc + 40), (void *)(&width), 4);
+            (void) memcpy((void *)(pc + 44), (void *)(&height), 4);
+            (void) memcpy((void *)(pc + 48), (void *)(&border), 4);
+            (void) memcpy((void *)(pc + 52), (void *)(&format), 4);
+            (void) memcpy((void *)(pc + 56), (void *)(&type), 4);
+            __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 60, pc + 8);
+        }
+    }
+}
+
+#define X_GLrop_TexImage1D 109
+void
+__indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
+{
+    __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat, width, 1, border, format, type, pixels );
+}
+
+#define X_GLrop_TexImage2D 110
+void
+__indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
+{
+    __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat, width, height, border, format, type, pixels );
 }
 
 #define X_GLrop_TexEnvf 111
@@ -2507,15 +2494,13 @@ void
 __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexEnvfv 112
@@ -2523,16 +2508,14 @@ void
 __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glTexEnvfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexEnvi 113
@@ -2540,15 +2523,13 @@ void
 __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexEnviv 114
@@ -2556,16 +2537,14 @@ void
 __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glTexEnviv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexGend 115
@@ -2573,15 +2552,13 @@ void
 __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&param), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&coord), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&pname), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexGendv 116
@@ -2589,16 +2566,14 @@ void
 __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glTexGendv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 8));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexGenf 117
@@ -2606,15 +2581,13 @@ void
 __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexGenfv 118
@@ -2622,16 +2595,14 @@ void
 __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glTexGenfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexGeni 119
@@ -2639,15 +2610,13 @@ void
 __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_TexGeniv 120
@@ -2655,16 +2624,14 @@ void
 __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glTexGeniv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_InitNames 121
@@ -2672,12 +2639,10 @@ void
 __indirect_glInitNames(void)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LoadName 122
@@ -2685,13 +2650,11 @@ void
 __indirect_glLoadName(GLuint name)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PassThrough 123
@@ -2699,13 +2662,11 @@ void
 __indirect_glPassThrough(GLfloat token)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&token), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PopName 124
@@ -2713,12 +2674,10 @@ void
 __indirect_glPopName(void)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PopName, cmdlen);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PushName 125
@@ -2726,13 +2685,11 @@ void
 __indirect_glPushName(GLuint name)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PushName, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_DrawBuffer 126
@@ -2740,13 +2697,11 @@ void
 __indirect_glDrawBuffer(GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Clear 127
@@ -2754,13 +2709,11 @@ void
 __indirect_glClear(GLbitfield mask)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Clear, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ClearAccum 128
@@ -2768,16 +2721,14 @@ void
 __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ClearIndex 129
@@ -2785,13 +2736,11 @@ void
 __indirect_glClearIndex(GLfloat c)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ClearColor 130
@@ -2799,16 +2748,14 @@ void
 __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ClearStencil 131
@@ -2816,13 +2763,11 @@ void
 __indirect_glClearStencil(GLint s)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ClearDepth 132
@@ -2830,13 +2775,11 @@ void
 __indirect_glClearDepth(GLclampd depth)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&depth), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_StencilMask 133
@@ -2844,13 +2787,11 @@ void
 __indirect_glStencilMask(GLuint mask)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ColorMask 134
@@ -2858,16 +2799,14 @@ void
 __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
     (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
     (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_DepthMask 135
@@ -2875,13 +2814,11 @@ void
 __indirect_glDepthMask(GLboolean flag)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_IndexMask 136
@@ -2889,13 +2826,11 @@ void
 __indirect_glIndexMask(GLuint mask)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Accum 137
@@ -2903,14 +2838,12 @@ void
 __indirect_glAccum(GLenum op, GLfloat value)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Accum, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&op), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&value), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PopAttrib 141
@@ -2918,12 +2851,10 @@ void
 __indirect_glPopAttrib(void)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PushAttrib 142
@@ -2931,13 +2862,11 @@ void
 __indirect_glPushAttrib(GLbitfield mask)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MapGrid1d 147
@@ -2945,15 +2874,13 @@ void
 __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&un), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MapGrid1f 148
@@ -2961,15 +2888,13 @@ void
 __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MapGrid2d 149
@@ -2977,9 +2902,7 @@ void
 __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 44;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8);
@@ -2988,7 +2911,7 @@ __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1
     (void) memcpy((void *)(gc->pc + 36), (void *)(&un), 4);
     (void) memcpy((void *)(gc->pc + 40), (void *)(&vn), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MapGrid2f 150
@@ -2996,9 +2919,7 @@ void
 __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4);
@@ -3007,7 +2928,7 @@ __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, G
     (void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 4);
     (void) memcpy((void *)(gc->pc + 24), (void *)(&v2), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_EvalCoord1dv 151
@@ -3015,13 +2936,11 @@ void
 __indirect_glEvalCoord1d(GLdouble u)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_EvalCoord1dv 151
@@ -3036,13 +2955,11 @@ void
 __indirect_glEvalCoord1f(GLfloat u)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_EvalCoord1fv 152
@@ -3057,14 +2974,12 @@ void
 __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&v), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_EvalCoord2dv 153
@@ -3079,14 +2994,12 @@ void
 __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&v), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_EvalCoord2fv 154
@@ -3101,15 +3014,13 @@ void
 __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_EvalPoint1 156
@@ -3117,13 +3028,11 @@ void
 __indirect_glEvalPoint1(GLint i)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_EvalMesh2 157
@@ -3131,9 +3040,7 @@ void
 __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4);
@@ -3141,7 +3048,7 @@ __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
     (void) memcpy((void *)(gc->pc + 16), (void *)(&j1), 4);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&j2), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_EvalPoint2 158
@@ -3149,14 +3056,12 @@ void
 __indirect_glEvalPoint2(GLint i, GLint j)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&j), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_AlphaFunc 159
@@ -3164,14 +3069,12 @@ void
 __indirect_glAlphaFunc(GLenum func, GLclampf ref)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_BlendFunc 160
@@ -3179,14 +3082,12 @@ void
 __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&sfactor), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&dfactor), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LogicOp 161
@@ -3194,13 +3095,11 @@ void
 __indirect_glLogicOp(GLenum opcode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&opcode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_StencilFunc 162
@@ -3208,15 +3107,13 @@ void
 __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&mask), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_StencilOp 163
@@ -3224,15 +3121,13 @@ void
 __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&fail), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&zfail), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&zpass), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_DepthFunc 164
@@ -3240,13 +3135,11 @@ void
 __indirect_glDepthFunc(GLenum func)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PixelZoom 165
@@ -3254,14 +3147,12 @@ void
 __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&xfactor), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&yfactor), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PixelTransferf 166
@@ -3269,14 +3160,12 @@ void
 __indirect_glPixelTransferf(GLenum pname, GLfloat param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PixelTransferi 167
@@ -3284,14 +3173,12 @@ void
 __indirect_glPixelTransferi(GLenum pname, GLint param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PixelMapfv 168
@@ -3299,30 +3186,29 @@ void
 __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
-    if (mapsize < 0) return;
-    if (dpy == NULL) return;
-    if ( ((gc->pc + cmdlen) > gc->bufEnd)
-         || (cmdlen > gc->maxSmallRenderCommandSize)) {
-        (void) __glXFlushRenderBuffer(gc, gc->pc);
-    }
-    if (cmdlen <= gc->maxSmallRenderCommandSize) {
-        emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
-        (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
-        (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
-        (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4));
-        gc->pc += cmdlen;
-        if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
-    }
-    else {
-        const GLint op = X_GLrop_PixelMapfv;
-        const GLuint cmdlenLarge = cmdlen + 4;
-        (void) memcpy((void *)(gc->pc + 0), (void *)(&op), 4);
-        (void) memcpy((void *)(gc->pc + 4), (void *)(&cmdlenLarge), 4);
-        (void) memcpy((void *)(gc->pc + 8), (void *)(&map), 4);
-        (void) memcpy((void *)(gc->pc + 12), (void *)(&mapsize), 4);
-        __glXSendLargeCommand(gc, gc->pc, 16, values, (mapsize * 4));
+    if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
+            (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
+            (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
+            (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4));
+            gc->pc += cmdlen;
+            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_PixelMapfv;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 8), (void *)(&map), 4);
+            (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
+            __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
+        }
     }
 }
 
@@ -3331,30 +3217,29 @@ void
 __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
-    if (mapsize < 0) return;
-    if (dpy == NULL) return;
-    if ( ((gc->pc + cmdlen) > gc->bufEnd)
-         || (cmdlen > gc->maxSmallRenderCommandSize)) {
-        (void) __glXFlushRenderBuffer(gc, gc->pc);
-    }
-    if (cmdlen <= gc->maxSmallRenderCommandSize) {
-        emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
-        (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
-        (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
-        (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4));
-        gc->pc += cmdlen;
-        if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
-    }
-    else {
-        const GLint op = X_GLrop_PixelMapuiv;
-        const GLuint cmdlenLarge = cmdlen + 4;
-        (void) memcpy((void *)(gc->pc + 0), (void *)(&op), 4);
-        (void) memcpy((void *)(gc->pc + 4), (void *)(&cmdlenLarge), 4);
-        (void) memcpy((void *)(gc->pc + 8), (void *)(&map), 4);
-        (void) memcpy((void *)(gc->pc + 12), (void *)(&mapsize), 4);
-        __glXSendLargeCommand(gc, gc->pc, 16, values, (mapsize * 4));
+    if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
+            (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
+            (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
+            (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4));
+            gc->pc += cmdlen;
+            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_PixelMapuiv;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 8), (void *)(&map), 4);
+            (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
+            __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
+        }
     }
 }
 
@@ -3363,30 +3248,29 @@ void
 __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
-    if (mapsize < 0) return;
-    if (dpy == NULL) return;
-    if ( ((gc->pc + cmdlen) > gc->bufEnd)
-         || (cmdlen > gc->maxSmallRenderCommandSize)) {
-        (void) __glXFlushRenderBuffer(gc, gc->pc);
-    }
-    if (cmdlen <= gc->maxSmallRenderCommandSize) {
-        emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
-        (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
-        (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
-        (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 2));
-        gc->pc += cmdlen;
-        if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
-    }
-    else {
-        const GLint op = X_GLrop_PixelMapusv;
-        const GLuint cmdlenLarge = cmdlen + 4;
-        (void) memcpy((void *)(gc->pc + 0), (void *)(&op), 4);
-        (void) memcpy((void *)(gc->pc + 4), (void *)(&cmdlenLarge), 4);
-        (void) memcpy((void *)(gc->pc + 8), (void *)(&map), 4);
-        (void) memcpy((void *)(gc->pc + 12), (void *)(&mapsize), 4);
-        __glXSendLargeCommand(gc, gc->pc, 16, values, (mapsize * 2));
+    if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
+            (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
+            (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
+            (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 2));
+            gc->pc += cmdlen;
+            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_PixelMapusv;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 8), (void *)(&map), 4);
+            (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
+            __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
+        }
     }
 }
 
@@ -3395,13 +3279,11 @@ void
 __indirect_glReadBuffer(GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_CopyPixels 172
@@ -3409,9 +3291,7 @@ void
 __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
@@ -3419,7 +3299,80 @@ __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum
     (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&type), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLsop_ReadPixels 111
+void
+__indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const __GLXattribute * const state = gc->client_state_private;
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 28;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&x), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&y), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&width), 4);
+        (void) memcpy((void *)(pc + 12), (void *)(&height), 4);
+        (void) memcpy((void *)(pc + 16), (void *)(&format), 4);
+        (void) memcpy((void *)(pc + 20), (void *)(&type), 4);
+        *(int32_t *)(pc + 24) = 0;
+        * (int8_t *)(pc + 24) = state->storePack.swapEndian;
+        __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type, pixels, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLrop_DrawPixels 173
+void
+__indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, 0) : 0;
+    const GLuint cmdlen = 40 + __GLX_PAD(compsize);
+    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
+            (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
+            (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
+            (void) memcpy((void *)(gc->pc + 32), (void *)(&format), 4);
+            (void) memcpy((void *)(gc->pc + 36), (void *)(&type), 4);
+            if (compsize > 0) {
+                (*gc->fillImage)(gc, 2, width, height, 1, format, type, pixels, gc->pc + 40, gc->pc + 4);
+            }
+            else {
+                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
+            }
+            gc->pc += cmdlen;
+            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_DrawPixels;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 28), (void *)(&width), 4);
+            (void) memcpy((void *)(pc + 32), (void *)(&height), 4);
+            (void) memcpy((void *)(pc + 36), (void *)(&format), 4);
+            (void) memcpy((void *)(pc + 40), (void *)(&type), 4);
+            __glXSendLargeImage(gc, compsize, 2, width, height, 1, format, type, pixels, pc + 44, pc + 8);
+        }
+    }
 }
 
 #define X_GLsop_GetClipPlane 113
@@ -3429,12 +3382,19 @@ __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetClipPlane, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&plane), 4);
-        (void) read_reply(gc->currentDpy, 8, equation, GL_TRUE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3446,13 +3406,23 @@ __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetLightfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetLightfvRep *reply = XCBGlxGetLightfvReply(c, XCBGlxGetLightfv(c, gc->currentContextTag, light, pname), NULL);
+        if (XCBGlxGetLightfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetLightfvData(reply), XCBGlxGetLightfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&light), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3464,13 +3434,23 @@ __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetLightiv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetLightivRep *reply = XCBGlxGetLightivReply(c, XCBGlxGetLightiv(c, gc->currentContextTag, light, pname), NULL);
+        if (XCBGlxGetLightivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetLightivData(reply), XCBGlxGetLightivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&light), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3482,13 +3462,23 @@ __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetMapdv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetMapdvRep *reply = XCBGlxGetMapdvReply(c, XCBGlxGetMapdv(c, gc->currentContextTag, target, query), NULL);
+        if (XCBGlxGetMapdvDataLength(reply) == 0)
+            (void)memcpy(v, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(v, XCBGlxGetMapdvData(reply), XCBGlxGetMapdvDataLength(reply) * sizeof(GLdouble));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&query), 4);
-        (void) read_reply(gc->currentDpy, 8, v, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 8, v, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3500,13 +3490,23 @@ __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetMapfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetMapfvRep *reply = XCBGlxGetMapfvReply(c, XCBGlxGetMapfv(c, gc->currentContextTag, target, query), NULL);
+        if (XCBGlxGetMapfvDataLength(reply) == 0)
+            (void)memcpy(v, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(v, XCBGlxGetMapfvData(reply), XCBGlxGetMapfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&query), 4);
-        (void) read_reply(gc->currentDpy, 4, v, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, v, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3518,13 +3518,23 @@ __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetMapiv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetMapivRep *reply = XCBGlxGetMapivReply(c, XCBGlxGetMapiv(c, gc->currentContextTag, target, query), NULL);
+        if (XCBGlxGetMapivDataLength(reply) == 0)
+            (void)memcpy(v, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(v, XCBGlxGetMapivData(reply), XCBGlxGetMapivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&query), 4);
-        (void) read_reply(gc->currentDpy, 4, v, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, v, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3536,13 +3546,23 @@ __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetMaterialfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetMaterialfvRep *reply = XCBGlxGetMaterialfvReply(c, XCBGlxGetMaterialfv(c, gc->currentContextTag, face, pname), NULL);
+        if (XCBGlxGetMaterialfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetMaterialfvData(reply), XCBGlxGetMaterialfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&face), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3554,13 +3574,23 @@ __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetMaterialiv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetMaterialivRep *reply = XCBGlxGetMaterialivReply(c, XCBGlxGetMaterialiv(c, gc->currentContextTag, face, pname), NULL);
+        if (XCBGlxGetMaterialivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetMaterialivData(reply), XCBGlxGetMaterialivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&face), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3572,12 +3602,22 @@ __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetPixelMapfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetPixelMapfvRep *reply = XCBGlxGetPixelMapfvReply(c, XCBGlxGetPixelMapfv(c, gc->currentContextTag, map), NULL);
+        if (XCBGlxGetPixelMapfvDataLength(reply) == 0)
+            (void)memcpy(values, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(values, XCBGlxGetPixelMapfvData(reply), XCBGlxGetPixelMapfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
-        (void) read_reply(gc->currentDpy, 4, values, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, values, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3589,12 +3629,22 @@ __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetPixelMapuiv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetPixelMapuivRep *reply = XCBGlxGetPixelMapuivReply(c, XCBGlxGetPixelMapuiv(c, gc->currentContextTag, map), NULL);
+        if (XCBGlxGetPixelMapuivDataLength(reply) == 0)
+            (void)memcpy(values, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(values, XCBGlxGetPixelMapuivData(reply), XCBGlxGetPixelMapuivDataLength(reply) * sizeof(GLuint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
-        (void) read_reply(gc->currentDpy, 4, values, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, values, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3606,12 +3656,47 @@ __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetPixelMapusv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetPixelMapusvRep *reply = XCBGlxGetPixelMapusvReply(c, XCBGlxGetPixelMapusv(c, gc->currentContextTag, map), NULL);
+        if (XCBGlxGetPixelMapusvDataLength(reply) == 0)
+            (void)memcpy(values, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(values, XCBGlxGetPixelMapusvData(reply), XCBGlxGetPixelMapusvDataLength(reply) * sizeof(GLushort));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
-        (void) read_reply(gc->currentDpy, 2, values, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 2, values, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLsop_GetPolygonStipple 128
+void
+__indirect_glGetPolygonStipple(GLubyte * mask)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const __GLXattribute * const state = gc->client_state_private;
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
+        *(int32_t *)(pc + 0) = 0;
+        __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3623,13 +3708,23 @@ __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetTexEnvfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetTexEnvfvRep *reply = XCBGlxGetTexEnvfvReply(c, XCBGlxGetTexEnvfv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetTexEnvfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetTexEnvfvData(reply), XCBGlxGetTexEnvfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3641,13 +3736,23 @@ __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetTexEnviv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetTexEnvivRep *reply = XCBGlxGetTexEnvivReply(c, XCBGlxGetTexEnviv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetTexEnvivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetTexEnvivData(reply), XCBGlxGetTexEnvivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3659,13 +3764,23 @@ __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetTexGendv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetTexGendvRep *reply = XCBGlxGetTexGendvReply(c, XCBGlxGetTexGendv(c, gc->currentContextTag, coord, pname), NULL);
+        if (XCBGlxGetTexGendvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetTexGendvData(reply), XCBGlxGetTexGendvDataLength(reply) * sizeof(GLdouble));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 8, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3677,13 +3792,23 @@ __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetTexGenfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetTexGenfvRep *reply = XCBGlxGetTexGenfvReply(c, XCBGlxGetTexGenfv(c, gc->currentContextTag, coord, pname), NULL);
+        if (XCBGlxGetTexGenfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetTexGenfvData(reply), XCBGlxGetTexGenfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3695,13 +3820,53 @@ __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetTexGeniv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetTexGenivRep *reply = XCBGlxGetTexGenivReply(c, XCBGlxGetTexGeniv(c, gc->currentContextTag, coord, pname), NULL);
+        if (XCBGlxGetTexGenivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetTexGenivData(reply), XCBGlxGetTexGenivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLsop_GetTexImage 135
+void
+__indirect_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const __GLXattribute * const state = gc->client_state_private;
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 20;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&level), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&format), 4);
+        (void) memcpy((void *)(pc + 12), (void *)(&type), 4);
+        *(int32_t *)(pc + 16) = 0;
+        * (int8_t *)(pc + 16) = state->storePack.swapEndian;
+        __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3713,13 +3878,23 @@ __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetTexParameterfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetTexParameterfvRep *reply = XCBGlxGetTexParameterfvReply(c, XCBGlxGetTexParameterfv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetTexParameterfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetTexParameterfvData(reply), XCBGlxGetTexParameterfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3731,13 +3906,23 @@ __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetTexParameteriv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetTexParameterivRep *reply = XCBGlxGetTexParameterivReply(c, XCBGlxGetTexParameteriv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetTexParameterivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetTexParameterivData(reply), XCBGlxGetTexParameterivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3749,14 +3934,24 @@ __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GL
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetTexLevelParameterfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetTexLevelParameterfvRep *reply = XCBGlxGetTexLevelParameterfvReply(c, XCBGlxGetTexLevelParameterfv(c, gc->currentContextTag, target, level, pname), NULL);
+        if (XCBGlxGetTexLevelParameterfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetTexLevelParameterfvData(reply), XCBGlxGetTexLevelParameterfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&level), 4);
         (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3768,14 +3963,24 @@ __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GL
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetTexLevelParameteriv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetTexLevelParameterivRep *reply = XCBGlxGetTexLevelParameterivReply(c, XCBGlxGetTexLevelParameteriv(c, gc->currentContextTag, target, level, pname), NULL);
+        if (XCBGlxGetTexLevelParameterivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetTexLevelParameterivData(reply), XCBGlxGetTexLevelParameterivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&level), 4);
         (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -3788,12 +3993,19 @@ __indirect_glIsList(GLuint list)
     Display * const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_IsList, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxIsListRep *reply = XCBGlxIsListReply(c, XCBGlxIsList(c, gc->currentContextTag, list), NULL);
+        retval = reply->ret_val;
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
-        retval = (GLboolean) read_reply(gc->currentDpy, 0, NULL, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return retval;
 }
@@ -3803,14 +4015,12 @@ void
 __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&zNear), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&zFar), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Frustum 175
@@ -3818,9 +4028,7 @@ void
 __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 52;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8);
@@ -3829,7 +4037,7 @@ __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble to
     (void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8);
     (void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LoadIdentity 176
@@ -3837,12 +4045,10 @@ void
 __indirect_glLoadIdentity(void)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LoadMatrixf 177
@@ -3850,13 +4056,11 @@ void
 __indirect_glLoadMatrixf(const GLfloat * m)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 68;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_LoadMatrixd 178
@@ -3864,13 +4068,11 @@ void
 __indirect_glLoadMatrixd(const GLdouble * m)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 132;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MatrixMode 179
@@ -3878,13 +4080,11 @@ void
 __indirect_glMatrixMode(GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultMatrixf 180
@@ -3892,13 +4092,11 @@ void
 __indirect_glMultMatrixf(const GLfloat * m)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 68;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultMatrixd 181
@@ -3906,13 +4104,11 @@ void
 __indirect_glMultMatrixd(const GLdouble * m)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 132;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Ortho 182
@@ -3920,9 +4116,7 @@ void
 __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 52;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8);
@@ -3931,7 +4125,7 @@ __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top,
     (void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8);
     (void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PopMatrix 183
@@ -3939,12 +4133,10 @@ void
 __indirect_glPopMatrix(void)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PushMatrix 184
@@ -3952,12 +4144,10 @@ void
 __indirect_glPushMatrix(void)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Rotated 185
@@ -3965,16 +4155,14 @@ void
 __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 36;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
     (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Rotatef 186
@@ -3982,16 +4170,14 @@ void
 __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Scaled 187
@@ -3999,15 +4185,13 @@ void
 __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Scalef 188
@@ -4015,15 +4199,13 @@ void
 __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Translated 189
@@ -4031,15 +4213,13 @@ void
 __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Translated, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Translatef 190
@@ -4047,15 +4227,13 @@ void
 __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Viewport 191
@@ -4063,16 +4241,14 @@ void
 __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_BindTexture 4117
@@ -4080,14 +4256,12 @@ void
 __indirect_glBindTexture(GLenum target, GLuint texture)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&texture), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Indexubv 194
@@ -4095,13 +4269,11 @@ void
 __indirect_glIndexub(GLubyte c)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Indexubv 194
@@ -4109,13 +4281,11 @@ void
 __indirect_glIndexubv(const GLubyte * c)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(c), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PolygonOffset 192
@@ -4123,14 +4293,12 @@ void
 __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&units), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLsop_AreTexturesResident 143
@@ -4141,14 +4309,21 @@ __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures, GLboolean *
     Display * const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
-    if (n < 0) return retval;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_AreTexturesResident, cmdlen);
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        retval = reply->ret_val;
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_AreTexturesResident, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
         (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
-        retval = (GLboolean) read_reply(gc->currentDpy, 1, residences, GL_TRUE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return retval;
 }
@@ -4158,9 +4333,7 @@ void
 __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 32;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
@@ -4170,7 +4343,7 @@ __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, G
     (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
     (void) memcpy((void *)(gc->pc + 28), (void *)(&border), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_CopyTexImage2D 4120
@@ -4178,9 +4351,7 @@ void
 __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 36;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
@@ -4191,7 +4362,7 @@ __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, G
     (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
     (void) memcpy((void *)(gc->pc + 32), (void *)(&border), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_CopyTexSubImage1D 4121
@@ -4199,9 +4370,7 @@ void
 __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
@@ -4210,7 +4379,7 @@ __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint
     (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_CopyTexSubImage2D 4122
@@ -4218,9 +4387,7 @@ void
 __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 36;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
@@ -4231,23 +4398,21 @@ __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint
     (void) memcpy((void *)(gc->pc + 28), (void *)(&width), 4);
     (void) memcpy((void *)(gc->pc + 32), (void *)(&height), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
-#define X_GLsop_DeleteTextures 144
+#define X_GLvop_DeleteTextures 12
 void
 __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
-    if (n < 0) return;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_DeleteTextures, cmdlen);
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteTextures, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
         (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        UnlockDisplay(dpy); SyncHandle();
     }
     return;
 }
@@ -4259,12 +4424,19 @@ __indirect_glGenTextures(GLsizei n, GLuint * textures)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GenTextures, cmdlen);
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
-        (void) read_reply(gc->currentDpy, 4, textures, GL_TRUE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -4277,12 +4449,19 @@ __indirect_glIsTexture(GLuint texture)
     Display * const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_IsTexture, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxIsTextureRep *reply = XCBGlxIsTextureReply(c, XCBGlxIsTexture(c, gc->currentContextTag, texture), NULL);
+        retval = reply->ret_val;
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
-        retval = (GLboolean) read_reply(gc->currentDpy, 0, NULL, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return retval;
 }
@@ -4292,16 +4471,79 @@ void
 __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclampf * priorities)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
-    if (n < 0) return;
-    (void) dpy;
-    emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
-    (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
-    (void) memcpy((void *)(gc->pc + 8), (void *)(textures), (n * 4));
-    (void) memcpy((void *)(gc->pc + 8), (void *)(priorities), (n * 4));
-    gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(textures), (n * 4));
+        (void) memcpy((void *)(gc->pc + 8 + (n * 4)), (void *)(priorities), (n * 4));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+static void
+__glx_TexSubImage_1D2D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels )
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
+    const GLuint cmdlen = 60 + __GLX_PAD(compsize);
+    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, opcode, cmdlen);
+            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
+            (void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4);
+            (void) memcpy((void *)(gc->pc + 32), (void *)(&xoffset), 4);
+            (void) memcpy((void *)(gc->pc + 36), (void *)(&yoffset), 4);
+            (void) memcpy((void *)(gc->pc + 40), (void *)(&width), 4);
+            (void) memcpy((void *)(gc->pc + 44), (void *)(&height), 4);
+            (void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4);
+            (void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4);
+            (void) memcpy((void *)(gc->pc + 56), (void *)((pixels == NULL) ? one : zero), 4);
+            if (compsize > 0) {
+                (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 60, gc->pc + 4);
+            }
+            else {
+                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
+            }
+            gc->pc += cmdlen;
+            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = opcode;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
+            (void) memcpy((void *)(pc + 32), (void *)(&level), 4);
+            (void) memcpy((void *)(pc + 36), (void *)(&xoffset), 4);
+            (void) memcpy((void *)(pc + 40), (void *)(&yoffset), 4);
+            (void) memcpy((void *)(pc + 44), (void *)(&width), 4);
+            (void) memcpy((void *)(pc + 48), (void *)(&height), 4);
+            (void) memcpy((void *)(pc + 52), (void *)(&format), 4);
+            (void) memcpy((void *)(pc + 56), (void *)(&type), 4);
+            (void) memcpy((void *)(pc + 60), zero, 4);
+            __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 64, pc + 8);
+        }
+    }
+}
+
+#define X_GLrop_TexSubImage1D 4099
+void
+__indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
+{
+    __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset, 1, width, 1, format, type, pixels );
+}
+
+#define X_GLrop_TexSubImage2D 4100
+void
+__indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
+{
+    __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset, yoffset, width, height, format, type, pixels );
 }
 
 #define X_GLrop_BlendColor 4096
@@ -4309,16 +4551,14 @@ void
 __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_BlendEquation 4097
@@ -4326,13 +4566,54 @@ void
 __indirect_glBlendEquation(GLenum mode)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ColorTable 2053
+void
+__indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = (table != NULL) ? __glImageSize(width, 1, 1, format, type, target) : 0;
+    const GLuint cmdlen = 44 + __GLX_PAD(compsize);
+    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
+            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
+            (void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4);
+            (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
+            (void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4);
+            (void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4);
+            if (compsize > 0) {
+                (*gc->fillImage)(gc, 1, width, 1, 1, format, type, table, gc->pc + 44, gc->pc + 4);
+            }
+            else {
+                (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size );
+            }
+            gc->pc += cmdlen;
+            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_ColorTable;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
+            (void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4);
+            (void) memcpy((void *)(pc + 36), (void *)(&width), 4);
+            (void) memcpy((void *)(pc + 40), (void *)(&format), 4);
+            (void) memcpy((void *)(pc + 44), (void *)(&type), 4);
+            __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type, table, pc + 48, pc + 8);
+        }
+    }
 }
 
 #define X_GLrop_ColorTableParameterfv 2054
@@ -4340,16 +4621,14 @@ void
 __indirect_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glColorTableParameterfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ColorTableParameteriv 2055
@@ -4357,16 +4636,14 @@ void
 __indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glColorTableParameteriv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_CopyColorTable 2056
@@ -4374,9 +4651,7 @@ void
 __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
@@ -4384,7 +4659,36 @@ __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint
     (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLsop_GetColorTable 147
+void
+__indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const __GLXattribute * const state = gc->client_state_private;
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 16;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
+        *(int32_t *)(pc + 12) = 0;
+        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
+        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
 }
 
 #define X_GLsop_GetColorTableParameterfv 148
@@ -4394,13 +4698,23 @@ __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * par
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetColorTableParameterfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetColorTableParameterfvRep *reply = XCBGlxGetColorTableParameterfvReply(c, XCBGlxGetColorTableParameterfv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetColorTableParameterfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetColorTableParameterfvData(reply), XCBGlxGetColorTableParameterfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -4412,25 +4726,76 @@ __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * param
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetColorTableParameteriv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetColorTableParameterivRep *reply = XCBGlxGetColorTableParameterivReply(c, XCBGlxGetColorTableParameteriv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetColorTableParameterivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetColorTableParameterivData(reply), XCBGlxGetColorTableParameterivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
 
+#define X_GLrop_ColorSubTable 195
+void
+__indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
+    const GLuint cmdlen = 44 + __GLX_PAD(compsize);
+    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
+            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
+            (void) memcpy((void *)(gc->pc + 28), (void *)(&start), 4);
+            (void) memcpy((void *)(gc->pc + 32), (void *)(&count), 4);
+            (void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4);
+            (void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4);
+            if (compsize > 0) {
+                (*gc->fillImage)(gc, 1, count, 1, 1, format, type, data, gc->pc + 44, gc->pc + 4);
+            }
+            else {
+                (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size );
+            }
+            gc->pc += cmdlen;
+            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_ColorSubTable;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
+            (void) memcpy((void *)(pc + 32), (void *)(&start), 4);
+            (void) memcpy((void *)(pc + 36), (void *)(&count), 4);
+            (void) memcpy((void *)(pc + 40), (void *)(&format), 4);
+            (void) memcpy((void *)(pc + 44), (void *)(&type), 4);
+            __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type, data, pc + 48, pc + 8);
+        }
+    }
+}
+
 #define X_GLrop_CopyColorSubTable 196
 void
 __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&start), 4);
@@ -4438,7 +4803,65 @@ __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, G
     (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+static void
+__glx_ConvolutionFilter_1D2D( unsigned opcode, unsigned dim, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image )
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = (image != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
+    const GLuint cmdlen = 48 + __GLX_PAD(compsize);
+    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, opcode, cmdlen);
+            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
+            (void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4);
+            (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
+            (void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4);
+            (void) memcpy((void *)(gc->pc + 40), (void *)(&format), 4);
+            (void) memcpy((void *)(gc->pc + 44), (void *)(&type), 4);
+            if (compsize > 0) {
+                (*gc->fillImage)(gc, dim, width, height, 1, format, type, image, gc->pc + 48, gc->pc + 4);
+            }
+            else {
+                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
+            }
+            gc->pc += cmdlen;
+            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = opcode;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
+            (void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4);
+            (void) memcpy((void *)(pc + 36), (void *)(&width), 4);
+            (void) memcpy((void *)(pc + 40), (void *)(&height), 4);
+            (void) memcpy((void *)(pc + 44), (void *)(&format), 4);
+            (void) memcpy((void *)(pc + 48), (void *)(&type), 4);
+            __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, image, pc + 52, pc + 8);
+        }
+    }
+}
+
+#define X_GLrop_ConvolutionFilter1D 4101
+void
+__indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image)
+{
+    __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target, internalformat, width, 1, format, type, image );
+}
+
+#define X_GLrop_ConvolutionFilter2D 4102
+void
+__indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image)
+{
+    __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target, internalformat, width, height, format, type, image );
 }
 
 #define X_GLrop_ConvolutionParameterf 4103
@@ -4446,15 +4869,13 @@ void
 __indirect_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&params), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ConvolutionParameterfv 4104
@@ -4462,16 +4883,14 @@ void
 __indirect_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glConvolutionParameterfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ConvolutionParameteri 4105
@@ -4479,15 +4898,13 @@ void
 __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&params), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ConvolutionParameteriv 4106
@@ -4495,16 +4912,14 @@ void
 __indirect_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glConvolutionParameteriv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_CopyConvolutionFilter1D 4107
@@ -4512,9 +4927,7 @@ void
 __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
@@ -4522,7 +4935,7 @@ __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint
     (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_CopyConvolutionFilter2D 4108
@@ -4530,9 +4943,7 @@ void
 __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
@@ -4541,7 +4952,36 @@ __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint
     (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
     (void) memcpy((void *)(gc->pc + 24), (void *)(&height), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLsop_GetConvolutionFilter 150
+void
+__indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const __GLXattribute * const state = gc->client_state_private;
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 16;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
+        *(int32_t *)(pc + 12) = 0;
+        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
+        __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
 }
 
 #define X_GLsop_GetConvolutionParameterfv 151
@@ -4551,13 +4991,23 @@ __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * pa
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetConvolutionParameterfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetConvolutionParameterfvRep *reply = XCBGlxGetConvolutionParameterfvReply(c, XCBGlxGetConvolutionParameterfv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetConvolutionParameterfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetConvolutionParameterfvData(reply), XCBGlxGetConvolutionParameterfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -4569,13 +5019,53 @@ __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * para
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetConvolutionParameteriv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetConvolutionParameterivRep *reply = XCBGlxGetConvolutionParameterivReply(c, XCBGlxGetConvolutionParameteriv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetConvolutionParameterivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetConvolutionParameterivData(reply), XCBGlxGetConvolutionParameterivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLsop_GetHistogram 154
+void
+__indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const __GLXattribute * const state = gc->client_state_private;
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 16;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
+        *(int32_t *)(pc + 12) = 0;
+        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
+        * (int8_t *)(pc + 13) = reset;
+        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -4587,13 +5077,23 @@ __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * para
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetHistogramParameterfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetHistogramParameterfvRep *reply = XCBGlxGetHistogramParameterfvReply(c, XCBGlxGetHistogramParameterfv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetHistogramParameterfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetHistogramParameterfvData(reply), XCBGlxGetHistogramParameterfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -4605,13 +5105,53 @@ __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetHistogramParameteriv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetHistogramParameterivRep *reply = XCBGlxGetHistogramParameterivReply(c, XCBGlxGetHistogramParameteriv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetHistogramParameterivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetHistogramParameterivData(reply), XCBGlxGetHistogramParameterivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLsop_GetMinmax 157
+void
+__indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const __GLXattribute * const state = gc->client_state_private;
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 16;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
+        *(int32_t *)(pc + 12) = 0;
+        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
+        * (int8_t *)(pc + 13) = reset;
+        __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -4623,13 +5163,23 @@ __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetMinmaxParameterfvRep *reply = XCBGlxGetMinmaxParameterfvReply(c, XCBGlxGetMinmaxParameterfv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetMinmaxParameterfvDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetMinmaxParameterfvData(reply), XCBGlxGetMinmaxParameterfvDataLength(reply) * sizeof(GLfloat));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -4641,13 +5191,23 @@ __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_single_request(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetMinmaxParameterivRep *reply = XCBGlxGetMinmaxParameterivReply(c, XCBGlxGetMinmaxParameteriv(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetMinmaxParameterivDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetMinmaxParameterivData(reply), XCBGlxGetMinmaxParameterivDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
         (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
-        (void) read_reply(gc->currentDpy, 4, params, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
     }
     return;
 }
@@ -4657,16 +5217,14 @@ void
 __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&width), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&sink), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_Minmax 4111
@@ -4674,15 +5232,13 @@ void
 __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&sink), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ResetHistogram 4112
@@ -4690,13 +5246,11 @@ void
 __indirect_glResetHistogram(GLenum target)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ResetMinmax 4113
@@ -4704,13 +5258,137 @@ void
 __indirect_glResetMinmax(GLenum target)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+static void
+__glx_TexImage_3D4D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const GLvoid * pixels )
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
+    const GLuint cmdlen = 84 + __GLX_PAD(compsize);
+    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, opcode, cmdlen);
+            (void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4);
+            (void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4);
+            (void) memcpy((void *)(gc->pc + 48), (void *)(&internalformat), 4);
+            (void) memcpy((void *)(gc->pc + 52), (void *)(&width), 4);
+            (void) memcpy((void *)(gc->pc + 56), (void *)(&height), 4);
+            (void) memcpy((void *)(gc->pc + 60), (void *)(&depth), 4);
+            (void) memcpy((void *)(gc->pc + 64), (void *)(&extent), 4);
+            (void) memcpy((void *)(gc->pc + 68), (void *)(&border), 4);
+            (void) memcpy((void *)(gc->pc + 72), (void *)(&format), 4);
+            (void) memcpy((void *)(gc->pc + 76), (void *)(&type), 4);
+            (void) memcpy((void *)(gc->pc + 80), (void *)((pixels == NULL) ? one : zero), 4);
+            if (compsize > 0) {
+                (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 84, gc->pc + 4);
+            }
+            else {
+                (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size );
+            }
+            gc->pc += cmdlen;
+            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = opcode;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 44), (void *)(&target), 4);
+            (void) memcpy((void *)(pc + 48), (void *)(&level), 4);
+            (void) memcpy((void *)(pc + 52), (void *)(&internalformat), 4);
+            (void) memcpy((void *)(pc + 56), (void *)(&width), 4);
+            (void) memcpy((void *)(pc + 60), (void *)(&height), 4);
+            (void) memcpy((void *)(pc + 64), (void *)(&depth), 4);
+            (void) memcpy((void *)(pc + 68), (void *)(&extent), 4);
+            (void) memcpy((void *)(pc + 72), (void *)(&border), 4);
+            (void) memcpy((void *)(pc + 76), (void *)(&format), 4);
+            (void) memcpy((void *)(pc + 80), (void *)(&type), 4);
+            (void) memcpy((void *)(pc + 84), zero, 4);
+            __glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 88, pc + 8);
+        }
+    }
+}
+
+#define X_GLrop_TexImage3D 4114
+void
+__indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
+{
+    __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat, width, height, depth, 1, border, format, type, pixels );
+}
+
+static void
+__glx_TexSubImage_3D4D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const GLvoid * pixels )
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
+    const GLuint cmdlen = 92 + __GLX_PAD(compsize);
+    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, opcode, cmdlen);
+            (void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4);
+            (void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4);
+            (void) memcpy((void *)(gc->pc + 48), (void *)(&xoffset), 4);
+            (void) memcpy((void *)(gc->pc + 52), (void *)(&yoffset), 4);
+            (void) memcpy((void *)(gc->pc + 56), (void *)(&zoffset), 4);
+            (void) memcpy((void *)(gc->pc + 60), (void *)(&woffset), 4);
+            (void) memcpy((void *)(gc->pc + 64), (void *)(&width), 4);
+            (void) memcpy((void *)(gc->pc + 68), (void *)(&height), 4);
+            (void) memcpy((void *)(gc->pc + 72), (void *)(&depth), 4);
+            (void) memcpy((void *)(gc->pc + 76), (void *)(&extent), 4);
+            (void) memcpy((void *)(gc->pc + 80), (void *)(&format), 4);
+            (void) memcpy((void *)(gc->pc + 84), (void *)(&type), 4);
+            (void) memcpy((void *)(gc->pc + 88), (void *)((pixels == NULL) ? one : zero), 4);
+            if (compsize > 0) {
+                (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 92, gc->pc + 4);
+            }
+            else {
+                (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size );
+            }
+            gc->pc += cmdlen;
+            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = opcode;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 44), (void *)(&target), 4);
+            (void) memcpy((void *)(pc + 48), (void *)(&level), 4);
+            (void) memcpy((void *)(pc + 52), (void *)(&xoffset), 4);
+            (void) memcpy((void *)(pc + 56), (void *)(&yoffset), 4);
+            (void) memcpy((void *)(pc + 60), (void *)(&zoffset), 4);
+            (void) memcpy((void *)(pc + 64), (void *)(&woffset), 4);
+            (void) memcpy((void *)(pc + 68), (void *)(&width), 4);
+            (void) memcpy((void *)(pc + 72), (void *)(&height), 4);
+            (void) memcpy((void *)(pc + 76), (void *)(&depth), 4);
+            (void) memcpy((void *)(pc + 80), (void *)(&extent), 4);
+            (void) memcpy((void *)(pc + 84), (void *)(&format), 4);
+            (void) memcpy((void *)(pc + 88), (void *)(&type), 4);
+            (void) memcpy((void *)(pc + 92), zero, 4);
+            __glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 96, pc + 8);
+        }
+    }
+}
+
+#define X_GLrop_TexSubImage3D 4115
+void
+__indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels)
+{
+    __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset, yoffset, zoffset, 1, width, height, depth, 1, format, type, pixels );
 }
 
 #define X_GLrop_CopyTexSubImage3D 4123
@@ -4718,9 +5396,7 @@ void
 __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 40;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
@@ -4732,7 +5408,7 @@ __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint
     (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
     (void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_ActiveTextureARB 197
@@ -4740,13 +5416,11 @@ void
 __indirect_glActiveTextureARB(GLenum texture)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&texture), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord1dvARB 198
@@ -4754,14 +5428,12 @@ void
 __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord1dvARB 198
@@ -4769,14 +5441,12 @@ void
 __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord1fvARB 199
@@ -4784,14 +5454,12 @@ void
 __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord1fvARB 199
@@ -4799,14 +5467,12 @@ void
 __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord1ivARB 200
@@ -4814,14 +5480,12 @@ void
 __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord1ivARB 200
@@ -4829,14 +5493,12 @@ void
 __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord1svARB 201
@@ -4844,14 +5506,12 @@ void
 __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord1svARB 201
@@ -4859,14 +5519,12 @@ void
 __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord2dvARB 202
@@ -4874,15 +5532,13 @@ void
 __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord2dvARB 202
@@ -4890,14 +5546,12 @@ void
 __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord2fvARB 203
@@ -4905,15 +5559,13 @@ void
 __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord2fvARB 203
@@ -4921,14 +5573,12 @@ void
 __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord2ivARB 204
@@ -4936,15 +5586,13 @@ void
 __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord2ivARB 204
@@ -4952,14 +5600,12 @@ void
 __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord2svARB 205
@@ -4967,15 +5613,13 @@ void
 __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
     (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord2svARB 205
@@ -4983,14 +5627,12 @@ void
 __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord3dvARB 206
@@ -4998,16 +5640,14 @@ void
 __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 32;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
     (void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord3dvARB 206
@@ -5015,14 +5655,12 @@ void
 __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 32;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24);
     (void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord3fvARB 207
@@ -5030,16 +5668,14 @@ void
 __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord3fvARB 207
@@ -5047,14 +5683,12 @@ void
 __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord3ivARB 208
@@ -5062,16 +5696,14 @@ void
 __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord3ivARB 208
@@ -5079,14 +5711,12 @@ void
 __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord3svARB 209
@@ -5094,16 +5724,14 @@ void
 __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
     (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord3svARB 209
@@ -5111,14 +5739,12 @@ void
 __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord4dvARB 210
@@ -5126,9 +5752,7 @@ void
 __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 40;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
@@ -5136,7 +5760,7 @@ __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble
     (void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8);
     (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord4dvARB 210
@@ -5144,14 +5768,12 @@ void
 __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 40;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
     (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord4fvARB 211
@@ -5159,9 +5781,7 @@ void
 __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
@@ -5169,7 +5789,7 @@ __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r,
     (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord4fvARB 211
@@ -5177,14 +5797,12 @@ void
 __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord4ivARB 212
@@ -5192,9 +5810,7 @@ void
 __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
@@ -5202,7 +5818,7 @@ __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint
     (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord4ivARB 212
@@ -5210,14 +5826,12 @@ void
 __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 24;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord4svARB 213
@@ -5225,9 +5839,7 @@ void
 __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
@@ -5235,7 +5847,7 @@ __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r,
     (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2);
     (void) memcpy((void *)(gc->pc + 14), (void *)(&q), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_MultiTexCoord4svARB 213
@@ -5243,14 +5855,12 @@ void
 __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_SampleCoverageARB 229
@@ -5258,14 +5868,41 @@ void
 __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_DrawBuffersARB 233
+void
+__indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
+    if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
+            (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
+            (void) memcpy((void *)(gc->pc + 8), (void *)(bufs), (n * 4));
+            gc->pc += cmdlen;
+            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_DrawBuffersARB;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 8), (void *)(&n), 4);
+            __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
+        }
+    }
 }
 
 #define X_GLvop_AreTexturesResidentEXT 11
@@ -5276,14 +5913,12 @@ __indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolea
     Display * const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
-    if (n < 0) return retval;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_vendor_request(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreTexturesResidentEXT, cmdlen);
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreTexturesResidentEXT, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
         (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
-        retval = (GLboolean) read_reply(gc->currentDpy, 1, residences, GL_TRUE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
     }
     return retval;
 }
@@ -5295,12 +5930,11 @@ __indirect_glGenTexturesEXT(GLsizei n, GLuint * textures)
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_vendor_request(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen);
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
-        (void) read_reply(gc->currentDpy, 4, textures, GL_TRUE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
     }
     return;
 }
@@ -5313,12 +5947,11 @@ __indirect_glIsTextureEXT(GLuint texture)
     Display * const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
     const GLuint cmdlen = 4;
-    (void) dpy;
-    if (dpy != NULL) {
-        GLubyte const * pc = setup_vendor_request(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsTextureEXT, cmdlen);
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsTextureEXT, cmdlen);
         (void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
-        retval = (GLboolean) read_reply(gc->currentDpy, 0, NULL, GL_FALSE);
-        UnlockDisplay(gc->currentDpy); SyncHandle();
+        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
     }
     return retval;
 }
@@ -5328,14 +5961,12 @@ void
 __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_SamplePatternSGIS 2049
@@ -5343,13 +5974,11 @@ void
 __indirect_glSamplePatternSGIS(GLenum pattern)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pattern), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PointParameterfEXT 2065
@@ -5357,14 +5986,12 @@ void
 __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_PointParameterfvEXT 2066
@@ -5372,15 +5999,13 @@ void
 __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint compsize = __glPointParameterfvEXT_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_WindowPos3fvMESA 230
@@ -5388,15 +6013,13 @@ void
 __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_WindowPos3fvMESA 230
@@ -5411,16 +6034,14 @@ void
 __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 20;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&sfactorRGB), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&dfactorRGB), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&sfactorAlpha), 4);
     (void) memcpy((void *)(gc->pc + 16), (void *)(&dfactorAlpha), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_FogCoordfvEXT 4124
@@ -5428,13 +6049,11 @@ void
 __indirect_glFogCoordfEXT(GLfloat coord)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_FogCoordfvEXT 4124
@@ -5449,13 +6068,11 @@ void
 __indirect_glFogCoorddEXT(GLdouble coord)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_FogCoorddvEXT 4125
@@ -5470,15 +6087,13 @@ void
 __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
     (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_SecondaryColor3bvEXT 4126
@@ -5493,15 +6108,13 @@ void
 __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 28;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
     (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_SecondaryColor3dvEXT 4130
@@ -5516,15 +6129,13 @@ void
 __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_SecondaryColor3fvEXT 4129
@@ -5539,15 +6150,13 @@ void
 __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_SecondaryColor3ivEXT 4128
@@ -5557,23 +6166,21 @@ __indirect_glSecondaryColor3ivEXT(const GLint * v)
     generic_12_byte( X_GLrop_SecondaryColor3ivEXT, v );
 }
 
-#define X_GLrop_SecondaryColor3svEXT 4128
+#define X_GLrop_SecondaryColor3svEXT 4127
 void
 __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
-#define X_GLrop_SecondaryColor3svEXT 4128
+#define X_GLrop_SecondaryColor3svEXT 4127
 void
 __indirect_glSecondaryColor3svEXT(const GLshort * v)
 {
@@ -5585,15 +6192,13 @@ void
 __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
     (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_SecondaryColor3ubvEXT 4131
@@ -5608,15 +6213,13 @@ void
 __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 16;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
     (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_SecondaryColor3uivEXT 4133
@@ -5631,15 +6234,13 @@ void
 __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
-    Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
     (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
     (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
 #define X_GLrop_SecondaryColor3usvEXT 4132
@@ -5649,48 +6250,2223 @@ __indirect_glSecondaryColor3usvEXT(const GLushort * v)
     generic_6_byte( X_GLrop_SecondaryColor3usvEXT, v );
 }
 
-#define X_GLrop_PointParameteriNV 4221
-void
-__indirect_glPointParameteriNV(GLenum pname, GLint params)
+#define X_GLvop_AreProgramsResidentNV 1293
+GLboolean
+__indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
+    GLboolean retval = (GLboolean) 0;
+    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreProgramsResidentNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4));
+        retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return retval;
+}
+
+#define X_GLrop_BindProgramNV 4180
+void
+__indirect_glBindProgramNV(GLenum target, GLuint program)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
-    (void) dpy;
-    emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
-    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
-    (void) memcpy((void *)(gc->pc + 8), (void *)(&params), 4);
+    emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&program), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
-#define X_GLrop_PointParameterivNV 4222
+#define X_GLvop_DeleteProgramsNV 1294
 void
-__indirect_glPointParameterivNV(GLenum pname, const GLint * params)
+__indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
-    const GLuint compsize = __glPointParameterivNV_size(pname);
+    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteProgramsNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(programs), (n * 4));
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLrop_ExecuteProgramNV 4181
+void
+__indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28;
+    emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLvop_GenProgramsNV 1295
+void
+__indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenProgramsNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+        (void) __glXReadReply(dpy, 4, programs, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_GetProgramParameterdvNV 1297
+void
+__indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 12;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterdvNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_GetProgramParameterfvNV 1296
+void
+__indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 12;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterfvNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_GetProgramivNV 1298
+void
+__indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_GetProgramStringNV 1299
+void
+__indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 1, program, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_GetTrackMatrixivNV 1300
+void
+__indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 12;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetTrackMatrixivNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&address), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_IsProgramNV 1304
+GLboolean
+__indirect_glIsProgramNV(GLuint program)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    GLboolean retval = (GLboolean) 0;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsProgramNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&program), 4);
+        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return retval;
+}
+
+#define X_GLrop_LoadProgramNV 4183
+void
+__indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16 + __GLX_PAD(len);
+    if (__builtin_expect(len >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
+        (void) memcpy((void *)(gc->pc + 16), (void *)(program), len);
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_ProgramParameter4dvNV 4185
+void
+__indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 44;
+    emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
+    (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
+    (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramParameter4dvNV 4185
+void
+__indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 44;
+    emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramParameter4fvNV 4184
+void
+__indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28;
+    emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
+    (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramParameter4fvNV 4184
+void
+__indirect_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28;
+    emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramParameters4dvNV 4187
+void
+__indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
+    if (__builtin_expect(num >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
+        (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 32));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_ProgramParameters4fvNV 4186
+void
+__indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
+    if (__builtin_expect(num >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
+        (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 16));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_RequestResidentProgramsNV 4182
+void
+__indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(ids), (n * 4));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_TrackMatrixNV 4188
+void
+__indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 20;
+    emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&address), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&matrix), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&transform), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1dvARB 4197
+void
+__indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1dvARB 4197
+void
+__indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1fvARB 4193
+void
+__indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1fvARB 4193
+void
+__indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1svARB 4189
+void
+__indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1svARB 4189
+void
+__indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2dvARB 4198
+void
+__indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2dvARB 4198
+void
+__indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2fvARB 4194
+void
+__indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2fvARB 4194
+void
+__indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2svARB 4190
+void
+__indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
+    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2svARB 4190
+void
+__indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3dvARB 4199
+void
+__indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 32;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
+    (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3dvARB 4199
+void
+__indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 32;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24);
+    (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3fvARB 4195
+void
+__indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 20;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3fvARB 4195
+void
+__indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 20;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3svARB 4191
+void
+__indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
+    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3svARB 4191
+void
+__indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4dvARB 4200
+void
+__indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 40;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
+    (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
+    (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4dvARB 4200
+void
+__indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 40;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
+    (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4fvARB 4196
+void
+__indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4fvARB 4196
+void
+__indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4svARB 4192
+void
+__indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
+    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
+    (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4svARB 4192
+void
+__indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4NubvARB 4201
+void
+__indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
+    (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
+    (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
+    (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4NubvARB 4201
+void
+__indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttribs1dvNV 4210
+void
+__indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs1fvNV 4206
+void
+__indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs1svNV 4202
+void
+__indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 2));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs2dvNV 4211
+void
+__indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs2fvNV 4207
+void
+__indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs2svNV 4203
+void
+__indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs3dvNV 4212
+void
+__indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 24));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs3fvNV 4208
+void
+__indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 12));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs3svNV 4204
+void
+__indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 6));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs4dvNV 4213
+void
+__indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 32));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs4fvNV 4209
+void
+__indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs4svNV 4205
+void
+__indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_VertexAttribs4ubvNV 4214
+void
+__indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_PointParameteriNV 4221
+void
+__indirect_glPointParameteriNV(GLenum pname, GLint param)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_PointParameterivNV 4222
+void
+__indirect_glPointParameterivNV(GLenum pname, const GLint * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint compsize = __glPointParameterivNV_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
-    (void) dpy;
     emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
     (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
     (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ActiveStencilFaceEXT 4220
+void
+__indirect_glActiveStencilFaceEXT(GLenum face)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 8;
+    emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4bvARB 4230
+void
+__indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4ivARB 4231
+void
+__indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4ubvARB 4232
+void
+__indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4usvARB 4233
+void
+__indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4uivARB 4234
+void
+__indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4NbvARB 4235
+void
+__indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4NsvARB 4236
+void
+__indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4NivARB 4237
+void
+__indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4NusvARB 4238
+void
+__indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4NuivARB 4239
+void
+__indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramStringARB 4217
+void
+__indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16 + __GLX_PAD(len);
+    if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
+        if (cmdlen <= gc->maxSmallRenderCommandSize) {
+            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+                (void) __glXFlushRenderBuffer(gc, gc->pc);
+            }
+            emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
+            (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+            (void) memcpy((void *)(gc->pc + 8), (void *)(&format), 4);
+            (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
+            (void) memcpy((void *)(gc->pc + 16), (void *)(string), len);
+            gc->pc += cmdlen;
+            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+        }
+        else {
+            const GLint op = X_GLrop_ProgramStringARB;
+            const GLuint cmdlenLarge = cmdlen + 4;
+            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+            (void) memcpy((void *)(pc + 8), (void *)(&target), 4);
+            (void) memcpy((void *)(pc + 12), (void *)(&format), 4);
+            (void) memcpy((void *)(pc + 16), (void *)(&len), 4);
+            __glXSendLargeCommand(gc, pc, 20, string, len);
+        }
+    }
+}
+
+#define X_GLrop_ProgramEnvParameter4dvARB 4185
+void
+__indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 44;
+    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
+    (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
+    (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramEnvParameter4dvARB 4185
+void
+__indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 44;
+    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramEnvParameter4fvARB 4184
+void
+__indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28;
+    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
+    (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramEnvParameter4fvARB 4184
+void
+__indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28;
+    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramLocalParameter4dvARB 4216
+void
+__indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 44;
+    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
+    (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
+    (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramLocalParameter4dvARB 4216
+void
+__indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 44;
+    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramLocalParameter4fvARB 4215
+void
+__indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28;
+    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
+    (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_ProgramLocalParameter4fvARB 4215
+void
+__indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28;
+    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLvop_GetProgramivARB 1307
+void
+__indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivARB, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_GetProgramStringARB 1308
+void
+__indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringARB, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 1, string, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLrop_ProgramNamedParameter4fvNV 4218
+void
+__indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28 + __GLX_PAD(len);
+    if (__builtin_expect(len >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
+        (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
+        (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
+        (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
+        (void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_ProgramNamedParameter4dvNV 4219
+void
+__indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 44 + __GLX_PAD(len);
+    if (__builtin_expect(len >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
+        (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
+        (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
+        (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
+        (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
+        (void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_ProgramNamedParameter4fvNV 4218
+void
+__indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28 + __GLX_PAD(len);
+    if (__builtin_expect(len >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
+        (void) memcpy((void *)(gc->pc + 12), (void *)(v), 16);
+        (void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLrop_ProgramNamedParameter4dvNV 4219
+void
+__indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 44 + __GLX_PAD(len);
+    if (__builtin_expect(len >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
+        (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
+        (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
+        (void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLvop_GetProgramNamedParameterfvNV 1310
+void
+__indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8 + __GLX_PAD(len);
+    if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterfvNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&len), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(name), len);
+        (void) __glXReadReply(dpy, 4, params, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_GetProgramNamedParameterdvNV 1311
+void
+__indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8 + __GLX_PAD(len);
+    if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterdvNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&len), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(name), len);
+        (void) __glXReadReply(dpy, 8, params, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLsop_GenQueriesARB 162
+void
+__indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(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));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+        (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLsop_DeleteQueriesARB 161
+void
+__indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxDeleteQueriesARB(c, gc->currentContextTag, n, ids);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4));
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLsop_IsQueryARB 163
+GLboolean
+__indirect_glIsQueryARB(GLuint id)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    GLboolean retval = (GLboolean) 0;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxIsQueryARBRep *reply = XCBGlxIsQueryARBReply(c, XCBGlxIsQueryARB(c, gc->currentContextTag, id), NULL);
+        retval = reply->ret_val;
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return retval;
+}
+
+#define X_GLrop_BeginQueryARB 231
+void
+__indirect_glBeginQueryARB(GLenum target, GLuint id)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_EndQueryARB 232
+void
+__indirect_glEndQueryARB(GLenum target)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 8;
+    emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLsop_GetQueryivARB 164
+void
+__indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetQueryivARBRep *reply = XCBGlxGetQueryivARBReply(c, XCBGlxGetQueryivARB(c, gc->currentContextTag, target, pname), NULL);
+        if (XCBGlxGetQueryivARBDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetQueryivARBData(reply), XCBGlxGetQueryivARBDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLsop_GetQueryObjectivARB 165
+void
+__indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetQueryObjectivARBRep *reply = XCBGlxGetQueryObjectivARBReply(c, XCBGlxGetQueryObjectivARB(c, gc->currentContextTag, id, pname), NULL);
+        if (XCBGlxGetQueryObjectivARBDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetQueryObjectivARBData(reply), XCBGlxGetQueryObjectivARBDataLength(reply) * sizeof(GLint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLsop_GetQueryObjectuivARB 166
+void
+__indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+#ifdef USE_XCB
+        XCBConnection *c = XCBConnectionOfDisplay(dpy);
+        (void) __glXFlushRenderBuffer(gc, gc->pc);
+        XCBGlxGetQueryObjectuivARBRep *reply = XCBGlxGetQueryObjectuivARBReply(c, XCBGlxGetQueryObjectuivARB(c, gc->currentContextTag, id, pname), NULL);
+        if (XCBGlxGetQueryObjectuivARBDataLength(reply) == 0)
+            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
+        else
+        (void)memcpy(params, XCBGlxGetQueryObjectuivARBData(reply), XCBGlxGetQueryObjectuivARBDataLength(reply) * sizeof(GLuint));
+        free(reply);
+#else
+        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+#endif /* USE_XCB */
+    }
+    return;
+}
+
+#define X_GLvop_GetVertexAttribdvNV 1301
+void
+__indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribdvNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_GetVertexAttribfvNV 1302
+void
+__indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribfvNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_GetVertexAttribivNV 1303
+void
+__indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 8;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribivNV, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLrop_VertexAttrib1dvNV 4197
+void
+__indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1dvNV 4197
+void
+__indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1fvNV 4193
+void
+__indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1fvNV 4193
+void
+__indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1svNV 4189
+void
+__indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib1svNV 4189
+void
+__indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2dvNV 4198
+void
+__indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2dvNV 4198
+void
+__indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2fvNV 4194
+void
+__indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2fvNV 4194
+void
+__indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2svNV 4190
+void
+__indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
+    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib2svNV 4190
+void
+__indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3dvNV 4199
+void
+__indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 32;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
+    (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
-#define X_GLrop_ActiveStencilFaceEXT 4220
+#define X_GLrop_VertexAttrib3dvNV 4199
 void
-__indirect_glActiveStencilFaceEXT(GLenum face)
+__indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 32;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 24);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3fvNV 4195
+void
+__indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 20;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3fvNV 4195
+void
+__indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 20;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3svNV 4191
+void
+__indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
+    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib3svNV 4191
+void
+__indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4dvNV 4200
+void
+__indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 40;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
+    (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
+    (void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4dvNV 4200
+void
+__indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 40;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 32);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4fvNV 4196
+void
+__indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4fvNV 4196
+void
+__indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4svNV 4192
+void
+__indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
+    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
+    (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4svNV 4192
+void
+__indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 16;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4ubvNV 4201
+void
+__indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
+    (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
+    (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
+    (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_VertexAttrib4ubvNV 4201
+void
+__indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLvop_IsRenderbufferEXT 1422
+GLboolean
+__indirect_glIsRenderbufferEXT(GLuint renderbuffer)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    GLboolean retval = (GLboolean) 0;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsRenderbufferEXT, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&renderbuffer), 4);
+        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return retval;
+}
+
+#define X_GLrop_BindRenderbufferEXT 4316
+void
+__indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_DeleteRenderbuffersEXT 4317
+void
+__indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(renderbuffers), (n * 4));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLvop_GenRenderbuffersEXT 1423
+void
+__indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenRenderbuffersEXT, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+        (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLrop_RenderbufferStorageEXT 4318
+void
+__indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 20;
+    emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLvop_GetRenderbufferParameterivEXT 1424
+void
+__indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params)
 {
     __GLXcontext * const gc = __glXGetCurrentContext();
     Display * const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
-    (void) dpy;
-    emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
-    (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetRenderbufferParameterivEXT, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_IsFramebufferEXT 1425
+GLboolean
+__indirect_glIsFramebufferEXT(GLuint framebuffer)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    GLboolean retval = (GLboolean) 0;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsFramebufferEXT, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&framebuffer), 4);
+        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return retval;
+}
+
+#define X_GLrop_BindFramebufferEXT 4319
+void
+__indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 12;
+    emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4);
     gc->pc += cmdlen;
-    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_DeleteFramebuffersEXT 4320
+void
+__indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
+    if (__builtin_expect(n >= 0, 1)) {
+        emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
+        (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
+        (void) memcpy((void *)(gc->pc + 8), (void *)(framebuffers), (n * 4));
+        gc->pc += cmdlen;
+        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+    }
+}
+
+#define X_GLvop_GenFramebuffersEXT 1426
+void
+__indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenFramebuffersEXT, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+        (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLvop_CheckFramebufferStatusEXT 1427
+GLenum
+__indirect_glCheckFramebufferStatusEXT(GLenum target)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    GLenum retval = (GLenum) 0;
+    const GLuint cmdlen = 4;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_CheckFramebufferStatusEXT, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return retval;
+}
+
+#define X_GLrop_FramebufferTexture1DEXT 4321
+void
+__indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_FramebufferTexture2DEXT 4322
+void
+__indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 24;
+    emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_FramebufferTexture3DEXT 4323
+void
+__indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 28;
+    emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
+    (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
+    (void) memcpy((void *)(gc->pc + 24), (void *)(&zoffset), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_FramebufferRenderbufferEXT 4324
+void
+__indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 20;
+    emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
+    (void) memcpy((void *)(gc->pc + 12), (void *)(&renderbuffertarget), 4);
+    (void) memcpy((void *)(gc->pc + 16), (void *)(&renderbuffer), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
+void
+__indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    Display * const dpy = gc->currentDpy;
+    const GLuint cmdlen = 12;
+    if (__builtin_expect(dpy != NULL, 1)) {
+        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetFramebufferAttachmentParameterivEXT, cmdlen);
+        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+        (void) memcpy((void *)(pc + 4), (void *)(&attachment), 4);
+        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
+        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+        UnlockDisplay(dpy); SyncHandle();
+    }
+    return;
+}
+
+#define X_GLrop_GenerateMipmapEXT 4325
+void
+__indirect_glGenerateMipmapEXT(GLenum target)
+{
+    __GLXcontext * const gc = __glXGetCurrentContext();
+    const GLuint cmdlen = 8;
+    emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
+    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+    gc->pc += cmdlen;
+    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 }
 
+
+#  undef FASTCALL
+#  undef NOINLINE