Tizen 2.0 Release
[profile/ivi/osmesa.git] / src / glx / indirect.c
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 "glthread.h"
35 #include <GL/glxproto.h>
36 #ifdef USE_XCB
37 #include <X11/Xlib-xcb.h>
38 #include <xcb/xcb.h>
39 #include <xcb/glx.h>
40 #endif /* USE_XCB */
41
42 #define __GLX_PAD(n) (((n) + 3) & ~3)
43
44 #if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
45 #define FASTCALL __attribute__((fastcall))
46 #else
47 #define FASTCALL
48 #endif
49 #if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
50 #define NOINLINE __attribute__((noinline))
51 #else
52 #define NOINLINE
53 #endif
54
55 #ifndef __GNUC__
56 #define __builtin_expect(x, y) x
57 #endif
58
59 /* If the size and opcode values are known at compile-time, this will, on
60  * x86 at least, emit them with a single instruction.
61  */
62 #define emit_header(dest, op, size)            \
63     do { union { short s[2]; int i; } temp;    \
64          temp.s[0] = (size); temp.s[1] = (op); \
65          *((int *)(dest)) = temp.i; } while(0)
66
67 NOINLINE CARD32
68 __glXReadReply(Display * dpy, size_t size, void *dest,
69                GLboolean reply_is_always_array)
70 {
71     xGLXSingleReply reply;
72
73     (void) _XReply(dpy, (xReply *) & reply, 0, False);
74     if (size != 0) {
75         if ((reply.length > 0) || reply_is_always_array) {
76             const GLint bytes = (reply_is_always_array)
77                 ? (4 * reply.length) : (reply.size * size);
78             const GLint extra = 4 - (bytes & 3);
79
80             _XRead(dpy, dest, bytes);
81             if (extra < 4) {
82                 _XEatData(dpy, extra);
83             }
84         } else {
85             (void) memcpy(dest, &(reply.pad3), size);
86         }
87     }
88
89     return reply.retval;
90 }
91
92 NOINLINE void
93 __glXReadPixelReply(Display * dpy, struct glx_context *gc, unsigned max_dim,
94                     GLint width, GLint height, GLint depth, GLenum format,
95                     GLenum type, void *dest, GLboolean dimensions_in_reply)
96 {
97     xGLXSingleReply reply;
98     GLint size;
99
100     (void) _XReply(dpy, (xReply *) & reply, 0, False);
101
102     if (dimensions_in_reply) {
103         width = reply.pad3;
104         height = reply.pad4;
105         depth = reply.pad5;
106
107         if ((height == 0) || (max_dim < 2)) {
108             height = 1;
109         }
110         if ((depth == 0) || (max_dim < 3)) {
111             depth = 1;
112         }
113     }
114
115     size = reply.length * 4;
116     if (size != 0) {
117         void *buf = Xmalloc(size);
118
119         if (buf == NULL) {
120             _XEatData(dpy, size);
121             __glXSetError(gc, GL_OUT_OF_MEMORY);
122         } else {
123             const GLint extra = 4 - (size & 3);
124
125             _XRead(dpy, buf, size);
126             if (extra < 4) {
127                 _XEatData(dpy, extra);
128             }
129
130             __glEmptyImage(gc, 3, width, height, depth, format, type,
131                            buf, dest);
132             Xfree(buf);
133         }
134     }
135 }
136
137 #define X_GLXSingle 0
138
139 NOINLINE FASTCALL GLubyte *
140 __glXSetupSingleRequest(struct glx_context *gc, GLint sop, GLint cmdlen)
141 {
142     xGLXSingleReq *req;
143     Display *const dpy = gc->currentDpy;
144
145     (void) __glXFlushRenderBuffer(gc, gc->pc);
146     LockDisplay(dpy);
147     GetReqExtra(GLXSingle, cmdlen, req);
148     req->reqType = gc->majorOpcode;
149     req->contextTag = gc->currentContextTag;
150     req->glxCode = sop;
151     return (GLubyte *) (req) + sz_xGLXSingleReq;
152 }
153
154 NOINLINE FASTCALL GLubyte *
155 __glXSetupVendorRequest(struct glx_context *gc, GLint code, GLint vop,
156                         GLint cmdlen)
157 {
158     xGLXVendorPrivateReq *req;
159     Display *const dpy = gc->currentDpy;
160
161     (void) __glXFlushRenderBuffer(gc, gc->pc);
162     LockDisplay(dpy);
163     GetReqExtra(GLXVendorPrivate, cmdlen, req);
164     req->reqType = gc->majorOpcode;
165     req->glxCode = code;
166     req->vendorCode = vop;
167     req->contextTag = gc->currentContextTag;
168     return (GLubyte *) (req) + sz_xGLXVendorPrivateReq;
169 }
170
171 const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
172
173 #define zero                        (__glXDefaultPixelStore+0)
174 #define one                         (__glXDefaultPixelStore+8)
175 #define default_pixel_store_1D      (__glXDefaultPixelStore+4)
176 #define default_pixel_store_1D_size 20
177 #define default_pixel_store_2D      (__glXDefaultPixelStore+4)
178 #define default_pixel_store_2D_size 20
179 #define default_pixel_store_3D      (__glXDefaultPixelStore+0)
180 #define default_pixel_store_3D_size 36
181 #define default_pixel_store_4D      (__glXDefaultPixelStore+0)
182 #define default_pixel_store_4D_size 36
183
184 static FASTCALL NOINLINE void
185 generic_3_byte(GLint rop, const void *ptr)
186 {
187     struct glx_context *const gc = __glXGetCurrentContext();
188     const GLuint cmdlen = 8;
189
190     emit_header(gc->pc, rop, cmdlen);
191     (void) memcpy((void *) (gc->pc + 4), ptr, 4);
192     gc->pc += cmdlen;
193     if (__builtin_expect(gc->pc > gc->limit, 0)) {
194         (void) __glXFlushRenderBuffer(gc, gc->pc);
195     }
196 }
197
198 static FASTCALL NOINLINE void
199 generic_4_byte(GLint rop, const void *ptr)
200 {
201     struct glx_context *const gc = __glXGetCurrentContext();
202     const GLuint cmdlen = 8;
203
204     emit_header(gc->pc, rop, cmdlen);
205     (void) memcpy((void *) (gc->pc + 4), ptr, 4);
206     gc->pc += cmdlen;
207     if (__builtin_expect(gc->pc > gc->limit, 0)) {
208         (void) __glXFlushRenderBuffer(gc, gc->pc);
209     }
210 }
211
212 static FASTCALL NOINLINE void
213 generic_6_byte(GLint rop, const void *ptr)
214 {
215     struct glx_context *const gc = __glXGetCurrentContext();
216     const GLuint cmdlen = 12;
217
218     emit_header(gc->pc, rop, cmdlen);
219     (void) memcpy((void *) (gc->pc + 4), ptr, 8);
220     gc->pc += cmdlen;
221     if (__builtin_expect(gc->pc > gc->limit, 0)) {
222         (void) __glXFlushRenderBuffer(gc, gc->pc);
223     }
224 }
225
226 static FASTCALL NOINLINE void
227 generic_8_byte(GLint rop, const void *ptr)
228 {
229     struct glx_context *const gc = __glXGetCurrentContext();
230     const GLuint cmdlen = 12;
231
232     emit_header(gc->pc, rop, cmdlen);
233     (void) memcpy((void *) (gc->pc + 4), ptr, 8);
234     gc->pc += cmdlen;
235     if (__builtin_expect(gc->pc > gc->limit, 0)) {
236         (void) __glXFlushRenderBuffer(gc, gc->pc);
237     }
238 }
239
240 static FASTCALL NOINLINE void
241 generic_12_byte(GLint rop, const void *ptr)
242 {
243     struct glx_context *const gc = __glXGetCurrentContext();
244     const GLuint cmdlen = 16;
245
246     emit_header(gc->pc, rop, cmdlen);
247     (void) memcpy((void *) (gc->pc + 4), ptr, 12);
248     gc->pc += cmdlen;
249     if (__builtin_expect(gc->pc > gc->limit, 0)) {
250         (void) __glXFlushRenderBuffer(gc, gc->pc);
251     }
252 }
253
254 static FASTCALL NOINLINE void
255 generic_16_byte(GLint rop, const void *ptr)
256 {
257     struct glx_context *const gc = __glXGetCurrentContext();
258     const GLuint cmdlen = 20;
259
260     emit_header(gc->pc, rop, cmdlen);
261     (void) memcpy((void *) (gc->pc + 4), ptr, 16);
262     gc->pc += cmdlen;
263     if (__builtin_expect(gc->pc > gc->limit, 0)) {
264         (void) __glXFlushRenderBuffer(gc, gc->pc);
265     }
266 }
267
268 static FASTCALL NOINLINE void
269 generic_24_byte(GLint rop, const void *ptr)
270 {
271     struct glx_context *const gc = __glXGetCurrentContext();
272     const GLuint cmdlen = 28;
273
274     emit_header(gc->pc, rop, cmdlen);
275     (void) memcpy((void *) (gc->pc + 4), ptr, 24);
276     gc->pc += cmdlen;
277     if (__builtin_expect(gc->pc > gc->limit, 0)) {
278         (void) __glXFlushRenderBuffer(gc, gc->pc);
279     }
280 }
281
282 static FASTCALL NOINLINE void
283 generic_32_byte(GLint rop, const void *ptr)
284 {
285     struct glx_context *const gc = __glXGetCurrentContext();
286     const GLuint cmdlen = 36;
287
288     emit_header(gc->pc, rop, cmdlen);
289     (void) memcpy((void *) (gc->pc + 4), ptr, 32);
290     gc->pc += cmdlen;
291     if (__builtin_expect(gc->pc > gc->limit, 0)) {
292         (void) __glXFlushRenderBuffer(gc, gc->pc);
293     }
294 }
295
296 #define X_GLsop_NewList 101
297 void
298 __indirect_glNewList(GLuint list, GLenum mode)
299 {
300     struct glx_context *const gc = __glXGetCurrentContext();
301     Display *const dpy = gc->currentDpy;
302 #ifndef USE_XCB
303     const GLuint cmdlen = 8;
304 #endif
305     if (__builtin_expect(dpy != NULL, 1)) {
306 #ifdef USE_XCB
307         xcb_connection_t *c = XGetXCBConnection(dpy);
308         (void) __glXFlushRenderBuffer(gc, gc->pc);
309         xcb_glx_new_list(c, gc->currentContextTag, list, mode);
310 #else
311         GLubyte const *pc =
312             __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
313         (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
314         (void) memcpy((void *) (pc + 4), (void *) (&mode), 4);
315         UnlockDisplay(dpy);
316         SyncHandle();
317 #endif /* USE_XCB */
318     }
319     return;
320 }
321
322 #define X_GLsop_EndList 102
323 void
324 __indirect_glEndList(void)
325 {
326     struct glx_context *const gc = __glXGetCurrentContext();
327     Display *const dpy = gc->currentDpy;
328 #ifndef USE_XCB
329     const GLuint cmdlen = 0;
330 #endif
331     if (__builtin_expect(dpy != NULL, 1)) {
332 #ifdef USE_XCB
333         xcb_connection_t *c = XGetXCBConnection(dpy);
334         (void) __glXFlushRenderBuffer(gc, gc->pc);
335         xcb_glx_end_list(c, gc->currentContextTag);
336 #else
337         (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
338         UnlockDisplay(dpy);
339         SyncHandle();
340 #endif /* USE_XCB */
341     }
342     return;
343 }
344
345 #define X_GLrop_CallList 1
346 void
347 __indirect_glCallList(GLuint list)
348 {
349     struct glx_context *const gc = __glXGetCurrentContext();
350     const GLuint cmdlen = 8;
351     emit_header(gc->pc, X_GLrop_CallList, cmdlen);
352     (void) memcpy((void *) (gc->pc + 4), (void *) (&list), 4);
353     gc->pc += cmdlen;
354     if (__builtin_expect(gc->pc > gc->limit, 0)) {
355         (void) __glXFlushRenderBuffer(gc, gc->pc);
356     }
357 }
358
359 #define X_GLrop_CallLists 2
360 void
361 __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
362 {
363     struct glx_context *const gc = __glXGetCurrentContext();
364     const GLuint compsize = __glCallLists_size(type);
365     const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
366     if (n < 0) {
367         __glXSetError(gc, GL_INVALID_VALUE);
368         return;
369     }
370     if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
371         if (cmdlen <= gc->maxSmallRenderCommandSize) {
372             if ((gc->pc + cmdlen) > gc->bufEnd) {
373                 (void) __glXFlushRenderBuffer(gc, gc->pc);
374             }
375             emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
376             (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
377             (void) memcpy((void *) (gc->pc + 8), (void *) (&type), 4);
378             (void) memcpy((void *) (gc->pc + 12), (void *) (lists),
379                           (compsize * n));
380             gc->pc += cmdlen;
381             if (__builtin_expect(gc->pc > gc->limit, 0)) {
382                 (void) __glXFlushRenderBuffer(gc, gc->pc);
383             }
384         } else {
385             const GLint op = X_GLrop_CallLists;
386             const GLuint cmdlenLarge = cmdlen + 4;
387             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
388             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
389             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
390             (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
391             (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
392             __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
393         }
394     }
395 }
396
397 #define X_GLsop_DeleteLists 103
398 void
399 __indirect_glDeleteLists(GLuint list, GLsizei range)
400 {
401     struct glx_context *const gc = __glXGetCurrentContext();
402     Display *const dpy = gc->currentDpy;
403 #ifndef USE_XCB
404     const GLuint cmdlen = 8;
405 #endif
406     if (__builtin_expect(dpy != NULL, 1)) {
407 #ifdef USE_XCB
408         xcb_connection_t *c = XGetXCBConnection(dpy);
409         (void) __glXFlushRenderBuffer(gc, gc->pc);
410         xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
411 #else
412         GLubyte const *pc =
413             __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
414         (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
415         (void) memcpy((void *) (pc + 4), (void *) (&range), 4);
416         UnlockDisplay(dpy);
417         SyncHandle();
418 #endif /* USE_XCB */
419     }
420     return;
421 }
422
423 #define X_GLsop_GenLists 104
424 GLuint
425 __indirect_glGenLists(GLsizei range)
426 {
427     struct glx_context *const gc = __glXGetCurrentContext();
428     Display *const dpy = gc->currentDpy;
429     GLuint retval = (GLuint) 0;
430 #ifndef USE_XCB
431     const GLuint cmdlen = 4;
432 #endif
433     if (__builtin_expect(dpy != NULL, 1)) {
434 #ifdef USE_XCB
435         xcb_connection_t *c = XGetXCBConnection(dpy);
436         (void) __glXFlushRenderBuffer(gc, gc->pc);
437         xcb_glx_gen_lists_reply_t *reply =
438             xcb_glx_gen_lists_reply(c,
439                                     xcb_glx_gen_lists(c,
440                                                       gc->currentContextTag,
441                                                       range), NULL);
442         retval = reply->ret_val;
443         free(reply);
444 #else
445         GLubyte const *pc =
446             __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
447         (void) memcpy((void *) (pc + 0), (void *) (&range), 4);
448         retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
449         UnlockDisplay(dpy);
450         SyncHandle();
451 #endif /* USE_XCB */
452     }
453     return retval;
454 }
455
456 #define X_GLrop_ListBase 3
457 void
458 __indirect_glListBase(GLuint base)
459 {
460     struct glx_context *const gc = __glXGetCurrentContext();
461     const GLuint cmdlen = 8;
462     emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
463     (void) memcpy((void *) (gc->pc + 4), (void *) (&base), 4);
464     gc->pc += cmdlen;
465     if (__builtin_expect(gc->pc > gc->limit, 0)) {
466         (void) __glXFlushRenderBuffer(gc, gc->pc);
467     }
468 }
469
470 #define X_GLrop_Begin 4
471 void
472 __indirect_glBegin(GLenum mode)
473 {
474     struct glx_context *const gc = __glXGetCurrentContext();
475     const GLuint cmdlen = 8;
476     emit_header(gc->pc, X_GLrop_Begin, cmdlen);
477     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
478     gc->pc += cmdlen;
479     if (__builtin_expect(gc->pc > gc->limit, 0)) {
480         (void) __glXFlushRenderBuffer(gc, gc->pc);
481     }
482 }
483
484 #define X_GLrop_Bitmap 5
485 void
486 __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
487                     GLfloat yorig, GLfloat xmove, GLfloat ymove,
488                     const GLubyte *bitmap)
489 {
490     struct glx_context *const gc = __glXGetCurrentContext();
491     const GLuint compsize =
492         (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX,
493                                          GL_BITMAP, 0) : 0;
494     const GLuint cmdlen = 48 + __GLX_PAD(compsize);
495     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
496         if (cmdlen <= gc->maxSmallRenderCommandSize) {
497             if ((gc->pc + cmdlen) > gc->bufEnd) {
498                 (void) __glXFlushRenderBuffer(gc, gc->pc);
499             }
500             emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
501             (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
502             (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
503             (void) memcpy((void *) (gc->pc + 32), (void *) (&xorig), 4);
504             (void) memcpy((void *) (gc->pc + 36), (void *) (&yorig), 4);
505             (void) memcpy((void *) (gc->pc + 40), (void *) (&xmove), 4);
506             (void) memcpy((void *) (gc->pc + 44), (void *) (&ymove), 4);
507             if (compsize > 0) {
508                 (*gc->fillImage) (gc, 2, width, height, 1, GL_COLOR_INDEX,
509                                   GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
510             } else {
511                 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
512                               default_pixel_store_2D_size);
513             }
514             gc->pc += cmdlen;
515             if (gc->pc > gc->limit) {
516                 (void) __glXFlushRenderBuffer(gc, gc->pc);
517             }
518         } else {
519             const GLint op = X_GLrop_Bitmap;
520             const GLuint cmdlenLarge = cmdlen + 4;
521             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
522             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
523             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
524             (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
525             (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
526             (void) memcpy((void *) (pc + 36), (void *) (&xorig), 4);
527             (void) memcpy((void *) (pc + 40), (void *) (&yorig), 4);
528             (void) memcpy((void *) (pc + 44), (void *) (&xmove), 4);
529             (void) memcpy((void *) (pc + 48), (void *) (&ymove), 4);
530             __glXSendLargeImage(gc, compsize, 2, width, height, 1,
531                                 GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52,
532                                 pc + 8);
533         }
534     }
535 }
536
537 #define X_GLrop_Color3bv 6
538 void
539 __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
540 {
541     struct glx_context *const gc = __glXGetCurrentContext();
542     const GLuint cmdlen = 8;
543     emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
544     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
545     (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
546     (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
547     gc->pc += cmdlen;
548     if (__builtin_expect(gc->pc > gc->limit, 0)) {
549         (void) __glXFlushRenderBuffer(gc, gc->pc);
550     }
551 }
552
553 #define X_GLrop_Color3bv 6
554 void
555 __indirect_glColor3bv(const GLbyte *v)
556 {
557     generic_3_byte(X_GLrop_Color3bv, v);
558 }
559
560 #define X_GLrop_Color3dv 7
561 void
562 __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
563 {
564     struct glx_context *const gc = __glXGetCurrentContext();
565     const GLuint cmdlen = 28;
566     emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
567     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
568     (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
569     (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
570     gc->pc += cmdlen;
571     if (__builtin_expect(gc->pc > gc->limit, 0)) {
572         (void) __glXFlushRenderBuffer(gc, gc->pc);
573     }
574 }
575
576 #define X_GLrop_Color3dv 7
577 void
578 __indirect_glColor3dv(const GLdouble * v)
579 {
580     generic_24_byte(X_GLrop_Color3dv, v);
581 }
582
583 #define X_GLrop_Color3fv 8
584 void
585 __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
586 {
587     struct glx_context *const gc = __glXGetCurrentContext();
588     const GLuint cmdlen = 16;
589     emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
590     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
591     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
592     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
593     gc->pc += cmdlen;
594     if (__builtin_expect(gc->pc > gc->limit, 0)) {
595         (void) __glXFlushRenderBuffer(gc, gc->pc);
596     }
597 }
598
599 #define X_GLrop_Color3fv 8
600 void
601 __indirect_glColor3fv(const GLfloat * v)
602 {
603     generic_12_byte(X_GLrop_Color3fv, v);
604 }
605
606 #define X_GLrop_Color3iv 9
607 void
608 __indirect_glColor3i(GLint red, GLint green, GLint blue)
609 {
610     struct glx_context *const gc = __glXGetCurrentContext();
611     const GLuint cmdlen = 16;
612     emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
613     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
614     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
615     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
616     gc->pc += cmdlen;
617     if (__builtin_expect(gc->pc > gc->limit, 0)) {
618         (void) __glXFlushRenderBuffer(gc, gc->pc);
619     }
620 }
621
622 #define X_GLrop_Color3iv 9
623 void
624 __indirect_glColor3iv(const GLint * v)
625 {
626     generic_12_byte(X_GLrop_Color3iv, v);
627 }
628
629 #define X_GLrop_Color3sv 10
630 void
631 __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
632 {
633     struct glx_context *const gc = __glXGetCurrentContext();
634     const GLuint cmdlen = 12;
635     emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
636     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
637     (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
638     (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
639     gc->pc += cmdlen;
640     if (__builtin_expect(gc->pc > gc->limit, 0)) {
641         (void) __glXFlushRenderBuffer(gc, gc->pc);
642     }
643 }
644
645 #define X_GLrop_Color3sv 10
646 void
647 __indirect_glColor3sv(const GLshort * v)
648 {
649     generic_6_byte(X_GLrop_Color3sv, v);
650 }
651
652 #define X_GLrop_Color3ubv 11
653 void
654 __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
655 {
656     struct glx_context *const gc = __glXGetCurrentContext();
657     const GLuint cmdlen = 8;
658     emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
659     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
660     (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
661     (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
662     gc->pc += cmdlen;
663     if (__builtin_expect(gc->pc > gc->limit, 0)) {
664         (void) __glXFlushRenderBuffer(gc, gc->pc);
665     }
666 }
667
668 #define X_GLrop_Color3ubv 11
669 void
670 __indirect_glColor3ubv(const GLubyte *v)
671 {
672     generic_3_byte(X_GLrop_Color3ubv, v);
673 }
674
675 #define X_GLrop_Color3uiv 12
676 void
677 __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
678 {
679     struct glx_context *const gc = __glXGetCurrentContext();
680     const GLuint cmdlen = 16;
681     emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
682     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
683     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
684     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
685     gc->pc += cmdlen;
686     if (__builtin_expect(gc->pc > gc->limit, 0)) {
687         (void) __glXFlushRenderBuffer(gc, gc->pc);
688     }
689 }
690
691 #define X_GLrop_Color3uiv 12
692 void
693 __indirect_glColor3uiv(const GLuint * v)
694 {
695     generic_12_byte(X_GLrop_Color3uiv, v);
696 }
697
698 #define X_GLrop_Color3usv 13
699 void
700 __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
701 {
702     struct glx_context *const gc = __glXGetCurrentContext();
703     const GLuint cmdlen = 12;
704     emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
705     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
706     (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
707     (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
708     gc->pc += cmdlen;
709     if (__builtin_expect(gc->pc > gc->limit, 0)) {
710         (void) __glXFlushRenderBuffer(gc, gc->pc);
711     }
712 }
713
714 #define X_GLrop_Color3usv 13
715 void
716 __indirect_glColor3usv(const GLushort * v)
717 {
718     generic_6_byte(X_GLrop_Color3usv, v);
719 }
720
721 #define X_GLrop_Color4bv 14
722 void
723 __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
724 {
725     struct glx_context *const gc = __glXGetCurrentContext();
726     const GLuint cmdlen = 8;
727     emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
728     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
729     (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
730     (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
731     (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
732     gc->pc += cmdlen;
733     if (__builtin_expect(gc->pc > gc->limit, 0)) {
734         (void) __glXFlushRenderBuffer(gc, gc->pc);
735     }
736 }
737
738 #define X_GLrop_Color4bv 14
739 void
740 __indirect_glColor4bv(const GLbyte *v)
741 {
742     generic_4_byte(X_GLrop_Color4bv, v);
743 }
744
745 #define X_GLrop_Color4dv 15
746 void
747 __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue,
748                      GLdouble alpha)
749 {
750     struct glx_context *const gc = __glXGetCurrentContext();
751     const GLuint cmdlen = 36;
752     emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
753     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
754     (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
755     (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
756     (void) memcpy((void *) (gc->pc + 28), (void *) (&alpha), 8);
757     gc->pc += cmdlen;
758     if (__builtin_expect(gc->pc > gc->limit, 0)) {
759         (void) __glXFlushRenderBuffer(gc, gc->pc);
760     }
761 }
762
763 #define X_GLrop_Color4dv 15
764 void
765 __indirect_glColor4dv(const GLdouble * v)
766 {
767     generic_32_byte(X_GLrop_Color4dv, v);
768 }
769
770 #define X_GLrop_Color4fv 16
771 void
772 __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
773 {
774     struct glx_context *const gc = __glXGetCurrentContext();
775     const GLuint cmdlen = 20;
776     emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
777     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
778     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
779     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
780     (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
781     gc->pc += cmdlen;
782     if (__builtin_expect(gc->pc > gc->limit, 0)) {
783         (void) __glXFlushRenderBuffer(gc, gc->pc);
784     }
785 }
786
787 #define X_GLrop_Color4fv 16
788 void
789 __indirect_glColor4fv(const GLfloat * v)
790 {
791     generic_16_byte(X_GLrop_Color4fv, v);
792 }
793
794 #define X_GLrop_Color4iv 17
795 void
796 __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
797 {
798     struct glx_context *const gc = __glXGetCurrentContext();
799     const GLuint cmdlen = 20;
800     emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
801     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
802     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
803     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
804     (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
805     gc->pc += cmdlen;
806     if (__builtin_expect(gc->pc > gc->limit, 0)) {
807         (void) __glXFlushRenderBuffer(gc, gc->pc);
808     }
809 }
810
811 #define X_GLrop_Color4iv 17
812 void
813 __indirect_glColor4iv(const GLint * v)
814 {
815     generic_16_byte(X_GLrop_Color4iv, v);
816 }
817
818 #define X_GLrop_Color4sv 18
819 void
820 __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
821 {
822     struct glx_context *const gc = __glXGetCurrentContext();
823     const GLuint cmdlen = 12;
824     emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
825     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
826     (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
827     (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
828     (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
829     gc->pc += cmdlen;
830     if (__builtin_expect(gc->pc > gc->limit, 0)) {
831         (void) __glXFlushRenderBuffer(gc, gc->pc);
832     }
833 }
834
835 #define X_GLrop_Color4sv 18
836 void
837 __indirect_glColor4sv(const GLshort * v)
838 {
839     generic_8_byte(X_GLrop_Color4sv, v);
840 }
841
842 #define X_GLrop_Color4ubv 19
843 void
844 __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
845 {
846     struct glx_context *const gc = __glXGetCurrentContext();
847     const GLuint cmdlen = 8;
848     emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
849     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
850     (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
851     (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
852     (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
853     gc->pc += cmdlen;
854     if (__builtin_expect(gc->pc > gc->limit, 0)) {
855         (void) __glXFlushRenderBuffer(gc, gc->pc);
856     }
857 }
858
859 #define X_GLrop_Color4ubv 19
860 void
861 __indirect_glColor4ubv(const GLubyte *v)
862 {
863     generic_4_byte(X_GLrop_Color4ubv, v);
864 }
865
866 #define X_GLrop_Color4uiv 20
867 void
868 __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
869 {
870     struct glx_context *const gc = __glXGetCurrentContext();
871     const GLuint cmdlen = 20;
872     emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
873     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
874     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
875     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
876     (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
877     gc->pc += cmdlen;
878     if (__builtin_expect(gc->pc > gc->limit, 0)) {
879         (void) __glXFlushRenderBuffer(gc, gc->pc);
880     }
881 }
882
883 #define X_GLrop_Color4uiv 20
884 void
885 __indirect_glColor4uiv(const GLuint * v)
886 {
887     generic_16_byte(X_GLrop_Color4uiv, v);
888 }
889
890 #define X_GLrop_Color4usv 21
891 void
892 __indirect_glColor4us(GLushort red, GLushort green, GLushort blue,
893                       GLushort alpha)
894 {
895     struct glx_context *const gc = __glXGetCurrentContext();
896     const GLuint cmdlen = 12;
897     emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
898     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
899     (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
900     (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
901     (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
902     gc->pc += cmdlen;
903     if (__builtin_expect(gc->pc > gc->limit, 0)) {
904         (void) __glXFlushRenderBuffer(gc, gc->pc);
905     }
906 }
907
908 #define X_GLrop_Color4usv 21
909 void
910 __indirect_glColor4usv(const GLushort * v)
911 {
912     generic_8_byte(X_GLrop_Color4usv, v);
913 }
914
915 #define X_GLrop_EdgeFlagv 22
916 void
917 __indirect_glEdgeFlag(GLboolean flag)
918 {
919     struct glx_context *const gc = __glXGetCurrentContext();
920     const GLuint cmdlen = 8;
921     emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
922     (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
923     gc->pc += cmdlen;
924     if (__builtin_expect(gc->pc > gc->limit, 0)) {
925         (void) __glXFlushRenderBuffer(gc, gc->pc);
926     }
927 }
928
929 #define X_GLrop_EdgeFlagv 22
930 void
931 __indirect_glEdgeFlagv(const GLboolean * flag)
932 {
933     struct glx_context *const gc = __glXGetCurrentContext();
934     const GLuint cmdlen = 8;
935     emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
936     (void) memcpy((void *) (gc->pc + 4), (void *) (flag), 1);
937     gc->pc += cmdlen;
938     if (__builtin_expect(gc->pc > gc->limit, 0)) {
939         (void) __glXFlushRenderBuffer(gc, gc->pc);
940     }
941 }
942
943 #define X_GLrop_End 23
944 void
945 __indirect_glEnd(void)
946 {
947     struct glx_context *const gc = __glXGetCurrentContext();
948     const GLuint cmdlen = 4;
949     emit_header(gc->pc, X_GLrop_End, cmdlen);
950     gc->pc += cmdlen;
951     if (__builtin_expect(gc->pc > gc->limit, 0)) {
952         (void) __glXFlushRenderBuffer(gc, gc->pc);
953     }
954 }
955
956 #define X_GLrop_Indexdv 24
957 void
958 __indirect_glIndexd(GLdouble c)
959 {
960     struct glx_context *const gc = __glXGetCurrentContext();
961     const GLuint cmdlen = 12;
962     emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
963     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 8);
964     gc->pc += cmdlen;
965     if (__builtin_expect(gc->pc > gc->limit, 0)) {
966         (void) __glXFlushRenderBuffer(gc, gc->pc);
967     }
968 }
969
970 #define X_GLrop_Indexdv 24
971 void
972 __indirect_glIndexdv(const GLdouble * c)
973 {
974     generic_8_byte(X_GLrop_Indexdv, c);
975 }
976
977 #define X_GLrop_Indexfv 25
978 void
979 __indirect_glIndexf(GLfloat c)
980 {
981     struct glx_context *const gc = __glXGetCurrentContext();
982     const GLuint cmdlen = 8;
983     emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
984     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
985     gc->pc += cmdlen;
986     if (__builtin_expect(gc->pc > gc->limit, 0)) {
987         (void) __glXFlushRenderBuffer(gc, gc->pc);
988     }
989 }
990
991 #define X_GLrop_Indexfv 25
992 void
993 __indirect_glIndexfv(const GLfloat * c)
994 {
995     generic_4_byte(X_GLrop_Indexfv, c);
996 }
997
998 #define X_GLrop_Indexiv 26
999 void
1000 __indirect_glIndexi(GLint c)
1001 {
1002     struct glx_context *const gc = __glXGetCurrentContext();
1003     const GLuint cmdlen = 8;
1004     emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
1005     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
1006     gc->pc += cmdlen;
1007     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1008         (void) __glXFlushRenderBuffer(gc, gc->pc);
1009     }
1010 }
1011
1012 #define X_GLrop_Indexiv 26
1013 void
1014 __indirect_glIndexiv(const GLint * c)
1015 {
1016     generic_4_byte(X_GLrop_Indexiv, c);
1017 }
1018
1019 #define X_GLrop_Indexsv 27
1020 void
1021 __indirect_glIndexs(GLshort c)
1022 {
1023     struct glx_context *const gc = __glXGetCurrentContext();
1024     const GLuint cmdlen = 8;
1025     emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1026     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 2);
1027     gc->pc += cmdlen;
1028     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1029         (void) __glXFlushRenderBuffer(gc, gc->pc);
1030     }
1031 }
1032
1033 #define X_GLrop_Indexsv 27
1034 void
1035 __indirect_glIndexsv(const GLshort * c)
1036 {
1037     struct glx_context *const gc = __glXGetCurrentContext();
1038     const GLuint cmdlen = 8;
1039     emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1040     (void) memcpy((void *) (gc->pc + 4), (void *) (c), 2);
1041     gc->pc += cmdlen;
1042     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1043         (void) __glXFlushRenderBuffer(gc, gc->pc);
1044     }
1045 }
1046
1047 #define X_GLrop_Normal3bv 28
1048 void
1049 __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
1050 {
1051     struct glx_context *const gc = __glXGetCurrentContext();
1052     const GLuint cmdlen = 8;
1053     emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
1054     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 1);
1055     (void) memcpy((void *) (gc->pc + 5), (void *) (&ny), 1);
1056     (void) memcpy((void *) (gc->pc + 6), (void *) (&nz), 1);
1057     gc->pc += cmdlen;
1058     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1059         (void) __glXFlushRenderBuffer(gc, gc->pc);
1060     }
1061 }
1062
1063 #define X_GLrop_Normal3bv 28
1064 void
1065 __indirect_glNormal3bv(const GLbyte *v)
1066 {
1067     generic_3_byte(X_GLrop_Normal3bv, v);
1068 }
1069
1070 #define X_GLrop_Normal3dv 29
1071 void
1072 __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
1073 {
1074     struct glx_context *const gc = __glXGetCurrentContext();
1075     const GLuint cmdlen = 28;
1076     emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
1077     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 8);
1078     (void) memcpy((void *) (gc->pc + 12), (void *) (&ny), 8);
1079     (void) memcpy((void *) (gc->pc + 20), (void *) (&nz), 8);
1080     gc->pc += cmdlen;
1081     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1082         (void) __glXFlushRenderBuffer(gc, gc->pc);
1083     }
1084 }
1085
1086 #define X_GLrop_Normal3dv 29
1087 void
1088 __indirect_glNormal3dv(const GLdouble * v)
1089 {
1090     generic_24_byte(X_GLrop_Normal3dv, v);
1091 }
1092
1093 #define X_GLrop_Normal3fv 30
1094 void
1095 __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1096 {
1097     struct glx_context *const gc = __glXGetCurrentContext();
1098     const GLuint cmdlen = 16;
1099     emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
1100     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1101     (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1102     (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1103     gc->pc += cmdlen;
1104     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1105         (void) __glXFlushRenderBuffer(gc, gc->pc);
1106     }
1107 }
1108
1109 #define X_GLrop_Normal3fv 30
1110 void
1111 __indirect_glNormal3fv(const GLfloat * v)
1112 {
1113     generic_12_byte(X_GLrop_Normal3fv, v);
1114 }
1115
1116 #define X_GLrop_Normal3iv 31
1117 void
1118 __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
1119 {
1120     struct glx_context *const gc = __glXGetCurrentContext();
1121     const GLuint cmdlen = 16;
1122     emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
1123     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1124     (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1125     (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1126     gc->pc += cmdlen;
1127     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1128         (void) __glXFlushRenderBuffer(gc, gc->pc);
1129     }
1130 }
1131
1132 #define X_GLrop_Normal3iv 31
1133 void
1134 __indirect_glNormal3iv(const GLint * v)
1135 {
1136     generic_12_byte(X_GLrop_Normal3iv, v);
1137 }
1138
1139 #define X_GLrop_Normal3sv 32
1140 void
1141 __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
1142 {
1143     struct glx_context *const gc = __glXGetCurrentContext();
1144     const GLuint cmdlen = 12;
1145     emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
1146     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 2);
1147     (void) memcpy((void *) (gc->pc + 6), (void *) (&ny), 2);
1148     (void) memcpy((void *) (gc->pc + 8), (void *) (&nz), 2);
1149     gc->pc += cmdlen;
1150     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1151         (void) __glXFlushRenderBuffer(gc, gc->pc);
1152     }
1153 }
1154
1155 #define X_GLrop_Normal3sv 32
1156 void
1157 __indirect_glNormal3sv(const GLshort * v)
1158 {
1159     generic_6_byte(X_GLrop_Normal3sv, v);
1160 }
1161
1162 #define X_GLrop_RasterPos2dv 33
1163 void
1164 __indirect_glRasterPos2d(GLdouble x, GLdouble y)
1165 {
1166     struct glx_context *const gc = __glXGetCurrentContext();
1167     const GLuint cmdlen = 20;
1168     emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
1169     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1170     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1171     gc->pc += cmdlen;
1172     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1173         (void) __glXFlushRenderBuffer(gc, gc->pc);
1174     }
1175 }
1176
1177 #define X_GLrop_RasterPos2dv 33
1178 void
1179 __indirect_glRasterPos2dv(const GLdouble * v)
1180 {
1181     generic_16_byte(X_GLrop_RasterPos2dv, v);
1182 }
1183
1184 #define X_GLrop_RasterPos2fv 34
1185 void
1186 __indirect_glRasterPos2f(GLfloat x, GLfloat y)
1187 {
1188     struct glx_context *const gc = __glXGetCurrentContext();
1189     const GLuint cmdlen = 12;
1190     emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
1191     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1192     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1193     gc->pc += cmdlen;
1194     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1195         (void) __glXFlushRenderBuffer(gc, gc->pc);
1196     }
1197 }
1198
1199 #define X_GLrop_RasterPos2fv 34
1200 void
1201 __indirect_glRasterPos2fv(const GLfloat * v)
1202 {
1203     generic_8_byte(X_GLrop_RasterPos2fv, v);
1204 }
1205
1206 #define X_GLrop_RasterPos2iv 35
1207 void
1208 __indirect_glRasterPos2i(GLint x, GLint y)
1209 {
1210     struct glx_context *const gc = __glXGetCurrentContext();
1211     const GLuint cmdlen = 12;
1212     emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
1213     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1214     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1215     gc->pc += cmdlen;
1216     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1217         (void) __glXFlushRenderBuffer(gc, gc->pc);
1218     }
1219 }
1220
1221 #define X_GLrop_RasterPos2iv 35
1222 void
1223 __indirect_glRasterPos2iv(const GLint * v)
1224 {
1225     generic_8_byte(X_GLrop_RasterPos2iv, v);
1226 }
1227
1228 #define X_GLrop_RasterPos2sv 36
1229 void
1230 __indirect_glRasterPos2s(GLshort x, GLshort y)
1231 {
1232     struct glx_context *const gc = __glXGetCurrentContext();
1233     const GLuint cmdlen = 8;
1234     emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
1235     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1236     (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1237     gc->pc += cmdlen;
1238     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1239         (void) __glXFlushRenderBuffer(gc, gc->pc);
1240     }
1241 }
1242
1243 #define X_GLrop_RasterPos2sv 36
1244 void
1245 __indirect_glRasterPos2sv(const GLshort * v)
1246 {
1247     generic_4_byte(X_GLrop_RasterPos2sv, v);
1248 }
1249
1250 #define X_GLrop_RasterPos3dv 37
1251 void
1252 __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
1253 {
1254     struct glx_context *const gc = __glXGetCurrentContext();
1255     const GLuint cmdlen = 28;
1256     emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
1257     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1258     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1259     (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1260     gc->pc += cmdlen;
1261     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1262         (void) __glXFlushRenderBuffer(gc, gc->pc);
1263     }
1264 }
1265
1266 #define X_GLrop_RasterPos3dv 37
1267 void
1268 __indirect_glRasterPos3dv(const GLdouble * v)
1269 {
1270     generic_24_byte(X_GLrop_RasterPos3dv, v);
1271 }
1272
1273 #define X_GLrop_RasterPos3fv 38
1274 void
1275 __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
1276 {
1277     struct glx_context *const gc = __glXGetCurrentContext();
1278     const GLuint cmdlen = 16;
1279     emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
1280     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1281     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1282     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1283     gc->pc += cmdlen;
1284     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1285         (void) __glXFlushRenderBuffer(gc, gc->pc);
1286     }
1287 }
1288
1289 #define X_GLrop_RasterPos3fv 38
1290 void
1291 __indirect_glRasterPos3fv(const GLfloat * v)
1292 {
1293     generic_12_byte(X_GLrop_RasterPos3fv, v);
1294 }
1295
1296 #define X_GLrop_RasterPos3iv 39
1297 void
1298 __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
1299 {
1300     struct glx_context *const gc = __glXGetCurrentContext();
1301     const GLuint cmdlen = 16;
1302     emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
1303     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1304     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1305     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1306     gc->pc += cmdlen;
1307     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1308         (void) __glXFlushRenderBuffer(gc, gc->pc);
1309     }
1310 }
1311
1312 #define X_GLrop_RasterPos3iv 39
1313 void
1314 __indirect_glRasterPos3iv(const GLint * v)
1315 {
1316     generic_12_byte(X_GLrop_RasterPos3iv, v);
1317 }
1318
1319 #define X_GLrop_RasterPos3sv 40
1320 void
1321 __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
1322 {
1323     struct glx_context *const gc = __glXGetCurrentContext();
1324     const GLuint cmdlen = 12;
1325     emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
1326     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1327     (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1328     (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1329     gc->pc += cmdlen;
1330     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1331         (void) __glXFlushRenderBuffer(gc, gc->pc);
1332     }
1333 }
1334
1335 #define X_GLrop_RasterPos3sv 40
1336 void
1337 __indirect_glRasterPos3sv(const GLshort * v)
1338 {
1339     generic_6_byte(X_GLrop_RasterPos3sv, v);
1340 }
1341
1342 #define X_GLrop_RasterPos4dv 41
1343 void
1344 __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1345 {
1346     struct glx_context *const gc = __glXGetCurrentContext();
1347     const GLuint cmdlen = 36;
1348     emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
1349     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1350     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1351     (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1352     (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
1353     gc->pc += cmdlen;
1354     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1355         (void) __glXFlushRenderBuffer(gc, gc->pc);
1356     }
1357 }
1358
1359 #define X_GLrop_RasterPos4dv 41
1360 void
1361 __indirect_glRasterPos4dv(const GLdouble * v)
1362 {
1363     generic_32_byte(X_GLrop_RasterPos4dv, v);
1364 }
1365
1366 #define X_GLrop_RasterPos4fv 42
1367 void
1368 __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1369 {
1370     struct glx_context *const gc = __glXGetCurrentContext();
1371     const GLuint cmdlen = 20;
1372     emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
1373     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1374     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1375     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1376     (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1377     gc->pc += cmdlen;
1378     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1379         (void) __glXFlushRenderBuffer(gc, gc->pc);
1380     }
1381 }
1382
1383 #define X_GLrop_RasterPos4fv 42
1384 void
1385 __indirect_glRasterPos4fv(const GLfloat * v)
1386 {
1387     generic_16_byte(X_GLrop_RasterPos4fv, v);
1388 }
1389
1390 #define X_GLrop_RasterPos4iv 43
1391 void
1392 __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
1393 {
1394     struct glx_context *const gc = __glXGetCurrentContext();
1395     const GLuint cmdlen = 20;
1396     emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
1397     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1398     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1399     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1400     (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1401     gc->pc += cmdlen;
1402     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1403         (void) __glXFlushRenderBuffer(gc, gc->pc);
1404     }
1405 }
1406
1407 #define X_GLrop_RasterPos4iv 43
1408 void
1409 __indirect_glRasterPos4iv(const GLint * v)
1410 {
1411     generic_16_byte(X_GLrop_RasterPos4iv, v);
1412 }
1413
1414 #define X_GLrop_RasterPos4sv 44
1415 void
1416 __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
1417 {
1418     struct glx_context *const gc = __glXGetCurrentContext();
1419     const GLuint cmdlen = 12;
1420     emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
1421     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1422     (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1423     (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1424     (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
1425     gc->pc += cmdlen;
1426     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1427         (void) __glXFlushRenderBuffer(gc, gc->pc);
1428     }
1429 }
1430
1431 #define X_GLrop_RasterPos4sv 44
1432 void
1433 __indirect_glRasterPos4sv(const GLshort * v)
1434 {
1435     generic_8_byte(X_GLrop_RasterPos4sv, v);
1436 }
1437
1438 #define X_GLrop_Rectdv 45
1439 void
1440 __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1441 {
1442     struct glx_context *const gc = __glXGetCurrentContext();
1443     const GLuint cmdlen = 36;
1444     emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1445     (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 8);
1446     (void) memcpy((void *) (gc->pc + 12), (void *) (&y1), 8);
1447     (void) memcpy((void *) (gc->pc + 20), (void *) (&x2), 8);
1448     (void) memcpy((void *) (gc->pc + 28), (void *) (&y2), 8);
1449     gc->pc += cmdlen;
1450     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1451         (void) __glXFlushRenderBuffer(gc, gc->pc);
1452     }
1453 }
1454
1455 #define X_GLrop_Rectdv 45
1456 void
1457 __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
1458 {
1459     struct glx_context *const gc = __glXGetCurrentContext();
1460     const GLuint cmdlen = 36;
1461     emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1462     (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 16);
1463     (void) memcpy((void *) (gc->pc + 20), (void *) (v2), 16);
1464     gc->pc += cmdlen;
1465     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1466         (void) __glXFlushRenderBuffer(gc, gc->pc);
1467     }
1468 }
1469
1470 #define X_GLrop_Rectfv 46
1471 void
1472 __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
1473 {
1474     struct glx_context *const gc = __glXGetCurrentContext();
1475     const GLuint cmdlen = 20;
1476     emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1477     (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1478     (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1479     (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1480     (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1481     gc->pc += cmdlen;
1482     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1483         (void) __glXFlushRenderBuffer(gc, gc->pc);
1484     }
1485 }
1486
1487 #define X_GLrop_Rectfv 46
1488 void
1489 __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
1490 {
1491     struct glx_context *const gc = __glXGetCurrentContext();
1492     const GLuint cmdlen = 20;
1493     emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1494     (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1495     (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1496     gc->pc += cmdlen;
1497     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1498         (void) __glXFlushRenderBuffer(gc, gc->pc);
1499     }
1500 }
1501
1502 #define X_GLrop_Rectiv 47
1503 void
1504 __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
1505 {
1506     struct glx_context *const gc = __glXGetCurrentContext();
1507     const GLuint cmdlen = 20;
1508     emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1509     (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1510     (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1511     (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1512     (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1513     gc->pc += cmdlen;
1514     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1515         (void) __glXFlushRenderBuffer(gc, gc->pc);
1516     }
1517 }
1518
1519 #define X_GLrop_Rectiv 47
1520 void
1521 __indirect_glRectiv(const GLint * v1, const GLint * v2)
1522 {
1523     struct glx_context *const gc = __glXGetCurrentContext();
1524     const GLuint cmdlen = 20;
1525     emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1526     (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1527     (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1528     gc->pc += cmdlen;
1529     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1530         (void) __glXFlushRenderBuffer(gc, gc->pc);
1531     }
1532 }
1533
1534 #define X_GLrop_Rectsv 48
1535 void
1536 __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1537 {
1538     struct glx_context *const gc = __glXGetCurrentContext();
1539     const GLuint cmdlen = 12;
1540     emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1541     (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 2);
1542     (void) memcpy((void *) (gc->pc + 6), (void *) (&y1), 2);
1543     (void) memcpy((void *) (gc->pc + 8), (void *) (&x2), 2);
1544     (void) memcpy((void *) (gc->pc + 10), (void *) (&y2), 2);
1545     gc->pc += cmdlen;
1546     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1547         (void) __glXFlushRenderBuffer(gc, gc->pc);
1548     }
1549 }
1550
1551 #define X_GLrop_Rectsv 48
1552 void
1553 __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
1554 {
1555     struct glx_context *const gc = __glXGetCurrentContext();
1556     const GLuint cmdlen = 12;
1557     emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1558     (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 4);
1559     (void) memcpy((void *) (gc->pc + 8), (void *) (v2), 4);
1560     gc->pc += cmdlen;
1561     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1562         (void) __glXFlushRenderBuffer(gc, gc->pc);
1563     }
1564 }
1565
1566 #define X_GLrop_TexCoord1dv 49
1567 void
1568 __indirect_glTexCoord1d(GLdouble s)
1569 {
1570     struct glx_context *const gc = __glXGetCurrentContext();
1571     const GLuint cmdlen = 12;
1572     emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
1573     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1574     gc->pc += cmdlen;
1575     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1576         (void) __glXFlushRenderBuffer(gc, gc->pc);
1577     }
1578 }
1579
1580 #define X_GLrop_TexCoord1dv 49
1581 void
1582 __indirect_glTexCoord1dv(const GLdouble * v)
1583 {
1584     generic_8_byte(X_GLrop_TexCoord1dv, v);
1585 }
1586
1587 #define X_GLrop_TexCoord1fv 50
1588 void
1589 __indirect_glTexCoord1f(GLfloat s)
1590 {
1591     struct glx_context *const gc = __glXGetCurrentContext();
1592     const GLuint cmdlen = 8;
1593     emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
1594     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1595     gc->pc += cmdlen;
1596     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1597         (void) __glXFlushRenderBuffer(gc, gc->pc);
1598     }
1599 }
1600
1601 #define X_GLrop_TexCoord1fv 50
1602 void
1603 __indirect_glTexCoord1fv(const GLfloat * v)
1604 {
1605     generic_4_byte(X_GLrop_TexCoord1fv, v);
1606 }
1607
1608 #define X_GLrop_TexCoord1iv 51
1609 void
1610 __indirect_glTexCoord1i(GLint s)
1611 {
1612     struct glx_context *const gc = __glXGetCurrentContext();
1613     const GLuint cmdlen = 8;
1614     emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
1615     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1616     gc->pc += cmdlen;
1617     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1618         (void) __glXFlushRenderBuffer(gc, gc->pc);
1619     }
1620 }
1621
1622 #define X_GLrop_TexCoord1iv 51
1623 void
1624 __indirect_glTexCoord1iv(const GLint * v)
1625 {
1626     generic_4_byte(X_GLrop_TexCoord1iv, v);
1627 }
1628
1629 #define X_GLrop_TexCoord1sv 52
1630 void
1631 __indirect_glTexCoord1s(GLshort s)
1632 {
1633     struct glx_context *const gc = __glXGetCurrentContext();
1634     const GLuint cmdlen = 8;
1635     emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1636     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1637     gc->pc += cmdlen;
1638     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1639         (void) __glXFlushRenderBuffer(gc, gc->pc);
1640     }
1641 }
1642
1643 #define X_GLrop_TexCoord1sv 52
1644 void
1645 __indirect_glTexCoord1sv(const GLshort * v)
1646 {
1647     struct glx_context *const gc = __glXGetCurrentContext();
1648     const GLuint cmdlen = 8;
1649     emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1650     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 2);
1651     gc->pc += cmdlen;
1652     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1653         (void) __glXFlushRenderBuffer(gc, gc->pc);
1654     }
1655 }
1656
1657 #define X_GLrop_TexCoord2dv 53
1658 void
1659 __indirect_glTexCoord2d(GLdouble s, GLdouble t)
1660 {
1661     struct glx_context *const gc = __glXGetCurrentContext();
1662     const GLuint cmdlen = 20;
1663     emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
1664     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1665     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1666     gc->pc += cmdlen;
1667     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1668         (void) __glXFlushRenderBuffer(gc, gc->pc);
1669     }
1670 }
1671
1672 #define X_GLrop_TexCoord2dv 53
1673 void
1674 __indirect_glTexCoord2dv(const GLdouble * v)
1675 {
1676     generic_16_byte(X_GLrop_TexCoord2dv, v);
1677 }
1678
1679 #define X_GLrop_TexCoord2fv 54
1680 void
1681 __indirect_glTexCoord2f(GLfloat s, GLfloat t)
1682 {
1683     struct glx_context *const gc = __glXGetCurrentContext();
1684     const GLuint cmdlen = 12;
1685     emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
1686     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1687     (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1688     gc->pc += cmdlen;
1689     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1690         (void) __glXFlushRenderBuffer(gc, gc->pc);
1691     }
1692 }
1693
1694 #define X_GLrop_TexCoord2fv 54
1695 void
1696 __indirect_glTexCoord2fv(const GLfloat * v)
1697 {
1698     generic_8_byte(X_GLrop_TexCoord2fv, v);
1699 }
1700
1701 #define X_GLrop_TexCoord2iv 55
1702 void
1703 __indirect_glTexCoord2i(GLint s, GLint t)
1704 {
1705     struct glx_context *const gc = __glXGetCurrentContext();
1706     const GLuint cmdlen = 12;
1707     emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
1708     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1709     (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1710     gc->pc += cmdlen;
1711     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1712         (void) __glXFlushRenderBuffer(gc, gc->pc);
1713     }
1714 }
1715
1716 #define X_GLrop_TexCoord2iv 55
1717 void
1718 __indirect_glTexCoord2iv(const GLint * v)
1719 {
1720     generic_8_byte(X_GLrop_TexCoord2iv, v);
1721 }
1722
1723 #define X_GLrop_TexCoord2sv 56
1724 void
1725 __indirect_glTexCoord2s(GLshort s, GLshort t)
1726 {
1727     struct glx_context *const gc = __glXGetCurrentContext();
1728     const GLuint cmdlen = 8;
1729     emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
1730     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1731     (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1732     gc->pc += cmdlen;
1733     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1734         (void) __glXFlushRenderBuffer(gc, gc->pc);
1735     }
1736 }
1737
1738 #define X_GLrop_TexCoord2sv 56
1739 void
1740 __indirect_glTexCoord2sv(const GLshort * v)
1741 {
1742     generic_4_byte(X_GLrop_TexCoord2sv, v);
1743 }
1744
1745 #define X_GLrop_TexCoord3dv 57
1746 void
1747 __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
1748 {
1749     struct glx_context *const gc = __glXGetCurrentContext();
1750     const GLuint cmdlen = 28;
1751     emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
1752     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1753     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1754     (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1755     gc->pc += cmdlen;
1756     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1757         (void) __glXFlushRenderBuffer(gc, gc->pc);
1758     }
1759 }
1760
1761 #define X_GLrop_TexCoord3dv 57
1762 void
1763 __indirect_glTexCoord3dv(const GLdouble * v)
1764 {
1765     generic_24_byte(X_GLrop_TexCoord3dv, v);
1766 }
1767
1768 #define X_GLrop_TexCoord3fv 58
1769 void
1770 __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
1771 {
1772     struct glx_context *const gc = __glXGetCurrentContext();
1773     const GLuint cmdlen = 16;
1774     emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
1775     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1776     (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1777     (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1778     gc->pc += cmdlen;
1779     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1780         (void) __glXFlushRenderBuffer(gc, gc->pc);
1781     }
1782 }
1783
1784 #define X_GLrop_TexCoord3fv 58
1785 void
1786 __indirect_glTexCoord3fv(const GLfloat * v)
1787 {
1788     generic_12_byte(X_GLrop_TexCoord3fv, v);
1789 }
1790
1791 #define X_GLrop_TexCoord3iv 59
1792 void
1793 __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
1794 {
1795     struct glx_context *const gc = __glXGetCurrentContext();
1796     const GLuint cmdlen = 16;
1797     emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
1798     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1799     (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1800     (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1801     gc->pc += cmdlen;
1802     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1803         (void) __glXFlushRenderBuffer(gc, gc->pc);
1804     }
1805 }
1806
1807 #define X_GLrop_TexCoord3iv 59
1808 void
1809 __indirect_glTexCoord3iv(const GLint * v)
1810 {
1811     generic_12_byte(X_GLrop_TexCoord3iv, v);
1812 }
1813
1814 #define X_GLrop_TexCoord3sv 60
1815 void
1816 __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
1817 {
1818     struct glx_context *const gc = __glXGetCurrentContext();
1819     const GLuint cmdlen = 12;
1820     emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
1821     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1822     (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1823     (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1824     gc->pc += cmdlen;
1825     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1826         (void) __glXFlushRenderBuffer(gc, gc->pc);
1827     }
1828 }
1829
1830 #define X_GLrop_TexCoord3sv 60
1831 void
1832 __indirect_glTexCoord3sv(const GLshort * v)
1833 {
1834     generic_6_byte(X_GLrop_TexCoord3sv, v);
1835 }
1836
1837 #define X_GLrop_TexCoord4dv 61
1838 void
1839 __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1840 {
1841     struct glx_context *const gc = __glXGetCurrentContext();
1842     const GLuint cmdlen = 36;
1843     emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
1844     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1845     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1846     (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1847     (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
1848     gc->pc += cmdlen;
1849     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1850         (void) __glXFlushRenderBuffer(gc, gc->pc);
1851     }
1852 }
1853
1854 #define X_GLrop_TexCoord4dv 61
1855 void
1856 __indirect_glTexCoord4dv(const GLdouble * v)
1857 {
1858     generic_32_byte(X_GLrop_TexCoord4dv, v);
1859 }
1860
1861 #define X_GLrop_TexCoord4fv 62
1862 void
1863 __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1864 {
1865     struct glx_context *const gc = __glXGetCurrentContext();
1866     const GLuint cmdlen = 20;
1867     emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
1868     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1869     (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1870     (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1871     (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1872     gc->pc += cmdlen;
1873     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1874         (void) __glXFlushRenderBuffer(gc, gc->pc);
1875     }
1876 }
1877
1878 #define X_GLrop_TexCoord4fv 62
1879 void
1880 __indirect_glTexCoord4fv(const GLfloat * v)
1881 {
1882     generic_16_byte(X_GLrop_TexCoord4fv, v);
1883 }
1884
1885 #define X_GLrop_TexCoord4iv 63
1886 void
1887 __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
1888 {
1889     struct glx_context *const gc = __glXGetCurrentContext();
1890     const GLuint cmdlen = 20;
1891     emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
1892     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1893     (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1894     (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1895     (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1896     gc->pc += cmdlen;
1897     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1898         (void) __glXFlushRenderBuffer(gc, gc->pc);
1899     }
1900 }
1901
1902 #define X_GLrop_TexCoord4iv 63
1903 void
1904 __indirect_glTexCoord4iv(const GLint * v)
1905 {
1906     generic_16_byte(X_GLrop_TexCoord4iv, v);
1907 }
1908
1909 #define X_GLrop_TexCoord4sv 64
1910 void
1911 __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
1912 {
1913     struct glx_context *const gc = __glXGetCurrentContext();
1914     const GLuint cmdlen = 12;
1915     emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
1916     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1917     (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1918     (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1919     (void) memcpy((void *) (gc->pc + 10), (void *) (&q), 2);
1920     gc->pc += cmdlen;
1921     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1922         (void) __glXFlushRenderBuffer(gc, gc->pc);
1923     }
1924 }
1925
1926 #define X_GLrop_TexCoord4sv 64
1927 void
1928 __indirect_glTexCoord4sv(const GLshort * v)
1929 {
1930     generic_8_byte(X_GLrop_TexCoord4sv, v);
1931 }
1932
1933 #define X_GLrop_Vertex2dv 65
1934 void
1935 __indirect_glVertex2d(GLdouble x, GLdouble y)
1936 {
1937     struct glx_context *const gc = __glXGetCurrentContext();
1938     const GLuint cmdlen = 20;
1939     emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
1940     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1941     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1942     gc->pc += cmdlen;
1943     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1944         (void) __glXFlushRenderBuffer(gc, gc->pc);
1945     }
1946 }
1947
1948 #define X_GLrop_Vertex2dv 65
1949 void
1950 __indirect_glVertex2dv(const GLdouble * v)
1951 {
1952     generic_16_byte(X_GLrop_Vertex2dv, v);
1953 }
1954
1955 #define X_GLrop_Vertex2fv 66
1956 void
1957 __indirect_glVertex2f(GLfloat x, GLfloat y)
1958 {
1959     struct glx_context *const gc = __glXGetCurrentContext();
1960     const GLuint cmdlen = 12;
1961     emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
1962     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1963     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1964     gc->pc += cmdlen;
1965     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1966         (void) __glXFlushRenderBuffer(gc, gc->pc);
1967     }
1968 }
1969
1970 #define X_GLrop_Vertex2fv 66
1971 void
1972 __indirect_glVertex2fv(const GLfloat * v)
1973 {
1974     generic_8_byte(X_GLrop_Vertex2fv, v);
1975 }
1976
1977 #define X_GLrop_Vertex2iv 67
1978 void
1979 __indirect_glVertex2i(GLint x, GLint y)
1980 {
1981     struct glx_context *const gc = __glXGetCurrentContext();
1982     const GLuint cmdlen = 12;
1983     emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
1984     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1985     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1986     gc->pc += cmdlen;
1987     if (__builtin_expect(gc->pc > gc->limit, 0)) {
1988         (void) __glXFlushRenderBuffer(gc, gc->pc);
1989     }
1990 }
1991
1992 #define X_GLrop_Vertex2iv 67
1993 void
1994 __indirect_glVertex2iv(const GLint * v)
1995 {
1996     generic_8_byte(X_GLrop_Vertex2iv, v);
1997 }
1998
1999 #define X_GLrop_Vertex2sv 68
2000 void
2001 __indirect_glVertex2s(GLshort x, GLshort y)
2002 {
2003     struct glx_context *const gc = __glXGetCurrentContext();
2004     const GLuint cmdlen = 8;
2005     emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
2006     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2007     (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2008     gc->pc += cmdlen;
2009     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2010         (void) __glXFlushRenderBuffer(gc, gc->pc);
2011     }
2012 }
2013
2014 #define X_GLrop_Vertex2sv 68
2015 void
2016 __indirect_glVertex2sv(const GLshort * v)
2017 {
2018     generic_4_byte(X_GLrop_Vertex2sv, v);
2019 }
2020
2021 #define X_GLrop_Vertex3dv 69
2022 void
2023 __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
2024 {
2025     struct glx_context *const gc = __glXGetCurrentContext();
2026     const GLuint cmdlen = 28;
2027     emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
2028     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2029     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2030     (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2031     gc->pc += cmdlen;
2032     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2033         (void) __glXFlushRenderBuffer(gc, gc->pc);
2034     }
2035 }
2036
2037 #define X_GLrop_Vertex3dv 69
2038 void
2039 __indirect_glVertex3dv(const GLdouble * v)
2040 {
2041     generic_24_byte(X_GLrop_Vertex3dv, v);
2042 }
2043
2044 #define X_GLrop_Vertex3fv 70
2045 void
2046 __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
2047 {
2048     struct glx_context *const gc = __glXGetCurrentContext();
2049     const GLuint cmdlen = 16;
2050     emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
2051     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2052     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2053     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2054     gc->pc += cmdlen;
2055     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2056         (void) __glXFlushRenderBuffer(gc, gc->pc);
2057     }
2058 }
2059
2060 #define X_GLrop_Vertex3fv 70
2061 void
2062 __indirect_glVertex3fv(const GLfloat * v)
2063 {
2064     generic_12_byte(X_GLrop_Vertex3fv, v);
2065 }
2066
2067 #define X_GLrop_Vertex3iv 71
2068 void
2069 __indirect_glVertex3i(GLint x, GLint y, GLint z)
2070 {
2071     struct glx_context *const gc = __glXGetCurrentContext();
2072     const GLuint cmdlen = 16;
2073     emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
2074     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2075     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2076     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2077     gc->pc += cmdlen;
2078     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2079         (void) __glXFlushRenderBuffer(gc, gc->pc);
2080     }
2081 }
2082
2083 #define X_GLrop_Vertex3iv 71
2084 void
2085 __indirect_glVertex3iv(const GLint * v)
2086 {
2087     generic_12_byte(X_GLrop_Vertex3iv, v);
2088 }
2089
2090 #define X_GLrop_Vertex3sv 72
2091 void
2092 __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
2093 {
2094     struct glx_context *const gc = __glXGetCurrentContext();
2095     const GLuint cmdlen = 12;
2096     emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
2097     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2098     (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2099     (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2100     gc->pc += cmdlen;
2101     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2102         (void) __glXFlushRenderBuffer(gc, gc->pc);
2103     }
2104 }
2105
2106 #define X_GLrop_Vertex3sv 72
2107 void
2108 __indirect_glVertex3sv(const GLshort * v)
2109 {
2110     generic_6_byte(X_GLrop_Vertex3sv, v);
2111 }
2112
2113 #define X_GLrop_Vertex4dv 73
2114 void
2115 __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
2116 {
2117     struct glx_context *const gc = __glXGetCurrentContext();
2118     const GLuint cmdlen = 36;
2119     emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
2120     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2121     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2122     (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2123     (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
2124     gc->pc += cmdlen;
2125     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2126         (void) __glXFlushRenderBuffer(gc, gc->pc);
2127     }
2128 }
2129
2130 #define X_GLrop_Vertex4dv 73
2131 void
2132 __indirect_glVertex4dv(const GLdouble * v)
2133 {
2134     generic_32_byte(X_GLrop_Vertex4dv, v);
2135 }
2136
2137 #define X_GLrop_Vertex4fv 74
2138 void
2139 __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2140 {
2141     struct glx_context *const gc = __glXGetCurrentContext();
2142     const GLuint cmdlen = 20;
2143     emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
2144     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2145     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2146     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2147     (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2148     gc->pc += cmdlen;
2149     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2150         (void) __glXFlushRenderBuffer(gc, gc->pc);
2151     }
2152 }
2153
2154 #define X_GLrop_Vertex4fv 74
2155 void
2156 __indirect_glVertex4fv(const GLfloat * v)
2157 {
2158     generic_16_byte(X_GLrop_Vertex4fv, v);
2159 }
2160
2161 #define X_GLrop_Vertex4iv 75
2162 void
2163 __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
2164 {
2165     struct glx_context *const gc = __glXGetCurrentContext();
2166     const GLuint cmdlen = 20;
2167     emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
2168     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2169     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2170     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2171     (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2172     gc->pc += cmdlen;
2173     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2174         (void) __glXFlushRenderBuffer(gc, gc->pc);
2175     }
2176 }
2177
2178 #define X_GLrop_Vertex4iv 75
2179 void
2180 __indirect_glVertex4iv(const GLint * v)
2181 {
2182     generic_16_byte(X_GLrop_Vertex4iv, v);
2183 }
2184
2185 #define X_GLrop_Vertex4sv 76
2186 void
2187 __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
2188 {
2189     struct glx_context *const gc = __glXGetCurrentContext();
2190     const GLuint cmdlen = 12;
2191     emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
2192     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2193     (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2194     (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2195     (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
2196     gc->pc += cmdlen;
2197     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2198         (void) __glXFlushRenderBuffer(gc, gc->pc);
2199     }
2200 }
2201
2202 #define X_GLrop_Vertex4sv 76
2203 void
2204 __indirect_glVertex4sv(const GLshort * v)
2205 {
2206     generic_8_byte(X_GLrop_Vertex4sv, v);
2207 }
2208
2209 #define X_GLrop_ClipPlane 77
2210 void
2211 __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
2212 {
2213     struct glx_context *const gc = __glXGetCurrentContext();
2214     const GLuint cmdlen = 40;
2215     emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
2216     (void) memcpy((void *) (gc->pc + 4), (void *) (equation), 32);
2217     (void) memcpy((void *) (gc->pc + 36), (void *) (&plane), 4);
2218     gc->pc += cmdlen;
2219     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2220         (void) __glXFlushRenderBuffer(gc, gc->pc);
2221     }
2222 }
2223
2224 #define X_GLrop_ColorMaterial 78
2225 void
2226 __indirect_glColorMaterial(GLenum face, GLenum mode)
2227 {
2228     struct glx_context *const gc = __glXGetCurrentContext();
2229     const GLuint cmdlen = 12;
2230     emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
2231     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2232     (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2233     gc->pc += cmdlen;
2234     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2235         (void) __glXFlushRenderBuffer(gc, gc->pc);
2236     }
2237 }
2238
2239 #define X_GLrop_CullFace 79
2240 void
2241 __indirect_glCullFace(GLenum mode)
2242 {
2243     struct glx_context *const gc = __glXGetCurrentContext();
2244     const GLuint cmdlen = 8;
2245     emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
2246     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2247     gc->pc += cmdlen;
2248     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2249         (void) __glXFlushRenderBuffer(gc, gc->pc);
2250     }
2251 }
2252
2253 #define X_GLrop_Fogf 80
2254 void
2255 __indirect_glFogf(GLenum pname, GLfloat param)
2256 {
2257     struct glx_context *const gc = __glXGetCurrentContext();
2258     const GLuint cmdlen = 12;
2259     emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
2260     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2261     (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2262     gc->pc += cmdlen;
2263     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2264         (void) __glXFlushRenderBuffer(gc, gc->pc);
2265     }
2266 }
2267
2268 #define X_GLrop_Fogfv 81
2269 void
2270 __indirect_glFogfv(GLenum pname, const GLfloat * params)
2271 {
2272     struct glx_context *const gc = __glXGetCurrentContext();
2273     const GLuint compsize = __glFogfv_size(pname);
2274     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2275     emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
2276     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2277     (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2278     gc->pc += cmdlen;
2279     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2280         (void) __glXFlushRenderBuffer(gc, gc->pc);
2281     }
2282 }
2283
2284 #define X_GLrop_Fogi 82
2285 void
2286 __indirect_glFogi(GLenum pname, GLint param)
2287 {
2288     struct glx_context *const gc = __glXGetCurrentContext();
2289     const GLuint cmdlen = 12;
2290     emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
2291     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2292     (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2293     gc->pc += cmdlen;
2294     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2295         (void) __glXFlushRenderBuffer(gc, gc->pc);
2296     }
2297 }
2298
2299 #define X_GLrop_Fogiv 83
2300 void
2301 __indirect_glFogiv(GLenum pname, const GLint * params)
2302 {
2303     struct glx_context *const gc = __glXGetCurrentContext();
2304     const GLuint compsize = __glFogiv_size(pname);
2305     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2306     emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
2307     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2308     (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2309     gc->pc += cmdlen;
2310     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2311         (void) __glXFlushRenderBuffer(gc, gc->pc);
2312     }
2313 }
2314
2315 #define X_GLrop_FrontFace 84
2316 void
2317 __indirect_glFrontFace(GLenum mode)
2318 {
2319     struct glx_context *const gc = __glXGetCurrentContext();
2320     const GLuint cmdlen = 8;
2321     emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
2322     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2323     gc->pc += cmdlen;
2324     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2325         (void) __glXFlushRenderBuffer(gc, gc->pc);
2326     }
2327 }
2328
2329 #define X_GLrop_Hint 85
2330 void
2331 __indirect_glHint(GLenum target, GLenum mode)
2332 {
2333     struct glx_context *const gc = __glXGetCurrentContext();
2334     const GLuint cmdlen = 12;
2335     emit_header(gc->pc, X_GLrop_Hint, cmdlen);
2336     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2337     (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2338     gc->pc += cmdlen;
2339     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2340         (void) __glXFlushRenderBuffer(gc, gc->pc);
2341     }
2342 }
2343
2344 #define X_GLrop_Lightf 86
2345 void
2346 __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
2347 {
2348     struct glx_context *const gc = __glXGetCurrentContext();
2349     const GLuint cmdlen = 16;
2350     emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
2351     (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2352     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2353     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2354     gc->pc += cmdlen;
2355     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2356         (void) __glXFlushRenderBuffer(gc, gc->pc);
2357     }
2358 }
2359
2360 #define X_GLrop_Lightfv 87
2361 void
2362 __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
2363 {
2364     struct glx_context *const gc = __glXGetCurrentContext();
2365     const GLuint compsize = __glLightfv_size(pname);
2366     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2367     emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
2368     (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2369     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2370     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2371     gc->pc += cmdlen;
2372     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2373         (void) __glXFlushRenderBuffer(gc, gc->pc);
2374     }
2375 }
2376
2377 #define X_GLrop_Lighti 88
2378 void
2379 __indirect_glLighti(GLenum light, GLenum pname, GLint param)
2380 {
2381     struct glx_context *const gc = __glXGetCurrentContext();
2382     const GLuint cmdlen = 16;
2383     emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
2384     (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2385     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2386     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2387     gc->pc += cmdlen;
2388     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2389         (void) __glXFlushRenderBuffer(gc, gc->pc);
2390     }
2391 }
2392
2393 #define X_GLrop_Lightiv 89
2394 void
2395 __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
2396 {
2397     struct glx_context *const gc = __glXGetCurrentContext();
2398     const GLuint compsize = __glLightiv_size(pname);
2399     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2400     emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
2401     (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2402     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2403     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2404     gc->pc += cmdlen;
2405     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2406         (void) __glXFlushRenderBuffer(gc, gc->pc);
2407     }
2408 }
2409
2410 #define X_GLrop_LightModelf 90
2411 void
2412 __indirect_glLightModelf(GLenum pname, GLfloat param)
2413 {
2414     struct glx_context *const gc = __glXGetCurrentContext();
2415     const GLuint cmdlen = 12;
2416     emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
2417     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2418     (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2419     gc->pc += cmdlen;
2420     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2421         (void) __glXFlushRenderBuffer(gc, gc->pc);
2422     }
2423 }
2424
2425 #define X_GLrop_LightModelfv 91
2426 void
2427 __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
2428 {
2429     struct glx_context *const gc = __glXGetCurrentContext();
2430     const GLuint compsize = __glLightModelfv_size(pname);
2431     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2432     emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
2433     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2434     (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2435     gc->pc += cmdlen;
2436     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2437         (void) __glXFlushRenderBuffer(gc, gc->pc);
2438     }
2439 }
2440
2441 #define X_GLrop_LightModeli 92
2442 void
2443 __indirect_glLightModeli(GLenum pname, GLint param)
2444 {
2445     struct glx_context *const gc = __glXGetCurrentContext();
2446     const GLuint cmdlen = 12;
2447     emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
2448     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2449     (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2450     gc->pc += cmdlen;
2451     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2452         (void) __glXFlushRenderBuffer(gc, gc->pc);
2453     }
2454 }
2455
2456 #define X_GLrop_LightModeliv 93
2457 void
2458 __indirect_glLightModeliv(GLenum pname, const GLint * params)
2459 {
2460     struct glx_context *const gc = __glXGetCurrentContext();
2461     const GLuint compsize = __glLightModeliv_size(pname);
2462     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2463     emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
2464     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2465     (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2466     gc->pc += cmdlen;
2467     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2468         (void) __glXFlushRenderBuffer(gc, gc->pc);
2469     }
2470 }
2471
2472 #define X_GLrop_LineStipple 94
2473 void
2474 __indirect_glLineStipple(GLint factor, GLushort pattern)
2475 {
2476     struct glx_context *const gc = __glXGetCurrentContext();
2477     const GLuint cmdlen = 12;
2478     emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
2479     (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
2480     (void) memcpy((void *) (gc->pc + 8), (void *) (&pattern), 2);
2481     gc->pc += cmdlen;
2482     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2483         (void) __glXFlushRenderBuffer(gc, gc->pc);
2484     }
2485 }
2486
2487 #define X_GLrop_LineWidth 95
2488 void
2489 __indirect_glLineWidth(GLfloat width)
2490 {
2491     struct glx_context *const gc = __glXGetCurrentContext();
2492     const GLuint cmdlen = 8;
2493     emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
2494     (void) memcpy((void *) (gc->pc + 4), (void *) (&width), 4);
2495     gc->pc += cmdlen;
2496     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2497         (void) __glXFlushRenderBuffer(gc, gc->pc);
2498     }
2499 }
2500
2501 #define X_GLrop_Materialf 96
2502 void
2503 __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
2504 {
2505     struct glx_context *const gc = __glXGetCurrentContext();
2506     const GLuint cmdlen = 16;
2507     emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
2508     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2509     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2510     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2511     gc->pc += cmdlen;
2512     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2513         (void) __glXFlushRenderBuffer(gc, gc->pc);
2514     }
2515 }
2516
2517 #define X_GLrop_Materialfv 97
2518 void
2519 __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
2520 {
2521     struct glx_context *const gc = __glXGetCurrentContext();
2522     const GLuint compsize = __glMaterialfv_size(pname);
2523     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2524     emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
2525     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2526     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2527     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2528     gc->pc += cmdlen;
2529     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2530         (void) __glXFlushRenderBuffer(gc, gc->pc);
2531     }
2532 }
2533
2534 #define X_GLrop_Materiali 98
2535 void
2536 __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
2537 {
2538     struct glx_context *const gc = __glXGetCurrentContext();
2539     const GLuint cmdlen = 16;
2540     emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
2541     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2542     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2543     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2544     gc->pc += cmdlen;
2545     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2546         (void) __glXFlushRenderBuffer(gc, gc->pc);
2547     }
2548 }
2549
2550 #define X_GLrop_Materialiv 99
2551 void
2552 __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
2553 {
2554     struct glx_context *const gc = __glXGetCurrentContext();
2555     const GLuint compsize = __glMaterialiv_size(pname);
2556     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2557     emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
2558     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2559     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2560     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2561     gc->pc += cmdlen;
2562     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2563         (void) __glXFlushRenderBuffer(gc, gc->pc);
2564     }
2565 }
2566
2567 #define X_GLrop_PointSize 100
2568 void
2569 __indirect_glPointSize(GLfloat size)
2570 {
2571     struct glx_context *const gc = __glXGetCurrentContext();
2572     const GLuint cmdlen = 8;
2573     emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
2574     (void) memcpy((void *) (gc->pc + 4), (void *) (&size), 4);
2575     gc->pc += cmdlen;
2576     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2577         (void) __glXFlushRenderBuffer(gc, gc->pc);
2578     }
2579 }
2580
2581 #define X_GLrop_PolygonMode 101
2582 void
2583 __indirect_glPolygonMode(GLenum face, GLenum mode)
2584 {
2585     struct glx_context *const gc = __glXGetCurrentContext();
2586     const GLuint cmdlen = 12;
2587     emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
2588     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2589     (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2590     gc->pc += cmdlen;
2591     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2592         (void) __glXFlushRenderBuffer(gc, gc->pc);
2593     }
2594 }
2595
2596 #define X_GLrop_PolygonStipple 102
2597 void
2598 __indirect_glPolygonStipple(const GLubyte *mask)
2599 {
2600     struct glx_context *const gc = __glXGetCurrentContext();
2601     const GLuint compsize =
2602         (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
2603                                        0) : 0;
2604     const GLuint cmdlen = 24 + __GLX_PAD(compsize);
2605     emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
2606     if (compsize > 0) {
2607         (*gc->fillImage) (gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask,
2608                           gc->pc + 24, gc->pc + 4);
2609     } else {
2610         (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2611                       default_pixel_store_2D_size);
2612     }
2613     gc->pc += cmdlen;
2614     if (gc->pc > gc->limit) {
2615         (void) __glXFlushRenderBuffer(gc, gc->pc);
2616     }
2617 }
2618
2619 #define X_GLrop_Scissor 103
2620 void
2621 __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
2622 {
2623     struct glx_context *const gc = __glXGetCurrentContext();
2624     const GLuint cmdlen = 20;
2625     emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
2626     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2627     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2628     (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
2629     (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
2630     gc->pc += cmdlen;
2631     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2632         (void) __glXFlushRenderBuffer(gc, gc->pc);
2633     }
2634 }
2635
2636 #define X_GLrop_ShadeModel 104
2637 void
2638 __indirect_glShadeModel(GLenum mode)
2639 {
2640     struct glx_context *const gc = __glXGetCurrentContext();
2641     const GLuint cmdlen = 8;
2642     emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
2643     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2644     gc->pc += cmdlen;
2645     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2646         (void) __glXFlushRenderBuffer(gc, gc->pc);
2647     }
2648 }
2649
2650 #define X_GLrop_TexParameterf 105
2651 void
2652 __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
2653 {
2654     struct glx_context *const gc = __glXGetCurrentContext();
2655     const GLuint cmdlen = 16;
2656     emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
2657     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2658     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2659     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2660     gc->pc += cmdlen;
2661     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2662         (void) __glXFlushRenderBuffer(gc, gc->pc);
2663     }
2664 }
2665
2666 #define X_GLrop_TexParameterfv 106
2667 void
2668 __indirect_glTexParameterfv(GLenum target, GLenum pname,
2669                             const GLfloat * params)
2670 {
2671     struct glx_context *const gc = __glXGetCurrentContext();
2672     const GLuint compsize = __glTexParameterfv_size(pname);
2673     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2674     emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
2675     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2676     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2677     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2678     gc->pc += cmdlen;
2679     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2680         (void) __glXFlushRenderBuffer(gc, gc->pc);
2681     }
2682 }
2683
2684 #define X_GLrop_TexParameteri 107
2685 void
2686 __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
2687 {
2688     struct glx_context *const gc = __glXGetCurrentContext();
2689     const GLuint cmdlen = 16;
2690     emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
2691     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2692     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2693     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2694     gc->pc += cmdlen;
2695     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2696         (void) __glXFlushRenderBuffer(gc, gc->pc);
2697     }
2698 }
2699
2700 #define X_GLrop_TexParameteriv 108
2701 void
2702 __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
2703 {
2704     struct glx_context *const gc = __glXGetCurrentContext();
2705     const GLuint compsize = __glTexParameteriv_size(pname);
2706     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2707     emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
2708     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2709     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2710     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2711     gc->pc += cmdlen;
2712     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2713         (void) __glXFlushRenderBuffer(gc, gc->pc);
2714     }
2715 }
2716
2717 static void
2718 __glx_TexImage_1D2D(unsigned opcode, unsigned dim, GLenum target, GLint level,
2719                     GLint internalformat, GLsizei width, GLsizei height,
2720                     GLint border, GLenum format, GLenum type,
2721                     const GLvoid * pixels)
2722 {
2723     struct glx_context *const gc = __glXGetCurrentContext();
2724     const GLuint compsize =
2725         __glImageSize(width, height, 1, format, type, target);
2726     const GLuint cmdlen = 56 + __GLX_PAD(compsize);
2727     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
2728         if (cmdlen <= gc->maxSmallRenderCommandSize) {
2729             if ((gc->pc + cmdlen) > gc->bufEnd) {
2730                 (void) __glXFlushRenderBuffer(gc, gc->pc);
2731             }
2732             emit_header(gc->pc, opcode, cmdlen);
2733             (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
2734             (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
2735             (void) memcpy((void *) (gc->pc + 32), (void *) (&internalformat),
2736                           4);
2737             (void) memcpy((void *) (gc->pc + 36), (void *) (&width), 4);
2738             (void) memcpy((void *) (gc->pc + 40), (void *) (&height), 4);
2739             (void) memcpy((void *) (gc->pc + 44), (void *) (&border), 4);
2740             (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
2741             (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
2742             if ((compsize > 0) && (pixels != NULL)) {
2743                 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
2744                                   pixels, gc->pc + 56, gc->pc + 4);
2745             } else {
2746                 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2747                               default_pixel_store_2D_size);
2748             }
2749             gc->pc += cmdlen;
2750             if (gc->pc > gc->limit) {
2751                 (void) __glXFlushRenderBuffer(gc, gc->pc);
2752             }
2753         } else {
2754             const GLint op = opcode;
2755             const GLuint cmdlenLarge = cmdlen + 4;
2756             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
2757             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
2758             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
2759             (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
2760             (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
2761             (void) memcpy((void *) (pc + 36), (void *) (&internalformat), 4);
2762             (void) memcpy((void *) (pc + 40), (void *) (&width), 4);
2763             (void) memcpy((void *) (pc + 44), (void *) (&height), 4);
2764             (void) memcpy((void *) (pc + 48), (void *) (&border), 4);
2765             (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
2766             (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
2767             __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
2768                                 type, pixels, pc + 60, pc + 8);
2769         }
2770     }
2771 }
2772
2773 #define X_GLrop_TexImage1D 109
2774 void
2775 __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat,
2776                         GLsizei width, GLint border, GLenum format,
2777                         GLenum type, const GLvoid * pixels)
2778 {
2779     __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat,
2780                         width, 1, border, format, type, pixels);
2781 }
2782
2783 #define X_GLrop_TexImage2D 110
2784 void
2785 __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat,
2786                         GLsizei width, GLsizei height, GLint border,
2787                         GLenum format, GLenum type, const GLvoid * pixels)
2788 {
2789     __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat,
2790                         width, height, border, format, type, pixels);
2791 }
2792
2793 #define X_GLrop_TexEnvf 111
2794 void
2795 __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
2796 {
2797     struct glx_context *const gc = __glXGetCurrentContext();
2798     const GLuint cmdlen = 16;
2799     emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
2800     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2801     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2802     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2803     gc->pc += cmdlen;
2804     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2805         (void) __glXFlushRenderBuffer(gc, gc->pc);
2806     }
2807 }
2808
2809 #define X_GLrop_TexEnvfv 112
2810 void
2811 __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
2812 {
2813     struct glx_context *const gc = __glXGetCurrentContext();
2814     const GLuint compsize = __glTexEnvfv_size(pname);
2815     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2816     emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
2817     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2818     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2819     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2820     gc->pc += cmdlen;
2821     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2822         (void) __glXFlushRenderBuffer(gc, gc->pc);
2823     }
2824 }
2825
2826 #define X_GLrop_TexEnvi 113
2827 void
2828 __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
2829 {
2830     struct glx_context *const gc = __glXGetCurrentContext();
2831     const GLuint cmdlen = 16;
2832     emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
2833     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2834     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2835     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2836     gc->pc += cmdlen;
2837     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2838         (void) __glXFlushRenderBuffer(gc, gc->pc);
2839     }
2840 }
2841
2842 #define X_GLrop_TexEnviv 114
2843 void
2844 __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
2845 {
2846     struct glx_context *const gc = __glXGetCurrentContext();
2847     const GLuint compsize = __glTexEnviv_size(pname);
2848     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2849     emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
2850     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2851     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2852     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2853     gc->pc += cmdlen;
2854     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2855         (void) __glXFlushRenderBuffer(gc, gc->pc);
2856     }
2857 }
2858
2859 #define X_GLrop_TexGend 115
2860 void
2861 __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
2862 {
2863     struct glx_context *const gc = __glXGetCurrentContext();
2864     const GLuint cmdlen = 20;
2865     emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
2866     (void) memcpy((void *) (gc->pc + 4), (void *) (&param), 8);
2867     (void) memcpy((void *) (gc->pc + 12), (void *) (&coord), 4);
2868     (void) memcpy((void *) (gc->pc + 16), (void *) (&pname), 4);
2869     gc->pc += cmdlen;
2870     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2871         (void) __glXFlushRenderBuffer(gc, gc->pc);
2872     }
2873 }
2874
2875 #define X_GLrop_TexGendv 116
2876 void
2877 __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
2878 {
2879     struct glx_context *const gc = __glXGetCurrentContext();
2880     const GLuint compsize = __glTexGendv_size(pname);
2881     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
2882     emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
2883     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2884     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2885     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 8));
2886     gc->pc += cmdlen;
2887     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2888         (void) __glXFlushRenderBuffer(gc, gc->pc);
2889     }
2890 }
2891
2892 #define X_GLrop_TexGenf 117
2893 void
2894 __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
2895 {
2896     struct glx_context *const gc = __glXGetCurrentContext();
2897     const GLuint cmdlen = 16;
2898     emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
2899     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2900     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2901     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2902     gc->pc += cmdlen;
2903     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2904         (void) __glXFlushRenderBuffer(gc, gc->pc);
2905     }
2906 }
2907
2908 #define X_GLrop_TexGenfv 118
2909 void
2910 __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
2911 {
2912     struct glx_context *const gc = __glXGetCurrentContext();
2913     const GLuint compsize = __glTexGenfv_size(pname);
2914     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2915     emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
2916     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2917     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2918     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2919     gc->pc += cmdlen;
2920     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2921         (void) __glXFlushRenderBuffer(gc, gc->pc);
2922     }
2923 }
2924
2925 #define X_GLrop_TexGeni 119
2926 void
2927 __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
2928 {
2929     struct glx_context *const gc = __glXGetCurrentContext();
2930     const GLuint cmdlen = 16;
2931     emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
2932     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2933     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2934     (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2935     gc->pc += cmdlen;
2936     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2937         (void) __glXFlushRenderBuffer(gc, gc->pc);
2938     }
2939 }
2940
2941 #define X_GLrop_TexGeniv 120
2942 void
2943 __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
2944 {
2945     struct glx_context *const gc = __glXGetCurrentContext();
2946     const GLuint compsize = __glTexGeniv_size(pname);
2947     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2948     emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
2949     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2950     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2951     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2952     gc->pc += cmdlen;
2953     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2954         (void) __glXFlushRenderBuffer(gc, gc->pc);
2955     }
2956 }
2957
2958 #define X_GLrop_InitNames 121
2959 void
2960 __indirect_glInitNames(void)
2961 {
2962     struct glx_context *const gc = __glXGetCurrentContext();
2963     const GLuint cmdlen = 4;
2964     emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
2965     gc->pc += cmdlen;
2966     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2967         (void) __glXFlushRenderBuffer(gc, gc->pc);
2968     }
2969 }
2970
2971 #define X_GLrop_LoadName 122
2972 void
2973 __indirect_glLoadName(GLuint name)
2974 {
2975     struct glx_context *const gc = __glXGetCurrentContext();
2976     const GLuint cmdlen = 8;
2977     emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
2978     (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
2979     gc->pc += cmdlen;
2980     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2981         (void) __glXFlushRenderBuffer(gc, gc->pc);
2982     }
2983 }
2984
2985 #define X_GLrop_PassThrough 123
2986 void
2987 __indirect_glPassThrough(GLfloat token)
2988 {
2989     struct glx_context *const gc = __glXGetCurrentContext();
2990     const GLuint cmdlen = 8;
2991     emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
2992     (void) memcpy((void *) (gc->pc + 4), (void *) (&token), 4);
2993     gc->pc += cmdlen;
2994     if (__builtin_expect(gc->pc > gc->limit, 0)) {
2995         (void) __glXFlushRenderBuffer(gc, gc->pc);
2996     }
2997 }
2998
2999 #define X_GLrop_PopName 124
3000 void
3001 __indirect_glPopName(void)
3002 {
3003     struct glx_context *const gc = __glXGetCurrentContext();
3004     const GLuint cmdlen = 4;
3005     emit_header(gc->pc, X_GLrop_PopName, cmdlen);
3006     gc->pc += cmdlen;
3007     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3008         (void) __glXFlushRenderBuffer(gc, gc->pc);
3009     }
3010 }
3011
3012 #define X_GLrop_PushName 125
3013 void
3014 __indirect_glPushName(GLuint name)
3015 {
3016     struct glx_context *const gc = __glXGetCurrentContext();
3017     const GLuint cmdlen = 8;
3018     emit_header(gc->pc, X_GLrop_PushName, cmdlen);
3019     (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
3020     gc->pc += cmdlen;
3021     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3022         (void) __glXFlushRenderBuffer(gc, gc->pc);
3023     }
3024 }
3025
3026 #define X_GLrop_DrawBuffer 126
3027 void
3028 __indirect_glDrawBuffer(GLenum mode)
3029 {
3030     struct glx_context *const gc = __glXGetCurrentContext();
3031     const GLuint cmdlen = 8;
3032     emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
3033     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3034     gc->pc += cmdlen;
3035     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3036         (void) __glXFlushRenderBuffer(gc, gc->pc);
3037     }
3038 }
3039
3040 #define X_GLrop_Clear 127
3041 void
3042 __indirect_glClear(GLbitfield mask)
3043 {
3044     struct glx_context *const gc = __glXGetCurrentContext();
3045     const GLuint cmdlen = 8;
3046     emit_header(gc->pc, X_GLrop_Clear, cmdlen);
3047     (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3048     gc->pc += cmdlen;
3049     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3050         (void) __glXFlushRenderBuffer(gc, gc->pc);
3051     }
3052 }
3053
3054 #define X_GLrop_ClearAccum 128
3055 void
3056 __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue,
3057                         GLfloat alpha)
3058 {
3059     struct glx_context *const gc = __glXGetCurrentContext();
3060     const GLuint cmdlen = 20;
3061     emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
3062     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3063     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3064     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3065     (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3066     gc->pc += cmdlen;
3067     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3068         (void) __glXFlushRenderBuffer(gc, gc->pc);
3069     }
3070 }
3071
3072 #define X_GLrop_ClearIndex 129
3073 void
3074 __indirect_glClearIndex(GLfloat c)
3075 {
3076     struct glx_context *const gc = __glXGetCurrentContext();
3077     const GLuint cmdlen = 8;
3078     emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
3079     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
3080     gc->pc += cmdlen;
3081     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3082         (void) __glXFlushRenderBuffer(gc, gc->pc);
3083     }
3084 }
3085
3086 #define X_GLrop_ClearColor 130
3087 void
3088 __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue,
3089                         GLclampf alpha)
3090 {
3091     struct glx_context *const gc = __glXGetCurrentContext();
3092     const GLuint cmdlen = 20;
3093     emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
3094     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3095     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3096     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3097     (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3098     gc->pc += cmdlen;
3099     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3100         (void) __glXFlushRenderBuffer(gc, gc->pc);
3101     }
3102 }
3103
3104 #define X_GLrop_ClearStencil 131
3105 void
3106 __indirect_glClearStencil(GLint s)
3107 {
3108     struct glx_context *const gc = __glXGetCurrentContext();
3109     const GLuint cmdlen = 8;
3110     emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
3111     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
3112     gc->pc += cmdlen;
3113     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3114         (void) __glXFlushRenderBuffer(gc, gc->pc);
3115     }
3116 }
3117
3118 #define X_GLrop_ClearDepth 132
3119 void
3120 __indirect_glClearDepth(GLclampd depth)
3121 {
3122     struct glx_context *const gc = __glXGetCurrentContext();
3123     const GLuint cmdlen = 12;
3124     emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
3125     (void) memcpy((void *) (gc->pc + 4), (void *) (&depth), 8);
3126     gc->pc += cmdlen;
3127     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3128         (void) __glXFlushRenderBuffer(gc, gc->pc);
3129     }
3130 }
3131
3132 #define X_GLrop_StencilMask 133
3133 void
3134 __indirect_glStencilMask(GLuint mask)
3135 {
3136     struct glx_context *const gc = __glXGetCurrentContext();
3137     const GLuint cmdlen = 8;
3138     emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
3139     (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3140     gc->pc += cmdlen;
3141     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3142         (void) __glXFlushRenderBuffer(gc, gc->pc);
3143     }
3144 }
3145
3146 #define X_GLrop_ColorMask 134
3147 void
3148 __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue,
3149                        GLboolean alpha)
3150 {
3151     struct glx_context *const gc = __glXGetCurrentContext();
3152     const GLuint cmdlen = 8;
3153     emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
3154     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
3155     (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
3156     (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
3157     (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
3158     gc->pc += cmdlen;
3159     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3160         (void) __glXFlushRenderBuffer(gc, gc->pc);
3161     }
3162 }
3163
3164 #define X_GLrop_DepthMask 135
3165 void
3166 __indirect_glDepthMask(GLboolean flag)
3167 {
3168     struct glx_context *const gc = __glXGetCurrentContext();
3169     const GLuint cmdlen = 8;
3170     emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
3171     (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
3172     gc->pc += cmdlen;
3173     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3174         (void) __glXFlushRenderBuffer(gc, gc->pc);
3175     }
3176 }
3177
3178 #define X_GLrop_IndexMask 136
3179 void
3180 __indirect_glIndexMask(GLuint mask)
3181 {
3182     struct glx_context *const gc = __glXGetCurrentContext();
3183     const GLuint cmdlen = 8;
3184     emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
3185     (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3186     gc->pc += cmdlen;
3187     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3188         (void) __glXFlushRenderBuffer(gc, gc->pc);
3189     }
3190 }
3191
3192 #define X_GLrop_Accum 137
3193 void
3194 __indirect_glAccum(GLenum op, GLfloat value)
3195 {
3196     struct glx_context *const gc = __glXGetCurrentContext();
3197     const GLuint cmdlen = 12;
3198     emit_header(gc->pc, X_GLrop_Accum, cmdlen);
3199     (void) memcpy((void *) (gc->pc + 4), (void *) (&op), 4);
3200     (void) memcpy((void *) (gc->pc + 8), (void *) (&value), 4);
3201     gc->pc += cmdlen;
3202     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3203         (void) __glXFlushRenderBuffer(gc, gc->pc);
3204     }
3205 }
3206
3207 #define X_GLrop_PopAttrib 141
3208 void
3209 __indirect_glPopAttrib(void)
3210 {
3211     struct glx_context *const gc = __glXGetCurrentContext();
3212     const GLuint cmdlen = 4;
3213     emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
3214     gc->pc += cmdlen;
3215     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3216         (void) __glXFlushRenderBuffer(gc, gc->pc);
3217     }
3218 }
3219
3220 #define X_GLrop_PushAttrib 142
3221 void
3222 __indirect_glPushAttrib(GLbitfield mask)
3223 {
3224     struct glx_context *const gc = __glXGetCurrentContext();
3225     const GLuint cmdlen = 8;
3226     emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
3227     (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3228     gc->pc += cmdlen;
3229     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3230         (void) __glXFlushRenderBuffer(gc, gc->pc);
3231     }
3232 }
3233
3234 #define X_GLrop_MapGrid1d 147
3235 void
3236 __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
3237 {
3238     struct glx_context *const gc = __glXGetCurrentContext();
3239     const GLuint cmdlen = 24;
3240     emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
3241     (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3242     (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3243     (void) memcpy((void *) (gc->pc + 20), (void *) (&un), 4);
3244     gc->pc += cmdlen;
3245     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3246         (void) __glXFlushRenderBuffer(gc, gc->pc);
3247     }
3248 }
3249
3250 #define X_GLrop_MapGrid1f 148
3251 void
3252 __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
3253 {
3254     struct glx_context *const gc = __glXGetCurrentContext();
3255     const GLuint cmdlen = 16;
3256     emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
3257     (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3258     (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3259     (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3260     gc->pc += cmdlen;
3261     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3262         (void) __glXFlushRenderBuffer(gc, gc->pc);
3263     }
3264 }
3265
3266 #define X_GLrop_MapGrid2d 149
3267 void
3268 __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn,
3269                        GLdouble v1, GLdouble v2)
3270 {
3271     struct glx_context *const gc = __glXGetCurrentContext();
3272     const GLuint cmdlen = 44;
3273     emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
3274     (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3275     (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3276     (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 8);
3277     (void) memcpy((void *) (gc->pc + 28), (void *) (&v2), 8);
3278     (void) memcpy((void *) (gc->pc + 36), (void *) (&un), 4);
3279     (void) memcpy((void *) (gc->pc + 40), (void *) (&vn), 4);
3280     gc->pc += cmdlen;
3281     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3282         (void) __glXFlushRenderBuffer(gc, gc->pc);
3283     }
3284 }
3285
3286 #define X_GLrop_MapGrid2f 150
3287 void
3288 __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
3289                        GLfloat v2)
3290 {
3291     struct glx_context *const gc = __glXGetCurrentContext();
3292     const GLuint cmdlen = 28;
3293     emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
3294     (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3295     (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3296     (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3297     (void) memcpy((void *) (gc->pc + 16), (void *) (&vn), 4);
3298     (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 4);
3299     (void) memcpy((void *) (gc->pc + 24), (void *) (&v2), 4);
3300     gc->pc += cmdlen;
3301     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3302         (void) __glXFlushRenderBuffer(gc, gc->pc);
3303     }
3304 }
3305
3306 #define X_GLrop_EvalCoord1dv 151
3307 void
3308 __indirect_glEvalCoord1d(GLdouble u)
3309 {
3310     struct glx_context *const gc = __glXGetCurrentContext();
3311     const GLuint cmdlen = 12;
3312     emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
3313     (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3314     gc->pc += cmdlen;
3315     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3316         (void) __glXFlushRenderBuffer(gc, gc->pc);
3317     }
3318 }
3319
3320 #define X_GLrop_EvalCoord1dv 151
3321 void
3322 __indirect_glEvalCoord1dv(const GLdouble * u)
3323 {
3324     generic_8_byte(X_GLrop_EvalCoord1dv, u);
3325 }
3326
3327 #define X_GLrop_EvalCoord1fv 152
3328 void
3329 __indirect_glEvalCoord1f(GLfloat u)
3330 {
3331     struct glx_context *const gc = __glXGetCurrentContext();
3332     const GLuint cmdlen = 8;
3333     emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
3334     (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3335     gc->pc += cmdlen;
3336     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3337         (void) __glXFlushRenderBuffer(gc, gc->pc);
3338     }
3339 }
3340
3341 #define X_GLrop_EvalCoord1fv 152
3342 void
3343 __indirect_glEvalCoord1fv(const GLfloat * u)
3344 {
3345     generic_4_byte(X_GLrop_EvalCoord1fv, u);
3346 }
3347
3348 #define X_GLrop_EvalCoord2dv 153
3349 void
3350 __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
3351 {
3352     struct glx_context *const gc = __glXGetCurrentContext();
3353     const GLuint cmdlen = 20;
3354     emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
3355     (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3356     (void) memcpy((void *) (gc->pc + 12), (void *) (&v), 8);
3357     gc->pc += cmdlen;
3358     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3359         (void) __glXFlushRenderBuffer(gc, gc->pc);
3360     }
3361 }
3362
3363 #define X_GLrop_EvalCoord2dv 153
3364 void
3365 __indirect_glEvalCoord2dv(const GLdouble * u)
3366 {
3367     generic_16_byte(X_GLrop_EvalCoord2dv, u);
3368 }
3369
3370 #define X_GLrop_EvalCoord2fv 154
3371 void
3372 __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
3373 {
3374     struct glx_context *const gc = __glXGetCurrentContext();
3375     const GLuint cmdlen = 12;
3376     emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
3377     (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3378     (void) memcpy((void *) (gc->pc + 8), (void *) (&v), 4);
3379     gc->pc += cmdlen;
3380     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3381         (void) __glXFlushRenderBuffer(gc, gc->pc);
3382     }
3383 }
3384
3385 #define X_GLrop_EvalCoord2fv 154
3386 void
3387 __indirect_glEvalCoord2fv(const GLfloat * u)
3388 {
3389     generic_8_byte(X_GLrop_EvalCoord2fv, u);
3390 }
3391
3392 #define X_GLrop_EvalMesh1 155
3393 void
3394 __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
3395 {
3396     struct glx_context *const gc = __glXGetCurrentContext();
3397     const GLuint cmdlen = 16;
3398     emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
3399     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3400     (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3401     (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3402     gc->pc += cmdlen;
3403     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3404         (void) __glXFlushRenderBuffer(gc, gc->pc);
3405     }
3406 }
3407
3408 #define X_GLrop_EvalPoint1 156
3409 void
3410 __indirect_glEvalPoint1(GLint i)
3411 {
3412     struct glx_context *const gc = __glXGetCurrentContext();
3413     const GLuint cmdlen = 8;
3414     emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
3415     (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3416     gc->pc += cmdlen;
3417     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3418         (void) __glXFlushRenderBuffer(gc, gc->pc);
3419     }
3420 }
3421
3422 #define X_GLrop_EvalMesh2 157
3423 void
3424 __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
3425 {
3426     struct glx_context *const gc = __glXGetCurrentContext();
3427     const GLuint cmdlen = 24;
3428     emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
3429     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3430     (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3431     (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3432     (void) memcpy((void *) (gc->pc + 16), (void *) (&j1), 4);
3433     (void) memcpy((void *) (gc->pc + 20), (void *) (&j2), 4);
3434     gc->pc += cmdlen;
3435     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3436         (void) __glXFlushRenderBuffer(gc, gc->pc);
3437     }
3438 }
3439
3440 #define X_GLrop_EvalPoint2 158
3441 void
3442 __indirect_glEvalPoint2(GLint i, GLint j)
3443 {
3444     struct glx_context *const gc = __glXGetCurrentContext();
3445     const GLuint cmdlen = 12;
3446     emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
3447     (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3448     (void) memcpy((void *) (gc->pc + 8), (void *) (&j), 4);
3449     gc->pc += cmdlen;
3450     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3451         (void) __glXFlushRenderBuffer(gc, gc->pc);
3452     }
3453 }
3454
3455 #define X_GLrop_AlphaFunc 159
3456 void
3457 __indirect_glAlphaFunc(GLenum func, GLclampf ref)
3458 {
3459     struct glx_context *const gc = __glXGetCurrentContext();
3460     const GLuint cmdlen = 12;
3461     emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
3462     (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3463     (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3464     gc->pc += cmdlen;
3465     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3466         (void) __glXFlushRenderBuffer(gc, gc->pc);
3467     }
3468 }
3469
3470 #define X_GLrop_BlendFunc 160
3471 void
3472 __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
3473 {
3474     struct glx_context *const gc = __glXGetCurrentContext();
3475     const GLuint cmdlen = 12;
3476     emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
3477     (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactor), 4);
3478     (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactor), 4);
3479     gc->pc += cmdlen;
3480     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3481         (void) __glXFlushRenderBuffer(gc, gc->pc);
3482     }
3483 }
3484
3485 #define X_GLrop_LogicOp 161
3486 void
3487 __indirect_glLogicOp(GLenum opcode)
3488 {
3489     struct glx_context *const gc = __glXGetCurrentContext();
3490     const GLuint cmdlen = 8;
3491     emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
3492     (void) memcpy((void *) (gc->pc + 4), (void *) (&opcode), 4);
3493     gc->pc += cmdlen;
3494     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3495         (void) __glXFlushRenderBuffer(gc, gc->pc);
3496     }
3497 }
3498
3499 #define X_GLrop_StencilFunc 162
3500 void
3501 __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
3502 {
3503     struct glx_context *const gc = __glXGetCurrentContext();
3504     const GLuint cmdlen = 16;
3505     emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
3506     (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3507     (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3508     (void) memcpy((void *) (gc->pc + 12), (void *) (&mask), 4);
3509     gc->pc += cmdlen;
3510     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3511         (void) __glXFlushRenderBuffer(gc, gc->pc);
3512     }
3513 }
3514
3515 #define X_GLrop_StencilOp 163
3516 void
3517 __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
3518 {
3519     struct glx_context *const gc = __glXGetCurrentContext();
3520     const GLuint cmdlen = 16;
3521     emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
3522     (void) memcpy((void *) (gc->pc + 4), (void *) (&fail), 4);
3523     (void) memcpy((void *) (gc->pc + 8), (void *) (&zfail), 4);
3524     (void) memcpy((void *) (gc->pc + 12), (void *) (&zpass), 4);
3525     gc->pc += cmdlen;
3526     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3527         (void) __glXFlushRenderBuffer(gc, gc->pc);
3528     }
3529 }
3530
3531 #define X_GLrop_DepthFunc 164
3532 void
3533 __indirect_glDepthFunc(GLenum func)
3534 {
3535     struct glx_context *const gc = __glXGetCurrentContext();
3536     const GLuint cmdlen = 8;
3537     emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
3538     (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3539     gc->pc += cmdlen;
3540     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3541         (void) __glXFlushRenderBuffer(gc, gc->pc);
3542     }
3543 }
3544
3545 #define X_GLrop_PixelZoom 165
3546 void
3547 __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
3548 {
3549     struct glx_context *const gc = __glXGetCurrentContext();
3550     const GLuint cmdlen = 12;
3551     emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
3552     (void) memcpy((void *) (gc->pc + 4), (void *) (&xfactor), 4);
3553     (void) memcpy((void *) (gc->pc + 8), (void *) (&yfactor), 4);
3554     gc->pc += cmdlen;
3555     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3556         (void) __glXFlushRenderBuffer(gc, gc->pc);
3557     }
3558 }
3559
3560 #define X_GLrop_PixelTransferf 166
3561 void
3562 __indirect_glPixelTransferf(GLenum pname, GLfloat param)
3563 {
3564     struct glx_context *const gc = __glXGetCurrentContext();
3565     const GLuint cmdlen = 12;
3566     emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
3567     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3568     (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3569     gc->pc += cmdlen;
3570     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3571         (void) __glXFlushRenderBuffer(gc, gc->pc);
3572     }
3573 }
3574
3575 #define X_GLrop_PixelTransferi 167
3576 void
3577 __indirect_glPixelTransferi(GLenum pname, GLint param)
3578 {
3579     struct glx_context *const gc = __glXGetCurrentContext();
3580     const GLuint cmdlen = 12;
3581     emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
3582     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3583     (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3584     gc->pc += cmdlen;
3585     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3586         (void) __glXFlushRenderBuffer(gc, gc->pc);
3587     }
3588 }
3589
3590 #define X_GLrop_PixelMapfv 168
3591 void
3592 __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
3593 {
3594     struct glx_context *const gc = __glXGetCurrentContext();
3595     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3596     if (mapsize < 0) {
3597         __glXSetError(gc, GL_INVALID_VALUE);
3598         return;
3599     }
3600     if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3601         if (cmdlen <= gc->maxSmallRenderCommandSize) {
3602             if ((gc->pc + cmdlen) > gc->bufEnd) {
3603                 (void) __glXFlushRenderBuffer(gc, gc->pc);
3604             }
3605             emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
3606             (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3607             (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3608             (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3609                           (mapsize * 4));
3610             gc->pc += cmdlen;
3611             if (__builtin_expect(gc->pc > gc->limit, 0)) {
3612                 (void) __glXFlushRenderBuffer(gc, gc->pc);
3613             }
3614         } else {
3615             const GLint op = X_GLrop_PixelMapfv;
3616             const GLuint cmdlenLarge = cmdlen + 4;
3617             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3618             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3619             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3620             (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3621             (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3622             __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3623         }
3624     }
3625 }
3626
3627 #define X_GLrop_PixelMapuiv 169
3628 void
3629 __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
3630 {
3631     struct glx_context *const gc = __glXGetCurrentContext();
3632     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3633     if (mapsize < 0) {
3634         __glXSetError(gc, GL_INVALID_VALUE);
3635         return;
3636     }
3637     if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3638         if (cmdlen <= gc->maxSmallRenderCommandSize) {
3639             if ((gc->pc + cmdlen) > gc->bufEnd) {
3640                 (void) __glXFlushRenderBuffer(gc, gc->pc);
3641             }
3642             emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
3643             (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3644             (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3645             (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3646                           (mapsize * 4));
3647             gc->pc += cmdlen;
3648             if (__builtin_expect(gc->pc > gc->limit, 0)) {
3649                 (void) __glXFlushRenderBuffer(gc, gc->pc);
3650             }
3651         } else {
3652             const GLint op = X_GLrop_PixelMapuiv;
3653             const GLuint cmdlenLarge = cmdlen + 4;
3654             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3655             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3656             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3657             (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3658             (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3659             __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3660         }
3661     }
3662 }
3663
3664 #define X_GLrop_PixelMapusv 170
3665 void
3666 __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
3667 {
3668     struct glx_context *const gc = __glXGetCurrentContext();
3669     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
3670     if (mapsize < 0) {
3671         __glXSetError(gc, GL_INVALID_VALUE);
3672         return;
3673     }
3674     if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3675         if (cmdlen <= gc->maxSmallRenderCommandSize) {
3676             if ((gc->pc + cmdlen) > gc->bufEnd) {
3677                 (void) __glXFlushRenderBuffer(gc, gc->pc);
3678             }
3679             emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
3680             (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3681             (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3682             (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3683                           (mapsize * 2));
3684             gc->pc += cmdlen;
3685             if (__builtin_expect(gc->pc > gc->limit, 0)) {
3686                 (void) __glXFlushRenderBuffer(gc, gc->pc);
3687             }
3688         } else {
3689             const GLint op = X_GLrop_PixelMapusv;
3690             const GLuint cmdlenLarge = cmdlen + 4;
3691             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3692             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3693             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3694             (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3695             (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3696             __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
3697         }
3698     }
3699 }
3700
3701 #define X_GLrop_ReadBuffer 171
3702 void
3703 __indirect_glReadBuffer(GLenum mode)
3704 {
3705     struct glx_context *const gc = __glXGetCurrentContext();
3706     const GLuint cmdlen = 8;
3707     emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
3708     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3709     gc->pc += cmdlen;
3710     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3711         (void) __glXFlushRenderBuffer(gc, gc->pc);
3712     }
3713 }
3714
3715 #define X_GLrop_CopyPixels 172
3716 void
3717 __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3718                         GLenum type)
3719 {
3720     struct glx_context *const gc = __glXGetCurrentContext();
3721     const GLuint cmdlen = 24;
3722     emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
3723     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
3724     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
3725     (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
3726     (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
3727     (void) memcpy((void *) (gc->pc + 20), (void *) (&type), 4);
3728     gc->pc += cmdlen;
3729     if (__builtin_expect(gc->pc > gc->limit, 0)) {
3730         (void) __glXFlushRenderBuffer(gc, gc->pc);
3731     }
3732 }
3733
3734 #define X_GLsop_ReadPixels 111
3735 void
3736 __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3737                         GLenum format, GLenum type, GLvoid * pixels)
3738 {
3739     struct glx_context *const gc = __glXGetCurrentContext();
3740     const __GLXattribute *const state = gc->client_state_private;
3741     Display *const dpy = gc->currentDpy;
3742 #ifndef USE_XCB
3743     const GLuint cmdlen = 28;
3744 #endif
3745     if (__builtin_expect(dpy != NULL, 1)) {
3746 #ifdef USE_XCB
3747         xcb_connection_t *c = XGetXCBConnection(dpy);
3748         (void) __glXFlushRenderBuffer(gc, gc->pc);
3749         xcb_glx_read_pixels_reply_t *reply =
3750             xcb_glx_read_pixels_reply(c,
3751                                       xcb_glx_read_pixels(c,
3752                                                           gc->
3753                                                           currentContextTag,
3754                                                           x, y, width, height,
3755                                                           format, type,
3756                                                           state->storePack.
3757                                                           swapEndian, 0),
3758                                       NULL);
3759         (void) memcpy(pixels, xcb_glx_read_pixels_data(reply),
3760                       xcb_glx_read_pixels_data_length(reply) *
3761                       sizeof(GLvoid));
3762         free(reply);
3763 #else
3764         GLubyte const *pc =
3765             __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
3766         (void) memcpy((void *) (pc + 0), (void *) (&x), 4);
3767         (void) memcpy((void *) (pc + 4), (void *) (&y), 4);
3768         (void) memcpy((void *) (pc + 8), (void *) (&width), 4);
3769         (void) memcpy((void *) (pc + 12), (void *) (&height), 4);
3770         (void) memcpy((void *) (pc + 16), (void *) (&format), 4);
3771         (void) memcpy((void *) (pc + 20), (void *) (&type), 4);
3772         *(int32_t *) (pc + 24) = 0;
3773         *(int8_t *) (pc + 24) = state->storePack.swapEndian;
3774         __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type,
3775                             pixels, GL_FALSE);
3776         UnlockDisplay(dpy);
3777         SyncHandle();
3778 #endif /* USE_XCB */
3779     }
3780     return;
3781 }
3782
3783 #define X_GLrop_DrawPixels 173
3784 void
3785 __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format,
3786                         GLenum type, const GLvoid * pixels)
3787 {
3788     struct glx_context *const gc = __glXGetCurrentContext();
3789     const GLuint compsize =
3790         (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
3791                                          0) : 0;
3792     const GLuint cmdlen = 40 + __GLX_PAD(compsize);
3793     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
3794         if (cmdlen <= gc->maxSmallRenderCommandSize) {
3795             if ((gc->pc + cmdlen) > gc->bufEnd) {
3796                 (void) __glXFlushRenderBuffer(gc, gc->pc);
3797             }
3798             emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
3799             (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
3800             (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
3801             (void) memcpy((void *) (gc->pc + 32), (void *) (&format), 4);
3802             (void) memcpy((void *) (gc->pc + 36), (void *) (&type), 4);
3803             if (compsize > 0) {
3804                 (*gc->fillImage) (gc, 2, width, height, 1, format, type,
3805                                   pixels, gc->pc + 40, gc->pc + 4);
3806             } else {
3807                 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
3808                               default_pixel_store_2D_size);
3809             }
3810             gc->pc += cmdlen;
3811             if (gc->pc > gc->limit) {
3812                 (void) __glXFlushRenderBuffer(gc, gc->pc);
3813             }
3814         } else {
3815             const GLint op = X_GLrop_DrawPixels;
3816             const GLuint cmdlenLarge = cmdlen + 4;
3817             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3818             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3819             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3820             (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
3821             (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
3822             (void) memcpy((void *) (pc + 36), (void *) (&format), 4);
3823             (void) memcpy((void *) (pc + 40), (void *) (&type), 4);
3824             __glXSendLargeImage(gc, compsize, 2, width, height, 1, format,
3825                                 type, pixels, pc + 44, pc + 8);
3826         }
3827     }
3828 }
3829
3830 #define X_GLsop_GetClipPlane 113
3831 void
3832 __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
3833 {
3834     struct glx_context *const gc = __glXGetCurrentContext();
3835     Display *const dpy = gc->currentDpy;
3836 #ifndef USE_XCB
3837     const GLuint cmdlen = 4;
3838 #endif
3839     if (__builtin_expect(dpy != NULL, 1)) {
3840 #ifdef USE_XCB
3841         xcb_connection_t *c = XGetXCBConnection(dpy);
3842         (void) __glXFlushRenderBuffer(gc, gc->pc);
3843         xcb_glx_get_clip_plane_reply_t *reply =
3844             xcb_glx_get_clip_plane_reply(c,
3845                                          xcb_glx_get_clip_plane(c,
3846                                                                 gc->
3847                                                                 currentContextTag,
3848                                                                 plane), NULL);
3849         (void) memcpy(equation, xcb_glx_get_clip_plane_data(reply),
3850                       xcb_glx_get_clip_plane_data_length(reply) *
3851                       sizeof(GLdouble));
3852         free(reply);
3853 #else
3854         GLubyte const *pc =
3855             __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
3856         (void) memcpy((void *) (pc + 0), (void *) (&plane), 4);
3857         (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
3858         UnlockDisplay(dpy);
3859         SyncHandle();
3860 #endif /* USE_XCB */
3861     }
3862     return;
3863 }
3864
3865 #define X_GLsop_GetLightfv 118
3866 void
3867 __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
3868 {
3869     struct glx_context *const gc = __glXGetCurrentContext();
3870     Display *const dpy = gc->currentDpy;
3871 #ifndef USE_XCB
3872     const GLuint cmdlen = 8;
3873 #endif
3874     if (__builtin_expect(dpy != NULL, 1)) {
3875 #ifdef USE_XCB
3876         xcb_connection_t *c = XGetXCBConnection(dpy);
3877         (void) __glXFlushRenderBuffer(gc, gc->pc);
3878         xcb_glx_get_lightfv_reply_t *reply =
3879             xcb_glx_get_lightfv_reply(c,
3880                                       xcb_glx_get_lightfv(c,
3881                                                           gc->
3882                                                           currentContextTag,
3883                                                           light, pname),
3884                                       NULL);
3885         if (xcb_glx_get_lightfv_data_length(reply) == 0)
3886             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3887         else
3888             (void) memcpy(params, xcb_glx_get_lightfv_data(reply),
3889                           xcb_glx_get_lightfv_data_length(reply) *
3890                           sizeof(GLfloat));
3891         free(reply);
3892 #else
3893         GLubyte const *pc =
3894             __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
3895         (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3896         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3897         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3898         UnlockDisplay(dpy);
3899         SyncHandle();
3900 #endif /* USE_XCB */
3901     }
3902     return;
3903 }
3904
3905 #define X_GLsop_GetLightiv 119
3906 void
3907 __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
3908 {
3909     struct glx_context *const gc = __glXGetCurrentContext();
3910     Display *const dpy = gc->currentDpy;
3911 #ifndef USE_XCB
3912     const GLuint cmdlen = 8;
3913 #endif
3914     if (__builtin_expect(dpy != NULL, 1)) {
3915 #ifdef USE_XCB
3916         xcb_connection_t *c = XGetXCBConnection(dpy);
3917         (void) __glXFlushRenderBuffer(gc, gc->pc);
3918         xcb_glx_get_lightiv_reply_t *reply =
3919             xcb_glx_get_lightiv_reply(c,
3920                                       xcb_glx_get_lightiv(c,
3921                                                           gc->
3922                                                           currentContextTag,
3923                                                           light, pname),
3924                                       NULL);
3925         if (xcb_glx_get_lightiv_data_length(reply) == 0)
3926             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3927         else
3928             (void) memcpy(params, xcb_glx_get_lightiv_data(reply),
3929                           xcb_glx_get_lightiv_data_length(reply) *
3930                           sizeof(GLint));
3931         free(reply);
3932 #else
3933         GLubyte const *pc =
3934             __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
3935         (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3936         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3937         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3938         UnlockDisplay(dpy);
3939         SyncHandle();
3940 #endif /* USE_XCB */
3941     }
3942     return;
3943 }
3944
3945 #define X_GLsop_GetMapdv 120
3946 void
3947 __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
3948 {
3949     struct glx_context *const gc = __glXGetCurrentContext();
3950     Display *const dpy = gc->currentDpy;
3951 #ifndef USE_XCB
3952     const GLuint cmdlen = 8;
3953 #endif
3954     if (__builtin_expect(dpy != NULL, 1)) {
3955 #ifdef USE_XCB
3956         xcb_connection_t *c = XGetXCBConnection(dpy);
3957         (void) __glXFlushRenderBuffer(gc, gc->pc);
3958         xcb_glx_get_mapdv_reply_t *reply =
3959             xcb_glx_get_mapdv_reply(c,
3960                                     xcb_glx_get_mapdv(c,
3961                                                       gc->currentContextTag,
3962                                                       target, query), NULL);
3963         if (xcb_glx_get_mapdv_data_length(reply) == 0)
3964             (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3965         else
3966             (void) memcpy(v, xcb_glx_get_mapdv_data(reply),
3967                           xcb_glx_get_mapdv_data_length(reply) *
3968                           sizeof(GLdouble));
3969         free(reply);
3970 #else
3971         GLubyte const *pc =
3972             __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
3973         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
3974         (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3975         (void) __glXReadReply(dpy, 8, v, GL_FALSE);
3976         UnlockDisplay(dpy);
3977         SyncHandle();
3978 #endif /* USE_XCB */
3979     }
3980     return;
3981 }
3982
3983 #define X_GLsop_GetMapfv 121
3984 void
3985 __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
3986 {
3987     struct glx_context *const gc = __glXGetCurrentContext();
3988     Display *const dpy = gc->currentDpy;
3989 #ifndef USE_XCB
3990     const GLuint cmdlen = 8;
3991 #endif
3992     if (__builtin_expect(dpy != NULL, 1)) {
3993 #ifdef USE_XCB
3994         xcb_connection_t *c = XGetXCBConnection(dpy);
3995         (void) __glXFlushRenderBuffer(gc, gc->pc);
3996         xcb_glx_get_mapfv_reply_t *reply =
3997             xcb_glx_get_mapfv_reply(c,
3998                                     xcb_glx_get_mapfv(c,
3999                                                       gc->currentContextTag,
4000                                                       target, query), NULL);
4001         if (xcb_glx_get_mapfv_data_length(reply) == 0)
4002             (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4003         else
4004             (void) memcpy(v, xcb_glx_get_mapfv_data(reply),
4005                           xcb_glx_get_mapfv_data_length(reply) *
4006                           sizeof(GLfloat));
4007         free(reply);
4008 #else
4009         GLubyte const *pc =
4010             __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
4011         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4012         (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
4013         (void) __glXReadReply(dpy, 4, v, GL_FALSE);
4014         UnlockDisplay(dpy);
4015         SyncHandle();
4016 #endif /* USE_XCB */
4017     }
4018     return;
4019 }
4020
4021 #define X_GLsop_GetMapiv 122
4022 void
4023 __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
4024 {
4025     struct glx_context *const gc = __glXGetCurrentContext();
4026     Display *const dpy = gc->currentDpy;
4027 #ifndef USE_XCB
4028     const GLuint cmdlen = 8;
4029 #endif
4030     if (__builtin_expect(dpy != NULL, 1)) {
4031 #ifdef USE_XCB
4032         xcb_connection_t *c = XGetXCBConnection(dpy);
4033         (void) __glXFlushRenderBuffer(gc, gc->pc);
4034         xcb_glx_get_mapiv_reply_t *reply =
4035             xcb_glx_get_mapiv_reply(c,
4036                                     xcb_glx_get_mapiv(c,
4037                                                       gc->currentContextTag,
4038                                                       target, query), NULL);
4039         if (xcb_glx_get_mapiv_data_length(reply) == 0)
4040             (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4041         else
4042             (void) memcpy(v, xcb_glx_get_mapiv_data(reply),
4043                           xcb_glx_get_mapiv_data_length(reply) *
4044                           sizeof(GLint));
4045         free(reply);
4046 #else
4047         GLubyte const *pc =
4048             __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
4049         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4050         (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
4051         (void) __glXReadReply(dpy, 4, v, GL_FALSE);
4052         UnlockDisplay(dpy);
4053         SyncHandle();
4054 #endif /* USE_XCB */
4055     }
4056     return;
4057 }
4058
4059 #define X_GLsop_GetMaterialfv 123
4060 void
4061 __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
4062 {
4063     struct glx_context *const gc = __glXGetCurrentContext();
4064     Display *const dpy = gc->currentDpy;
4065 #ifndef USE_XCB
4066     const GLuint cmdlen = 8;
4067 #endif
4068     if (__builtin_expect(dpy != NULL, 1)) {
4069 #ifdef USE_XCB
4070         xcb_connection_t *c = XGetXCBConnection(dpy);
4071         (void) __glXFlushRenderBuffer(gc, gc->pc);
4072         xcb_glx_get_materialfv_reply_t *reply =
4073             xcb_glx_get_materialfv_reply(c,
4074                                          xcb_glx_get_materialfv(c,
4075                                                                 gc->
4076                                                                 currentContextTag,
4077                                                                 face, pname),
4078                                          NULL);
4079         if (xcb_glx_get_materialfv_data_length(reply) == 0)
4080             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4081         else
4082             (void) memcpy(params, xcb_glx_get_materialfv_data(reply),
4083                           xcb_glx_get_materialfv_data_length(reply) *
4084                           sizeof(GLfloat));
4085         free(reply);
4086 #else
4087         GLubyte const *pc =
4088             __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
4089         (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4090         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4091         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4092         UnlockDisplay(dpy);
4093         SyncHandle();
4094 #endif /* USE_XCB */
4095     }
4096     return;
4097 }
4098
4099 #define X_GLsop_GetMaterialiv 124
4100 void
4101 __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
4102 {
4103     struct glx_context *const gc = __glXGetCurrentContext();
4104     Display *const dpy = gc->currentDpy;
4105 #ifndef USE_XCB
4106     const GLuint cmdlen = 8;
4107 #endif
4108     if (__builtin_expect(dpy != NULL, 1)) {
4109 #ifdef USE_XCB
4110         xcb_connection_t *c = XGetXCBConnection(dpy);
4111         (void) __glXFlushRenderBuffer(gc, gc->pc);
4112         xcb_glx_get_materialiv_reply_t *reply =
4113             xcb_glx_get_materialiv_reply(c,
4114                                          xcb_glx_get_materialiv(c,
4115                                                                 gc->
4116                                                                 currentContextTag,
4117                                                                 face, pname),
4118                                          NULL);
4119         if (xcb_glx_get_materialiv_data_length(reply) == 0)
4120             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4121         else
4122             (void) memcpy(params, xcb_glx_get_materialiv_data(reply),
4123                           xcb_glx_get_materialiv_data_length(reply) *
4124                           sizeof(GLint));
4125         free(reply);
4126 #else
4127         GLubyte const *pc =
4128             __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
4129         (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4130         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4131         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4132         UnlockDisplay(dpy);
4133         SyncHandle();
4134 #endif /* USE_XCB */
4135     }
4136     return;
4137 }
4138
4139 #define X_GLsop_GetPixelMapfv 125
4140 void
4141 __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
4142 {
4143     struct glx_context *const gc = __glXGetCurrentContext();
4144     Display *const dpy = gc->currentDpy;
4145 #ifndef USE_XCB
4146     const GLuint cmdlen = 4;
4147 #endif
4148     if (__builtin_expect(dpy != NULL, 1)) {
4149 #ifdef USE_XCB
4150         xcb_connection_t *c = XGetXCBConnection(dpy);
4151         (void) __glXFlushRenderBuffer(gc, gc->pc);
4152         xcb_glx_get_pixel_mapfv_reply_t *reply =
4153             xcb_glx_get_pixel_mapfv_reply(c,
4154                                           xcb_glx_get_pixel_mapfv(c,
4155                                                                   gc->
4156                                                                   currentContextTag,
4157                                                                   map), NULL);
4158         if (xcb_glx_get_pixel_mapfv_data_length(reply) == 0)
4159             (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4160         else
4161             (void) memcpy(values, xcb_glx_get_pixel_mapfv_data(reply),
4162                           xcb_glx_get_pixel_mapfv_data_length(reply) *
4163                           sizeof(GLfloat));
4164         free(reply);
4165 #else
4166         GLubyte const *pc =
4167             __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
4168         (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4169         (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4170         UnlockDisplay(dpy);
4171         SyncHandle();
4172 #endif /* USE_XCB */
4173     }
4174     return;
4175 }
4176
4177 #define X_GLsop_GetPixelMapuiv 126
4178 void
4179 __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
4180 {
4181     struct glx_context *const gc = __glXGetCurrentContext();
4182     Display *const dpy = gc->currentDpy;
4183 #ifndef USE_XCB
4184     const GLuint cmdlen = 4;
4185 #endif
4186     if (__builtin_expect(dpy != NULL, 1)) {
4187 #ifdef USE_XCB
4188         xcb_connection_t *c = XGetXCBConnection(dpy);
4189         (void) __glXFlushRenderBuffer(gc, gc->pc);
4190         xcb_glx_get_pixel_mapuiv_reply_t *reply =
4191             xcb_glx_get_pixel_mapuiv_reply(c,
4192                                            xcb_glx_get_pixel_mapuiv(c,
4193                                                                     gc->
4194                                                                     currentContextTag,
4195                                                                     map),
4196                                            NULL);
4197         if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 0)
4198             (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4199         else
4200             (void) memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply),
4201                           xcb_glx_get_pixel_mapuiv_data_length(reply) *
4202                           sizeof(GLuint));
4203         free(reply);
4204 #else
4205         GLubyte const *pc =
4206             __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
4207         (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4208         (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4209         UnlockDisplay(dpy);
4210         SyncHandle();
4211 #endif /* USE_XCB */
4212     }
4213     return;
4214 }
4215
4216 #define X_GLsop_GetPixelMapusv 127
4217 void
4218 __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
4219 {
4220     struct glx_context *const gc = __glXGetCurrentContext();
4221     Display *const dpy = gc->currentDpy;
4222 #ifndef USE_XCB
4223     const GLuint cmdlen = 4;
4224 #endif
4225     if (__builtin_expect(dpy != NULL, 1)) {
4226 #ifdef USE_XCB
4227         xcb_connection_t *c = XGetXCBConnection(dpy);
4228         (void) __glXFlushRenderBuffer(gc, gc->pc);
4229         xcb_glx_get_pixel_mapusv_reply_t *reply =
4230             xcb_glx_get_pixel_mapusv_reply(c,
4231                                            xcb_glx_get_pixel_mapusv(c,
4232                                                                     gc->
4233                                                                     currentContextTag,
4234                                                                     map),
4235                                            NULL);
4236         if (xcb_glx_get_pixel_mapusv_data_length(reply) == 0)
4237             (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4238         else
4239             (void) memcpy(values, xcb_glx_get_pixel_mapusv_data(reply),
4240                           xcb_glx_get_pixel_mapusv_data_length(reply) *
4241                           sizeof(GLushort));
4242         free(reply);
4243 #else
4244         GLubyte const *pc =
4245             __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
4246         (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4247         (void) __glXReadReply(dpy, 2, values, GL_FALSE);
4248         UnlockDisplay(dpy);
4249         SyncHandle();
4250 #endif /* USE_XCB */
4251     }
4252     return;
4253 }
4254
4255 #define X_GLsop_GetPolygonStipple 128
4256 void
4257 __indirect_glGetPolygonStipple(GLubyte *mask)
4258 {
4259     struct glx_context *const gc = __glXGetCurrentContext();
4260     Display *const dpy = gc->currentDpy;
4261 #ifndef USE_XCB
4262     const GLuint cmdlen = 4;
4263 #endif
4264     if (__builtin_expect(dpy != NULL, 1)) {
4265 #ifdef USE_XCB
4266         xcb_connection_t *c = XGetXCBConnection(dpy);
4267         (void) __glXFlushRenderBuffer(gc, gc->pc);
4268         xcb_glx_get_polygon_stipple_reply_t *reply =
4269             xcb_glx_get_polygon_stipple_reply(c,
4270                                               xcb_glx_get_polygon_stipple(c,
4271                                                                           gc->
4272                                                                           currentContextTag,
4273                                                                           0),
4274                                               NULL);
4275         (void) memcpy(mask, xcb_glx_get_polygon_stipple_data(reply),
4276                       xcb_glx_get_polygon_stipple_data_length(reply) *
4277                       sizeof(GLubyte));
4278         free(reply);
4279 #else
4280         GLubyte const *pc =
4281             __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
4282         *(int32_t *) (pc + 0) = 0;
4283         __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
4284                             mask, GL_FALSE);
4285         UnlockDisplay(dpy);
4286         SyncHandle();
4287 #endif /* USE_XCB */
4288     }
4289     return;
4290 }
4291
4292 #define X_GLsop_GetTexEnvfv 130
4293 void
4294 __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
4295 {
4296     struct glx_context *const gc = __glXGetCurrentContext();
4297     Display *const dpy = gc->currentDpy;
4298 #ifndef USE_XCB
4299     const GLuint cmdlen = 8;
4300 #endif
4301     if (__builtin_expect(dpy != NULL, 1)) {
4302 #ifdef USE_XCB
4303         xcb_connection_t *c = XGetXCBConnection(dpy);
4304         (void) __glXFlushRenderBuffer(gc, gc->pc);
4305         xcb_glx_get_tex_envfv_reply_t *reply =
4306             xcb_glx_get_tex_envfv_reply(c,
4307                                         xcb_glx_get_tex_envfv(c,
4308                                                               gc->
4309                                                               currentContextTag,
4310                                                               target, pname),
4311                                         NULL);
4312         if (xcb_glx_get_tex_envfv_data_length(reply) == 0)
4313             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4314         else
4315             (void) memcpy(params, xcb_glx_get_tex_envfv_data(reply),
4316                           xcb_glx_get_tex_envfv_data_length(reply) *
4317                           sizeof(GLfloat));
4318         free(reply);
4319 #else
4320         GLubyte const *pc =
4321             __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
4322         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4323         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4324         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4325         UnlockDisplay(dpy);
4326         SyncHandle();
4327 #endif /* USE_XCB */
4328     }
4329     return;
4330 }
4331
4332 #define X_GLsop_GetTexEnviv 131
4333 void
4334 __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
4335 {
4336     struct glx_context *const gc = __glXGetCurrentContext();
4337     Display *const dpy = gc->currentDpy;
4338 #ifndef USE_XCB
4339     const GLuint cmdlen = 8;
4340 #endif
4341     if (__builtin_expect(dpy != NULL, 1)) {
4342 #ifdef USE_XCB
4343         xcb_connection_t *c = XGetXCBConnection(dpy);
4344         (void) __glXFlushRenderBuffer(gc, gc->pc);
4345         xcb_glx_get_tex_enviv_reply_t *reply =
4346             xcb_glx_get_tex_enviv_reply(c,
4347                                         xcb_glx_get_tex_enviv(c,
4348                                                               gc->
4349                                                               currentContextTag,
4350                                                               target, pname),
4351                                         NULL);
4352         if (xcb_glx_get_tex_enviv_data_length(reply) == 0)
4353             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4354         else
4355             (void) memcpy(params, xcb_glx_get_tex_enviv_data(reply),
4356                           xcb_glx_get_tex_enviv_data_length(reply) *
4357                           sizeof(GLint));
4358         free(reply);
4359 #else
4360         GLubyte const *pc =
4361             __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
4362         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4363         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4364         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4365         UnlockDisplay(dpy);
4366         SyncHandle();
4367 #endif /* USE_XCB */
4368     }
4369     return;
4370 }
4371
4372 #define X_GLsop_GetTexGendv 132
4373 void
4374 __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
4375 {
4376     struct glx_context *const gc = __glXGetCurrentContext();
4377     Display *const dpy = gc->currentDpy;
4378 #ifndef USE_XCB
4379     const GLuint cmdlen = 8;
4380 #endif
4381     if (__builtin_expect(dpy != NULL, 1)) {
4382 #ifdef USE_XCB
4383         xcb_connection_t *c = XGetXCBConnection(dpy);
4384         (void) __glXFlushRenderBuffer(gc, gc->pc);
4385         xcb_glx_get_tex_gendv_reply_t *reply =
4386             xcb_glx_get_tex_gendv_reply(c,
4387                                         xcb_glx_get_tex_gendv(c,
4388                                                               gc->
4389                                                               currentContextTag,
4390                                                               coord, pname),
4391                                         NULL);
4392         if (xcb_glx_get_tex_gendv_data_length(reply) == 0)
4393             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4394         else
4395             (void) memcpy(params, xcb_glx_get_tex_gendv_data(reply),
4396                           xcb_glx_get_tex_gendv_data_length(reply) *
4397                           sizeof(GLdouble));
4398         free(reply);
4399 #else
4400         GLubyte const *pc =
4401             __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
4402         (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4403         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4404         (void) __glXReadReply(dpy, 8, params, GL_FALSE);
4405         UnlockDisplay(dpy);
4406         SyncHandle();
4407 #endif /* USE_XCB */
4408     }
4409     return;
4410 }
4411
4412 #define X_GLsop_GetTexGenfv 133
4413 void
4414 __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
4415 {
4416     struct glx_context *const gc = __glXGetCurrentContext();
4417     Display *const dpy = gc->currentDpy;
4418 #ifndef USE_XCB
4419     const GLuint cmdlen = 8;
4420 #endif
4421     if (__builtin_expect(dpy != NULL, 1)) {
4422 #ifdef USE_XCB
4423         xcb_connection_t *c = XGetXCBConnection(dpy);
4424         (void) __glXFlushRenderBuffer(gc, gc->pc);
4425         xcb_glx_get_tex_genfv_reply_t *reply =
4426             xcb_glx_get_tex_genfv_reply(c,
4427                                         xcb_glx_get_tex_genfv(c,
4428                                                               gc->
4429                                                               currentContextTag,
4430                                                               coord, pname),
4431                                         NULL);
4432         if (xcb_glx_get_tex_genfv_data_length(reply) == 0)
4433             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4434         else
4435             (void) memcpy(params, xcb_glx_get_tex_genfv_data(reply),
4436                           xcb_glx_get_tex_genfv_data_length(reply) *
4437                           sizeof(GLfloat));
4438         free(reply);
4439 #else
4440         GLubyte const *pc =
4441             __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
4442         (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4443         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4444         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4445         UnlockDisplay(dpy);
4446         SyncHandle();
4447 #endif /* USE_XCB */
4448     }
4449     return;
4450 }
4451
4452 #define X_GLsop_GetTexGeniv 134
4453 void
4454 __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
4455 {
4456     struct glx_context *const gc = __glXGetCurrentContext();
4457     Display *const dpy = gc->currentDpy;
4458 #ifndef USE_XCB
4459     const GLuint cmdlen = 8;
4460 #endif
4461     if (__builtin_expect(dpy != NULL, 1)) {
4462 #ifdef USE_XCB
4463         xcb_connection_t *c = XGetXCBConnection(dpy);
4464         (void) __glXFlushRenderBuffer(gc, gc->pc);
4465         xcb_glx_get_tex_geniv_reply_t *reply =
4466             xcb_glx_get_tex_geniv_reply(c,
4467                                         xcb_glx_get_tex_geniv(c,
4468                                                               gc->
4469                                                               currentContextTag,
4470                                                               coord, pname),
4471                                         NULL);
4472         if (xcb_glx_get_tex_geniv_data_length(reply) == 0)
4473             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4474         else
4475             (void) memcpy(params, xcb_glx_get_tex_geniv_data(reply),
4476                           xcb_glx_get_tex_geniv_data_length(reply) *
4477                           sizeof(GLint));
4478         free(reply);
4479 #else
4480         GLubyte const *pc =
4481             __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
4482         (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4483         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4484         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4485         UnlockDisplay(dpy);
4486         SyncHandle();
4487 #endif /* USE_XCB */
4488     }
4489     return;
4490 }
4491
4492 #define X_GLsop_GetTexImage 135
4493 void
4494 __indirect_glGetTexImage(GLenum target, GLint level, GLenum format,
4495                          GLenum type, GLvoid * pixels)
4496 {
4497     struct glx_context *const gc = __glXGetCurrentContext();
4498     const __GLXattribute *const state = gc->client_state_private;
4499     Display *const dpy = gc->currentDpy;
4500 #ifndef USE_XCB
4501     const GLuint cmdlen = 20;
4502 #endif
4503     if (__builtin_expect(dpy != NULL, 1)) {
4504 #ifdef USE_XCB
4505         xcb_connection_t *c = XGetXCBConnection(dpy);
4506         (void) __glXFlushRenderBuffer(gc, gc->pc);
4507         xcb_glx_get_tex_image_reply_t *reply =
4508             xcb_glx_get_tex_image_reply(c,
4509                                         xcb_glx_get_tex_image(c,
4510                                                               gc->
4511                                                               currentContextTag,
4512                                                               target, level,
4513                                                               format, type,
4514                                                               state->
4515                                                               storePack.
4516                                                               swapEndian),
4517                                         NULL);
4518         (void) memcpy(pixels, xcb_glx_get_tex_image_data(reply),
4519                       xcb_glx_get_tex_image_data_length(reply) *
4520                       sizeof(GLvoid));
4521         free(reply);
4522 #else
4523         GLubyte const *pc =
4524             __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
4525         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4526         (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4527         (void) memcpy((void *) (pc + 8), (void *) (&format), 4);
4528         (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
4529         *(int32_t *) (pc + 16) = 0;
4530         *(int8_t *) (pc + 16) = state->storePack.swapEndian;
4531         __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels,
4532                             GL_TRUE);
4533         UnlockDisplay(dpy);
4534         SyncHandle();
4535 #endif /* USE_XCB */
4536     }
4537     return;
4538 }
4539
4540 #define X_GLsop_GetTexParameterfv 136
4541 void
4542 __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
4543 {
4544     struct glx_context *const gc = __glXGetCurrentContext();
4545     Display *const dpy = gc->currentDpy;
4546 #ifndef USE_XCB
4547     const GLuint cmdlen = 8;
4548 #endif
4549     if (__builtin_expect(dpy != NULL, 1)) {
4550 #ifdef USE_XCB
4551         xcb_connection_t *c = XGetXCBConnection(dpy);
4552         (void) __glXFlushRenderBuffer(gc, gc->pc);
4553         xcb_glx_get_tex_parameterfv_reply_t *reply =
4554             xcb_glx_get_tex_parameterfv_reply(c,
4555                                               xcb_glx_get_tex_parameterfv(c,
4556                                                                           gc->
4557                                                                           currentContextTag,
4558                                                                           target,
4559                                                                           pname),
4560                                               NULL);
4561         if (xcb_glx_get_tex_parameterfv_data_length(reply) == 0)
4562             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4563         else
4564             (void) memcpy(params, xcb_glx_get_tex_parameterfv_data(reply),
4565                           xcb_glx_get_tex_parameterfv_data_length(reply) *
4566                           sizeof(GLfloat));
4567         free(reply);
4568 #else
4569         GLubyte const *pc =
4570             __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
4571         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4572         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4573         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4574         UnlockDisplay(dpy);
4575         SyncHandle();
4576 #endif /* USE_XCB */
4577     }
4578     return;
4579 }
4580
4581 #define X_GLsop_GetTexParameteriv 137
4582 void
4583 __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
4584 {
4585     struct glx_context *const gc = __glXGetCurrentContext();
4586     Display *const dpy = gc->currentDpy;
4587 #ifndef USE_XCB
4588     const GLuint cmdlen = 8;
4589 #endif
4590     if (__builtin_expect(dpy != NULL, 1)) {
4591 #ifdef USE_XCB
4592         xcb_connection_t *c = XGetXCBConnection(dpy);
4593         (void) __glXFlushRenderBuffer(gc, gc->pc);
4594         xcb_glx_get_tex_parameteriv_reply_t *reply =
4595             xcb_glx_get_tex_parameteriv_reply(c,
4596                                               xcb_glx_get_tex_parameteriv(c,
4597                                                                           gc->
4598                                                                           currentContextTag,
4599                                                                           target,
4600                                                                           pname),
4601                                               NULL);
4602         if (xcb_glx_get_tex_parameteriv_data_length(reply) == 0)
4603             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4604         else
4605             (void) memcpy(params, xcb_glx_get_tex_parameteriv_data(reply),
4606                           xcb_glx_get_tex_parameteriv_data_length(reply) *
4607                           sizeof(GLint));
4608         free(reply);
4609 #else
4610         GLubyte const *pc =
4611             __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
4612         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4613         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4614         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4615         UnlockDisplay(dpy);
4616         SyncHandle();
4617 #endif /* USE_XCB */
4618     }
4619     return;
4620 }
4621
4622 #define X_GLsop_GetTexLevelParameterfv 138
4623 void
4624 __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
4625                                     GLfloat * params)
4626 {
4627     struct glx_context *const gc = __glXGetCurrentContext();
4628     Display *const dpy = gc->currentDpy;
4629 #ifndef USE_XCB
4630     const GLuint cmdlen = 12;
4631 #endif
4632     if (__builtin_expect(dpy != NULL, 1)) {
4633 #ifdef USE_XCB
4634         xcb_connection_t *c = XGetXCBConnection(dpy);
4635         (void) __glXFlushRenderBuffer(gc, gc->pc);
4636         xcb_glx_get_tex_level_parameterfv_reply_t *reply =
4637             xcb_glx_get_tex_level_parameterfv_reply(c,
4638                                                     xcb_glx_get_tex_level_parameterfv
4639                                                     (c, gc->currentContextTag,
4640                                                      target, level, pname),
4641                                                     NULL);
4642         if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 0)
4643             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4644         else
4645             (void) memcpy(params,
4646                           xcb_glx_get_tex_level_parameterfv_data(reply),
4647                           xcb_glx_get_tex_level_parameterfv_data_length(reply)
4648                           * sizeof(GLfloat));
4649         free(reply);
4650 #else
4651         GLubyte const *pc =
4652             __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv,
4653                                     cmdlen);
4654         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4655         (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4656         (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4657         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4658         UnlockDisplay(dpy);
4659         SyncHandle();
4660 #endif /* USE_XCB */
4661     }
4662     return;
4663 }
4664
4665 #define X_GLsop_GetTexLevelParameteriv 139
4666 void
4667 __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
4668                                     GLint * params)
4669 {
4670     struct glx_context *const gc = __glXGetCurrentContext();
4671     Display *const dpy = gc->currentDpy;
4672 #ifndef USE_XCB
4673     const GLuint cmdlen = 12;
4674 #endif
4675     if (__builtin_expect(dpy != NULL, 1)) {
4676 #ifdef USE_XCB
4677         xcb_connection_t *c = XGetXCBConnection(dpy);
4678         (void) __glXFlushRenderBuffer(gc, gc->pc);
4679         xcb_glx_get_tex_level_parameteriv_reply_t *reply =
4680             xcb_glx_get_tex_level_parameteriv_reply(c,
4681                                                     xcb_glx_get_tex_level_parameteriv
4682                                                     (c, gc->currentContextTag,
4683                                                      target, level, pname),
4684                                                     NULL);
4685         if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 0)
4686             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4687         else
4688             (void) memcpy(params,
4689                           xcb_glx_get_tex_level_parameteriv_data(reply),
4690                           xcb_glx_get_tex_level_parameteriv_data_length(reply)
4691                           * sizeof(GLint));
4692         free(reply);
4693 #else
4694         GLubyte const *pc =
4695             __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv,
4696                                     cmdlen);
4697         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4698         (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4699         (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4700         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4701         UnlockDisplay(dpy);
4702         SyncHandle();
4703 #endif /* USE_XCB */
4704     }
4705     return;
4706 }
4707
4708 #define X_GLsop_IsList 141
4709 GLboolean
4710 __indirect_glIsList(GLuint list)
4711 {
4712     struct glx_context *const gc = __glXGetCurrentContext();
4713     Display *const dpy = gc->currentDpy;
4714     GLboolean retval = (GLboolean) 0;
4715 #ifndef USE_XCB
4716     const GLuint cmdlen = 4;
4717 #endif
4718     if (__builtin_expect(dpy != NULL, 1)) {
4719 #ifdef USE_XCB
4720         xcb_connection_t *c = XGetXCBConnection(dpy);
4721         (void) __glXFlushRenderBuffer(gc, gc->pc);
4722         xcb_glx_is_list_reply_t *reply =
4723             xcb_glx_is_list_reply(c,
4724                                   xcb_glx_is_list(c, gc->currentContextTag,
4725                                                   list), NULL);
4726         retval = reply->ret_val;
4727         free(reply);
4728 #else
4729         GLubyte const *pc =
4730             __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
4731         (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
4732         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4733         UnlockDisplay(dpy);
4734         SyncHandle();
4735 #endif /* USE_XCB */
4736     }
4737     return retval;
4738 }
4739
4740 #define X_GLrop_DepthRange 174
4741 void
4742 __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
4743 {
4744     struct glx_context *const gc = __glXGetCurrentContext();
4745     const GLuint cmdlen = 20;
4746     emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
4747     (void) memcpy((void *) (gc->pc + 4), (void *) (&zNear), 8);
4748     (void) memcpy((void *) (gc->pc + 12), (void *) (&zFar), 8);
4749     gc->pc += cmdlen;
4750     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4751         (void) __glXFlushRenderBuffer(gc, gc->pc);
4752     }
4753 }
4754
4755 #define X_GLrop_Frustum 175
4756 void
4757 __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
4758                      GLdouble top, GLdouble zNear, GLdouble zFar)
4759 {
4760     struct glx_context *const gc = __glXGetCurrentContext();
4761     const GLuint cmdlen = 52;
4762     emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
4763     (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4764     (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4765     (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4766     (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4767     (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4768     (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4769     gc->pc += cmdlen;
4770     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4771         (void) __glXFlushRenderBuffer(gc, gc->pc);
4772     }
4773 }
4774
4775 #define X_GLrop_LoadIdentity 176
4776 void
4777 __indirect_glLoadIdentity(void)
4778 {
4779     struct glx_context *const gc = __glXGetCurrentContext();
4780     const GLuint cmdlen = 4;
4781     emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
4782     gc->pc += cmdlen;
4783     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4784         (void) __glXFlushRenderBuffer(gc, gc->pc);
4785     }
4786 }
4787
4788 #define X_GLrop_LoadMatrixf 177
4789 void
4790 __indirect_glLoadMatrixf(const GLfloat * m)
4791 {
4792     struct glx_context *const gc = __glXGetCurrentContext();
4793     const GLuint cmdlen = 68;
4794     emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
4795     (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4796     gc->pc += cmdlen;
4797     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4798         (void) __glXFlushRenderBuffer(gc, gc->pc);
4799     }
4800 }
4801
4802 #define X_GLrop_LoadMatrixd 178
4803 void
4804 __indirect_glLoadMatrixd(const GLdouble * m)
4805 {
4806     struct glx_context *const gc = __glXGetCurrentContext();
4807     const GLuint cmdlen = 132;
4808     emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
4809     (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4810     gc->pc += cmdlen;
4811     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4812         (void) __glXFlushRenderBuffer(gc, gc->pc);
4813     }
4814 }
4815
4816 #define X_GLrop_MatrixMode 179
4817 void
4818 __indirect_glMatrixMode(GLenum mode)
4819 {
4820     struct glx_context *const gc = __glXGetCurrentContext();
4821     const GLuint cmdlen = 8;
4822     emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
4823     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
4824     gc->pc += cmdlen;
4825     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4826         (void) __glXFlushRenderBuffer(gc, gc->pc);
4827     }
4828 }
4829
4830 #define X_GLrop_MultMatrixf 180
4831 void
4832 __indirect_glMultMatrixf(const GLfloat * m)
4833 {
4834     struct glx_context *const gc = __glXGetCurrentContext();
4835     const GLuint cmdlen = 68;
4836     emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
4837     (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4838     gc->pc += cmdlen;
4839     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4840         (void) __glXFlushRenderBuffer(gc, gc->pc);
4841     }
4842 }
4843
4844 #define X_GLrop_MultMatrixd 181
4845 void
4846 __indirect_glMultMatrixd(const GLdouble * m)
4847 {
4848     struct glx_context *const gc = __glXGetCurrentContext();
4849     const GLuint cmdlen = 132;
4850     emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
4851     (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4852     gc->pc += cmdlen;
4853     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4854         (void) __glXFlushRenderBuffer(gc, gc->pc);
4855     }
4856 }
4857
4858 #define X_GLrop_Ortho 182
4859 void
4860 __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
4861                    GLdouble top, GLdouble zNear, GLdouble zFar)
4862 {
4863     struct glx_context *const gc = __glXGetCurrentContext();
4864     const GLuint cmdlen = 52;
4865     emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
4866     (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4867     (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4868     (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4869     (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4870     (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4871     (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4872     gc->pc += cmdlen;
4873     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4874         (void) __glXFlushRenderBuffer(gc, gc->pc);
4875     }
4876 }
4877
4878 #define X_GLrop_PopMatrix 183
4879 void
4880 __indirect_glPopMatrix(void)
4881 {
4882     struct glx_context *const gc = __glXGetCurrentContext();
4883     const GLuint cmdlen = 4;
4884     emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
4885     gc->pc += cmdlen;
4886     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4887         (void) __glXFlushRenderBuffer(gc, gc->pc);
4888     }
4889 }
4890
4891 #define X_GLrop_PushMatrix 184
4892 void
4893 __indirect_glPushMatrix(void)
4894 {
4895     struct glx_context *const gc = __glXGetCurrentContext();
4896     const GLuint cmdlen = 4;
4897     emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
4898     gc->pc += cmdlen;
4899     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4900         (void) __glXFlushRenderBuffer(gc, gc->pc);
4901     }
4902 }
4903
4904 #define X_GLrop_Rotated 185
4905 void
4906 __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4907 {
4908     struct glx_context *const gc = __glXGetCurrentContext();
4909     const GLuint cmdlen = 36;
4910     emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
4911     (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 8);
4912     (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
4913     (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
4914     (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
4915     gc->pc += cmdlen;
4916     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4917         (void) __glXFlushRenderBuffer(gc, gc->pc);
4918     }
4919 }
4920
4921 #define X_GLrop_Rotatef 186
4922 void
4923 __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
4924 {
4925     struct glx_context *const gc = __glXGetCurrentContext();
4926     const GLuint cmdlen = 20;
4927     emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
4928     (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 4);
4929     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
4930     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
4931     (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
4932     gc->pc += cmdlen;
4933     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4934         (void) __glXFlushRenderBuffer(gc, gc->pc);
4935     }
4936 }
4937
4938 #define X_GLrop_Scaled 187
4939 void
4940 __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
4941 {
4942     struct glx_context *const gc = __glXGetCurrentContext();
4943     const GLuint cmdlen = 28;
4944     emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
4945     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4946     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4947     (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4948     gc->pc += cmdlen;
4949     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4950         (void) __glXFlushRenderBuffer(gc, gc->pc);
4951     }
4952 }
4953
4954 #define X_GLrop_Scalef 188
4955 void
4956 __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
4957 {
4958     struct glx_context *const gc = __glXGetCurrentContext();
4959     const GLuint cmdlen = 16;
4960     emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
4961     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4962     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4963     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4964     gc->pc += cmdlen;
4965     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4966         (void) __glXFlushRenderBuffer(gc, gc->pc);
4967     }
4968 }
4969
4970 #define X_GLrop_Translated 189
4971 void
4972 __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
4973 {
4974     struct glx_context *const gc = __glXGetCurrentContext();
4975     const GLuint cmdlen = 28;
4976     emit_header(gc->pc, X_GLrop_Translated, cmdlen);
4977     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4978     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4979     (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4980     gc->pc += cmdlen;
4981     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4982         (void) __glXFlushRenderBuffer(gc, gc->pc);
4983     }
4984 }
4985
4986 #define X_GLrop_Translatef 190
4987 void
4988 __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
4989 {
4990     struct glx_context *const gc = __glXGetCurrentContext();
4991     const GLuint cmdlen = 16;
4992     emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
4993     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4994     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4995     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4996     gc->pc += cmdlen;
4997     if (__builtin_expect(gc->pc > gc->limit, 0)) {
4998         (void) __glXFlushRenderBuffer(gc, gc->pc);
4999     }
5000 }
5001
5002 #define X_GLrop_Viewport 191
5003 void
5004 __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
5005 {
5006     struct glx_context *const gc = __glXGetCurrentContext();
5007     const GLuint cmdlen = 20;
5008     emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
5009     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
5010     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
5011     (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
5012     (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
5013     gc->pc += cmdlen;
5014     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5015         (void) __glXFlushRenderBuffer(gc, gc->pc);
5016     }
5017 }
5018
5019 #define X_GLrop_BindTexture 4117
5020 void
5021 __indirect_glBindTexture(GLenum target, GLuint texture)
5022 {
5023     struct glx_context *const gc = __glXGetCurrentContext();
5024     const GLuint cmdlen = 12;
5025     emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
5026     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5027     (void) memcpy((void *) (gc->pc + 8), (void *) (&texture), 4);
5028     gc->pc += cmdlen;
5029     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5030         (void) __glXFlushRenderBuffer(gc, gc->pc);
5031     }
5032 }
5033
5034 #define X_GLrop_Indexubv 194
5035 void
5036 __indirect_glIndexub(GLubyte c)
5037 {
5038     struct glx_context *const gc = __glXGetCurrentContext();
5039     const GLuint cmdlen = 8;
5040     emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
5041     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 1);
5042     gc->pc += cmdlen;
5043     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5044         (void) __glXFlushRenderBuffer(gc, gc->pc);
5045     }
5046 }
5047
5048 #define X_GLrop_Indexubv 194
5049 void
5050 __indirect_glIndexubv(const GLubyte *c)
5051 {
5052     struct glx_context *const gc = __glXGetCurrentContext();
5053     const GLuint cmdlen = 8;
5054     emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
5055     (void) memcpy((void *) (gc->pc + 4), (void *) (c), 1);
5056     gc->pc += cmdlen;
5057     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5058         (void) __glXFlushRenderBuffer(gc, gc->pc);
5059     }
5060 }
5061
5062 #define X_GLrop_PolygonOffset 192
5063 void
5064 __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
5065 {
5066     struct glx_context *const gc = __glXGetCurrentContext();
5067     const GLuint cmdlen = 12;
5068     emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
5069     (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
5070     (void) memcpy((void *) (gc->pc + 8), (void *) (&units), 4);
5071     gc->pc += cmdlen;
5072     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5073         (void) __glXFlushRenderBuffer(gc, gc->pc);
5074     }
5075 }
5076
5077 #define X_GLrop_CopyTexImage1D 4119
5078 void
5079 __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
5080                             GLint x, GLint y, GLsizei width, GLint border)
5081 {
5082     struct glx_context *const gc = __glXGetCurrentContext();
5083     const GLuint cmdlen = 32;
5084     emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
5085     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5086     (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5087     (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5088     (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5089     (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5090     (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5091     (void) memcpy((void *) (gc->pc + 28), (void *) (&border), 4);
5092     gc->pc += cmdlen;
5093     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5094         (void) __glXFlushRenderBuffer(gc, gc->pc);
5095     }
5096 }
5097
5098 #define X_GLrop_CopyTexImage2D 4120
5099 void
5100 __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
5101                             GLint x, GLint y, GLsizei width, GLsizei height,
5102                             GLint border)
5103 {
5104     struct glx_context *const gc = __glXGetCurrentContext();
5105     const GLuint cmdlen = 36;
5106     emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
5107     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5108     (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5109     (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5110     (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5111     (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5112     (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5113     (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
5114     (void) memcpy((void *) (gc->pc + 32), (void *) (&border), 4);
5115     gc->pc += cmdlen;
5116     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5117         (void) __glXFlushRenderBuffer(gc, gc->pc);
5118     }
5119 }
5120
5121 #define X_GLrop_CopyTexSubImage1D 4121
5122 void
5123 __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5124                                GLint x, GLint y, GLsizei width)
5125 {
5126     struct glx_context *const gc = __glXGetCurrentContext();
5127     const GLuint cmdlen = 28;
5128     emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
5129     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5130     (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5131     (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5132     (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5133     (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5134     (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5135     gc->pc += cmdlen;
5136     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5137         (void) __glXFlushRenderBuffer(gc, gc->pc);
5138     }
5139 }
5140
5141 #define X_GLrop_CopyTexSubImage2D 4122
5142 void
5143 __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5144                                GLint yoffset, GLint x, GLint y, GLsizei width,
5145                                GLsizei height)
5146 {
5147     struct glx_context *const gc = __glXGetCurrentContext();
5148     const GLuint cmdlen = 36;
5149     emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
5150     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5151     (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5152     (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5153     (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
5154     (void) memcpy((void *) (gc->pc + 20), (void *) (&x), 4);
5155     (void) memcpy((void *) (gc->pc + 24), (void *) (&y), 4);
5156     (void) memcpy((void *) (gc->pc + 28), (void *) (&width), 4);
5157     (void) memcpy((void *) (gc->pc + 32), (void *) (&height), 4);
5158     gc->pc += cmdlen;
5159     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5160         (void) __glXFlushRenderBuffer(gc, gc->pc);
5161     }
5162 }
5163
5164 #define X_GLsop_DeleteTextures 144
5165 void
5166 __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
5167 {
5168     struct glx_context *const gc = __glXGetCurrentContext();
5169     Display *const dpy = gc->currentDpy;
5170 #ifndef USE_XCB
5171     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5172 #endif
5173     if (n < 0) {
5174         __glXSetError(gc, GL_INVALID_VALUE);
5175         return;
5176     }
5177     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5178 #ifdef USE_XCB
5179         xcb_connection_t *c = XGetXCBConnection(dpy);
5180         (void) __glXFlushRenderBuffer(gc, gc->pc);
5181         xcb_glx_delete_textures(c, gc->currentContextTag, n, textures);
5182 #else
5183         GLubyte const *pc =
5184             __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
5185         (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5186         (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5187         UnlockDisplay(dpy);
5188         SyncHandle();
5189 #endif /* USE_XCB */
5190     }
5191     return;
5192 }
5193
5194 #define X_GLvop_DeleteTexturesEXT 12
5195 void
5196 glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
5197 {
5198     struct glx_context *const gc = __glXGetCurrentContext();
5199
5200 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5201     if (gc->isDirect) {
5202         GET_DISPATCH()->DeleteTextures(n, textures);
5203     } else
5204 #endif
5205     {
5206         struct glx_context *const gc = __glXGetCurrentContext();
5207         Display *const dpy = gc->currentDpy;
5208         const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5209         if (n < 0) {
5210             __glXSetError(gc, GL_INVALID_VALUE);
5211             return;
5212         }
5213         if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5214             GLubyte const *pc =
5215                 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
5216                                         X_GLvop_DeleteTexturesEXT, cmdlen);
5217             (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5218             (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5219             UnlockDisplay(dpy);
5220             SyncHandle();
5221         }
5222         return;
5223     }
5224 }
5225
5226 #define X_GLsop_GenTextures 145
5227 void
5228 __indirect_glGenTextures(GLsizei n, GLuint * textures)
5229 {
5230     struct glx_context *const gc = __glXGetCurrentContext();
5231     Display *const dpy = gc->currentDpy;
5232 #ifndef USE_XCB
5233     const GLuint cmdlen = 4;
5234 #endif
5235     if (n < 0) {
5236         __glXSetError(gc, GL_INVALID_VALUE);
5237         return;
5238     }
5239     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5240 #ifdef USE_XCB
5241         xcb_connection_t *c = XGetXCBConnection(dpy);
5242         (void) __glXFlushRenderBuffer(gc, gc->pc);
5243         xcb_glx_gen_textures_reply_t *reply =
5244             xcb_glx_gen_textures_reply(c,
5245                                        xcb_glx_gen_textures(c,
5246                                                             gc->
5247                                                             currentContextTag,
5248                                                             n), NULL);
5249         (void) memcpy(textures, xcb_glx_gen_textures_data(reply),
5250                       xcb_glx_gen_textures_data_length(reply) *
5251                       sizeof(GLuint));
5252         free(reply);
5253 #else
5254         GLubyte const *pc =
5255             __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
5256         (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5257         (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5258         UnlockDisplay(dpy);
5259         SyncHandle();
5260 #endif /* USE_XCB */
5261     }
5262     return;
5263 }
5264
5265 #define X_GLvop_GenTexturesEXT 13
5266 void
5267 glGenTexturesEXT(GLsizei n, GLuint * textures)
5268 {
5269     struct glx_context *const gc = __glXGetCurrentContext();
5270
5271 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5272     if (gc->isDirect) {
5273         GET_DISPATCH()->GenTextures(n, textures);
5274     } else
5275 #endif
5276     {
5277         struct glx_context *const gc = __glXGetCurrentContext();
5278         Display *const dpy = gc->currentDpy;
5279         const GLuint cmdlen = 4;
5280         if (n < 0) {
5281             __glXSetError(gc, GL_INVALID_VALUE);
5282             return;
5283         }
5284         if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5285             GLubyte const *pc =
5286                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5287                                         X_GLvop_GenTexturesEXT, cmdlen);
5288             (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5289             (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5290             UnlockDisplay(dpy);
5291             SyncHandle();
5292         }
5293         return;
5294     }
5295 }
5296
5297 #define X_GLsop_IsTexture 146
5298 GLboolean
5299 __indirect_glIsTexture(GLuint texture)
5300 {
5301     struct glx_context *const gc = __glXGetCurrentContext();
5302     Display *const dpy = gc->currentDpy;
5303     GLboolean retval = (GLboolean) 0;
5304 #ifndef USE_XCB
5305     const GLuint cmdlen = 4;
5306 #endif
5307     if (__builtin_expect(dpy != NULL, 1)) {
5308 #ifdef USE_XCB
5309         xcb_connection_t *c = XGetXCBConnection(dpy);
5310         (void) __glXFlushRenderBuffer(gc, gc->pc);
5311         xcb_glx_is_texture_reply_t *reply =
5312             xcb_glx_is_texture_reply(c,
5313                                      xcb_glx_is_texture(c,
5314                                                         gc->currentContextTag,
5315                                                         texture), NULL);
5316         retval = reply->ret_val;
5317         free(reply);
5318 #else
5319         GLubyte const *pc =
5320             __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
5321         (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5322         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5323         UnlockDisplay(dpy);
5324         SyncHandle();
5325 #endif /* USE_XCB */
5326     }
5327     return retval;
5328 }
5329
5330 #define X_GLvop_IsTextureEXT 14
5331 GLboolean
5332 glIsTextureEXT(GLuint texture)
5333 {
5334     struct glx_context *const gc = __glXGetCurrentContext();
5335
5336 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5337     if (gc->isDirect) {
5338         return GET_DISPATCH()->IsTexture(texture);
5339     } else
5340 #endif
5341     {
5342         struct glx_context *const gc = __glXGetCurrentContext();
5343         Display *const dpy = gc->currentDpy;
5344         GLboolean retval = (GLboolean) 0;
5345         const GLuint cmdlen = 4;
5346         if (__builtin_expect(dpy != NULL, 1)) {
5347             GLubyte const *pc =
5348                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5349                                         X_GLvop_IsTextureEXT, cmdlen);
5350             (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5351             retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5352             UnlockDisplay(dpy);
5353             SyncHandle();
5354         }
5355         return retval;
5356     }
5357 }
5358
5359 #define X_GLrop_PrioritizeTextures 4118
5360 void
5361 __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures,
5362                                 const GLclampf * priorities)
5363 {
5364     struct glx_context *const gc = __glXGetCurrentContext();
5365     const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
5366     if (n < 0) {
5367         __glXSetError(gc, GL_INVALID_VALUE);
5368         return;
5369     }
5370     if (__builtin_expect(n >= 0, 1)) {
5371         emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
5372         (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
5373         (void) memcpy((void *) (gc->pc + 8), (void *) (textures), (n * 4));
5374         (void) memcpy((void *) (gc->pc + 8 + (n * 4)), (void *) (priorities),
5375                       (n * 4));
5376         gc->pc += cmdlen;
5377         if (__builtin_expect(gc->pc > gc->limit, 0)) {
5378             (void) __glXFlushRenderBuffer(gc, gc->pc);
5379         }
5380     }
5381 }
5382
5383 static void
5384 __glx_TexSubImage_1D2D(unsigned opcode, unsigned dim, GLenum target,
5385                        GLint level, GLint xoffset, GLint yoffset,
5386                        GLsizei width, GLsizei height, GLenum format,
5387                        GLenum type, const GLvoid * pixels)
5388 {
5389     struct glx_context *const gc = __glXGetCurrentContext();
5390     const GLuint compsize =
5391         (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
5392                                          target) : 0;
5393     const GLuint cmdlen = 60 + __GLX_PAD(compsize);
5394     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5395         if (cmdlen <= gc->maxSmallRenderCommandSize) {
5396             if ((gc->pc + cmdlen) > gc->bufEnd) {
5397                 (void) __glXFlushRenderBuffer(gc, gc->pc);
5398             }
5399             emit_header(gc->pc, opcode, cmdlen);
5400             (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5401             (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
5402             (void) memcpy((void *) (gc->pc + 32), (void *) (&xoffset), 4);
5403             (void) memcpy((void *) (gc->pc + 36), (void *) (&yoffset), 4);
5404             (void) memcpy((void *) (gc->pc + 40), (void *) (&width), 4);
5405             (void) memcpy((void *) (gc->pc + 44), (void *) (&height), 4);
5406             (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
5407             (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
5408             (void) memset((void *) (gc->pc + 56), 0, 4);
5409             if (compsize > 0) {
5410                 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5411                                   pixels, gc->pc + 60, gc->pc + 4);
5412             } else {
5413                 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5414                               default_pixel_store_2D_size);
5415             }
5416             gc->pc += cmdlen;
5417             if (gc->pc > gc->limit) {
5418                 (void) __glXFlushRenderBuffer(gc, gc->pc);
5419             }
5420         } else {
5421             const GLint op = opcode;
5422             const GLuint cmdlenLarge = cmdlen + 4;
5423             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5424             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5425             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5426             (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5427             (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
5428             (void) memcpy((void *) (pc + 36), (void *) (&xoffset), 4);
5429             (void) memcpy((void *) (pc + 40), (void *) (&yoffset), 4);
5430             (void) memcpy((void *) (pc + 44), (void *) (&width), 4);
5431             (void) memcpy((void *) (pc + 48), (void *) (&height), 4);
5432             (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
5433             (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
5434             (void) memset((void *) (pc + 60), 0, 4);
5435             __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5436                                 type, pixels, pc + 64, pc + 8);
5437         }
5438     }
5439 }
5440
5441 #define X_GLrop_TexSubImage1D 4099
5442 void
5443 __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5444                            GLsizei width, GLenum format, GLenum type,
5445                            const GLvoid * pixels)
5446 {
5447     __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset,
5448                            1, width, 1, format, type, pixels);
5449 }
5450
5451 #define X_GLrop_TexSubImage2D 4100
5452 void
5453 __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5454                            GLint yoffset, GLsizei width, GLsizei height,
5455                            GLenum format, GLenum type, const GLvoid * pixels)
5456 {
5457     __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset,
5458                            yoffset, width, height, format, type, pixels);
5459 }
5460
5461 #define X_GLrop_BlendColor 4096
5462 void
5463 __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue,
5464                         GLclampf alpha)
5465 {
5466     struct glx_context *const gc = __glXGetCurrentContext();
5467     const GLuint cmdlen = 20;
5468     emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
5469     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
5470     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
5471     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
5472     (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
5473     gc->pc += cmdlen;
5474     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5475         (void) __glXFlushRenderBuffer(gc, gc->pc);
5476     }
5477 }
5478
5479 #define X_GLrop_BlendEquation 4097
5480 void
5481 __indirect_glBlendEquation(GLenum mode)
5482 {
5483     struct glx_context *const gc = __glXGetCurrentContext();
5484     const GLuint cmdlen = 8;
5485     emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
5486     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
5487     gc->pc += cmdlen;
5488     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5489         (void) __glXFlushRenderBuffer(gc, gc->pc);
5490     }
5491 }
5492
5493 #define X_GLrop_ColorTable 2053
5494 void
5495 __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width,
5496                         GLenum format, GLenum type, const GLvoid * table)
5497 {
5498     struct glx_context *const gc = __glXGetCurrentContext();
5499     const GLuint compsize =
5500         (table != NULL) ? __glImageSize(width, 1, 1, format, type,
5501                                         target) : 0;
5502     const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5503     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5504         if (cmdlen <= gc->maxSmallRenderCommandSize) {
5505             if ((gc->pc + cmdlen) > gc->bufEnd) {
5506                 (void) __glXFlushRenderBuffer(gc, gc->pc);
5507             }
5508             emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
5509             (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5510             (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5511                           4);
5512             (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5513             (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5514             (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5515             if (compsize > 0) {
5516                 (*gc->fillImage) (gc, 1, width, 1, 1, format, type, table,
5517                                   gc->pc + 44, gc->pc + 4);
5518             } else {
5519                 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5520                               default_pixel_store_1D_size);
5521             }
5522             gc->pc += cmdlen;
5523             if (gc->pc > gc->limit) {
5524                 (void) __glXFlushRenderBuffer(gc, gc->pc);
5525             }
5526         } else {
5527             const GLint op = X_GLrop_ColorTable;
5528             const GLuint cmdlenLarge = cmdlen + 4;
5529             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5530             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5531             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5532             (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5533             (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5534             (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5535             (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5536             (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5537             __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type,
5538                                 table, pc + 48, pc + 8);
5539         }
5540     }
5541 }
5542
5543 #define X_GLrop_ColorTableParameterfv 2054
5544 void
5545 __indirect_glColorTableParameterfv(GLenum target, GLenum pname,
5546                                    const GLfloat * params)
5547 {
5548     struct glx_context *const gc = __glXGetCurrentContext();
5549     const GLuint compsize = __glColorTableParameterfv_size(pname);
5550     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5551     emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
5552     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5553     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5554     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5555     gc->pc += cmdlen;
5556     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5557         (void) __glXFlushRenderBuffer(gc, gc->pc);
5558     }
5559 }
5560
5561 #define X_GLrop_ColorTableParameteriv 2055
5562 void
5563 __indirect_glColorTableParameteriv(GLenum target, GLenum pname,
5564                                    const GLint * params)
5565 {
5566     struct glx_context *const gc = __glXGetCurrentContext();
5567     const GLuint compsize = __glColorTableParameteriv_size(pname);
5568     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5569     emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
5570     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5571     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5572     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5573     gc->pc += cmdlen;
5574     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5575         (void) __glXFlushRenderBuffer(gc, gc->pc);
5576     }
5577 }
5578
5579 #define X_GLrop_CopyColorTable 2056
5580 void
5581 __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x,
5582                             GLint y, GLsizei width)
5583 {
5584     struct glx_context *const gc = __glXGetCurrentContext();
5585     const GLuint cmdlen = 24;
5586     emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
5587     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5588     (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
5589     (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5590     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5591     (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5592     gc->pc += cmdlen;
5593     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5594         (void) __glXFlushRenderBuffer(gc, gc->pc);
5595     }
5596 }
5597
5598 #define X_GLsop_GetColorTable 147
5599 void
5600 __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
5601                            GLvoid * table)
5602 {
5603     struct glx_context *const gc = __glXGetCurrentContext();
5604     const __GLXattribute *const state = gc->client_state_private;
5605     Display *const dpy = gc->currentDpy;
5606 #ifndef USE_XCB
5607     const GLuint cmdlen = 16;
5608 #endif
5609     if (__builtin_expect(dpy != NULL, 1)) {
5610 #ifdef USE_XCB
5611         xcb_connection_t *c = XGetXCBConnection(dpy);
5612         (void) __glXFlushRenderBuffer(gc, gc->pc);
5613         xcb_glx_get_color_table_reply_t *reply =
5614             xcb_glx_get_color_table_reply(c,
5615                                           xcb_glx_get_color_table(c,
5616                                                                   gc->
5617                                                                   currentContextTag,
5618                                                                   target,
5619                                                                   format,
5620                                                                   type,
5621                                                                   state->
5622                                                                   storePack.
5623                                                                   swapEndian),
5624                                           NULL);
5625         (void) memcpy(table, xcb_glx_get_color_table_data(reply),
5626                       xcb_glx_get_color_table_data_length(reply) *
5627                       sizeof(GLvoid));
5628         free(reply);
5629 #else
5630         GLubyte const *pc =
5631             __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
5632         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5633         (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5634         (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5635         *(int32_t *) (pc + 12) = 0;
5636         *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5637         __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5638                             GL_TRUE);
5639         UnlockDisplay(dpy);
5640         SyncHandle();
5641 #endif /* USE_XCB */
5642     }
5643     return;
5644 }
5645
5646 #define X_GLvop_GetColorTableSGI 4098
5647 void
5648 glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
5649 {
5650     struct glx_context *const gc = __glXGetCurrentContext();
5651
5652 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5653     if (gc->isDirect) {
5654         GET_DISPATCH()->GetColorTable(target, format, type, table);
5655     } else
5656 #endif
5657     {
5658         struct glx_context *const gc = __glXGetCurrentContext();
5659         const __GLXattribute *const state = gc->client_state_private;
5660         Display *const dpy = gc->currentDpy;
5661         const GLuint cmdlen = 16;
5662         if (__builtin_expect(dpy != NULL, 1)) {
5663             GLubyte const *pc =
5664                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5665                                         X_GLvop_GetColorTableSGI, cmdlen);
5666             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5667             (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5668             (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5669             *(int32_t *) (pc + 12) = 0;
5670             *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5671             __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5672                                 GL_TRUE);
5673             UnlockDisplay(dpy);
5674             SyncHandle();
5675         }
5676         return;
5677     }
5678 }
5679
5680 #define X_GLsop_GetColorTableParameterfv 148
5681 void
5682 __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
5683                                       GLfloat * params)
5684 {
5685     struct glx_context *const gc = __glXGetCurrentContext();
5686     Display *const dpy = gc->currentDpy;
5687 #ifndef USE_XCB
5688     const GLuint cmdlen = 8;
5689 #endif
5690     if (__builtin_expect(dpy != NULL, 1)) {
5691 #ifdef USE_XCB
5692         xcb_connection_t *c = XGetXCBConnection(dpy);
5693         (void) __glXFlushRenderBuffer(gc, gc->pc);
5694         xcb_glx_get_color_table_parameterfv_reply_t *reply =
5695             xcb_glx_get_color_table_parameterfv_reply(c,
5696                                                       xcb_glx_get_color_table_parameterfv
5697                                                       (c,
5698                                                        gc->currentContextTag,
5699                                                        target, pname), NULL);
5700         if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 0)
5701             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5702         else
5703             (void) memcpy(params,
5704                           xcb_glx_get_color_table_parameterfv_data(reply),
5705                           xcb_glx_get_color_table_parameterfv_data_length
5706                           (reply) * sizeof(GLfloat));
5707         free(reply);
5708 #else
5709         GLubyte const *pc =
5710             __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv,
5711                                     cmdlen);
5712         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5713         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5714         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5715         UnlockDisplay(dpy);
5716         SyncHandle();
5717 #endif /* USE_XCB */
5718     }
5719     return;
5720 }
5721
5722 #define X_GLvop_GetColorTableParameterfvSGI 4099
5723 void
5724 glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
5725 {
5726     struct glx_context *const gc = __glXGetCurrentContext();
5727
5728 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5729     if (gc->isDirect) {
5730         GET_DISPATCH()->GetColorTableParameterfv(target, pname, params);
5731     } else
5732 #endif
5733     {
5734         struct glx_context *const gc = __glXGetCurrentContext();
5735         Display *const dpy = gc->currentDpy;
5736         const GLuint cmdlen = 8;
5737         if (__builtin_expect(dpy != NULL, 1)) {
5738             GLubyte const *pc =
5739                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5740                                         X_GLvop_GetColorTableParameterfvSGI,
5741                                         cmdlen);
5742             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5743             (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5744             (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5745             UnlockDisplay(dpy);
5746             SyncHandle();
5747         }
5748         return;
5749     }
5750 }
5751
5752 #define X_GLsop_GetColorTableParameteriv 149
5753 void
5754 __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
5755                                       GLint * params)
5756 {
5757     struct glx_context *const gc = __glXGetCurrentContext();
5758     Display *const dpy = gc->currentDpy;
5759 #ifndef USE_XCB
5760     const GLuint cmdlen = 8;
5761 #endif
5762     if (__builtin_expect(dpy != NULL, 1)) {
5763 #ifdef USE_XCB
5764         xcb_connection_t *c = XGetXCBConnection(dpy);
5765         (void) __glXFlushRenderBuffer(gc, gc->pc);
5766         xcb_glx_get_color_table_parameteriv_reply_t *reply =
5767             xcb_glx_get_color_table_parameteriv_reply(c,
5768                                                       xcb_glx_get_color_table_parameteriv
5769                                                       (c,
5770                                                        gc->currentContextTag,
5771                                                        target, pname), NULL);
5772         if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 0)
5773             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5774         else
5775             (void) memcpy(params,
5776                           xcb_glx_get_color_table_parameteriv_data(reply),
5777                           xcb_glx_get_color_table_parameteriv_data_length
5778                           (reply) * sizeof(GLint));
5779         free(reply);
5780 #else
5781         GLubyte const *pc =
5782             __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv,
5783                                     cmdlen);
5784         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5785         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5786         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5787         UnlockDisplay(dpy);
5788         SyncHandle();
5789 #endif /* USE_XCB */
5790     }
5791     return;
5792 }
5793
5794 #define X_GLvop_GetColorTableParameterivSGI 4100
5795 void
5796 glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
5797 {
5798     struct glx_context *const gc = __glXGetCurrentContext();
5799
5800 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5801     if (gc->isDirect) {
5802         GET_DISPATCH()->GetColorTableParameteriv(target, pname, params);
5803     } else
5804 #endif
5805     {
5806         struct glx_context *const gc = __glXGetCurrentContext();
5807         Display *const dpy = gc->currentDpy;
5808         const GLuint cmdlen = 8;
5809         if (__builtin_expect(dpy != NULL, 1)) {
5810             GLubyte const *pc =
5811                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5812                                         X_GLvop_GetColorTableParameterivSGI,
5813                                         cmdlen);
5814             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5815             (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5816             (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5817             UnlockDisplay(dpy);
5818             SyncHandle();
5819         }
5820         return;
5821     }
5822 }
5823
5824 #define X_GLrop_ColorSubTable 195
5825 void
5826 __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count,
5827                            GLenum format, GLenum type, const GLvoid * data)
5828 {
5829     struct glx_context *const gc = __glXGetCurrentContext();
5830     const GLuint compsize =
5831         (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
5832     const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5833     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5834         if (cmdlen <= gc->maxSmallRenderCommandSize) {
5835             if ((gc->pc + cmdlen) > gc->bufEnd) {
5836                 (void) __glXFlushRenderBuffer(gc, gc->pc);
5837             }
5838             emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
5839             (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5840             (void) memcpy((void *) (gc->pc + 28), (void *) (&start), 4);
5841             (void) memcpy((void *) (gc->pc + 32), (void *) (&count), 4);
5842             (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5843             (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5844             if (compsize > 0) {
5845                 (*gc->fillImage) (gc, 1, count, 1, 1, format, type, data,
5846                                   gc->pc + 44, gc->pc + 4);
5847             } else {
5848                 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5849                               default_pixel_store_1D_size);
5850             }
5851             gc->pc += cmdlen;
5852             if (gc->pc > gc->limit) {
5853                 (void) __glXFlushRenderBuffer(gc, gc->pc);
5854             }
5855         } else {
5856             const GLint op = X_GLrop_ColorSubTable;
5857             const GLuint cmdlenLarge = cmdlen + 4;
5858             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5859             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5860             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5861             (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5862             (void) memcpy((void *) (pc + 32), (void *) (&start), 4);
5863             (void) memcpy((void *) (pc + 36), (void *) (&count), 4);
5864             (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5865             (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5866             __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type,
5867                                 data, pc + 48, pc + 8);
5868         }
5869     }
5870 }
5871
5872 #define X_GLrop_CopyColorSubTable 196
5873 void
5874 __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y,
5875                                GLsizei width)
5876 {
5877     struct glx_context *const gc = __glXGetCurrentContext();
5878     const GLuint cmdlen = 24;
5879     emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
5880     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5881     (void) memcpy((void *) (gc->pc + 8), (void *) (&start), 4);
5882     (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5883     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5884     (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5885     gc->pc += cmdlen;
5886     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5887         (void) __glXFlushRenderBuffer(gc, gc->pc);
5888     }
5889 }
5890
5891 static void
5892 __glx_ConvolutionFilter_1D2D(unsigned opcode, unsigned dim, GLenum target,
5893                              GLenum internalformat, GLsizei width,
5894                              GLsizei height, GLenum format, GLenum type,
5895                              const GLvoid * image)
5896 {
5897     struct glx_context *const gc = __glXGetCurrentContext();
5898     const GLuint compsize =
5899         (image != NULL) ? __glImageSize(width, height, 1, format, type,
5900                                         target) : 0;
5901     const GLuint cmdlen = 48 + __GLX_PAD(compsize);
5902     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5903         if (cmdlen <= gc->maxSmallRenderCommandSize) {
5904             if ((gc->pc + cmdlen) > gc->bufEnd) {
5905                 (void) __glXFlushRenderBuffer(gc, gc->pc);
5906             }
5907             emit_header(gc->pc, opcode, cmdlen);
5908             (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5909             (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5910                           4);
5911             (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5912             (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
5913             (void) memcpy((void *) (gc->pc + 40), (void *) (&format), 4);
5914             (void) memcpy((void *) (gc->pc + 44), (void *) (&type), 4);
5915             if (compsize > 0) {
5916                 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5917                                   image, gc->pc + 48, gc->pc + 4);
5918             } else {
5919                 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5920                               default_pixel_store_2D_size);
5921             }
5922             gc->pc += cmdlen;
5923             if (gc->pc > gc->limit) {
5924                 (void) __glXFlushRenderBuffer(gc, gc->pc);
5925             }
5926         } else {
5927             const GLint op = opcode;
5928             const GLuint cmdlenLarge = cmdlen + 4;
5929             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5930             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5931             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5932             (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5933             (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5934             (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5935             (void) memcpy((void *) (pc + 40), (void *) (&height), 4);
5936             (void) memcpy((void *) (pc + 44), (void *) (&format), 4);
5937             (void) memcpy((void *) (pc + 48), (void *) (&type), 4);
5938             __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5939                                 type, image, pc + 52, pc + 8);
5940         }
5941     }
5942 }
5943
5944 #define X_GLrop_ConvolutionFilter1D 4101
5945 void
5946 __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat,
5947                                  GLsizei width, GLenum format, GLenum type,
5948                                  const GLvoid * image)
5949 {
5950     __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target,
5951                                  internalformat, width, 1, format, type,
5952                                  image);
5953 }
5954
5955 #define X_GLrop_ConvolutionFilter2D 4102
5956 void
5957 __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat,
5958                                  GLsizei width, GLsizei height, GLenum format,
5959                                  GLenum type, const GLvoid * image)
5960 {
5961     __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target,
5962                                  internalformat, width, height, format, type,
5963                                  image);
5964 }
5965
5966 #define X_GLrop_ConvolutionParameterf 4103
5967 void
5968 __indirect_glConvolutionParameterf(GLenum target, GLenum pname,
5969                                    GLfloat params)
5970 {
5971     struct glx_context *const gc = __glXGetCurrentContext();
5972     const GLuint cmdlen = 16;
5973     emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
5974     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5975     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5976     (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
5977     gc->pc += cmdlen;
5978     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5979         (void) __glXFlushRenderBuffer(gc, gc->pc);
5980     }
5981 }
5982
5983 #define X_GLrop_ConvolutionParameterfv 4104
5984 void
5985 __indirect_glConvolutionParameterfv(GLenum target, GLenum pname,
5986                                     const GLfloat * params)
5987 {
5988     struct glx_context *const gc = __glXGetCurrentContext();
5989     const GLuint compsize = __glConvolutionParameterfv_size(pname);
5990     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5991     emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
5992     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5993     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5994     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5995     gc->pc += cmdlen;
5996     if (__builtin_expect(gc->pc > gc->limit, 0)) {
5997         (void) __glXFlushRenderBuffer(gc, gc->pc);
5998     }
5999 }
6000
6001 #define X_GLrop_ConvolutionParameteri 4105
6002 void
6003 __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
6004 {
6005     struct glx_context *const gc = __glXGetCurrentContext();
6006     const GLuint cmdlen = 16;
6007     emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
6008     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6009     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
6010     (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
6011     gc->pc += cmdlen;
6012     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6013         (void) __glXFlushRenderBuffer(gc, gc->pc);
6014     }
6015 }
6016
6017 #define X_GLrop_ConvolutionParameteriv 4106
6018 void
6019 __indirect_glConvolutionParameteriv(GLenum target, GLenum pname,
6020                                     const GLint * params)
6021 {
6022     struct glx_context *const gc = __glXGetCurrentContext();
6023     const GLuint compsize = __glConvolutionParameteriv_size(pname);
6024     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
6025     emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
6026     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6027     (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
6028     (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
6029     gc->pc += cmdlen;
6030     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6031         (void) __glXFlushRenderBuffer(gc, gc->pc);
6032     }
6033 }
6034
6035 #define X_GLrop_CopyConvolutionFilter1D 4107
6036 void
6037 __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat,
6038                                      GLint x, GLint y, GLsizei width)
6039 {
6040     struct glx_context *const gc = __glXGetCurrentContext();
6041     const GLuint cmdlen = 24;
6042     emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
6043     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6044     (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6045     (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
6046     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
6047     (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
6048     gc->pc += cmdlen;
6049     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6050         (void) __glXFlushRenderBuffer(gc, gc->pc);
6051     }
6052 }
6053
6054 #define X_GLrop_CopyConvolutionFilter2D 4108
6055 void
6056 __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat,
6057                                      GLint x, GLint y, GLsizei width,
6058                                      GLsizei height)
6059 {
6060     struct glx_context *const gc = __glXGetCurrentContext();
6061     const GLuint cmdlen = 28;
6062     emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
6063     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6064     (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6065     (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
6066     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
6067     (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
6068     (void) memcpy((void *) (gc->pc + 24), (void *) (&height), 4);
6069     gc->pc += cmdlen;
6070     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6071         (void) __glXFlushRenderBuffer(gc, gc->pc);
6072     }
6073 }
6074
6075 #define X_GLsop_GetConvolutionFilter 150
6076 void
6077 __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type,
6078                                   GLvoid * image)
6079 {
6080     struct glx_context *const gc = __glXGetCurrentContext();
6081     const __GLXattribute *const state = gc->client_state_private;
6082     Display *const dpy = gc->currentDpy;
6083 #ifndef USE_XCB
6084     const GLuint cmdlen = 16;
6085 #endif
6086     if (__builtin_expect(dpy != NULL, 1)) {
6087 #ifdef USE_XCB
6088         xcb_connection_t *c = XGetXCBConnection(dpy);
6089         (void) __glXFlushRenderBuffer(gc, gc->pc);
6090         xcb_glx_get_convolution_filter_reply_t *reply =
6091             xcb_glx_get_convolution_filter_reply(c,
6092                                                  xcb_glx_get_convolution_filter
6093                                                  (c, gc->currentContextTag,
6094                                                   target, format, type,
6095                                                   state->storePack.
6096                                                   swapEndian), NULL);
6097         (void) memcpy(image, xcb_glx_get_convolution_filter_data(reply),
6098                       xcb_glx_get_convolution_filter_data_length(reply) *
6099                       sizeof(GLvoid));
6100         free(reply);
6101 #else
6102         GLubyte const *pc =
6103             __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
6104         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6105         (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6106         (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6107         *(int32_t *) (pc + 12) = 0;
6108         *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6109         __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6110                             GL_TRUE);
6111         UnlockDisplay(dpy);
6112         SyncHandle();
6113 #endif /* USE_XCB */
6114     }
6115     return;
6116 }
6117
6118 #define X_GLvop_GetConvolutionFilterEXT 1
6119 void
6120 gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
6121                      GLvoid * image)
6122 {
6123     struct glx_context *const gc = __glXGetCurrentContext();
6124
6125 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6126     if (gc->isDirect) {
6127         GET_DISPATCH()->GetConvolutionFilter(target, format, type, image);
6128     } else
6129 #endif
6130     {
6131         struct glx_context *const gc = __glXGetCurrentContext();
6132         const __GLXattribute *const state = gc->client_state_private;
6133         Display *const dpy = gc->currentDpy;
6134         const GLuint cmdlen = 16;
6135         if (__builtin_expect(dpy != NULL, 1)) {
6136             GLubyte const *pc =
6137                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6138                                         X_GLvop_GetConvolutionFilterEXT,
6139                                         cmdlen);
6140             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6141             (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6142             (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6143             *(int32_t *) (pc + 12) = 0;
6144             *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6145             __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6146                                 GL_TRUE);
6147             UnlockDisplay(dpy);
6148             SyncHandle();
6149         }
6150         return;
6151     }
6152 }
6153
6154 #define X_GLsop_GetConvolutionParameterfv 151
6155 void
6156 __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
6157                                        GLfloat * params)
6158 {
6159     struct glx_context *const gc = __glXGetCurrentContext();
6160     Display *const dpy = gc->currentDpy;
6161 #ifndef USE_XCB
6162     const GLuint cmdlen = 8;
6163 #endif
6164     if (__builtin_expect(dpy != NULL, 1)) {
6165 #ifdef USE_XCB
6166         xcb_connection_t *c = XGetXCBConnection(dpy);
6167         (void) __glXFlushRenderBuffer(gc, gc->pc);
6168         xcb_glx_get_convolution_parameterfv_reply_t *reply =
6169             xcb_glx_get_convolution_parameterfv_reply(c,
6170                                                       xcb_glx_get_convolution_parameterfv
6171                                                       (c,
6172                                                        gc->currentContextTag,
6173                                                        target, pname), NULL);
6174         if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 0)
6175             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6176         else
6177             (void) memcpy(params,
6178                           xcb_glx_get_convolution_parameterfv_data(reply),
6179                           xcb_glx_get_convolution_parameterfv_data_length
6180                           (reply) * sizeof(GLfloat));
6181         free(reply);
6182 #else
6183         GLubyte const *pc =
6184             __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv,
6185                                     cmdlen);
6186         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6187         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6188         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6189         UnlockDisplay(dpy);
6190         SyncHandle();
6191 #endif /* USE_XCB */
6192     }
6193     return;
6194 }
6195
6196 #define X_GLvop_GetConvolutionParameterfvEXT 2
6197 void
6198 gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
6199 {
6200     struct glx_context *const gc = __glXGetCurrentContext();
6201
6202 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6203     if (gc->isDirect) {
6204         GET_DISPATCH()->GetConvolutionParameterfv(target, pname, params);
6205     } else
6206 #endif
6207     {
6208         struct glx_context *const gc = __glXGetCurrentContext();
6209         Display *const dpy = gc->currentDpy;
6210         const GLuint cmdlen = 8;
6211         if (__builtin_expect(dpy != NULL, 1)) {
6212             GLubyte const *pc =
6213                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6214                                         X_GLvop_GetConvolutionParameterfvEXT,
6215                                         cmdlen);
6216             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6217             (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6218             (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6219             UnlockDisplay(dpy);
6220             SyncHandle();
6221         }
6222         return;
6223     }
6224 }
6225
6226 #define X_GLsop_GetConvolutionParameteriv 152
6227 void
6228 __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
6229                                        GLint * params)
6230 {
6231     struct glx_context *const gc = __glXGetCurrentContext();
6232     Display *const dpy = gc->currentDpy;
6233 #ifndef USE_XCB
6234     const GLuint cmdlen = 8;
6235 #endif
6236     if (__builtin_expect(dpy != NULL, 1)) {
6237 #ifdef USE_XCB
6238         xcb_connection_t *c = XGetXCBConnection(dpy);
6239         (void) __glXFlushRenderBuffer(gc, gc->pc);
6240         xcb_glx_get_convolution_parameteriv_reply_t *reply =
6241             xcb_glx_get_convolution_parameteriv_reply(c,
6242                                                       xcb_glx_get_convolution_parameteriv
6243                                                       (c,
6244                                                        gc->currentContextTag,
6245                                                        target, pname), NULL);
6246         if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 0)
6247             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6248         else
6249             (void) memcpy(params,
6250                           xcb_glx_get_convolution_parameteriv_data(reply),
6251                           xcb_glx_get_convolution_parameteriv_data_length
6252                           (reply) * sizeof(GLint));
6253         free(reply);
6254 #else
6255         GLubyte const *pc =
6256             __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv,
6257                                     cmdlen);
6258         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6259         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6260         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6261         UnlockDisplay(dpy);
6262         SyncHandle();
6263 #endif /* USE_XCB */
6264     }
6265     return;
6266 }
6267
6268 #define X_GLvop_GetConvolutionParameterivEXT 3
6269 void
6270 gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
6271 {
6272     struct glx_context *const gc = __glXGetCurrentContext();
6273
6274 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6275     if (gc->isDirect) {
6276         GET_DISPATCH()->GetConvolutionParameteriv(target, pname, params);
6277     } else
6278 #endif
6279     {
6280         struct glx_context *const gc = __glXGetCurrentContext();
6281         Display *const dpy = gc->currentDpy;
6282         const GLuint cmdlen = 8;
6283         if (__builtin_expect(dpy != NULL, 1)) {
6284             GLubyte const *pc =
6285                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6286                                         X_GLvop_GetConvolutionParameterivEXT,
6287                                         cmdlen);
6288             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6289             (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6290             (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6291             UnlockDisplay(dpy);
6292             SyncHandle();
6293         }
6294         return;
6295     }
6296 }
6297
6298 #define X_GLsop_GetHistogram 154
6299 void
6300 __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
6301                           GLenum type, GLvoid * values)
6302 {
6303     struct glx_context *const gc = __glXGetCurrentContext();
6304     const __GLXattribute *const state = gc->client_state_private;
6305     Display *const dpy = gc->currentDpy;
6306 #ifndef USE_XCB
6307     const GLuint cmdlen = 16;
6308 #endif
6309     if (__builtin_expect(dpy != NULL, 1)) {
6310 #ifdef USE_XCB
6311         xcb_connection_t *c = XGetXCBConnection(dpy);
6312         (void) __glXFlushRenderBuffer(gc, gc->pc);
6313         xcb_glx_get_histogram_reply_t *reply =
6314             xcb_glx_get_histogram_reply(c,
6315                                         xcb_glx_get_histogram(c,
6316                                                               gc->
6317                                                               currentContextTag,
6318                                                               target, reset,
6319                                                               format, type,
6320                                                               state->
6321                                                               storePack.
6322                                                               swapEndian),
6323                                         NULL);
6324         (void) memcpy(values, xcb_glx_get_histogram_data(reply),
6325                       xcb_glx_get_histogram_data_length(reply) *
6326                       sizeof(GLvoid));
6327         free(reply);
6328 #else
6329         GLubyte const *pc =
6330             __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
6331         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6332         (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6333         (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6334         *(int32_t *) (pc + 12) = 0;
6335         *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6336         *(int8_t *) (pc + 13) = reset;
6337         __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6338                             GL_TRUE);
6339         UnlockDisplay(dpy);
6340         SyncHandle();
6341 #endif /* USE_XCB */
6342     }
6343     return;
6344 }
6345
6346 #define X_GLvop_GetHistogramEXT 5
6347 void
6348 gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
6349                      GLenum type, GLvoid * values)
6350 {
6351     struct glx_context *const gc = __glXGetCurrentContext();
6352
6353 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6354     if (gc->isDirect) {
6355         GET_DISPATCH()->GetHistogram(target, reset, format, type, values);
6356     } else
6357 #endif
6358     {
6359         struct glx_context *const gc = __glXGetCurrentContext();
6360         const __GLXattribute *const state = gc->client_state_private;
6361         Display *const dpy = gc->currentDpy;
6362         const GLuint cmdlen = 16;
6363         if (__builtin_expect(dpy != NULL, 1)) {
6364             GLubyte const *pc =
6365                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6366                                         X_GLvop_GetHistogramEXT, cmdlen);
6367             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6368             (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6369             (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6370             *(int32_t *) (pc + 12) = 0;
6371             *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6372             *(int8_t *) (pc + 13) = reset;
6373             __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6374                                 GL_TRUE);
6375             UnlockDisplay(dpy);
6376             SyncHandle();
6377         }
6378         return;
6379     }
6380 }
6381
6382 #define X_GLsop_GetHistogramParameterfv 155
6383 void
6384 __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
6385                                      GLfloat * params)
6386 {
6387     struct glx_context *const gc = __glXGetCurrentContext();
6388     Display *const dpy = gc->currentDpy;
6389 #ifndef USE_XCB
6390     const GLuint cmdlen = 8;
6391 #endif
6392     if (__builtin_expect(dpy != NULL, 1)) {
6393 #ifdef USE_XCB
6394         xcb_connection_t *c = XGetXCBConnection(dpy);
6395         (void) __glXFlushRenderBuffer(gc, gc->pc);
6396         xcb_glx_get_histogram_parameterfv_reply_t *reply =
6397             xcb_glx_get_histogram_parameterfv_reply(c,
6398                                                     xcb_glx_get_histogram_parameterfv
6399                                                     (c, gc->currentContextTag,
6400                                                      target, pname), NULL);
6401         if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 0)
6402             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6403         else
6404             (void) memcpy(params,
6405                           xcb_glx_get_histogram_parameterfv_data(reply),
6406                           xcb_glx_get_histogram_parameterfv_data_length(reply)
6407                           * sizeof(GLfloat));
6408         free(reply);
6409 #else
6410         GLubyte const *pc =
6411             __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv,
6412                                     cmdlen);
6413         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6414         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6415         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6416         UnlockDisplay(dpy);
6417         SyncHandle();
6418 #endif /* USE_XCB */
6419     }
6420     return;
6421 }
6422
6423 #define X_GLvop_GetHistogramParameterfvEXT 6
6424 void
6425 gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
6426 {
6427     struct glx_context *const gc = __glXGetCurrentContext();
6428
6429 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6430     if (gc->isDirect) {
6431         GET_DISPATCH()->GetHistogramParameterfv(target, pname, params);
6432     } else
6433 #endif
6434     {
6435         struct glx_context *const gc = __glXGetCurrentContext();
6436         Display *const dpy = gc->currentDpy;
6437         const GLuint cmdlen = 8;
6438         if (__builtin_expect(dpy != NULL, 1)) {
6439             GLubyte const *pc =
6440                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6441                                         X_GLvop_GetHistogramParameterfvEXT,
6442                                         cmdlen);
6443             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6444             (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6445             (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6446             UnlockDisplay(dpy);
6447             SyncHandle();
6448         }
6449         return;
6450     }
6451 }
6452
6453 #define X_GLsop_GetHistogramParameteriv 156
6454 void
6455 __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
6456                                      GLint * params)
6457 {
6458     struct glx_context *const gc = __glXGetCurrentContext();
6459     Display *const dpy = gc->currentDpy;
6460 #ifndef USE_XCB
6461     const GLuint cmdlen = 8;
6462 #endif
6463     if (__builtin_expect(dpy != NULL, 1)) {
6464 #ifdef USE_XCB
6465         xcb_connection_t *c = XGetXCBConnection(dpy);
6466         (void) __glXFlushRenderBuffer(gc, gc->pc);
6467         xcb_glx_get_histogram_parameteriv_reply_t *reply =
6468             xcb_glx_get_histogram_parameteriv_reply(c,
6469                                                     xcb_glx_get_histogram_parameteriv
6470                                                     (c, gc->currentContextTag,
6471                                                      target, pname), NULL);
6472         if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 0)
6473             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6474         else
6475             (void) memcpy(params,
6476                           xcb_glx_get_histogram_parameteriv_data(reply),
6477                           xcb_glx_get_histogram_parameteriv_data_length(reply)
6478                           * sizeof(GLint));
6479         free(reply);
6480 #else
6481         GLubyte const *pc =
6482             __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv,
6483                                     cmdlen);
6484         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6485         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6486         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6487         UnlockDisplay(dpy);
6488         SyncHandle();
6489 #endif /* USE_XCB */
6490     }
6491     return;
6492 }
6493
6494 #define X_GLvop_GetHistogramParameterivEXT 7
6495 void
6496 gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
6497 {
6498     struct glx_context *const gc = __glXGetCurrentContext();
6499
6500 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6501     if (gc->isDirect) {
6502         GET_DISPATCH()->GetHistogramParameteriv(target, pname, params);
6503     } else
6504 #endif
6505     {
6506         struct glx_context *const gc = __glXGetCurrentContext();
6507         Display *const dpy = gc->currentDpy;
6508         const GLuint cmdlen = 8;
6509         if (__builtin_expect(dpy != NULL, 1)) {
6510             GLubyte const *pc =
6511                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6512                                         X_GLvop_GetHistogramParameterivEXT,
6513                                         cmdlen);
6514             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6515             (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6516             (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6517             UnlockDisplay(dpy);
6518             SyncHandle();
6519         }
6520         return;
6521     }
6522 }
6523
6524 #define X_GLsop_GetMinmax 157
6525 void
6526 __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
6527                        GLenum type, GLvoid * values)
6528 {
6529     struct glx_context *const gc = __glXGetCurrentContext();
6530     const __GLXattribute *const state = gc->client_state_private;
6531     Display *const dpy = gc->currentDpy;
6532 #ifndef USE_XCB
6533     const GLuint cmdlen = 16;
6534 #endif
6535     if (__builtin_expect(dpy != NULL, 1)) {
6536 #ifdef USE_XCB
6537         xcb_connection_t *c = XGetXCBConnection(dpy);
6538         (void) __glXFlushRenderBuffer(gc, gc->pc);
6539         xcb_glx_get_minmax_reply_t *reply =
6540             xcb_glx_get_minmax_reply(c,
6541                                      xcb_glx_get_minmax(c,
6542                                                         gc->currentContextTag,
6543                                                         target, reset, format,
6544                                                         type,
6545                                                         state->storePack.
6546                                                         swapEndian), NULL);
6547         (void) memcpy(values, xcb_glx_get_minmax_data(reply),
6548                       xcb_glx_get_minmax_data_length(reply) * sizeof(GLvoid));
6549         free(reply);
6550 #else
6551         GLubyte const *pc =
6552             __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
6553         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6554         (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6555         (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6556         *(int32_t *) (pc + 12) = 0;
6557         *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6558         *(int8_t *) (pc + 13) = reset;
6559         __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6560                             GL_FALSE);
6561         UnlockDisplay(dpy);
6562         SyncHandle();
6563 #endif /* USE_XCB */
6564     }
6565     return;
6566 }
6567
6568 #define X_GLvop_GetMinmaxEXT 8
6569 void
6570 gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
6571                      GLenum type, GLvoid * values)
6572 {
6573     struct glx_context *const gc = __glXGetCurrentContext();
6574
6575 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6576     if (gc->isDirect) {
6577         GET_DISPATCH()->GetMinmax(target, reset, format, type, values);
6578     } else
6579 #endif
6580     {
6581         struct glx_context *const gc = __glXGetCurrentContext();
6582         const __GLXattribute *const state = gc->client_state_private;
6583         Display *const dpy = gc->currentDpy;
6584         const GLuint cmdlen = 16;
6585         if (__builtin_expect(dpy != NULL, 1)) {
6586             GLubyte const *pc =
6587                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6588                                         X_GLvop_GetMinmaxEXT, cmdlen);
6589             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6590             (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6591             (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6592             *(int32_t *) (pc + 12) = 0;
6593             *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6594             *(int8_t *) (pc + 13) = reset;
6595             __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6596                                 GL_FALSE);
6597             UnlockDisplay(dpy);
6598             SyncHandle();
6599         }
6600         return;
6601     }
6602 }
6603
6604 #define X_GLsop_GetMinmaxParameterfv 158
6605 void
6606 __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
6607                                   GLfloat * params)
6608 {
6609     struct glx_context *const gc = __glXGetCurrentContext();
6610     Display *const dpy = gc->currentDpy;
6611 #ifndef USE_XCB
6612     const GLuint cmdlen = 8;
6613 #endif
6614     if (__builtin_expect(dpy != NULL, 1)) {
6615 #ifdef USE_XCB
6616         xcb_connection_t *c = XGetXCBConnection(dpy);
6617         (void) __glXFlushRenderBuffer(gc, gc->pc);
6618         xcb_glx_get_minmax_parameterfv_reply_t *reply =
6619             xcb_glx_get_minmax_parameterfv_reply(c,
6620                                                  xcb_glx_get_minmax_parameterfv
6621                                                  (c, gc->currentContextTag,
6622                                                   target, pname), NULL);
6623         if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 0)
6624             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6625         else
6626             (void) memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply),
6627                           xcb_glx_get_minmax_parameterfv_data_length(reply) *
6628                           sizeof(GLfloat));
6629         free(reply);
6630 #else
6631         GLubyte const *pc =
6632             __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
6633         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6634         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6635         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6636         UnlockDisplay(dpy);
6637         SyncHandle();
6638 #endif /* USE_XCB */
6639     }
6640     return;
6641 }
6642
6643 #define X_GLvop_GetMinmaxParameterfvEXT 9
6644 void
6645 gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
6646 {
6647     struct glx_context *const gc = __glXGetCurrentContext();
6648
6649 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6650     if (gc->isDirect) {
6651         GET_DISPATCH()->GetMinmaxParameterfv(target, pname, params);
6652     } else
6653 #endif
6654     {
6655         struct glx_context *const gc = __glXGetCurrentContext();
6656         Display *const dpy = gc->currentDpy;
6657         const GLuint cmdlen = 8;
6658         if (__builtin_expect(dpy != NULL, 1)) {
6659             GLubyte const *pc =
6660                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6661                                         X_GLvop_GetMinmaxParameterfvEXT,
6662                                         cmdlen);
6663             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6664             (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6665             (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6666             UnlockDisplay(dpy);
6667             SyncHandle();
6668         }
6669         return;
6670     }
6671 }
6672
6673 #define X_GLsop_GetMinmaxParameteriv 159
6674 void
6675 __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
6676 {
6677     struct glx_context *const gc = __glXGetCurrentContext();
6678     Display *const dpy = gc->currentDpy;
6679 #ifndef USE_XCB
6680     const GLuint cmdlen = 8;
6681 #endif
6682     if (__builtin_expect(dpy != NULL, 1)) {
6683 #ifdef USE_XCB
6684         xcb_connection_t *c = XGetXCBConnection(dpy);
6685         (void) __glXFlushRenderBuffer(gc, gc->pc);
6686         xcb_glx_get_minmax_parameteriv_reply_t *reply =
6687             xcb_glx_get_minmax_parameteriv_reply(c,
6688                                                  xcb_glx_get_minmax_parameteriv
6689                                                  (c, gc->currentContextTag,
6690                                                   target, pname), NULL);
6691         if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 0)
6692             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6693         else
6694             (void) memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply),
6695                           xcb_glx_get_minmax_parameteriv_data_length(reply) *
6696                           sizeof(GLint));
6697         free(reply);
6698 #else
6699         GLubyte const *pc =
6700             __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
6701         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6702         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6703         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6704         UnlockDisplay(dpy);
6705         SyncHandle();
6706 #endif /* USE_XCB */
6707     }
6708     return;
6709 }
6710
6711 #define X_GLvop_GetMinmaxParameterivEXT 10
6712 void
6713 gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
6714 {
6715     struct glx_context *const gc = __glXGetCurrentContext();
6716
6717 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6718     if (gc->isDirect) {
6719         GET_DISPATCH()->GetMinmaxParameteriv(target, pname, params);
6720     } else
6721 #endif
6722     {
6723         struct glx_context *const gc = __glXGetCurrentContext();
6724         Display *const dpy = gc->currentDpy;
6725         const GLuint cmdlen = 8;
6726         if (__builtin_expect(dpy != NULL, 1)) {
6727             GLubyte const *pc =
6728                 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6729                                         X_GLvop_GetMinmaxParameterivEXT,
6730                                         cmdlen);
6731             (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6732             (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6733             (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6734             UnlockDisplay(dpy);
6735             SyncHandle();
6736         }
6737         return;
6738     }
6739 }
6740
6741 #define X_GLrop_Histogram 4110
6742 void
6743 __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
6744                        GLboolean sink)
6745 {
6746     struct glx_context *const gc = __glXGetCurrentContext();
6747     const GLuint cmdlen = 20;
6748     emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
6749     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6750     (void) memcpy((void *) (gc->pc + 8), (void *) (&width), 4);
6751     (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
6752     (void) memcpy((void *) (gc->pc + 16), (void *) (&sink), 1);
6753     gc->pc += cmdlen;
6754     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6755         (void) __glXFlushRenderBuffer(gc, gc->pc);
6756     }
6757 }
6758
6759 #define X_GLrop_Minmax 4111
6760 void
6761 __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
6762 {
6763     struct glx_context *const gc = __glXGetCurrentContext();
6764     const GLuint cmdlen = 16;
6765     emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
6766     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6767     (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6768     (void) memcpy((void *) (gc->pc + 12), (void *) (&sink), 1);
6769     gc->pc += cmdlen;
6770     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6771         (void) __glXFlushRenderBuffer(gc, gc->pc);
6772     }
6773 }
6774
6775 #define X_GLrop_ResetHistogram 4112
6776 void
6777 __indirect_glResetHistogram(GLenum target)
6778 {
6779     struct glx_context *const gc = __glXGetCurrentContext();
6780     const GLuint cmdlen = 8;
6781     emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
6782     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6783     gc->pc += cmdlen;
6784     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6785         (void) __glXFlushRenderBuffer(gc, gc->pc);
6786     }
6787 }
6788
6789 #define X_GLrop_ResetMinmax 4113
6790 void
6791 __indirect_glResetMinmax(GLenum target)
6792 {
6793     struct glx_context *const gc = __glXGetCurrentContext();
6794     const GLuint cmdlen = 8;
6795     emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
6796     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6797     gc->pc += cmdlen;
6798     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6799         (void) __glXFlushRenderBuffer(gc, gc->pc);
6800     }
6801 }
6802
6803 static void
6804 __glx_TexImage_3D4D(unsigned opcode, unsigned dim, GLenum target, GLint level,
6805                     GLint internalformat, GLsizei width, GLsizei height,
6806                     GLsizei depth, GLsizei extent, GLint border,
6807                     GLenum format, GLenum type, const GLvoid * pixels)
6808 {
6809     struct glx_context *const gc = __glXGetCurrentContext();
6810     const GLuint compsize =
6811         (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6812                                          target) : 0;
6813     const GLuint cmdlen = 84 + __GLX_PAD(compsize);
6814     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6815         if (cmdlen <= gc->maxSmallRenderCommandSize) {
6816             if ((gc->pc + cmdlen) > gc->bufEnd) {
6817                 (void) __glXFlushRenderBuffer(gc, gc->pc);
6818             }
6819             emit_header(gc->pc, opcode, cmdlen);
6820             (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6821             (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6822             (void) memcpy((void *) (gc->pc + 48), (void *) (&internalformat),
6823                           4);
6824             (void) memcpy((void *) (gc->pc + 52), (void *) (&width), 4);
6825             (void) memcpy((void *) (gc->pc + 56), (void *) (&height), 4);
6826             (void) memcpy((void *) (gc->pc + 60), (void *) (&depth), 4);
6827             (void) memcpy((void *) (gc->pc + 64), (void *) (&extent), 4);
6828             (void) memcpy((void *) (gc->pc + 68), (void *) (&border), 4);
6829             (void) memcpy((void *) (gc->pc + 72), (void *) (&format), 4);
6830             (void) memcpy((void *) (gc->pc + 76), (void *) (&type), 4);
6831             (void) memcpy((void *) (gc->pc + 80),
6832                           (void *) ((pixels == NULL) ? one : zero), 4);
6833             if (compsize > 0) {
6834                 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6835                                   pixels, gc->pc + 84, gc->pc + 4);
6836             } else {
6837                 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6838                               default_pixel_store_4D_size);
6839             }
6840             gc->pc += cmdlen;
6841             if (gc->pc > gc->limit) {
6842                 (void) __glXFlushRenderBuffer(gc, gc->pc);
6843             }
6844         } else {
6845             const GLint op = opcode;
6846             const GLuint cmdlenLarge = cmdlen + 4;
6847             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6848             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6849             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6850             (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6851             (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6852             (void) memcpy((void *) (pc + 52), (void *) (&internalformat), 4);
6853             (void) memcpy((void *) (pc + 56), (void *) (&width), 4);
6854             (void) memcpy((void *) (pc + 60), (void *) (&height), 4);
6855             (void) memcpy((void *) (pc + 64), (void *) (&depth), 4);
6856             (void) memcpy((void *) (pc + 68), (void *) (&extent), 4);
6857             (void) memcpy((void *) (pc + 72), (void *) (&border), 4);
6858             (void) memcpy((void *) (pc + 76), (void *) (&format), 4);
6859             (void) memcpy((void *) (pc + 80), (void *) (&type), 4);
6860             (void) memcpy((void *) (pc + 84), zero, 4);
6861             __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6862                                 format, type, pixels, pc + 88, pc + 8);
6863         }
6864     }
6865 }
6866
6867 #define X_GLrop_TexImage3D 4114
6868 void
6869 __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat,
6870                         GLsizei width, GLsizei height, GLsizei depth,
6871                         GLint border, GLenum format, GLenum type,
6872                         const GLvoid * pixels)
6873 {
6874     __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat,
6875                         width, height, depth, 1, border, format, type,
6876                         pixels);
6877 }
6878
6879 static void
6880 __glx_TexSubImage_3D4D(unsigned opcode, unsigned dim, GLenum target,
6881                        GLint level, GLint xoffset, GLint yoffset,
6882                        GLint zoffset, GLint woffset, GLsizei width,
6883                        GLsizei height, GLsizei depth, GLsizei extent,
6884                        GLenum format, GLenum type, const GLvoid * pixels)
6885 {
6886     struct glx_context *const gc = __glXGetCurrentContext();
6887     const GLuint compsize =
6888         (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6889                                          target) : 0;
6890     const GLuint cmdlen = 92 + __GLX_PAD(compsize);
6891     if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6892         if (cmdlen <= gc->maxSmallRenderCommandSize) {
6893             if ((gc->pc + cmdlen) > gc->bufEnd) {
6894                 (void) __glXFlushRenderBuffer(gc, gc->pc);
6895             }
6896             emit_header(gc->pc, opcode, cmdlen);
6897             (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6898             (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6899             (void) memcpy((void *) (gc->pc + 48), (void *) (&xoffset), 4);
6900             (void) memcpy((void *) (gc->pc + 52), (void *) (&yoffset), 4);
6901             (void) memcpy((void *) (gc->pc + 56), (void *) (&zoffset), 4);
6902             (void) memcpy((void *) (gc->pc + 60), (void *) (&woffset), 4);
6903             (void) memcpy((void *) (gc->pc + 64), (void *) (&width), 4);
6904             (void) memcpy((void *) (gc->pc + 68), (void *) (&height), 4);
6905             (void) memcpy((void *) (gc->pc + 72), (void *) (&depth), 4);
6906             (void) memcpy((void *) (gc->pc + 76), (void *) (&extent), 4);
6907             (void) memcpy((void *) (gc->pc + 80), (void *) (&format), 4);
6908             (void) memcpy((void *) (gc->pc + 84), (void *) (&type), 4);
6909             (void) memset((void *) (gc->pc + 88), 0, 4);
6910             if (compsize > 0) {
6911                 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6912                                   pixels, gc->pc + 92, gc->pc + 4);
6913             } else {
6914                 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6915                               default_pixel_store_4D_size);
6916             }
6917             gc->pc += cmdlen;
6918             if (gc->pc > gc->limit) {
6919                 (void) __glXFlushRenderBuffer(gc, gc->pc);
6920             }
6921         } else {
6922             const GLint op = opcode;
6923             const GLuint cmdlenLarge = cmdlen + 4;
6924             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6925             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6926             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6927             (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6928             (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6929             (void) memcpy((void *) (pc + 52), (void *) (&xoffset), 4);
6930             (void) memcpy((void *) (pc + 56), (void *) (&yoffset), 4);
6931             (void) memcpy((void *) (pc + 60), (void *) (&zoffset), 4);
6932             (void) memcpy((void *) (pc + 64), (void *) (&woffset), 4);
6933             (void) memcpy((void *) (pc + 68), (void *) (&width), 4);
6934             (void) memcpy((void *) (pc + 72), (void *) (&height), 4);
6935             (void) memcpy((void *) (pc + 76), (void *) (&depth), 4);
6936             (void) memcpy((void *) (pc + 80), (void *) (&extent), 4);
6937             (void) memcpy((void *) (pc + 84), (void *) (&format), 4);
6938             (void) memcpy((void *) (pc + 88), (void *) (&type), 4);
6939             (void) memset((void *) (pc + 92), 0, 4);
6940             __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6941                                 format, type, pixels, pc + 96, pc + 8);
6942         }
6943     }
6944 }
6945
6946 #define X_GLrop_TexSubImage3D 4115
6947 void
6948 __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6949                            GLint yoffset, GLint zoffset, GLsizei width,
6950                            GLsizei height, GLsizei depth, GLenum format,
6951                            GLenum type, const GLvoid * pixels)
6952 {
6953     __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset,
6954                            yoffset, zoffset, 1, width, height, depth, 1,
6955                            format, type, pixels);
6956 }
6957
6958 #define X_GLrop_CopyTexSubImage3D 4123
6959 void
6960 __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6961                                GLint yoffset, GLint zoffset, GLint x, GLint y,
6962                                GLsizei width, GLsizei height)
6963 {
6964     struct glx_context *const gc = __glXGetCurrentContext();
6965     const GLuint cmdlen = 40;
6966     emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
6967     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6968     (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
6969     (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
6970     (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
6971     (void) memcpy((void *) (gc->pc + 20), (void *) (&zoffset), 4);
6972     (void) memcpy((void *) (gc->pc + 24), (void *) (&x), 4);
6973     (void) memcpy((void *) (gc->pc + 28), (void *) (&y), 4);
6974     (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
6975     (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
6976     gc->pc += cmdlen;
6977     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6978         (void) __glXFlushRenderBuffer(gc, gc->pc);
6979     }
6980 }
6981
6982 #define X_GLrop_ActiveTextureARB 197
6983 void
6984 __indirect_glActiveTextureARB(GLenum texture)
6985 {
6986     struct glx_context *const gc = __glXGetCurrentContext();
6987     const GLuint cmdlen = 8;
6988     emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
6989     (void) memcpy((void *) (gc->pc + 4), (void *) (&texture), 4);
6990     gc->pc += cmdlen;
6991     if (__builtin_expect(gc->pc > gc->limit, 0)) {
6992         (void) __glXFlushRenderBuffer(gc, gc->pc);
6993     }
6994 }
6995
6996 #define X_GLrop_MultiTexCoord1dvARB 198
6997 void
6998 __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
6999 {
7000     struct glx_context *const gc = __glXGetCurrentContext();
7001     const GLuint cmdlen = 16;
7002     emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
7003     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7004     (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
7005     gc->pc += cmdlen;
7006     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7007         (void) __glXFlushRenderBuffer(gc, gc->pc);
7008     }
7009 }
7010
7011 #define X_GLrop_MultiTexCoord1dvARB 198
7012 void
7013 __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
7014 {
7015     struct glx_context *const gc = __glXGetCurrentContext();
7016     const GLuint cmdlen = 16;
7017     emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
7018     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 8);
7019     (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
7020     gc->pc += cmdlen;
7021     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7022         (void) __glXFlushRenderBuffer(gc, gc->pc);
7023     }
7024 }
7025
7026 #define X_GLrop_MultiTexCoord1fvARB 199
7027 void
7028 __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
7029 {
7030     struct glx_context *const gc = __glXGetCurrentContext();
7031     const GLuint cmdlen = 12;
7032     emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
7033     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7034     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7035     gc->pc += cmdlen;
7036     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7037         (void) __glXFlushRenderBuffer(gc, gc->pc);
7038     }
7039 }
7040
7041 #define X_GLrop_MultiTexCoord1fvARB 199
7042 void
7043 __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
7044 {
7045     struct glx_context *const gc = __glXGetCurrentContext();
7046     const GLuint cmdlen = 12;
7047     emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
7048     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7049     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7050     gc->pc += cmdlen;
7051     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7052         (void) __glXFlushRenderBuffer(gc, gc->pc);
7053     }
7054 }
7055
7056 #define X_GLrop_MultiTexCoord1ivARB 200
7057 void
7058 __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
7059 {
7060     struct glx_context *const gc = __glXGetCurrentContext();
7061     const GLuint cmdlen = 12;
7062     emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
7063     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7064     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7065     gc->pc += cmdlen;
7066     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7067         (void) __glXFlushRenderBuffer(gc, gc->pc);
7068     }
7069 }
7070
7071 #define X_GLrop_MultiTexCoord1ivARB 200
7072 void
7073 __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
7074 {
7075     struct glx_context *const gc = __glXGetCurrentContext();
7076     const GLuint cmdlen = 12;
7077     emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
7078     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7079     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7080     gc->pc += cmdlen;
7081     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7082         (void) __glXFlushRenderBuffer(gc, gc->pc);
7083     }
7084 }
7085
7086 #define X_GLrop_MultiTexCoord1svARB 201
7087 void
7088 __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
7089 {
7090     struct glx_context *const gc = __glXGetCurrentContext();
7091     const GLuint cmdlen = 12;
7092     emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7093     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7094     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7095     gc->pc += cmdlen;
7096     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7097         (void) __glXFlushRenderBuffer(gc, gc->pc);
7098     }
7099 }
7100
7101 #define X_GLrop_MultiTexCoord1svARB 201
7102 void
7103 __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
7104 {
7105     struct glx_context *const gc = __glXGetCurrentContext();
7106     const GLuint cmdlen = 12;
7107     emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7108     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7109     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7110     gc->pc += cmdlen;
7111     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7112         (void) __glXFlushRenderBuffer(gc, gc->pc);
7113     }
7114 }
7115
7116 #define X_GLrop_MultiTexCoord2dvARB 202
7117 void
7118 __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
7119 {
7120     struct glx_context *const gc = __glXGetCurrentContext();
7121     const GLuint cmdlen = 24;
7122     emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7123     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7124     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7125     (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
7126     gc->pc += cmdlen;
7127     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7128         (void) __glXFlushRenderBuffer(gc, gc->pc);
7129     }
7130 }
7131
7132 #define X_GLrop_MultiTexCoord2dvARB 202
7133 void
7134 __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
7135 {
7136     struct glx_context *const gc = __glXGetCurrentContext();
7137     const GLuint cmdlen = 24;
7138     emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7139     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 16);
7140     (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
7141     gc->pc += cmdlen;
7142     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7143         (void) __glXFlushRenderBuffer(gc, gc->pc);
7144     }
7145 }
7146
7147 #define X_GLrop_MultiTexCoord2fvARB 203
7148 void
7149 __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
7150 {
7151     struct glx_context *const gc = __glXGetCurrentContext();
7152     const GLuint cmdlen = 16;
7153     emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7154     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7155     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7156     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7157     gc->pc += cmdlen;
7158     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7159         (void) __glXFlushRenderBuffer(gc, gc->pc);
7160     }
7161 }
7162
7163 #define X_GLrop_MultiTexCoord2fvARB 203
7164 void
7165 __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
7166 {
7167     struct glx_context *const gc = __glXGetCurrentContext();
7168     const GLuint cmdlen = 16;
7169     emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7170     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7171     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7172     gc->pc += cmdlen;
7173     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7174         (void) __glXFlushRenderBuffer(gc, gc->pc);
7175     }
7176 }
7177
7178 #define X_GLrop_MultiTexCoord2ivARB 204
7179 void
7180 __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
7181 {
7182     struct glx_context *const gc = __glXGetCurrentContext();
7183     const GLuint cmdlen = 16;
7184     emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7185     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7186     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7187     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7188     gc->pc += cmdlen;
7189     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7190         (void) __glXFlushRenderBuffer(gc, gc->pc);
7191     }
7192 }
7193
7194 #define X_GLrop_MultiTexCoord2ivARB 204
7195 void
7196 __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
7197 {
7198     struct glx_context *const gc = __glXGetCurrentContext();
7199     const GLuint cmdlen = 16;
7200     emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7201     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7202     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7203     gc->pc += cmdlen;
7204     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7205         (void) __glXFlushRenderBuffer(gc, gc->pc);
7206     }
7207 }
7208
7209 #define X_GLrop_MultiTexCoord2svARB 205
7210 void
7211 __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
7212 {
7213     struct glx_context *const gc = __glXGetCurrentContext();
7214     const GLuint cmdlen = 12;
7215     emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7216     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7217     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7218     (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7219     gc->pc += cmdlen;
7220     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7221         (void) __glXFlushRenderBuffer(gc, gc->pc);
7222     }
7223 }
7224
7225 #define X_GLrop_MultiTexCoord2svARB 205
7226 void
7227 __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
7228 {
7229     struct glx_context *const gc = __glXGetCurrentContext();
7230     const GLuint cmdlen = 12;
7231     emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7232     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7233     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7234     gc->pc += cmdlen;
7235     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7236         (void) __glXFlushRenderBuffer(gc, gc->pc);
7237     }
7238 }
7239
7240 #define X_GLrop_MultiTexCoord3dvARB 206
7241 void
7242 __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t,
7243                                 GLdouble r)
7244 {
7245     struct glx_context *const gc = __glXGetCurrentContext();
7246     const GLuint cmdlen = 32;
7247     emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7248     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7249     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7250     (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7251     (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
7252     gc->pc += cmdlen;
7253     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7254         (void) __glXFlushRenderBuffer(gc, gc->pc);
7255     }
7256 }
7257
7258 #define X_GLrop_MultiTexCoord3dvARB 206
7259 void
7260 __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
7261 {
7262     struct glx_context *const gc = __glXGetCurrentContext();
7263     const GLuint cmdlen = 32;
7264     emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7265     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 24);
7266     (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
7267     gc->pc += cmdlen;
7268     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7269         (void) __glXFlushRenderBuffer(gc, gc->pc);
7270     }
7271 }
7272
7273 #define X_GLrop_MultiTexCoord3fvARB 207
7274 void
7275 __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t,
7276                                 GLfloat r)
7277 {
7278     struct glx_context *const gc = __glXGetCurrentContext();
7279     const GLuint cmdlen = 20;
7280     emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7281     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7282     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7283     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7284     (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7285     gc->pc += cmdlen;
7286     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7287         (void) __glXFlushRenderBuffer(gc, gc->pc);
7288     }
7289 }
7290
7291 #define X_GLrop_MultiTexCoord3fvARB 207
7292 void
7293 __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
7294 {
7295     struct glx_context *const gc = __glXGetCurrentContext();
7296     const GLuint cmdlen = 20;
7297     emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7298     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7299     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7300     gc->pc += cmdlen;
7301     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7302         (void) __glXFlushRenderBuffer(gc, gc->pc);
7303     }
7304 }
7305
7306 #define X_GLrop_MultiTexCoord3ivARB 208
7307 void
7308 __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
7309 {
7310     struct glx_context *const gc = __glXGetCurrentContext();
7311     const GLuint cmdlen = 20;
7312     emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7313     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7314     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7315     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7316     (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7317     gc->pc += cmdlen;
7318     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7319         (void) __glXFlushRenderBuffer(gc, gc->pc);
7320     }
7321 }
7322
7323 #define X_GLrop_MultiTexCoord3ivARB 208
7324 void
7325 __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
7326 {
7327     struct glx_context *const gc = __glXGetCurrentContext();
7328     const GLuint cmdlen = 20;
7329     emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7330     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7331     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7332     gc->pc += cmdlen;
7333     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7334         (void) __glXFlushRenderBuffer(gc, gc->pc);
7335     }
7336 }
7337
7338 #define X_GLrop_MultiTexCoord3svARB 209
7339 void
7340 __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t,
7341                                 GLshort r)
7342 {
7343     struct glx_context *const gc = __glXGetCurrentContext();
7344     const GLuint cmdlen = 16;
7345     emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7346     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7347     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7348     (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7349     (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7350     gc->pc += cmdlen;
7351     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7352         (void) __glXFlushRenderBuffer(gc, gc->pc);
7353     }
7354 }
7355
7356 #define X_GLrop_MultiTexCoord3svARB 209
7357 void
7358 __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
7359 {
7360     struct glx_context *const gc = __glXGetCurrentContext();
7361     const GLuint cmdlen = 16;
7362     emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7363     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7364     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
7365     gc->pc += cmdlen;
7366     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7367         (void) __glXFlushRenderBuffer(gc, gc->pc);
7368     }
7369 }
7370
7371 #define X_GLrop_MultiTexCoord4dvARB 210
7372 void
7373 __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t,
7374                                 GLdouble r, GLdouble q)
7375 {
7376     struct glx_context *const gc = __glXGetCurrentContext();
7377     const GLuint cmdlen = 40;
7378     emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7379     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7380     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7381     (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7382     (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
7383     (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7384     gc->pc += cmdlen;
7385     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7386         (void) __glXFlushRenderBuffer(gc, gc->pc);
7387     }
7388 }
7389
7390 #define X_GLrop_MultiTexCoord4dvARB 210
7391 void
7392 __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
7393 {
7394     struct glx_context *const gc = __glXGetCurrentContext();
7395     const GLuint cmdlen = 40;
7396     emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7397     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
7398     (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7399     gc->pc += cmdlen;
7400     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7401         (void) __glXFlushRenderBuffer(gc, gc->pc);
7402     }
7403 }
7404
7405 #define X_GLrop_MultiTexCoord4fvARB 211
7406 void
7407 __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t,
7408                                 GLfloat r, GLfloat q)
7409 {
7410     struct glx_context *const gc = __glXGetCurrentContext();
7411     const GLuint cmdlen = 24;
7412     emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7413     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7414     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7415     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7416     (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7417     (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
7418     gc->pc += cmdlen;
7419     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7420         (void) __glXFlushRenderBuffer(gc, gc->pc);
7421     }
7422 }
7423
7424 #define X_GLrop_MultiTexCoord4fvARB 211
7425 void
7426 __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
7427 {
7428     struct glx_context *const gc = __glXGetCurrentContext();
7429     const GLuint cmdlen = 24;
7430     emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7431     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7432     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7433     gc->pc += cmdlen;
7434     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7435         (void) __glXFlushRenderBuffer(gc, gc->pc);
7436     }
7437 }
7438
7439 #define X_GLrop_MultiTexCoord4ivARB 212
7440 void
7441 __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r,
7442                                 GLint q)
7443 {
7444     struct glx_context *const gc = __glXGetCurrentContext();
7445     const GLuint cmdlen = 24;
7446     emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7447     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7448     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7449     (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7450     (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7451     (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
7452     gc->pc += cmdlen;
7453     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7454         (void) __glXFlushRenderBuffer(gc, gc->pc);
7455     }
7456 }
7457
7458 #define X_GLrop_MultiTexCoord4ivARB 212
7459 void
7460 __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
7461 {
7462     struct glx_context *const gc = __glXGetCurrentContext();
7463     const GLuint cmdlen = 24;
7464     emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7465     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7466     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7467     gc->pc += cmdlen;
7468     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7469         (void) __glXFlushRenderBuffer(gc, gc->pc);
7470     }
7471 }
7472
7473 #define X_GLrop_MultiTexCoord4svARB 213
7474 void
7475 __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t,
7476                                 GLshort r, GLshort q)
7477 {
7478     struct glx_context *const gc = __glXGetCurrentContext();
7479     const GLuint cmdlen = 16;
7480     emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7481     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7482     (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7483     (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7484     (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7485     (void) memcpy((void *) (gc->pc + 14), (void *) (&q), 2);
7486     gc->pc += cmdlen;
7487     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7488         (void) __glXFlushRenderBuffer(gc, gc->pc);
7489     }
7490 }
7491
7492 #define X_GLrop_MultiTexCoord4svARB 213
7493 void
7494 __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
7495 {
7496     struct glx_context *const gc = __glXGetCurrentContext();
7497     const GLuint cmdlen = 16;
7498     emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7499     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7500     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7501     gc->pc += cmdlen;
7502     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7503         (void) __glXFlushRenderBuffer(gc, gc->pc);
7504     }
7505 }
7506
7507 #define X_GLrop_SampleCoverageARB 229
7508 void
7509 __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
7510 {
7511     struct glx_context *const gc = __glXGetCurrentContext();
7512     const GLuint cmdlen = 12;
7513     emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen);
7514     (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
7515     (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
7516     gc->pc += cmdlen;
7517     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7518         (void) __glXFlushRenderBuffer(gc, gc->pc);
7519     }
7520 }
7521
7522 #define X_GLvop_GetProgramStringARB 1308
7523 void
7524 __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
7525 {
7526     struct glx_context *const gc = __glXGetCurrentContext();
7527     Display *const dpy = gc->currentDpy;
7528     const GLuint cmdlen = 8;
7529     if (__builtin_expect(dpy != NULL, 1)) {
7530         GLubyte const *pc =
7531             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7532                                     X_GLvop_GetProgramStringARB, cmdlen);
7533         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7534         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7535         (void) __glXReadReply(dpy, 1, string, GL_TRUE);
7536         UnlockDisplay(dpy);
7537         SyncHandle();
7538     }
7539     return;
7540 }
7541
7542 #define X_GLvop_GetProgramivARB 1307
7543 void
7544 __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
7545 {
7546     struct glx_context *const gc = __glXGetCurrentContext();
7547     Display *const dpy = gc->currentDpy;
7548     const GLuint cmdlen = 8;
7549     if (__builtin_expect(dpy != NULL, 1)) {
7550         GLubyte const *pc =
7551             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7552                                     X_GLvop_GetProgramivARB, cmdlen);
7553         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7554         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7555         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7556         UnlockDisplay(dpy);
7557         SyncHandle();
7558     }
7559     return;
7560 }
7561
7562 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7563 void
7564 __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x,
7565                                       GLdouble y, GLdouble z, GLdouble w)
7566 {
7567     struct glx_context *const gc = __glXGetCurrentContext();
7568     const GLuint cmdlen = 44;
7569     emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7570     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7571     (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7572     (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7573     (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7574     (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7575     (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7576     gc->pc += cmdlen;
7577     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7578         (void) __glXFlushRenderBuffer(gc, gc->pc);
7579     }
7580 }
7581
7582 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7583 void
7584 __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index,
7585                                        const GLdouble * params)
7586 {
7587     struct glx_context *const gc = __glXGetCurrentContext();
7588     const GLuint cmdlen = 44;
7589     emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7590     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7591     (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7592     (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7593     gc->pc += cmdlen;
7594     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7595         (void) __glXFlushRenderBuffer(gc, gc->pc);
7596     }
7597 }
7598
7599 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7600 void
7601 __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x,
7602                                       GLfloat y, GLfloat z, GLfloat w)
7603 {
7604     struct glx_context *const gc = __glXGetCurrentContext();
7605     const GLuint cmdlen = 28;
7606     emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7607     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7608     (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7609     (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7610     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7611     (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7612     (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7613     gc->pc += cmdlen;
7614     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7615         (void) __glXFlushRenderBuffer(gc, gc->pc);
7616     }
7617 }
7618
7619 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7620 void
7621 __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index,
7622                                        const GLfloat * params)
7623 {
7624     struct glx_context *const gc = __glXGetCurrentContext();
7625     const GLuint cmdlen = 28;
7626     emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7627     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7628     (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7629     (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7630     gc->pc += cmdlen;
7631     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7632         (void) __glXFlushRenderBuffer(gc, gc->pc);
7633     }
7634 }
7635
7636 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7637 void
7638 __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index,
7639                                         GLdouble x, GLdouble y, GLdouble z,
7640                                         GLdouble w)
7641 {
7642     struct glx_context *const gc = __glXGetCurrentContext();
7643     const GLuint cmdlen = 44;
7644     emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7645     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7646     (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7647     (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7648     (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7649     (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7650     (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7651     gc->pc += cmdlen;
7652     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7653         (void) __glXFlushRenderBuffer(gc, gc->pc);
7654     }
7655 }
7656
7657 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7658 void
7659 __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index,
7660                                          const GLdouble * params)
7661 {
7662     struct glx_context *const gc = __glXGetCurrentContext();
7663     const GLuint cmdlen = 44;
7664     emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7665     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7666     (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7667     (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7668     gc->pc += cmdlen;
7669     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7670         (void) __glXFlushRenderBuffer(gc, gc->pc);
7671     }
7672 }
7673
7674 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7675 void
7676 __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index,
7677                                         GLfloat x, GLfloat y, GLfloat z,
7678                                         GLfloat w)
7679 {
7680     struct glx_context *const gc = __glXGetCurrentContext();
7681     const GLuint cmdlen = 28;
7682     emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7683     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7684     (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7685     (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7686     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7687     (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7688     (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7689     gc->pc += cmdlen;
7690     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7691         (void) __glXFlushRenderBuffer(gc, gc->pc);
7692     }
7693 }
7694
7695 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7696 void
7697 __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index,
7698                                          const GLfloat * params)
7699 {
7700     struct glx_context *const gc = __glXGetCurrentContext();
7701     const GLuint cmdlen = 28;
7702     emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7703     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7704     (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7705     (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7706     gc->pc += cmdlen;
7707     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7708         (void) __glXFlushRenderBuffer(gc, gc->pc);
7709     }
7710 }
7711
7712 #define X_GLrop_ProgramStringARB 4217
7713 void
7714 __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len,
7715                               const GLvoid * string)
7716 {
7717     struct glx_context *const gc = __glXGetCurrentContext();
7718     const GLuint cmdlen = 16 + __GLX_PAD(len);
7719     if (len < 0) {
7720         __glXSetError(gc, GL_INVALID_VALUE);
7721         return;
7722     }
7723     if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
7724         if (cmdlen <= gc->maxSmallRenderCommandSize) {
7725             if ((gc->pc + cmdlen) > gc->bufEnd) {
7726                 (void) __glXFlushRenderBuffer(gc, gc->pc);
7727             }
7728             emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
7729             (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7730             (void) memcpy((void *) (gc->pc + 8), (void *) (&format), 4);
7731             (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
7732             (void) memcpy((void *) (gc->pc + 16), (void *) (string), len);
7733             gc->pc += cmdlen;
7734             if (__builtin_expect(gc->pc > gc->limit, 0)) {
7735                 (void) __glXFlushRenderBuffer(gc, gc->pc);
7736             }
7737         } else {
7738             const GLint op = X_GLrop_ProgramStringARB;
7739             const GLuint cmdlenLarge = cmdlen + 4;
7740             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
7741             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
7742             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
7743             (void) memcpy((void *) (pc + 8), (void *) (&target), 4);
7744             (void) memcpy((void *) (pc + 12), (void *) (&format), 4);
7745             (void) memcpy((void *) (pc + 16), (void *) (&len), 4);
7746             __glXSendLargeCommand(gc, pc, 20, string, len);
7747         }
7748     }
7749 }
7750
7751 #define X_GLrop_VertexAttrib1dvARB 4197
7752 void
7753 __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
7754 {
7755     struct glx_context *const gc = __glXGetCurrentContext();
7756     const GLuint cmdlen = 16;
7757     emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7758     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7759     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7760     gc->pc += cmdlen;
7761     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7762         (void) __glXFlushRenderBuffer(gc, gc->pc);
7763     }
7764 }
7765
7766 #define X_GLrop_VertexAttrib1dvARB 4197
7767 void
7768 __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
7769 {
7770     struct glx_context *const gc = __glXGetCurrentContext();
7771     const GLuint cmdlen = 16;
7772     emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7773     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7774     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7775     gc->pc += cmdlen;
7776     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7777         (void) __glXFlushRenderBuffer(gc, gc->pc);
7778     }
7779 }
7780
7781 #define X_GLrop_VertexAttrib1fvARB 4193
7782 void
7783 __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
7784 {
7785     struct glx_context *const gc = __glXGetCurrentContext();
7786     const GLuint cmdlen = 12;
7787     emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7788     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7789     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7790     gc->pc += cmdlen;
7791     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7792         (void) __glXFlushRenderBuffer(gc, gc->pc);
7793     }
7794 }
7795
7796 #define X_GLrop_VertexAttrib1fvARB 4193
7797 void
7798 __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
7799 {
7800     struct glx_context *const gc = __glXGetCurrentContext();
7801     const GLuint cmdlen = 12;
7802     emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7803     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7804     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7805     gc->pc += cmdlen;
7806     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7807         (void) __glXFlushRenderBuffer(gc, gc->pc);
7808     }
7809 }
7810
7811 #define X_GLrop_VertexAttrib1svARB 4189
7812 void
7813 __indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
7814 {
7815     struct glx_context *const gc = __glXGetCurrentContext();
7816     const GLuint cmdlen = 12;
7817     emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7818     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7819     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7820     gc->pc += cmdlen;
7821     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7822         (void) __glXFlushRenderBuffer(gc, gc->pc);
7823     }
7824 }
7825
7826 #define X_GLrop_VertexAttrib1svARB 4189
7827 void
7828 __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
7829 {
7830     struct glx_context *const gc = __glXGetCurrentContext();
7831     const GLuint cmdlen = 12;
7832     emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7833     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7834     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7835     gc->pc += cmdlen;
7836     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7837         (void) __glXFlushRenderBuffer(gc, gc->pc);
7838     }
7839 }
7840
7841 #define X_GLrop_VertexAttrib2dvARB 4198
7842 void
7843 __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
7844 {
7845     struct glx_context *const gc = __glXGetCurrentContext();
7846     const GLuint cmdlen = 24;
7847     emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7848     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7849     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7850     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7851     gc->pc += cmdlen;
7852     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7853         (void) __glXFlushRenderBuffer(gc, gc->pc);
7854     }
7855 }
7856
7857 #define X_GLrop_VertexAttrib2dvARB 4198
7858 void
7859 __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
7860 {
7861     struct glx_context *const gc = __glXGetCurrentContext();
7862     const GLuint cmdlen = 24;
7863     emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7864     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7865     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7866     gc->pc += cmdlen;
7867     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7868         (void) __glXFlushRenderBuffer(gc, gc->pc);
7869     }
7870 }
7871
7872 #define X_GLrop_VertexAttrib2fvARB 4194
7873 void
7874 __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
7875 {
7876     struct glx_context *const gc = __glXGetCurrentContext();
7877     const GLuint cmdlen = 16;
7878     emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7879     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7880     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7881     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7882     gc->pc += cmdlen;
7883     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7884         (void) __glXFlushRenderBuffer(gc, gc->pc);
7885     }
7886 }
7887
7888 #define X_GLrop_VertexAttrib2fvARB 4194
7889 void
7890 __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
7891 {
7892     struct glx_context *const gc = __glXGetCurrentContext();
7893     const GLuint cmdlen = 16;
7894     emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7895     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7896     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7897     gc->pc += cmdlen;
7898     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7899         (void) __glXFlushRenderBuffer(gc, gc->pc);
7900     }
7901 }
7902
7903 #define X_GLrop_VertexAttrib2svARB 4190
7904 void
7905 __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
7906 {
7907     struct glx_context *const gc = __glXGetCurrentContext();
7908     const GLuint cmdlen = 12;
7909     emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7910     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7911     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7912     (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
7913     gc->pc += cmdlen;
7914     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7915         (void) __glXFlushRenderBuffer(gc, gc->pc);
7916     }
7917 }
7918
7919 #define X_GLrop_VertexAttrib2svARB 4190
7920 void
7921 __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
7922 {
7923     struct glx_context *const gc = __glXGetCurrentContext();
7924     const GLuint cmdlen = 12;
7925     emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7926     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7927     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7928     gc->pc += cmdlen;
7929     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7930         (void) __glXFlushRenderBuffer(gc, gc->pc);
7931     }
7932 }
7933
7934 #define X_GLrop_VertexAttrib3dvARB 4199
7935 void
7936 __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y,
7937                                GLdouble z)
7938 {
7939     struct glx_context *const gc = __glXGetCurrentContext();
7940     const GLuint cmdlen = 32;
7941     emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7942     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7943     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7944     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7945     (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
7946     gc->pc += cmdlen;
7947     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7948         (void) __glXFlushRenderBuffer(gc, gc->pc);
7949     }
7950 }
7951
7952 #define X_GLrop_VertexAttrib3dvARB 4199
7953 void
7954 __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
7955 {
7956     struct glx_context *const gc = __glXGetCurrentContext();
7957     const GLuint cmdlen = 32;
7958     emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7959     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7960     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
7961     gc->pc += cmdlen;
7962     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7963         (void) __glXFlushRenderBuffer(gc, gc->pc);
7964     }
7965 }
7966
7967 #define X_GLrop_VertexAttrib3fvARB 4195
7968 void
7969 __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
7970 {
7971     struct glx_context *const gc = __glXGetCurrentContext();
7972     const GLuint cmdlen = 20;
7973     emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7974     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7975     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7976     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7977     (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
7978     gc->pc += cmdlen;
7979     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7980         (void) __glXFlushRenderBuffer(gc, gc->pc);
7981     }
7982 }
7983
7984 #define X_GLrop_VertexAttrib3fvARB 4195
7985 void
7986 __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
7987 {
7988     struct glx_context *const gc = __glXGetCurrentContext();
7989     const GLuint cmdlen = 20;
7990     emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7991     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7992     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7993     gc->pc += cmdlen;
7994     if (__builtin_expect(gc->pc > gc->limit, 0)) {
7995         (void) __glXFlushRenderBuffer(gc, gc->pc);
7996     }
7997 }
7998
7999 #define X_GLrop_VertexAttrib3svARB 4191
8000 void
8001 __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
8002 {
8003     struct glx_context *const gc = __glXGetCurrentContext();
8004     const GLuint cmdlen = 16;
8005     emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
8006     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8007     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
8008     (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
8009     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
8010     gc->pc += cmdlen;
8011     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8012         (void) __glXFlushRenderBuffer(gc, gc->pc);
8013     }
8014 }
8015
8016 #define X_GLrop_VertexAttrib3svARB 4191
8017 void
8018 __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
8019 {
8020     struct glx_context *const gc = __glXGetCurrentContext();
8021     const GLuint cmdlen = 16;
8022     emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
8023     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8024     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
8025     gc->pc += cmdlen;
8026     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8027         (void) __glXFlushRenderBuffer(gc, gc->pc);
8028     }
8029 }
8030
8031 #define X_GLrop_VertexAttrib4NbvARB 4235
8032 void
8033 __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte *v)
8034 {
8035     struct glx_context *const gc = __glXGetCurrentContext();
8036     const GLuint cmdlen = 12;
8037     emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
8038     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8039     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8040     gc->pc += cmdlen;
8041     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8042         (void) __glXFlushRenderBuffer(gc, gc->pc);
8043     }
8044 }
8045
8046 #define X_GLrop_VertexAttrib4NivARB 4237
8047 void
8048 __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
8049 {
8050     struct glx_context *const gc = __glXGetCurrentContext();
8051     const GLuint cmdlen = 24;
8052     emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
8053     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8054     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8055     gc->pc += cmdlen;
8056     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8057         (void) __glXFlushRenderBuffer(gc, gc->pc);
8058     }
8059 }
8060
8061 #define X_GLrop_VertexAttrib4NsvARB 4236
8062 void
8063 __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
8064 {
8065     struct glx_context *const gc = __glXGetCurrentContext();
8066     const GLuint cmdlen = 16;
8067     emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
8068     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8069     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8070     gc->pc += cmdlen;
8071     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8072         (void) __glXFlushRenderBuffer(gc, gc->pc);
8073     }
8074 }
8075
8076 #define X_GLrop_VertexAttrib4NubvARB 4201
8077 void
8078 __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
8079                                  GLubyte z, GLubyte w)
8080 {
8081     struct glx_context *const gc = __glXGetCurrentContext();
8082     const GLuint cmdlen = 12;
8083     emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
8084     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8085     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
8086     (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
8087     (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
8088     (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
8089     gc->pc += cmdlen;
8090     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8091         (void) __glXFlushRenderBuffer(gc, gc->pc);
8092     }
8093 }
8094
8095 #define X_GLrop_VertexAttrib4NubvARB 4201
8096 void
8097 __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte *v)
8098 {
8099     struct glx_context *const gc = __glXGetCurrentContext();
8100     const GLuint cmdlen = 12;
8101     emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
8102     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8103     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8104     gc->pc += cmdlen;
8105     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8106         (void) __glXFlushRenderBuffer(gc, gc->pc);
8107     }
8108 }
8109
8110 #define X_GLrop_VertexAttrib4NuivARB 4239
8111 void
8112 __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
8113 {
8114     struct glx_context *const gc = __glXGetCurrentContext();
8115     const GLuint cmdlen = 24;
8116     emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
8117     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8118     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8119     gc->pc += cmdlen;
8120     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8121         (void) __glXFlushRenderBuffer(gc, gc->pc);
8122     }
8123 }
8124
8125 #define X_GLrop_VertexAttrib4NusvARB 4238
8126 void
8127 __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
8128 {
8129     struct glx_context *const gc = __glXGetCurrentContext();
8130     const GLuint cmdlen = 16;
8131     emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
8132     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8133     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8134     gc->pc += cmdlen;
8135     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8136         (void) __glXFlushRenderBuffer(gc, gc->pc);
8137     }
8138 }
8139
8140 #define X_GLrop_VertexAttrib4bvARB 4230
8141 void
8142 __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte *v)
8143 {
8144     struct glx_context *const gc = __glXGetCurrentContext();
8145     const GLuint cmdlen = 12;
8146     emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
8147     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8148     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8149     gc->pc += cmdlen;
8150     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8151         (void) __glXFlushRenderBuffer(gc, gc->pc);
8152     }
8153 }
8154
8155 #define X_GLrop_VertexAttrib4dvARB 4200
8156 void
8157 __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y,
8158                                GLdouble z, GLdouble w)
8159 {
8160     struct glx_context *const gc = __glXGetCurrentContext();
8161     const GLuint cmdlen = 40;
8162     emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8163     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8164     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
8165     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
8166     (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
8167     (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
8168     gc->pc += cmdlen;
8169     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8170         (void) __glXFlushRenderBuffer(gc, gc->pc);
8171     }
8172 }
8173
8174 #define X_GLrop_VertexAttrib4dvARB 4200
8175 void
8176 __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
8177 {
8178     struct glx_context *const gc = __glXGetCurrentContext();
8179     const GLuint cmdlen = 40;
8180     emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8181     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8182     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
8183     gc->pc += cmdlen;
8184     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8185         (void) __glXFlushRenderBuffer(gc, gc->pc);
8186     }
8187 }
8188
8189 #define X_GLrop_VertexAttrib4fvARB 4196
8190 void
8191 __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
8192                                GLfloat w)
8193 {
8194     struct glx_context *const gc = __glXGetCurrentContext();
8195     const GLuint cmdlen = 24;
8196     emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8197     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8198     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
8199     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
8200     (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
8201     (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
8202     gc->pc += cmdlen;
8203     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8204         (void) __glXFlushRenderBuffer(gc, gc->pc);
8205     }
8206 }
8207
8208 #define X_GLrop_VertexAttrib4fvARB 4196
8209 void
8210 __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
8211 {
8212     struct glx_context *const gc = __glXGetCurrentContext();
8213     const GLuint cmdlen = 24;
8214     emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8215     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8216     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8217     gc->pc += cmdlen;
8218     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8219         (void) __glXFlushRenderBuffer(gc, gc->pc);
8220     }
8221 }
8222
8223 #define X_GLrop_VertexAttrib4ivARB 4231
8224 void
8225 __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
8226 {
8227     struct glx_context *const gc = __glXGetCurrentContext();
8228     const GLuint cmdlen = 24;
8229     emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
8230     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8231     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8232     gc->pc += cmdlen;
8233     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8234         (void) __glXFlushRenderBuffer(gc, gc->pc);
8235     }
8236 }
8237
8238 #define X_GLrop_VertexAttrib4svARB 4192
8239 void
8240 __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z,
8241                                GLshort w)
8242 {
8243     struct glx_context *const gc = __glXGetCurrentContext();
8244     const GLuint cmdlen = 16;
8245     emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8246     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8247     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
8248     (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
8249     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
8250     (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
8251     gc->pc += cmdlen;
8252     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8253         (void) __glXFlushRenderBuffer(gc, gc->pc);
8254     }
8255 }
8256
8257 #define X_GLrop_VertexAttrib4svARB 4192
8258 void
8259 __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
8260 {
8261     struct glx_context *const gc = __glXGetCurrentContext();
8262     const GLuint cmdlen = 16;
8263     emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8264     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8265     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8266     gc->pc += cmdlen;
8267     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8268         (void) __glXFlushRenderBuffer(gc, gc->pc);
8269     }
8270 }
8271
8272 #define X_GLrop_VertexAttrib4ubvARB 4232
8273 void
8274 __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte *v)
8275 {
8276     struct glx_context *const gc = __glXGetCurrentContext();
8277     const GLuint cmdlen = 12;
8278     emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
8279     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8280     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8281     gc->pc += cmdlen;
8282     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8283         (void) __glXFlushRenderBuffer(gc, gc->pc);
8284     }
8285 }
8286
8287 #define X_GLrop_VertexAttrib4uivARB 4234
8288 void
8289 __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
8290 {
8291     struct glx_context *const gc = __glXGetCurrentContext();
8292     const GLuint cmdlen = 24;
8293     emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
8294     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8295     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8296     gc->pc += cmdlen;
8297     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8298         (void) __glXFlushRenderBuffer(gc, gc->pc);
8299     }
8300 }
8301
8302 #define X_GLrop_VertexAttrib4usvARB 4233
8303 void
8304 __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
8305 {
8306     struct glx_context *const gc = __glXGetCurrentContext();
8307     const GLuint cmdlen = 16;
8308     emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
8309     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8310     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8311     gc->pc += cmdlen;
8312     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8313         (void) __glXFlushRenderBuffer(gc, gc->pc);
8314     }
8315 }
8316
8317 #define X_GLrop_BeginQueryARB 231
8318 void
8319 __indirect_glBeginQueryARB(GLenum target, GLuint id)
8320 {
8321     struct glx_context *const gc = __glXGetCurrentContext();
8322     const GLuint cmdlen = 12;
8323     emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
8324     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8325     (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
8326     gc->pc += cmdlen;
8327     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8328         (void) __glXFlushRenderBuffer(gc, gc->pc);
8329     }
8330 }
8331
8332 #define X_GLsop_DeleteQueriesARB 161
8333 void
8334 __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
8335 {
8336     struct glx_context *const gc = __glXGetCurrentContext();
8337     Display *const dpy = gc->currentDpy;
8338 #ifndef USE_XCB
8339     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8340 #endif
8341     if (n < 0) {
8342         __glXSetError(gc, GL_INVALID_VALUE);
8343         return;
8344     }
8345     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8346 #ifdef USE_XCB
8347         xcb_connection_t *c = XGetXCBConnection(dpy);
8348         (void) __glXFlushRenderBuffer(gc, gc->pc);
8349         xcb_glx_delete_queries_arb(c, gc->currentContextTag, n, ids);
8350 #else
8351         GLubyte const *pc =
8352             __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
8353         (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8354         (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8355         UnlockDisplay(dpy);
8356         SyncHandle();
8357 #endif /* USE_XCB */
8358     }
8359     return;
8360 }
8361
8362 #define X_GLrop_EndQueryARB 232
8363 void
8364 __indirect_glEndQueryARB(GLenum target)
8365 {
8366     struct glx_context *const gc = __glXGetCurrentContext();
8367     const GLuint cmdlen = 8;
8368     emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
8369     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8370     gc->pc += cmdlen;
8371     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8372         (void) __glXFlushRenderBuffer(gc, gc->pc);
8373     }
8374 }
8375
8376 #define X_GLsop_GenQueriesARB 162
8377 void
8378 __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
8379 {
8380     struct glx_context *const gc = __glXGetCurrentContext();
8381     Display *const dpy = gc->currentDpy;
8382 #ifndef USE_XCB
8383     const GLuint cmdlen = 4;
8384 #endif
8385     if (n < 0) {
8386         __glXSetError(gc, GL_INVALID_VALUE);
8387         return;
8388     }
8389     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8390 #ifdef USE_XCB
8391         xcb_connection_t *c = XGetXCBConnection(dpy);
8392         (void) __glXFlushRenderBuffer(gc, gc->pc);
8393         xcb_glx_gen_queries_arb_reply_t *reply =
8394             xcb_glx_gen_queries_arb_reply(c,
8395                                           xcb_glx_gen_queries_arb(c,
8396                                                                   gc->
8397                                                                   currentContextTag,
8398                                                                   n), NULL);
8399         (void) memcpy(ids, xcb_glx_gen_queries_arb_data(reply),
8400                       xcb_glx_gen_queries_arb_data_length(reply) *
8401                       sizeof(GLuint));
8402         free(reply);
8403 #else
8404         GLubyte const *pc =
8405             __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
8406         (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8407         (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
8408         UnlockDisplay(dpy);
8409         SyncHandle();
8410 #endif /* USE_XCB */
8411     }
8412     return;
8413 }
8414
8415 #define X_GLsop_GetQueryObjectivARB 165
8416 void
8417 __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
8418 {
8419     struct glx_context *const gc = __glXGetCurrentContext();
8420     Display *const dpy = gc->currentDpy;
8421 #ifndef USE_XCB
8422     const GLuint cmdlen = 8;
8423 #endif
8424     if (__builtin_expect(dpy != NULL, 1)) {
8425 #ifdef USE_XCB
8426         xcb_connection_t *c = XGetXCBConnection(dpy);
8427         (void) __glXFlushRenderBuffer(gc, gc->pc);
8428         xcb_glx_get_query_objectiv_arb_reply_t *reply =
8429             xcb_glx_get_query_objectiv_arb_reply(c,
8430                                                  xcb_glx_get_query_objectiv_arb
8431                                                  (c, gc->currentContextTag,
8432                                                   id, pname), NULL);
8433         if (xcb_glx_get_query_objectiv_arb_data_length(reply) == 0)
8434             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8435         else
8436             (void) memcpy(params, xcb_glx_get_query_objectiv_arb_data(reply),
8437                           xcb_glx_get_query_objectiv_arb_data_length(reply) *
8438                           sizeof(GLint));
8439         free(reply);
8440 #else
8441         GLubyte const *pc =
8442             __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
8443         (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8444         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8445         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8446         UnlockDisplay(dpy);
8447         SyncHandle();
8448 #endif /* USE_XCB */
8449     }
8450     return;
8451 }
8452
8453 #define X_GLsop_GetQueryObjectuivARB 166
8454 void
8455 __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
8456 {
8457     struct glx_context *const gc = __glXGetCurrentContext();
8458     Display *const dpy = gc->currentDpy;
8459 #ifndef USE_XCB
8460     const GLuint cmdlen = 8;
8461 #endif
8462     if (__builtin_expect(dpy != NULL, 1)) {
8463 #ifdef USE_XCB
8464         xcb_connection_t *c = XGetXCBConnection(dpy);
8465         (void) __glXFlushRenderBuffer(gc, gc->pc);
8466         xcb_glx_get_query_objectuiv_arb_reply_t *reply =
8467             xcb_glx_get_query_objectuiv_arb_reply(c,
8468                                                   xcb_glx_get_query_objectuiv_arb
8469                                                   (c, gc->currentContextTag,
8470                                                    id, pname), NULL);
8471         if (xcb_glx_get_query_objectuiv_arb_data_length(reply) == 0)
8472             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8473         else
8474             (void) memcpy(params, xcb_glx_get_query_objectuiv_arb_data(reply),
8475                           xcb_glx_get_query_objectuiv_arb_data_length(reply) *
8476                           sizeof(GLuint));
8477         free(reply);
8478 #else
8479         GLubyte const *pc =
8480             __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
8481         (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8482         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8483         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8484         UnlockDisplay(dpy);
8485         SyncHandle();
8486 #endif /* USE_XCB */
8487     }
8488     return;
8489 }
8490
8491 #define X_GLsop_GetQueryivARB 164
8492 void
8493 __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
8494 {
8495     struct glx_context *const gc = __glXGetCurrentContext();
8496     Display *const dpy = gc->currentDpy;
8497 #ifndef USE_XCB
8498     const GLuint cmdlen = 8;
8499 #endif
8500     if (__builtin_expect(dpy != NULL, 1)) {
8501 #ifdef USE_XCB
8502         xcb_connection_t *c = XGetXCBConnection(dpy);
8503         (void) __glXFlushRenderBuffer(gc, gc->pc);
8504         xcb_glx_get_queryiv_arb_reply_t *reply =
8505             xcb_glx_get_queryiv_arb_reply(c,
8506                                           xcb_glx_get_queryiv_arb(c,
8507                                                                   gc->
8508                                                                   currentContextTag,
8509                                                                   target,
8510                                                                   pname),
8511                                           NULL);
8512         if (xcb_glx_get_queryiv_arb_data_length(reply) == 0)
8513             (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8514         else
8515             (void) memcpy(params, xcb_glx_get_queryiv_arb_data(reply),
8516                           xcb_glx_get_queryiv_arb_data_length(reply) *
8517                           sizeof(GLint));
8518         free(reply);
8519 #else
8520         GLubyte const *pc =
8521             __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
8522         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8523         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8524         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8525         UnlockDisplay(dpy);
8526         SyncHandle();
8527 #endif /* USE_XCB */
8528     }
8529     return;
8530 }
8531
8532 #define X_GLsop_IsQueryARB 163
8533 GLboolean
8534 __indirect_glIsQueryARB(GLuint id)
8535 {
8536     struct glx_context *const gc = __glXGetCurrentContext();
8537     Display *const dpy = gc->currentDpy;
8538     GLboolean retval = (GLboolean) 0;
8539 #ifndef USE_XCB
8540     const GLuint cmdlen = 4;
8541 #endif
8542     if (__builtin_expect(dpy != NULL, 1)) {
8543 #ifdef USE_XCB
8544         xcb_connection_t *c = XGetXCBConnection(dpy);
8545         (void) __glXFlushRenderBuffer(gc, gc->pc);
8546         xcb_glx_is_query_arb_reply_t *reply =
8547             xcb_glx_is_query_arb_reply(c,
8548                                        xcb_glx_is_query_arb(c,
8549                                                             gc->
8550                                                             currentContextTag,
8551                                                             id), NULL);
8552         retval = reply->ret_val;
8553         free(reply);
8554 #else
8555         GLubyte const *pc =
8556             __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
8557         (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8558         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8559         UnlockDisplay(dpy);
8560         SyncHandle();
8561 #endif /* USE_XCB */
8562     }
8563     return retval;
8564 }
8565
8566 #define X_GLrop_DrawBuffersARB 233
8567 void
8568 __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
8569 {
8570     struct glx_context *const gc = __glXGetCurrentContext();
8571     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8572     if (n < 0) {
8573         __glXSetError(gc, GL_INVALID_VALUE);
8574         return;
8575     }
8576     if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
8577         if (cmdlen <= gc->maxSmallRenderCommandSize) {
8578             if ((gc->pc + cmdlen) > gc->bufEnd) {
8579                 (void) __glXFlushRenderBuffer(gc, gc->pc);
8580             }
8581             emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
8582             (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
8583             (void) memcpy((void *) (gc->pc + 8), (void *) (bufs), (n * 4));
8584             gc->pc += cmdlen;
8585             if (__builtin_expect(gc->pc > gc->limit, 0)) {
8586                 (void) __glXFlushRenderBuffer(gc, gc->pc);
8587             }
8588         } else {
8589             const GLint op = X_GLrop_DrawBuffersARB;
8590             const GLuint cmdlenLarge = cmdlen + 4;
8591             GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
8592             (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
8593             (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
8594             (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
8595             __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
8596         }
8597     }
8598 }
8599
8600 #define X_GLrop_ClampColorARB 234
8601 void
8602 __indirect_glClampColorARB(GLenum target, GLenum clamp)
8603 {
8604     struct glx_context *const gc = __glXGetCurrentContext();
8605     const GLuint cmdlen = 12;
8606     emit_header(gc->pc, X_GLrop_ClampColorARB, cmdlen);
8607     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8608     (void) memcpy((void *) (gc->pc + 8), (void *) (&clamp), 4);
8609     gc->pc += cmdlen;
8610     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8611         (void) __glXFlushRenderBuffer(gc, gc->pc);
8612     }
8613 }
8614
8615 #define X_GLrop_RenderbufferStorageMultisample 4331
8616 void
8617 __indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples,
8618                                             GLenum internalformat,
8619                                             GLsizei width, GLsizei height)
8620 {
8621     struct glx_context *const gc = __glXGetCurrentContext();
8622     const GLuint cmdlen = 24;
8623     emit_header(gc->pc, X_GLrop_RenderbufferStorageMultisample, cmdlen);
8624     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8625     (void) memcpy((void *) (gc->pc + 8), (void *) (&samples), 4);
8626     (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
8627     (void) memcpy((void *) (gc->pc + 16), (void *) (&width), 4);
8628     (void) memcpy((void *) (gc->pc + 20), (void *) (&height), 4);
8629     gc->pc += cmdlen;
8630     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8631         (void) __glXFlushRenderBuffer(gc, gc->pc);
8632     }
8633 }
8634
8635 #define X_GLrop_SampleMaskSGIS 2048
8636 void
8637 __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
8638 {
8639     struct glx_context *const gc = __glXGetCurrentContext();
8640     const GLuint cmdlen = 12;
8641     emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
8642     (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
8643     (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
8644     gc->pc += cmdlen;
8645     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8646         (void) __glXFlushRenderBuffer(gc, gc->pc);
8647     }
8648 }
8649
8650 #define X_GLrop_SamplePatternSGIS 2049
8651 void
8652 __indirect_glSamplePatternSGIS(GLenum pattern)
8653 {
8654     struct glx_context *const gc = __glXGetCurrentContext();
8655     const GLuint cmdlen = 8;
8656     emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
8657     (void) memcpy((void *) (gc->pc + 4), (void *) (&pattern), 4);
8658     gc->pc += cmdlen;
8659     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8660         (void) __glXFlushRenderBuffer(gc, gc->pc);
8661     }
8662 }
8663
8664 #define X_GLrop_PointParameterfEXT 2065
8665 void
8666 __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
8667 {
8668     struct glx_context *const gc = __glXGetCurrentContext();
8669     const GLuint cmdlen = 12;
8670     emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
8671     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8672     (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
8673     gc->pc += cmdlen;
8674     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8675         (void) __glXFlushRenderBuffer(gc, gc->pc);
8676     }
8677 }
8678
8679 #define X_GLrop_PointParameterfvEXT 2066
8680 void
8681 __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
8682 {
8683     struct glx_context *const gc = __glXGetCurrentContext();
8684     const GLuint compsize = __glPointParameterfvEXT_size(pname);
8685     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
8686     emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
8687     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8688     (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
8689     gc->pc += cmdlen;
8690     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8691         (void) __glXFlushRenderBuffer(gc, gc->pc);
8692     }
8693 }
8694
8695 #define X_GLrop_SecondaryColor3bvEXT 4126
8696 void
8697 __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
8698 {
8699     struct glx_context *const gc = __glXGetCurrentContext();
8700     const GLuint cmdlen = 8;
8701     emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
8702     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8703     (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8704     (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8705     gc->pc += cmdlen;
8706     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8707         (void) __glXFlushRenderBuffer(gc, gc->pc);
8708     }
8709 }
8710
8711 #define X_GLrop_SecondaryColor3bvEXT 4126
8712 void
8713 __indirect_glSecondaryColor3bvEXT(const GLbyte *v)
8714 {
8715     generic_3_byte(X_GLrop_SecondaryColor3bvEXT, v);
8716 }
8717
8718 #define X_GLrop_SecondaryColor3dvEXT 4130
8719 void
8720 __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
8721 {
8722     struct glx_context *const gc = __glXGetCurrentContext();
8723     const GLuint cmdlen = 28;
8724     emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
8725     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
8726     (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
8727     (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
8728     gc->pc += cmdlen;
8729     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8730         (void) __glXFlushRenderBuffer(gc, gc->pc);
8731     }
8732 }
8733
8734 #define X_GLrop_SecondaryColor3dvEXT 4130
8735 void
8736 __indirect_glSecondaryColor3dvEXT(const GLdouble * v)
8737 {
8738     generic_24_byte(X_GLrop_SecondaryColor3dvEXT, v);
8739 }
8740
8741 #define X_GLrop_SecondaryColor3fvEXT 4129
8742 void
8743 __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
8744 {
8745     struct glx_context *const gc = __glXGetCurrentContext();
8746     const GLuint cmdlen = 16;
8747     emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
8748     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8749     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8750     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8751     gc->pc += cmdlen;
8752     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8753         (void) __glXFlushRenderBuffer(gc, gc->pc);
8754     }
8755 }
8756
8757 #define X_GLrop_SecondaryColor3fvEXT 4129
8758 void
8759 __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
8760 {
8761     generic_12_byte(X_GLrop_SecondaryColor3fvEXT, v);
8762 }
8763
8764 #define X_GLrop_SecondaryColor3ivEXT 4128
8765 void
8766 __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
8767 {
8768     struct glx_context *const gc = __glXGetCurrentContext();
8769     const GLuint cmdlen = 16;
8770     emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
8771     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8772     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8773     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8774     gc->pc += cmdlen;
8775     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8776         (void) __glXFlushRenderBuffer(gc, gc->pc);
8777     }
8778 }
8779
8780 #define X_GLrop_SecondaryColor3ivEXT 4128
8781 void
8782 __indirect_glSecondaryColor3ivEXT(const GLint * v)
8783 {
8784     generic_12_byte(X_GLrop_SecondaryColor3ivEXT, v);
8785 }
8786
8787 #define X_GLrop_SecondaryColor3svEXT 4127
8788 void
8789 __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
8790 {
8791     struct glx_context *const gc = __glXGetCurrentContext();
8792     const GLuint cmdlen = 12;
8793     emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
8794     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8795     (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8796     (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8797     gc->pc += cmdlen;
8798     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8799         (void) __glXFlushRenderBuffer(gc, gc->pc);
8800     }
8801 }
8802
8803 #define X_GLrop_SecondaryColor3svEXT 4127
8804 void
8805 __indirect_glSecondaryColor3svEXT(const GLshort * v)
8806 {
8807     generic_6_byte(X_GLrop_SecondaryColor3svEXT, v);
8808 }
8809
8810 #define X_GLrop_SecondaryColor3ubvEXT 4131
8811 void
8812 __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
8813 {
8814     struct glx_context *const gc = __glXGetCurrentContext();
8815     const GLuint cmdlen = 8;
8816     emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
8817     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8818     (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8819     (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8820     gc->pc += cmdlen;
8821     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8822         (void) __glXFlushRenderBuffer(gc, gc->pc);
8823     }
8824 }
8825
8826 #define X_GLrop_SecondaryColor3ubvEXT 4131
8827 void
8828 __indirect_glSecondaryColor3ubvEXT(const GLubyte *v)
8829 {
8830     generic_3_byte(X_GLrop_SecondaryColor3ubvEXT, v);
8831 }
8832
8833 #define X_GLrop_SecondaryColor3uivEXT 4133
8834 void
8835 __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
8836 {
8837     struct glx_context *const gc = __glXGetCurrentContext();
8838     const GLuint cmdlen = 16;
8839     emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
8840     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8841     (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8842     (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8843     gc->pc += cmdlen;
8844     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8845         (void) __glXFlushRenderBuffer(gc, gc->pc);
8846     }
8847 }
8848
8849 #define X_GLrop_SecondaryColor3uivEXT 4133
8850 void
8851 __indirect_glSecondaryColor3uivEXT(const GLuint * v)
8852 {
8853     generic_12_byte(X_GLrop_SecondaryColor3uivEXT, v);
8854 }
8855
8856 #define X_GLrop_SecondaryColor3usvEXT 4132
8857 void
8858 __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
8859 {
8860     struct glx_context *const gc = __glXGetCurrentContext();
8861     const GLuint cmdlen = 12;
8862     emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
8863     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8864     (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8865     (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8866     gc->pc += cmdlen;
8867     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8868         (void) __glXFlushRenderBuffer(gc, gc->pc);
8869     }
8870 }
8871
8872 #define X_GLrop_SecondaryColor3usvEXT 4132
8873 void
8874 __indirect_glSecondaryColor3usvEXT(const GLushort * v)
8875 {
8876     generic_6_byte(X_GLrop_SecondaryColor3usvEXT, v);
8877 }
8878
8879 #define X_GLrop_FogCoorddvEXT 4125
8880 void
8881 __indirect_glFogCoorddEXT(GLdouble coord)
8882 {
8883     struct glx_context *const gc = __glXGetCurrentContext();
8884     const GLuint cmdlen = 12;
8885     emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
8886     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 8);
8887     gc->pc += cmdlen;
8888     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8889         (void) __glXFlushRenderBuffer(gc, gc->pc);
8890     }
8891 }
8892
8893 #define X_GLrop_FogCoorddvEXT 4125
8894 void
8895 __indirect_glFogCoorddvEXT(const GLdouble * coord)
8896 {
8897     generic_8_byte(X_GLrop_FogCoorddvEXT, coord);
8898 }
8899
8900 #define X_GLrop_FogCoordfvEXT 4124
8901 void
8902 __indirect_glFogCoordfEXT(GLfloat coord)
8903 {
8904     struct glx_context *const gc = __glXGetCurrentContext();
8905     const GLuint cmdlen = 8;
8906     emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
8907     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
8908     gc->pc += cmdlen;
8909     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8910         (void) __glXFlushRenderBuffer(gc, gc->pc);
8911     }
8912 }
8913
8914 #define X_GLrop_FogCoordfvEXT 4124
8915 void
8916 __indirect_glFogCoordfvEXT(const GLfloat * coord)
8917 {
8918     generic_4_byte(X_GLrop_FogCoordfvEXT, coord);
8919 }
8920
8921 #define X_GLrop_BlendFuncSeparateEXT 4134
8922 void
8923 __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
8924                                   GLenum sfactorAlpha, GLenum dfactorAlpha)
8925 {
8926     struct glx_context *const gc = __glXGetCurrentContext();
8927     const GLuint cmdlen = 20;
8928     emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
8929     (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactorRGB), 4);
8930     (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactorRGB), 4);
8931     (void) memcpy((void *) (gc->pc + 12), (void *) (&sfactorAlpha), 4);
8932     (void) memcpy((void *) (gc->pc + 16), (void *) (&dfactorAlpha), 4);
8933     gc->pc += cmdlen;
8934     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8935         (void) __glXFlushRenderBuffer(gc, gc->pc);
8936     }
8937 }
8938
8939 #define X_GLrop_WindowPos3fvMESA 230
8940 void
8941 __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
8942 {
8943     struct glx_context *const gc = __glXGetCurrentContext();
8944     const GLuint cmdlen = 16;
8945     emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
8946     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
8947     (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
8948     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
8949     gc->pc += cmdlen;
8950     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8951         (void) __glXFlushRenderBuffer(gc, gc->pc);
8952     }
8953 }
8954
8955 #define X_GLrop_WindowPos3fvMESA 230
8956 void
8957 __indirect_glWindowPos3fvMESA(const GLfloat * v)
8958 {
8959     generic_12_byte(X_GLrop_WindowPos3fvMESA, v);
8960 }
8961
8962 #define X_GLvop_AreProgramsResidentNV 1293
8963 GLboolean
8964 __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids,
8965                                    GLboolean * residences)
8966 {
8967     struct glx_context *const gc = __glXGetCurrentContext();
8968     Display *const dpy = gc->currentDpy;
8969     GLboolean retval = (GLboolean) 0;
8970     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8971     if (n < 0) {
8972         __glXSetError(gc, GL_INVALID_VALUE);
8973         return 0;
8974     }
8975     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8976         GLubyte const *pc =
8977             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8978                                     X_GLvop_AreProgramsResidentNV, cmdlen);
8979         (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8980         (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8981         retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
8982         UnlockDisplay(dpy);
8983         SyncHandle();
8984     }
8985     return retval;
8986 }
8987
8988 #define X_GLrop_BindProgramNV 4180
8989 void
8990 __indirect_glBindProgramNV(GLenum target, GLuint program)
8991 {
8992     struct glx_context *const gc = __glXGetCurrentContext();
8993     const GLuint cmdlen = 12;
8994     emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
8995     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8996     (void) memcpy((void *) (gc->pc + 8), (void *) (&program), 4);
8997     gc->pc += cmdlen;
8998     if (__builtin_expect(gc->pc > gc->limit, 0)) {
8999         (void) __glXFlushRenderBuffer(gc, gc->pc);
9000     }
9001 }
9002
9003 #define X_GLvop_DeleteProgramsNV 1294
9004 void
9005 __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
9006 {
9007     struct glx_context *const gc = __glXGetCurrentContext();
9008     Display *const dpy = gc->currentDpy;
9009     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
9010     if (n < 0) {
9011         __glXSetError(gc, GL_INVALID_VALUE);
9012         return;
9013     }
9014     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
9015         GLubyte const *pc =
9016             __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
9017                                     X_GLvop_DeleteProgramsNV, cmdlen);
9018         (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
9019         (void) memcpy((void *) (pc + 4), (void *) (programs), (n * 4));
9020         UnlockDisplay(dpy);
9021         SyncHandle();
9022     }
9023     return;
9024 }
9025
9026 #define X_GLrop_ExecuteProgramNV 4181
9027 void
9028 __indirect_glExecuteProgramNV(GLenum target, GLuint id,
9029                               const GLfloat * params)
9030 {
9031     struct glx_context *const gc = __glXGetCurrentContext();
9032     const GLuint cmdlen = 28;
9033     emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
9034     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9035     (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
9036     (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
9037     gc->pc += cmdlen;
9038     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9039         (void) __glXFlushRenderBuffer(gc, gc->pc);
9040     }
9041 }
9042
9043 #define X_GLvop_GenProgramsNV 1295
9044 void
9045 __indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
9046 {
9047     struct glx_context *const gc = __glXGetCurrentContext();
9048     Display *const dpy = gc->currentDpy;
9049     const GLuint cmdlen = 4;
9050     if (n < 0) {
9051         __glXSetError(gc, GL_INVALID_VALUE);
9052         return;
9053     }
9054     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
9055         GLubyte const *pc =
9056             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9057                                     X_GLvop_GenProgramsNV, cmdlen);
9058         (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
9059         (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
9060         UnlockDisplay(dpy);
9061         SyncHandle();
9062     }
9063     return;
9064 }
9065
9066 #define X_GLvop_GetProgramParameterdvNV 1297
9067 void
9068 __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index,
9069                                      GLenum pname, GLdouble * params)
9070 {
9071     struct glx_context *const gc = __glXGetCurrentContext();
9072     Display *const dpy = gc->currentDpy;
9073     const GLuint cmdlen = 12;
9074     if (__builtin_expect(dpy != NULL, 1)) {
9075         GLubyte const *pc =
9076             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9077                                     X_GLvop_GetProgramParameterdvNV, cmdlen);
9078         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9079         (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
9080         (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9081         (void) __glXReadReply(dpy, 8, params, GL_FALSE);
9082         UnlockDisplay(dpy);
9083         SyncHandle();
9084     }
9085     return;
9086 }
9087
9088 #define X_GLvop_GetProgramParameterfvNV 1296
9089 void
9090 __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
9091                                      GLenum pname, GLfloat * params)
9092 {
9093     struct glx_context *const gc = __glXGetCurrentContext();
9094     Display *const dpy = gc->currentDpy;
9095     const GLuint cmdlen = 12;
9096     if (__builtin_expect(dpy != NULL, 1)) {
9097         GLubyte const *pc =
9098             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9099                                     X_GLvop_GetProgramParameterfvNV, cmdlen);
9100         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9101         (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
9102         (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9103         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9104         UnlockDisplay(dpy);
9105         SyncHandle();
9106     }
9107     return;
9108 }
9109
9110 #define X_GLvop_GetProgramStringNV 1299
9111 void
9112 __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
9113 {
9114     struct glx_context *const gc = __glXGetCurrentContext();
9115     Display *const dpy = gc->currentDpy;
9116     const GLuint cmdlen = 8;
9117     if (__builtin_expect(dpy != NULL, 1)) {
9118         GLubyte const *pc =
9119             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9120                                     X_GLvop_GetProgramStringNV, cmdlen);
9121         (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9122         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9123         (void) __glXReadReply(dpy, 1, program, GL_TRUE);
9124         UnlockDisplay(dpy);
9125         SyncHandle();
9126     }
9127     return;
9128 }
9129
9130 #define X_GLvop_GetProgramivNV 1298
9131 void
9132 __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
9133 {
9134     struct glx_context *const gc = __glXGetCurrentContext();
9135     Display *const dpy = gc->currentDpy;
9136     const GLuint cmdlen = 8;
9137     if (__builtin_expect(dpy != NULL, 1)) {
9138         GLubyte const *pc =
9139             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9140                                     X_GLvop_GetProgramivNV, cmdlen);
9141         (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9142         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9143         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9144         UnlockDisplay(dpy);
9145         SyncHandle();
9146     }
9147     return;
9148 }
9149
9150 #define X_GLvop_GetTrackMatrixivNV 1300
9151 void
9152 __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname,
9153                                 GLint * params)
9154 {
9155     struct glx_context *const gc = __glXGetCurrentContext();
9156     Display *const dpy = gc->currentDpy;
9157     const GLuint cmdlen = 12;
9158     if (__builtin_expect(dpy != NULL, 1)) {
9159         GLubyte const *pc =
9160             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9161                                     X_GLvop_GetTrackMatrixivNV, cmdlen);
9162         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9163         (void) memcpy((void *) (pc + 4), (void *) (&address), 4);
9164         (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9165         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9166         UnlockDisplay(dpy);
9167         SyncHandle();
9168     }
9169     return;
9170 }
9171
9172 #define X_GLvop_GetVertexAttribdvNV 1301
9173 void
9174 __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname,
9175                                  GLdouble * params)
9176 {
9177     struct glx_context *const gc = __glXGetCurrentContext();
9178     Display *const dpy = gc->currentDpy;
9179     const GLuint cmdlen = 8;
9180     if (__builtin_expect(dpy != NULL, 1)) {
9181         GLubyte const *pc =
9182             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9183                                     X_GLvop_GetVertexAttribdvNV, cmdlen);
9184         (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9185         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9186         (void) __glXReadReply(dpy, 8, params, GL_FALSE);
9187         UnlockDisplay(dpy);
9188         SyncHandle();
9189     }
9190     return;
9191 }
9192
9193 #define X_GLvop_GetVertexAttribfvNV 1302
9194 void
9195 __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
9196 {
9197     struct glx_context *const gc = __glXGetCurrentContext();
9198     Display *const dpy = gc->currentDpy;
9199     const GLuint cmdlen = 8;
9200     if (__builtin_expect(dpy != NULL, 1)) {
9201         GLubyte const *pc =
9202             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9203                                     X_GLvop_GetVertexAttribfvNV, cmdlen);
9204         (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9205         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9206         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9207         UnlockDisplay(dpy);
9208         SyncHandle();
9209     }
9210     return;
9211 }
9212
9213 #define X_GLvop_GetVertexAttribivNV 1303
9214 void
9215 __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
9216 {
9217     struct glx_context *const gc = __glXGetCurrentContext();
9218     Display *const dpy = gc->currentDpy;
9219     const GLuint cmdlen = 8;
9220     if (__builtin_expect(dpy != NULL, 1)) {
9221         GLubyte const *pc =
9222             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9223                                     X_GLvop_GetVertexAttribivNV, cmdlen);
9224         (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9225         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9226         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9227         UnlockDisplay(dpy);
9228         SyncHandle();
9229     }
9230     return;
9231 }
9232
9233 #define X_GLvop_IsProgramNV 1304
9234 GLboolean
9235 __indirect_glIsProgramNV(GLuint program)
9236 {
9237     struct glx_context *const gc = __glXGetCurrentContext();
9238     Display *const dpy = gc->currentDpy;
9239     GLboolean retval = (GLboolean) 0;
9240     const GLuint cmdlen = 4;
9241     if (__builtin_expect(dpy != NULL, 1)) {
9242         GLubyte const *pc =
9243             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9244                                     X_GLvop_IsProgramNV, cmdlen);
9245         (void) memcpy((void *) (pc + 0), (void *) (&program), 4);
9246         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
9247         UnlockDisplay(dpy);
9248         SyncHandle();
9249     }
9250     return retval;
9251 }
9252
9253 #define X_GLrop_LoadProgramNV 4183
9254 void
9255 __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len,
9256                            const GLubyte *program)
9257 {
9258     struct glx_context *const gc = __glXGetCurrentContext();
9259     const GLuint cmdlen = 16 + __GLX_PAD(len);
9260     if (len < 0) {
9261         __glXSetError(gc, GL_INVALID_VALUE);
9262         return;
9263     }
9264     if (__builtin_expect(len >= 0, 1)) {
9265         emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
9266         (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9267         (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
9268         (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
9269         (void) memcpy((void *) (gc->pc + 16), (void *) (program), len);
9270         gc->pc += cmdlen;
9271         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9272             (void) __glXFlushRenderBuffer(gc, gc->pc);
9273         }
9274     }
9275 }
9276
9277 #define X_GLrop_ProgramParameters4dvNV 4187
9278 void
9279 __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLsizei num,
9280                                     const GLdouble * params)
9281 {
9282     struct glx_context *const gc = __glXGetCurrentContext();
9283     const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
9284     if (num < 0) {
9285         __glXSetError(gc, GL_INVALID_VALUE);
9286         return;
9287     }
9288     if (__builtin_expect(num >= 0, 1)) {
9289         emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
9290         (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9291         (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9292         (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9293         (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 32));
9294         gc->pc += cmdlen;
9295         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9296             (void) __glXFlushRenderBuffer(gc, gc->pc);
9297         }
9298     }
9299 }
9300
9301 #define X_GLrop_ProgramParameters4fvNV 4186
9302 void
9303 __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLsizei num,
9304                                     const GLfloat * params)
9305 {
9306     struct glx_context *const gc = __glXGetCurrentContext();
9307     const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
9308     if (num < 0) {
9309         __glXSetError(gc, GL_INVALID_VALUE);
9310         return;
9311     }
9312     if (__builtin_expect(num >= 0, 1)) {
9313         emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
9314         (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9315         (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9316         (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9317         (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 16));
9318         gc->pc += cmdlen;
9319         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9320             (void) __glXFlushRenderBuffer(gc, gc->pc);
9321         }
9322     }
9323 }
9324
9325 #define X_GLrop_RequestResidentProgramsNV 4182
9326 void
9327 __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
9328 {
9329     struct glx_context *const gc = __glXGetCurrentContext();
9330     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
9331     if (n < 0) {
9332         __glXSetError(gc, GL_INVALID_VALUE);
9333         return;
9334     }
9335     if (__builtin_expect(n >= 0, 1)) {
9336         emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
9337         (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
9338         (void) memcpy((void *) (gc->pc + 8), (void *) (ids), (n * 4));
9339         gc->pc += cmdlen;
9340         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9341             (void) __glXFlushRenderBuffer(gc, gc->pc);
9342         }
9343     }
9344 }
9345
9346 #define X_GLrop_TrackMatrixNV 4188
9347 void
9348 __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix,
9349                            GLenum transform)
9350 {
9351     struct glx_context *const gc = __glXGetCurrentContext();
9352     const GLuint cmdlen = 20;
9353     emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
9354     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9355     (void) memcpy((void *) (gc->pc + 8), (void *) (&address), 4);
9356     (void) memcpy((void *) (gc->pc + 12), (void *) (&matrix), 4);
9357     (void) memcpy((void *) (gc->pc + 16), (void *) (&transform), 4);
9358     gc->pc += cmdlen;
9359     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9360         (void) __glXFlushRenderBuffer(gc, gc->pc);
9361     }
9362 }
9363
9364 #define X_GLrop_VertexAttrib1dvNV 4273
9365 void
9366 __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
9367 {
9368     struct glx_context *const gc = __glXGetCurrentContext();
9369     const GLuint cmdlen = 16;
9370     emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9371     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9372     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9373     gc->pc += cmdlen;
9374     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9375         (void) __glXFlushRenderBuffer(gc, gc->pc);
9376     }
9377 }
9378
9379 #define X_GLrop_VertexAttrib1dvNV 4273
9380 void
9381 __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
9382 {
9383     struct glx_context *const gc = __glXGetCurrentContext();
9384     const GLuint cmdlen = 16;
9385     emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9386     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9387     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9388     gc->pc += cmdlen;
9389     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9390         (void) __glXFlushRenderBuffer(gc, gc->pc);
9391     }
9392 }
9393
9394 #define X_GLrop_VertexAttrib1fvNV 4269
9395 void
9396 __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
9397 {
9398     struct glx_context *const gc = __glXGetCurrentContext();
9399     const GLuint cmdlen = 12;
9400     emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9401     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9402     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9403     gc->pc += cmdlen;
9404     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9405         (void) __glXFlushRenderBuffer(gc, gc->pc);
9406     }
9407 }
9408
9409 #define X_GLrop_VertexAttrib1fvNV 4269
9410 void
9411 __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
9412 {
9413     struct glx_context *const gc = __glXGetCurrentContext();
9414     const GLuint cmdlen = 12;
9415     emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9416     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9417     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9418     gc->pc += cmdlen;
9419     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9420         (void) __glXFlushRenderBuffer(gc, gc->pc);
9421     }
9422 }
9423
9424 #define X_GLrop_VertexAttrib1svNV 4265
9425 void
9426 __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
9427 {
9428     struct glx_context *const gc = __glXGetCurrentContext();
9429     const GLuint cmdlen = 12;
9430     emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9431     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9432     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9433     gc->pc += cmdlen;
9434     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9435         (void) __glXFlushRenderBuffer(gc, gc->pc);
9436     }
9437 }
9438
9439 #define X_GLrop_VertexAttrib1svNV 4265
9440 void
9441 __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
9442 {
9443     struct glx_context *const gc = __glXGetCurrentContext();
9444     const GLuint cmdlen = 12;
9445     emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9446     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9447     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
9448     gc->pc += cmdlen;
9449     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9450         (void) __glXFlushRenderBuffer(gc, gc->pc);
9451     }
9452 }
9453
9454 #define X_GLrop_VertexAttrib2dvNV 4274
9455 void
9456 __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
9457 {
9458     struct glx_context *const gc = __glXGetCurrentContext();
9459     const GLuint cmdlen = 24;
9460     emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9461     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9462     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9463     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9464     gc->pc += cmdlen;
9465     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9466         (void) __glXFlushRenderBuffer(gc, gc->pc);
9467     }
9468 }
9469
9470 #define X_GLrop_VertexAttrib2dvNV 4274
9471 void
9472 __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
9473 {
9474     struct glx_context *const gc = __glXGetCurrentContext();
9475     const GLuint cmdlen = 24;
9476     emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9477     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9478     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9479     gc->pc += cmdlen;
9480     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9481         (void) __glXFlushRenderBuffer(gc, gc->pc);
9482     }
9483 }
9484
9485 #define X_GLrop_VertexAttrib2fvNV 4270
9486 void
9487 __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
9488 {
9489     struct glx_context *const gc = __glXGetCurrentContext();
9490     const GLuint cmdlen = 16;
9491     emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9492     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9493     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9494     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9495     gc->pc += cmdlen;
9496     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9497         (void) __glXFlushRenderBuffer(gc, gc->pc);
9498     }
9499 }
9500
9501 #define X_GLrop_VertexAttrib2fvNV 4270
9502 void
9503 __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
9504 {
9505     struct glx_context *const gc = __glXGetCurrentContext();
9506     const GLuint cmdlen = 16;
9507     emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9508     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9509     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9510     gc->pc += cmdlen;
9511     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9512         (void) __glXFlushRenderBuffer(gc, gc->pc);
9513     }
9514 }
9515
9516 #define X_GLrop_VertexAttrib2svNV 4266
9517 void
9518 __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
9519 {
9520     struct glx_context *const gc = __glXGetCurrentContext();
9521     const GLuint cmdlen = 12;
9522     emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9523     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9524     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9525     (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9526     gc->pc += cmdlen;
9527     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9528         (void) __glXFlushRenderBuffer(gc, gc->pc);
9529     }
9530 }
9531
9532 #define X_GLrop_VertexAttrib2svNV 4266
9533 void
9534 __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
9535 {
9536     struct glx_context *const gc = __glXGetCurrentContext();
9537     const GLuint cmdlen = 12;
9538     emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9539     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9540     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9541     gc->pc += cmdlen;
9542     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9543         (void) __glXFlushRenderBuffer(gc, gc->pc);
9544     }
9545 }
9546
9547 #define X_GLrop_VertexAttrib3dvNV 4275
9548 void
9549 __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y,
9550                               GLdouble z)
9551 {
9552     struct glx_context *const gc = __glXGetCurrentContext();
9553     const GLuint cmdlen = 32;
9554     emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9555     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9556     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9557     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9558     (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9559     gc->pc += cmdlen;
9560     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9561         (void) __glXFlushRenderBuffer(gc, gc->pc);
9562     }
9563 }
9564
9565 #define X_GLrop_VertexAttrib3dvNV 4275
9566 void
9567 __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
9568 {
9569     struct glx_context *const gc = __glXGetCurrentContext();
9570     const GLuint cmdlen = 32;
9571     emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9572     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9573     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
9574     gc->pc += cmdlen;
9575     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9576         (void) __glXFlushRenderBuffer(gc, gc->pc);
9577     }
9578 }
9579
9580 #define X_GLrop_VertexAttrib3fvNV 4271
9581 void
9582 __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
9583 {
9584     struct glx_context *const gc = __glXGetCurrentContext();
9585     const GLuint cmdlen = 20;
9586     emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9587     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9588     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9589     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9590     (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9591     gc->pc += cmdlen;
9592     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9593         (void) __glXFlushRenderBuffer(gc, gc->pc);
9594     }
9595 }
9596
9597 #define X_GLrop_VertexAttrib3fvNV 4271
9598 void
9599 __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
9600 {
9601     struct glx_context *const gc = __glXGetCurrentContext();
9602     const GLuint cmdlen = 20;
9603     emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9604     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9605     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
9606     gc->pc += cmdlen;
9607     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9608         (void) __glXFlushRenderBuffer(gc, gc->pc);
9609     }
9610 }
9611
9612 #define X_GLrop_VertexAttrib3svNV 4267
9613 void
9614 __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
9615 {
9616     struct glx_context *const gc = __glXGetCurrentContext();
9617     const GLuint cmdlen = 16;
9618     emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9619     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9620     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9621     (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9622     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9623     gc->pc += cmdlen;
9624     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9625         (void) __glXFlushRenderBuffer(gc, gc->pc);
9626     }
9627 }
9628
9629 #define X_GLrop_VertexAttrib3svNV 4267
9630 void
9631 __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
9632 {
9633     struct glx_context *const gc = __glXGetCurrentContext();
9634     const GLuint cmdlen = 16;
9635     emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9636     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9637     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
9638     gc->pc += cmdlen;
9639     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9640         (void) __glXFlushRenderBuffer(gc, gc->pc);
9641     }
9642 }
9643
9644 #define X_GLrop_VertexAttrib4dvNV 4276
9645 void
9646 __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y,
9647                               GLdouble z, GLdouble w)
9648 {
9649     struct glx_context *const gc = __glXGetCurrentContext();
9650     const GLuint cmdlen = 40;
9651     emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9652     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9653     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9654     (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9655     (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9656     (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
9657     gc->pc += cmdlen;
9658     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9659         (void) __glXFlushRenderBuffer(gc, gc->pc);
9660     }
9661 }
9662
9663 #define X_GLrop_VertexAttrib4dvNV 4276
9664 void
9665 __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
9666 {
9667     struct glx_context *const gc = __glXGetCurrentContext();
9668     const GLuint cmdlen = 40;
9669     emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9670     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9671     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
9672     gc->pc += cmdlen;
9673     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9674         (void) __glXFlushRenderBuffer(gc, gc->pc);
9675     }
9676 }
9677
9678 #define X_GLrop_VertexAttrib4fvNV 4272
9679 void
9680 __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z,
9681                               GLfloat w)
9682 {
9683     struct glx_context *const gc = __glXGetCurrentContext();
9684     const GLuint cmdlen = 24;
9685     emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9686     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9687     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9688     (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9689     (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9690     (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
9691     gc->pc += cmdlen;
9692     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9693         (void) __glXFlushRenderBuffer(gc, gc->pc);
9694     }
9695 }
9696
9697 #define X_GLrop_VertexAttrib4fvNV 4272
9698 void
9699 __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
9700 {
9701     struct glx_context *const gc = __glXGetCurrentContext();
9702     const GLuint cmdlen = 24;
9703     emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9704     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9705     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9706     gc->pc += cmdlen;
9707     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9708         (void) __glXFlushRenderBuffer(gc, gc->pc);
9709     }
9710 }
9711
9712 #define X_GLrop_VertexAttrib4svNV 4268
9713 void
9714 __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z,
9715                               GLshort w)
9716 {
9717     struct glx_context *const gc = __glXGetCurrentContext();
9718     const GLuint cmdlen = 16;
9719     emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9720     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9721     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9722     (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9723     (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9724     (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
9725     gc->pc += cmdlen;
9726     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9727         (void) __glXFlushRenderBuffer(gc, gc->pc);
9728     }
9729 }
9730
9731 #define X_GLrop_VertexAttrib4svNV 4268
9732 void
9733 __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
9734 {
9735     struct glx_context *const gc = __glXGetCurrentContext();
9736     const GLuint cmdlen = 16;
9737     emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9738     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9739     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9740     gc->pc += cmdlen;
9741     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9742         (void) __glXFlushRenderBuffer(gc, gc->pc);
9743     }
9744 }
9745
9746 #define X_GLrop_VertexAttrib4ubvNV 4277
9747 void
9748 __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
9749                                GLubyte w)
9750 {
9751     struct glx_context *const gc = __glXGetCurrentContext();
9752     const GLuint cmdlen = 12;
9753     emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9754     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9755     (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
9756     (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
9757     (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
9758     (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
9759     gc->pc += cmdlen;
9760     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9761         (void) __glXFlushRenderBuffer(gc, gc->pc);
9762     }
9763 }
9764
9765 #define X_GLrop_VertexAttrib4ubvNV 4277
9766 void
9767 __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte *v)
9768 {
9769     struct glx_context *const gc = __glXGetCurrentContext();
9770     const GLuint cmdlen = 12;
9771     emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9772     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9773     (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9774     gc->pc += cmdlen;
9775     if (__builtin_expect(gc->pc > gc->limit, 0)) {
9776         (void) __glXFlushRenderBuffer(gc, gc->pc);
9777     }
9778 }
9779
9780 #define X_GLrop_VertexAttribs1dvNV 4210
9781 void
9782 __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
9783 {
9784     struct glx_context *const gc = __glXGetCurrentContext();
9785     const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9786     if (n < 0) {
9787         __glXSetError(gc, GL_INVALID_VALUE);
9788         return;
9789     }
9790     if (__builtin_expect(n >= 0, 1)) {
9791         emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
9792         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9793         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9794         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9795         gc->pc += cmdlen;
9796         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9797             (void) __glXFlushRenderBuffer(gc, gc->pc);
9798         }
9799     }
9800 }
9801
9802 #define X_GLrop_VertexAttribs1fvNV 4206
9803 void
9804 __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
9805 {
9806     struct glx_context *const gc = __glXGetCurrentContext();
9807     const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9808     if (n < 0) {
9809         __glXSetError(gc, GL_INVALID_VALUE);
9810         return;
9811     }
9812     if (__builtin_expect(n >= 0, 1)) {
9813         emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
9814         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9815         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9816         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9817         gc->pc += cmdlen;
9818         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9819             (void) __glXFlushRenderBuffer(gc, gc->pc);
9820         }
9821     }
9822 }
9823
9824 #define X_GLrop_VertexAttribs1svNV 4202
9825 void
9826 __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
9827 {
9828     struct glx_context *const gc = __glXGetCurrentContext();
9829     const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
9830     if (n < 0) {
9831         __glXSetError(gc, GL_INVALID_VALUE);
9832         return;
9833     }
9834     if (__builtin_expect(n >= 0, 1)) {
9835         emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
9836         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9837         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9838         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 2));
9839         gc->pc += cmdlen;
9840         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9841             (void) __glXFlushRenderBuffer(gc, gc->pc);
9842         }
9843     }
9844 }
9845
9846 #define X_GLrop_VertexAttribs2dvNV 4211
9847 void
9848 __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
9849 {
9850     struct glx_context *const gc = __glXGetCurrentContext();
9851     const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9852     if (n < 0) {
9853         __glXSetError(gc, GL_INVALID_VALUE);
9854         return;
9855     }
9856     if (__builtin_expect(n >= 0, 1)) {
9857         emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
9858         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9859         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9860         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
9861         gc->pc += cmdlen;
9862         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9863             (void) __glXFlushRenderBuffer(gc, gc->pc);
9864         }
9865     }
9866 }
9867
9868 #define X_GLrop_VertexAttribs2fvNV 4207
9869 void
9870 __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
9871 {
9872     struct glx_context *const gc = __glXGetCurrentContext();
9873     const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9874     if (n < 0) {
9875         __glXSetError(gc, GL_INVALID_VALUE);
9876         return;
9877     }
9878     if (__builtin_expect(n >= 0, 1)) {
9879         emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
9880         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9881         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9882         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9883         gc->pc += cmdlen;
9884         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9885             (void) __glXFlushRenderBuffer(gc, gc->pc);
9886         }
9887     }
9888 }
9889
9890 #define X_GLrop_VertexAttribs2svNV 4203
9891 void
9892 __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
9893 {
9894     struct glx_context *const gc = __glXGetCurrentContext();
9895     const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9896     if (n < 0) {
9897         __glXSetError(gc, GL_INVALID_VALUE);
9898         return;
9899     }
9900     if (__builtin_expect(n >= 0, 1)) {
9901         emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
9902         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9903         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9904         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9905         gc->pc += cmdlen;
9906         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9907             (void) __glXFlushRenderBuffer(gc, gc->pc);
9908         }
9909     }
9910 }
9911
9912 #define X_GLrop_VertexAttribs3dvNV 4212
9913 void
9914 __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
9915 {
9916     struct glx_context *const gc = __glXGetCurrentContext();
9917     const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
9918     if (n < 0) {
9919         __glXSetError(gc, GL_INVALID_VALUE);
9920         return;
9921     }
9922     if (__builtin_expect(n >= 0, 1)) {
9923         emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
9924         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9925         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9926         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 24));
9927         gc->pc += cmdlen;
9928         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9929             (void) __glXFlushRenderBuffer(gc, gc->pc);
9930         }
9931     }
9932 }
9933
9934 #define X_GLrop_VertexAttribs3fvNV 4208
9935 void
9936 __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
9937 {
9938     struct glx_context *const gc = __glXGetCurrentContext();
9939     const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
9940     if (n < 0) {
9941         __glXSetError(gc, GL_INVALID_VALUE);
9942         return;
9943     }
9944     if (__builtin_expect(n >= 0, 1)) {
9945         emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
9946         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9947         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9948         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 12));
9949         gc->pc += cmdlen;
9950         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9951             (void) __glXFlushRenderBuffer(gc, gc->pc);
9952         }
9953     }
9954 }
9955
9956 #define X_GLrop_VertexAttribs3svNV 4204
9957 void
9958 __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
9959 {
9960     struct glx_context *const gc = __glXGetCurrentContext();
9961     const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
9962     if (n < 0) {
9963         __glXSetError(gc, GL_INVALID_VALUE);
9964         return;
9965     }
9966     if (__builtin_expect(n >= 0, 1)) {
9967         emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
9968         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9969         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9970         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 6));
9971         gc->pc += cmdlen;
9972         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9973             (void) __glXFlushRenderBuffer(gc, gc->pc);
9974         }
9975     }
9976 }
9977
9978 #define X_GLrop_VertexAttribs4dvNV 4213
9979 void
9980 __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
9981 {
9982     struct glx_context *const gc = __glXGetCurrentContext();
9983     const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
9984     if (n < 0) {
9985         __glXSetError(gc, GL_INVALID_VALUE);
9986         return;
9987     }
9988     if (__builtin_expect(n >= 0, 1)) {
9989         emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
9990         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9991         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9992         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 32));
9993         gc->pc += cmdlen;
9994         if (__builtin_expect(gc->pc > gc->limit, 0)) {
9995             (void) __glXFlushRenderBuffer(gc, gc->pc);
9996         }
9997     }
9998 }
9999
10000 #define X_GLrop_VertexAttribs4fvNV 4209
10001 void
10002 __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
10003 {
10004     struct glx_context *const gc = __glXGetCurrentContext();
10005     const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
10006     if (n < 0) {
10007         __glXSetError(gc, GL_INVALID_VALUE);
10008         return;
10009     }
10010     if (__builtin_expect(n >= 0, 1)) {
10011         emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
10012         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
10013         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
10014         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
10015         gc->pc += cmdlen;
10016         if (__builtin_expect(gc->pc > gc->limit, 0)) {
10017             (void) __glXFlushRenderBuffer(gc, gc->pc);
10018         }
10019     }
10020 }
10021
10022 #define X_GLrop_VertexAttribs4svNV 4205
10023 void
10024 __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
10025 {
10026     struct glx_context *const gc = __glXGetCurrentContext();
10027     const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
10028     if (n < 0) {
10029         __glXSetError(gc, GL_INVALID_VALUE);
10030         return;
10031     }
10032     if (__builtin_expect(n >= 0, 1)) {
10033         emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
10034         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
10035         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
10036         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
10037         gc->pc += cmdlen;
10038         if (__builtin_expect(gc->pc > gc->limit, 0)) {
10039             (void) __glXFlushRenderBuffer(gc, gc->pc);
10040         }
10041     }
10042 }
10043
10044 #define X_GLrop_VertexAttribs4ubvNV 4214
10045 void
10046 __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
10047 {
10048     struct glx_context *const gc = __glXGetCurrentContext();
10049     const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
10050     if (n < 0) {
10051         __glXSetError(gc, GL_INVALID_VALUE);
10052         return;
10053     }
10054     if (__builtin_expect(n >= 0, 1)) {
10055         emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
10056         (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
10057         (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
10058         (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
10059         gc->pc += cmdlen;
10060         if (__builtin_expect(gc->pc > gc->limit, 0)) {
10061             (void) __glXFlushRenderBuffer(gc, gc->pc);
10062         }
10063     }
10064 }
10065
10066 #define X_GLrop_PointParameteriNV 4221
10067 void
10068 __indirect_glPointParameteriNV(GLenum pname, GLint param)
10069 {
10070     struct glx_context *const gc = __glXGetCurrentContext();
10071     const GLuint cmdlen = 12;
10072     emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
10073     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
10074     (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
10075     gc->pc += cmdlen;
10076     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10077         (void) __glXFlushRenderBuffer(gc, gc->pc);
10078     }
10079 }
10080
10081 #define X_GLrop_PointParameterivNV 4222
10082 void
10083 __indirect_glPointParameterivNV(GLenum pname, const GLint * params)
10084 {
10085     struct glx_context *const gc = __glXGetCurrentContext();
10086     const GLuint compsize = __glPointParameterivNV_size(pname);
10087     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
10088     emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
10089     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
10090     (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
10091     gc->pc += cmdlen;
10092     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10093         (void) __glXFlushRenderBuffer(gc, gc->pc);
10094     }
10095 }
10096
10097 #define X_GLrop_ActiveStencilFaceEXT 4220
10098 void
10099 __indirect_glActiveStencilFaceEXT(GLenum face)
10100 {
10101     struct glx_context *const gc = __glXGetCurrentContext();
10102     const GLuint cmdlen = 8;
10103     emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
10104     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
10105     gc->pc += cmdlen;
10106     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10107         (void) __glXFlushRenderBuffer(gc, gc->pc);
10108     }
10109 }
10110
10111 #define X_GLvop_GetProgramNamedParameterdvNV 1311
10112 void
10113 __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
10114                                           const GLubyte *name,
10115                                           GLdouble * params)
10116 {
10117     struct glx_context *const gc = __glXGetCurrentContext();
10118     Display *const dpy = gc->currentDpy;
10119     const GLuint cmdlen = 8 + __GLX_PAD(len);
10120     if (len < 0) {
10121         __glXSetError(gc, GL_INVALID_VALUE);
10122         return;
10123     }
10124     if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
10125         GLubyte const *pc =
10126             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10127                                     X_GLvop_GetProgramNamedParameterdvNV,
10128                                     cmdlen);
10129         (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
10130         (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
10131         (void) memcpy((void *) (pc + 8), (void *) (name), len);
10132         (void) __glXReadReply(dpy, 8, params, GL_TRUE);
10133         UnlockDisplay(dpy);
10134         SyncHandle();
10135     }
10136     return;
10137 }
10138
10139 #define X_GLvop_GetProgramNamedParameterfvNV 1310
10140 void
10141 __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
10142                                           const GLubyte *name,
10143                                           GLfloat * params)
10144 {
10145     struct glx_context *const gc = __glXGetCurrentContext();
10146     Display *const dpy = gc->currentDpy;
10147     const GLuint cmdlen = 8 + __GLX_PAD(len);
10148     if (len < 0) {
10149         __glXSetError(gc, GL_INVALID_VALUE);
10150         return;
10151     }
10152     if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
10153         GLubyte const *pc =
10154             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10155                                     X_GLvop_GetProgramNamedParameterfvNV,
10156                                     cmdlen);
10157         (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
10158         (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
10159         (void) memcpy((void *) (pc + 8), (void *) (name), len);
10160         (void) __glXReadReply(dpy, 4, params, GL_TRUE);
10161         UnlockDisplay(dpy);
10162         SyncHandle();
10163     }
10164     return;
10165 }
10166
10167 #define X_GLrop_ProgramNamedParameter4dvNV 4219
10168 void
10169 __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
10170                                        const GLubyte *name, GLdouble x,
10171                                        GLdouble y, GLdouble z, GLdouble w)
10172 {
10173     struct glx_context *const gc = __glXGetCurrentContext();
10174     const GLuint cmdlen = 44 + __GLX_PAD(len);
10175     if (len < 0) {
10176         __glXSetError(gc, GL_INVALID_VALUE);
10177         return;
10178     }
10179     if (__builtin_expect(len >= 0, 1)) {
10180         emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
10181         (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
10182         (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
10183         (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
10184         (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
10185         (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
10186         (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
10187         (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
10188         gc->pc += cmdlen;
10189         if (__builtin_expect(gc->pc > gc->limit, 0)) {
10190             (void) __glXFlushRenderBuffer(gc, gc->pc);
10191         }
10192     }
10193 }
10194
10195 #define X_GLrop_ProgramNamedParameter4dvNV 4219
10196 void
10197 __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
10198                                         const GLubyte *name,
10199                                         const GLdouble * v)
10200 {
10201     struct glx_context *const gc = __glXGetCurrentContext();
10202     const GLuint cmdlen = 44 + __GLX_PAD(len);
10203     if (len < 0) {
10204         __glXSetError(gc, GL_INVALID_VALUE);
10205         return;
10206     }
10207     if (__builtin_expect(len >= 0, 1)) {
10208         emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
10209         (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
10210         (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
10211         (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
10212         (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
10213         gc->pc += cmdlen;
10214         if (__builtin_expect(gc->pc > gc->limit, 0)) {
10215             (void) __glXFlushRenderBuffer(gc, gc->pc);
10216         }
10217     }
10218 }
10219
10220 #define X_GLrop_ProgramNamedParameter4fvNV 4218
10221 void
10222 __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
10223                                        const GLubyte *name, GLfloat x,
10224                                        GLfloat y, GLfloat z, GLfloat w)
10225 {
10226     struct glx_context *const gc = __glXGetCurrentContext();
10227     const GLuint cmdlen = 28 + __GLX_PAD(len);
10228     if (len < 0) {
10229         __glXSetError(gc, GL_INVALID_VALUE);
10230         return;
10231     }
10232     if (__builtin_expect(len >= 0, 1)) {
10233         emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
10234         (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
10235         (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
10236         (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
10237         (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
10238         (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
10239         (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
10240         (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
10241         gc->pc += cmdlen;
10242         if (__builtin_expect(gc->pc > gc->limit, 0)) {
10243             (void) __glXFlushRenderBuffer(gc, gc->pc);
10244         }
10245     }
10246 }
10247
10248 #define X_GLrop_ProgramNamedParameter4fvNV 4218
10249 void
10250 __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
10251                                         const GLubyte *name,
10252                                         const GLfloat * v)
10253 {
10254     struct glx_context *const gc = __glXGetCurrentContext();
10255     const GLuint cmdlen = 28 + __GLX_PAD(len);
10256     if (len < 0) {
10257         __glXSetError(gc, GL_INVALID_VALUE);
10258         return;
10259     }
10260     if (__builtin_expect(len >= 0, 1)) {
10261         emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
10262         (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
10263         (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
10264         (void) memcpy((void *) (gc->pc + 12), (void *) (v), 16);
10265         (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
10266         gc->pc += cmdlen;
10267         if (__builtin_expect(gc->pc > gc->limit, 0)) {
10268             (void) __glXFlushRenderBuffer(gc, gc->pc);
10269         }
10270     }
10271 }
10272
10273 #define X_GLrop_BlendEquationSeparateEXT 4228
10274 void
10275 __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
10276 {
10277     struct glx_context *const gc = __glXGetCurrentContext();
10278     const GLuint cmdlen = 12;
10279     emit_header(gc->pc, X_GLrop_BlendEquationSeparateEXT, cmdlen);
10280     (void) memcpy((void *) (gc->pc + 4), (void *) (&modeRGB), 4);
10281     (void) memcpy((void *) (gc->pc + 8), (void *) (&modeA), 4);
10282     gc->pc += cmdlen;
10283     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10284         (void) __glXFlushRenderBuffer(gc, gc->pc);
10285     }
10286 }
10287
10288 #define X_GLrop_BindFramebufferEXT 4319
10289 void
10290 __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
10291 {
10292     struct glx_context *const gc = __glXGetCurrentContext();
10293     const GLuint cmdlen = 12;
10294     emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
10295     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10296     (void) memcpy((void *) (gc->pc + 8), (void *) (&framebuffer), 4);
10297     gc->pc += cmdlen;
10298     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10299         (void) __glXFlushRenderBuffer(gc, gc->pc);
10300     }
10301 }
10302
10303 #define X_GLrop_BindRenderbufferEXT 4316
10304 void
10305 __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
10306 {
10307     struct glx_context *const gc = __glXGetCurrentContext();
10308     const GLuint cmdlen = 12;
10309     emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
10310     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10311     (void) memcpy((void *) (gc->pc + 8), (void *) (&renderbuffer), 4);
10312     gc->pc += cmdlen;
10313     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10314         (void) __glXFlushRenderBuffer(gc, gc->pc);
10315     }
10316 }
10317
10318 #define X_GLvop_CheckFramebufferStatusEXT 1427
10319 GLenum
10320 __indirect_glCheckFramebufferStatusEXT(GLenum target)
10321 {
10322     struct glx_context *const gc = __glXGetCurrentContext();
10323     Display *const dpy = gc->currentDpy;
10324     GLenum retval = (GLenum) 0;
10325     const GLuint cmdlen = 4;
10326     if (__builtin_expect(dpy != NULL, 1)) {
10327         GLubyte const *pc =
10328             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10329                                     X_GLvop_CheckFramebufferStatusEXT,
10330                                     cmdlen);
10331         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10332         retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10333         UnlockDisplay(dpy);
10334         SyncHandle();
10335     }
10336     return retval;
10337 }
10338
10339 #define X_GLrop_DeleteFramebuffersEXT 4320
10340 void
10341 __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
10342 {
10343     struct glx_context *const gc = __glXGetCurrentContext();
10344     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10345     if (n < 0) {
10346         __glXSetError(gc, GL_INVALID_VALUE);
10347         return;
10348     }
10349     if (__builtin_expect(n >= 0, 1)) {
10350         emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
10351         (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10352         (void) memcpy((void *) (gc->pc + 8), (void *) (framebuffers),
10353                       (n * 4));
10354         gc->pc += cmdlen;
10355         if (__builtin_expect(gc->pc > gc->limit, 0)) {
10356             (void) __glXFlushRenderBuffer(gc, gc->pc);
10357         }
10358     }
10359 }
10360
10361 #define X_GLrop_DeleteRenderbuffersEXT 4317
10362 void
10363 __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
10364 {
10365     struct glx_context *const gc = __glXGetCurrentContext();
10366     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10367     if (n < 0) {
10368         __glXSetError(gc, GL_INVALID_VALUE);
10369         return;
10370     }
10371     if (__builtin_expect(n >= 0, 1)) {
10372         emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
10373         (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10374         (void) memcpy((void *) (gc->pc + 8), (void *) (renderbuffers),
10375                       (n * 4));
10376         gc->pc += cmdlen;
10377         if (__builtin_expect(gc->pc > gc->limit, 0)) {
10378             (void) __glXFlushRenderBuffer(gc, gc->pc);
10379         }
10380     }
10381 }
10382
10383 #define X_GLrop_FramebufferRenderbufferEXT 4324
10384 void
10385 __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
10386                                         GLenum renderbuffertarget,
10387                                         GLuint renderbuffer)
10388 {
10389     struct glx_context *const gc = __glXGetCurrentContext();
10390     const GLuint cmdlen = 20;
10391     emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
10392     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10393     (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10394     (void) memcpy((void *) (gc->pc + 12), (void *) (&renderbuffertarget), 4);
10395     (void) memcpy((void *) (gc->pc + 16), (void *) (&renderbuffer), 4);
10396     gc->pc += cmdlen;
10397     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10398         (void) __glXFlushRenderBuffer(gc, gc->pc);
10399     }
10400 }
10401
10402 #define X_GLrop_FramebufferTexture1DEXT 4321
10403 void
10404 __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
10405                                      GLenum textarget, GLuint texture,
10406                                      GLint level)
10407 {
10408     struct glx_context *const gc = __glXGetCurrentContext();
10409     const GLuint cmdlen = 24;
10410     emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
10411     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10412     (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10413     (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10414     (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10415     (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10416     gc->pc += cmdlen;
10417     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10418         (void) __glXFlushRenderBuffer(gc, gc->pc);
10419     }
10420 }
10421
10422 #define X_GLrop_FramebufferTexture2DEXT 4322
10423 void
10424 __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
10425                                      GLenum textarget, GLuint texture,
10426                                      GLint level)
10427 {
10428     struct glx_context *const gc = __glXGetCurrentContext();
10429     const GLuint cmdlen = 24;
10430     emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
10431     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10432     (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10433     (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10434     (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10435     (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10436     gc->pc += cmdlen;
10437     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10438         (void) __glXFlushRenderBuffer(gc, gc->pc);
10439     }
10440 }
10441
10442 #define X_GLrop_FramebufferTexture3DEXT 4323
10443 void
10444 __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
10445                                      GLenum textarget, GLuint texture,
10446                                      GLint level, GLint zoffset)
10447 {
10448     struct glx_context *const gc = __glXGetCurrentContext();
10449     const GLuint cmdlen = 28;
10450     emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
10451     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10452     (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10453     (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10454     (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10455     (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10456     (void) memcpy((void *) (gc->pc + 24), (void *) (&zoffset), 4);
10457     gc->pc += cmdlen;
10458     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10459         (void) __glXFlushRenderBuffer(gc, gc->pc);
10460     }
10461 }
10462
10463 #define X_GLvop_GenFramebuffersEXT 1426
10464 void
10465 __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
10466 {
10467     struct glx_context *const gc = __glXGetCurrentContext();
10468     Display *const dpy = gc->currentDpy;
10469     const GLuint cmdlen = 4;
10470     if (n < 0) {
10471         __glXSetError(gc, GL_INVALID_VALUE);
10472         return;
10473     }
10474     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10475         GLubyte const *pc =
10476             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10477                                     X_GLvop_GenFramebuffersEXT, cmdlen);
10478         (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10479         (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
10480         UnlockDisplay(dpy);
10481         SyncHandle();
10482     }
10483     return;
10484 }
10485
10486 #define X_GLvop_GenRenderbuffersEXT 1423
10487 void
10488 __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
10489 {
10490     struct glx_context *const gc = __glXGetCurrentContext();
10491     Display *const dpy = gc->currentDpy;
10492     const GLuint cmdlen = 4;
10493     if (n < 0) {
10494         __glXSetError(gc, GL_INVALID_VALUE);
10495         return;
10496     }
10497     if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10498         GLubyte const *pc =
10499             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10500                                     X_GLvop_GenRenderbuffersEXT, cmdlen);
10501         (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10502         (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
10503         UnlockDisplay(dpy);
10504         SyncHandle();
10505     }
10506     return;
10507 }
10508
10509 #define X_GLrop_GenerateMipmapEXT 4325
10510 void
10511 __indirect_glGenerateMipmapEXT(GLenum target)
10512 {
10513     struct glx_context *const gc = __glXGetCurrentContext();
10514     const GLuint cmdlen = 8;
10515     emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
10516     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10517     gc->pc += cmdlen;
10518     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10519         (void) __glXFlushRenderBuffer(gc, gc->pc);
10520     }
10521 }
10522
10523 #define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
10524 void
10525 __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target,
10526                                                     GLenum attachment,
10527                                                     GLenum pname,
10528                                                     GLint * params)
10529 {
10530     struct glx_context *const gc = __glXGetCurrentContext();
10531     Display *const dpy = gc->currentDpy;
10532     const GLuint cmdlen = 12;
10533     if (__builtin_expect(dpy != NULL, 1)) {
10534         GLubyte const *pc =
10535             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10536                                     X_GLvop_GetFramebufferAttachmentParameterivEXT,
10537                                     cmdlen);
10538         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10539         (void) memcpy((void *) (pc + 4), (void *) (&attachment), 4);
10540         (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
10541         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10542         UnlockDisplay(dpy);
10543         SyncHandle();
10544     }
10545     return;
10546 }
10547
10548 #define X_GLvop_GetRenderbufferParameterivEXT 1424
10549 void
10550 __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname,
10551                                            GLint * params)
10552 {
10553     struct glx_context *const gc = __glXGetCurrentContext();
10554     Display *const dpy = gc->currentDpy;
10555     const GLuint cmdlen = 8;
10556     if (__builtin_expect(dpy != NULL, 1)) {
10557         GLubyte const *pc =
10558             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10559                                     X_GLvop_GetRenderbufferParameterivEXT,
10560                                     cmdlen);
10561         (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10562         (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
10563         (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10564         UnlockDisplay(dpy);
10565         SyncHandle();
10566     }
10567     return;
10568 }
10569
10570 #define X_GLvop_IsFramebufferEXT 1425
10571 GLboolean
10572 __indirect_glIsFramebufferEXT(GLuint framebuffer)
10573 {
10574     struct glx_context *const gc = __glXGetCurrentContext();
10575     Display *const dpy = gc->currentDpy;
10576     GLboolean retval = (GLboolean) 0;
10577     const GLuint cmdlen = 4;
10578     if (__builtin_expect(dpy != NULL, 1)) {
10579         GLubyte const *pc =
10580             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10581                                     X_GLvop_IsFramebufferEXT, cmdlen);
10582         (void) memcpy((void *) (pc + 0), (void *) (&framebuffer), 4);
10583         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10584         UnlockDisplay(dpy);
10585         SyncHandle();
10586     }
10587     return retval;
10588 }
10589
10590 #define X_GLvop_IsRenderbufferEXT 1422
10591 GLboolean
10592 __indirect_glIsRenderbufferEXT(GLuint renderbuffer)
10593 {
10594     struct glx_context *const gc = __glXGetCurrentContext();
10595     Display *const dpy = gc->currentDpy;
10596     GLboolean retval = (GLboolean) 0;
10597     const GLuint cmdlen = 4;
10598     if (__builtin_expect(dpy != NULL, 1)) {
10599         GLubyte const *pc =
10600             __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10601                                     X_GLvop_IsRenderbufferEXT, cmdlen);
10602         (void) memcpy((void *) (pc + 0), (void *) (&renderbuffer), 4);
10603         retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10604         UnlockDisplay(dpy);
10605         SyncHandle();
10606     }
10607     return retval;
10608 }
10609
10610 #define X_GLrop_RenderbufferStorageEXT 4318
10611 void
10612 __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
10613                                     GLsizei width, GLsizei height)
10614 {
10615     struct glx_context *const gc = __glXGetCurrentContext();
10616     const GLuint cmdlen = 20;
10617     emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
10618     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10619     (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
10620     (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
10621     (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
10622     gc->pc += cmdlen;
10623     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10624         (void) __glXFlushRenderBuffer(gc, gc->pc);
10625     }
10626 }
10627
10628 #define X_GLrop_BlitFramebufferEXT 4330
10629 void
10630 __indirect_glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1,
10631                                 GLint srcY1, GLint dstX0, GLint dstY0,
10632                                 GLint dstX1, GLint dstY1, GLbitfield mask,
10633                                 GLenum filter)
10634 {
10635     struct glx_context *const gc = __glXGetCurrentContext();
10636     const GLuint cmdlen = 44;
10637     emit_header(gc->pc, X_GLrop_BlitFramebufferEXT, cmdlen);
10638     (void) memcpy((void *) (gc->pc + 4), (void *) (&srcX0), 4);
10639     (void) memcpy((void *) (gc->pc + 8), (void *) (&srcY0), 4);
10640     (void) memcpy((void *) (gc->pc + 12), (void *) (&srcX1), 4);
10641     (void) memcpy((void *) (gc->pc + 16), (void *) (&srcY1), 4);
10642     (void) memcpy((void *) (gc->pc + 20), (void *) (&dstX0), 4);
10643     (void) memcpy((void *) (gc->pc + 24), (void *) (&dstY0), 4);
10644     (void) memcpy((void *) (gc->pc + 28), (void *) (&dstX1), 4);
10645     (void) memcpy((void *) (gc->pc + 32), (void *) (&dstY1), 4);
10646     (void) memcpy((void *) (gc->pc + 36), (void *) (&mask), 4);
10647     (void) memcpy((void *) (gc->pc + 40), (void *) (&filter), 4);
10648     gc->pc += cmdlen;
10649     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10650         (void) __glXFlushRenderBuffer(gc, gc->pc);
10651     }
10652 }
10653
10654 #define X_GLrop_FramebufferTextureLayerEXT 237
10655 void
10656 __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment,
10657                                         GLuint texture, GLint level,
10658                                         GLint layer)
10659 {
10660     struct glx_context *const gc = __glXGetCurrentContext();
10661     const GLuint cmdlen = 24;
10662     emit_header(gc->pc, X_GLrop_FramebufferTextureLayerEXT, cmdlen);
10663     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10664     (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10665     (void) memcpy((void *) (gc->pc + 12), (void *) (&texture), 4);
10666     (void) memcpy((void *) (gc->pc + 16), (void *) (&level), 4);
10667     (void) memcpy((void *) (gc->pc + 20), (void *) (&layer), 4);
10668     gc->pc += cmdlen;
10669     if (__builtin_expect(gc->pc > gc->limit, 0)) {
10670         (void) __glXFlushRenderBuffer(gc, gc->pc);
10671     }
10672 }
10673
10674
10675 #ifdef GLX_SHARED_GLAPI
10676
10677 static const struct proc_pair {
10678     const char *name;
10679     _glapi_proc proc;
10680 } proc_pairs[20] = {
10681     {
10682     "AreTexturesResidentEXT", (_glapi_proc) glAreTexturesResidentEXT}, {
10683     "DeleteTexturesEXT", (_glapi_proc) glDeleteTexturesEXT}, {
10684     "GenTexturesEXT", (_glapi_proc) glGenTexturesEXT}, {
10685     "GetColorTableEXT", (_glapi_proc) glGetColorTableEXT}, {
10686     "GetColorTableParameterfvEXT",
10687             (_glapi_proc) glGetColorTableParameterfvEXT}, {
10688     "GetColorTableParameterfvSGI",
10689             (_glapi_proc) glGetColorTableParameterfvEXT}, {
10690     "GetColorTableParameterivEXT",
10691             (_glapi_proc) glGetColorTableParameterivEXT}, {
10692     "GetColorTableParameterivSGI",
10693             (_glapi_proc) glGetColorTableParameterivEXT}, {
10694     "GetColorTableSGI", (_glapi_proc) glGetColorTableEXT}, {
10695     "GetConvolutionFilterEXT", (_glapi_proc) gl_dispatch_stub_356}, {
10696     "GetConvolutionParameterfvEXT", (_glapi_proc) gl_dispatch_stub_357}, {
10697     "GetConvolutionParameterivEXT", (_glapi_proc) gl_dispatch_stub_358}, {
10698     "GetHistogramEXT", (_glapi_proc) gl_dispatch_stub_361}, {
10699     "GetHistogramParameterfvEXT", (_glapi_proc) gl_dispatch_stub_362}, {
10700     "GetHistogramParameterivEXT", (_glapi_proc) gl_dispatch_stub_363}, {
10701     "GetMinmaxEXT", (_glapi_proc) gl_dispatch_stub_364}, {
10702     "GetMinmaxParameterfvEXT", (_glapi_proc) gl_dispatch_stub_365}, {
10703     "GetMinmaxParameterivEXT", (_glapi_proc) gl_dispatch_stub_366}, {
10704     "GetSeparableFilterEXT", (_glapi_proc) gl_dispatch_stub_359}, {
10705     "IsTextureEXT", (_glapi_proc) glIsTextureEXT}
10706 };
10707
10708 static int
10709 __indirect_get_proc_compare(const void *key, const void *memb)
10710 {
10711     const struct proc_pair *pair = (const struct proc_pair *) memb;
10712     return strcmp((const char *) key, pair->name);
10713 }
10714
10715 _glapi_proc
10716 __indirect_get_proc_address(const char *name)
10717 {
10718     const struct proc_pair *pair;
10719
10720     /* skip "gl" */
10721     name += 2;
10722
10723     pair = (const struct proc_pair *) bsearch((const void *) name,
10724                                               (const void *) proc_pairs,
10725                                               ARRAY_SIZE(proc_pairs),
10726                                               sizeof(proc_pairs[0]),
10727                                               __indirect_get_proc_compare);
10728
10729     return (pair) ? pair->proc : NULL;
10730 }
10731
10732 #endif /* GLX_SHARED_GLAPI */
10733
10734
10735 #undef FASTCALL
10736 #undef NOINLINE