Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /* DO NOT EDIT - This file generated automatically by glX_proto_send.py (from Mesa) script */
  2.  
  3. /*
  4.  * (C) Copyright IBM Corporation 2004, 2005
  5.  * All Rights Reserved.
  6.  *
  7.  * Permission is hereby granted, free of charge, to any person obtaining a
  8.  * copy of this software and associated documentation files (the "Software"),
  9.  * to deal in the Software without restriction, including without limitation
  10.  * the rights to use, copy, modify, merge, publish, distribute, sub license,
  11.  * and/or sell copies of the Software, and to permit persons to whom the
  12.  * Software is furnished to do so, subject to the following conditions:
  13.  *
  14.  * The above copyright notice and this permission notice (including the next
  15.  * paragraph) shall be included in all copies or substantial portions of the
  16.  * Software.
  17.  *
  18.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20.  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
  21.  * IBM,
  22.  * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  23.  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
  24.  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  25.  * SOFTWARE.
  26.  */
  27.  
  28.  
  29. #include <GL/gl.h>
  30. #include "indirect.h"
  31. #include "glxclient.h"
  32. #include "indirect_size.h"
  33. #include "glapi.h"
  34. #include <GL/glxproto.h>
  35. #include <X11/Xlib-xcb.h>
  36. #include <xcb/xcb.h>
  37. #include <xcb/glx.h>
  38.  
  39. #define __GLX_PAD(n) (((n) + 3) & ~3)
  40.  
  41. #  if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
  42. #    define FASTCALL __attribute__((fastcall))
  43. #  else
  44. #    define FASTCALL
  45. #  endif
  46. #  if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
  47. #    define NOINLINE __attribute__((noinline))
  48. #  else
  49. #    define NOINLINE
  50. #  endif
  51.  
  52. #ifndef __GNUC__
  53. #  define __builtin_expect(x, y) x
  54. #endif
  55.  
  56. /* If the size and opcode values are known at compile-time, this will, on
  57.  * x86 at least, emit them with a single instruction.
  58.  */
  59. #define emit_header(dest, op, size)            \
  60.     do { union { short s[2]; int i; } temp;    \
  61.          temp.s[0] = (size); temp.s[1] = (op); \
  62.          *((int *)(dest)) = temp.i; } while(0)
  63.  
  64. NOINLINE CARD32
  65. __glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_array )
  66. {
  67.     xGLXSingleReply reply;
  68.    
  69.     (void) _XReply(dpy, (xReply *) & reply, 0, False);
  70.     if (size != 0) {
  71.         if ((reply.length > 0) || reply_is_always_array) {
  72.             const GLint bytes = (reply_is_always_array)
  73.               ? (4 * reply.length) : (reply.size * size);
  74.             const GLint extra = 4 - (bytes & 3);
  75.  
  76.             _XRead(dpy, dest, bytes);
  77.             if ( extra < 4 ) {
  78.                 _XEatData(dpy, extra);
  79.             }
  80.         }
  81.         else {
  82.             (void) memcpy( dest, &(reply.pad3), size);
  83.         }
  84.     }
  85.  
  86.     return reply.retval;
  87. }
  88.  
  89. NOINLINE void
  90. __glXReadPixelReply( Display *dpy, struct glx_context * gc, unsigned max_dim,
  91.     GLint width, GLint height, GLint depth, GLenum format, GLenum type,
  92.     void * dest, GLboolean dimensions_in_reply )
  93. {
  94.     xGLXSingleReply reply;
  95.     GLint size;
  96.    
  97.     (void) _XReply(dpy, (xReply *) & reply, 0, False);
  98.  
  99.     if ( dimensions_in_reply ) {
  100.         width  = reply.pad3;
  101.         height = reply.pad4;
  102.         depth  = reply.pad5;
  103.        
  104.         if ((height == 0) || (max_dim < 2)) { height = 1; }
  105.         if ((depth  == 0) || (max_dim < 3)) { depth  = 1; }
  106.     }
  107.  
  108.     size = reply.length * 4;
  109.     if (size != 0) {
  110.         void * buf = malloc( size );
  111.  
  112.         if ( buf == NULL ) {
  113.             _XEatData(dpy, size);
  114.             __glXSetError(gc, GL_OUT_OF_MEMORY);
  115.         }
  116.         else {
  117.             const GLint extra = 4 - (size & 3);
  118.  
  119.             _XRead(dpy, buf, size);
  120.             if ( extra < 4 ) {
  121.                 _XEatData(dpy, extra);
  122.             }
  123.  
  124.             __glEmptyImage(gc, 3, width, height, depth, format, type,
  125.                            buf, dest);
  126.             free(buf);
  127.         }
  128.     }
  129. }
  130.  
  131. #define X_GLXSingle 0
  132.  
  133. NOINLINE FASTCALL GLubyte *
  134. __glXSetupSingleRequest( struct glx_context * gc, GLint sop, GLint cmdlen )
  135. {
  136.     xGLXSingleReq * req;
  137.     Display * const dpy = gc->currentDpy;
  138.  
  139.     (void) __glXFlushRenderBuffer(gc, gc->pc);
  140.     LockDisplay(dpy);
  141.     GetReqExtra(GLXSingle, cmdlen, req);
  142.     req->reqType = gc->majorOpcode;
  143.     req->contextTag = gc->currentContextTag;
  144.     req->glxCode = sop;
  145.     return (GLubyte *)(req) + sz_xGLXSingleReq;
  146. }
  147.  
  148. NOINLINE FASTCALL GLubyte *
  149. __glXSetupVendorRequest( struct glx_context * gc, GLint code, GLint vop, GLint cmdlen )
  150. {
  151.     xGLXVendorPrivateReq * req;
  152.     Display * const dpy = gc->currentDpy;
  153.  
  154.     (void) __glXFlushRenderBuffer(gc, gc->pc);
  155.     LockDisplay(dpy);
  156.     GetReqExtra(GLXVendorPrivate, cmdlen, req);
  157.     req->reqType = gc->majorOpcode;
  158.     req->glxCode = code;
  159.     req->vendorCode = vop;
  160.     req->contextTag = gc->currentContextTag;
  161.     return (GLubyte *)(req) + sz_xGLXVendorPrivateReq;
  162. }
  163.  
  164. const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
  165.  
  166. #define zero                        (__glXDefaultPixelStore+0)
  167. #define one                         (__glXDefaultPixelStore+8)
  168. #define default_pixel_store_1D      (__glXDefaultPixelStore+4)
  169. #define default_pixel_store_1D_size 20
  170. #define default_pixel_store_2D      (__glXDefaultPixelStore+4)
  171. #define default_pixel_store_2D_size 20
  172. #define default_pixel_store_3D      (__glXDefaultPixelStore+0)
  173. #define default_pixel_store_3D_size 36
  174. #define default_pixel_store_4D      (__glXDefaultPixelStore+0)
  175. #define default_pixel_store_4D_size 36
  176.  
  177. static FASTCALL NOINLINE void
  178. generic_3_byte( GLint rop, const void * ptr )
  179. {
  180.     struct glx_context * const gc = __glXGetCurrentContext();
  181.     const GLuint cmdlen = 8;
  182.  
  183.     emit_header(gc->pc, rop, cmdlen);
  184.     (void) memcpy((void *)(gc->pc + 4), ptr, 4);
  185.     gc->pc += cmdlen;
  186.     if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  187. }
  188.  
  189. static FASTCALL NOINLINE void
  190. generic_4_byte( GLint rop, const void * ptr )
  191. {
  192.     struct glx_context * const gc = __glXGetCurrentContext();
  193.     const GLuint cmdlen = 8;
  194.  
  195.     emit_header(gc->pc, rop, cmdlen);
  196.     (void) memcpy((void *)(gc->pc + 4), ptr, 4);
  197.     gc->pc += cmdlen;
  198.     if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  199. }
  200.  
  201. static FASTCALL NOINLINE void
  202. generic_6_byte( GLint rop, const void * ptr )
  203. {
  204.     struct glx_context * const gc = __glXGetCurrentContext();
  205.     const GLuint cmdlen = 12;
  206.  
  207.     emit_header(gc->pc, rop, cmdlen);
  208.     (void) memcpy((void *)(gc->pc + 4), ptr, 8);
  209.     gc->pc += cmdlen;
  210.     if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  211. }
  212.  
  213. static FASTCALL NOINLINE void
  214. generic_8_byte( GLint rop, const void * ptr )
  215. {
  216.     struct glx_context * const gc = __glXGetCurrentContext();
  217.     const GLuint cmdlen = 12;
  218.  
  219.     emit_header(gc->pc, rop, cmdlen);
  220.     (void) memcpy((void *)(gc->pc + 4), ptr, 8);
  221.     gc->pc += cmdlen;
  222.     if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  223. }
  224.  
  225. static FASTCALL NOINLINE void
  226. generic_12_byte( GLint rop, const void * ptr )
  227. {
  228.     struct glx_context * const gc = __glXGetCurrentContext();
  229.     const GLuint cmdlen = 16;
  230.  
  231.     emit_header(gc->pc, rop, cmdlen);
  232.     (void) memcpy((void *)(gc->pc + 4), ptr, 12);
  233.     gc->pc += cmdlen;
  234.     if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  235. }
  236.  
  237. static FASTCALL NOINLINE void
  238. generic_16_byte( GLint rop, const void * ptr )
  239. {
  240.     struct glx_context * const gc = __glXGetCurrentContext();
  241.     const GLuint cmdlen = 20;
  242.  
  243.     emit_header(gc->pc, rop, cmdlen);
  244.     (void) memcpy((void *)(gc->pc + 4), ptr, 16);
  245.     gc->pc += cmdlen;
  246.     if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  247. }
  248.  
  249. static FASTCALL NOINLINE void
  250. generic_24_byte( GLint rop, const void * ptr )
  251. {
  252.     struct glx_context * const gc = __glXGetCurrentContext();
  253.     const GLuint cmdlen = 28;
  254.  
  255.     emit_header(gc->pc, rop, cmdlen);
  256.     (void) memcpy((void *)(gc->pc + 4), ptr, 24);
  257.     gc->pc += cmdlen;
  258.     if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  259. }
  260.  
  261. static FASTCALL NOINLINE void
  262. generic_32_byte( GLint rop, const void * ptr )
  263. {
  264.     struct glx_context * const gc = __glXGetCurrentContext();
  265.     const GLuint cmdlen = 36;
  266.  
  267.     emit_header(gc->pc, rop, cmdlen);
  268.     (void) memcpy((void *)(gc->pc + 4), ptr, 32);
  269.     gc->pc += cmdlen;
  270.     if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  271. }
  272.  
  273. #define X_GLsop_NewList 101
  274. void __indirect_glNewList(GLuint list, GLenum mode)
  275. {
  276.     struct glx_context * const gc = __glXGetCurrentContext();
  277.     Display * const dpy = gc->currentDpy;
  278. #ifndef USE_XCB
  279.     const GLuint cmdlen = 8;
  280. #endif
  281.     if (__builtin_expect(dpy != NULL, 1)) {
  282. #ifdef USE_XCB
  283.         xcb_connection_t *c = XGetXCBConnection(dpy);
  284.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  285.         xcb_glx_new_list(c, gc->currentContextTag, list, mode);
  286. #else
  287.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
  288. (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
  289. (void) memcpy((void *)(pc + 4), (void *)(&mode), 4);
  290.         UnlockDisplay(dpy); SyncHandle();
  291. #endif /* USE_XCB */
  292.     }
  293.     return;
  294. }
  295.  
  296. #define X_GLsop_EndList 102
  297. void __indirect_glEndList(void)
  298. {
  299.     struct glx_context * const gc = __glXGetCurrentContext();
  300.     Display * const dpy = gc->currentDpy;
  301. #ifndef USE_XCB
  302.     const GLuint cmdlen = 0;
  303. #endif
  304.     if (__builtin_expect(dpy != NULL, 1)) {
  305. #ifdef USE_XCB
  306.         xcb_connection_t *c = XGetXCBConnection(dpy);
  307.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  308.         xcb_glx_end_list(c, gc->currentContextTag);
  309. #else
  310.         (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
  311.         UnlockDisplay(dpy); SyncHandle();
  312. #endif /* USE_XCB */
  313.     }
  314.     return;
  315. }
  316.  
  317. #define X_GLrop_CallList 1
  318. void __indirect_glCallList(GLuint list)
  319. {
  320.     struct glx_context * const gc = __glXGetCurrentContext();
  321.     const GLuint cmdlen = 8;
  322. emit_header(gc->pc, X_GLrop_CallList, cmdlen);
  323. (void) memcpy((void *)(gc->pc + 4), (void *)(&list), 4);
  324. gc->pc += cmdlen;
  325. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  326. }
  327.  
  328. #define X_GLrop_CallLists 2
  329. void __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
  330. {
  331.     struct glx_context * const gc = __glXGetCurrentContext();
  332.     const GLuint compsize = __glCallLists_size(type);
  333.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
  334.     if (n < 0) {
  335.         __glXSetError(gc, GL_INVALID_VALUE);
  336.         return;
  337.     }
  338.     if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
  339. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  340.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  341.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  342.     }
  343. emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
  344. (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
  345. (void) memcpy((void *)(gc->pc + 8), (void *)(&type), 4);
  346. (void) memcpy((void *)(gc->pc + 12), (void *)(lists), (compsize * n));
  347. gc->pc += cmdlen;
  348. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  349. }
  350. else {
  351. const GLint op = X_GLrop_CallLists;
  352. const GLuint cmdlenLarge = cmdlen + 4;
  353. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  354. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  355. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  356. (void) memcpy((void *)(pc + 8), (void *)(&n), 4);
  357. (void) memcpy((void *)(pc + 12), (void *)(&type), 4);
  358.     __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
  359. }
  360.     }
  361. }
  362.  
  363. #define X_GLsop_DeleteLists 103
  364. void __indirect_glDeleteLists(GLuint list, GLsizei range)
  365. {
  366.     struct glx_context * const gc = __glXGetCurrentContext();
  367.     Display * const dpy = gc->currentDpy;
  368. #ifndef USE_XCB
  369.     const GLuint cmdlen = 8;
  370. #endif
  371.     if (__builtin_expect(dpy != NULL, 1)) {
  372. #ifdef USE_XCB
  373.         xcb_connection_t *c = XGetXCBConnection(dpy);
  374.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  375.         xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
  376. #else
  377.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
  378. (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
  379. (void) memcpy((void *)(pc + 4), (void *)(&range), 4);
  380.         UnlockDisplay(dpy); SyncHandle();
  381. #endif /* USE_XCB */
  382.     }
  383.     return;
  384. }
  385.  
  386. #define X_GLsop_GenLists 104
  387. GLuint __indirect_glGenLists(GLsizei range)
  388. {
  389.     struct glx_context * const gc = __glXGetCurrentContext();
  390.     Display * const dpy = gc->currentDpy;
  391.     GLuint retval = (GLuint) 0;
  392. #ifndef USE_XCB
  393.     const GLuint cmdlen = 4;
  394. #endif
  395.     if (__builtin_expect(dpy != NULL, 1)) {
  396. #ifdef USE_XCB
  397.         xcb_connection_t *c = XGetXCBConnection(dpy);
  398.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  399.         xcb_glx_gen_lists_reply_t *reply = xcb_glx_gen_lists_reply(c, xcb_glx_gen_lists(c, gc->currentContextTag, range), NULL);
  400.         retval = reply->ret_val;
  401.         free(reply);
  402. #else
  403.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
  404. (void) memcpy((void *)(pc + 0), (void *)(&range), 4);
  405.         retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
  406.         UnlockDisplay(dpy); SyncHandle();
  407. #endif /* USE_XCB */
  408.     }
  409.     return retval;
  410. }
  411.  
  412. #define X_GLrop_ListBase 3
  413. void __indirect_glListBase(GLuint base)
  414. {
  415.     struct glx_context * const gc = __glXGetCurrentContext();
  416.     const GLuint cmdlen = 8;
  417. emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
  418. (void) memcpy((void *)(gc->pc + 4), (void *)(&base), 4);
  419. gc->pc += cmdlen;
  420. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  421. }
  422.  
  423. #define X_GLrop_Begin 4
  424. void __indirect_glBegin(GLenum mode)
  425. {
  426.     struct glx_context * const gc = __glXGetCurrentContext();
  427.     const GLuint cmdlen = 8;
  428. emit_header(gc->pc, X_GLrop_Begin, cmdlen);
  429. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  430. gc->pc += cmdlen;
  431. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  432. }
  433.  
  434. #define X_GLrop_Bitmap 5
  435. void __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap)
  436. {
  437.     struct glx_context * const gc = __glXGetCurrentContext();
  438.     const GLuint compsize = (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
  439.     const GLuint cmdlen = 48 + __GLX_PAD(compsize);
  440.     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
  441. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  442.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  443.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  444.     }
  445. emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
  446. (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
  447. (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
  448. (void) memcpy((void *)(gc->pc + 32), (void *)(&xorig), 4);
  449. (void) memcpy((void *)(gc->pc + 36), (void *)(&yorig), 4);
  450. (void) memcpy((void *)(gc->pc + 40), (void *)(&xmove), 4);
  451. (void) memcpy((void *)(gc->pc + 44), (void *)(&ymove), 4);
  452. if (compsize > 0) {
  453.     (*gc->fillImage)(gc, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
  454. } else {
  455.     (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
  456. }
  457. gc->pc += cmdlen;
  458. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  459. }
  460. else {
  461. const GLint op = X_GLrop_Bitmap;
  462. const GLuint cmdlenLarge = cmdlen + 4;
  463. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  464. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  465. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  466. (void) memcpy((void *)(pc + 28), (void *)(&width), 4);
  467. (void) memcpy((void *)(pc + 32), (void *)(&height), 4);
  468. (void) memcpy((void *)(pc + 36), (void *)(&xorig), 4);
  469. (void) memcpy((void *)(pc + 40), (void *)(&yorig), 4);
  470. (void) memcpy((void *)(pc + 44), (void *)(&xmove), 4);
  471. (void) memcpy((void *)(pc + 48), (void *)(&ymove), 4);
  472. __glXSendLargeImage(gc, compsize, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52, pc + 8);
  473. }
  474.     }
  475. }
  476.  
  477. #define X_GLrop_Color3bv 6
  478. void __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
  479. {
  480.     struct glx_context * const gc = __glXGetCurrentContext();
  481.     const GLuint cmdlen = 8;
  482. emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
  483. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
  484. (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
  485. (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
  486. gc->pc += cmdlen;
  487. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  488. }
  489.  
  490. #define X_GLrop_Color3bv 6
  491. void __indirect_glColor3bv(const GLbyte * v)
  492. {
  493.     generic_3_byte( X_GLrop_Color3bv, v );
  494. }
  495.  
  496. #define X_GLrop_Color3dv 7
  497. void __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
  498. {
  499.     struct glx_context * const gc = __glXGetCurrentContext();
  500.     const GLuint cmdlen = 28;
  501. emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
  502. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
  503. (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
  504. (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
  505. gc->pc += cmdlen;
  506. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  507. }
  508.  
  509. #define X_GLrop_Color3dv 7
  510. void __indirect_glColor3dv(const GLdouble * v)
  511. {
  512.     generic_24_byte( X_GLrop_Color3dv, v );
  513. }
  514.  
  515. #define X_GLrop_Color3fv 8
  516. void __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
  517. {
  518.     struct glx_context * const gc = __glXGetCurrentContext();
  519.     const GLuint cmdlen = 16;
  520. emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
  521. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  522. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  523. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  524. gc->pc += cmdlen;
  525. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  526. }
  527.  
  528. #define X_GLrop_Color3fv 8
  529. void __indirect_glColor3fv(const GLfloat * v)
  530. {
  531.     generic_12_byte( X_GLrop_Color3fv, v );
  532. }
  533.  
  534. #define X_GLrop_Color3iv 9
  535. void __indirect_glColor3i(GLint red, GLint green, GLint blue)
  536. {
  537.     struct glx_context * const gc = __glXGetCurrentContext();
  538.     const GLuint cmdlen = 16;
  539. emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
  540. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  541. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  542. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  543. gc->pc += cmdlen;
  544. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  545. }
  546.  
  547. #define X_GLrop_Color3iv 9
  548. void __indirect_glColor3iv(const GLint * v)
  549. {
  550.     generic_12_byte( X_GLrop_Color3iv, v );
  551. }
  552.  
  553. #define X_GLrop_Color3sv 10
  554. void __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
  555. {
  556.     struct glx_context * const gc = __glXGetCurrentContext();
  557.     const GLuint cmdlen = 12;
  558. emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
  559. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
  560. (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
  561. (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
  562. gc->pc += cmdlen;
  563. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  564. }
  565.  
  566. #define X_GLrop_Color3sv 10
  567. void __indirect_glColor3sv(const GLshort * v)
  568. {
  569.     generic_6_byte( X_GLrop_Color3sv, v );
  570. }
  571.  
  572. #define X_GLrop_Color3ubv 11
  573. void __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
  574. {
  575.     struct glx_context * const gc = __glXGetCurrentContext();
  576.     const GLuint cmdlen = 8;
  577. emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
  578. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
  579. (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
  580. (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
  581. gc->pc += cmdlen;
  582. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  583. }
  584.  
  585. #define X_GLrop_Color3ubv 11
  586. void __indirect_glColor3ubv(const GLubyte * v)
  587. {
  588.     generic_3_byte( X_GLrop_Color3ubv, v );
  589. }
  590.  
  591. #define X_GLrop_Color3uiv 12
  592. void __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
  593. {
  594.     struct glx_context * const gc = __glXGetCurrentContext();
  595.     const GLuint cmdlen = 16;
  596. emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
  597. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  598. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  599. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  600. gc->pc += cmdlen;
  601. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  602. }
  603.  
  604. #define X_GLrop_Color3uiv 12
  605. void __indirect_glColor3uiv(const GLuint * v)
  606. {
  607.     generic_12_byte( X_GLrop_Color3uiv, v );
  608. }
  609.  
  610. #define X_GLrop_Color3usv 13
  611. void __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
  612. {
  613.     struct glx_context * const gc = __glXGetCurrentContext();
  614.     const GLuint cmdlen = 12;
  615. emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
  616. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
  617. (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
  618. (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
  619. gc->pc += cmdlen;
  620. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  621. }
  622.  
  623. #define X_GLrop_Color3usv 13
  624. void __indirect_glColor3usv(const GLushort * v)
  625. {
  626.     generic_6_byte( X_GLrop_Color3usv, v );
  627. }
  628.  
  629. #define X_GLrop_Color4bv 14
  630. void __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
  631. {
  632.     struct glx_context * const gc = __glXGetCurrentContext();
  633.     const GLuint cmdlen = 8;
  634. emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
  635. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
  636. (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
  637. (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
  638. (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
  639. gc->pc += cmdlen;
  640. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  641. }
  642.  
  643. #define X_GLrop_Color4bv 14
  644. void __indirect_glColor4bv(const GLbyte * v)
  645. {
  646.     generic_4_byte( X_GLrop_Color4bv, v );
  647. }
  648.  
  649. #define X_GLrop_Color4dv 15
  650. void __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
  651. {
  652.     struct glx_context * const gc = __glXGetCurrentContext();
  653.     const GLuint cmdlen = 36;
  654. emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
  655. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
  656. (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
  657. (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
  658. (void) memcpy((void *)(gc->pc + 28), (void *)(&alpha), 8);
  659. gc->pc += cmdlen;
  660. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  661. }
  662.  
  663. #define X_GLrop_Color4dv 15
  664. void __indirect_glColor4dv(const GLdouble * v)
  665. {
  666.     generic_32_byte( X_GLrop_Color4dv, v );
  667. }
  668.  
  669. #define X_GLrop_Color4fv 16
  670. void __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  671. {
  672.     struct glx_context * const gc = __glXGetCurrentContext();
  673.     const GLuint cmdlen = 20;
  674. emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
  675. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  676. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  677. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  678. (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
  679. gc->pc += cmdlen;
  680. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  681. }
  682.  
  683. #define X_GLrop_Color4fv 16
  684. void __indirect_glColor4fv(const GLfloat * v)
  685. {
  686.     generic_16_byte( X_GLrop_Color4fv, v );
  687. }
  688.  
  689. #define X_GLrop_Color4iv 17
  690. void __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
  691. {
  692.     struct glx_context * const gc = __glXGetCurrentContext();
  693.     const GLuint cmdlen = 20;
  694. emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
  695. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  696. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  697. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  698. (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
  699. gc->pc += cmdlen;
  700. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  701. }
  702.  
  703. #define X_GLrop_Color4iv 17
  704. void __indirect_glColor4iv(const GLint * v)
  705. {
  706.     generic_16_byte( X_GLrop_Color4iv, v );
  707. }
  708.  
  709. #define X_GLrop_Color4sv 18
  710. void __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
  711. {
  712.     struct glx_context * const gc = __glXGetCurrentContext();
  713.     const GLuint cmdlen = 12;
  714. emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
  715. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
  716. (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
  717. (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
  718. (void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2);
  719. gc->pc += cmdlen;
  720. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  721. }
  722.  
  723. #define X_GLrop_Color4sv 18
  724. void __indirect_glColor4sv(const GLshort * v)
  725. {
  726.     generic_8_byte( X_GLrop_Color4sv, v );
  727. }
  728.  
  729. #define X_GLrop_Color4ubv 19
  730. void __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
  731. {
  732.     struct glx_context * const gc = __glXGetCurrentContext();
  733.     const GLuint cmdlen = 8;
  734. emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
  735. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
  736. (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
  737. (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
  738. (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
  739. gc->pc += cmdlen;
  740. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  741. }
  742.  
  743. #define X_GLrop_Color4ubv 19
  744. void __indirect_glColor4ubv(const GLubyte * v)
  745. {
  746.     generic_4_byte( X_GLrop_Color4ubv, v );
  747. }
  748.  
  749. #define X_GLrop_Color4uiv 20
  750. void __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
  751. {
  752.     struct glx_context * const gc = __glXGetCurrentContext();
  753.     const GLuint cmdlen = 20;
  754. emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
  755. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  756. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  757. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  758. (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
  759. gc->pc += cmdlen;
  760. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  761. }
  762.  
  763. #define X_GLrop_Color4uiv 20
  764. void __indirect_glColor4uiv(const GLuint * v)
  765. {
  766.     generic_16_byte( X_GLrop_Color4uiv, v );
  767. }
  768.  
  769. #define X_GLrop_Color4usv 21
  770. void __indirect_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
  771. {
  772.     struct glx_context * const gc = __glXGetCurrentContext();
  773.     const GLuint cmdlen = 12;
  774. emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
  775. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
  776. (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
  777. (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
  778. (void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2);
  779. gc->pc += cmdlen;
  780. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  781. }
  782.  
  783. #define X_GLrop_Color4usv 21
  784. void __indirect_glColor4usv(const GLushort * v)
  785. {
  786.     generic_8_byte( X_GLrop_Color4usv, v );
  787. }
  788.  
  789. #define X_GLrop_EdgeFlagv 22
  790. void __indirect_glEdgeFlag(GLboolean flag)
  791. {
  792.     struct glx_context * const gc = __glXGetCurrentContext();
  793.     const GLuint cmdlen = 8;
  794. emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
  795. (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
  796. gc->pc += cmdlen;
  797. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  798. }
  799.  
  800. #define X_GLrop_EdgeFlagv 22
  801. void __indirect_glEdgeFlagv(const GLboolean * flag)
  802. {
  803.     struct glx_context * const gc = __glXGetCurrentContext();
  804.     const GLuint cmdlen = 8;
  805. emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
  806. (void) memcpy((void *)(gc->pc + 4), (void *)(flag), 1);
  807. gc->pc += cmdlen;
  808. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  809. }
  810.  
  811. #define X_GLrop_End 23
  812. void __indirect_glEnd(void)
  813. {
  814.     struct glx_context * const gc = __glXGetCurrentContext();
  815.     const GLuint cmdlen = 4;
  816. emit_header(gc->pc, X_GLrop_End, cmdlen);
  817. gc->pc += cmdlen;
  818. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  819. }
  820.  
  821. #define X_GLrop_Indexdv 24
  822. void __indirect_glIndexd(GLdouble c)
  823. {
  824.     struct glx_context * const gc = __glXGetCurrentContext();
  825.     const GLuint cmdlen = 12;
  826. emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
  827. (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 8);
  828. gc->pc += cmdlen;
  829. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  830. }
  831.  
  832. #define X_GLrop_Indexdv 24
  833. void __indirect_glIndexdv(const GLdouble * c)
  834. {
  835.     generic_8_byte( X_GLrop_Indexdv, c );
  836. }
  837.  
  838. #define X_GLrop_Indexfv 25
  839. void __indirect_glIndexf(GLfloat c)
  840. {
  841.     struct glx_context * const gc = __glXGetCurrentContext();
  842.     const GLuint cmdlen = 8;
  843. emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
  844. (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
  845. gc->pc += cmdlen;
  846. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  847. }
  848.  
  849. #define X_GLrop_Indexfv 25
  850. void __indirect_glIndexfv(const GLfloat * c)
  851. {
  852.     generic_4_byte( X_GLrop_Indexfv, c );
  853. }
  854.  
  855. #define X_GLrop_Indexiv 26
  856. void __indirect_glIndexi(GLint c)
  857. {
  858.     struct glx_context * const gc = __glXGetCurrentContext();
  859.     const GLuint cmdlen = 8;
  860. emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
  861. (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
  862. gc->pc += cmdlen;
  863. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  864. }
  865.  
  866. #define X_GLrop_Indexiv 26
  867. void __indirect_glIndexiv(const GLint * c)
  868. {
  869.     generic_4_byte( X_GLrop_Indexiv, c );
  870. }
  871.  
  872. #define X_GLrop_Indexsv 27
  873. void __indirect_glIndexs(GLshort c)
  874. {
  875.     struct glx_context * const gc = __glXGetCurrentContext();
  876.     const GLuint cmdlen = 8;
  877. emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
  878. (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 2);
  879. gc->pc += cmdlen;
  880. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  881. }
  882.  
  883. #define X_GLrop_Indexsv 27
  884. void __indirect_glIndexsv(const GLshort * c)
  885. {
  886.     struct glx_context * const gc = __glXGetCurrentContext();
  887.     const GLuint cmdlen = 8;
  888. emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
  889. (void) memcpy((void *)(gc->pc + 4), (void *)(c), 2);
  890. gc->pc += cmdlen;
  891. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  892. }
  893.  
  894. #define X_GLrop_Normal3bv 28
  895. void __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
  896. {
  897.     struct glx_context * const gc = __glXGetCurrentContext();
  898.     const GLuint cmdlen = 8;
  899. emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
  900. (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 1);
  901. (void) memcpy((void *)(gc->pc + 5), (void *)(&ny), 1);
  902. (void) memcpy((void *)(gc->pc + 6), (void *)(&nz), 1);
  903. gc->pc += cmdlen;
  904. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  905. }
  906.  
  907. #define X_GLrop_Normal3bv 28
  908. void __indirect_glNormal3bv(const GLbyte * v)
  909. {
  910.     generic_3_byte( X_GLrop_Normal3bv, v );
  911. }
  912.  
  913. #define X_GLrop_Normal3dv 29
  914. void __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
  915. {
  916.     struct glx_context * const gc = __glXGetCurrentContext();
  917.     const GLuint cmdlen = 28;
  918. emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
  919. (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 8);
  920. (void) memcpy((void *)(gc->pc + 12), (void *)(&ny), 8);
  921. (void) memcpy((void *)(gc->pc + 20), (void *)(&nz), 8);
  922. gc->pc += cmdlen;
  923. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  924. }
  925.  
  926. #define X_GLrop_Normal3dv 29
  927. void __indirect_glNormal3dv(const GLdouble * v)
  928. {
  929.     generic_24_byte( X_GLrop_Normal3dv, v );
  930. }
  931.  
  932. #define X_GLrop_Normal3fv 30
  933. void __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
  934. {
  935.     struct glx_context * const gc = __glXGetCurrentContext();
  936.     const GLuint cmdlen = 16;
  937. emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
  938. (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4);
  939. (void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4);
  940. (void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4);
  941. gc->pc += cmdlen;
  942. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  943. }
  944.  
  945. #define X_GLrop_Normal3fv 30
  946. void __indirect_glNormal3fv(const GLfloat * v)
  947. {
  948.     generic_12_byte( X_GLrop_Normal3fv, v );
  949. }
  950.  
  951. #define X_GLrop_Normal3iv 31
  952. void __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
  953. {
  954.     struct glx_context * const gc = __glXGetCurrentContext();
  955.     const GLuint cmdlen = 16;
  956. emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
  957. (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4);
  958. (void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4);
  959. (void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4);
  960. gc->pc += cmdlen;
  961. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  962. }
  963.  
  964. #define X_GLrop_Normal3iv 31
  965. void __indirect_glNormal3iv(const GLint * v)
  966. {
  967.     generic_12_byte( X_GLrop_Normal3iv, v );
  968. }
  969.  
  970. #define X_GLrop_Normal3sv 32
  971. void __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
  972. {
  973.     struct glx_context * const gc = __glXGetCurrentContext();
  974.     const GLuint cmdlen = 12;
  975. emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
  976. (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 2);
  977. (void) memcpy((void *)(gc->pc + 6), (void *)(&ny), 2);
  978. (void) memcpy((void *)(gc->pc + 8), (void *)(&nz), 2);
  979. gc->pc += cmdlen;
  980. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  981. }
  982.  
  983. #define X_GLrop_Normal3sv 32
  984. void __indirect_glNormal3sv(const GLshort * v)
  985. {
  986.     generic_6_byte( X_GLrop_Normal3sv, v );
  987. }
  988.  
  989. #define X_GLrop_RasterPos2dv 33
  990. void __indirect_glRasterPos2d(GLdouble x, GLdouble y)
  991. {
  992.     struct glx_context * const gc = __glXGetCurrentContext();
  993.     const GLuint cmdlen = 20;
  994. emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
  995. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
  996. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
  997. gc->pc += cmdlen;
  998. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  999. }
  1000.  
  1001. #define X_GLrop_RasterPos2dv 33
  1002. void __indirect_glRasterPos2dv(const GLdouble * v)
  1003. {
  1004.     generic_16_byte( X_GLrop_RasterPos2dv, v );
  1005. }
  1006.  
  1007. #define X_GLrop_RasterPos2fv 34
  1008. void __indirect_glRasterPos2f(GLfloat x, GLfloat y)
  1009. {
  1010.     struct glx_context * const gc = __glXGetCurrentContext();
  1011.     const GLuint cmdlen = 12;
  1012. emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
  1013. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1014. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1015. gc->pc += cmdlen;
  1016. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1017. }
  1018.  
  1019. #define X_GLrop_RasterPos2fv 34
  1020. void __indirect_glRasterPos2fv(const GLfloat * v)
  1021. {
  1022.     generic_8_byte( X_GLrop_RasterPos2fv, v );
  1023. }
  1024.  
  1025. #define X_GLrop_RasterPos2iv 35
  1026. void __indirect_glRasterPos2i(GLint x, GLint y)
  1027. {
  1028.     struct glx_context * const gc = __glXGetCurrentContext();
  1029.     const GLuint cmdlen = 12;
  1030. emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
  1031. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1032. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1033. gc->pc += cmdlen;
  1034. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1035. }
  1036.  
  1037. #define X_GLrop_RasterPos2iv 35
  1038. void __indirect_glRasterPos2iv(const GLint * v)
  1039. {
  1040.     generic_8_byte( X_GLrop_RasterPos2iv, v );
  1041. }
  1042.  
  1043. #define X_GLrop_RasterPos2sv 36
  1044. void __indirect_glRasterPos2s(GLshort x, GLshort y)
  1045. {
  1046.     struct glx_context * const gc = __glXGetCurrentContext();
  1047.     const GLuint cmdlen = 8;
  1048. emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
  1049. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
  1050. (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
  1051. gc->pc += cmdlen;
  1052. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1053. }
  1054.  
  1055. #define X_GLrop_RasterPos2sv 36
  1056. void __indirect_glRasterPos2sv(const GLshort * v)
  1057. {
  1058.     generic_4_byte( X_GLrop_RasterPos2sv, v );
  1059. }
  1060.  
  1061. #define X_GLrop_RasterPos3dv 37
  1062. void __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
  1063. {
  1064.     struct glx_context * const gc = __glXGetCurrentContext();
  1065.     const GLuint cmdlen = 28;
  1066. emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
  1067. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
  1068. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
  1069. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
  1070. gc->pc += cmdlen;
  1071. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1072. }
  1073.  
  1074. #define X_GLrop_RasterPos3dv 37
  1075. void __indirect_glRasterPos3dv(const GLdouble * v)
  1076. {
  1077.     generic_24_byte( X_GLrop_RasterPos3dv, v );
  1078. }
  1079.  
  1080. #define X_GLrop_RasterPos3fv 38
  1081. void __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
  1082. {
  1083.     struct glx_context * const gc = __glXGetCurrentContext();
  1084.     const GLuint cmdlen = 16;
  1085. emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
  1086. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1087. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1088. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  1089. gc->pc += cmdlen;
  1090. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1091. }
  1092.  
  1093. #define X_GLrop_RasterPos3fv 38
  1094. void __indirect_glRasterPos3fv(const GLfloat * v)
  1095. {
  1096.     generic_12_byte( X_GLrop_RasterPos3fv, v );
  1097. }
  1098.  
  1099. #define X_GLrop_RasterPos3iv 39
  1100. void __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
  1101. {
  1102.     struct glx_context * const gc = __glXGetCurrentContext();
  1103.     const GLuint cmdlen = 16;
  1104. emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
  1105. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1106. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1107. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  1108. gc->pc += cmdlen;
  1109. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1110. }
  1111.  
  1112. #define X_GLrop_RasterPos3iv 39
  1113. void __indirect_glRasterPos3iv(const GLint * v)
  1114. {
  1115.     generic_12_byte( X_GLrop_RasterPos3iv, v );
  1116. }
  1117.  
  1118. #define X_GLrop_RasterPos3sv 40
  1119. void __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
  1120. {
  1121.     struct glx_context * const gc = __glXGetCurrentContext();
  1122.     const GLuint cmdlen = 12;
  1123. emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
  1124. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
  1125. (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
  1126. (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
  1127. gc->pc += cmdlen;
  1128. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1129. }
  1130.  
  1131. #define X_GLrop_RasterPos3sv 40
  1132. void __indirect_glRasterPos3sv(const GLshort * v)
  1133. {
  1134.     generic_6_byte( X_GLrop_RasterPos3sv, v );
  1135. }
  1136.  
  1137. #define X_GLrop_RasterPos4dv 41
  1138. void __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  1139. {
  1140.     struct glx_context * const gc = __glXGetCurrentContext();
  1141.     const GLuint cmdlen = 36;
  1142. emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
  1143. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
  1144. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
  1145. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
  1146. (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
  1147. gc->pc += cmdlen;
  1148. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1149. }
  1150.  
  1151. #define X_GLrop_RasterPos4dv 41
  1152. void __indirect_glRasterPos4dv(const GLdouble * v)
  1153. {
  1154.     generic_32_byte( X_GLrop_RasterPos4dv, v );
  1155. }
  1156.  
  1157. #define X_GLrop_RasterPos4fv 42
  1158. void __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  1159. {
  1160.     struct glx_context * const gc = __glXGetCurrentContext();
  1161.     const GLuint cmdlen = 20;
  1162. emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
  1163. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1164. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1165. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  1166. (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
  1167. gc->pc += cmdlen;
  1168. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1169. }
  1170.  
  1171. #define X_GLrop_RasterPos4fv 42
  1172. void __indirect_glRasterPos4fv(const GLfloat * v)
  1173. {
  1174.     generic_16_byte( X_GLrop_RasterPos4fv, v );
  1175. }
  1176.  
  1177. #define X_GLrop_RasterPos4iv 43
  1178. void __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
  1179. {
  1180.     struct glx_context * const gc = __glXGetCurrentContext();
  1181.     const GLuint cmdlen = 20;
  1182. emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
  1183. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1184. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1185. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  1186. (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
  1187. gc->pc += cmdlen;
  1188. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1189. }
  1190.  
  1191. #define X_GLrop_RasterPos4iv 43
  1192. void __indirect_glRasterPos4iv(const GLint * v)
  1193. {
  1194.     generic_16_byte( X_GLrop_RasterPos4iv, v );
  1195. }
  1196.  
  1197. #define X_GLrop_RasterPos4sv 44
  1198. void __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
  1199. {
  1200.     struct glx_context * const gc = __glXGetCurrentContext();
  1201.     const GLuint cmdlen = 12;
  1202. emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
  1203. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
  1204. (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
  1205. (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
  1206. (void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2);
  1207. gc->pc += cmdlen;
  1208. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1209. }
  1210.  
  1211. #define X_GLrop_RasterPos4sv 44
  1212. void __indirect_glRasterPos4sv(const GLshort * v)
  1213. {
  1214.     generic_8_byte( X_GLrop_RasterPos4sv, v );
  1215. }
  1216.  
  1217. #define X_GLrop_Rectdv 45
  1218. void __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
  1219. {
  1220.     struct glx_context * const gc = __glXGetCurrentContext();
  1221.     const GLuint cmdlen = 36;
  1222. emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
  1223. (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 8);
  1224. (void) memcpy((void *)(gc->pc + 12), (void *)(&y1), 8);
  1225. (void) memcpy((void *)(gc->pc + 20), (void *)(&x2), 8);
  1226. (void) memcpy((void *)(gc->pc + 28), (void *)(&y2), 8);
  1227. gc->pc += cmdlen;
  1228. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1229. }
  1230.  
  1231. #define X_GLrop_Rectdv 45
  1232. void __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
  1233. {
  1234.     struct glx_context * const gc = __glXGetCurrentContext();
  1235.     const GLuint cmdlen = 36;
  1236. emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
  1237. (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 16);
  1238. (void) memcpy((void *)(gc->pc + 20), (void *)(v2), 16);
  1239. gc->pc += cmdlen;
  1240. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1241. }
  1242.  
  1243. #define X_GLrop_Rectfv 46
  1244. void __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
  1245. {
  1246.     struct glx_context * const gc = __glXGetCurrentContext();
  1247.     const GLuint cmdlen = 20;
  1248. emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
  1249. (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4);
  1250. (void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4);
  1251. (void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4);
  1252. (void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4);
  1253. gc->pc += cmdlen;
  1254. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1255. }
  1256.  
  1257. #define X_GLrop_Rectfv 46
  1258. void __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
  1259. {
  1260.     struct glx_context * const gc = __glXGetCurrentContext();
  1261.     const GLuint cmdlen = 20;
  1262. emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
  1263. (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8);
  1264. (void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8);
  1265. gc->pc += cmdlen;
  1266. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1267. }
  1268.  
  1269. #define X_GLrop_Rectiv 47
  1270. void __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
  1271. {
  1272.     struct glx_context * const gc = __glXGetCurrentContext();
  1273.     const GLuint cmdlen = 20;
  1274. emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
  1275. (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4);
  1276. (void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4);
  1277. (void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4);
  1278. (void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4);
  1279. gc->pc += cmdlen;
  1280. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1281. }
  1282.  
  1283. #define X_GLrop_Rectiv 47
  1284. void __indirect_glRectiv(const GLint * v1, const GLint * v2)
  1285. {
  1286.     struct glx_context * const gc = __glXGetCurrentContext();
  1287.     const GLuint cmdlen = 20;
  1288. emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
  1289. (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8);
  1290. (void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8);
  1291. gc->pc += cmdlen;
  1292. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1293. }
  1294.  
  1295. #define X_GLrop_Rectsv 48
  1296. void __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
  1297. {
  1298.     struct glx_context * const gc = __glXGetCurrentContext();
  1299.     const GLuint cmdlen = 12;
  1300. emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
  1301. (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 2);
  1302. (void) memcpy((void *)(gc->pc + 6), (void *)(&y1), 2);
  1303. (void) memcpy((void *)(gc->pc + 8), (void *)(&x2), 2);
  1304. (void) memcpy((void *)(gc->pc + 10), (void *)(&y2), 2);
  1305. gc->pc += cmdlen;
  1306. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1307. }
  1308.  
  1309. #define X_GLrop_Rectsv 48
  1310. void __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
  1311. {
  1312.     struct glx_context * const gc = __glXGetCurrentContext();
  1313.     const GLuint cmdlen = 12;
  1314. emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
  1315. (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 4);
  1316. (void) memcpy((void *)(gc->pc + 8), (void *)(v2), 4);
  1317. gc->pc += cmdlen;
  1318. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1319. }
  1320.  
  1321. #define X_GLrop_TexCoord1dv 49
  1322. void __indirect_glTexCoord1d(GLdouble s)
  1323. {
  1324.     struct glx_context * const gc = __glXGetCurrentContext();
  1325.     const GLuint cmdlen = 12;
  1326. emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
  1327. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
  1328. gc->pc += cmdlen;
  1329. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1330. }
  1331.  
  1332. #define X_GLrop_TexCoord1dv 49
  1333. void __indirect_glTexCoord1dv(const GLdouble * v)
  1334. {
  1335.     generic_8_byte( X_GLrop_TexCoord1dv, v );
  1336. }
  1337.  
  1338. #define X_GLrop_TexCoord1fv 50
  1339. void __indirect_glTexCoord1f(GLfloat s)
  1340. {
  1341.     struct glx_context * const gc = __glXGetCurrentContext();
  1342.     const GLuint cmdlen = 8;
  1343. emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
  1344. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
  1345. gc->pc += cmdlen;
  1346. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1347. }
  1348.  
  1349. #define X_GLrop_TexCoord1fv 50
  1350. void __indirect_glTexCoord1fv(const GLfloat * v)
  1351. {
  1352.     generic_4_byte( X_GLrop_TexCoord1fv, v );
  1353. }
  1354.  
  1355. #define X_GLrop_TexCoord1iv 51
  1356. void __indirect_glTexCoord1i(GLint s)
  1357. {
  1358.     struct glx_context * const gc = __glXGetCurrentContext();
  1359.     const GLuint cmdlen = 8;
  1360. emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
  1361. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
  1362. gc->pc += cmdlen;
  1363. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1364. }
  1365.  
  1366. #define X_GLrop_TexCoord1iv 51
  1367. void __indirect_glTexCoord1iv(const GLint * v)
  1368. {
  1369.     generic_4_byte( X_GLrop_TexCoord1iv, v );
  1370. }
  1371.  
  1372. #define X_GLrop_TexCoord1sv 52
  1373. void __indirect_glTexCoord1s(GLshort s)
  1374. {
  1375.     struct glx_context * const gc = __glXGetCurrentContext();
  1376.     const GLuint cmdlen = 8;
  1377. emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
  1378. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
  1379. gc->pc += cmdlen;
  1380. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1381. }
  1382.  
  1383. #define X_GLrop_TexCoord1sv 52
  1384. void __indirect_glTexCoord1sv(const GLshort * v)
  1385. {
  1386.     struct glx_context * const gc = __glXGetCurrentContext();
  1387.     const GLuint cmdlen = 8;
  1388. emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
  1389. (void) memcpy((void *)(gc->pc + 4), (void *)(v), 2);
  1390. gc->pc += cmdlen;
  1391. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1392. }
  1393.  
  1394. #define X_GLrop_TexCoord2dv 53
  1395. void __indirect_glTexCoord2d(GLdouble s, GLdouble t)
  1396. {
  1397.     struct glx_context * const gc = __glXGetCurrentContext();
  1398.     const GLuint cmdlen = 20;
  1399. emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
  1400. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
  1401. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
  1402. gc->pc += cmdlen;
  1403. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1404. }
  1405.  
  1406. #define X_GLrop_TexCoord2dv 53
  1407. void __indirect_glTexCoord2dv(const GLdouble * v)
  1408. {
  1409.     generic_16_byte( X_GLrop_TexCoord2dv, v );
  1410. }
  1411.  
  1412. #define X_GLrop_TexCoord2fv 54
  1413. void __indirect_glTexCoord2f(GLfloat s, GLfloat t)
  1414. {
  1415.     struct glx_context * const gc = __glXGetCurrentContext();
  1416.     const GLuint cmdlen = 12;
  1417. emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
  1418. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
  1419. (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
  1420. gc->pc += cmdlen;
  1421. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1422. }
  1423.  
  1424. #define X_GLrop_TexCoord2fv 54
  1425. void __indirect_glTexCoord2fv(const GLfloat * v)
  1426. {
  1427.     generic_8_byte( X_GLrop_TexCoord2fv, v );
  1428. }
  1429.  
  1430. #define X_GLrop_TexCoord2iv 55
  1431. void __indirect_glTexCoord2i(GLint s, GLint t)
  1432. {
  1433.     struct glx_context * const gc = __glXGetCurrentContext();
  1434.     const GLuint cmdlen = 12;
  1435. emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
  1436. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
  1437. (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
  1438. gc->pc += cmdlen;
  1439. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1440. }
  1441.  
  1442. #define X_GLrop_TexCoord2iv 55
  1443. void __indirect_glTexCoord2iv(const GLint * v)
  1444. {
  1445.     generic_8_byte( X_GLrop_TexCoord2iv, v );
  1446. }
  1447.  
  1448. #define X_GLrop_TexCoord2sv 56
  1449. void __indirect_glTexCoord2s(GLshort s, GLshort t)
  1450. {
  1451.     struct glx_context * const gc = __glXGetCurrentContext();
  1452.     const GLuint cmdlen = 8;
  1453. emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
  1454. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
  1455. (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
  1456. gc->pc += cmdlen;
  1457. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1458. }
  1459.  
  1460. #define X_GLrop_TexCoord2sv 56
  1461. void __indirect_glTexCoord2sv(const GLshort * v)
  1462. {
  1463.     generic_4_byte( X_GLrop_TexCoord2sv, v );
  1464. }
  1465.  
  1466. #define X_GLrop_TexCoord3dv 57
  1467. void __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
  1468. {
  1469.     struct glx_context * const gc = __glXGetCurrentContext();
  1470.     const GLuint cmdlen = 28;
  1471. emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
  1472. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
  1473. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
  1474. (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
  1475. gc->pc += cmdlen;
  1476. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1477. }
  1478.  
  1479. #define X_GLrop_TexCoord3dv 57
  1480. void __indirect_glTexCoord3dv(const GLdouble * v)
  1481. {
  1482.     generic_24_byte( X_GLrop_TexCoord3dv, v );
  1483. }
  1484.  
  1485. #define X_GLrop_TexCoord3fv 58
  1486. void __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
  1487. {
  1488.     struct glx_context * const gc = __glXGetCurrentContext();
  1489.     const GLuint cmdlen = 16;
  1490. emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
  1491. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
  1492. (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
  1493. (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
  1494. gc->pc += cmdlen;
  1495. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1496. }
  1497.  
  1498. #define X_GLrop_TexCoord3fv 58
  1499. void __indirect_glTexCoord3fv(const GLfloat * v)
  1500. {
  1501.     generic_12_byte( X_GLrop_TexCoord3fv, v );
  1502. }
  1503.  
  1504. #define X_GLrop_TexCoord3iv 59
  1505. void __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
  1506. {
  1507.     struct glx_context * const gc = __glXGetCurrentContext();
  1508.     const GLuint cmdlen = 16;
  1509. emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
  1510. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
  1511. (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
  1512. (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
  1513. gc->pc += cmdlen;
  1514. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1515. }
  1516.  
  1517. #define X_GLrop_TexCoord3iv 59
  1518. void __indirect_glTexCoord3iv(const GLint * v)
  1519. {
  1520.     generic_12_byte( X_GLrop_TexCoord3iv, v );
  1521. }
  1522.  
  1523. #define X_GLrop_TexCoord3sv 60
  1524. void __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
  1525. {
  1526.     struct glx_context * const gc = __glXGetCurrentContext();
  1527.     const GLuint cmdlen = 12;
  1528. emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
  1529. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
  1530. (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
  1531. (void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2);
  1532. gc->pc += cmdlen;
  1533. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1534. }
  1535.  
  1536. #define X_GLrop_TexCoord3sv 60
  1537. void __indirect_glTexCoord3sv(const GLshort * v)
  1538. {
  1539.     generic_6_byte( X_GLrop_TexCoord3sv, v );
  1540. }
  1541.  
  1542. #define X_GLrop_TexCoord4dv 61
  1543. void __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  1544. {
  1545.     struct glx_context * const gc = __glXGetCurrentContext();
  1546.     const GLuint cmdlen = 36;
  1547. emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
  1548. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
  1549. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
  1550. (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
  1551. (void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8);
  1552. gc->pc += cmdlen;
  1553. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1554. }
  1555.  
  1556. #define X_GLrop_TexCoord4dv 61
  1557. void __indirect_glTexCoord4dv(const GLdouble * v)
  1558. {
  1559.     generic_32_byte( X_GLrop_TexCoord4dv, v );
  1560. }
  1561.  
  1562. #define X_GLrop_TexCoord4fv 62
  1563. void __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  1564. {
  1565.     struct glx_context * const gc = __glXGetCurrentContext();
  1566.     const GLuint cmdlen = 20;
  1567. emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
  1568. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
  1569. (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
  1570. (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
  1571. (void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4);
  1572. gc->pc += cmdlen;
  1573. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1574. }
  1575.  
  1576. #define X_GLrop_TexCoord4fv 62
  1577. void __indirect_glTexCoord4fv(const GLfloat * v)
  1578. {
  1579.     generic_16_byte( X_GLrop_TexCoord4fv, v );
  1580. }
  1581.  
  1582. #define X_GLrop_TexCoord4iv 63
  1583. void __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
  1584. {
  1585.     struct glx_context * const gc = __glXGetCurrentContext();
  1586.     const GLuint cmdlen = 20;
  1587. emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
  1588. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
  1589. (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
  1590. (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
  1591. (void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4);
  1592. gc->pc += cmdlen;
  1593. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1594. }
  1595.  
  1596. #define X_GLrop_TexCoord4iv 63
  1597. void __indirect_glTexCoord4iv(const GLint * v)
  1598. {
  1599.     generic_16_byte( X_GLrop_TexCoord4iv, v );
  1600. }
  1601.  
  1602. #define X_GLrop_TexCoord4sv 64
  1603. void __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
  1604. {
  1605.     struct glx_context * const gc = __glXGetCurrentContext();
  1606.     const GLuint cmdlen = 12;
  1607. emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
  1608. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
  1609. (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
  1610. (void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2);
  1611. (void) memcpy((void *)(gc->pc + 10), (void *)(&q), 2);
  1612. gc->pc += cmdlen;
  1613. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1614. }
  1615.  
  1616. #define X_GLrop_TexCoord4sv 64
  1617. void __indirect_glTexCoord4sv(const GLshort * v)
  1618. {
  1619.     generic_8_byte( X_GLrop_TexCoord4sv, v );
  1620. }
  1621.  
  1622. #define X_GLrop_Vertex2dv 65
  1623. void __indirect_glVertex2d(GLdouble x, GLdouble y)
  1624. {
  1625.     struct glx_context * const gc = __glXGetCurrentContext();
  1626.     const GLuint cmdlen = 20;
  1627. emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
  1628. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
  1629. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
  1630. gc->pc += cmdlen;
  1631. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1632. }
  1633.  
  1634. #define X_GLrop_Vertex2dv 65
  1635. void __indirect_glVertex2dv(const GLdouble * v)
  1636. {
  1637.     generic_16_byte( X_GLrop_Vertex2dv, v );
  1638. }
  1639.  
  1640. #define X_GLrop_Vertex2fv 66
  1641. void __indirect_glVertex2f(GLfloat x, GLfloat y)
  1642. {
  1643.     struct glx_context * const gc = __glXGetCurrentContext();
  1644.     const GLuint cmdlen = 12;
  1645. emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
  1646. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1647. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1648. gc->pc += cmdlen;
  1649. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1650. }
  1651.  
  1652. #define X_GLrop_Vertex2fv 66
  1653. void __indirect_glVertex2fv(const GLfloat * v)
  1654. {
  1655.     generic_8_byte( X_GLrop_Vertex2fv, v );
  1656. }
  1657.  
  1658. #define X_GLrop_Vertex2iv 67
  1659. void __indirect_glVertex2i(GLint x, GLint y)
  1660. {
  1661.     struct glx_context * const gc = __glXGetCurrentContext();
  1662.     const GLuint cmdlen = 12;
  1663. emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
  1664. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1665. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1666. gc->pc += cmdlen;
  1667. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1668. }
  1669.  
  1670. #define X_GLrop_Vertex2iv 67
  1671. void __indirect_glVertex2iv(const GLint * v)
  1672. {
  1673.     generic_8_byte( X_GLrop_Vertex2iv, v );
  1674. }
  1675.  
  1676. #define X_GLrop_Vertex2sv 68
  1677. void __indirect_glVertex2s(GLshort x, GLshort y)
  1678. {
  1679.     struct glx_context * const gc = __glXGetCurrentContext();
  1680.     const GLuint cmdlen = 8;
  1681. emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
  1682. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
  1683. (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
  1684. gc->pc += cmdlen;
  1685. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1686. }
  1687.  
  1688. #define X_GLrop_Vertex2sv 68
  1689. void __indirect_glVertex2sv(const GLshort * v)
  1690. {
  1691.     generic_4_byte( X_GLrop_Vertex2sv, v );
  1692. }
  1693.  
  1694. #define X_GLrop_Vertex3dv 69
  1695. void __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
  1696. {
  1697.     struct glx_context * const gc = __glXGetCurrentContext();
  1698.     const GLuint cmdlen = 28;
  1699. emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
  1700. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
  1701. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
  1702. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
  1703. gc->pc += cmdlen;
  1704. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1705. }
  1706.  
  1707. #define X_GLrop_Vertex3dv 69
  1708. void __indirect_glVertex3dv(const GLdouble * v)
  1709. {
  1710.     generic_24_byte( X_GLrop_Vertex3dv, v );
  1711. }
  1712.  
  1713. #define X_GLrop_Vertex3fv 70
  1714. void __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
  1715. {
  1716.     struct glx_context * const gc = __glXGetCurrentContext();
  1717.     const GLuint cmdlen = 16;
  1718. emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
  1719. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1720. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1721. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  1722. gc->pc += cmdlen;
  1723. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1724. }
  1725.  
  1726. #define X_GLrop_Vertex3fv 70
  1727. void __indirect_glVertex3fv(const GLfloat * v)
  1728. {
  1729.     generic_12_byte( X_GLrop_Vertex3fv, v );
  1730. }
  1731.  
  1732. #define X_GLrop_Vertex3iv 71
  1733. void __indirect_glVertex3i(GLint x, GLint y, GLint z)
  1734. {
  1735.     struct glx_context * const gc = __glXGetCurrentContext();
  1736.     const GLuint cmdlen = 16;
  1737. emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
  1738. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1739. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1740. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  1741. gc->pc += cmdlen;
  1742. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1743. }
  1744.  
  1745. #define X_GLrop_Vertex3iv 71
  1746. void __indirect_glVertex3iv(const GLint * v)
  1747. {
  1748.     generic_12_byte( X_GLrop_Vertex3iv, v );
  1749. }
  1750.  
  1751. #define X_GLrop_Vertex3sv 72
  1752. void __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
  1753. {
  1754.     struct glx_context * const gc = __glXGetCurrentContext();
  1755.     const GLuint cmdlen = 12;
  1756. emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
  1757. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
  1758. (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
  1759. (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
  1760. gc->pc += cmdlen;
  1761. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1762. }
  1763.  
  1764. #define X_GLrop_Vertex3sv 72
  1765. void __indirect_glVertex3sv(const GLshort * v)
  1766. {
  1767.     generic_6_byte( X_GLrop_Vertex3sv, v );
  1768. }
  1769.  
  1770. #define X_GLrop_Vertex4dv 73
  1771. void __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  1772. {
  1773.     struct glx_context * const gc = __glXGetCurrentContext();
  1774.     const GLuint cmdlen = 36;
  1775. emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
  1776. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
  1777. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
  1778. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
  1779. (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
  1780. gc->pc += cmdlen;
  1781. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1782. }
  1783.  
  1784. #define X_GLrop_Vertex4dv 73
  1785. void __indirect_glVertex4dv(const GLdouble * v)
  1786. {
  1787.     generic_32_byte( X_GLrop_Vertex4dv, v );
  1788. }
  1789.  
  1790. #define X_GLrop_Vertex4fv 74
  1791. void __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  1792. {
  1793.     struct glx_context * const gc = __glXGetCurrentContext();
  1794.     const GLuint cmdlen = 20;
  1795. emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
  1796. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1797. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1798. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  1799. (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
  1800. gc->pc += cmdlen;
  1801. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1802. }
  1803.  
  1804. #define X_GLrop_Vertex4fv 74
  1805. void __indirect_glVertex4fv(const GLfloat * v)
  1806. {
  1807.     generic_16_byte( X_GLrop_Vertex4fv, v );
  1808. }
  1809.  
  1810. #define X_GLrop_Vertex4iv 75
  1811. void __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
  1812. {
  1813.     struct glx_context * const gc = __glXGetCurrentContext();
  1814.     const GLuint cmdlen = 20;
  1815. emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
  1816. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  1817. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  1818. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  1819. (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
  1820. gc->pc += cmdlen;
  1821. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1822. }
  1823.  
  1824. #define X_GLrop_Vertex4iv 75
  1825. void __indirect_glVertex4iv(const GLint * v)
  1826. {
  1827.     generic_16_byte( X_GLrop_Vertex4iv, v );
  1828. }
  1829.  
  1830. #define X_GLrop_Vertex4sv 76
  1831. void __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
  1832. {
  1833.     struct glx_context * const gc = __glXGetCurrentContext();
  1834.     const GLuint cmdlen = 12;
  1835. emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
  1836. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
  1837. (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
  1838. (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
  1839. (void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2);
  1840. gc->pc += cmdlen;
  1841. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1842. }
  1843.  
  1844. #define X_GLrop_Vertex4sv 76
  1845. void __indirect_glVertex4sv(const GLshort * v)
  1846. {
  1847.     generic_8_byte( X_GLrop_Vertex4sv, v );
  1848. }
  1849.  
  1850. #define X_GLrop_ClipPlane 77
  1851. void __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
  1852. {
  1853.     struct glx_context * const gc = __glXGetCurrentContext();
  1854.     const GLuint cmdlen = 40;
  1855. emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
  1856. (void) memcpy((void *)(gc->pc + 4), (void *)(equation), 32);
  1857. (void) memcpy((void *)(gc->pc + 36), (void *)(&plane), 4);
  1858. gc->pc += cmdlen;
  1859. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1860. }
  1861.  
  1862. #define X_GLrop_ColorMaterial 78
  1863. void __indirect_glColorMaterial(GLenum face, GLenum mode)
  1864. {
  1865.     struct glx_context * const gc = __glXGetCurrentContext();
  1866.     const GLuint cmdlen = 12;
  1867. emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
  1868. (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
  1869. (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
  1870. gc->pc += cmdlen;
  1871. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1872. }
  1873.  
  1874. #define X_GLrop_CullFace 79
  1875. void __indirect_glCullFace(GLenum mode)
  1876. {
  1877.     struct glx_context * const gc = __glXGetCurrentContext();
  1878.     const GLuint cmdlen = 8;
  1879. emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
  1880. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  1881. gc->pc += cmdlen;
  1882. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1883. }
  1884.  
  1885. #define X_GLrop_Fogf 80
  1886. void __indirect_glFogf(GLenum pname, GLfloat param)
  1887. {
  1888.     struct glx_context * const gc = __glXGetCurrentContext();
  1889.     const GLuint cmdlen = 12;
  1890. emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
  1891. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  1892. (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
  1893. gc->pc += cmdlen;
  1894. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1895. }
  1896.  
  1897. #define X_GLrop_Fogfv 81
  1898. void __indirect_glFogfv(GLenum pname, const GLfloat * params)
  1899. {
  1900.     struct glx_context * const gc = __glXGetCurrentContext();
  1901.     const GLuint compsize = __glFogfv_size(pname);
  1902.     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
  1903. emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
  1904. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  1905. (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
  1906. gc->pc += cmdlen;
  1907. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1908. }
  1909.  
  1910. #define X_GLrop_Fogi 82
  1911. void __indirect_glFogi(GLenum pname, GLint param)
  1912. {
  1913.     struct glx_context * const gc = __glXGetCurrentContext();
  1914.     const GLuint cmdlen = 12;
  1915. emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
  1916. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  1917. (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
  1918. gc->pc += cmdlen;
  1919. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1920. }
  1921.  
  1922. #define X_GLrop_Fogiv 83
  1923. void __indirect_glFogiv(GLenum pname, const GLint * params)
  1924. {
  1925.     struct glx_context * const gc = __glXGetCurrentContext();
  1926.     const GLuint compsize = __glFogiv_size(pname);
  1927.     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
  1928. emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
  1929. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  1930. (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
  1931. gc->pc += cmdlen;
  1932. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1933. }
  1934.  
  1935. #define X_GLrop_FrontFace 84
  1936. void __indirect_glFrontFace(GLenum mode)
  1937. {
  1938.     struct glx_context * const gc = __glXGetCurrentContext();
  1939.     const GLuint cmdlen = 8;
  1940. emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
  1941. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  1942. gc->pc += cmdlen;
  1943. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1944. }
  1945.  
  1946. #define X_GLrop_Hint 85
  1947. void __indirect_glHint(GLenum target, GLenum mode)
  1948. {
  1949.     struct glx_context * const gc = __glXGetCurrentContext();
  1950.     const GLuint cmdlen = 12;
  1951. emit_header(gc->pc, X_GLrop_Hint, cmdlen);
  1952. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  1953. (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
  1954. gc->pc += cmdlen;
  1955. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1956. }
  1957.  
  1958. #define X_GLrop_Lightf 86
  1959. void __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
  1960. {
  1961.     struct glx_context * const gc = __glXGetCurrentContext();
  1962.     const GLuint cmdlen = 16;
  1963. emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
  1964. (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
  1965. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  1966. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  1967. gc->pc += cmdlen;
  1968. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1969. }
  1970.  
  1971. #define X_GLrop_Lightfv 87
  1972. void __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
  1973. {
  1974.     struct glx_context * const gc = __glXGetCurrentContext();
  1975.     const GLuint compsize = __glLightfv_size(pname);
  1976.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  1977. emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
  1978. (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
  1979. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  1980. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  1981. gc->pc += cmdlen;
  1982. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1983. }
  1984.  
  1985. #define X_GLrop_Lighti 88
  1986. void __indirect_glLighti(GLenum light, GLenum pname, GLint param)
  1987. {
  1988.     struct glx_context * const gc = __glXGetCurrentContext();
  1989.     const GLuint cmdlen = 16;
  1990. emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
  1991. (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
  1992. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  1993. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  1994. gc->pc += cmdlen;
  1995. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  1996. }
  1997.  
  1998. #define X_GLrop_Lightiv 89
  1999. void __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
  2000. {
  2001.     struct glx_context * const gc = __glXGetCurrentContext();
  2002.     const GLuint compsize = __glLightiv_size(pname);
  2003.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  2004. emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
  2005. (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
  2006. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2007. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  2008. gc->pc += cmdlen;
  2009. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2010. }
  2011.  
  2012. #define X_GLrop_LightModelf 90
  2013. void __indirect_glLightModelf(GLenum pname, GLfloat param)
  2014. {
  2015.     struct glx_context * const gc = __glXGetCurrentContext();
  2016.     const GLuint cmdlen = 12;
  2017. emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
  2018. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  2019. (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
  2020. gc->pc += cmdlen;
  2021. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2022. }
  2023.  
  2024. #define X_GLrop_LightModelfv 91
  2025. void __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
  2026. {
  2027.     struct glx_context * const gc = __glXGetCurrentContext();
  2028.     const GLuint compsize = __glLightModelfv_size(pname);
  2029.     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
  2030. emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
  2031. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  2032. (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
  2033. gc->pc += cmdlen;
  2034. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2035. }
  2036.  
  2037. #define X_GLrop_LightModeli 92
  2038. void __indirect_glLightModeli(GLenum pname, GLint param)
  2039. {
  2040.     struct glx_context * const gc = __glXGetCurrentContext();
  2041.     const GLuint cmdlen = 12;
  2042. emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
  2043. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  2044. (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
  2045. gc->pc += cmdlen;
  2046. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2047. }
  2048.  
  2049. #define X_GLrop_LightModeliv 93
  2050. void __indirect_glLightModeliv(GLenum pname, const GLint * params)
  2051. {
  2052.     struct glx_context * const gc = __glXGetCurrentContext();
  2053.     const GLuint compsize = __glLightModeliv_size(pname);
  2054.     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
  2055. emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
  2056. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  2057. (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
  2058. gc->pc += cmdlen;
  2059. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2060. }
  2061.  
  2062. #define X_GLrop_LineStipple 94
  2063. void __indirect_glLineStipple(GLint factor, GLushort pattern)
  2064. {
  2065.     struct glx_context * const gc = __glXGetCurrentContext();
  2066.     const GLuint cmdlen = 12;
  2067. emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
  2068. (void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4);
  2069. (void) memcpy((void *)(gc->pc + 8), (void *)(&pattern), 2);
  2070. gc->pc += cmdlen;
  2071. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2072. }
  2073.  
  2074. #define X_GLrop_LineWidth 95
  2075. void __indirect_glLineWidth(GLfloat width)
  2076. {
  2077.     struct glx_context * const gc = __glXGetCurrentContext();
  2078.     const GLuint cmdlen = 8;
  2079. emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
  2080. (void) memcpy((void *)(gc->pc + 4), (void *)(&width), 4);
  2081. gc->pc += cmdlen;
  2082. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2083. }
  2084.  
  2085. #define X_GLrop_Materialf 96
  2086. void __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
  2087. {
  2088.     struct glx_context * const gc = __glXGetCurrentContext();
  2089.     const GLuint cmdlen = 16;
  2090. emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
  2091. (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
  2092. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2093. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  2094. gc->pc += cmdlen;
  2095. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2096. }
  2097.  
  2098. #define X_GLrop_Materialfv 97
  2099. void __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
  2100. {
  2101.     struct glx_context * const gc = __glXGetCurrentContext();
  2102.     const GLuint compsize = __glMaterialfv_size(pname);
  2103.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  2104. emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
  2105. (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
  2106. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2107. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  2108. gc->pc += cmdlen;
  2109. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2110. }
  2111.  
  2112. #define X_GLrop_Materiali 98
  2113. void __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
  2114. {
  2115.     struct glx_context * const gc = __glXGetCurrentContext();
  2116.     const GLuint cmdlen = 16;
  2117. emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
  2118. (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
  2119. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2120. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  2121. gc->pc += cmdlen;
  2122. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2123. }
  2124.  
  2125. #define X_GLrop_Materialiv 99
  2126. void __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
  2127. {
  2128.     struct glx_context * const gc = __glXGetCurrentContext();
  2129.     const GLuint compsize = __glMaterialiv_size(pname);
  2130.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  2131. emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
  2132. (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
  2133. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2134. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  2135. gc->pc += cmdlen;
  2136. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2137. }
  2138.  
  2139. #define X_GLrop_PointSize 100
  2140. void __indirect_glPointSize(GLfloat size)
  2141. {
  2142.     struct glx_context * const gc = __glXGetCurrentContext();
  2143.     const GLuint cmdlen = 8;
  2144. emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
  2145. (void) memcpy((void *)(gc->pc + 4), (void *)(&size), 4);
  2146. gc->pc += cmdlen;
  2147. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2148. }
  2149.  
  2150. #define X_GLrop_PolygonMode 101
  2151. void __indirect_glPolygonMode(GLenum face, GLenum mode)
  2152. {
  2153.     struct glx_context * const gc = __glXGetCurrentContext();
  2154.     const GLuint cmdlen = 12;
  2155. emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
  2156. (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
  2157. (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
  2158. gc->pc += cmdlen;
  2159. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2160. }
  2161.  
  2162. #define X_GLrop_PolygonStipple 102
  2163. void __indirect_glPolygonStipple(const GLubyte * mask)
  2164. {
  2165.     struct glx_context * const gc = __glXGetCurrentContext();
  2166.     const GLuint compsize = (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
  2167.     const GLuint cmdlen = 24 + __GLX_PAD(compsize);
  2168. emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
  2169. if (compsize > 0) {
  2170.     (*gc->fillImage)(gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, gc->pc + 24, gc->pc + 4);
  2171. } else {
  2172.     (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
  2173. }
  2174. gc->pc += cmdlen;
  2175. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2176. }
  2177.  
  2178. #define X_GLrop_Scissor 103
  2179. void __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
  2180. {
  2181.     struct glx_context * const gc = __glXGetCurrentContext();
  2182.     const GLuint cmdlen = 20;
  2183. emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
  2184. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  2185. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  2186. (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
  2187. (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
  2188. gc->pc += cmdlen;
  2189. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2190. }
  2191.  
  2192. #define X_GLrop_ShadeModel 104
  2193. void __indirect_glShadeModel(GLenum mode)
  2194. {
  2195.     struct glx_context * const gc = __glXGetCurrentContext();
  2196.     const GLuint cmdlen = 8;
  2197. emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
  2198. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  2199. gc->pc += cmdlen;
  2200. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2201. }
  2202.  
  2203. #define X_GLrop_TexParameterf 105
  2204. void __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
  2205. {
  2206.     struct glx_context * const gc = __glXGetCurrentContext();
  2207.     const GLuint cmdlen = 16;
  2208. emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
  2209. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  2210. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2211. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  2212. gc->pc += cmdlen;
  2213. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2214. }
  2215.  
  2216. #define X_GLrop_TexParameterfv 106
  2217. void __indirect_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params)
  2218. {
  2219.     struct glx_context * const gc = __glXGetCurrentContext();
  2220.     const GLuint compsize = __glTexParameterfv_size(pname);
  2221.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  2222. emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
  2223. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  2224. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2225. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  2226. gc->pc += cmdlen;
  2227. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2228. }
  2229.  
  2230. #define X_GLrop_TexParameteri 107
  2231. void __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
  2232. {
  2233.     struct glx_context * const gc = __glXGetCurrentContext();
  2234.     const GLuint cmdlen = 16;
  2235. emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
  2236. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  2237. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2238. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  2239. gc->pc += cmdlen;
  2240. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2241. }
  2242.  
  2243. #define X_GLrop_TexParameteriv 108
  2244. void __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
  2245. {
  2246.     struct glx_context * const gc = __glXGetCurrentContext();
  2247.     const GLuint compsize = __glTexParameteriv_size(pname);
  2248.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  2249. emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
  2250. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  2251. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2252. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  2253. gc->pc += cmdlen;
  2254. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2255. }
  2256.  
  2257. static void
  2258. __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 )
  2259. {
  2260.     struct glx_context * const gc = __glXGetCurrentContext();
  2261.     const GLuint compsize = __glImageSize(width, height, 1, format, type, target);
  2262.     const GLuint cmdlen = 56 + __GLX_PAD(compsize);
  2263.     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
  2264. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  2265.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  2266.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  2267.     }
  2268. emit_header(gc->pc, opcode, cmdlen);
  2269. (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
  2270. (void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4);
  2271. (void) memcpy((void *)(gc->pc + 32), (void *)(&internalformat), 4);
  2272. (void) memcpy((void *)(gc->pc + 36), (void *)(&width), 4);
  2273. (void) memcpy((void *)(gc->pc + 40), (void *)(&height), 4);
  2274. (void) memcpy((void *)(gc->pc + 44), (void *)(&border), 4);
  2275. (void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4);
  2276. (void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4);
  2277. if ((compsize > 0) && (pixels != NULL)) {
  2278.     (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 56, gc->pc + 4);
  2279. } else {
  2280.     (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
  2281. }
  2282. gc->pc += cmdlen;
  2283. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2284. }
  2285. else {
  2286. const GLint op = opcode;
  2287. const GLuint cmdlenLarge = cmdlen + 4;
  2288. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  2289. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  2290. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  2291. (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
  2292. (void) memcpy((void *)(pc + 32), (void *)(&level), 4);
  2293. (void) memcpy((void *)(pc + 36), (void *)(&internalformat), 4);
  2294. (void) memcpy((void *)(pc + 40), (void *)(&width), 4);
  2295. (void) memcpy((void *)(pc + 44), (void *)(&height), 4);
  2296. (void) memcpy((void *)(pc + 48), (void *)(&border), 4);
  2297. (void) memcpy((void *)(pc + 52), (void *)(&format), 4);
  2298. (void) memcpy((void *)(pc + 56), (void *)(&type), 4);
  2299. __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 60, pc + 8);
  2300. }
  2301.     }
  2302. }
  2303.  
  2304. #define X_GLrop_TexImage1D 109
  2305. void __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
  2306. {
  2307.     __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat, width, 1, border, format, type, pixels );
  2308. }
  2309.  
  2310. #define X_GLrop_TexImage2D 110
  2311. void __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
  2312. {
  2313.     __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat, width, height, border, format, type, pixels );
  2314. }
  2315.  
  2316. #define X_GLrop_TexEnvf 111
  2317. void __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
  2318. {
  2319.     struct glx_context * const gc = __glXGetCurrentContext();
  2320.     const GLuint cmdlen = 16;
  2321. emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
  2322. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  2323. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2324. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  2325. gc->pc += cmdlen;
  2326. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2327. }
  2328.  
  2329. #define X_GLrop_TexEnvfv 112
  2330. void __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
  2331. {
  2332.     struct glx_context * const gc = __glXGetCurrentContext();
  2333.     const GLuint compsize = __glTexEnvfv_size(pname);
  2334.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  2335. emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
  2336. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  2337. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2338. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  2339. gc->pc += cmdlen;
  2340. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2341. }
  2342.  
  2343. #define X_GLrop_TexEnvi 113
  2344. void __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
  2345. {
  2346.     struct glx_context * const gc = __glXGetCurrentContext();
  2347.     const GLuint cmdlen = 16;
  2348. emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
  2349. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  2350. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2351. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  2352. gc->pc += cmdlen;
  2353. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2354. }
  2355.  
  2356. #define X_GLrop_TexEnviv 114
  2357. void __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
  2358. {
  2359.     struct glx_context * const gc = __glXGetCurrentContext();
  2360.     const GLuint compsize = __glTexEnviv_size(pname);
  2361.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  2362. emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
  2363. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  2364. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2365. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  2366. gc->pc += cmdlen;
  2367. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2368. }
  2369.  
  2370. #define X_GLrop_TexGend 115
  2371. void __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
  2372. {
  2373.     struct glx_context * const gc = __glXGetCurrentContext();
  2374.     const GLuint cmdlen = 20;
  2375. emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
  2376. (void) memcpy((void *)(gc->pc + 4), (void *)(&param), 8);
  2377. (void) memcpy((void *)(gc->pc + 12), (void *)(&coord), 4);
  2378. (void) memcpy((void *)(gc->pc + 16), (void *)(&pname), 4);
  2379. gc->pc += cmdlen;
  2380. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2381. }
  2382.  
  2383. #define X_GLrop_TexGendv 116
  2384. void __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
  2385. {
  2386.     struct glx_context * const gc = __glXGetCurrentContext();
  2387.     const GLuint compsize = __glTexGendv_size(pname);
  2388.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
  2389. emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
  2390. (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
  2391. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2392. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 8));
  2393. gc->pc += cmdlen;
  2394. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2395. }
  2396.  
  2397. #define X_GLrop_TexGenf 117
  2398. void __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
  2399. {
  2400.     struct glx_context * const gc = __glXGetCurrentContext();
  2401.     const GLuint cmdlen = 16;
  2402. emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
  2403. (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
  2404. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2405. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  2406. gc->pc += cmdlen;
  2407. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2408. }
  2409.  
  2410. #define X_GLrop_TexGenfv 118
  2411. void __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
  2412. {
  2413.     struct glx_context * const gc = __glXGetCurrentContext();
  2414.     const GLuint compsize = __glTexGenfv_size(pname);
  2415.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  2416. emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
  2417. (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
  2418. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2419. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  2420. gc->pc += cmdlen;
  2421. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2422. }
  2423.  
  2424. #define X_GLrop_TexGeni 119
  2425. void __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
  2426. {
  2427.     struct glx_context * const gc = __glXGetCurrentContext();
  2428.     const GLuint cmdlen = 16;
  2429. emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
  2430. (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
  2431. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2432. (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
  2433. gc->pc += cmdlen;
  2434. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2435. }
  2436.  
  2437. #define X_GLrop_TexGeniv 120
  2438. void __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
  2439. {
  2440.     struct glx_context * const gc = __glXGetCurrentContext();
  2441.     const GLuint compsize = __glTexGeniv_size(pname);
  2442.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  2443. emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
  2444. (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
  2445. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  2446. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  2447. gc->pc += cmdlen;
  2448. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2449. }
  2450.  
  2451. #define X_GLrop_InitNames 121
  2452. void __indirect_glInitNames(void)
  2453. {
  2454.     struct glx_context * const gc = __glXGetCurrentContext();
  2455.     const GLuint cmdlen = 4;
  2456. emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
  2457. gc->pc += cmdlen;
  2458. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2459. }
  2460.  
  2461. #define X_GLrop_LoadName 122
  2462. void __indirect_glLoadName(GLuint name)
  2463. {
  2464.     struct glx_context * const gc = __glXGetCurrentContext();
  2465.     const GLuint cmdlen = 8;
  2466. emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
  2467. (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
  2468. gc->pc += cmdlen;
  2469. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2470. }
  2471.  
  2472. #define X_GLrop_PassThrough 123
  2473. void __indirect_glPassThrough(GLfloat token)
  2474. {
  2475.     struct glx_context * const gc = __glXGetCurrentContext();
  2476.     const GLuint cmdlen = 8;
  2477. emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
  2478. (void) memcpy((void *)(gc->pc + 4), (void *)(&token), 4);
  2479. gc->pc += cmdlen;
  2480. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2481. }
  2482.  
  2483. #define X_GLrop_PopName 124
  2484. void __indirect_glPopName(void)
  2485. {
  2486.     struct glx_context * const gc = __glXGetCurrentContext();
  2487.     const GLuint cmdlen = 4;
  2488. emit_header(gc->pc, X_GLrop_PopName, cmdlen);
  2489. gc->pc += cmdlen;
  2490. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2491. }
  2492.  
  2493. #define X_GLrop_PushName 125
  2494. void __indirect_glPushName(GLuint name)
  2495. {
  2496.     struct glx_context * const gc = __glXGetCurrentContext();
  2497.     const GLuint cmdlen = 8;
  2498. emit_header(gc->pc, X_GLrop_PushName, cmdlen);
  2499. (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
  2500. gc->pc += cmdlen;
  2501. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2502. }
  2503.  
  2504. #define X_GLrop_DrawBuffer 126
  2505. void __indirect_glDrawBuffer(GLenum mode)
  2506. {
  2507.     struct glx_context * const gc = __glXGetCurrentContext();
  2508.     const GLuint cmdlen = 8;
  2509. emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
  2510. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  2511. gc->pc += cmdlen;
  2512. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2513. }
  2514.  
  2515. #define X_GLrop_Clear 127
  2516. void __indirect_glClear(GLbitfield mask)
  2517. {
  2518.     struct glx_context * const gc = __glXGetCurrentContext();
  2519.     const GLuint cmdlen = 8;
  2520. emit_header(gc->pc, X_GLrop_Clear, cmdlen);
  2521. (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
  2522. gc->pc += cmdlen;
  2523. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2524. }
  2525.  
  2526. #define X_GLrop_ClearAccum 128
  2527. void __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  2528. {
  2529.     struct glx_context * const gc = __glXGetCurrentContext();
  2530.     const GLuint cmdlen = 20;
  2531. emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
  2532. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  2533. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  2534. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  2535. (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
  2536. gc->pc += cmdlen;
  2537. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2538. }
  2539.  
  2540. #define X_GLrop_ClearIndex 129
  2541. void __indirect_glClearIndex(GLfloat c)
  2542. {
  2543.     struct glx_context * const gc = __glXGetCurrentContext();
  2544.     const GLuint cmdlen = 8;
  2545. emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
  2546. (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
  2547. gc->pc += cmdlen;
  2548. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2549. }
  2550.  
  2551. #define X_GLrop_ClearColor 130
  2552. void __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  2553. {
  2554.     struct glx_context * const gc = __glXGetCurrentContext();
  2555.     const GLuint cmdlen = 20;
  2556. emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
  2557. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  2558. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  2559. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  2560. (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
  2561. gc->pc += cmdlen;
  2562. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2563. }
  2564.  
  2565. #define X_GLrop_ClearStencil 131
  2566. void __indirect_glClearStencil(GLint s)
  2567. {
  2568.     struct glx_context * const gc = __glXGetCurrentContext();
  2569.     const GLuint cmdlen = 8;
  2570. emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
  2571. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
  2572. gc->pc += cmdlen;
  2573. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2574. }
  2575.  
  2576. #define X_GLrop_ClearDepth 132
  2577. void __indirect_glClearDepth(GLclampd depth)
  2578. {
  2579.     struct glx_context * const gc = __glXGetCurrentContext();
  2580.     const GLuint cmdlen = 12;
  2581. emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
  2582. (void) memcpy((void *)(gc->pc + 4), (void *)(&depth), 8);
  2583. gc->pc += cmdlen;
  2584. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2585. }
  2586.  
  2587. #define X_GLrop_StencilMask 133
  2588. void __indirect_glStencilMask(GLuint mask)
  2589. {
  2590.     struct glx_context * const gc = __glXGetCurrentContext();
  2591.     const GLuint cmdlen = 8;
  2592. emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
  2593. (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
  2594. gc->pc += cmdlen;
  2595. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2596. }
  2597.  
  2598. #define X_GLrop_ColorMask 134
  2599. void __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
  2600. {
  2601.     struct glx_context * const gc = __glXGetCurrentContext();
  2602.     const GLuint cmdlen = 8;
  2603. emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
  2604. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
  2605. (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
  2606. (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
  2607. (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
  2608. gc->pc += cmdlen;
  2609. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2610. }
  2611.  
  2612. #define X_GLrop_DepthMask 135
  2613. void __indirect_glDepthMask(GLboolean flag)
  2614. {
  2615.     struct glx_context * const gc = __glXGetCurrentContext();
  2616.     const GLuint cmdlen = 8;
  2617. emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
  2618. (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
  2619. gc->pc += cmdlen;
  2620. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2621. }
  2622.  
  2623. #define X_GLrop_IndexMask 136
  2624. void __indirect_glIndexMask(GLuint mask)
  2625. {
  2626.     struct glx_context * const gc = __glXGetCurrentContext();
  2627.     const GLuint cmdlen = 8;
  2628. emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
  2629. (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
  2630. gc->pc += cmdlen;
  2631. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2632. }
  2633.  
  2634. #define X_GLrop_Accum 137
  2635. void __indirect_glAccum(GLenum op, GLfloat value)
  2636. {
  2637.     struct glx_context * const gc = __glXGetCurrentContext();
  2638.     const GLuint cmdlen = 12;
  2639. emit_header(gc->pc, X_GLrop_Accum, cmdlen);
  2640. (void) memcpy((void *)(gc->pc + 4), (void *)(&op), 4);
  2641. (void) memcpy((void *)(gc->pc + 8), (void *)(&value), 4);
  2642. gc->pc += cmdlen;
  2643. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2644. }
  2645.  
  2646. #define X_GLrop_PopAttrib 141
  2647. void __indirect_glPopAttrib(void)
  2648. {
  2649.     struct glx_context * const gc = __glXGetCurrentContext();
  2650.     const GLuint cmdlen = 4;
  2651. emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
  2652. gc->pc += cmdlen;
  2653. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2654. }
  2655.  
  2656. #define X_GLrop_PushAttrib 142
  2657. void __indirect_glPushAttrib(GLbitfield mask)
  2658. {
  2659.     struct glx_context * const gc = __glXGetCurrentContext();
  2660.     const GLuint cmdlen = 8;
  2661. emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
  2662. (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
  2663. gc->pc += cmdlen;
  2664. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2665. }
  2666.  
  2667. #define X_GLrop_MapGrid1d 147
  2668. void __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
  2669. {
  2670.     struct glx_context * const gc = __glXGetCurrentContext();
  2671.     const GLuint cmdlen = 24;
  2672. emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
  2673. (void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8);
  2674. (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8);
  2675. (void) memcpy((void *)(gc->pc + 20), (void *)(&un), 4);
  2676. gc->pc += cmdlen;
  2677. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2678. }
  2679.  
  2680. #define X_GLrop_MapGrid1f 148
  2681. void __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
  2682. {
  2683.     struct glx_context * const gc = __glXGetCurrentContext();
  2684.     const GLuint cmdlen = 16;
  2685. emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
  2686. (void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4);
  2687. (void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4);
  2688. (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4);
  2689. gc->pc += cmdlen;
  2690. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2691. }
  2692.  
  2693. #define X_GLrop_MapGrid2d 149
  2694. void __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
  2695. {
  2696.     struct glx_context * const gc = __glXGetCurrentContext();
  2697.     const GLuint cmdlen = 44;
  2698. emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
  2699. (void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8);
  2700. (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8);
  2701. (void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 8);
  2702. (void) memcpy((void *)(gc->pc + 28), (void *)(&v2), 8);
  2703. (void) memcpy((void *)(gc->pc + 36), (void *)(&un), 4);
  2704. (void) memcpy((void *)(gc->pc + 40), (void *)(&vn), 4);
  2705. gc->pc += cmdlen;
  2706. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2707. }
  2708.  
  2709. #define X_GLrop_MapGrid2f 150
  2710. void __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
  2711. {
  2712.     struct glx_context * const gc = __glXGetCurrentContext();
  2713.     const GLuint cmdlen = 28;
  2714. emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
  2715. (void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4);
  2716. (void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4);
  2717. (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4);
  2718. (void) memcpy((void *)(gc->pc + 16), (void *)(&vn), 4);
  2719. (void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 4);
  2720. (void) memcpy((void *)(gc->pc + 24), (void *)(&v2), 4);
  2721. gc->pc += cmdlen;
  2722. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2723. }
  2724.  
  2725. #define X_GLrop_EvalCoord1dv 151
  2726. void __indirect_glEvalCoord1d(GLdouble u)
  2727. {
  2728.     struct glx_context * const gc = __glXGetCurrentContext();
  2729.     const GLuint cmdlen = 12;
  2730. emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
  2731. (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8);
  2732. gc->pc += cmdlen;
  2733. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2734. }
  2735.  
  2736. #define X_GLrop_EvalCoord1dv 151
  2737. void __indirect_glEvalCoord1dv(const GLdouble * u)
  2738. {
  2739.     generic_8_byte( X_GLrop_EvalCoord1dv, u );
  2740. }
  2741.  
  2742. #define X_GLrop_EvalCoord1fv 152
  2743. void __indirect_glEvalCoord1f(GLfloat u)
  2744. {
  2745.     struct glx_context * const gc = __glXGetCurrentContext();
  2746.     const GLuint cmdlen = 8;
  2747. emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
  2748. (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4);
  2749. gc->pc += cmdlen;
  2750. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2751. }
  2752.  
  2753. #define X_GLrop_EvalCoord1fv 152
  2754. void __indirect_glEvalCoord1fv(const GLfloat * u)
  2755. {
  2756.     generic_4_byte( X_GLrop_EvalCoord1fv, u );
  2757. }
  2758.  
  2759. #define X_GLrop_EvalCoord2dv 153
  2760. void __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
  2761. {
  2762.     struct glx_context * const gc = __glXGetCurrentContext();
  2763.     const GLuint cmdlen = 20;
  2764. emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
  2765. (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8);
  2766. (void) memcpy((void *)(gc->pc + 12), (void *)(&v), 8);
  2767. gc->pc += cmdlen;
  2768. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2769. }
  2770.  
  2771. #define X_GLrop_EvalCoord2dv 153
  2772. void __indirect_glEvalCoord2dv(const GLdouble * u)
  2773. {
  2774.     generic_16_byte( X_GLrop_EvalCoord2dv, u );
  2775. }
  2776.  
  2777. #define X_GLrop_EvalCoord2fv 154
  2778. void __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
  2779. {
  2780.     struct glx_context * const gc = __glXGetCurrentContext();
  2781.     const GLuint cmdlen = 12;
  2782. emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
  2783. (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4);
  2784. (void) memcpy((void *)(gc->pc + 8), (void *)(&v), 4);
  2785. gc->pc += cmdlen;
  2786. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2787. }
  2788.  
  2789. #define X_GLrop_EvalCoord2fv 154
  2790. void __indirect_glEvalCoord2fv(const GLfloat * u)
  2791. {
  2792.     generic_8_byte( X_GLrop_EvalCoord2fv, u );
  2793. }
  2794.  
  2795. #define X_GLrop_EvalMesh1 155
  2796. void __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
  2797. {
  2798.     struct glx_context * const gc = __glXGetCurrentContext();
  2799.     const GLuint cmdlen = 16;
  2800. emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
  2801. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  2802. (void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4);
  2803. (void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4);
  2804. gc->pc += cmdlen;
  2805. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2806. }
  2807.  
  2808. #define X_GLrop_EvalPoint1 156
  2809. void __indirect_glEvalPoint1(GLint i)
  2810. {
  2811.     struct glx_context * const gc = __glXGetCurrentContext();
  2812.     const GLuint cmdlen = 8;
  2813. emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
  2814. (void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4);
  2815. gc->pc += cmdlen;
  2816. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2817. }
  2818.  
  2819. #define X_GLrop_EvalMesh2 157
  2820. void __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
  2821. {
  2822.     struct glx_context * const gc = __glXGetCurrentContext();
  2823.     const GLuint cmdlen = 24;
  2824. emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
  2825. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  2826. (void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4);
  2827. (void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4);
  2828. (void) memcpy((void *)(gc->pc + 16), (void *)(&j1), 4);
  2829. (void) memcpy((void *)(gc->pc + 20), (void *)(&j2), 4);
  2830. gc->pc += cmdlen;
  2831. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2832. }
  2833.  
  2834. #define X_GLrop_EvalPoint2 158
  2835. void __indirect_glEvalPoint2(GLint i, GLint j)
  2836. {
  2837.     struct glx_context * const gc = __glXGetCurrentContext();
  2838.     const GLuint cmdlen = 12;
  2839. emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
  2840. (void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4);
  2841. (void) memcpy((void *)(gc->pc + 8), (void *)(&j), 4);
  2842. gc->pc += cmdlen;
  2843. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2844. }
  2845.  
  2846. #define X_GLrop_AlphaFunc 159
  2847. void __indirect_glAlphaFunc(GLenum func, GLclampf ref)
  2848. {
  2849.     struct glx_context * const gc = __glXGetCurrentContext();
  2850.     const GLuint cmdlen = 12;
  2851. emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
  2852. (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
  2853. (void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4);
  2854. gc->pc += cmdlen;
  2855. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2856. }
  2857.  
  2858. #define X_GLrop_BlendFunc 160
  2859. void __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
  2860. {
  2861.     struct glx_context * const gc = __glXGetCurrentContext();
  2862.     const GLuint cmdlen = 12;
  2863. emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
  2864. (void) memcpy((void *)(gc->pc + 4), (void *)(&sfactor), 4);
  2865. (void) memcpy((void *)(gc->pc + 8), (void *)(&dfactor), 4);
  2866. gc->pc += cmdlen;
  2867. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2868. }
  2869.  
  2870. #define X_GLrop_LogicOp 161
  2871. void __indirect_glLogicOp(GLenum opcode)
  2872. {
  2873.     struct glx_context * const gc = __glXGetCurrentContext();
  2874.     const GLuint cmdlen = 8;
  2875. emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
  2876. (void) memcpy((void *)(gc->pc + 4), (void *)(&opcode), 4);
  2877. gc->pc += cmdlen;
  2878. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2879. }
  2880.  
  2881. #define X_GLrop_StencilFunc 162
  2882. void __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
  2883. {
  2884.     struct glx_context * const gc = __glXGetCurrentContext();
  2885.     const GLuint cmdlen = 16;
  2886. emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
  2887. (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
  2888. (void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4);
  2889. (void) memcpy((void *)(gc->pc + 12), (void *)(&mask), 4);
  2890. gc->pc += cmdlen;
  2891. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2892. }
  2893.  
  2894. #define X_GLrop_StencilOp 163
  2895. void __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
  2896. {
  2897.     struct glx_context * const gc = __glXGetCurrentContext();
  2898.     const GLuint cmdlen = 16;
  2899. emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
  2900. (void) memcpy((void *)(gc->pc + 4), (void *)(&fail), 4);
  2901. (void) memcpy((void *)(gc->pc + 8), (void *)(&zfail), 4);
  2902. (void) memcpy((void *)(gc->pc + 12), (void *)(&zpass), 4);
  2903. gc->pc += cmdlen;
  2904. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2905. }
  2906.  
  2907. #define X_GLrop_DepthFunc 164
  2908. void __indirect_glDepthFunc(GLenum func)
  2909. {
  2910.     struct glx_context * const gc = __glXGetCurrentContext();
  2911.     const GLuint cmdlen = 8;
  2912. emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
  2913. (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
  2914. gc->pc += cmdlen;
  2915. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2916. }
  2917.  
  2918. #define X_GLrop_PixelZoom 165
  2919. void __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
  2920. {
  2921.     struct glx_context * const gc = __glXGetCurrentContext();
  2922.     const GLuint cmdlen = 12;
  2923. emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
  2924. (void) memcpy((void *)(gc->pc + 4), (void *)(&xfactor), 4);
  2925. (void) memcpy((void *)(gc->pc + 8), (void *)(&yfactor), 4);
  2926. gc->pc += cmdlen;
  2927. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2928. }
  2929.  
  2930. #define X_GLrop_PixelTransferf 166
  2931. void __indirect_glPixelTransferf(GLenum pname, GLfloat param)
  2932. {
  2933.     struct glx_context * const gc = __glXGetCurrentContext();
  2934.     const GLuint cmdlen = 12;
  2935. emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
  2936. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  2937. (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
  2938. gc->pc += cmdlen;
  2939. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2940. }
  2941.  
  2942. #define X_GLrop_PixelTransferi 167
  2943. void __indirect_glPixelTransferi(GLenum pname, GLint param)
  2944. {
  2945.     struct glx_context * const gc = __glXGetCurrentContext();
  2946.     const GLuint cmdlen = 12;
  2947. emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
  2948. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  2949. (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
  2950. gc->pc += cmdlen;
  2951. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2952. }
  2953.  
  2954. #define X_GLrop_PixelMapfv 168
  2955. void __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
  2956. {
  2957.     struct glx_context * const gc = __glXGetCurrentContext();
  2958.     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
  2959.     if (mapsize < 0) {
  2960.         __glXSetError(gc, GL_INVALID_VALUE);
  2961.         return;
  2962.     }
  2963.     if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
  2964. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  2965.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  2966.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  2967.     }
  2968. emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
  2969. (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
  2970. (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
  2971. (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4));
  2972. gc->pc += cmdlen;
  2973. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  2974. }
  2975. else {
  2976. const GLint op = X_GLrop_PixelMapfv;
  2977. const GLuint cmdlenLarge = cmdlen + 4;
  2978. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  2979. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  2980. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  2981. (void) memcpy((void *)(pc + 8), (void *)(&map), 4);
  2982. (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
  2983.     __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
  2984. }
  2985.     }
  2986. }
  2987.  
  2988. #define X_GLrop_PixelMapuiv 169
  2989. void __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
  2990. {
  2991.     struct glx_context * const gc = __glXGetCurrentContext();
  2992.     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
  2993.     if (mapsize < 0) {
  2994.         __glXSetError(gc, GL_INVALID_VALUE);
  2995.         return;
  2996.     }
  2997.     if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
  2998. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  2999.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  3000.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3001.     }
  3002. emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
  3003. (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
  3004. (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
  3005. (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4));
  3006. gc->pc += cmdlen;
  3007. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3008. }
  3009. else {
  3010. const GLint op = X_GLrop_PixelMapuiv;
  3011. const GLuint cmdlenLarge = cmdlen + 4;
  3012. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  3013. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  3014. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  3015. (void) memcpy((void *)(pc + 8), (void *)(&map), 4);
  3016. (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
  3017.     __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
  3018. }
  3019.     }
  3020. }
  3021.  
  3022. #define X_GLrop_PixelMapusv 170
  3023. void __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
  3024. {
  3025.     struct glx_context * const gc = __glXGetCurrentContext();
  3026.     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
  3027.     if (mapsize < 0) {
  3028.         __glXSetError(gc, GL_INVALID_VALUE);
  3029.         return;
  3030.     }
  3031.     if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
  3032. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  3033.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  3034.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3035.     }
  3036. emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
  3037. (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
  3038. (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
  3039. (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 2));
  3040. gc->pc += cmdlen;
  3041. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3042. }
  3043. else {
  3044. const GLint op = X_GLrop_PixelMapusv;
  3045. const GLuint cmdlenLarge = cmdlen + 4;
  3046. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  3047. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  3048. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  3049. (void) memcpy((void *)(pc + 8), (void *)(&map), 4);
  3050. (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
  3051.     __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
  3052. }
  3053.     }
  3054. }
  3055.  
  3056. #define X_GLrop_ReadBuffer 171
  3057. void __indirect_glReadBuffer(GLenum mode)
  3058. {
  3059.     struct glx_context * const gc = __glXGetCurrentContext();
  3060.     const GLuint cmdlen = 8;
  3061. emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
  3062. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  3063. gc->pc += cmdlen;
  3064. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3065. }
  3066.  
  3067. #define X_GLrop_CopyPixels 172
  3068. void __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
  3069. {
  3070.     struct glx_context * const gc = __glXGetCurrentContext();
  3071.     const GLuint cmdlen = 24;
  3072. emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
  3073. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  3074. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  3075. (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
  3076. (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
  3077. (void) memcpy((void *)(gc->pc + 20), (void *)(&type), 4);
  3078. gc->pc += cmdlen;
  3079. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3080. }
  3081.  
  3082. #define X_GLsop_ReadPixels 111
  3083. void __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels)
  3084. {
  3085.     struct glx_context * const gc = __glXGetCurrentContext();
  3086.     const __GLXattribute * const state = gc->client_state_private;
  3087.     Display * const dpy = gc->currentDpy;
  3088. #ifndef USE_XCB
  3089.     const GLuint cmdlen = 28;
  3090. #endif
  3091.     if (__builtin_expect(dpy != NULL, 1)) {
  3092. #ifdef USE_XCB
  3093.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3094.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3095.         xcb_glx_read_pixels_reply_t *reply = xcb_glx_read_pixels_reply(c, xcb_glx_read_pixels(c, gc->currentContextTag, x, y, width, height, format, type, state->storePack.swapEndian, 0), NULL);
  3096.         __glEmptyImage(gc, 3, width, height, 1, format, type, xcb_glx_read_pixels_data(reply), pixels);
  3097.         free(reply);
  3098. #else
  3099.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
  3100. (void) memcpy((void *)(pc + 0), (void *)(&x), 4);
  3101. (void) memcpy((void *)(pc + 4), (void *)(&y), 4);
  3102. (void) memcpy((void *)(pc + 8), (void *)(&width), 4);
  3103. (void) memcpy((void *)(pc + 12), (void *)(&height), 4);
  3104. (void) memcpy((void *)(pc + 16), (void *)(&format), 4);
  3105. (void) memcpy((void *)(pc + 20), (void *)(&type), 4);
  3106.         *(int32_t *)(pc + 24) = 0;
  3107.         * (int8_t *)(pc + 24) = state->storePack.swapEndian;
  3108.         __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type, pixels, GL_FALSE);
  3109.         UnlockDisplay(dpy); SyncHandle();
  3110. #endif /* USE_XCB */
  3111.     }
  3112.     return;
  3113. }
  3114.  
  3115. #define X_GLrop_DrawPixels 173
  3116. void __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
  3117. {
  3118.     struct glx_context * const gc = __glXGetCurrentContext();
  3119.     const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, 0) : 0;
  3120.     const GLuint cmdlen = 40 + __GLX_PAD(compsize);
  3121.     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
  3122. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  3123.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  3124.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3125.     }
  3126. emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
  3127. (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
  3128. (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
  3129. (void) memcpy((void *)(gc->pc + 32), (void *)(&format), 4);
  3130. (void) memcpy((void *)(gc->pc + 36), (void *)(&type), 4);
  3131. if (compsize > 0) {
  3132.     (*gc->fillImage)(gc, 2, width, height, 1, format, type, pixels, gc->pc + 40, gc->pc + 4);
  3133. } else {
  3134.     (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
  3135. }
  3136. gc->pc += cmdlen;
  3137. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3138. }
  3139. else {
  3140. const GLint op = X_GLrop_DrawPixels;
  3141. const GLuint cmdlenLarge = cmdlen + 4;
  3142. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  3143. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  3144. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  3145. (void) memcpy((void *)(pc + 28), (void *)(&width), 4);
  3146. (void) memcpy((void *)(pc + 32), (void *)(&height), 4);
  3147. (void) memcpy((void *)(pc + 36), (void *)(&format), 4);
  3148. (void) memcpy((void *)(pc + 40), (void *)(&type), 4);
  3149. __glXSendLargeImage(gc, compsize, 2, width, height, 1, format, type, pixels, pc + 44, pc + 8);
  3150. }
  3151.     }
  3152. }
  3153.  
  3154. #define X_GLsop_GetClipPlane 113
  3155. void __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
  3156. {
  3157.     struct glx_context * const gc = __glXGetCurrentContext();
  3158.     Display * const dpy = gc->currentDpy;
  3159. #ifndef USE_XCB
  3160.     const GLuint cmdlen = 4;
  3161. #endif
  3162.     if (__builtin_expect(dpy != NULL, 1)) {
  3163. #ifdef USE_XCB
  3164.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3165.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3166.         xcb_glx_get_clip_plane_reply_t *reply = xcb_glx_get_clip_plane_reply(c, xcb_glx_get_clip_plane(c, gc->currentContextTag, plane), NULL);
  3167.         (void)memcpy(equation, xcb_glx_get_clip_plane_data(reply), xcb_glx_get_clip_plane_data_length(reply) * sizeof(GLdouble));
  3168.         free(reply);
  3169. #else
  3170.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
  3171. (void) memcpy((void *)(pc + 0), (void *)(&plane), 4);
  3172.         (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
  3173.         UnlockDisplay(dpy); SyncHandle();
  3174. #endif /* USE_XCB */
  3175.     }
  3176.     return;
  3177. }
  3178.  
  3179. #define X_GLsop_GetLightfv 118
  3180. void __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
  3181. {
  3182.     struct glx_context * const gc = __glXGetCurrentContext();
  3183.     Display * const dpy = gc->currentDpy;
  3184. #ifndef USE_XCB
  3185.     const GLuint cmdlen = 8;
  3186. #endif
  3187.     if (__builtin_expect(dpy != NULL, 1)) {
  3188. #ifdef USE_XCB
  3189.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3190.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3191.         xcb_glx_get_lightfv_reply_t *reply = xcb_glx_get_lightfv_reply(c, xcb_glx_get_lightfv(c, gc->currentContextTag, light, pname), NULL);
  3192.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3193.         /* of elements, not the length of the data part. A single element is embedded. */
  3194.         if (xcb_glx_get_lightfv_data_length(reply) == 1)
  3195.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3196.         else
  3197.             (void)memcpy(params, xcb_glx_get_lightfv_data(reply), xcb_glx_get_lightfv_data_length(reply) * sizeof(GLfloat));
  3198.         free(reply);
  3199. #else
  3200.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
  3201. (void) memcpy((void *)(pc + 0), (void *)(&light), 4);
  3202. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3203.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3204.         UnlockDisplay(dpy); SyncHandle();
  3205. #endif /* USE_XCB */
  3206.     }
  3207.     return;
  3208. }
  3209.  
  3210. #define X_GLsop_GetLightiv 119
  3211. void __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
  3212. {
  3213.     struct glx_context * const gc = __glXGetCurrentContext();
  3214.     Display * const dpy = gc->currentDpy;
  3215. #ifndef USE_XCB
  3216.     const GLuint cmdlen = 8;
  3217. #endif
  3218.     if (__builtin_expect(dpy != NULL, 1)) {
  3219. #ifdef USE_XCB
  3220.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3221.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3222.         xcb_glx_get_lightiv_reply_t *reply = xcb_glx_get_lightiv_reply(c, xcb_glx_get_lightiv(c, gc->currentContextTag, light, pname), NULL);
  3223.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3224.         /* of elements, not the length of the data part. A single element is embedded. */
  3225.         if (xcb_glx_get_lightiv_data_length(reply) == 1)
  3226.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3227.         else
  3228.             (void)memcpy(params, xcb_glx_get_lightiv_data(reply), xcb_glx_get_lightiv_data_length(reply) * sizeof(GLint));
  3229.         free(reply);
  3230. #else
  3231.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
  3232. (void) memcpy((void *)(pc + 0), (void *)(&light), 4);
  3233. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3234.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3235.         UnlockDisplay(dpy); SyncHandle();
  3236. #endif /* USE_XCB */
  3237.     }
  3238.     return;
  3239. }
  3240.  
  3241. #define X_GLsop_GetMapdv 120
  3242. void __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
  3243. {
  3244.     struct glx_context * const gc = __glXGetCurrentContext();
  3245.     Display * const dpy = gc->currentDpy;
  3246. #ifndef USE_XCB
  3247.     const GLuint cmdlen = 8;
  3248. #endif
  3249.     if (__builtin_expect(dpy != NULL, 1)) {
  3250. #ifdef USE_XCB
  3251.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3252.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3253.         xcb_glx_get_mapdv_reply_t *reply = xcb_glx_get_mapdv_reply(c, xcb_glx_get_mapdv(c, gc->currentContextTag, target, query), NULL);
  3254.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3255.         /* of elements, not the length of the data part. A single element is embedded. */
  3256.         if (xcb_glx_get_mapdv_data_length(reply) == 1)
  3257.             (void)memcpy(v, &reply->datum, sizeof(reply->datum));
  3258.         else
  3259.             (void)memcpy(v, xcb_glx_get_mapdv_data(reply), xcb_glx_get_mapdv_data_length(reply) * sizeof(GLdouble));
  3260.         free(reply);
  3261. #else
  3262.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
  3263. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3264. (void) memcpy((void *)(pc + 4), (void *)(&query), 4);
  3265.         (void) __glXReadReply(dpy, 8, v, GL_FALSE);
  3266.         UnlockDisplay(dpy); SyncHandle();
  3267. #endif /* USE_XCB */
  3268.     }
  3269.     return;
  3270. }
  3271.  
  3272. #define X_GLsop_GetMapfv 121
  3273. void __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
  3274. {
  3275.     struct glx_context * const gc = __glXGetCurrentContext();
  3276.     Display * const dpy = gc->currentDpy;
  3277. #ifndef USE_XCB
  3278.     const GLuint cmdlen = 8;
  3279. #endif
  3280.     if (__builtin_expect(dpy != NULL, 1)) {
  3281. #ifdef USE_XCB
  3282.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3283.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3284.         xcb_glx_get_mapfv_reply_t *reply = xcb_glx_get_mapfv_reply(c, xcb_glx_get_mapfv(c, gc->currentContextTag, target, query), NULL);
  3285.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3286.         /* of elements, not the length of the data part. A single element is embedded. */
  3287.         if (xcb_glx_get_mapfv_data_length(reply) == 1)
  3288.             (void)memcpy(v, &reply->datum, sizeof(reply->datum));
  3289.         else
  3290.             (void)memcpy(v, xcb_glx_get_mapfv_data(reply), xcb_glx_get_mapfv_data_length(reply) * sizeof(GLfloat));
  3291.         free(reply);
  3292. #else
  3293.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
  3294. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3295. (void) memcpy((void *)(pc + 4), (void *)(&query), 4);
  3296.         (void) __glXReadReply(dpy, 4, v, GL_FALSE);
  3297.         UnlockDisplay(dpy); SyncHandle();
  3298. #endif /* USE_XCB */
  3299.     }
  3300.     return;
  3301. }
  3302.  
  3303. #define X_GLsop_GetMapiv 122
  3304. void __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
  3305. {
  3306.     struct glx_context * const gc = __glXGetCurrentContext();
  3307.     Display * const dpy = gc->currentDpy;
  3308. #ifndef USE_XCB
  3309.     const GLuint cmdlen = 8;
  3310. #endif
  3311.     if (__builtin_expect(dpy != NULL, 1)) {
  3312. #ifdef USE_XCB
  3313.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3314.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3315.         xcb_glx_get_mapiv_reply_t *reply = xcb_glx_get_mapiv_reply(c, xcb_glx_get_mapiv(c, gc->currentContextTag, target, query), NULL);
  3316.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3317.         /* of elements, not the length of the data part. A single element is embedded. */
  3318.         if (xcb_glx_get_mapiv_data_length(reply) == 1)
  3319.             (void)memcpy(v, &reply->datum, sizeof(reply->datum));
  3320.         else
  3321.             (void)memcpy(v, xcb_glx_get_mapiv_data(reply), xcb_glx_get_mapiv_data_length(reply) * sizeof(GLint));
  3322.         free(reply);
  3323. #else
  3324.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
  3325. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3326. (void) memcpy((void *)(pc + 4), (void *)(&query), 4);
  3327.         (void) __glXReadReply(dpy, 4, v, GL_FALSE);
  3328.         UnlockDisplay(dpy); SyncHandle();
  3329. #endif /* USE_XCB */
  3330.     }
  3331.     return;
  3332. }
  3333.  
  3334. #define X_GLsop_GetMaterialfv 123
  3335. void __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
  3336. {
  3337.     struct glx_context * const gc = __glXGetCurrentContext();
  3338.     Display * const dpy = gc->currentDpy;
  3339. #ifndef USE_XCB
  3340.     const GLuint cmdlen = 8;
  3341. #endif
  3342.     if (__builtin_expect(dpy != NULL, 1)) {
  3343. #ifdef USE_XCB
  3344.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3345.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3346.         xcb_glx_get_materialfv_reply_t *reply = xcb_glx_get_materialfv_reply(c, xcb_glx_get_materialfv(c, gc->currentContextTag, face, pname), NULL);
  3347.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3348.         /* of elements, not the length of the data part. A single element is embedded. */
  3349.         if (xcb_glx_get_materialfv_data_length(reply) == 1)
  3350.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3351.         else
  3352.             (void)memcpy(params, xcb_glx_get_materialfv_data(reply), xcb_glx_get_materialfv_data_length(reply) * sizeof(GLfloat));
  3353.         free(reply);
  3354. #else
  3355.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
  3356. (void) memcpy((void *)(pc + 0), (void *)(&face), 4);
  3357. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3358.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3359.         UnlockDisplay(dpy); SyncHandle();
  3360. #endif /* USE_XCB */
  3361.     }
  3362.     return;
  3363. }
  3364.  
  3365. #define X_GLsop_GetMaterialiv 124
  3366. void __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
  3367. {
  3368.     struct glx_context * const gc = __glXGetCurrentContext();
  3369.     Display * const dpy = gc->currentDpy;
  3370. #ifndef USE_XCB
  3371.     const GLuint cmdlen = 8;
  3372. #endif
  3373.     if (__builtin_expect(dpy != NULL, 1)) {
  3374. #ifdef USE_XCB
  3375.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3376.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3377.         xcb_glx_get_materialiv_reply_t *reply = xcb_glx_get_materialiv_reply(c, xcb_glx_get_materialiv(c, gc->currentContextTag, face, pname), NULL);
  3378.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3379.         /* of elements, not the length of the data part. A single element is embedded. */
  3380.         if (xcb_glx_get_materialiv_data_length(reply) == 1)
  3381.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3382.         else
  3383.             (void)memcpy(params, xcb_glx_get_materialiv_data(reply), xcb_glx_get_materialiv_data_length(reply) * sizeof(GLint));
  3384.         free(reply);
  3385. #else
  3386.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
  3387. (void) memcpy((void *)(pc + 0), (void *)(&face), 4);
  3388. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3389.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3390.         UnlockDisplay(dpy); SyncHandle();
  3391. #endif /* USE_XCB */
  3392.     }
  3393.     return;
  3394. }
  3395.  
  3396. #define X_GLsop_GetPixelMapfv 125
  3397. void __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
  3398. {
  3399.     struct glx_context * const gc = __glXGetCurrentContext();
  3400.     Display * const dpy = gc->currentDpy;
  3401. #ifndef USE_XCB
  3402.     const GLuint cmdlen = 4;
  3403. #endif
  3404.     if (__builtin_expect(dpy != NULL, 1)) {
  3405. #ifdef USE_XCB
  3406.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3407.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3408.         xcb_glx_get_pixel_mapfv_reply_t *reply = xcb_glx_get_pixel_mapfv_reply(c, xcb_glx_get_pixel_mapfv(c, gc->currentContextTag, map), NULL);
  3409.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3410.         /* of elements, not the length of the data part. A single element is embedded. */
  3411.         if (xcb_glx_get_pixel_mapfv_data_length(reply) == 1)
  3412.             (void)memcpy(values, &reply->datum, sizeof(reply->datum));
  3413.         else
  3414.             (void)memcpy(values, xcb_glx_get_pixel_mapfv_data(reply), xcb_glx_get_pixel_mapfv_data_length(reply) * sizeof(GLfloat));
  3415.         free(reply);
  3416. #else
  3417.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
  3418. (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
  3419.         (void) __glXReadReply(dpy, 4, values, GL_FALSE);
  3420.         UnlockDisplay(dpy); SyncHandle();
  3421. #endif /* USE_XCB */
  3422.     }
  3423.     return;
  3424. }
  3425.  
  3426. #define X_GLsop_GetPixelMapuiv 126
  3427. void __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
  3428. {
  3429.     struct glx_context * const gc = __glXGetCurrentContext();
  3430.     Display * const dpy = gc->currentDpy;
  3431. #ifndef USE_XCB
  3432.     const GLuint cmdlen = 4;
  3433. #endif
  3434.     if (__builtin_expect(dpy != NULL, 1)) {
  3435. #ifdef USE_XCB
  3436.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3437.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3438.         xcb_glx_get_pixel_mapuiv_reply_t *reply = xcb_glx_get_pixel_mapuiv_reply(c, xcb_glx_get_pixel_mapuiv(c, gc->currentContextTag, map), NULL);
  3439.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3440.         /* of elements, not the length of the data part. A single element is embedded. */
  3441.         if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 1)
  3442.             (void)memcpy(values, &reply->datum, sizeof(reply->datum));
  3443.         else
  3444.             (void)memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply), xcb_glx_get_pixel_mapuiv_data_length(reply) * sizeof(GLuint));
  3445.         free(reply);
  3446. #else
  3447.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
  3448. (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
  3449.         (void) __glXReadReply(dpy, 4, values, GL_FALSE);
  3450.         UnlockDisplay(dpy); SyncHandle();
  3451. #endif /* USE_XCB */
  3452.     }
  3453.     return;
  3454. }
  3455.  
  3456. #define X_GLsop_GetPixelMapusv 127
  3457. void __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
  3458. {
  3459.     struct glx_context * const gc = __glXGetCurrentContext();
  3460.     Display * const dpy = gc->currentDpy;
  3461. #ifndef USE_XCB
  3462.     const GLuint cmdlen = 4;
  3463. #endif
  3464.     if (__builtin_expect(dpy != NULL, 1)) {
  3465. #ifdef USE_XCB
  3466.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3467.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3468.         xcb_glx_get_pixel_mapusv_reply_t *reply = xcb_glx_get_pixel_mapusv_reply(c, xcb_glx_get_pixel_mapusv(c, gc->currentContextTag, map), NULL);
  3469.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3470.         /* of elements, not the length of the data part. A single element is embedded. */
  3471.         if (xcb_glx_get_pixel_mapusv_data_length(reply) == 1)
  3472.             (void)memcpy(values, &reply->datum, sizeof(reply->datum));
  3473.         else
  3474.             (void)memcpy(values, xcb_glx_get_pixel_mapusv_data(reply), xcb_glx_get_pixel_mapusv_data_length(reply) * sizeof(GLushort));
  3475.         free(reply);
  3476. #else
  3477.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
  3478. (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
  3479.         (void) __glXReadReply(dpy, 2, values, GL_FALSE);
  3480.         UnlockDisplay(dpy); SyncHandle();
  3481. #endif /* USE_XCB */
  3482.     }
  3483.     return;
  3484. }
  3485.  
  3486. #define X_GLsop_GetPolygonStipple 128
  3487. void __indirect_glGetPolygonStipple(GLubyte * mask)
  3488. {
  3489.     struct glx_context * const gc = __glXGetCurrentContext();
  3490.     Display * const dpy = gc->currentDpy;
  3491. #ifndef USE_XCB
  3492.     const GLuint cmdlen = 4;
  3493. #endif
  3494.     if (__builtin_expect(dpy != NULL, 1)) {
  3495. #ifdef USE_XCB
  3496.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3497.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3498.         xcb_glx_get_polygon_stipple_reply_t *reply = xcb_glx_get_polygon_stipple_reply(c, xcb_glx_get_polygon_stipple(c, gc->currentContextTag, 0), NULL);
  3499.         __glEmptyImage(gc, 3, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, xcb_glx_get_polygon_stipple_data(reply), mask);
  3500.         free(reply);
  3501. #else
  3502.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
  3503.         *(int32_t *)(pc + 0) = 0;
  3504.         __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, GL_FALSE);
  3505.         UnlockDisplay(dpy); SyncHandle();
  3506. #endif /* USE_XCB */
  3507.     }
  3508.     return;
  3509. }
  3510.  
  3511. #define X_GLsop_GetTexEnvfv 130
  3512. void __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
  3513. {
  3514.     struct glx_context * const gc = __glXGetCurrentContext();
  3515.     Display * const dpy = gc->currentDpy;
  3516. #ifndef USE_XCB
  3517.     const GLuint cmdlen = 8;
  3518. #endif
  3519.     if (__builtin_expect(dpy != NULL, 1)) {
  3520. #ifdef USE_XCB
  3521.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3522.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3523.         xcb_glx_get_tex_envfv_reply_t *reply = xcb_glx_get_tex_envfv_reply(c, xcb_glx_get_tex_envfv(c, gc->currentContextTag, target, pname), NULL);
  3524.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3525.         /* of elements, not the length of the data part. A single element is embedded. */
  3526.         if (xcb_glx_get_tex_envfv_data_length(reply) == 1)
  3527.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3528.         else
  3529.             (void)memcpy(params, xcb_glx_get_tex_envfv_data(reply), xcb_glx_get_tex_envfv_data_length(reply) * sizeof(GLfloat));
  3530.         free(reply);
  3531. #else
  3532.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
  3533. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3534. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3535.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3536.         UnlockDisplay(dpy); SyncHandle();
  3537. #endif /* USE_XCB */
  3538.     }
  3539.     return;
  3540. }
  3541.  
  3542. #define X_GLsop_GetTexEnviv 131
  3543. void __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
  3544. {
  3545.     struct glx_context * const gc = __glXGetCurrentContext();
  3546.     Display * const dpy = gc->currentDpy;
  3547. #ifndef USE_XCB
  3548.     const GLuint cmdlen = 8;
  3549. #endif
  3550.     if (__builtin_expect(dpy != NULL, 1)) {
  3551. #ifdef USE_XCB
  3552.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3553.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3554.         xcb_glx_get_tex_enviv_reply_t *reply = xcb_glx_get_tex_enviv_reply(c, xcb_glx_get_tex_enviv(c, gc->currentContextTag, target, pname), NULL);
  3555.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3556.         /* of elements, not the length of the data part. A single element is embedded. */
  3557.         if (xcb_glx_get_tex_enviv_data_length(reply) == 1)
  3558.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3559.         else
  3560.             (void)memcpy(params, xcb_glx_get_tex_enviv_data(reply), xcb_glx_get_tex_enviv_data_length(reply) * sizeof(GLint));
  3561.         free(reply);
  3562. #else
  3563.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
  3564. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3565. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3566.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3567.         UnlockDisplay(dpy); SyncHandle();
  3568. #endif /* USE_XCB */
  3569.     }
  3570.     return;
  3571. }
  3572.  
  3573. #define X_GLsop_GetTexGendv 132
  3574. void __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
  3575. {
  3576.     struct glx_context * const gc = __glXGetCurrentContext();
  3577.     Display * const dpy = gc->currentDpy;
  3578. #ifndef USE_XCB
  3579.     const GLuint cmdlen = 8;
  3580. #endif
  3581.     if (__builtin_expect(dpy != NULL, 1)) {
  3582. #ifdef USE_XCB
  3583.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3584.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3585.         xcb_glx_get_tex_gendv_reply_t *reply = xcb_glx_get_tex_gendv_reply(c, xcb_glx_get_tex_gendv(c, gc->currentContextTag, coord, pname), NULL);
  3586.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3587.         /* of elements, not the length of the data part. A single element is embedded. */
  3588.         if (xcb_glx_get_tex_gendv_data_length(reply) == 1)
  3589.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3590.         else
  3591.             (void)memcpy(params, xcb_glx_get_tex_gendv_data(reply), xcb_glx_get_tex_gendv_data_length(reply) * sizeof(GLdouble));
  3592.         free(reply);
  3593. #else
  3594.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
  3595. (void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
  3596. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3597.         (void) __glXReadReply(dpy, 8, params, GL_FALSE);
  3598.         UnlockDisplay(dpy); SyncHandle();
  3599. #endif /* USE_XCB */
  3600.     }
  3601.     return;
  3602. }
  3603.  
  3604. #define X_GLsop_GetTexGenfv 133
  3605. void __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
  3606. {
  3607.     struct glx_context * const gc = __glXGetCurrentContext();
  3608.     Display * const dpy = gc->currentDpy;
  3609. #ifndef USE_XCB
  3610.     const GLuint cmdlen = 8;
  3611. #endif
  3612.     if (__builtin_expect(dpy != NULL, 1)) {
  3613. #ifdef USE_XCB
  3614.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3615.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3616.         xcb_glx_get_tex_genfv_reply_t *reply = xcb_glx_get_tex_genfv_reply(c, xcb_glx_get_tex_genfv(c, gc->currentContextTag, coord, pname), NULL);
  3617.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3618.         /* of elements, not the length of the data part. A single element is embedded. */
  3619.         if (xcb_glx_get_tex_genfv_data_length(reply) == 1)
  3620.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3621.         else
  3622.             (void)memcpy(params, xcb_glx_get_tex_genfv_data(reply), xcb_glx_get_tex_genfv_data_length(reply) * sizeof(GLfloat));
  3623.         free(reply);
  3624. #else
  3625.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
  3626. (void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
  3627. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3628.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3629.         UnlockDisplay(dpy); SyncHandle();
  3630. #endif /* USE_XCB */
  3631.     }
  3632.     return;
  3633. }
  3634.  
  3635. #define X_GLsop_GetTexGeniv 134
  3636. void __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
  3637. {
  3638.     struct glx_context * const gc = __glXGetCurrentContext();
  3639.     Display * const dpy = gc->currentDpy;
  3640. #ifndef USE_XCB
  3641.     const GLuint cmdlen = 8;
  3642. #endif
  3643.     if (__builtin_expect(dpy != NULL, 1)) {
  3644. #ifdef USE_XCB
  3645.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3646.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3647.         xcb_glx_get_tex_geniv_reply_t *reply = xcb_glx_get_tex_geniv_reply(c, xcb_glx_get_tex_geniv(c, gc->currentContextTag, coord, pname), NULL);
  3648.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3649.         /* of elements, not the length of the data part. A single element is embedded. */
  3650.         if (xcb_glx_get_tex_geniv_data_length(reply) == 1)
  3651.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3652.         else
  3653.             (void)memcpy(params, xcb_glx_get_tex_geniv_data(reply), xcb_glx_get_tex_geniv_data_length(reply) * sizeof(GLint));
  3654.         free(reply);
  3655. #else
  3656.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
  3657. (void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
  3658. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3659.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3660.         UnlockDisplay(dpy); SyncHandle();
  3661. #endif /* USE_XCB */
  3662.     }
  3663.     return;
  3664. }
  3665.  
  3666. #define X_GLsop_GetTexImage 135
  3667. void __indirect_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels)
  3668. {
  3669.     struct glx_context * const gc = __glXGetCurrentContext();
  3670.     const __GLXattribute * const state = gc->client_state_private;
  3671.     Display * const dpy = gc->currentDpy;
  3672. #ifndef USE_XCB
  3673.     const GLuint cmdlen = 20;
  3674. #endif
  3675.     if (__builtin_expect(dpy != NULL, 1)) {
  3676. #ifdef USE_XCB
  3677.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3678.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3679.         xcb_glx_get_tex_image_reply_t *reply = xcb_glx_get_tex_image_reply(c, xcb_glx_get_tex_image(c, gc->currentContextTag, target, level, format, type, state->storePack.swapEndian), NULL);
  3680.         if (reply->height == 0) { reply->height = 1; }
  3681.         if (reply->depth == 0) { reply->depth = 1; }
  3682.         __glEmptyImage(gc, 3, reply->width, reply->height, reply->depth, format, type, xcb_glx_get_tex_image_data(reply), pixels);
  3683.         free(reply);
  3684. #else
  3685.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
  3686. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3687. (void) memcpy((void *)(pc + 4), (void *)(&level), 4);
  3688. (void) memcpy((void *)(pc + 8), (void *)(&format), 4);
  3689. (void) memcpy((void *)(pc + 12), (void *)(&type), 4);
  3690.         *(int32_t *)(pc + 16) = 0;
  3691.         * (int8_t *)(pc + 16) = state->storePack.swapEndian;
  3692.         __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels, GL_TRUE);
  3693.         UnlockDisplay(dpy); SyncHandle();
  3694. #endif /* USE_XCB */
  3695.     }
  3696.     return;
  3697. }
  3698.  
  3699. #define X_GLsop_GetTexParameterfv 136
  3700. void __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
  3701. {
  3702.     struct glx_context * const gc = __glXGetCurrentContext();
  3703.     Display * const dpy = gc->currentDpy;
  3704. #ifndef USE_XCB
  3705.     const GLuint cmdlen = 8;
  3706. #endif
  3707.     if (__builtin_expect(dpy != NULL, 1)) {
  3708. #ifdef USE_XCB
  3709.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3710.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3711.         xcb_glx_get_tex_parameterfv_reply_t *reply = xcb_glx_get_tex_parameterfv_reply(c, xcb_glx_get_tex_parameterfv(c, gc->currentContextTag, target, pname), NULL);
  3712.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3713.         /* of elements, not the length of the data part. A single element is embedded. */
  3714.         if (xcb_glx_get_tex_parameterfv_data_length(reply) == 1)
  3715.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3716.         else
  3717.             (void)memcpy(params, xcb_glx_get_tex_parameterfv_data(reply), xcb_glx_get_tex_parameterfv_data_length(reply) * sizeof(GLfloat));
  3718.         free(reply);
  3719. #else
  3720.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
  3721. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3722. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3723.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3724.         UnlockDisplay(dpy); SyncHandle();
  3725. #endif /* USE_XCB */
  3726.     }
  3727.     return;
  3728. }
  3729.  
  3730. #define X_GLsop_GetTexParameteriv 137
  3731. void __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
  3732. {
  3733.     struct glx_context * const gc = __glXGetCurrentContext();
  3734.     Display * const dpy = gc->currentDpy;
  3735. #ifndef USE_XCB
  3736.     const GLuint cmdlen = 8;
  3737. #endif
  3738.     if (__builtin_expect(dpy != NULL, 1)) {
  3739. #ifdef USE_XCB
  3740.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3741.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3742.         xcb_glx_get_tex_parameteriv_reply_t *reply = xcb_glx_get_tex_parameteriv_reply(c, xcb_glx_get_tex_parameteriv(c, gc->currentContextTag, target, pname), NULL);
  3743.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3744.         /* of elements, not the length of the data part. A single element is embedded. */
  3745.         if (xcb_glx_get_tex_parameteriv_data_length(reply) == 1)
  3746.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3747.         else
  3748.             (void)memcpy(params, xcb_glx_get_tex_parameteriv_data(reply), xcb_glx_get_tex_parameteriv_data_length(reply) * sizeof(GLint));
  3749.         free(reply);
  3750. #else
  3751.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
  3752. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3753. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  3754.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3755.         UnlockDisplay(dpy); SyncHandle();
  3756. #endif /* USE_XCB */
  3757.     }
  3758.     return;
  3759. }
  3760.  
  3761. #define X_GLsop_GetTexLevelParameterfv 138
  3762. void __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params)
  3763. {
  3764.     struct glx_context * const gc = __glXGetCurrentContext();
  3765.     Display * const dpy = gc->currentDpy;
  3766. #ifndef USE_XCB
  3767.     const GLuint cmdlen = 12;
  3768. #endif
  3769.     if (__builtin_expect(dpy != NULL, 1)) {
  3770. #ifdef USE_XCB
  3771.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3772.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3773.         xcb_glx_get_tex_level_parameterfv_reply_t *reply = xcb_glx_get_tex_level_parameterfv_reply(c, xcb_glx_get_tex_level_parameterfv(c, gc->currentContextTag, target, level, pname), NULL);
  3774.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3775.         /* of elements, not the length of the data part. A single element is embedded. */
  3776.         if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 1)
  3777.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3778.         else
  3779.             (void)memcpy(params, xcb_glx_get_tex_level_parameterfv_data(reply), xcb_glx_get_tex_level_parameterfv_data_length(reply) * sizeof(GLfloat));
  3780.         free(reply);
  3781. #else
  3782.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv, cmdlen);
  3783. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3784. (void) memcpy((void *)(pc + 4), (void *)(&level), 4);
  3785. (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
  3786.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3787.         UnlockDisplay(dpy); SyncHandle();
  3788. #endif /* USE_XCB */
  3789.     }
  3790.     return;
  3791. }
  3792.  
  3793. #define X_GLsop_GetTexLevelParameteriv 139
  3794. void __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params)
  3795. {
  3796.     struct glx_context * const gc = __glXGetCurrentContext();
  3797.     Display * const dpy = gc->currentDpy;
  3798. #ifndef USE_XCB
  3799.     const GLuint cmdlen = 12;
  3800. #endif
  3801.     if (__builtin_expect(dpy != NULL, 1)) {
  3802. #ifdef USE_XCB
  3803.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3804.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3805.         xcb_glx_get_tex_level_parameteriv_reply_t *reply = xcb_glx_get_tex_level_parameteriv_reply(c, xcb_glx_get_tex_level_parameteriv(c, gc->currentContextTag, target, level, pname), NULL);
  3806.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  3807.         /* of elements, not the length of the data part. A single element is embedded. */
  3808.         if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 1)
  3809.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  3810.         else
  3811.             (void)memcpy(params, xcb_glx_get_tex_level_parameteriv_data(reply), xcb_glx_get_tex_level_parameteriv_data_length(reply) * sizeof(GLint));
  3812.         free(reply);
  3813. #else
  3814.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv, cmdlen);
  3815. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  3816. (void) memcpy((void *)(pc + 4), (void *)(&level), 4);
  3817. (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
  3818.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  3819.         UnlockDisplay(dpy); SyncHandle();
  3820. #endif /* USE_XCB */
  3821.     }
  3822.     return;
  3823. }
  3824.  
  3825. #define X_GLsop_IsList 141
  3826. GLboolean __indirect_glIsList(GLuint list)
  3827. {
  3828.     struct glx_context * const gc = __glXGetCurrentContext();
  3829.     Display * const dpy = gc->currentDpy;
  3830.     GLboolean retval = (GLboolean) 0;
  3831. #ifndef USE_XCB
  3832.     const GLuint cmdlen = 4;
  3833. #endif
  3834.     if (__builtin_expect(dpy != NULL, 1)) {
  3835. #ifdef USE_XCB
  3836.         xcb_connection_t *c = XGetXCBConnection(dpy);
  3837.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  3838.         xcb_glx_is_list_reply_t *reply = xcb_glx_is_list_reply(c, xcb_glx_is_list(c, gc->currentContextTag, list), NULL);
  3839.         retval = reply->ret_val;
  3840.         free(reply);
  3841. #else
  3842.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
  3843. (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
  3844.         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
  3845.         UnlockDisplay(dpy); SyncHandle();
  3846. #endif /* USE_XCB */
  3847.     }
  3848.     return retval;
  3849. }
  3850.  
  3851. #define X_GLrop_DepthRange 174
  3852. void __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
  3853. {
  3854.     struct glx_context * const gc = __glXGetCurrentContext();
  3855.     const GLuint cmdlen = 20;
  3856. emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
  3857. (void) memcpy((void *)(gc->pc + 4), (void *)(&zNear), 8);
  3858. (void) memcpy((void *)(gc->pc + 12), (void *)(&zFar), 8);
  3859. gc->pc += cmdlen;
  3860. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3861. }
  3862.  
  3863. #define X_GLrop_Frustum 175
  3864. void __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
  3865. {
  3866.     struct glx_context * const gc = __glXGetCurrentContext();
  3867.     const GLuint cmdlen = 52;
  3868. emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
  3869. (void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8);
  3870. (void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8);
  3871. (void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8);
  3872. (void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8);
  3873. (void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8);
  3874. (void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8);
  3875. gc->pc += cmdlen;
  3876. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3877. }
  3878.  
  3879. #define X_GLrop_LoadIdentity 176
  3880. void __indirect_glLoadIdentity(void)
  3881. {
  3882.     struct glx_context * const gc = __glXGetCurrentContext();
  3883.     const GLuint cmdlen = 4;
  3884. emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
  3885. gc->pc += cmdlen;
  3886. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3887. }
  3888.  
  3889. #define X_GLrop_LoadMatrixf 177
  3890. void __indirect_glLoadMatrixf(const GLfloat * m)
  3891. {
  3892.     struct glx_context * const gc = __glXGetCurrentContext();
  3893.     const GLuint cmdlen = 68;
  3894. emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
  3895. (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
  3896. gc->pc += cmdlen;
  3897. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3898. }
  3899.  
  3900. #define X_GLrop_LoadMatrixd 178
  3901. void __indirect_glLoadMatrixd(const GLdouble * m)
  3902. {
  3903.     struct glx_context * const gc = __glXGetCurrentContext();
  3904.     const GLuint cmdlen = 132;
  3905. emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
  3906. (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
  3907. gc->pc += cmdlen;
  3908. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3909. }
  3910.  
  3911. #define X_GLrop_MatrixMode 179
  3912. void __indirect_glMatrixMode(GLenum mode)
  3913. {
  3914.     struct glx_context * const gc = __glXGetCurrentContext();
  3915.     const GLuint cmdlen = 8;
  3916. emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
  3917. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  3918. gc->pc += cmdlen;
  3919. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3920. }
  3921.  
  3922. #define X_GLrop_MultMatrixf 180
  3923. void __indirect_glMultMatrixf(const GLfloat * m)
  3924. {
  3925.     struct glx_context * const gc = __glXGetCurrentContext();
  3926.     const GLuint cmdlen = 68;
  3927. emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
  3928. (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
  3929. gc->pc += cmdlen;
  3930. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3931. }
  3932.  
  3933. #define X_GLrop_MultMatrixd 181
  3934. void __indirect_glMultMatrixd(const GLdouble * m)
  3935. {
  3936.     struct glx_context * const gc = __glXGetCurrentContext();
  3937.     const GLuint cmdlen = 132;
  3938. emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
  3939. (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
  3940. gc->pc += cmdlen;
  3941. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3942. }
  3943.  
  3944. #define X_GLrop_Ortho 182
  3945. void __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
  3946. {
  3947.     struct glx_context * const gc = __glXGetCurrentContext();
  3948.     const GLuint cmdlen = 52;
  3949. emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
  3950. (void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8);
  3951. (void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8);
  3952. (void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8);
  3953. (void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8);
  3954. (void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8);
  3955. (void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8);
  3956. gc->pc += cmdlen;
  3957. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3958. }
  3959.  
  3960. #define X_GLrop_PopMatrix 183
  3961. void __indirect_glPopMatrix(void)
  3962. {
  3963.     struct glx_context * const gc = __glXGetCurrentContext();
  3964.     const GLuint cmdlen = 4;
  3965. emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
  3966. gc->pc += cmdlen;
  3967. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3968. }
  3969.  
  3970. #define X_GLrop_PushMatrix 184
  3971. void __indirect_glPushMatrix(void)
  3972. {
  3973.     struct glx_context * const gc = __glXGetCurrentContext();
  3974.     const GLuint cmdlen = 4;
  3975. emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
  3976. gc->pc += cmdlen;
  3977. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3978. }
  3979.  
  3980. #define X_GLrop_Rotated 185
  3981. void __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
  3982. {
  3983.     struct glx_context * const gc = __glXGetCurrentContext();
  3984.     const GLuint cmdlen = 36;
  3985. emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
  3986. (void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 8);
  3987. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
  3988. (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
  3989. (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
  3990. gc->pc += cmdlen;
  3991. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  3992. }
  3993.  
  3994. #define X_GLrop_Rotatef 186
  3995. void __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
  3996. {
  3997.     struct glx_context * const gc = __glXGetCurrentContext();
  3998.     const GLuint cmdlen = 20;
  3999. emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
  4000. (void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 4);
  4001. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
  4002. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
  4003. (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
  4004. gc->pc += cmdlen;
  4005. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4006. }
  4007.  
  4008. #define X_GLrop_Scaled 187
  4009. void __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
  4010. {
  4011.     struct glx_context * const gc = __glXGetCurrentContext();
  4012.     const GLuint cmdlen = 28;
  4013. emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
  4014. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
  4015. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
  4016. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
  4017. gc->pc += cmdlen;
  4018. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4019. }
  4020.  
  4021. #define X_GLrop_Scalef 188
  4022. void __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
  4023. {
  4024.     struct glx_context * const gc = __glXGetCurrentContext();
  4025.     const GLuint cmdlen = 16;
  4026. emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
  4027. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  4028. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  4029. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  4030. gc->pc += cmdlen;
  4031. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4032. }
  4033.  
  4034. #define X_GLrop_Translated 189
  4035. void __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
  4036. {
  4037.     struct glx_context * const gc = __glXGetCurrentContext();
  4038.     const GLuint cmdlen = 28;
  4039. emit_header(gc->pc, X_GLrop_Translated, cmdlen);
  4040. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
  4041. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
  4042. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
  4043. gc->pc += cmdlen;
  4044. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4045. }
  4046.  
  4047. #define X_GLrop_Translatef 190
  4048. void __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
  4049. {
  4050.     struct glx_context * const gc = __glXGetCurrentContext();
  4051.     const GLuint cmdlen = 16;
  4052. emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
  4053. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  4054. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  4055. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  4056. gc->pc += cmdlen;
  4057. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4058. }
  4059.  
  4060. #define X_GLrop_Viewport 191
  4061. void __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
  4062. {
  4063.     struct glx_context * const gc = __glXGetCurrentContext();
  4064.     const GLuint cmdlen = 20;
  4065. emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
  4066. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  4067. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  4068. (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
  4069. (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
  4070. gc->pc += cmdlen;
  4071. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4072. }
  4073.  
  4074. #define X_GLrop_BindTexture 4117
  4075. void __indirect_glBindTexture(GLenum target, GLuint texture)
  4076. {
  4077.     struct glx_context * const gc = __glXGetCurrentContext();
  4078.     const GLuint cmdlen = 12;
  4079. emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
  4080. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4081. (void) memcpy((void *)(gc->pc + 8), (void *)(&texture), 4);
  4082. gc->pc += cmdlen;
  4083. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4084. }
  4085.  
  4086. #define X_GLrop_Indexubv 194
  4087. void __indirect_glIndexub(GLubyte c)
  4088. {
  4089.     struct glx_context * const gc = __glXGetCurrentContext();
  4090.     const GLuint cmdlen = 8;
  4091. emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
  4092. (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 1);
  4093. gc->pc += cmdlen;
  4094. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4095. }
  4096.  
  4097. #define X_GLrop_Indexubv 194
  4098. void __indirect_glIndexubv(const GLubyte * c)
  4099. {
  4100.     struct glx_context * const gc = __glXGetCurrentContext();
  4101.     const GLuint cmdlen = 8;
  4102. emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
  4103. (void) memcpy((void *)(gc->pc + 4), (void *)(c), 1);
  4104. gc->pc += cmdlen;
  4105. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4106. }
  4107.  
  4108. #define X_GLrop_PolygonOffset 192
  4109. void __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
  4110. {
  4111.     struct glx_context * const gc = __glXGetCurrentContext();
  4112.     const GLuint cmdlen = 12;
  4113. emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
  4114. (void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4);
  4115. (void) memcpy((void *)(gc->pc + 8), (void *)(&units), 4);
  4116. gc->pc += cmdlen;
  4117. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4118. }
  4119.  
  4120. #define X_GLrop_CopyTexImage1D 4119
  4121. void __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
  4122. {
  4123.     struct glx_context * const gc = __glXGetCurrentContext();
  4124.     const GLuint cmdlen = 32;
  4125. emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
  4126. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4127. (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
  4128. (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
  4129. (void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4);
  4130. (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
  4131. (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
  4132. (void) memcpy((void *)(gc->pc + 28), (void *)(&border), 4);
  4133. gc->pc += cmdlen;
  4134. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4135. }
  4136.  
  4137. #define X_GLrop_CopyTexImage2D 4120
  4138. void __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
  4139. {
  4140.     struct glx_context * const gc = __glXGetCurrentContext();
  4141.     const GLuint cmdlen = 36;
  4142. emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
  4143. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4144. (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
  4145. (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
  4146. (void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4);
  4147. (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
  4148. (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
  4149. (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
  4150. (void) memcpy((void *)(gc->pc + 32), (void *)(&border), 4);
  4151. gc->pc += cmdlen;
  4152. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4153. }
  4154.  
  4155. #define X_GLrop_CopyTexSubImage1D 4121
  4156. void __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
  4157. {
  4158.     struct glx_context * const gc = __glXGetCurrentContext();
  4159.     const GLuint cmdlen = 28;
  4160. emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
  4161. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4162. (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
  4163. (void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4);
  4164. (void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4);
  4165. (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
  4166. (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
  4167. gc->pc += cmdlen;
  4168. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4169. }
  4170.  
  4171. #define X_GLrop_CopyTexSubImage2D 4122
  4172. void __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  4173. {
  4174.     struct glx_context * const gc = __glXGetCurrentContext();
  4175.     const GLuint cmdlen = 36;
  4176. emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
  4177. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4178. (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
  4179. (void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4);
  4180. (void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4);
  4181. (void) memcpy((void *)(gc->pc + 20), (void *)(&x), 4);
  4182. (void) memcpy((void *)(gc->pc + 24), (void *)(&y), 4);
  4183. (void) memcpy((void *)(gc->pc + 28), (void *)(&width), 4);
  4184. (void) memcpy((void *)(gc->pc + 32), (void *)(&height), 4);
  4185. gc->pc += cmdlen;
  4186. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4187. }
  4188.  
  4189. #define X_GLsop_DeleteTextures 144
  4190. void __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
  4191. {
  4192.     struct glx_context * const gc = __glXGetCurrentContext();
  4193.     Display * const dpy = gc->currentDpy;
  4194. #ifndef USE_XCB
  4195.     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
  4196. #endif
  4197.     if (n < 0) {
  4198.         __glXSetError(gc, GL_INVALID_VALUE);
  4199.         return;
  4200.     }
  4201.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  4202. #ifdef USE_XCB
  4203.         xcb_connection_t *c = XGetXCBConnection(dpy);
  4204.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4205.         xcb_glx_delete_textures(c, gc->currentContextTag, n, textures);
  4206. #else
  4207.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
  4208. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  4209. (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
  4210.         UnlockDisplay(dpy); SyncHandle();
  4211. #endif /* USE_XCB */
  4212.     }
  4213.     return;
  4214. }
  4215.  
  4216. #define X_GLvop_DeleteTexturesEXT 12
  4217. void glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
  4218. {
  4219.     struct glx_context * const gc = __glXGetCurrentContext();
  4220.  
  4221. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  4222.     if (gc->isDirect) {
  4223.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  4224.         PFNGLDELETETEXTURESEXTPROC p =
  4225.             (PFNGLDELETETEXTURESEXTPROC) disp_table[327];
  4226.     p(n, textures);
  4227.     } else
  4228. #endif
  4229.     {
  4230.     struct glx_context * const gc = __glXGetCurrentContext();
  4231.     Display * const dpy = gc->currentDpy;
  4232.     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
  4233.     if (n < 0) {
  4234.         __glXSetError(gc, GL_INVALID_VALUE);
  4235.         return;
  4236.     }
  4237.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  4238.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteTexturesEXT, cmdlen);
  4239. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  4240. (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
  4241.         UnlockDisplay(dpy); SyncHandle();
  4242.     }
  4243.     return;
  4244. }
  4245. }
  4246.  
  4247. #define X_GLsop_GenTextures 145
  4248. void __indirect_glGenTextures(GLsizei n, GLuint * textures)
  4249. {
  4250.     struct glx_context * const gc = __glXGetCurrentContext();
  4251.     Display * const dpy = gc->currentDpy;
  4252. #ifndef USE_XCB
  4253.     const GLuint cmdlen = 4;
  4254. #endif
  4255.     if (n < 0) {
  4256.         __glXSetError(gc, GL_INVALID_VALUE);
  4257.         return;
  4258.     }
  4259.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  4260. #ifdef USE_XCB
  4261.         xcb_connection_t *c = XGetXCBConnection(dpy);
  4262.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4263.         xcb_glx_gen_textures_reply_t *reply = xcb_glx_gen_textures_reply(c, xcb_glx_gen_textures(c, gc->currentContextTag, n), NULL);
  4264.         (void)memcpy(textures, xcb_glx_gen_textures_data(reply), xcb_glx_gen_textures_data_length(reply) * sizeof(GLuint));
  4265.         free(reply);
  4266. #else
  4267.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
  4268. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  4269.         (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
  4270.         UnlockDisplay(dpy); SyncHandle();
  4271. #endif /* USE_XCB */
  4272.     }
  4273.     return;
  4274. }
  4275.  
  4276. #define X_GLvop_GenTexturesEXT 13
  4277. void glGenTexturesEXT(GLsizei n, GLuint * textures)
  4278. {
  4279.     struct glx_context * const gc = __glXGetCurrentContext();
  4280.  
  4281. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  4282.     if (gc->isDirect) {
  4283.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  4284.         PFNGLGENTEXTURESEXTPROC p =
  4285.             (PFNGLGENTEXTURESEXTPROC) disp_table[328];
  4286.     p(n, textures);
  4287.     } else
  4288. #endif
  4289.     {
  4290.     struct glx_context * const gc = __glXGetCurrentContext();
  4291.     Display * const dpy = gc->currentDpy;
  4292.     const GLuint cmdlen = 4;
  4293.     if (n < 0) {
  4294.         __glXSetError(gc, GL_INVALID_VALUE);
  4295.         return;
  4296.     }
  4297.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  4298.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen);
  4299. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  4300.         (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
  4301.         UnlockDisplay(dpy); SyncHandle();
  4302.     }
  4303.     return;
  4304. }
  4305. }
  4306.  
  4307. #define X_GLsop_IsTexture 146
  4308. GLboolean __indirect_glIsTexture(GLuint texture)
  4309. {
  4310.     struct glx_context * const gc = __glXGetCurrentContext();
  4311.     Display * const dpy = gc->currentDpy;
  4312.     GLboolean retval = (GLboolean) 0;
  4313. #ifndef USE_XCB
  4314.     const GLuint cmdlen = 4;
  4315. #endif
  4316.     if (__builtin_expect(dpy != NULL, 1)) {
  4317. #ifdef USE_XCB
  4318.         xcb_connection_t *c = XGetXCBConnection(dpy);
  4319.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4320.         xcb_glx_is_texture_reply_t *reply = xcb_glx_is_texture_reply(c, xcb_glx_is_texture(c, gc->currentContextTag, texture), NULL);
  4321.         retval = reply->ret_val;
  4322.         free(reply);
  4323. #else
  4324.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
  4325. (void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
  4326.         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
  4327.         UnlockDisplay(dpy); SyncHandle();
  4328. #endif /* USE_XCB */
  4329.     }
  4330.     return retval;
  4331. }
  4332.  
  4333. #define X_GLvop_IsTextureEXT 14
  4334. GLboolean glIsTextureEXT(GLuint texture)
  4335. {
  4336.     struct glx_context * const gc = __glXGetCurrentContext();
  4337.  
  4338. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  4339.     if (gc->isDirect) {
  4340.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  4341.         PFNGLISTEXTUREEXTPROC p =
  4342.             (PFNGLISTEXTUREEXTPROC) disp_table[330];
  4343.     return p(texture);
  4344.     } else
  4345. #endif
  4346.     {
  4347.     struct glx_context * const gc = __glXGetCurrentContext();
  4348.     Display * const dpy = gc->currentDpy;
  4349.     GLboolean retval = (GLboolean) 0;
  4350.     const GLuint cmdlen = 4;
  4351.     if (__builtin_expect(dpy != NULL, 1)) {
  4352.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsTextureEXT, cmdlen);
  4353. (void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
  4354.         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
  4355.         UnlockDisplay(dpy); SyncHandle();
  4356.     }
  4357.     return retval;
  4358. }
  4359. }
  4360.  
  4361. #define X_GLrop_PrioritizeTextures 4118
  4362. void __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclampf * priorities)
  4363. {
  4364.     struct glx_context * const gc = __glXGetCurrentContext();
  4365.     const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
  4366.     if (n < 0) {
  4367.         __glXSetError(gc, GL_INVALID_VALUE);
  4368.         return;
  4369.     }
  4370.     if (__builtin_expect(n >= 0, 1)) {
  4371. emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
  4372. (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
  4373. (void) memcpy((void *)(gc->pc + 8), (void *)(textures), (n * 4));
  4374. (void) memcpy((void *)(gc->pc + 8 + (n * 4)), (void *)(priorities), (n * 4));
  4375. gc->pc += cmdlen;
  4376. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4377.     }
  4378. }
  4379.  
  4380. static void
  4381. __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 )
  4382. {
  4383.     struct glx_context * const gc = __glXGetCurrentContext();
  4384.     const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
  4385.     const GLuint cmdlen = 60 + __GLX_PAD(compsize);
  4386.     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
  4387. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  4388.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  4389.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4390.     }
  4391. emit_header(gc->pc, opcode, cmdlen);
  4392. (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
  4393. (void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4);
  4394. (void) memcpy((void *)(gc->pc + 32), (void *)(&xoffset), 4);
  4395. (void) memcpy((void *)(gc->pc + 36), (void *)(&yoffset), 4);
  4396. (void) memcpy((void *)(gc->pc + 40), (void *)(&width), 4);
  4397. (void) memcpy((void *)(gc->pc + 44), (void *)(&height), 4);
  4398. (void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4);
  4399. (void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4);
  4400. (void) memset((void *)(gc->pc + 56), 0, 4);
  4401. if (compsize > 0) {
  4402.     (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 60, gc->pc + 4);
  4403. } else {
  4404.     (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
  4405. }
  4406. gc->pc += cmdlen;
  4407. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4408. }
  4409. else {
  4410. const GLint op = opcode;
  4411. const GLuint cmdlenLarge = cmdlen + 4;
  4412. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  4413. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  4414. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  4415. (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
  4416. (void) memcpy((void *)(pc + 32), (void *)(&level), 4);
  4417. (void) memcpy((void *)(pc + 36), (void *)(&xoffset), 4);
  4418. (void) memcpy((void *)(pc + 40), (void *)(&yoffset), 4);
  4419. (void) memcpy((void *)(pc + 44), (void *)(&width), 4);
  4420. (void) memcpy((void *)(pc + 48), (void *)(&height), 4);
  4421. (void) memcpy((void *)(pc + 52), (void *)(&format), 4);
  4422. (void) memcpy((void *)(pc + 56), (void *)(&type), 4);
  4423. (void) memset((void *)(pc + 60), 0, 4);
  4424. __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 64, pc + 8);
  4425. }
  4426.     }
  4427. }
  4428.  
  4429. #define X_GLrop_TexSubImage1D 4099
  4430. void __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
  4431. {
  4432.     __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset, 1, width, 1, format, type, pixels );
  4433. }
  4434.  
  4435. #define X_GLrop_TexSubImage2D 4100
  4436. void __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
  4437. {
  4438.     __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset, yoffset, width, height, format, type, pixels );
  4439. }
  4440.  
  4441. #define X_GLrop_BlendColor 4096
  4442. void __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  4443. {
  4444.     struct glx_context * const gc = __glXGetCurrentContext();
  4445.     const GLuint cmdlen = 20;
  4446. emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
  4447. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  4448. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  4449. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  4450. (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
  4451. gc->pc += cmdlen;
  4452. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4453. }
  4454.  
  4455. #define X_GLrop_BlendEquation 4097
  4456. void __indirect_glBlendEquation(GLenum mode)
  4457. {
  4458.     struct glx_context * const gc = __glXGetCurrentContext();
  4459.     const GLuint cmdlen = 8;
  4460. emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
  4461. (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
  4462. gc->pc += cmdlen;
  4463. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4464. }
  4465.  
  4466. #define X_GLrop_ColorTable 2053
  4467. void __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
  4468. {
  4469.     struct glx_context * const gc = __glXGetCurrentContext();
  4470.     const GLuint compsize = (table != NULL) ? __glImageSize(width, 1, 1, format, type, target) : 0;
  4471.     const GLuint cmdlen = 44 + __GLX_PAD(compsize);
  4472.     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
  4473. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  4474.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  4475.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4476.     }
  4477. emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
  4478. (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
  4479. (void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4);
  4480. (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
  4481. (void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4);
  4482. (void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4);
  4483. if (compsize > 0) {
  4484.     (*gc->fillImage)(gc, 1, width, 1, 1, format, type, table, gc->pc + 44, gc->pc + 4);
  4485. } else {
  4486.     (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size );
  4487. }
  4488. gc->pc += cmdlen;
  4489. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4490. }
  4491. else {
  4492. const GLint op = X_GLrop_ColorTable;
  4493. const GLuint cmdlenLarge = cmdlen + 4;
  4494. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  4495. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  4496. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  4497. (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
  4498. (void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4);
  4499. (void) memcpy((void *)(pc + 36), (void *)(&width), 4);
  4500. (void) memcpy((void *)(pc + 40), (void *)(&format), 4);
  4501. (void) memcpy((void *)(pc + 44), (void *)(&type), 4);
  4502. __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type, table, pc + 48, pc + 8);
  4503. }
  4504.     }
  4505. }
  4506.  
  4507. #define X_GLrop_ColorTableParameterfv 2054
  4508. void __indirect_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params)
  4509. {
  4510.     struct glx_context * const gc = __glXGetCurrentContext();
  4511.     const GLuint compsize = __glColorTableParameterfv_size(pname);
  4512.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  4513. emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
  4514. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4515. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  4516. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  4517. gc->pc += cmdlen;
  4518. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4519. }
  4520.  
  4521. #define X_GLrop_ColorTableParameteriv 2055
  4522. void __indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params)
  4523. {
  4524.     struct glx_context * const gc = __glXGetCurrentContext();
  4525.     const GLuint compsize = __glColorTableParameteriv_size(pname);
  4526.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  4527. emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
  4528. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4529. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  4530. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  4531. gc->pc += cmdlen;
  4532. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4533. }
  4534.  
  4535. #define X_GLrop_CopyColorTable 2056
  4536. void __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
  4537. {
  4538.     struct glx_context * const gc = __glXGetCurrentContext();
  4539.     const GLuint cmdlen = 24;
  4540. emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
  4541. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4542. (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
  4543. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
  4544. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
  4545. (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
  4546. gc->pc += cmdlen;
  4547. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4548. }
  4549.  
  4550. #define X_GLsop_GetColorTable 147
  4551. void __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table)
  4552. {
  4553.     struct glx_context * const gc = __glXGetCurrentContext();
  4554.     const __GLXattribute * const state = gc->client_state_private;
  4555.     Display * const dpy = gc->currentDpy;
  4556. #ifndef USE_XCB
  4557.     const GLuint cmdlen = 16;
  4558. #endif
  4559.     if (__builtin_expect(dpy != NULL, 1)) {
  4560. #ifdef USE_XCB
  4561.         xcb_connection_t *c = XGetXCBConnection(dpy);
  4562.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4563.         xcb_glx_get_color_table_reply_t *reply = xcb_glx_get_color_table_reply(c, xcb_glx_get_color_table(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
  4564.         __glEmptyImage(gc, 3, reply->width, 1, 1, format, type, xcb_glx_get_color_table_data(reply), table);
  4565.         free(reply);
  4566. #else
  4567.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
  4568. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  4569. (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
  4570. (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
  4571.         *(int32_t *)(pc + 12) = 0;
  4572.         * (int8_t *)(pc + 12) = state->storePack.swapEndian;
  4573.         __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE);
  4574.         UnlockDisplay(dpy); SyncHandle();
  4575. #endif /* USE_XCB */
  4576.     }
  4577.     return;
  4578. }
  4579.  
  4580. #define X_GLvop_GetColorTableSGI 4098
  4581. void gl_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid * table)
  4582. {
  4583.     struct glx_context * const gc = __glXGetCurrentContext();
  4584.  
  4585. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  4586.     if (gc->isDirect) {
  4587.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  4588.         PFNGLGETCOLORTABLESGIPROC p =
  4589.             (PFNGLGETCOLORTABLESGIPROC) disp_table[343];
  4590.     p(target, format, type, table);
  4591.     } else
  4592. #endif
  4593.     {
  4594.     struct glx_context * const gc = __glXGetCurrentContext();
  4595.     const __GLXattribute * const state = gc->client_state_private;
  4596.     Display * const dpy = gc->currentDpy;
  4597.     const GLuint cmdlen = 16;
  4598.     if (__builtin_expect(dpy != NULL, 1)) {
  4599.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableSGI, cmdlen);
  4600. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  4601. (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
  4602. (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
  4603.         *(int32_t *)(pc + 12) = 0;
  4604.         * (int8_t *)(pc + 12) = state->storePack.swapEndian;
  4605.         __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE);
  4606.         UnlockDisplay(dpy); SyncHandle();
  4607.     }
  4608.     return;
  4609. }
  4610. }
  4611.  
  4612. #define X_GLsop_GetColorTableParameterfv 148
  4613. void __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params)
  4614. {
  4615.     struct glx_context * const gc = __glXGetCurrentContext();
  4616.     Display * const dpy = gc->currentDpy;
  4617. #ifndef USE_XCB
  4618.     const GLuint cmdlen = 8;
  4619. #endif
  4620.     if (__builtin_expect(dpy != NULL, 1)) {
  4621. #ifdef USE_XCB
  4622.         xcb_connection_t *c = XGetXCBConnection(dpy);
  4623.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4624.         xcb_glx_get_color_table_parameterfv_reply_t *reply = xcb_glx_get_color_table_parameterfv_reply(c, xcb_glx_get_color_table_parameterfv(c, gc->currentContextTag, target, pname), NULL);
  4625.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  4626.         /* of elements, not the length of the data part. A single element is embedded. */
  4627.         if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 1)
  4628.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  4629.         else
  4630.             (void)memcpy(params, xcb_glx_get_color_table_parameterfv_data(reply), xcb_glx_get_color_table_parameterfv_data_length(reply) * sizeof(GLfloat));
  4631.         free(reply);
  4632. #else
  4633.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv, cmdlen);
  4634. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  4635. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  4636.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  4637.         UnlockDisplay(dpy); SyncHandle();
  4638. #endif /* USE_XCB */
  4639.     }
  4640.     return;
  4641. }
  4642.  
  4643. #define X_GLvop_GetColorTableParameterfvSGI 4099
  4644. void gl_dispatch_stub_344(GLenum target, GLenum pname, GLfloat * params)
  4645. {
  4646.     struct glx_context * const gc = __glXGetCurrentContext();
  4647.  
  4648. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  4649.     if (gc->isDirect) {
  4650.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  4651.         PFNGLGETCOLORTABLEPARAMETERFVSGIPROC p =
  4652.             (PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) disp_table[344];
  4653.     p(target, pname, params);
  4654.     } else
  4655. #endif
  4656.     {
  4657.     struct glx_context * const gc = __glXGetCurrentContext();
  4658.     Display * const dpy = gc->currentDpy;
  4659.     const GLuint cmdlen = 8;
  4660.     if (__builtin_expect(dpy != NULL, 1)) {
  4661.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterfvSGI, cmdlen);
  4662. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  4663. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  4664.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  4665.         UnlockDisplay(dpy); SyncHandle();
  4666.     }
  4667.     return;
  4668. }
  4669. }
  4670.  
  4671. #define X_GLsop_GetColorTableParameteriv 149
  4672. void __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * params)
  4673. {
  4674.     struct glx_context * const gc = __glXGetCurrentContext();
  4675.     Display * const dpy = gc->currentDpy;
  4676. #ifndef USE_XCB
  4677.     const GLuint cmdlen = 8;
  4678. #endif
  4679.     if (__builtin_expect(dpy != NULL, 1)) {
  4680. #ifdef USE_XCB
  4681.         xcb_connection_t *c = XGetXCBConnection(dpy);
  4682.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4683.         xcb_glx_get_color_table_parameteriv_reply_t *reply = xcb_glx_get_color_table_parameteriv_reply(c, xcb_glx_get_color_table_parameteriv(c, gc->currentContextTag, target, pname), NULL);
  4684.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  4685.         /* of elements, not the length of the data part. A single element is embedded. */
  4686.         if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 1)
  4687.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  4688.         else
  4689.             (void)memcpy(params, xcb_glx_get_color_table_parameteriv_data(reply), xcb_glx_get_color_table_parameteriv_data_length(reply) * sizeof(GLint));
  4690.         free(reply);
  4691. #else
  4692.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv, cmdlen);
  4693. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  4694. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  4695.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  4696.         UnlockDisplay(dpy); SyncHandle();
  4697. #endif /* USE_XCB */
  4698.     }
  4699.     return;
  4700. }
  4701.  
  4702. #define X_GLvop_GetColorTableParameterivSGI 4100
  4703. void gl_dispatch_stub_345(GLenum target, GLenum pname, GLint * params)
  4704. {
  4705.     struct glx_context * const gc = __glXGetCurrentContext();
  4706.  
  4707. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  4708.     if (gc->isDirect) {
  4709.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  4710.         PFNGLGETCOLORTABLEPARAMETERIVSGIPROC p =
  4711.             (PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) disp_table[345];
  4712.     p(target, pname, params);
  4713.     } else
  4714. #endif
  4715.     {
  4716.     struct glx_context * const gc = __glXGetCurrentContext();
  4717.     Display * const dpy = gc->currentDpy;
  4718.     const GLuint cmdlen = 8;
  4719.     if (__builtin_expect(dpy != NULL, 1)) {
  4720.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterivSGI, cmdlen);
  4721. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  4722. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  4723.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  4724.         UnlockDisplay(dpy); SyncHandle();
  4725.     }
  4726.     return;
  4727. }
  4728. }
  4729.  
  4730. #define X_GLrop_ColorSubTable 195
  4731. void __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data)
  4732. {
  4733.     struct glx_context * const gc = __glXGetCurrentContext();
  4734.     const GLuint compsize = (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
  4735.     const GLuint cmdlen = 44 + __GLX_PAD(compsize);
  4736.     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
  4737. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  4738.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  4739.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4740.     }
  4741. emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
  4742. (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
  4743. (void) memcpy((void *)(gc->pc + 28), (void *)(&start), 4);
  4744. (void) memcpy((void *)(gc->pc + 32), (void *)(&count), 4);
  4745. (void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4);
  4746. (void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4);
  4747. if (compsize > 0) {
  4748.     (*gc->fillImage)(gc, 1, count, 1, 1, format, type, data, gc->pc + 44, gc->pc + 4);
  4749. } else {
  4750.     (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size );
  4751. }
  4752. gc->pc += cmdlen;
  4753. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4754. }
  4755. else {
  4756. const GLint op = X_GLrop_ColorSubTable;
  4757. const GLuint cmdlenLarge = cmdlen + 4;
  4758. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  4759. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  4760. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  4761. (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
  4762. (void) memcpy((void *)(pc + 32), (void *)(&start), 4);
  4763. (void) memcpy((void *)(pc + 36), (void *)(&count), 4);
  4764. (void) memcpy((void *)(pc + 40), (void *)(&format), 4);
  4765. (void) memcpy((void *)(pc + 44), (void *)(&type), 4);
  4766. __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type, data, pc + 48, pc + 8);
  4767. }
  4768.     }
  4769. }
  4770.  
  4771. #define X_GLrop_CopyColorSubTable 196
  4772. void __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
  4773. {
  4774.     struct glx_context * const gc = __glXGetCurrentContext();
  4775.     const GLuint cmdlen = 24;
  4776. emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
  4777. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4778. (void) memcpy((void *)(gc->pc + 8), (void *)(&start), 4);
  4779. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
  4780. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
  4781. (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
  4782. gc->pc += cmdlen;
  4783. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4784. }
  4785.  
  4786. static void
  4787. __glx_ConvolutionFilter_1D2D( unsigned opcode, unsigned dim, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image )
  4788. {
  4789.     struct glx_context * const gc = __glXGetCurrentContext();
  4790.     const GLuint compsize = (image != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
  4791.     const GLuint cmdlen = 48 + __GLX_PAD(compsize);
  4792.     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
  4793. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  4794.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  4795.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4796.     }
  4797. emit_header(gc->pc, opcode, cmdlen);
  4798. (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
  4799. (void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4);
  4800. (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
  4801. (void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4);
  4802. (void) memcpy((void *)(gc->pc + 40), (void *)(&format), 4);
  4803. (void) memcpy((void *)(gc->pc + 44), (void *)(&type), 4);
  4804. if (compsize > 0) {
  4805.     (*gc->fillImage)(gc, dim, width, height, 1, format, type, image, gc->pc + 48, gc->pc + 4);
  4806. } else {
  4807.     (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
  4808. }
  4809. gc->pc += cmdlen;
  4810. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4811. }
  4812. else {
  4813. const GLint op = opcode;
  4814. const GLuint cmdlenLarge = cmdlen + 4;
  4815. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  4816. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  4817. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  4818. (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
  4819. (void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4);
  4820. (void) memcpy((void *)(pc + 36), (void *)(&width), 4);
  4821. (void) memcpy((void *)(pc + 40), (void *)(&height), 4);
  4822. (void) memcpy((void *)(pc + 44), (void *)(&format), 4);
  4823. (void) memcpy((void *)(pc + 48), (void *)(&type), 4);
  4824. __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, image, pc + 52, pc + 8);
  4825. }
  4826.     }
  4827. }
  4828.  
  4829. #define X_GLrop_ConvolutionFilter1D 4101
  4830. void __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image)
  4831. {
  4832.     __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target, internalformat, width, 1, format, type, image );
  4833. }
  4834.  
  4835. #define X_GLrop_ConvolutionFilter2D 4102
  4836. void __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image)
  4837. {
  4838.     __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target, internalformat, width, height, format, type, image );
  4839. }
  4840.  
  4841. #define X_GLrop_ConvolutionParameterf 4103
  4842. void __indirect_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
  4843. {
  4844.     struct glx_context * const gc = __glXGetCurrentContext();
  4845.     const GLuint cmdlen = 16;
  4846. emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
  4847. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4848. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  4849. (void) memcpy((void *)(gc->pc + 12), (void *)(&params), 4);
  4850. gc->pc += cmdlen;
  4851. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4852. }
  4853.  
  4854. #define X_GLrop_ConvolutionParameterfv 4104
  4855. void __indirect_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params)
  4856. {
  4857.     struct glx_context * const gc = __glXGetCurrentContext();
  4858.     const GLuint compsize = __glConvolutionParameterfv_size(pname);
  4859.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  4860. emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
  4861. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4862. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  4863. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  4864. gc->pc += cmdlen;
  4865. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4866. }
  4867.  
  4868. #define X_GLrop_ConvolutionParameteri 4105
  4869. void __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
  4870. {
  4871.     struct glx_context * const gc = __glXGetCurrentContext();
  4872.     const GLuint cmdlen = 16;
  4873. emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
  4874. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4875. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  4876. (void) memcpy((void *)(gc->pc + 12), (void *)(&params), 4);
  4877. gc->pc += cmdlen;
  4878. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4879. }
  4880.  
  4881. #define X_GLrop_ConvolutionParameteriv 4106
  4882. void __indirect_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params)
  4883. {
  4884.     struct glx_context * const gc = __glXGetCurrentContext();
  4885.     const GLuint compsize = __glConvolutionParameteriv_size(pname);
  4886.     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
  4887. emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
  4888. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4889. (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
  4890. (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
  4891. gc->pc += cmdlen;
  4892. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4893. }
  4894.  
  4895. #define X_GLrop_CopyConvolutionFilter1D 4107
  4896. void __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
  4897. {
  4898.     struct glx_context * const gc = __glXGetCurrentContext();
  4899.     const GLuint cmdlen = 24;
  4900. emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
  4901. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4902. (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
  4903. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
  4904. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
  4905. (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
  4906. gc->pc += cmdlen;
  4907. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4908. }
  4909.  
  4910. #define X_GLrop_CopyConvolutionFilter2D 4108
  4911. void __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
  4912. {
  4913.     struct glx_context * const gc = __glXGetCurrentContext();
  4914.     const GLuint cmdlen = 28;
  4915. emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
  4916. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  4917. (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
  4918. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
  4919. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
  4920. (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
  4921. (void) memcpy((void *)(gc->pc + 24), (void *)(&height), 4);
  4922. gc->pc += cmdlen;
  4923. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  4924. }
  4925.  
  4926. #define X_GLsop_GetConvolutionFilter 150
  4927. void __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image)
  4928. {
  4929.     struct glx_context * const gc = __glXGetCurrentContext();
  4930.     const __GLXattribute * const state = gc->client_state_private;
  4931.     Display * const dpy = gc->currentDpy;
  4932. #ifndef USE_XCB
  4933.     const GLuint cmdlen = 16;
  4934. #endif
  4935.     if (__builtin_expect(dpy != NULL, 1)) {
  4936. #ifdef USE_XCB
  4937.         xcb_connection_t *c = XGetXCBConnection(dpy);
  4938.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  4939.         xcb_glx_get_convolution_filter_reply_t *reply = xcb_glx_get_convolution_filter_reply(c, xcb_glx_get_convolution_filter(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
  4940.         if (reply->height == 0) { reply->height = 1; }
  4941.         __glEmptyImage(gc, 3, reply->width, reply->height, 1, format, type, xcb_glx_get_convolution_filter_data(reply), image);
  4942.         free(reply);
  4943. #else
  4944.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
  4945. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  4946. (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
  4947. (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
  4948.         *(int32_t *)(pc + 12) = 0;
  4949.         * (int8_t *)(pc + 12) = state->storePack.swapEndian;
  4950.         __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image, GL_TRUE);
  4951.         UnlockDisplay(dpy); SyncHandle();
  4952. #endif /* USE_XCB */
  4953.     }
  4954.     return;
  4955. }
  4956.  
  4957. #define X_GLvop_GetConvolutionFilterEXT 1
  4958. void gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid * image)
  4959. {
  4960.     struct glx_context * const gc = __glXGetCurrentContext();
  4961.  
  4962. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  4963.     if (gc->isDirect) {
  4964.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  4965.         PFNGLGETCONVOLUTIONFILTEREXTPROC p =
  4966.             (PFNGLGETCONVOLUTIONFILTEREXTPROC) disp_table[356];
  4967.     p(target, format, type, image);
  4968.     } else
  4969. #endif
  4970.     {
  4971.     struct glx_context * const gc = __glXGetCurrentContext();
  4972.     const __GLXattribute * const state = gc->client_state_private;
  4973.     Display * const dpy = gc->currentDpy;
  4974.     const GLuint cmdlen = 16;
  4975.     if (__builtin_expect(dpy != NULL, 1)) {
  4976.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetConvolutionFilterEXT, cmdlen);
  4977. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  4978. (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
  4979. (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
  4980.         *(int32_t *)(pc + 12) = 0;
  4981.         * (int8_t *)(pc + 12) = state->storePack.swapEndian;
  4982.         __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image, GL_TRUE);
  4983.         UnlockDisplay(dpy); SyncHandle();
  4984.     }
  4985.     return;
  4986. }
  4987. }
  4988.  
  4989. #define X_GLsop_GetConvolutionParameterfv 151
  4990. void __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params)
  4991. {
  4992.     struct glx_context * const gc = __glXGetCurrentContext();
  4993.     Display * const dpy = gc->currentDpy;
  4994. #ifndef USE_XCB
  4995.     const GLuint cmdlen = 8;
  4996. #endif
  4997.     if (__builtin_expect(dpy != NULL, 1)) {
  4998. #ifdef USE_XCB
  4999.         xcb_connection_t *c = XGetXCBConnection(dpy);
  5000.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5001.         xcb_glx_get_convolution_parameterfv_reply_t *reply = xcb_glx_get_convolution_parameterfv_reply(c, xcb_glx_get_convolution_parameterfv(c, gc->currentContextTag, target, pname), NULL);
  5002.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  5003.         /* of elements, not the length of the data part. A single element is embedded. */
  5004.         if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 1)
  5005.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  5006.         else
  5007.             (void)memcpy(params, xcb_glx_get_convolution_parameterfv_data(reply), xcb_glx_get_convolution_parameterfv_data_length(reply) * sizeof(GLfloat));
  5008.         free(reply);
  5009. #else
  5010.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv, cmdlen);
  5011. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5012. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5013.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5014.         UnlockDisplay(dpy); SyncHandle();
  5015. #endif /* USE_XCB */
  5016.     }
  5017.     return;
  5018. }
  5019.  
  5020. #define X_GLvop_GetConvolutionParameterfvEXT 2
  5021. void gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
  5022. {
  5023.     struct glx_context * const gc = __glXGetCurrentContext();
  5024.  
  5025. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  5026.     if (gc->isDirect) {
  5027.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  5028.         PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC p =
  5029.             (PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) disp_table[357];
  5030.     p(target, pname, params);
  5031.     } else
  5032. #endif
  5033.     {
  5034.     struct glx_context * const gc = __glXGetCurrentContext();
  5035.     Display * const dpy = gc->currentDpy;
  5036.     const GLuint cmdlen = 8;
  5037.     if (__builtin_expect(dpy != NULL, 1)) {
  5038.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetConvolutionParameterfvEXT, cmdlen);
  5039. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5040. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5041.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5042.         UnlockDisplay(dpy); SyncHandle();
  5043.     }
  5044.     return;
  5045. }
  5046. }
  5047.  
  5048. #define X_GLsop_GetConvolutionParameteriv 152
  5049. void __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params)
  5050. {
  5051.     struct glx_context * const gc = __glXGetCurrentContext();
  5052.     Display * const dpy = gc->currentDpy;
  5053. #ifndef USE_XCB
  5054.     const GLuint cmdlen = 8;
  5055. #endif
  5056.     if (__builtin_expect(dpy != NULL, 1)) {
  5057. #ifdef USE_XCB
  5058.         xcb_connection_t *c = XGetXCBConnection(dpy);
  5059.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5060.         xcb_glx_get_convolution_parameteriv_reply_t *reply = xcb_glx_get_convolution_parameteriv_reply(c, xcb_glx_get_convolution_parameteriv(c, gc->currentContextTag, target, pname), NULL);
  5061.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  5062.         /* of elements, not the length of the data part. A single element is embedded. */
  5063.         if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 1)
  5064.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  5065.         else
  5066.             (void)memcpy(params, xcb_glx_get_convolution_parameteriv_data(reply), xcb_glx_get_convolution_parameteriv_data_length(reply) * sizeof(GLint));
  5067.         free(reply);
  5068. #else
  5069.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv, cmdlen);
  5070. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5071. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5072.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5073.         UnlockDisplay(dpy); SyncHandle();
  5074. #endif /* USE_XCB */
  5075.     }
  5076.     return;
  5077. }
  5078.  
  5079. #define X_GLvop_GetConvolutionParameterivEXT 3
  5080. void gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
  5081. {
  5082.     struct glx_context * const gc = __glXGetCurrentContext();
  5083.  
  5084. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  5085.     if (gc->isDirect) {
  5086.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  5087.         PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC p =
  5088.             (PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) disp_table[358];
  5089.     p(target, pname, params);
  5090.     } else
  5091. #endif
  5092.     {
  5093.     struct glx_context * const gc = __glXGetCurrentContext();
  5094.     Display * const dpy = gc->currentDpy;
  5095.     const GLuint cmdlen = 8;
  5096.     if (__builtin_expect(dpy != NULL, 1)) {
  5097.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetConvolutionParameterivEXT, cmdlen);
  5098. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5099. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5100.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5101.         UnlockDisplay(dpy); SyncHandle();
  5102.     }
  5103.     return;
  5104. }
  5105. }
  5106.  
  5107. #define X_GLsop_GetHistogram 154
  5108. void __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
  5109. {
  5110.     struct glx_context * const gc = __glXGetCurrentContext();
  5111.     const __GLXattribute * const state = gc->client_state_private;
  5112.     Display * const dpy = gc->currentDpy;
  5113. #ifndef USE_XCB
  5114.     const GLuint cmdlen = 16;
  5115. #endif
  5116.     if (__builtin_expect(dpy != NULL, 1)) {
  5117. #ifdef USE_XCB
  5118.         xcb_connection_t *c = XGetXCBConnection(dpy);
  5119.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5120.         xcb_glx_get_histogram_reply_t *reply = xcb_glx_get_histogram_reply(c, xcb_glx_get_histogram(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
  5121.         __glEmptyImage(gc, 3, reply->width, 1, 1, format, type, xcb_glx_get_histogram_data(reply), values);
  5122.         free(reply);
  5123. #else
  5124.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
  5125. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5126. (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
  5127. (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
  5128.         *(int32_t *)(pc + 12) = 0;
  5129.         * (int8_t *)(pc + 12) = state->storePack.swapEndian;
  5130.         * (int8_t *)(pc + 13) = reset;
  5131.         __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values, GL_TRUE);
  5132.         UnlockDisplay(dpy); SyncHandle();
  5133. #endif /* USE_XCB */
  5134.     }
  5135.     return;
  5136. }
  5137.  
  5138. #define X_GLvop_GetHistogramEXT 5
  5139. void gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
  5140. {
  5141.     struct glx_context * const gc = __glXGetCurrentContext();
  5142.  
  5143. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  5144.     if (gc->isDirect) {
  5145.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  5146.         PFNGLGETHISTOGRAMEXTPROC p =
  5147.             (PFNGLGETHISTOGRAMEXTPROC) disp_table[361];
  5148.     p(target, reset, format, type, values);
  5149.     } else
  5150. #endif
  5151.     {
  5152.     struct glx_context * const gc = __glXGetCurrentContext();
  5153.     const __GLXattribute * const state = gc->client_state_private;
  5154.     Display * const dpy = gc->currentDpy;
  5155.     const GLuint cmdlen = 16;
  5156.     if (__builtin_expect(dpy != NULL, 1)) {
  5157.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetHistogramEXT, cmdlen);
  5158. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5159. (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
  5160. (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
  5161.         *(int32_t *)(pc + 12) = 0;
  5162.         * (int8_t *)(pc + 12) = state->storePack.swapEndian;
  5163.         * (int8_t *)(pc + 13) = reset;
  5164.         __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values, GL_TRUE);
  5165.         UnlockDisplay(dpy); SyncHandle();
  5166.     }
  5167.     return;
  5168. }
  5169. }
  5170.  
  5171. #define X_GLsop_GetHistogramParameterfv 155
  5172. void __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params)
  5173. {
  5174.     struct glx_context * const gc = __glXGetCurrentContext();
  5175.     Display * const dpy = gc->currentDpy;
  5176. #ifndef USE_XCB
  5177.     const GLuint cmdlen = 8;
  5178. #endif
  5179.     if (__builtin_expect(dpy != NULL, 1)) {
  5180. #ifdef USE_XCB
  5181.         xcb_connection_t *c = XGetXCBConnection(dpy);
  5182.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5183.         xcb_glx_get_histogram_parameterfv_reply_t *reply = xcb_glx_get_histogram_parameterfv_reply(c, xcb_glx_get_histogram_parameterfv(c, gc->currentContextTag, target, pname), NULL);
  5184.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  5185.         /* of elements, not the length of the data part. A single element is embedded. */
  5186.         if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 1)
  5187.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  5188.         else
  5189.             (void)memcpy(params, xcb_glx_get_histogram_parameterfv_data(reply), xcb_glx_get_histogram_parameterfv_data_length(reply) * sizeof(GLfloat));
  5190.         free(reply);
  5191. #else
  5192.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv, cmdlen);
  5193. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5194. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5195.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5196.         UnlockDisplay(dpy); SyncHandle();
  5197. #endif /* USE_XCB */
  5198.     }
  5199.     return;
  5200. }
  5201.  
  5202. #define X_GLvop_GetHistogramParameterfvEXT 6
  5203. void gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
  5204. {
  5205.     struct glx_context * const gc = __glXGetCurrentContext();
  5206.  
  5207. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  5208.     if (gc->isDirect) {
  5209.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  5210.         PFNGLGETHISTOGRAMPARAMETERFVEXTPROC p =
  5211.             (PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) disp_table[362];
  5212.     p(target, pname, params);
  5213.     } else
  5214. #endif
  5215.     {
  5216.     struct glx_context * const gc = __glXGetCurrentContext();
  5217.     Display * const dpy = gc->currentDpy;
  5218.     const GLuint cmdlen = 8;
  5219.     if (__builtin_expect(dpy != NULL, 1)) {
  5220.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetHistogramParameterfvEXT, cmdlen);
  5221. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5222. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5223.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5224.         UnlockDisplay(dpy); SyncHandle();
  5225.     }
  5226.     return;
  5227. }
  5228. }
  5229.  
  5230. #define X_GLsop_GetHistogramParameteriv 156
  5231. void __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params)
  5232. {
  5233.     struct glx_context * const gc = __glXGetCurrentContext();
  5234.     Display * const dpy = gc->currentDpy;
  5235. #ifndef USE_XCB
  5236.     const GLuint cmdlen = 8;
  5237. #endif
  5238.     if (__builtin_expect(dpy != NULL, 1)) {
  5239. #ifdef USE_XCB
  5240.         xcb_connection_t *c = XGetXCBConnection(dpy);
  5241.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5242.         xcb_glx_get_histogram_parameteriv_reply_t *reply = xcb_glx_get_histogram_parameteriv_reply(c, xcb_glx_get_histogram_parameteriv(c, gc->currentContextTag, target, pname), NULL);
  5243.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  5244.         /* of elements, not the length of the data part. A single element is embedded. */
  5245.         if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 1)
  5246.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  5247.         else
  5248.             (void)memcpy(params, xcb_glx_get_histogram_parameteriv_data(reply), xcb_glx_get_histogram_parameteriv_data_length(reply) * sizeof(GLint));
  5249.         free(reply);
  5250. #else
  5251.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv, cmdlen);
  5252. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5253. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5254.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5255.         UnlockDisplay(dpy); SyncHandle();
  5256. #endif /* USE_XCB */
  5257.     }
  5258.     return;
  5259. }
  5260.  
  5261. #define X_GLvop_GetHistogramParameterivEXT 7
  5262. void gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
  5263. {
  5264.     struct glx_context * const gc = __glXGetCurrentContext();
  5265.  
  5266. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  5267.     if (gc->isDirect) {
  5268.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  5269.         PFNGLGETHISTOGRAMPARAMETERIVEXTPROC p =
  5270.             (PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) disp_table[363];
  5271.     p(target, pname, params);
  5272.     } else
  5273. #endif
  5274.     {
  5275.     struct glx_context * const gc = __glXGetCurrentContext();
  5276.     Display * const dpy = gc->currentDpy;
  5277.     const GLuint cmdlen = 8;
  5278.     if (__builtin_expect(dpy != NULL, 1)) {
  5279.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetHistogramParameterivEXT, cmdlen);
  5280. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5281. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5282.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5283.         UnlockDisplay(dpy); SyncHandle();
  5284.     }
  5285.     return;
  5286. }
  5287. }
  5288.  
  5289. #define X_GLsop_GetMinmax 157
  5290. void __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
  5291. {
  5292.     struct glx_context * const gc = __glXGetCurrentContext();
  5293.     const __GLXattribute * const state = gc->client_state_private;
  5294.     Display * const dpy = gc->currentDpy;
  5295. #ifndef USE_XCB
  5296.     const GLuint cmdlen = 16;
  5297. #endif
  5298.     if (__builtin_expect(dpy != NULL, 1)) {
  5299. #ifdef USE_XCB
  5300.         xcb_connection_t *c = XGetXCBConnection(dpy);
  5301.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5302.         xcb_glx_get_minmax_reply_t *reply = xcb_glx_get_minmax_reply(c, xcb_glx_get_minmax(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
  5303.         __glEmptyImage(gc, 3, 2, 1, 1, format, type, xcb_glx_get_minmax_data(reply), values);
  5304.         free(reply);
  5305. #else
  5306.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
  5307. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5308. (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
  5309. (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
  5310.         *(int32_t *)(pc + 12) = 0;
  5311.         * (int8_t *)(pc + 12) = state->storePack.swapEndian;
  5312.         * (int8_t *)(pc + 13) = reset;
  5313.         __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values, GL_FALSE);
  5314.         UnlockDisplay(dpy); SyncHandle();
  5315. #endif /* USE_XCB */
  5316.     }
  5317.     return;
  5318. }
  5319.  
  5320. #define X_GLvop_GetMinmaxEXT 8
  5321. void gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
  5322. {
  5323.     struct glx_context * const gc = __glXGetCurrentContext();
  5324.  
  5325. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  5326.     if (gc->isDirect) {
  5327.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  5328.         PFNGLGETMINMAXEXTPROC p =
  5329.             (PFNGLGETMINMAXEXTPROC) disp_table[364];
  5330.     p(target, reset, format, type, values);
  5331.     } else
  5332. #endif
  5333.     {
  5334.     struct glx_context * const gc = __glXGetCurrentContext();
  5335.     const __GLXattribute * const state = gc->client_state_private;
  5336.     Display * const dpy = gc->currentDpy;
  5337.     const GLuint cmdlen = 16;
  5338.     if (__builtin_expect(dpy != NULL, 1)) {
  5339.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetMinmaxEXT, cmdlen);
  5340. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5341. (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
  5342. (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
  5343.         *(int32_t *)(pc + 12) = 0;
  5344.         * (int8_t *)(pc + 12) = state->storePack.swapEndian;
  5345.         * (int8_t *)(pc + 13) = reset;
  5346.         __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values, GL_FALSE);
  5347.         UnlockDisplay(dpy); SyncHandle();
  5348.     }
  5349.     return;
  5350. }
  5351. }
  5352.  
  5353. #define X_GLsop_GetMinmaxParameterfv 158
  5354. void __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params)
  5355. {
  5356.     struct glx_context * const gc = __glXGetCurrentContext();
  5357.     Display * const dpy = gc->currentDpy;
  5358. #ifndef USE_XCB
  5359.     const GLuint cmdlen = 8;
  5360. #endif
  5361.     if (__builtin_expect(dpy != NULL, 1)) {
  5362. #ifdef USE_XCB
  5363.         xcb_connection_t *c = XGetXCBConnection(dpy);
  5364.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5365.         xcb_glx_get_minmax_parameterfv_reply_t *reply = xcb_glx_get_minmax_parameterfv_reply(c, xcb_glx_get_minmax_parameterfv(c, gc->currentContextTag, target, pname), NULL);
  5366.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  5367.         /* of elements, not the length of the data part. A single element is embedded. */
  5368.         if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 1)
  5369.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  5370.         else
  5371.             (void)memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply), xcb_glx_get_minmax_parameterfv_data_length(reply) * sizeof(GLfloat));
  5372.         free(reply);
  5373. #else
  5374.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
  5375. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5376. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5377.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5378.         UnlockDisplay(dpy); SyncHandle();
  5379. #endif /* USE_XCB */
  5380.     }
  5381.     return;
  5382. }
  5383.  
  5384. #define X_GLvop_GetMinmaxParameterfvEXT 9
  5385. void gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
  5386. {
  5387.     struct glx_context * const gc = __glXGetCurrentContext();
  5388.  
  5389. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  5390.     if (gc->isDirect) {
  5391.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  5392.         PFNGLGETMINMAXPARAMETERFVEXTPROC p =
  5393.             (PFNGLGETMINMAXPARAMETERFVEXTPROC) disp_table[365];
  5394.     p(target, pname, params);
  5395.     } else
  5396. #endif
  5397.     {
  5398.     struct glx_context * const gc = __glXGetCurrentContext();
  5399.     Display * const dpy = gc->currentDpy;
  5400.     const GLuint cmdlen = 8;
  5401.     if (__builtin_expect(dpy != NULL, 1)) {
  5402.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetMinmaxParameterfvEXT, cmdlen);
  5403. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5404. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5405.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5406.         UnlockDisplay(dpy); SyncHandle();
  5407.     }
  5408.     return;
  5409. }
  5410. }
  5411.  
  5412. #define X_GLsop_GetMinmaxParameteriv 159
  5413. void __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
  5414. {
  5415.     struct glx_context * const gc = __glXGetCurrentContext();
  5416.     Display * const dpy = gc->currentDpy;
  5417. #ifndef USE_XCB
  5418.     const GLuint cmdlen = 8;
  5419. #endif
  5420.     if (__builtin_expect(dpy != NULL, 1)) {
  5421. #ifdef USE_XCB
  5422.         xcb_connection_t *c = XGetXCBConnection(dpy);
  5423.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5424.         xcb_glx_get_minmax_parameteriv_reply_t *reply = xcb_glx_get_minmax_parameteriv_reply(c, xcb_glx_get_minmax_parameteriv(c, gc->currentContextTag, target, pname), NULL);
  5425.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  5426.         /* of elements, not the length of the data part. A single element is embedded. */
  5427.         if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 1)
  5428.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  5429.         else
  5430.             (void)memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply), xcb_glx_get_minmax_parameteriv_data_length(reply) * sizeof(GLint));
  5431.         free(reply);
  5432. #else
  5433.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
  5434. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5435. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5436.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5437.         UnlockDisplay(dpy); SyncHandle();
  5438. #endif /* USE_XCB */
  5439.     }
  5440.     return;
  5441. }
  5442.  
  5443. #define X_GLvop_GetMinmaxParameterivEXT 10
  5444. void gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
  5445. {
  5446.     struct glx_context * const gc = __glXGetCurrentContext();
  5447.  
  5448. #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
  5449.     if (gc->isDirect) {
  5450.         const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
  5451.         PFNGLGETMINMAXPARAMETERIVEXTPROC p =
  5452.             (PFNGLGETMINMAXPARAMETERIVEXTPROC) disp_table[366];
  5453.     p(target, pname, params);
  5454.     } else
  5455. #endif
  5456.     {
  5457.     struct glx_context * const gc = __glXGetCurrentContext();
  5458.     Display * const dpy = gc->currentDpy;
  5459.     const GLuint cmdlen = 8;
  5460.     if (__builtin_expect(dpy != NULL, 1)) {
  5461.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetMinmaxParameterivEXT, cmdlen);
  5462. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  5463. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  5464.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  5465.         UnlockDisplay(dpy); SyncHandle();
  5466.     }
  5467.     return;
  5468. }
  5469. }
  5470.  
  5471. #define X_GLrop_Histogram 4110
  5472. void __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
  5473. {
  5474.     struct glx_context * const gc = __glXGetCurrentContext();
  5475.     const GLuint cmdlen = 20;
  5476. emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
  5477. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5478. (void) memcpy((void *)(gc->pc + 8), (void *)(&width), 4);
  5479. (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
  5480. (void) memcpy((void *)(gc->pc + 16), (void *)(&sink), 1);
  5481. gc->pc += cmdlen;
  5482. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5483. }
  5484.  
  5485. #define X_GLrop_Minmax 4111
  5486. void __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
  5487. {
  5488.     struct glx_context * const gc = __glXGetCurrentContext();
  5489.     const GLuint cmdlen = 16;
  5490. emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
  5491. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5492. (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
  5493. (void) memcpy((void *)(gc->pc + 12), (void *)(&sink), 1);
  5494. gc->pc += cmdlen;
  5495. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5496. }
  5497.  
  5498. #define X_GLrop_ResetHistogram 4112
  5499. void __indirect_glResetHistogram(GLenum target)
  5500. {
  5501.     struct glx_context * const gc = __glXGetCurrentContext();
  5502.     const GLuint cmdlen = 8;
  5503. emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
  5504. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5505. gc->pc += cmdlen;
  5506. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5507. }
  5508.  
  5509. #define X_GLrop_ResetMinmax 4113
  5510. void __indirect_glResetMinmax(GLenum target)
  5511. {
  5512.     struct glx_context * const gc = __glXGetCurrentContext();
  5513.     const GLuint cmdlen = 8;
  5514. emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
  5515. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5516. gc->pc += cmdlen;
  5517. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5518. }
  5519.  
  5520. static void
  5521. __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 )
  5522. {
  5523.     struct glx_context * const gc = __glXGetCurrentContext();
  5524.     const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
  5525.     const GLuint cmdlen = 84 + __GLX_PAD(compsize);
  5526.     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
  5527. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  5528.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  5529.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5530.     }
  5531. emit_header(gc->pc, opcode, cmdlen);
  5532. (void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4);
  5533. (void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4);
  5534. (void) memcpy((void *)(gc->pc + 48), (void *)(&internalformat), 4);
  5535. (void) memcpy((void *)(gc->pc + 52), (void *)(&width), 4);
  5536. (void) memcpy((void *)(gc->pc + 56), (void *)(&height), 4);
  5537. (void) memcpy((void *)(gc->pc + 60), (void *)(&depth), 4);
  5538. (void) memcpy((void *)(gc->pc + 64), (void *)(&extent), 4);
  5539. (void) memcpy((void *)(gc->pc + 68), (void *)(&border), 4);
  5540. (void) memcpy((void *)(gc->pc + 72), (void *)(&format), 4);
  5541. (void) memcpy((void *)(gc->pc + 76), (void *)(&type), 4);
  5542. (void) memcpy((void *)(gc->pc + 80), (void *)((pixels == NULL) ? one : zero), 4);
  5543. if (compsize > 0) {
  5544.     (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 84, gc->pc + 4);
  5545. } else {
  5546.     (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size );
  5547. }
  5548. gc->pc += cmdlen;
  5549. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5550. }
  5551. else {
  5552. const GLint op = opcode;
  5553. const GLuint cmdlenLarge = cmdlen + 4;
  5554. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  5555. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  5556. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  5557. (void) memcpy((void *)(pc + 44), (void *)(&target), 4);
  5558. (void) memcpy((void *)(pc + 48), (void *)(&level), 4);
  5559. (void) memcpy((void *)(pc + 52), (void *)(&internalformat), 4);
  5560. (void) memcpy((void *)(pc + 56), (void *)(&width), 4);
  5561. (void) memcpy((void *)(pc + 60), (void *)(&height), 4);
  5562. (void) memcpy((void *)(pc + 64), (void *)(&depth), 4);
  5563. (void) memcpy((void *)(pc + 68), (void *)(&extent), 4);
  5564. (void) memcpy((void *)(pc + 72), (void *)(&border), 4);
  5565. (void) memcpy((void *)(pc + 76), (void *)(&format), 4);
  5566. (void) memcpy((void *)(pc + 80), (void *)(&type), 4);
  5567. (void) memcpy((void *)(pc + 84), zero, 4);
  5568. __glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 88, pc + 8);
  5569. }
  5570.     }
  5571. }
  5572.  
  5573. #define X_GLrop_TexImage3D 4114
  5574. void __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
  5575. {
  5576.     __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat, width, height, depth, 1, border, format, type, pixels );
  5577. }
  5578.  
  5579. static void
  5580. __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 )
  5581. {
  5582.     struct glx_context * const gc = __glXGetCurrentContext();
  5583.     const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
  5584.     const GLuint cmdlen = 92 + __GLX_PAD(compsize);
  5585.     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
  5586. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  5587.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  5588.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  5589.     }
  5590. emit_header(gc->pc, opcode, cmdlen);
  5591. (void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4);
  5592. (void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4);
  5593. (void) memcpy((void *)(gc->pc + 48), (void *)(&xoffset), 4);
  5594. (void) memcpy((void *)(gc->pc + 52), (void *)(&yoffset), 4);
  5595. (void) memcpy((void *)(gc->pc + 56), (void *)(&zoffset), 4);
  5596. (void) memcpy((void *)(gc->pc + 60), (void *)(&woffset), 4);
  5597. (void) memcpy((void *)(gc->pc + 64), (void *)(&width), 4);
  5598. (void) memcpy((void *)(gc->pc + 68), (void *)(&height), 4);
  5599. (void) memcpy((void *)(gc->pc + 72), (void *)(&depth), 4);
  5600. (void) memcpy((void *)(gc->pc + 76), (void *)(&extent), 4);
  5601. (void) memcpy((void *)(gc->pc + 80), (void *)(&format), 4);
  5602. (void) memcpy((void *)(gc->pc + 84), (void *)(&type), 4);
  5603. (void) memset((void *)(gc->pc + 88), 0, 4);
  5604. if (compsize > 0) {
  5605.     (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 92, gc->pc + 4);
  5606. } else {
  5607.     (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size );
  5608. }
  5609. gc->pc += cmdlen;
  5610. if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5611. }
  5612. else {
  5613. const GLint op = opcode;
  5614. const GLuint cmdlenLarge = cmdlen + 4;
  5615. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  5616. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  5617. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  5618. (void) memcpy((void *)(pc + 44), (void *)(&target), 4);
  5619. (void) memcpy((void *)(pc + 48), (void *)(&level), 4);
  5620. (void) memcpy((void *)(pc + 52), (void *)(&xoffset), 4);
  5621. (void) memcpy((void *)(pc + 56), (void *)(&yoffset), 4);
  5622. (void) memcpy((void *)(pc + 60), (void *)(&zoffset), 4);
  5623. (void) memcpy((void *)(pc + 64), (void *)(&woffset), 4);
  5624. (void) memcpy((void *)(pc + 68), (void *)(&width), 4);
  5625. (void) memcpy((void *)(pc + 72), (void *)(&height), 4);
  5626. (void) memcpy((void *)(pc + 76), (void *)(&depth), 4);
  5627. (void) memcpy((void *)(pc + 80), (void *)(&extent), 4);
  5628. (void) memcpy((void *)(pc + 84), (void *)(&format), 4);
  5629. (void) memcpy((void *)(pc + 88), (void *)(&type), 4);
  5630. (void) memset((void *)(pc + 92), 0, 4);
  5631. __glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 96, pc + 8);
  5632. }
  5633.     }
  5634. }
  5635.  
  5636. #define X_GLrop_TexSubImage3D 4115
  5637. 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)
  5638. {
  5639.     __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset, yoffset, zoffset, 1, width, height, depth, 1, format, type, pixels );
  5640. }
  5641.  
  5642. #define X_GLrop_CopyTexSubImage3D 4123
  5643. void __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  5644. {
  5645.     struct glx_context * const gc = __glXGetCurrentContext();
  5646.     const GLuint cmdlen = 40;
  5647. emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
  5648. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5649. (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
  5650. (void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4);
  5651. (void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4);
  5652. (void) memcpy((void *)(gc->pc + 20), (void *)(&zoffset), 4);
  5653. (void) memcpy((void *)(gc->pc + 24), (void *)(&x), 4);
  5654. (void) memcpy((void *)(gc->pc + 28), (void *)(&y), 4);
  5655. (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
  5656. (void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4);
  5657. gc->pc += cmdlen;
  5658. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5659. }
  5660.  
  5661. #define X_GLrop_ActiveTexture 197
  5662. void __indirect_glActiveTexture(GLenum texture)
  5663. {
  5664.     struct glx_context * const gc = __glXGetCurrentContext();
  5665.     const GLuint cmdlen = 8;
  5666. emit_header(gc->pc, X_GLrop_ActiveTexture, cmdlen);
  5667. (void) memcpy((void *)(gc->pc + 4), (void *)(&texture), 4);
  5668. gc->pc += cmdlen;
  5669. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5670. }
  5671.  
  5672. #define X_GLrop_MultiTexCoord1dv 198
  5673. void __indirect_glMultiTexCoord1d(GLenum target, GLdouble s)
  5674. {
  5675.     struct glx_context * const gc = __glXGetCurrentContext();
  5676.     const GLuint cmdlen = 16;
  5677. emit_header(gc->pc, X_GLrop_MultiTexCoord1dv, cmdlen);
  5678. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
  5679. (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4);
  5680. gc->pc += cmdlen;
  5681. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5682. }
  5683.  
  5684. #define X_GLrop_MultiTexCoord1dv 198
  5685. void __indirect_glMultiTexCoord1dv(GLenum target, const GLdouble * v)
  5686. {
  5687.     struct glx_context * const gc = __glXGetCurrentContext();
  5688.     const GLuint cmdlen = 16;
  5689. emit_header(gc->pc, X_GLrop_MultiTexCoord1dv, cmdlen);
  5690. (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
  5691. (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4);
  5692. gc->pc += cmdlen;
  5693. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5694. }
  5695.  
  5696. #define X_GLrop_MultiTexCoord1fvARB 199
  5697. void __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
  5698. {
  5699.     struct glx_context * const gc = __glXGetCurrentContext();
  5700.     const GLuint cmdlen = 12;
  5701. emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
  5702. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5703. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
  5704. gc->pc += cmdlen;
  5705. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5706. }
  5707.  
  5708. #define X_GLrop_MultiTexCoord1fvARB 199
  5709. void __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
  5710. {
  5711.     struct glx_context * const gc = __glXGetCurrentContext();
  5712.     const GLuint cmdlen = 12;
  5713. emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
  5714. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5715. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  5716. gc->pc += cmdlen;
  5717. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5718. }
  5719.  
  5720. #define X_GLrop_MultiTexCoord1iv 200
  5721. void __indirect_glMultiTexCoord1i(GLenum target, GLint s)
  5722. {
  5723.     struct glx_context * const gc = __glXGetCurrentContext();
  5724.     const GLuint cmdlen = 12;
  5725. emit_header(gc->pc, X_GLrop_MultiTexCoord1iv, cmdlen);
  5726. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5727. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
  5728. gc->pc += cmdlen;
  5729. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5730. }
  5731.  
  5732. #define X_GLrop_MultiTexCoord1iv 200
  5733. void __indirect_glMultiTexCoord1iv(GLenum target, const GLint * v)
  5734. {
  5735.     struct glx_context * const gc = __glXGetCurrentContext();
  5736.     const GLuint cmdlen = 12;
  5737. emit_header(gc->pc, X_GLrop_MultiTexCoord1iv, cmdlen);
  5738. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5739. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  5740. gc->pc += cmdlen;
  5741. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5742. }
  5743.  
  5744. #define X_GLrop_MultiTexCoord1sv 201
  5745. void __indirect_glMultiTexCoord1s(GLenum target, GLshort s)
  5746. {
  5747.     struct glx_context * const gc = __glXGetCurrentContext();
  5748.     const GLuint cmdlen = 12;
  5749. emit_header(gc->pc, X_GLrop_MultiTexCoord1sv, cmdlen);
  5750. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5751. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
  5752. gc->pc += cmdlen;
  5753. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5754. }
  5755.  
  5756. #define X_GLrop_MultiTexCoord1sv 201
  5757. void __indirect_glMultiTexCoord1sv(GLenum target, const GLshort * v)
  5758. {
  5759.     struct glx_context * const gc = __glXGetCurrentContext();
  5760.     const GLuint cmdlen = 12;
  5761. emit_header(gc->pc, X_GLrop_MultiTexCoord1sv, cmdlen);
  5762. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5763. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
  5764. gc->pc += cmdlen;
  5765. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5766. }
  5767.  
  5768. #define X_GLrop_MultiTexCoord2dv 202
  5769. void __indirect_glMultiTexCoord2d(GLenum target, GLdouble s, GLdouble t)
  5770. {
  5771.     struct glx_context * const gc = __glXGetCurrentContext();
  5772.     const GLuint cmdlen = 24;
  5773. emit_header(gc->pc, X_GLrop_MultiTexCoord2dv, cmdlen);
  5774. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
  5775. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
  5776. (void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4);
  5777. gc->pc += cmdlen;
  5778. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5779. }
  5780.  
  5781. #define X_GLrop_MultiTexCoord2dv 202
  5782. void __indirect_glMultiTexCoord2dv(GLenum target, const GLdouble * v)
  5783. {
  5784.     struct glx_context * const gc = __glXGetCurrentContext();
  5785.     const GLuint cmdlen = 24;
  5786. emit_header(gc->pc, X_GLrop_MultiTexCoord2dv, cmdlen);
  5787. (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16);
  5788. (void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4);
  5789. gc->pc += cmdlen;
  5790. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5791. }
  5792.  
  5793. #define X_GLrop_MultiTexCoord2fvARB 203
  5794. void __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
  5795. {
  5796.     struct glx_context * const gc = __glXGetCurrentContext();
  5797.     const GLuint cmdlen = 16;
  5798. emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
  5799. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5800. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
  5801. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
  5802. gc->pc += cmdlen;
  5803. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5804. }
  5805.  
  5806. #define X_GLrop_MultiTexCoord2fvARB 203
  5807. void __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
  5808. {
  5809.     struct glx_context * const gc = __glXGetCurrentContext();
  5810.     const GLuint cmdlen = 16;
  5811. emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
  5812. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5813. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  5814. gc->pc += cmdlen;
  5815. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5816. }
  5817.  
  5818. #define X_GLrop_MultiTexCoord2iv 204
  5819. void __indirect_glMultiTexCoord2i(GLenum target, GLint s, GLint t)
  5820. {
  5821.     struct glx_context * const gc = __glXGetCurrentContext();
  5822.     const GLuint cmdlen = 16;
  5823. emit_header(gc->pc, X_GLrop_MultiTexCoord2iv, cmdlen);
  5824. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5825. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
  5826. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
  5827. gc->pc += cmdlen;
  5828. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5829. }
  5830.  
  5831. #define X_GLrop_MultiTexCoord2iv 204
  5832. void __indirect_glMultiTexCoord2iv(GLenum target, const GLint * v)
  5833. {
  5834.     struct glx_context * const gc = __glXGetCurrentContext();
  5835.     const GLuint cmdlen = 16;
  5836. emit_header(gc->pc, X_GLrop_MultiTexCoord2iv, cmdlen);
  5837. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5838. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  5839. gc->pc += cmdlen;
  5840. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5841. }
  5842.  
  5843. #define X_GLrop_MultiTexCoord2sv 205
  5844. void __indirect_glMultiTexCoord2s(GLenum target, GLshort s, GLshort t)
  5845. {
  5846.     struct glx_context * const gc = __glXGetCurrentContext();
  5847.     const GLuint cmdlen = 12;
  5848. emit_header(gc->pc, X_GLrop_MultiTexCoord2sv, cmdlen);
  5849. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5850. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
  5851. (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
  5852. gc->pc += cmdlen;
  5853. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5854. }
  5855.  
  5856. #define X_GLrop_MultiTexCoord2sv 205
  5857. void __indirect_glMultiTexCoord2sv(GLenum target, const GLshort * v)
  5858. {
  5859.     struct glx_context * const gc = __glXGetCurrentContext();
  5860.     const GLuint cmdlen = 12;
  5861. emit_header(gc->pc, X_GLrop_MultiTexCoord2sv, cmdlen);
  5862. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5863. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  5864. gc->pc += cmdlen;
  5865. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5866. }
  5867.  
  5868. #define X_GLrop_MultiTexCoord3dv 206
  5869. void __indirect_glMultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r)
  5870. {
  5871.     struct glx_context * const gc = __glXGetCurrentContext();
  5872.     const GLuint cmdlen = 32;
  5873. emit_header(gc->pc, X_GLrop_MultiTexCoord3dv, cmdlen);
  5874. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
  5875. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
  5876. (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
  5877. (void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4);
  5878. gc->pc += cmdlen;
  5879. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5880. }
  5881.  
  5882. #define X_GLrop_MultiTexCoord3dv 206
  5883. void __indirect_glMultiTexCoord3dv(GLenum target, const GLdouble * v)
  5884. {
  5885.     struct glx_context * const gc = __glXGetCurrentContext();
  5886.     const GLuint cmdlen = 32;
  5887. emit_header(gc->pc, X_GLrop_MultiTexCoord3dv, cmdlen);
  5888. (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24);
  5889. (void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4);
  5890. gc->pc += cmdlen;
  5891. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5892. }
  5893.  
  5894. #define X_GLrop_MultiTexCoord3fvARB 207
  5895. void __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r)
  5896. {
  5897.     struct glx_context * const gc = __glXGetCurrentContext();
  5898.     const GLuint cmdlen = 20;
  5899. emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
  5900. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5901. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
  5902. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
  5903. (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
  5904. gc->pc += cmdlen;
  5905. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5906. }
  5907.  
  5908. #define X_GLrop_MultiTexCoord3fvARB 207
  5909. void __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
  5910. {
  5911.     struct glx_context * const gc = __glXGetCurrentContext();
  5912.     const GLuint cmdlen = 20;
  5913. emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
  5914. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5915. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
  5916. gc->pc += cmdlen;
  5917. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5918. }
  5919.  
  5920. #define X_GLrop_MultiTexCoord3iv 208
  5921. void __indirect_glMultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r)
  5922. {
  5923.     struct glx_context * const gc = __glXGetCurrentContext();
  5924.     const GLuint cmdlen = 20;
  5925. emit_header(gc->pc, X_GLrop_MultiTexCoord3iv, cmdlen);
  5926. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5927. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
  5928. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
  5929. (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
  5930. gc->pc += cmdlen;
  5931. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5932. }
  5933.  
  5934. #define X_GLrop_MultiTexCoord3iv 208
  5935. void __indirect_glMultiTexCoord3iv(GLenum target, const GLint * v)
  5936. {
  5937.     struct glx_context * const gc = __glXGetCurrentContext();
  5938.     const GLuint cmdlen = 20;
  5939. emit_header(gc->pc, X_GLrop_MultiTexCoord3iv, cmdlen);
  5940. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5941. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
  5942. gc->pc += cmdlen;
  5943. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5944. }
  5945.  
  5946. #define X_GLrop_MultiTexCoord3sv 209
  5947. void __indirect_glMultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r)
  5948. {
  5949.     struct glx_context * const gc = __glXGetCurrentContext();
  5950.     const GLuint cmdlen = 16;
  5951. emit_header(gc->pc, X_GLrop_MultiTexCoord3sv, cmdlen);
  5952. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5953. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
  5954. (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
  5955. (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2);
  5956. gc->pc += cmdlen;
  5957. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5958. }
  5959.  
  5960. #define X_GLrop_MultiTexCoord3sv 209
  5961. void __indirect_glMultiTexCoord3sv(GLenum target, const GLshort * v)
  5962. {
  5963.     struct glx_context * const gc = __glXGetCurrentContext();
  5964.     const GLuint cmdlen = 16;
  5965. emit_header(gc->pc, X_GLrop_MultiTexCoord3sv, cmdlen);
  5966. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  5967. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
  5968. gc->pc += cmdlen;
  5969. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5970. }
  5971.  
  5972. #define X_GLrop_MultiTexCoord4dv 210
  5973. void __indirect_glMultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  5974. {
  5975.     struct glx_context * const gc = __glXGetCurrentContext();
  5976.     const GLuint cmdlen = 40;
  5977. emit_header(gc->pc, X_GLrop_MultiTexCoord4dv, cmdlen);
  5978. (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
  5979. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
  5980. (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
  5981. (void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8);
  5982. (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
  5983. gc->pc += cmdlen;
  5984. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5985. }
  5986.  
  5987. #define X_GLrop_MultiTexCoord4dv 210
  5988. void __indirect_glMultiTexCoord4dv(GLenum target, const GLdouble * v)
  5989. {
  5990.     struct glx_context * const gc = __glXGetCurrentContext();
  5991.     const GLuint cmdlen = 40;
  5992. emit_header(gc->pc, X_GLrop_MultiTexCoord4dv, cmdlen);
  5993. (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
  5994. (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
  5995. gc->pc += cmdlen;
  5996. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  5997. }
  5998.  
  5999. #define X_GLrop_MultiTexCoord4fvARB 211
  6000. void __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  6001. {
  6002.     struct glx_context * const gc = __glXGetCurrentContext();
  6003.     const GLuint cmdlen = 24;
  6004. emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
  6005. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6006. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
  6007. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
  6008. (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
  6009. (void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4);
  6010. gc->pc += cmdlen;
  6011. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6012. }
  6013.  
  6014. #define X_GLrop_MultiTexCoord4fvARB 211
  6015. void __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
  6016. {
  6017.     struct glx_context * const gc = __glXGetCurrentContext();
  6018.     const GLuint cmdlen = 24;
  6019. emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
  6020. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6021. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  6022. gc->pc += cmdlen;
  6023. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6024. }
  6025.  
  6026. #define X_GLrop_MultiTexCoord4iv 212
  6027. void __indirect_glMultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q)
  6028. {
  6029.     struct glx_context * const gc = __glXGetCurrentContext();
  6030.     const GLuint cmdlen = 24;
  6031. emit_header(gc->pc, X_GLrop_MultiTexCoord4iv, cmdlen);
  6032. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6033. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
  6034. (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
  6035. (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
  6036. (void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4);
  6037. gc->pc += cmdlen;
  6038. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6039. }
  6040.  
  6041. #define X_GLrop_MultiTexCoord4iv 212
  6042. void __indirect_glMultiTexCoord4iv(GLenum target, const GLint * v)
  6043. {
  6044.     struct glx_context * const gc = __glXGetCurrentContext();
  6045.     const GLuint cmdlen = 24;
  6046. emit_header(gc->pc, X_GLrop_MultiTexCoord4iv, cmdlen);
  6047. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6048. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  6049. gc->pc += cmdlen;
  6050. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6051. }
  6052.  
  6053. #define X_GLrop_MultiTexCoord4sv 213
  6054. void __indirect_glMultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
  6055. {
  6056.     struct glx_context * const gc = __glXGetCurrentContext();
  6057.     const GLuint cmdlen = 16;
  6058. emit_header(gc->pc, X_GLrop_MultiTexCoord4sv, cmdlen);
  6059. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6060. (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
  6061. (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
  6062. (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2);
  6063. (void) memcpy((void *)(gc->pc + 14), (void *)(&q), 2);
  6064. gc->pc += cmdlen;
  6065. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6066. }
  6067.  
  6068. #define X_GLrop_MultiTexCoord4sv 213
  6069. void __indirect_glMultiTexCoord4sv(GLenum target, const GLshort * v)
  6070. {
  6071.     struct glx_context * const gc = __glXGetCurrentContext();
  6072.     const GLuint cmdlen = 16;
  6073. emit_header(gc->pc, X_GLrop_MultiTexCoord4sv, cmdlen);
  6074. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6075. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  6076. gc->pc += cmdlen;
  6077. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6078. }
  6079.  
  6080. #define X_GLrop_SampleCoverage 229
  6081. void __indirect_glSampleCoverage(GLclampf value, GLboolean invert)
  6082. {
  6083.     struct glx_context * const gc = __glXGetCurrentContext();
  6084.     const GLuint cmdlen = 12;
  6085. emit_header(gc->pc, X_GLrop_SampleCoverage, cmdlen);
  6086. (void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4);
  6087. (void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1);
  6088. gc->pc += cmdlen;
  6089. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6090. }
  6091.  
  6092. #define X_GLrop_BlendFuncSeparate 4134
  6093. void __indirect_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
  6094. {
  6095.     struct glx_context * const gc = __glXGetCurrentContext();
  6096.     const GLuint cmdlen = 20;
  6097. emit_header(gc->pc, X_GLrop_BlendFuncSeparate, cmdlen);
  6098. (void) memcpy((void *)(gc->pc + 4), (void *)(&sfactorRGB), 4);
  6099. (void) memcpy((void *)(gc->pc + 8), (void *)(&dfactorRGB), 4);
  6100. (void) memcpy((void *)(gc->pc + 12), (void *)(&sfactorAlpha), 4);
  6101. (void) memcpy((void *)(gc->pc + 16), (void *)(&dfactorAlpha), 4);
  6102. gc->pc += cmdlen;
  6103. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6104. }
  6105.  
  6106. #define X_GLrop_FogCoorddv 4125
  6107. void __indirect_glFogCoordd(GLdouble coord)
  6108. {
  6109.     struct glx_context * const gc = __glXGetCurrentContext();
  6110.     const GLuint cmdlen = 12;
  6111. emit_header(gc->pc, X_GLrop_FogCoorddv, cmdlen);
  6112. (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 8);
  6113. gc->pc += cmdlen;
  6114. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6115. }
  6116.  
  6117. #define X_GLrop_FogCoorddv 4125
  6118. void __indirect_glFogCoorddv(const GLdouble * coord)
  6119. {
  6120.     generic_8_byte( X_GLrop_FogCoorddv, coord );
  6121. }
  6122.  
  6123. #define X_GLrop_PointParameterf 2065
  6124. void __indirect_glPointParameterf(GLenum pname, GLfloat param)
  6125. {
  6126.     struct glx_context * const gc = __glXGetCurrentContext();
  6127.     const GLuint cmdlen = 12;
  6128. emit_header(gc->pc, X_GLrop_PointParameterf, cmdlen);
  6129. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  6130. (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
  6131. gc->pc += cmdlen;
  6132. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6133. }
  6134.  
  6135. #define X_GLrop_PointParameterfv 2066
  6136. void __indirect_glPointParameterfv(GLenum pname, const GLfloat * params)
  6137. {
  6138.     struct glx_context * const gc = __glXGetCurrentContext();
  6139.     const GLuint compsize = __glPointParameterfv_size(pname);
  6140.     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
  6141. emit_header(gc->pc, X_GLrop_PointParameterfv, cmdlen);
  6142. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  6143. (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
  6144. gc->pc += cmdlen;
  6145. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6146. }
  6147.  
  6148. #define X_GLrop_PointParameteri 4221
  6149. void __indirect_glPointParameteri(GLenum pname, GLint param)
  6150. {
  6151.     struct glx_context * const gc = __glXGetCurrentContext();
  6152.     const GLuint cmdlen = 12;
  6153. emit_header(gc->pc, X_GLrop_PointParameteri, cmdlen);
  6154. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  6155. (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
  6156. gc->pc += cmdlen;
  6157. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6158. }
  6159.  
  6160. #define X_GLrop_PointParameteriv 4222
  6161. void __indirect_glPointParameteriv(GLenum pname, const GLint * params)
  6162. {
  6163.     struct glx_context * const gc = __glXGetCurrentContext();
  6164.     const GLuint compsize = __glPointParameteriv_size(pname);
  6165.     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
  6166. emit_header(gc->pc, X_GLrop_PointParameteriv, cmdlen);
  6167. (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
  6168. (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
  6169. gc->pc += cmdlen;
  6170. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6171. }
  6172.  
  6173. #define X_GLrop_SecondaryColor3bv 4126
  6174. void __indirect_glSecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue)
  6175. {
  6176.     struct glx_context * const gc = __glXGetCurrentContext();
  6177.     const GLuint cmdlen = 8;
  6178. emit_header(gc->pc, X_GLrop_SecondaryColor3bv, cmdlen);
  6179. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
  6180. (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
  6181. (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
  6182. gc->pc += cmdlen;
  6183. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6184. }
  6185.  
  6186. #define X_GLrop_SecondaryColor3bv 4126
  6187. void __indirect_glSecondaryColor3bv(const GLbyte * v)
  6188. {
  6189.     generic_3_byte( X_GLrop_SecondaryColor3bv, v );
  6190. }
  6191.  
  6192. #define X_GLrop_SecondaryColor3dv 4130
  6193. void __indirect_glSecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue)
  6194. {
  6195.     struct glx_context * const gc = __glXGetCurrentContext();
  6196.     const GLuint cmdlen = 28;
  6197. emit_header(gc->pc, X_GLrop_SecondaryColor3dv, cmdlen);
  6198. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
  6199. (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
  6200. (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
  6201. gc->pc += cmdlen;
  6202. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6203. }
  6204.  
  6205. #define X_GLrop_SecondaryColor3dv 4130
  6206. void __indirect_glSecondaryColor3dv(const GLdouble * v)
  6207. {
  6208.     generic_24_byte( X_GLrop_SecondaryColor3dv, v );
  6209. }
  6210.  
  6211. #define X_GLrop_SecondaryColor3iv 4128
  6212. void __indirect_glSecondaryColor3i(GLint red, GLint green, GLint blue)
  6213. {
  6214.     struct glx_context * const gc = __glXGetCurrentContext();
  6215.     const GLuint cmdlen = 16;
  6216. emit_header(gc->pc, X_GLrop_SecondaryColor3iv, cmdlen);
  6217. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  6218. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  6219. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  6220. gc->pc += cmdlen;
  6221. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6222. }
  6223.  
  6224. #define X_GLrop_SecondaryColor3iv 4128
  6225. void __indirect_glSecondaryColor3iv(const GLint * v)
  6226. {
  6227.     generic_12_byte( X_GLrop_SecondaryColor3iv, v );
  6228. }
  6229.  
  6230. #define X_GLrop_SecondaryColor3sv 4127
  6231. void __indirect_glSecondaryColor3s(GLshort red, GLshort green, GLshort blue)
  6232. {
  6233.     struct glx_context * const gc = __glXGetCurrentContext();
  6234.     const GLuint cmdlen = 12;
  6235. emit_header(gc->pc, X_GLrop_SecondaryColor3sv, cmdlen);
  6236. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
  6237. (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
  6238. (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
  6239. gc->pc += cmdlen;
  6240. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6241. }
  6242.  
  6243. #define X_GLrop_SecondaryColor3sv 4127
  6244. void __indirect_glSecondaryColor3sv(const GLshort * v)
  6245. {
  6246.     generic_6_byte( X_GLrop_SecondaryColor3sv, v );
  6247. }
  6248.  
  6249. #define X_GLrop_SecondaryColor3ubv 4131
  6250. void __indirect_glSecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue)
  6251. {
  6252.     struct glx_context * const gc = __glXGetCurrentContext();
  6253.     const GLuint cmdlen = 8;
  6254. emit_header(gc->pc, X_GLrop_SecondaryColor3ubv, cmdlen);
  6255. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
  6256. (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
  6257. (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
  6258. gc->pc += cmdlen;
  6259. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6260. }
  6261.  
  6262. #define X_GLrop_SecondaryColor3ubv 4131
  6263. void __indirect_glSecondaryColor3ubv(const GLubyte * v)
  6264. {
  6265.     generic_3_byte( X_GLrop_SecondaryColor3ubv, v );
  6266. }
  6267.  
  6268. #define X_GLrop_SecondaryColor3uiv 4133
  6269. void __indirect_glSecondaryColor3ui(GLuint red, GLuint green, GLuint blue)
  6270. {
  6271.     struct glx_context * const gc = __glXGetCurrentContext();
  6272.     const GLuint cmdlen = 16;
  6273. emit_header(gc->pc, X_GLrop_SecondaryColor3uiv, cmdlen);
  6274. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  6275. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  6276. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  6277. gc->pc += cmdlen;
  6278. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6279. }
  6280.  
  6281. #define X_GLrop_SecondaryColor3uiv 4133
  6282. void __indirect_glSecondaryColor3uiv(const GLuint * v)
  6283. {
  6284.     generic_12_byte( X_GLrop_SecondaryColor3uiv, v );
  6285. }
  6286.  
  6287. #define X_GLrop_SecondaryColor3usv 4132
  6288. void __indirect_glSecondaryColor3us(GLushort red, GLushort green, GLushort blue)
  6289. {
  6290.     struct glx_context * const gc = __glXGetCurrentContext();
  6291.     const GLuint cmdlen = 12;
  6292. emit_header(gc->pc, X_GLrop_SecondaryColor3usv, cmdlen);
  6293. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
  6294. (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
  6295. (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
  6296. gc->pc += cmdlen;
  6297. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6298. }
  6299.  
  6300. #define X_GLrop_SecondaryColor3usv 4132
  6301. void __indirect_glSecondaryColor3usv(const GLushort * v)
  6302. {
  6303.     generic_6_byte( X_GLrop_SecondaryColor3usv, v );
  6304. }
  6305.  
  6306. #define X_GLrop_WindowPos3fv 230
  6307. void __indirect_glWindowPos3f(GLfloat x, GLfloat y, GLfloat z)
  6308. {
  6309.     struct glx_context * const gc = __glXGetCurrentContext();
  6310.     const GLuint cmdlen = 16;
  6311. emit_header(gc->pc, X_GLrop_WindowPos3fv, cmdlen);
  6312. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
  6313. (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
  6314. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
  6315. gc->pc += cmdlen;
  6316. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6317. }
  6318.  
  6319. #define X_GLrop_WindowPos3fv 230
  6320. void __indirect_glWindowPos3fv(const GLfloat * v)
  6321. {
  6322.     generic_12_byte( X_GLrop_WindowPos3fv, v );
  6323. }
  6324.  
  6325. #define X_GLrop_BeginQuery 231
  6326. void __indirect_glBeginQuery(GLenum target, GLuint id)
  6327. {
  6328.     struct glx_context * const gc = __glXGetCurrentContext();
  6329.     const GLuint cmdlen = 12;
  6330. emit_header(gc->pc, X_GLrop_BeginQuery, cmdlen);
  6331. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6332. (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
  6333. gc->pc += cmdlen;
  6334. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6335. }
  6336.  
  6337. #define X_GLsop_DeleteQueries 161
  6338. void __indirect_glDeleteQueries(GLsizei n, const GLuint * ids)
  6339. {
  6340.     struct glx_context * const gc = __glXGetCurrentContext();
  6341.     Display * const dpy = gc->currentDpy;
  6342. #ifndef USE_XCB
  6343.     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
  6344. #endif
  6345.     if (n < 0) {
  6346.         __glXSetError(gc, GL_INVALID_VALUE);
  6347.         return;
  6348.     }
  6349.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  6350. #ifdef USE_XCB
  6351.         xcb_connection_t *c = XGetXCBConnection(dpy);
  6352.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  6353.         xcb_glx_delete_queries(c, gc->currentContextTag, n, ids);
  6354. #else
  6355.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteQueries, cmdlen);
  6356. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  6357. (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4));
  6358.         UnlockDisplay(dpy); SyncHandle();
  6359. #endif /* USE_XCB */
  6360.     }
  6361.     return;
  6362. }
  6363.  
  6364. #define X_GLrop_EndQuery 232
  6365. void __indirect_glEndQuery(GLenum target)
  6366. {
  6367.     struct glx_context * const gc = __glXGetCurrentContext();
  6368.     const GLuint cmdlen = 8;
  6369. emit_header(gc->pc, X_GLrop_EndQuery, cmdlen);
  6370. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6371. gc->pc += cmdlen;
  6372. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6373. }
  6374.  
  6375. #define X_GLsop_GenQueries 162
  6376. void __indirect_glGenQueries(GLsizei n, GLuint * ids)
  6377. {
  6378.     struct glx_context * const gc = __glXGetCurrentContext();
  6379.     Display * const dpy = gc->currentDpy;
  6380. #ifndef USE_XCB
  6381.     const GLuint cmdlen = 4;
  6382. #endif
  6383.     if (n < 0) {
  6384.         __glXSetError(gc, GL_INVALID_VALUE);
  6385.         return;
  6386.     }
  6387.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  6388. #ifdef USE_XCB
  6389.         xcb_connection_t *c = XGetXCBConnection(dpy);
  6390.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  6391.         xcb_glx_gen_queries_reply_t *reply = xcb_glx_gen_queries_reply(c, xcb_glx_gen_queries(c, gc->currentContextTag, n), NULL);
  6392.         (void)memcpy(ids, xcb_glx_gen_queries_data(reply), xcb_glx_gen_queries_data_length(reply) * sizeof(GLuint));
  6393.         free(reply);
  6394. #else
  6395.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenQueries, cmdlen);
  6396. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  6397.         (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
  6398.         UnlockDisplay(dpy); SyncHandle();
  6399. #endif /* USE_XCB */
  6400.     }
  6401.     return;
  6402. }
  6403.  
  6404. #define X_GLsop_GetQueryObjectiv 165
  6405. void __indirect_glGetQueryObjectiv(GLuint id, GLenum pname, GLint * params)
  6406. {
  6407.     struct glx_context * const gc = __glXGetCurrentContext();
  6408.     Display * const dpy = gc->currentDpy;
  6409. #ifndef USE_XCB
  6410.     const GLuint cmdlen = 8;
  6411. #endif
  6412.     if (__builtin_expect(dpy != NULL, 1)) {
  6413. #ifdef USE_XCB
  6414.         xcb_connection_t *c = XGetXCBConnection(dpy);
  6415.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  6416.         xcb_glx_get_query_objectiv_reply_t *reply = xcb_glx_get_query_objectiv_reply(c, xcb_glx_get_query_objectiv(c, gc->currentContextTag, id, pname), NULL);
  6417.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  6418.         /* of elements, not the length of the data part. A single element is embedded. */
  6419.         if (xcb_glx_get_query_objectiv_data_length(reply) == 1)
  6420.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  6421.         else
  6422.             (void)memcpy(params, xcb_glx_get_query_objectiv_data(reply), xcb_glx_get_query_objectiv_data_length(reply) * sizeof(GLint));
  6423.         free(reply);
  6424. #else
  6425.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectiv, cmdlen);
  6426. (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
  6427. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  6428.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  6429.         UnlockDisplay(dpy); SyncHandle();
  6430. #endif /* USE_XCB */
  6431.     }
  6432.     return;
  6433. }
  6434.  
  6435. #define X_GLsop_GetQueryObjectuiv 166
  6436. void __indirect_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint * params)
  6437. {
  6438.     struct glx_context * const gc = __glXGetCurrentContext();
  6439.     Display * const dpy = gc->currentDpy;
  6440. #ifndef USE_XCB
  6441.     const GLuint cmdlen = 8;
  6442. #endif
  6443.     if (__builtin_expect(dpy != NULL, 1)) {
  6444. #ifdef USE_XCB
  6445.         xcb_connection_t *c = XGetXCBConnection(dpy);
  6446.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  6447.         xcb_glx_get_query_objectuiv_reply_t *reply = xcb_glx_get_query_objectuiv_reply(c, xcb_glx_get_query_objectuiv(c, gc->currentContextTag, id, pname), NULL);
  6448.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  6449.         /* of elements, not the length of the data part. A single element is embedded. */
  6450.         if (xcb_glx_get_query_objectuiv_data_length(reply) == 1)
  6451.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  6452.         else
  6453.             (void)memcpy(params, xcb_glx_get_query_objectuiv_data(reply), xcb_glx_get_query_objectuiv_data_length(reply) * sizeof(GLuint));
  6454.         free(reply);
  6455. #else
  6456.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuiv, cmdlen);
  6457. (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
  6458. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  6459.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  6460.         UnlockDisplay(dpy); SyncHandle();
  6461. #endif /* USE_XCB */
  6462.     }
  6463.     return;
  6464. }
  6465.  
  6466. #define X_GLsop_GetQueryiv 164
  6467. void __indirect_glGetQueryiv(GLenum target, GLenum pname, GLint * params)
  6468. {
  6469.     struct glx_context * const gc = __glXGetCurrentContext();
  6470.     Display * const dpy = gc->currentDpy;
  6471. #ifndef USE_XCB
  6472.     const GLuint cmdlen = 8;
  6473. #endif
  6474.     if (__builtin_expect(dpy != NULL, 1)) {
  6475. #ifdef USE_XCB
  6476.         xcb_connection_t *c = XGetXCBConnection(dpy);
  6477.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  6478.         xcb_glx_get_queryiv_reply_t *reply = xcb_glx_get_queryiv_reply(c, xcb_glx_get_queryiv(c, gc->currentContextTag, target, pname), NULL);
  6479.         /* the XXX_data_length() xcb function name is misleading, it returns the number */
  6480.         /* of elements, not the length of the data part. A single element is embedded. */
  6481.         if (xcb_glx_get_queryiv_data_length(reply) == 1)
  6482.             (void)memcpy(params, &reply->datum, sizeof(reply->datum));
  6483.         else
  6484.             (void)memcpy(params, xcb_glx_get_queryiv_data(reply), xcb_glx_get_queryiv_data_length(reply) * sizeof(GLint));
  6485.         free(reply);
  6486. #else
  6487.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryiv, cmdlen);
  6488. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  6489. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  6490.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  6491.         UnlockDisplay(dpy); SyncHandle();
  6492. #endif /* USE_XCB */
  6493.     }
  6494.     return;
  6495. }
  6496.  
  6497. #define X_GLsop_IsQuery 163
  6498. GLboolean __indirect_glIsQuery(GLuint id)
  6499. {
  6500.     struct glx_context * const gc = __glXGetCurrentContext();
  6501.     Display * const dpy = gc->currentDpy;
  6502.     GLboolean retval = (GLboolean) 0;
  6503. #ifndef USE_XCB
  6504.     const GLuint cmdlen = 4;
  6505. #endif
  6506.     if (__builtin_expect(dpy != NULL, 1)) {
  6507. #ifdef USE_XCB
  6508.         xcb_connection_t *c = XGetXCBConnection(dpy);
  6509.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  6510.         xcb_glx_is_query_reply_t *reply = xcb_glx_is_query_reply(c, xcb_glx_is_query(c, gc->currentContextTag, id), NULL);
  6511.         retval = reply->ret_val;
  6512.         free(reply);
  6513. #else
  6514.         GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsQuery, cmdlen);
  6515. (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
  6516.         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
  6517.         UnlockDisplay(dpy); SyncHandle();
  6518. #endif /* USE_XCB */
  6519.     }
  6520.     return retval;
  6521. }
  6522.  
  6523. #define X_GLrop_BlendEquationSeparate 4228
  6524. void __indirect_glBlendEquationSeparate(GLenum modeRGB, GLenum modeA)
  6525. {
  6526.     struct glx_context * const gc = __glXGetCurrentContext();
  6527.     const GLuint cmdlen = 12;
  6528. emit_header(gc->pc, X_GLrop_BlendEquationSeparate, cmdlen);
  6529. (void) memcpy((void *)(gc->pc + 4), (void *)(&modeRGB), 4);
  6530. (void) memcpy((void *)(gc->pc + 8), (void *)(&modeA), 4);
  6531. gc->pc += cmdlen;
  6532. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6533. }
  6534.  
  6535. #define X_GLrop_DrawBuffers 233
  6536. void __indirect_glDrawBuffers(GLsizei n, const GLenum * bufs)
  6537. {
  6538.     struct glx_context * const gc = __glXGetCurrentContext();
  6539.     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
  6540.     if (n < 0) {
  6541.         __glXSetError(gc, GL_INVALID_VALUE);
  6542.         return;
  6543.     }
  6544.     if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
  6545. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  6546.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  6547.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  6548.     }
  6549. emit_header(gc->pc, X_GLrop_DrawBuffers, cmdlen);
  6550. (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
  6551. (void) memcpy((void *)(gc->pc + 8), (void *)(bufs), (n * 4));
  6552. gc->pc += cmdlen;
  6553. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6554. }
  6555. else {
  6556. const GLint op = X_GLrop_DrawBuffers;
  6557. const GLuint cmdlenLarge = cmdlen + 4;
  6558. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  6559. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  6560. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  6561. (void) memcpy((void *)(pc + 8), (void *)(&n), 4);
  6562.     __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
  6563. }
  6564.     }
  6565. }
  6566.  
  6567. #define X_GLrop_VertexAttrib1dv 4197
  6568. void __indirect_glVertexAttrib1d(GLuint index, GLdouble x)
  6569. {
  6570.     struct glx_context * const gc = __glXGetCurrentContext();
  6571.     const GLuint cmdlen = 16;
  6572. emit_header(gc->pc, X_GLrop_VertexAttrib1dv, cmdlen);
  6573. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6574. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
  6575. gc->pc += cmdlen;
  6576. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6577. }
  6578.  
  6579. #define X_GLrop_VertexAttrib1dv 4197
  6580. void __indirect_glVertexAttrib1dv(GLuint index, const GLdouble * v)
  6581. {
  6582.     struct glx_context * const gc = __glXGetCurrentContext();
  6583.     const GLuint cmdlen = 16;
  6584. emit_header(gc->pc, X_GLrop_VertexAttrib1dv, cmdlen);
  6585. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6586. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  6587. gc->pc += cmdlen;
  6588. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6589. }
  6590.  
  6591. #define X_GLrop_VertexAttrib1sv 4189
  6592. void __indirect_glVertexAttrib1s(GLuint index, GLshort x)
  6593. {
  6594.     struct glx_context * const gc = __glXGetCurrentContext();
  6595.     const GLuint cmdlen = 12;
  6596. emit_header(gc->pc, X_GLrop_VertexAttrib1sv, cmdlen);
  6597. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6598. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
  6599. gc->pc += cmdlen;
  6600. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6601. }
  6602.  
  6603. #define X_GLrop_VertexAttrib1sv 4189
  6604. void __indirect_glVertexAttrib1sv(GLuint index, const GLshort * v)
  6605. {
  6606.     struct glx_context * const gc = __glXGetCurrentContext();
  6607.     const GLuint cmdlen = 12;
  6608. emit_header(gc->pc, X_GLrop_VertexAttrib1sv, cmdlen);
  6609. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6610. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
  6611. gc->pc += cmdlen;
  6612. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6613. }
  6614.  
  6615. #define X_GLrop_VertexAttrib2dv 4198
  6616. void __indirect_glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
  6617. {
  6618.     struct glx_context * const gc = __glXGetCurrentContext();
  6619.     const GLuint cmdlen = 24;
  6620. emit_header(gc->pc, X_GLrop_VertexAttrib2dv, cmdlen);
  6621. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6622. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
  6623. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
  6624. gc->pc += cmdlen;
  6625. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6626. }
  6627.  
  6628. #define X_GLrop_VertexAttrib2dv 4198
  6629. void __indirect_glVertexAttrib2dv(GLuint index, const GLdouble * v)
  6630. {
  6631.     struct glx_context * const gc = __glXGetCurrentContext();
  6632.     const GLuint cmdlen = 24;
  6633. emit_header(gc->pc, X_GLrop_VertexAttrib2dv, cmdlen);
  6634. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6635. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  6636. gc->pc += cmdlen;
  6637. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6638. }
  6639.  
  6640. #define X_GLrop_VertexAttrib2sv 4190
  6641. void __indirect_glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
  6642. {
  6643.     struct glx_context * const gc = __glXGetCurrentContext();
  6644.     const GLuint cmdlen = 12;
  6645. emit_header(gc->pc, X_GLrop_VertexAttrib2sv, cmdlen);
  6646. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6647. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
  6648. (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
  6649. gc->pc += cmdlen;
  6650. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6651. }
  6652.  
  6653. #define X_GLrop_VertexAttrib2sv 4190
  6654. void __indirect_glVertexAttrib2sv(GLuint index, const GLshort * v)
  6655. {
  6656.     struct glx_context * const gc = __glXGetCurrentContext();
  6657.     const GLuint cmdlen = 12;
  6658. emit_header(gc->pc, X_GLrop_VertexAttrib2sv, cmdlen);
  6659. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6660. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  6661. gc->pc += cmdlen;
  6662. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6663. }
  6664.  
  6665. #define X_GLrop_VertexAttrib3dv 4199
  6666. void __indirect_glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
  6667. {
  6668.     struct glx_context * const gc = __glXGetCurrentContext();
  6669.     const GLuint cmdlen = 32;
  6670. emit_header(gc->pc, X_GLrop_VertexAttrib3dv, cmdlen);
  6671. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6672. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
  6673. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
  6674. (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
  6675. gc->pc += cmdlen;
  6676. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6677. }
  6678.  
  6679. #define X_GLrop_VertexAttrib3dv 4199
  6680. void __indirect_glVertexAttrib3dv(GLuint index, const GLdouble * v)
  6681. {
  6682.     struct glx_context * const gc = __glXGetCurrentContext();
  6683.     const GLuint cmdlen = 32;
  6684. emit_header(gc->pc, X_GLrop_VertexAttrib3dv, cmdlen);
  6685. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6686. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 24);
  6687. gc->pc += cmdlen;
  6688. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6689. }
  6690.  
  6691. #define X_GLrop_VertexAttrib3sv 4191
  6692. void __indirect_glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
  6693. {
  6694.     struct glx_context * const gc = __glXGetCurrentContext();
  6695.     const GLuint cmdlen = 16;
  6696. emit_header(gc->pc, X_GLrop_VertexAttrib3sv, cmdlen);
  6697. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6698. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
  6699. (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
  6700. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
  6701. gc->pc += cmdlen;
  6702. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6703. }
  6704.  
  6705. #define X_GLrop_VertexAttrib3sv 4191
  6706. void __indirect_glVertexAttrib3sv(GLuint index, const GLshort * v)
  6707. {
  6708.     struct glx_context * const gc = __glXGetCurrentContext();
  6709.     const GLuint cmdlen = 16;
  6710. emit_header(gc->pc, X_GLrop_VertexAttrib3sv, cmdlen);
  6711. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6712. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
  6713. gc->pc += cmdlen;
  6714. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6715. }
  6716.  
  6717. #define X_GLrop_VertexAttrib4Nbv 4235
  6718. void __indirect_glVertexAttrib4Nbv(GLuint index, const GLbyte * v)
  6719. {
  6720.     struct glx_context * const gc = __glXGetCurrentContext();
  6721.     const GLuint cmdlen = 12;
  6722. emit_header(gc->pc, X_GLrop_VertexAttrib4Nbv, cmdlen);
  6723. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6724. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  6725. gc->pc += cmdlen;
  6726. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6727. }
  6728.  
  6729. #define X_GLrop_VertexAttrib4Niv 4237
  6730. void __indirect_glVertexAttrib4Niv(GLuint index, const GLint * v)
  6731. {
  6732.     struct glx_context * const gc = __glXGetCurrentContext();
  6733.     const GLuint cmdlen = 24;
  6734. emit_header(gc->pc, X_GLrop_VertexAttrib4Niv, cmdlen);
  6735. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6736. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  6737. gc->pc += cmdlen;
  6738. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6739. }
  6740.  
  6741. #define X_GLrop_VertexAttrib4Nsv 4236
  6742. void __indirect_glVertexAttrib4Nsv(GLuint index, const GLshort * v)
  6743. {
  6744.     struct glx_context * const gc = __glXGetCurrentContext();
  6745.     const GLuint cmdlen = 16;
  6746. emit_header(gc->pc, X_GLrop_VertexAttrib4Nsv, cmdlen);
  6747. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6748. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  6749. gc->pc += cmdlen;
  6750. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6751. }
  6752.  
  6753. #define X_GLrop_VertexAttrib4Nubv 4201
  6754. void __indirect_glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
  6755. {
  6756.     struct glx_context * const gc = __glXGetCurrentContext();
  6757.     const GLuint cmdlen = 12;
  6758. emit_header(gc->pc, X_GLrop_VertexAttrib4Nubv, cmdlen);
  6759. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6760. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
  6761. (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
  6762. (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
  6763. (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
  6764. gc->pc += cmdlen;
  6765. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6766. }
  6767.  
  6768. #define X_GLrop_VertexAttrib4Nubv 4201
  6769. void __indirect_glVertexAttrib4Nubv(GLuint index, const GLubyte * v)
  6770. {
  6771.     struct glx_context * const gc = __glXGetCurrentContext();
  6772.     const GLuint cmdlen = 12;
  6773. emit_header(gc->pc, X_GLrop_VertexAttrib4Nubv, cmdlen);
  6774. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6775. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  6776. gc->pc += cmdlen;
  6777. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6778. }
  6779.  
  6780. #define X_GLrop_VertexAttrib4Nuiv 4239
  6781. void __indirect_glVertexAttrib4Nuiv(GLuint index, const GLuint * v)
  6782. {
  6783.     struct glx_context * const gc = __glXGetCurrentContext();
  6784.     const GLuint cmdlen = 24;
  6785. emit_header(gc->pc, X_GLrop_VertexAttrib4Nuiv, cmdlen);
  6786. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6787. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  6788. gc->pc += cmdlen;
  6789. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6790. }
  6791.  
  6792. #define X_GLrop_VertexAttrib4Nusv 4238
  6793. void __indirect_glVertexAttrib4Nusv(GLuint index, const GLushort * v)
  6794. {
  6795.     struct glx_context * const gc = __glXGetCurrentContext();
  6796.     const GLuint cmdlen = 16;
  6797. emit_header(gc->pc, X_GLrop_VertexAttrib4Nusv, cmdlen);
  6798. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6799. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  6800. gc->pc += cmdlen;
  6801. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6802. }
  6803.  
  6804. #define X_GLrop_VertexAttrib4bv 4230
  6805. void __indirect_glVertexAttrib4bv(GLuint index, const GLbyte * v)
  6806. {
  6807.     struct glx_context * const gc = __glXGetCurrentContext();
  6808.     const GLuint cmdlen = 12;
  6809. emit_header(gc->pc, X_GLrop_VertexAttrib4bv, cmdlen);
  6810. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6811. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  6812. gc->pc += cmdlen;
  6813. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6814. }
  6815.  
  6816. #define X_GLrop_VertexAttrib4dv 4200
  6817. void __indirect_glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  6818. {
  6819.     struct glx_context * const gc = __glXGetCurrentContext();
  6820.     const GLuint cmdlen = 40;
  6821. emit_header(gc->pc, X_GLrop_VertexAttrib4dv, cmdlen);
  6822. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6823. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
  6824. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
  6825. (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
  6826. (void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8);
  6827. gc->pc += cmdlen;
  6828. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6829. }
  6830.  
  6831. #define X_GLrop_VertexAttrib4dv 4200
  6832. void __indirect_glVertexAttrib4dv(GLuint index, const GLdouble * v)
  6833. {
  6834.     struct glx_context * const gc = __glXGetCurrentContext();
  6835.     const GLuint cmdlen = 40;
  6836. emit_header(gc->pc, X_GLrop_VertexAttrib4dv, cmdlen);
  6837. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6838. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 32);
  6839. gc->pc += cmdlen;
  6840. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6841. }
  6842.  
  6843. #define X_GLrop_VertexAttrib4iv 4231
  6844. void __indirect_glVertexAttrib4iv(GLuint index, const GLint * v)
  6845. {
  6846.     struct glx_context * const gc = __glXGetCurrentContext();
  6847.     const GLuint cmdlen = 24;
  6848. emit_header(gc->pc, X_GLrop_VertexAttrib4iv, cmdlen);
  6849. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6850. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  6851. gc->pc += cmdlen;
  6852. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6853. }
  6854.  
  6855. #define X_GLrop_VertexAttrib4sv 4192
  6856. void __indirect_glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
  6857. {
  6858.     struct glx_context * const gc = __glXGetCurrentContext();
  6859.     const GLuint cmdlen = 16;
  6860. emit_header(gc->pc, X_GLrop_VertexAttrib4sv, cmdlen);
  6861. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6862. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
  6863. (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
  6864. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
  6865. (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
  6866. gc->pc += cmdlen;
  6867. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6868. }
  6869.  
  6870. #define X_GLrop_VertexAttrib4sv 4192
  6871. void __indirect_glVertexAttrib4sv(GLuint index, const GLshort * v)
  6872. {
  6873.     struct glx_context * const gc = __glXGetCurrentContext();
  6874.     const GLuint cmdlen = 16;
  6875. emit_header(gc->pc, X_GLrop_VertexAttrib4sv, cmdlen);
  6876. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6877. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  6878. gc->pc += cmdlen;
  6879. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6880. }
  6881.  
  6882. #define X_GLrop_VertexAttrib4ubv 4232
  6883. void __indirect_glVertexAttrib4ubv(GLuint index, const GLubyte * v)
  6884. {
  6885.     struct glx_context * const gc = __glXGetCurrentContext();
  6886.     const GLuint cmdlen = 12;
  6887. emit_header(gc->pc, X_GLrop_VertexAttrib4ubv, cmdlen);
  6888. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6889. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  6890. gc->pc += cmdlen;
  6891. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6892. }
  6893.  
  6894. #define X_GLrop_VertexAttrib4uiv 4234
  6895. void __indirect_glVertexAttrib4uiv(GLuint index, const GLuint * v)
  6896. {
  6897.     struct glx_context * const gc = __glXGetCurrentContext();
  6898.     const GLuint cmdlen = 24;
  6899. emit_header(gc->pc, X_GLrop_VertexAttrib4uiv, cmdlen);
  6900. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6901. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  6902. gc->pc += cmdlen;
  6903. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6904. }
  6905.  
  6906. #define X_GLrop_VertexAttrib4usv 4233
  6907. void __indirect_glVertexAttrib4usv(GLuint index, const GLushort * v)
  6908. {
  6909.     struct glx_context * const gc = __glXGetCurrentContext();
  6910.     const GLuint cmdlen = 16;
  6911. emit_header(gc->pc, X_GLrop_VertexAttrib4usv, cmdlen);
  6912. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  6913. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  6914. gc->pc += cmdlen;
  6915. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6916. }
  6917.  
  6918. #define X_GLrop_ClampColor 234
  6919. void __indirect_glClampColor(GLenum target, GLenum clamp)
  6920. {
  6921.     struct glx_context * const gc = __glXGetCurrentContext();
  6922.     const GLuint cmdlen = 12;
  6923. emit_header(gc->pc, X_GLrop_ClampColor, cmdlen);
  6924. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6925. (void) memcpy((void *)(gc->pc + 8), (void *)(&clamp), 4);
  6926. gc->pc += cmdlen;
  6927. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6928. }
  6929.  
  6930. #define X_GLrop_BindProgramARB 4180
  6931. void __indirect_glBindProgramARB(GLenum target, GLuint program)
  6932. {
  6933.     struct glx_context * const gc = __glXGetCurrentContext();
  6934.     const GLuint cmdlen = 12;
  6935. emit_header(gc->pc, X_GLrop_BindProgramARB, cmdlen);
  6936. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  6937. (void) memcpy((void *)(gc->pc + 8), (void *)(&program), 4);
  6938. gc->pc += cmdlen;
  6939. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  6940. }
  6941.  
  6942. #define X_GLvop_DeleteProgramsARB 1294
  6943. void __indirect_glDeleteProgramsARB(GLsizei n, const GLuint * programs)
  6944. {
  6945.     struct glx_context * const gc = __glXGetCurrentContext();
  6946.     Display * const dpy = gc->currentDpy;
  6947.     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
  6948.     if (n < 0) {
  6949.         __glXSetError(gc, GL_INVALID_VALUE);
  6950.         return;
  6951.     }
  6952.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  6953.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteProgramsARB, cmdlen);
  6954. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  6955. (void) memcpy((void *)(pc + 4), (void *)(programs), (n * 4));
  6956.         UnlockDisplay(dpy); SyncHandle();
  6957.     }
  6958.     return;
  6959. }
  6960.  
  6961. #define X_GLvop_GenProgramsARB 1295
  6962. void __indirect_glGenProgramsARB(GLsizei n, GLuint * programs)
  6963. {
  6964.     struct glx_context * const gc = __glXGetCurrentContext();
  6965.     Display * const dpy = gc->currentDpy;
  6966.     const GLuint cmdlen = 4;
  6967.     if (n < 0) {
  6968.         __glXSetError(gc, GL_INVALID_VALUE);
  6969.         return;
  6970.     }
  6971.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  6972.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenProgramsARB, cmdlen);
  6973. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  6974.         (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
  6975.         UnlockDisplay(dpy); SyncHandle();
  6976.     }
  6977.     return;
  6978. }
  6979.  
  6980. #define X_GLvop_GetProgramStringARB 1308
  6981. void __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
  6982. {
  6983.     struct glx_context * const gc = __glXGetCurrentContext();
  6984.     Display * const dpy = gc->currentDpy;
  6985.     const GLuint cmdlen = 8;
  6986.     if (__builtin_expect(dpy != NULL, 1)) {
  6987.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringARB, cmdlen);
  6988. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  6989. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  6990.         (void) __glXReadReply(dpy, 1, string, GL_TRUE);
  6991.         UnlockDisplay(dpy); SyncHandle();
  6992.     }
  6993.     return;
  6994. }
  6995.  
  6996. #define X_GLvop_GetProgramivARB 1307
  6997. void __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
  6998. {
  6999.     struct glx_context * const gc = __glXGetCurrentContext();
  7000.     Display * const dpy = gc->currentDpy;
  7001.     const GLuint cmdlen = 8;
  7002.     if (__builtin_expect(dpy != NULL, 1)) {
  7003.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivARB, cmdlen);
  7004. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  7005. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  7006.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  7007.         UnlockDisplay(dpy); SyncHandle();
  7008.     }
  7009.     return;
  7010. }
  7011.  
  7012. #define X_GLvop_IsProgramARB 1304
  7013. GLboolean __indirect_glIsProgramARB(GLuint program)
  7014. {
  7015.     struct glx_context * const gc = __glXGetCurrentContext();
  7016.     Display * const dpy = gc->currentDpy;
  7017.     GLboolean retval = (GLboolean) 0;
  7018.     const GLuint cmdlen = 4;
  7019.     if (__builtin_expect(dpy != NULL, 1)) {
  7020.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsProgramARB, cmdlen);
  7021. (void) memcpy((void *)(pc + 0), (void *)(&program), 4);
  7022.         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
  7023.         UnlockDisplay(dpy); SyncHandle();
  7024.     }
  7025.     return retval;
  7026. }
  7027.  
  7028. #define X_GLrop_ProgramEnvParameter4dvARB 4185
  7029. void __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  7030. {
  7031.     struct glx_context * const gc = __glXGetCurrentContext();
  7032.     const GLuint cmdlen = 44;
  7033. emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
  7034. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7035. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7036. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
  7037. (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
  7038. (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
  7039. (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
  7040. gc->pc += cmdlen;
  7041. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7042. }
  7043.  
  7044. #define X_GLrop_ProgramEnvParameter4dvARB 4185
  7045. void __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
  7046. {
  7047.     struct glx_context * const gc = __glXGetCurrentContext();
  7048.     const GLuint cmdlen = 44;
  7049. emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
  7050. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7051. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7052. (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
  7053. gc->pc += cmdlen;
  7054. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7055. }
  7056.  
  7057. #define X_GLrop_ProgramEnvParameter4fvARB 4184
  7058. void __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  7059. {
  7060.     struct glx_context * const gc = __glXGetCurrentContext();
  7061.     const GLuint cmdlen = 28;
  7062. emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
  7063. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7064. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7065. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
  7066. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
  7067. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
  7068. (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
  7069. gc->pc += cmdlen;
  7070. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7071. }
  7072.  
  7073. #define X_GLrop_ProgramEnvParameter4fvARB 4184
  7074. void __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
  7075. {
  7076.     struct glx_context * const gc = __glXGetCurrentContext();
  7077.     const GLuint cmdlen = 28;
  7078. emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
  7079. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7080. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7081. (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
  7082. gc->pc += cmdlen;
  7083. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7084. }
  7085.  
  7086. #define X_GLrop_ProgramLocalParameter4dvARB 4216
  7087. void __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  7088. {
  7089.     struct glx_context * const gc = __glXGetCurrentContext();
  7090.     const GLuint cmdlen = 44;
  7091. emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
  7092. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7093. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7094. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
  7095. (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
  7096. (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
  7097. (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
  7098. gc->pc += cmdlen;
  7099. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7100. }
  7101.  
  7102. #define X_GLrop_ProgramLocalParameter4dvARB 4216
  7103. void __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
  7104. {
  7105.     struct glx_context * const gc = __glXGetCurrentContext();
  7106.     const GLuint cmdlen = 44;
  7107. emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
  7108. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7109. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7110. (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
  7111. gc->pc += cmdlen;
  7112. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7113. }
  7114.  
  7115. #define X_GLrop_ProgramLocalParameter4fvARB 4215
  7116. void __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  7117. {
  7118.     struct glx_context * const gc = __glXGetCurrentContext();
  7119.     const GLuint cmdlen = 28;
  7120. emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
  7121. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7122. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7123. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
  7124. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
  7125. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
  7126. (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
  7127. gc->pc += cmdlen;
  7128. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7129. }
  7130.  
  7131. #define X_GLrop_ProgramLocalParameter4fvARB 4215
  7132. void __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
  7133. {
  7134.     struct glx_context * const gc = __glXGetCurrentContext();
  7135.     const GLuint cmdlen = 28;
  7136. emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
  7137. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7138. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7139. (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
  7140. gc->pc += cmdlen;
  7141. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7142. }
  7143.  
  7144. #define X_GLrop_ProgramStringARB 4217
  7145. void __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string)
  7146. {
  7147.     struct glx_context * const gc = __glXGetCurrentContext();
  7148.     const GLuint cmdlen = 16 + __GLX_PAD(len);
  7149.     if (len < 0) {
  7150.         __glXSetError(gc, GL_INVALID_VALUE);
  7151.         return;
  7152.     }
  7153.     if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
  7154. if (cmdlen <= gc->maxSmallRenderCommandSize) {
  7155.     if ( (gc->pc + cmdlen) > gc->bufEnd ) {
  7156.         (void) __glXFlushRenderBuffer(gc, gc->pc);
  7157.     }
  7158. emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
  7159. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7160. (void) memcpy((void *)(gc->pc + 8), (void *)(&format), 4);
  7161. (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
  7162. (void) memcpy((void *)(gc->pc + 16), (void *)(string), len);
  7163. gc->pc += cmdlen;
  7164. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7165. }
  7166. else {
  7167. const GLint op = X_GLrop_ProgramStringARB;
  7168. const GLuint cmdlenLarge = cmdlen + 4;
  7169. GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
  7170. (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
  7171. (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
  7172. (void) memcpy((void *)(pc + 8), (void *)(&target), 4);
  7173. (void) memcpy((void *)(pc + 12), (void *)(&format), 4);
  7174. (void) memcpy((void *)(pc + 16), (void *)(&len), 4);
  7175.     __glXSendLargeCommand(gc, pc, 20, string, len);
  7176. }
  7177.     }
  7178. }
  7179.  
  7180. #define X_GLrop_VertexAttrib1fvARB 4193
  7181. void __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
  7182. {
  7183.     struct glx_context * const gc = __glXGetCurrentContext();
  7184.     const GLuint cmdlen = 12;
  7185. emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
  7186. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7187. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
  7188. gc->pc += cmdlen;
  7189. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7190. }
  7191.  
  7192. #define X_GLrop_VertexAttrib1fvARB 4193
  7193. void __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
  7194. {
  7195.     struct glx_context * const gc = __glXGetCurrentContext();
  7196.     const GLuint cmdlen = 12;
  7197. emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
  7198. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7199. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  7200. gc->pc += cmdlen;
  7201. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7202. }
  7203.  
  7204. #define X_GLrop_VertexAttrib2fvARB 4194
  7205. void __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
  7206. {
  7207.     struct glx_context * const gc = __glXGetCurrentContext();
  7208.     const GLuint cmdlen = 16;
  7209. emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
  7210. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7211. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
  7212. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
  7213. gc->pc += cmdlen;
  7214. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7215. }
  7216.  
  7217. #define X_GLrop_VertexAttrib2fvARB 4194
  7218. void __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
  7219. {
  7220.     struct glx_context * const gc = __glXGetCurrentContext();
  7221.     const GLuint cmdlen = 16;
  7222. emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
  7223. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7224. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  7225. gc->pc += cmdlen;
  7226. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7227. }
  7228.  
  7229. #define X_GLrop_VertexAttrib3fvARB 4195
  7230. void __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
  7231. {
  7232.     struct glx_context * const gc = __glXGetCurrentContext();
  7233.     const GLuint cmdlen = 20;
  7234. emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
  7235. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7236. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
  7237. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
  7238. (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
  7239. gc->pc += cmdlen;
  7240. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7241. }
  7242.  
  7243. #define X_GLrop_VertexAttrib3fvARB 4195
  7244. void __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
  7245. {
  7246.     struct glx_context * const gc = __glXGetCurrentContext();
  7247.     const GLuint cmdlen = 20;
  7248. emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
  7249. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7250. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
  7251. gc->pc += cmdlen;
  7252. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7253. }
  7254.  
  7255. #define X_GLrop_VertexAttrib4fvARB 4196
  7256. void __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  7257. {
  7258.     struct glx_context * const gc = __glXGetCurrentContext();
  7259.     const GLuint cmdlen = 24;
  7260. emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
  7261. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7262. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
  7263. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
  7264. (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
  7265. (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
  7266. gc->pc += cmdlen;
  7267. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7268. }
  7269.  
  7270. #define X_GLrop_VertexAttrib4fvARB 4196
  7271. void __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
  7272. {
  7273.     struct glx_context * const gc = __glXGetCurrentContext();
  7274.     const GLuint cmdlen = 24;
  7275. emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
  7276. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7277. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  7278. gc->pc += cmdlen;
  7279. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7280. }
  7281.  
  7282. #define X_GLrop_BindFramebuffer 236
  7283. void __indirect_glBindFramebuffer(GLenum target, GLuint framebuffer)
  7284. {
  7285.     struct glx_context * const gc = __glXGetCurrentContext();
  7286.     const GLuint cmdlen = 12;
  7287. emit_header(gc->pc, X_GLrop_BindFramebuffer, cmdlen);
  7288. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7289. (void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4);
  7290. gc->pc += cmdlen;
  7291. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7292. }
  7293.  
  7294. #define X_GLrop_BindRenderbuffer 235
  7295. void __indirect_glBindRenderbuffer(GLenum target, GLuint renderbuffer)
  7296. {
  7297.     struct glx_context * const gc = __glXGetCurrentContext();
  7298.     const GLuint cmdlen = 12;
  7299. emit_header(gc->pc, X_GLrop_BindRenderbuffer, cmdlen);
  7300. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7301. (void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4);
  7302. gc->pc += cmdlen;
  7303. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7304. }
  7305.  
  7306. #define X_GLrop_BlitFramebuffer 4330
  7307. void __indirect_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
  7308. {
  7309.     struct glx_context * const gc = __glXGetCurrentContext();
  7310.     const GLuint cmdlen = 44;
  7311. emit_header(gc->pc, X_GLrop_BlitFramebuffer, cmdlen);
  7312. (void) memcpy((void *)(gc->pc + 4), (void *)(&srcX0), 4);
  7313. (void) memcpy((void *)(gc->pc + 8), (void *)(&srcY0), 4);
  7314. (void) memcpy((void *)(gc->pc + 12), (void *)(&srcX1), 4);
  7315. (void) memcpy((void *)(gc->pc + 16), (void *)(&srcY1), 4);
  7316. (void) memcpy((void *)(gc->pc + 20), (void *)(&dstX0), 4);
  7317. (void) memcpy((void *)(gc->pc + 24), (void *)(&dstY0), 4);
  7318. (void) memcpy((void *)(gc->pc + 28), (void *)(&dstX1), 4);
  7319. (void) memcpy((void *)(gc->pc + 32), (void *)(&dstY1), 4);
  7320. (void) memcpy((void *)(gc->pc + 36), (void *)(&mask), 4);
  7321. (void) memcpy((void *)(gc->pc + 40), (void *)(&filter), 4);
  7322. gc->pc += cmdlen;
  7323. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7324. }
  7325.  
  7326. #define X_GLvop_CheckFramebufferStatus 1427
  7327. GLenum __indirect_glCheckFramebufferStatus(GLenum target)
  7328. {
  7329.     struct glx_context * const gc = __glXGetCurrentContext();
  7330.     Display * const dpy = gc->currentDpy;
  7331.     GLenum retval = (GLenum) 0;
  7332.     const GLuint cmdlen = 4;
  7333.     if (__builtin_expect(dpy != NULL, 1)) {
  7334.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_CheckFramebufferStatus, cmdlen);
  7335. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  7336.         retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
  7337.         UnlockDisplay(dpy); SyncHandle();
  7338.     }
  7339.     return retval;
  7340. }
  7341.  
  7342. #define X_GLrop_DeleteFramebuffers 4320
  7343. void __indirect_glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers)
  7344. {
  7345.     struct glx_context * const gc = __glXGetCurrentContext();
  7346.     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
  7347.     if (n < 0) {
  7348.         __glXSetError(gc, GL_INVALID_VALUE);
  7349.         return;
  7350.     }
  7351.     if (__builtin_expect(n >= 0, 1)) {
  7352. emit_header(gc->pc, X_GLrop_DeleteFramebuffers, cmdlen);
  7353. (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
  7354. (void) memcpy((void *)(gc->pc + 8), (void *)(framebuffers), (n * 4));
  7355. gc->pc += cmdlen;
  7356. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7357.     }
  7358. }
  7359.  
  7360. #define X_GLrop_DeleteRenderbuffers 4317
  7361. void __indirect_glDeleteRenderbuffers(GLsizei n, const GLuint * renderbuffers)
  7362. {
  7363.     struct glx_context * const gc = __glXGetCurrentContext();
  7364.     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
  7365.     if (n < 0) {
  7366.         __glXSetError(gc, GL_INVALID_VALUE);
  7367.         return;
  7368.     }
  7369.     if (__builtin_expect(n >= 0, 1)) {
  7370. emit_header(gc->pc, X_GLrop_DeleteRenderbuffers, cmdlen);
  7371. (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
  7372. (void) memcpy((void *)(gc->pc + 8), (void *)(renderbuffers), (n * 4));
  7373. gc->pc += cmdlen;
  7374. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7375.     }
  7376. }
  7377.  
  7378. #define X_GLrop_FramebufferRenderbuffer 4324
  7379. void __indirect_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
  7380. {
  7381.     struct glx_context * const gc = __glXGetCurrentContext();
  7382.     const GLuint cmdlen = 20;
  7383. emit_header(gc->pc, X_GLrop_FramebufferRenderbuffer, cmdlen);
  7384. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7385. (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
  7386. (void) memcpy((void *)(gc->pc + 12), (void *)(&renderbuffertarget), 4);
  7387. (void) memcpy((void *)(gc->pc + 16), (void *)(&renderbuffer), 4);
  7388. gc->pc += cmdlen;
  7389. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7390. }
  7391.  
  7392. #define X_GLrop_FramebufferTexture1D 4321
  7393. void __indirect_glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
  7394. {
  7395.     struct glx_context * const gc = __glXGetCurrentContext();
  7396.     const GLuint cmdlen = 24;
  7397. emit_header(gc->pc, X_GLrop_FramebufferTexture1D, cmdlen);
  7398. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7399. (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
  7400. (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
  7401. (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
  7402. (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
  7403. gc->pc += cmdlen;
  7404. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7405. }
  7406.  
  7407. #define X_GLrop_FramebufferTexture2D 4322
  7408. void __indirect_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
  7409. {
  7410.     struct glx_context * const gc = __glXGetCurrentContext();
  7411.     const GLuint cmdlen = 24;
  7412. emit_header(gc->pc, X_GLrop_FramebufferTexture2D, cmdlen);
  7413. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7414. (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
  7415. (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
  7416. (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
  7417. (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
  7418. gc->pc += cmdlen;
  7419. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7420. }
  7421.  
  7422. #define X_GLrop_FramebufferTexture3D 4323
  7423. void __indirect_glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer)
  7424. {
  7425.     struct glx_context * const gc = __glXGetCurrentContext();
  7426.     const GLuint cmdlen = 28;
  7427. emit_header(gc->pc, X_GLrop_FramebufferTexture3D, cmdlen);
  7428. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7429. (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
  7430. (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
  7431. (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
  7432. (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
  7433. (void) memcpy((void *)(gc->pc + 24), (void *)(&layer), 4);
  7434. gc->pc += cmdlen;
  7435. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7436. }
  7437.  
  7438. #define X_GLrop_FramebufferTextureLayer 237
  7439. void __indirect_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
  7440. {
  7441.     struct glx_context * const gc = __glXGetCurrentContext();
  7442.     const GLuint cmdlen = 24;
  7443. emit_header(gc->pc, X_GLrop_FramebufferTextureLayer, cmdlen);
  7444. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7445. (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
  7446. (void) memcpy((void *)(gc->pc + 12), (void *)(&texture), 4);
  7447. (void) memcpy((void *)(gc->pc + 16), (void *)(&level), 4);
  7448. (void) memcpy((void *)(gc->pc + 20), (void *)(&layer), 4);
  7449. gc->pc += cmdlen;
  7450. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7451. }
  7452.  
  7453. #define X_GLvop_GenFramebuffers 1426
  7454. void __indirect_glGenFramebuffers(GLsizei n, GLuint * framebuffers)
  7455. {
  7456.     struct glx_context * const gc = __glXGetCurrentContext();
  7457.     Display * const dpy = gc->currentDpy;
  7458.     const GLuint cmdlen = 4;
  7459.     if (n < 0) {
  7460.         __glXSetError(gc, GL_INVALID_VALUE);
  7461.         return;
  7462.     }
  7463.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  7464.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenFramebuffers, cmdlen);
  7465. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  7466.         (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
  7467.         UnlockDisplay(dpy); SyncHandle();
  7468.     }
  7469.     return;
  7470. }
  7471.  
  7472. #define X_GLvop_GenRenderbuffers 1423
  7473. void __indirect_glGenRenderbuffers(GLsizei n, GLuint * renderbuffers)
  7474. {
  7475.     struct glx_context * const gc = __glXGetCurrentContext();
  7476.     Display * const dpy = gc->currentDpy;
  7477.     const GLuint cmdlen = 4;
  7478.     if (n < 0) {
  7479.         __glXSetError(gc, GL_INVALID_VALUE);
  7480.         return;
  7481.     }
  7482.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  7483.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenRenderbuffers, cmdlen);
  7484. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  7485.         (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
  7486.         UnlockDisplay(dpy); SyncHandle();
  7487.     }
  7488.     return;
  7489. }
  7490.  
  7491. #define X_GLrop_GenerateMipmap 4325
  7492. void __indirect_glGenerateMipmap(GLenum target)
  7493. {
  7494.     struct glx_context * const gc = __glXGetCurrentContext();
  7495.     const GLuint cmdlen = 8;
  7496. emit_header(gc->pc, X_GLrop_GenerateMipmap, cmdlen);
  7497. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7498. gc->pc += cmdlen;
  7499. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7500. }
  7501.  
  7502. #define X_GLvop_GetFramebufferAttachmentParameteriv 1428
  7503. void __indirect_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params)
  7504. {
  7505.     struct glx_context * const gc = __glXGetCurrentContext();
  7506.     Display * const dpy = gc->currentDpy;
  7507.     const GLuint cmdlen = 12;
  7508.     if (__builtin_expect(dpy != NULL, 1)) {
  7509.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetFramebufferAttachmentParameteriv, cmdlen);
  7510. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  7511. (void) memcpy((void *)(pc + 4), (void *)(&attachment), 4);
  7512. (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
  7513.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  7514.         UnlockDisplay(dpy); SyncHandle();
  7515.     }
  7516.     return;
  7517. }
  7518.  
  7519. #define X_GLvop_GetRenderbufferParameteriv 1424
  7520. void __indirect_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params)
  7521. {
  7522.     struct glx_context * const gc = __glXGetCurrentContext();
  7523.     Display * const dpy = gc->currentDpy;
  7524.     const GLuint cmdlen = 8;
  7525.     if (__builtin_expect(dpy != NULL, 1)) {
  7526.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetRenderbufferParameteriv, cmdlen);
  7527. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  7528. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  7529.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  7530.         UnlockDisplay(dpy); SyncHandle();
  7531.     }
  7532.     return;
  7533. }
  7534.  
  7535. #define X_GLvop_IsFramebuffer 1425
  7536. GLboolean __indirect_glIsFramebuffer(GLuint framebuffer)
  7537. {
  7538.     struct glx_context * const gc = __glXGetCurrentContext();
  7539.     Display * const dpy = gc->currentDpy;
  7540.     GLboolean retval = (GLboolean) 0;
  7541.     const GLuint cmdlen = 4;
  7542.     if (__builtin_expect(dpy != NULL, 1)) {
  7543.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsFramebuffer, cmdlen);
  7544. (void) memcpy((void *)(pc + 0), (void *)(&framebuffer), 4);
  7545.         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
  7546.         UnlockDisplay(dpy); SyncHandle();
  7547.     }
  7548.     return retval;
  7549. }
  7550.  
  7551. #define X_GLvop_IsRenderbuffer 1422
  7552. GLboolean __indirect_glIsRenderbuffer(GLuint renderbuffer)
  7553. {
  7554.     struct glx_context * const gc = __glXGetCurrentContext();
  7555.     Display * const dpy = gc->currentDpy;
  7556.     GLboolean retval = (GLboolean) 0;
  7557.     const GLuint cmdlen = 4;
  7558.     if (__builtin_expect(dpy != NULL, 1)) {
  7559.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsRenderbuffer, cmdlen);
  7560. (void) memcpy((void *)(pc + 0), (void *)(&renderbuffer), 4);
  7561.         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
  7562.         UnlockDisplay(dpy); SyncHandle();
  7563.     }
  7564.     return retval;
  7565. }
  7566.  
  7567. #define X_GLrop_RenderbufferStorage 4318
  7568. void __indirect_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
  7569. {
  7570.     struct glx_context * const gc = __glXGetCurrentContext();
  7571.     const GLuint cmdlen = 20;
  7572. emit_header(gc->pc, X_GLrop_RenderbufferStorage, cmdlen);
  7573. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7574. (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
  7575. (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
  7576. (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
  7577. gc->pc += cmdlen;
  7578. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7579. }
  7580.  
  7581. #define X_GLrop_RenderbufferStorageMultisample 4331
  7582. void __indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
  7583. {
  7584.     struct glx_context * const gc = __glXGetCurrentContext();
  7585.     const GLuint cmdlen = 24;
  7586. emit_header(gc->pc, X_GLrop_RenderbufferStorageMultisample, cmdlen);
  7587. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7588. (void) memcpy((void *)(gc->pc + 8), (void *)(&samples), 4);
  7589. (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
  7590. (void) memcpy((void *)(gc->pc + 16), (void *)(&width), 4);
  7591. (void) memcpy((void *)(gc->pc + 20), (void *)(&height), 4);
  7592. gc->pc += cmdlen;
  7593. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7594. }
  7595.  
  7596. #define X_GLrop_SampleMaskSGIS 2048
  7597. void __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
  7598. {
  7599.     struct glx_context * const gc = __glXGetCurrentContext();
  7600.     const GLuint cmdlen = 12;
  7601. emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
  7602. (void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4);
  7603. (void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1);
  7604. gc->pc += cmdlen;
  7605. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7606. }
  7607.  
  7608. #define X_GLrop_SamplePatternSGIS 2049
  7609. void __indirect_glSamplePatternSGIS(GLenum pattern)
  7610. {
  7611.     struct glx_context * const gc = __glXGetCurrentContext();
  7612.     const GLuint cmdlen = 8;
  7613. emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
  7614. (void) memcpy((void *)(gc->pc + 4), (void *)(&pattern), 4);
  7615. gc->pc += cmdlen;
  7616. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7617. }
  7618.  
  7619. #define X_GLrop_SecondaryColor3fvEXT 4129
  7620. void __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
  7621. {
  7622.     struct glx_context * const gc = __glXGetCurrentContext();
  7623.     const GLuint cmdlen = 16;
  7624. emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
  7625. (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
  7626. (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
  7627. (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
  7628. gc->pc += cmdlen;
  7629. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7630. }
  7631.  
  7632. #define X_GLrop_SecondaryColor3fvEXT 4129
  7633. void __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
  7634. {
  7635.     generic_12_byte( X_GLrop_SecondaryColor3fvEXT, v );
  7636. }
  7637.  
  7638. #define X_GLrop_FogCoordfvEXT 4124
  7639. void __indirect_glFogCoordfEXT(GLfloat coord)
  7640. {
  7641.     struct glx_context * const gc = __glXGetCurrentContext();
  7642.     const GLuint cmdlen = 8;
  7643. emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
  7644. (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
  7645. gc->pc += cmdlen;
  7646. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7647. }
  7648.  
  7649. #define X_GLrop_FogCoordfvEXT 4124
  7650. void __indirect_glFogCoordfvEXT(const GLfloat * coord)
  7651. {
  7652.     generic_4_byte( X_GLrop_FogCoordfvEXT, coord );
  7653. }
  7654.  
  7655. #define X_GLvop_AreProgramsResidentNV 1293
  7656. GLboolean __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences)
  7657. {
  7658.     struct glx_context * const gc = __glXGetCurrentContext();
  7659.     Display * const dpy = gc->currentDpy;
  7660.     GLboolean retval = (GLboolean) 0;
  7661.     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
  7662.     if (n < 0) {
  7663.         __glXSetError(gc, GL_INVALID_VALUE);
  7664.         return 0;
  7665.     }
  7666.     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
  7667.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreProgramsResidentNV, cmdlen);
  7668. (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
  7669. (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4));
  7670.         retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
  7671.         UnlockDisplay(dpy); SyncHandle();
  7672.     }
  7673.     return retval;
  7674. }
  7675.  
  7676. #define X_GLrop_ExecuteProgramNV 4181
  7677. void __indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params)
  7678. {
  7679.     struct glx_context * const gc = __glXGetCurrentContext();
  7680.     const GLuint cmdlen = 28;
  7681. emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
  7682. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7683. (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
  7684. (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
  7685. gc->pc += cmdlen;
  7686. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7687. }
  7688.  
  7689. #define X_GLvop_GetProgramParameterdvNV 1297
  7690. void __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params)
  7691. {
  7692.     struct glx_context * const gc = __glXGetCurrentContext();
  7693.     Display * const dpy = gc->currentDpy;
  7694.     const GLuint cmdlen = 12;
  7695.     if (__builtin_expect(dpy != NULL, 1)) {
  7696.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterdvNV, cmdlen);
  7697. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  7698. (void) memcpy((void *)(pc + 4), (void *)(&index), 4);
  7699. (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
  7700.         (void) __glXReadReply(dpy, 8, params, GL_FALSE);
  7701.         UnlockDisplay(dpy); SyncHandle();
  7702.     }
  7703.     return;
  7704. }
  7705.  
  7706. #define X_GLvop_GetProgramParameterfvNV 1296
  7707. void __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params)
  7708. {
  7709.     struct glx_context * const gc = __glXGetCurrentContext();
  7710.     Display * const dpy = gc->currentDpy;
  7711.     const GLuint cmdlen = 12;
  7712.     if (__builtin_expect(dpy != NULL, 1)) {
  7713.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterfvNV, cmdlen);
  7714. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  7715. (void) memcpy((void *)(pc + 4), (void *)(&index), 4);
  7716. (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
  7717.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  7718.         UnlockDisplay(dpy); SyncHandle();
  7719.     }
  7720.     return;
  7721. }
  7722.  
  7723. #define X_GLvop_GetProgramStringNV 1299
  7724. void __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program)
  7725. {
  7726.     struct glx_context * const gc = __glXGetCurrentContext();
  7727.     Display * const dpy = gc->currentDpy;
  7728.     const GLuint cmdlen = 8;
  7729.     if (__builtin_expect(dpy != NULL, 1)) {
  7730.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringNV, cmdlen);
  7731. (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
  7732. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  7733.         (void) __glXReadReply(dpy, 1, program, GL_TRUE);
  7734.         UnlockDisplay(dpy); SyncHandle();
  7735.     }
  7736.     return;
  7737. }
  7738.  
  7739. #define X_GLvop_GetProgramivNV 1298
  7740. void __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
  7741. {
  7742.     struct glx_context * const gc = __glXGetCurrentContext();
  7743.     Display * const dpy = gc->currentDpy;
  7744.     const GLuint cmdlen = 8;
  7745.     if (__builtin_expect(dpy != NULL, 1)) {
  7746.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivNV, cmdlen);
  7747. (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
  7748. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  7749.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  7750.         UnlockDisplay(dpy); SyncHandle();
  7751.     }
  7752.     return;
  7753. }
  7754.  
  7755. #define X_GLvop_GetTrackMatrixivNV 1300
  7756. void __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params)
  7757. {
  7758.     struct glx_context * const gc = __glXGetCurrentContext();
  7759.     Display * const dpy = gc->currentDpy;
  7760.     const GLuint cmdlen = 12;
  7761.     if (__builtin_expect(dpy != NULL, 1)) {
  7762.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetTrackMatrixivNV, cmdlen);
  7763. (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
  7764. (void) memcpy((void *)(pc + 4), (void *)(&address), 4);
  7765. (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
  7766.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  7767.         UnlockDisplay(dpy); SyncHandle();
  7768.     }
  7769.     return;
  7770. }
  7771.  
  7772. #define X_GLvop_GetVertexAttribdvNV 1301
  7773. void __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params)
  7774. {
  7775.     struct glx_context * const gc = __glXGetCurrentContext();
  7776.     Display * const dpy = gc->currentDpy;
  7777.     const GLuint cmdlen = 8;
  7778.     if (__builtin_expect(dpy != NULL, 1)) {
  7779.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribdvNV, cmdlen);
  7780. (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
  7781. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  7782.         (void) __glXReadReply(dpy, 8, params, GL_FALSE);
  7783.         UnlockDisplay(dpy); SyncHandle();
  7784.     }
  7785.     return;
  7786. }
  7787.  
  7788. #define X_GLvop_GetVertexAttribfvNV 1302
  7789. void __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
  7790. {
  7791.     struct glx_context * const gc = __glXGetCurrentContext();
  7792.     Display * const dpy = gc->currentDpy;
  7793.     const GLuint cmdlen = 8;
  7794.     if (__builtin_expect(dpy != NULL, 1)) {
  7795.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribfvNV, cmdlen);
  7796. (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
  7797. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  7798.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  7799.         UnlockDisplay(dpy); SyncHandle();
  7800.     }
  7801.     return;
  7802. }
  7803.  
  7804. #define X_GLvop_GetVertexAttribivNV 1303
  7805. void __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
  7806. {
  7807.     struct glx_context * const gc = __glXGetCurrentContext();
  7808.     Display * const dpy = gc->currentDpy;
  7809.     const GLuint cmdlen = 8;
  7810.     if (__builtin_expect(dpy != NULL, 1)) {
  7811.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribivNV, cmdlen);
  7812. (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
  7813. (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
  7814.         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
  7815.         UnlockDisplay(dpy); SyncHandle();
  7816.     }
  7817.     return;
  7818. }
  7819.  
  7820. #define X_GLrop_LoadProgramNV 4183
  7821. void __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program)
  7822. {
  7823.     struct glx_context * const gc = __glXGetCurrentContext();
  7824.     const GLuint cmdlen = 16 + __GLX_PAD(len);
  7825.     if (len < 0) {
  7826.         __glXSetError(gc, GL_INVALID_VALUE);
  7827.         return;
  7828.     }
  7829.     if (__builtin_expect(len >= 0, 1)) {
  7830. emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
  7831. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7832. (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
  7833. (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
  7834. (void) memcpy((void *)(gc->pc + 16), (void *)(program), len);
  7835. gc->pc += cmdlen;
  7836. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7837.     }
  7838. }
  7839.  
  7840. #define X_GLrop_ProgramParameters4dvNV 4187
  7841. void __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLsizei num, const GLdouble * params)
  7842. {
  7843.     struct glx_context * const gc = __glXGetCurrentContext();
  7844.     const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
  7845.     if (num < 0) {
  7846.         __glXSetError(gc, GL_INVALID_VALUE);
  7847.         return;
  7848.     }
  7849.     if (__builtin_expect(num >= 0, 1)) {
  7850. emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
  7851. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7852. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7853. (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
  7854. (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 32));
  7855. gc->pc += cmdlen;
  7856. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7857.     }
  7858. }
  7859.  
  7860. #define X_GLrop_ProgramParameters4fvNV 4186
  7861. void __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLsizei num, const GLfloat * params)
  7862. {
  7863.     struct glx_context * const gc = __glXGetCurrentContext();
  7864.     const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
  7865.     if (num < 0) {
  7866.         __glXSetError(gc, GL_INVALID_VALUE);
  7867.         return;
  7868.     }
  7869.     if (__builtin_expect(num >= 0, 1)) {
  7870. emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
  7871. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7872. (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
  7873. (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
  7874. (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 16));
  7875. gc->pc += cmdlen;
  7876. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7877.     }
  7878. }
  7879.  
  7880. #define X_GLrop_RequestResidentProgramsNV 4182
  7881. void __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
  7882. {
  7883.     struct glx_context * const gc = __glXGetCurrentContext();
  7884.     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
  7885.     if (n < 0) {
  7886.         __glXSetError(gc, GL_INVALID_VALUE);
  7887.         return;
  7888.     }
  7889.     if (__builtin_expect(n >= 0, 1)) {
  7890. emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
  7891. (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
  7892. (void) memcpy((void *)(gc->pc + 8), (void *)(ids), (n * 4));
  7893. gc->pc += cmdlen;
  7894. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7895.     }
  7896. }
  7897.  
  7898. #define X_GLrop_TrackMatrixNV 4188
  7899. void __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform)
  7900. {
  7901.     struct glx_context * const gc = __glXGetCurrentContext();
  7902.     const GLuint cmdlen = 20;
  7903. emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
  7904. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  7905. (void) memcpy((void *)(gc->pc + 8), (void *)(&address), 4);
  7906. (void) memcpy((void *)(gc->pc + 12), (void *)(&matrix), 4);
  7907. (void) memcpy((void *)(gc->pc + 16), (void *)(&transform), 4);
  7908. gc->pc += cmdlen;
  7909. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7910. }
  7911.  
  7912. #define X_GLrop_VertexAttrib1dvNV 4273
  7913. void __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
  7914. {
  7915.     struct glx_context * const gc = __glXGetCurrentContext();
  7916.     const GLuint cmdlen = 16;
  7917. emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
  7918. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7919. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
  7920. gc->pc += cmdlen;
  7921. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7922. }
  7923.  
  7924. #define X_GLrop_VertexAttrib1dvNV 4273
  7925. void __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
  7926. {
  7927.     struct glx_context * const gc = __glXGetCurrentContext();
  7928.     const GLuint cmdlen = 16;
  7929. emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
  7930. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7931. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  7932. gc->pc += cmdlen;
  7933. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7934. }
  7935.  
  7936. #define X_GLrop_VertexAttrib1fvNV 4269
  7937. void __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
  7938. {
  7939.     struct glx_context * const gc = __glXGetCurrentContext();
  7940.     const GLuint cmdlen = 12;
  7941. emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
  7942. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7943. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
  7944. gc->pc += cmdlen;
  7945. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7946. }
  7947.  
  7948. #define X_GLrop_VertexAttrib1fvNV 4269
  7949. void __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
  7950. {
  7951.     struct glx_context * const gc = __glXGetCurrentContext();
  7952.     const GLuint cmdlen = 12;
  7953. emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
  7954. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7955. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  7956. gc->pc += cmdlen;
  7957. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7958. }
  7959.  
  7960. #define X_GLrop_VertexAttrib1svNV 4265
  7961. void __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
  7962. {
  7963.     struct glx_context * const gc = __glXGetCurrentContext();
  7964.     const GLuint cmdlen = 12;
  7965. emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
  7966. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7967. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
  7968. gc->pc += cmdlen;
  7969. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7970. }
  7971.  
  7972. #define X_GLrop_VertexAttrib1svNV 4265
  7973. void __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
  7974. {
  7975.     struct glx_context * const gc = __glXGetCurrentContext();
  7976.     const GLuint cmdlen = 12;
  7977. emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
  7978. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7979. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
  7980. gc->pc += cmdlen;
  7981. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7982. }
  7983.  
  7984. #define X_GLrop_VertexAttrib2dvNV 4274
  7985. void __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
  7986. {
  7987.     struct glx_context * const gc = __glXGetCurrentContext();
  7988.     const GLuint cmdlen = 24;
  7989. emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
  7990. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  7991. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
  7992. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
  7993. gc->pc += cmdlen;
  7994. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  7995. }
  7996.  
  7997. #define X_GLrop_VertexAttrib2dvNV 4274
  7998. void __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
  7999. {
  8000.     struct glx_context * const gc = __glXGetCurrentContext();
  8001.     const GLuint cmdlen = 24;
  8002. emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
  8003. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8004. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  8005. gc->pc += cmdlen;
  8006. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8007. }
  8008.  
  8009. #define X_GLrop_VertexAttrib2fvNV 4270
  8010. void __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
  8011. {
  8012.     struct glx_context * const gc = __glXGetCurrentContext();
  8013.     const GLuint cmdlen = 16;
  8014. emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
  8015. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8016. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
  8017. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
  8018. gc->pc += cmdlen;
  8019. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8020. }
  8021.  
  8022. #define X_GLrop_VertexAttrib2fvNV 4270
  8023. void __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
  8024. {
  8025.     struct glx_context * const gc = __glXGetCurrentContext();
  8026.     const GLuint cmdlen = 16;
  8027. emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
  8028. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8029. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  8030. gc->pc += cmdlen;
  8031. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8032. }
  8033.  
  8034. #define X_GLrop_VertexAttrib2svNV 4266
  8035. void __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
  8036. {
  8037.     struct glx_context * const gc = __glXGetCurrentContext();
  8038.     const GLuint cmdlen = 12;
  8039. emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
  8040. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8041. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
  8042. (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
  8043. gc->pc += cmdlen;
  8044. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8045. }
  8046.  
  8047. #define X_GLrop_VertexAttrib2svNV 4266
  8048. void __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
  8049. {
  8050.     struct glx_context * const gc = __glXGetCurrentContext();
  8051.     const GLuint cmdlen = 12;
  8052. emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
  8053. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8054. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  8055. gc->pc += cmdlen;
  8056. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8057. }
  8058.  
  8059. #define X_GLrop_VertexAttrib3dvNV 4275
  8060. void __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
  8061. {
  8062.     struct glx_context * const gc = __glXGetCurrentContext();
  8063.     const GLuint cmdlen = 32;
  8064. emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
  8065. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8066. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
  8067. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
  8068. (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
  8069. gc->pc += cmdlen;
  8070. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8071. }
  8072.  
  8073. #define X_GLrop_VertexAttrib3dvNV 4275
  8074. void __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
  8075. {
  8076.     struct glx_context * const gc = __glXGetCurrentContext();
  8077.     const GLuint cmdlen = 32;
  8078. emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
  8079. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8080. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 24);
  8081. gc->pc += cmdlen;
  8082. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8083. }
  8084.  
  8085. #define X_GLrop_VertexAttrib3fvNV 4271
  8086. void __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
  8087. {
  8088.     struct glx_context * const gc = __glXGetCurrentContext();
  8089.     const GLuint cmdlen = 20;
  8090. emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
  8091. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8092. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
  8093. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
  8094. (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
  8095. gc->pc += cmdlen;
  8096. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8097. }
  8098.  
  8099. #define X_GLrop_VertexAttrib3fvNV 4271
  8100. void __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
  8101. {
  8102.     struct glx_context * const gc = __glXGetCurrentContext();
  8103.     const GLuint cmdlen = 20;
  8104. emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
  8105. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8106. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
  8107. gc->pc += cmdlen;
  8108. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8109. }
  8110.  
  8111. #define X_GLrop_VertexAttrib3svNV 4267
  8112. void __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
  8113. {
  8114.     struct glx_context * const gc = __glXGetCurrentContext();
  8115.     const GLuint cmdlen = 16;
  8116. emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
  8117. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8118. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
  8119. (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
  8120. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
  8121. gc->pc += cmdlen;
  8122. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8123. }
  8124.  
  8125. #define X_GLrop_VertexAttrib3svNV 4267
  8126. void __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
  8127. {
  8128.     struct glx_context * const gc = __glXGetCurrentContext();
  8129.     const GLuint cmdlen = 16;
  8130. emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
  8131. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8132. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
  8133. gc->pc += cmdlen;
  8134. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8135. }
  8136.  
  8137. #define X_GLrop_VertexAttrib4dvNV 4276
  8138. void __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  8139. {
  8140.     struct glx_context * const gc = __glXGetCurrentContext();
  8141.     const GLuint cmdlen = 40;
  8142. emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
  8143. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8144. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
  8145. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
  8146. (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
  8147. (void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8);
  8148. gc->pc += cmdlen;
  8149. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8150. }
  8151.  
  8152. #define X_GLrop_VertexAttrib4dvNV 4276
  8153. void __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
  8154. {
  8155.     struct glx_context * const gc = __glXGetCurrentContext();
  8156.     const GLuint cmdlen = 40;
  8157. emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
  8158. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8159. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 32);
  8160. gc->pc += cmdlen;
  8161. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8162. }
  8163.  
  8164. #define X_GLrop_VertexAttrib4fvNV 4272
  8165. void __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  8166. {
  8167.     struct glx_context * const gc = __glXGetCurrentContext();
  8168.     const GLuint cmdlen = 24;
  8169. emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
  8170. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8171. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
  8172. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
  8173. (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
  8174. (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
  8175. gc->pc += cmdlen;
  8176. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8177. }
  8178.  
  8179. #define X_GLrop_VertexAttrib4fvNV 4272
  8180. void __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
  8181. {
  8182.     struct glx_context * const gc = __glXGetCurrentContext();
  8183.     const GLuint cmdlen = 24;
  8184. emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
  8185. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8186. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
  8187. gc->pc += cmdlen;
  8188. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8189. }
  8190.  
  8191. #define X_GLrop_VertexAttrib4svNV 4268
  8192. void __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
  8193. {
  8194.     struct glx_context * const gc = __glXGetCurrentContext();
  8195.     const GLuint cmdlen = 16;
  8196. emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
  8197. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8198. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
  8199. (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
  8200. (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
  8201. (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
  8202. gc->pc += cmdlen;
  8203. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8204. }
  8205.  
  8206. #define X_GLrop_VertexAttrib4svNV 4268
  8207. void __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
  8208. {
  8209.     struct glx_context * const gc = __glXGetCurrentContext();
  8210.     const GLuint cmdlen = 16;
  8211. emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
  8212. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8213. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
  8214. gc->pc += cmdlen;
  8215. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8216. }
  8217.  
  8218. #define X_GLrop_VertexAttrib4ubvNV 4277
  8219. void __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
  8220. {
  8221.     struct glx_context * const gc = __glXGetCurrentContext();
  8222.     const GLuint cmdlen = 12;
  8223. emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
  8224. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8225. (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
  8226. (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
  8227. (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
  8228. (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
  8229. gc->pc += cmdlen;
  8230. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8231. }
  8232.  
  8233. #define X_GLrop_VertexAttrib4ubvNV 4277
  8234. void __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v)
  8235. {
  8236.     struct glx_context * const gc = __glXGetCurrentContext();
  8237.     const GLuint cmdlen = 12;
  8238. emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
  8239. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8240. (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
  8241. gc->pc += cmdlen;
  8242. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8243. }
  8244.  
  8245. #define X_GLrop_VertexAttribs1dvNV 4210
  8246. void __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
  8247. {
  8248.     struct glx_context * const gc = __glXGetCurrentContext();
  8249.     const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
  8250.     if (n < 0) {
  8251.         __glXSetError(gc, GL_INVALID_VALUE);
  8252.         return;
  8253.     }
  8254.     if (__builtin_expect(n >= 0, 1)) {
  8255. emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
  8256. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8257. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8258. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
  8259. gc->pc += cmdlen;
  8260. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8261.     }
  8262. }
  8263.  
  8264. #define X_GLrop_VertexAttribs1fvNV 4206
  8265. void __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
  8266. {
  8267.     struct glx_context * const gc = __glXGetCurrentContext();
  8268.     const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
  8269.     if (n < 0) {
  8270.         __glXSetError(gc, GL_INVALID_VALUE);
  8271.         return;
  8272.     }
  8273.     if (__builtin_expect(n >= 0, 1)) {
  8274. emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
  8275. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8276. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8277. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
  8278. gc->pc += cmdlen;
  8279. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8280.     }
  8281. }
  8282.  
  8283. #define X_GLrop_VertexAttribs1svNV 4202
  8284. void __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
  8285. {
  8286.     struct glx_context * const gc = __glXGetCurrentContext();
  8287.     const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
  8288.     if (n < 0) {
  8289.         __glXSetError(gc, GL_INVALID_VALUE);
  8290.         return;
  8291.     }
  8292.     if (__builtin_expect(n >= 0, 1)) {
  8293. emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
  8294. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8295. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8296. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 2));
  8297. gc->pc += cmdlen;
  8298. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8299.     }
  8300. }
  8301.  
  8302. #define X_GLrop_VertexAttribs2dvNV 4211
  8303. void __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
  8304. {
  8305.     struct glx_context * const gc = __glXGetCurrentContext();
  8306.     const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
  8307.     if (n < 0) {
  8308.         __glXSetError(gc, GL_INVALID_VALUE);
  8309.         return;
  8310.     }
  8311.     if (__builtin_expect(n >= 0, 1)) {
  8312. emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
  8313. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8314. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8315. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
  8316. gc->pc += cmdlen;
  8317. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8318.     }
  8319. }
  8320.  
  8321. #define X_GLrop_VertexAttribs2fvNV 4207
  8322. void __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
  8323. {
  8324.     struct glx_context * const gc = __glXGetCurrentContext();
  8325.     const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
  8326.     if (n < 0) {
  8327.         __glXSetError(gc, GL_INVALID_VALUE);
  8328.         return;
  8329.     }
  8330.     if (__builtin_expect(n >= 0, 1)) {
  8331. emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
  8332. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8333. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8334. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
  8335. gc->pc += cmdlen;
  8336. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8337.     }
  8338. }
  8339.  
  8340. #define X_GLrop_VertexAttribs2svNV 4203
  8341. void __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
  8342. {
  8343.     struct glx_context * const gc = __glXGetCurrentContext();
  8344.     const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
  8345.     if (n < 0) {
  8346.         __glXSetError(gc, GL_INVALID_VALUE);
  8347.         return;
  8348.     }
  8349.     if (__builtin_expect(n >= 0, 1)) {
  8350. emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
  8351. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8352. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8353. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
  8354. gc->pc += cmdlen;
  8355. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8356.     }
  8357. }
  8358.  
  8359. #define X_GLrop_VertexAttribs3dvNV 4212
  8360. void __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
  8361. {
  8362.     struct glx_context * const gc = __glXGetCurrentContext();
  8363.     const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
  8364.     if (n < 0) {
  8365.         __glXSetError(gc, GL_INVALID_VALUE);
  8366.         return;
  8367.     }
  8368.     if (__builtin_expect(n >= 0, 1)) {
  8369. emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
  8370. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8371. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8372. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 24));
  8373. gc->pc += cmdlen;
  8374. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8375.     }
  8376. }
  8377.  
  8378. #define X_GLrop_VertexAttribs3fvNV 4208
  8379. void __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
  8380. {
  8381.     struct glx_context * const gc = __glXGetCurrentContext();
  8382.     const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
  8383.     if (n < 0) {
  8384.         __glXSetError(gc, GL_INVALID_VALUE);
  8385.         return;
  8386.     }
  8387.     if (__builtin_expect(n >= 0, 1)) {
  8388. emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
  8389. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8390. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8391. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 12));
  8392. gc->pc += cmdlen;
  8393. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8394.     }
  8395. }
  8396.  
  8397. #define X_GLrop_VertexAttribs3svNV 4204
  8398. void __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
  8399. {
  8400.     struct glx_context * const gc = __glXGetCurrentContext();
  8401.     const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
  8402.     if (n < 0) {
  8403.         __glXSetError(gc, GL_INVALID_VALUE);
  8404.         return;
  8405.     }
  8406.     if (__builtin_expect(n >= 0, 1)) {
  8407. emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
  8408. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8409. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8410. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 6));
  8411. gc->pc += cmdlen;
  8412. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8413.     }
  8414. }
  8415.  
  8416. #define X_GLrop_VertexAttribs4dvNV 4213
  8417. void __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
  8418. {
  8419.     struct glx_context * const gc = __glXGetCurrentContext();
  8420.     const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
  8421.     if (n < 0) {
  8422.         __glXSetError(gc, GL_INVALID_VALUE);
  8423.         return;
  8424.     }
  8425.     if (__builtin_expect(n >= 0, 1)) {
  8426. emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
  8427. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8428. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8429. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 32));
  8430. gc->pc += cmdlen;
  8431. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8432.     }
  8433. }
  8434.  
  8435. #define X_GLrop_VertexAttribs4fvNV 4209
  8436. void __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
  8437. {
  8438.     struct glx_context * const gc = __glXGetCurrentContext();
  8439.     const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
  8440.     if (n < 0) {
  8441.         __glXSetError(gc, GL_INVALID_VALUE);
  8442.         return;
  8443.     }
  8444.     if (__builtin_expect(n >= 0, 1)) {
  8445. emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
  8446. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8447. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8448. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
  8449. gc->pc += cmdlen;
  8450. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8451.     }
  8452. }
  8453.  
  8454. #define X_GLrop_VertexAttribs4svNV 4205
  8455. void __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
  8456. {
  8457.     struct glx_context * const gc = __glXGetCurrentContext();
  8458.     const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
  8459.     if (n < 0) {
  8460.         __glXSetError(gc, GL_INVALID_VALUE);
  8461.         return;
  8462.     }
  8463.     if (__builtin_expect(n >= 0, 1)) {
  8464. emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
  8465. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8466. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8467. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
  8468. gc->pc += cmdlen;
  8469. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8470.     }
  8471. }
  8472.  
  8473. #define X_GLrop_VertexAttribs4ubvNV 4214
  8474. void __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
  8475. {
  8476.     struct glx_context * const gc = __glXGetCurrentContext();
  8477.     const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
  8478.     if (n < 0) {
  8479.         __glXSetError(gc, GL_INVALID_VALUE);
  8480.         return;
  8481.     }
  8482.     if (__builtin_expect(n >= 0, 1)) {
  8483. emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
  8484. (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
  8485. (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
  8486. (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
  8487. gc->pc += cmdlen;
  8488. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8489.     }
  8490. }
  8491.  
  8492. #define X_GLrop_ActiveStencilFaceEXT 4220
  8493. void __indirect_glActiveStencilFaceEXT(GLenum face)
  8494. {
  8495.     struct glx_context * const gc = __glXGetCurrentContext();
  8496.     const GLuint cmdlen = 8;
  8497. emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
  8498. (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
  8499. gc->pc += cmdlen;
  8500. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8501. }
  8502.  
  8503. #define X_GLvop_GetProgramNamedParameterdvNV 1311
  8504. void __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params)
  8505. {
  8506.     struct glx_context * const gc = __glXGetCurrentContext();
  8507.     Display * const dpy = gc->currentDpy;
  8508.     const GLuint cmdlen = 8 + __GLX_PAD(len);
  8509.     if (len < 0) {
  8510.         __glXSetError(gc, GL_INVALID_VALUE);
  8511.         return;
  8512.     }
  8513.     if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
  8514.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterdvNV, cmdlen);
  8515. (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
  8516. (void) memcpy((void *)(pc + 4), (void *)(&len), 4);
  8517. (void) memcpy((void *)(pc + 8), (void *)(name), len);
  8518.         (void) __glXReadReply(dpy, 8, params, GL_TRUE);
  8519.         UnlockDisplay(dpy); SyncHandle();
  8520.     }
  8521.     return;
  8522. }
  8523.  
  8524. #define X_GLvop_GetProgramNamedParameterfvNV 1310
  8525. void __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params)
  8526. {
  8527.     struct glx_context * const gc = __glXGetCurrentContext();
  8528.     Display * const dpy = gc->currentDpy;
  8529.     const GLuint cmdlen = 8 + __GLX_PAD(len);
  8530.     if (len < 0) {
  8531.         __glXSetError(gc, GL_INVALID_VALUE);
  8532.         return;
  8533.     }
  8534.     if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
  8535.         GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterfvNV, cmdlen);
  8536. (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
  8537. (void) memcpy((void *)(pc + 4), (void *)(&len), 4);
  8538. (void) memcpy((void *)(pc + 8), (void *)(name), len);
  8539.         (void) __glXReadReply(dpy, 4, params, GL_TRUE);
  8540.         UnlockDisplay(dpy); SyncHandle();
  8541.     }
  8542.     return;
  8543. }
  8544.  
  8545. #define X_GLrop_ProgramNamedParameter4dvNV 4219
  8546. void __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  8547. {
  8548.     struct glx_context * const gc = __glXGetCurrentContext();
  8549.     const GLuint cmdlen = 44 + __GLX_PAD(len);
  8550.     if (len < 0) {
  8551.         __glXSetError(gc, GL_INVALID_VALUE);
  8552.         return;
  8553.     }
  8554.     if (__builtin_expect(len >= 0, 1)) {
  8555. emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
  8556. (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
  8557. (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
  8558. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
  8559. (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
  8560. (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
  8561. (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
  8562. (void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
  8563. gc->pc += cmdlen;
  8564. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8565.     }
  8566. }
  8567.  
  8568. #define X_GLrop_ProgramNamedParameter4dvNV 4219
  8569. void __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v)
  8570. {
  8571.     struct glx_context * const gc = __glXGetCurrentContext();
  8572.     const GLuint cmdlen = 44 + __GLX_PAD(len);
  8573.     if (len < 0) {
  8574.         __glXSetError(gc, GL_INVALID_VALUE);
  8575.         return;
  8576.     }
  8577.     if (__builtin_expect(len >= 0, 1)) {
  8578. emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
  8579. (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
  8580. (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
  8581. (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
  8582. (void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
  8583. gc->pc += cmdlen;
  8584. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8585.     }
  8586. }
  8587.  
  8588. #define X_GLrop_ProgramNamedParameter4fvNV 4218
  8589. void __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  8590. {
  8591.     struct glx_context * const gc = __glXGetCurrentContext();
  8592.     const GLuint cmdlen = 28 + __GLX_PAD(len);
  8593.     if (len < 0) {
  8594.         __glXSetError(gc, GL_INVALID_VALUE);
  8595.         return;
  8596.     }
  8597.     if (__builtin_expect(len >= 0, 1)) {
  8598. emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
  8599. (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
  8600. (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
  8601. (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
  8602. (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
  8603. (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
  8604. (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
  8605. (void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
  8606. gc->pc += cmdlen;
  8607. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8608.     }
  8609. }
  8610.  
  8611. #define X_GLrop_ProgramNamedParameter4fvNV 4218
  8612. void __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v)
  8613. {
  8614.     struct glx_context * const gc = __glXGetCurrentContext();
  8615.     const GLuint cmdlen = 28 + __GLX_PAD(len);
  8616.     if (len < 0) {
  8617.         __glXSetError(gc, GL_INVALID_VALUE);
  8618.         return;
  8619.     }
  8620.     if (__builtin_expect(len >= 0, 1)) {
  8621. emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
  8622. (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
  8623. (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
  8624. (void) memcpy((void *)(gc->pc + 12), (void *)(v), 16);
  8625. (void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
  8626. gc->pc += cmdlen;
  8627. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8628.     }
  8629. }
  8630.  
  8631. #define X_GLrop_BindFramebufferEXT 4319
  8632. void __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
  8633. {
  8634.     struct glx_context * const gc = __glXGetCurrentContext();
  8635.     const GLuint cmdlen = 12;
  8636. emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
  8637. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  8638. (void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4);
  8639. gc->pc += cmdlen;
  8640. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8641. }
  8642.  
  8643. #define X_GLrop_BindRenderbufferEXT 4316
  8644. void __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
  8645. {
  8646.     struct glx_context * const gc = __glXGetCurrentContext();
  8647.     const GLuint cmdlen = 12;
  8648. emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
  8649. (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
  8650. (void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4);
  8651. gc->pc += cmdlen;
  8652. if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
  8653. }
  8654.  
  8655.  
  8656. #ifdef GLX_SHARED_GLAPI
  8657.  
  8658. static const struct proc_pair
  8659. {
  8660.    const char *name;
  8661.    _glapi_proc proc;
  8662. } proc_pairs[20] = {
  8663.    { "AreTexturesResidentEXT", (_glapi_proc) glAreTexturesResidentEXT },
  8664.    { "DeleteTexturesEXT", (_glapi_proc) glDeleteTexturesEXT },
  8665.    { "GenTexturesEXT", (_glapi_proc) glGenTexturesEXT },
  8666.    { "GetColorTableEXT", (_glapi_proc) gl_dispatch_stub_343 },
  8667.    { "GetColorTableParameterfvEXT", (_glapi_proc) gl_dispatch_stub_344 },
  8668.    { "GetColorTableParameterfvSGI", (_glapi_proc) gl_dispatch_stub_344 },
  8669.    { "GetColorTableParameterivEXT", (_glapi_proc) gl_dispatch_stub_345 },
  8670.    { "GetColorTableParameterivSGI", (_glapi_proc) gl_dispatch_stub_345 },
  8671.    { "GetColorTableSGI", (_glapi_proc) gl_dispatch_stub_343 },
  8672.    { "GetConvolutionFilterEXT", (_glapi_proc) gl_dispatch_stub_356 },
  8673.    { "GetConvolutionParameterfvEXT", (_glapi_proc) gl_dispatch_stub_357 },
  8674.    { "GetConvolutionParameterivEXT", (_glapi_proc) gl_dispatch_stub_358 },
  8675.    { "GetHistogramEXT", (_glapi_proc) gl_dispatch_stub_361 },
  8676.    { "GetHistogramParameterfvEXT", (_glapi_proc) gl_dispatch_stub_362 },
  8677.    { "GetHistogramParameterivEXT", (_glapi_proc) gl_dispatch_stub_363 },
  8678.    { "GetMinmaxEXT", (_glapi_proc) gl_dispatch_stub_364 },
  8679.    { "GetMinmaxParameterfvEXT", (_glapi_proc) gl_dispatch_stub_365 },
  8680.    { "GetMinmaxParameterivEXT", (_glapi_proc) gl_dispatch_stub_366 },
  8681.    { "GetSeparableFilterEXT", (_glapi_proc) gl_dispatch_stub_359 },
  8682.    { "IsTextureEXT", (_glapi_proc) glIsTextureEXT }
  8683. };
  8684.  
  8685. static int
  8686. __indirect_get_proc_compare(const void *key, const void *memb)
  8687. {
  8688.    const struct proc_pair *pair = (const struct proc_pair *) memb;
  8689.    return strcmp((const char *) key, pair->name);
  8690. }
  8691.  
  8692. _glapi_proc
  8693. __indirect_get_proc_address(const char *name)
  8694. {
  8695.    const struct proc_pair *pair;
  8696.    
  8697.    /* skip "gl" */
  8698.    name += 2;
  8699.  
  8700.    pair = (const struct proc_pair *) bsearch((const void *) name,
  8701.       (const void *) proc_pairs, ARRAY_SIZE(proc_pairs), sizeof(proc_pairs[0]),
  8702.       __indirect_get_proc_compare);
  8703.  
  8704.    return (pair) ? pair->proc : NULL;
  8705. }
  8706.  
  8707. #endif /* GLX_SHARED_GLAPI */
  8708.  
  8709.  
  8710. #  undef FASTCALL
  8711. #  undef NOINLINE
  8712.