1/* DO NOT EDIT - This file generated automatically by glX_proto_send.py (from Mesa) script */
2
3/*
4 * (C) Copyright IBM Corporation 2004, 2005
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sub license,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the next
15 * paragraph) shall be included in all copies or substantial portions of the
16 * Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
21 * IBM,
22 * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 */
27
28
29#include <GL/gl.h>
30#include "indirect.h"
31#include "glxclient.h"
32#include "indirect_size.h"
33#include "glapi.h"
34#include <GL/glxproto.h>
35#include <X11/Xlib-xcb.h>
36#include <xcb/xcb.h>
37#include <xcb/glx.h>
38#include <limits.h>
39
40#  if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
41#    define FASTCALL __attribute__((fastcall))
42#  else
43#    define FASTCALL
44#  endif
45#  if defined(__GNUC__)
46#    define NOINLINE __attribute__((noinline))
47#  else
48#    define NOINLINE
49#  endif
50
51static _X_INLINE int safe_add(int a, int b)
52{
53    if (a < 0 || b < 0) return -1;
54    if (INT_MAX - a < b) return -1;
55    return a + b;
56}
57static _X_INLINE int safe_mul(int a, int b)
58{
59    if (a < 0 || b < 0) return -1;
60    if (a == 0 || b == 0) return 0;
61    if (a > INT_MAX / b) return -1;
62    return a * b;
63}
64static _X_INLINE int safe_pad(int a)
65{
66    int ret;
67    if (a < 0) return -1;
68    if ((ret = safe_add(a, 3)) < 0) return -1;
69    return ret & (GLuint)~3;
70}
71
72#ifndef __GNUC__
73#  define __builtin_expect(x, y) x
74#endif
75
76/* If the size and opcode values are known at compile-time, this will, on
77 * x86 at least, emit them with a single instruction.
78 */
79#define emit_header(dest, op, size)            \
80    do { union { short s[2]; int i; } temp;    \
81         temp.s[0] = (size); temp.s[1] = (op); \
82         *((int *)(dest)) = temp.i; } while(0)
83
84NOINLINE CARD32
85__glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_array )
86{
87    xGLXSingleReply reply;
88
89    (void) _XReply(dpy, (xReply *) & reply, 0, False);
90    if (size != 0) {
91        if ((reply.length > 0) || reply_is_always_array) {
92            const GLint bytes = (reply_is_always_array)
93              ? (4 * reply.length) : (reply.size * size);
94            const GLint extra = 4 - (bytes & 3);
95
96            _XRead(dpy, dest, bytes);
97            if ( extra < 4 ) {
98                _XEatData(dpy, extra);
99            }
100        }
101        else {
102            (void) memcpy( dest, &(reply.pad3), size);
103        }
104    }
105
106    return reply.retval;
107}
108
109NOINLINE void
110__glXReadPixelReply( Display *dpy, struct glx_context * gc, unsigned max_dim,
111    GLint width, GLint height, GLint depth, GLenum format, GLenum type,
112    void * dest, GLboolean dimensions_in_reply )
113{
114    xGLXSingleReply reply;
115    GLint size;
116
117    (void) _XReply(dpy, (xReply *) & reply, 0, False);
118
119    if ( dimensions_in_reply ) {
120        width  = reply.pad3;
121        height = reply.pad4;
122        depth  = reply.pad5;
123
124	if ((height == 0) || (max_dim < 2)) { height = 1; }
125	if ((depth  == 0) || (max_dim < 3)) { depth  = 1; }
126    }
127
128    size = reply.length * 4;
129    if (size != 0) {
130        void * buf = malloc( size );
131
132        if ( buf == NULL ) {
133            _XEatData(dpy, size);
134            __glXSetError(gc, GL_OUT_OF_MEMORY);
135        }
136        else {
137            const GLint extra = 4 - (size & 3);
138
139            _XRead(dpy, buf, size);
140            if ( extra < 4 ) {
141                _XEatData(dpy, extra);
142            }
143
144            __glEmptyImage(gc, 3, width, height, depth, format, type,
145                           buf, dest);
146            free(buf);
147        }
148    }
149}
150
151#define X_GLXSingle 0
152
153NOINLINE FASTCALL GLubyte *
154__glXSetupSingleRequest( struct glx_context * gc, GLint sop, GLint cmdlen )
155{
156    xGLXSingleReq * req;
157    Display * const dpy = gc->currentDpy;
158
159    (void) __glXFlushRenderBuffer(gc, gc->pc);
160    LockDisplay(dpy);
161    GetReqExtra(GLXSingle, cmdlen, req);
162    req->reqType = gc->majorOpcode;
163    req->contextTag = gc->currentContextTag;
164    req->glxCode = sop;
165    return (GLubyte *)(req) + sz_xGLXSingleReq;
166}
167
168NOINLINE FASTCALL GLubyte *
169__glXSetupVendorRequest( struct glx_context * gc, GLint code, GLint vop, GLint cmdlen )
170{
171    xGLXVendorPrivateReq * req;
172    Display * const dpy = gc->currentDpy;
173
174    (void) __glXFlushRenderBuffer(gc, gc->pc);
175    LockDisplay(dpy);
176    GetReqExtra(GLXVendorPrivate, cmdlen, req);
177    req->reqType = gc->majorOpcode;
178    req->glxCode = code;
179    req->vendorCode = vop;
180    req->contextTag = gc->currentContextTag;
181    return (GLubyte *)(req) + sz_xGLXVendorPrivateReq;
182}
183
184const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
185
186#define zero                        (__glXDefaultPixelStore+0)
187#define one                         (__glXDefaultPixelStore+8)
188#define default_pixel_store_1D      (__glXDefaultPixelStore+4)
189#define default_pixel_store_1D_size 20
190#define default_pixel_store_2D      (__glXDefaultPixelStore+4)
191#define default_pixel_store_2D_size 20
192#define default_pixel_store_3D      (__glXDefaultPixelStore+0)
193#define default_pixel_store_3D_size 36
194#define default_pixel_store_4D      (__glXDefaultPixelStore+0)
195#define default_pixel_store_4D_size 36
196
197static FASTCALL NOINLINE void
198generic_3_byte( GLint rop, const void * ptr )
199{
200    struct glx_context * const gc = __glXGetCurrentContext();
201    const GLuint cmdlen = 8;
202
203    emit_header(gc->pc, rop, cmdlen);
204    (void) memcpy((void *)(gc->pc + 4), ptr, 4);
205    gc->pc += cmdlen;
206    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
207}
208
209static FASTCALL NOINLINE void
210generic_4_byte( GLint rop, const void * ptr )
211{
212    struct glx_context * const gc = __glXGetCurrentContext();
213    const GLuint cmdlen = 8;
214
215    emit_header(gc->pc, rop, cmdlen);
216    (void) memcpy((void *)(gc->pc + 4), ptr, 4);
217    gc->pc += cmdlen;
218    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
219}
220
221static FASTCALL NOINLINE void
222generic_6_byte( GLint rop, const void * ptr )
223{
224    struct glx_context * const gc = __glXGetCurrentContext();
225    const GLuint cmdlen = 12;
226
227    emit_header(gc->pc, rop, cmdlen);
228    (void) memcpy((void *)(gc->pc + 4), ptr, 8);
229    gc->pc += cmdlen;
230    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
231}
232
233static FASTCALL NOINLINE void
234generic_8_byte( GLint rop, const void * ptr )
235{
236    struct glx_context * const gc = __glXGetCurrentContext();
237    const GLuint cmdlen = 12;
238
239    emit_header(gc->pc, rop, cmdlen);
240    (void) memcpy((void *)(gc->pc + 4), ptr, 8);
241    gc->pc += cmdlen;
242    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
243}
244
245static FASTCALL NOINLINE void
246generic_12_byte( GLint rop, const void * ptr )
247{
248    struct glx_context * const gc = __glXGetCurrentContext();
249    const GLuint cmdlen = 16;
250
251    emit_header(gc->pc, rop, cmdlen);
252    (void) memcpy((void *)(gc->pc + 4), ptr, 12);
253    gc->pc += cmdlen;
254    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
255}
256
257static FASTCALL NOINLINE void
258generic_16_byte( GLint rop, const void * ptr )
259{
260    struct glx_context * const gc = __glXGetCurrentContext();
261    const GLuint cmdlen = 20;
262
263    emit_header(gc->pc, rop, cmdlen);
264    (void) memcpy((void *)(gc->pc + 4), ptr, 16);
265    gc->pc += cmdlen;
266    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
267}
268
269static FASTCALL NOINLINE void
270generic_24_byte( GLint rop, const void * ptr )
271{
272    struct glx_context * const gc = __glXGetCurrentContext();
273    const GLuint cmdlen = 28;
274
275    emit_header(gc->pc, rop, cmdlen);
276    (void) memcpy((void *)(gc->pc + 4), ptr, 24);
277    gc->pc += cmdlen;
278    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
279}
280
281static FASTCALL NOINLINE void
282generic_32_byte( GLint rop, const void * ptr )
283{
284    struct glx_context * const gc = __glXGetCurrentContext();
285    const GLuint cmdlen = 36;
286
287    emit_header(gc->pc, rop, cmdlen);
288    (void) memcpy((void *)(gc->pc + 4), ptr, 32);
289    gc->pc += cmdlen;
290    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
291}
292
293#define X_GLsop_NewList 101
294void __indirect_glNewList(GLuint list, GLenum mode)
295{
296    struct glx_context * const gc = __glXGetCurrentContext();
297    Display * const dpy = gc->currentDpy;
298#ifndef USE_XCB
299    const GLuint cmdlen = 8;
300#endif
301    if (__builtin_expect(dpy != NULL, 1)) {
302#ifdef USE_XCB
303        xcb_connection_t *c = XGetXCBConnection(dpy);
304        (void) __glXFlushRenderBuffer(gc, gc->pc);
305        xcb_glx_new_list(c, gc->currentContextTag, list, mode);
306#else
307        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
308(void) memcpy((void *)(pc + 0), (void *)(&list), 4);
309(void) memcpy((void *)(pc + 4), (void *)(&mode), 4);
310        UnlockDisplay(dpy); SyncHandle();
311#endif /* USE_XCB */
312    }
313    return;
314}
315
316#define X_GLsop_EndList 102
317void __indirect_glEndList(void)
318{
319    struct glx_context * const gc = __glXGetCurrentContext();
320    Display * const dpy = gc->currentDpy;
321#ifndef USE_XCB
322    const GLuint cmdlen = 0;
323#endif
324    if (__builtin_expect(dpy != NULL, 1)) {
325#ifdef USE_XCB
326        xcb_connection_t *c = XGetXCBConnection(dpy);
327        (void) __glXFlushRenderBuffer(gc, gc->pc);
328        xcb_glx_end_list(c, gc->currentContextTag);
329#else
330        (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
331        UnlockDisplay(dpy); SyncHandle();
332#endif /* USE_XCB */
333    }
334    return;
335}
336
337#define X_GLrop_CallList 1
338void __indirect_glCallList(GLuint list)
339{
340    struct glx_context * const gc = __glXGetCurrentContext();
341    const GLuint cmdlen = 8;
342emit_header(gc->pc, X_GLrop_CallList, cmdlen);
343(void) memcpy((void *)(gc->pc + 4), (void *)(&list), 4);
344gc->pc += cmdlen;
345if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
346}
347
348#define X_GLrop_CallLists 2
349void __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
350{
351    struct glx_context * const gc = __glXGetCurrentContext();
352    const GLuint compsize = __glCallLists_size(type);
353    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, n));
354    if (0 + safe_pad(safe_mul(compsize, n)) < 0) {
355        __glXSetError(gc, GL_INVALID_VALUE);
356        return;
357    }
358    if (n < 0) {
359        __glXSetError(gc, GL_INVALID_VALUE);
360        return;
361    }
362    if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
363if (cmdlen <= gc->maxSmallRenderCommandSize) {
364    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
365        (void) __glXFlushRenderBuffer(gc, gc->pc);
366    }
367emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
368(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
369(void) memcpy((void *)(gc->pc + 8), (void *)(&type), 4);
370(void) memcpy((void *)(gc->pc + 12), (void *)(lists), safe_mul(compsize, n));
371gc->pc += cmdlen;
372if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
373}
374else {
375const GLint op = X_GLrop_CallLists;
376const GLuint cmdlenLarge = cmdlen + 4;
377GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
378(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
379(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
380(void) memcpy((void *)(pc + 8), (void *)(&n), 4);
381(void) memcpy((void *)(pc + 12), (void *)(&type), 4);
382    __glXSendLargeCommand(gc, pc, 16, lists, safe_mul(compsize, n));
383}
384    }
385}
386
387#define X_GLsop_DeleteLists 103
388void __indirect_glDeleteLists(GLuint list, GLsizei range)
389{
390    struct glx_context * const gc = __glXGetCurrentContext();
391    Display * const dpy = gc->currentDpy;
392#ifndef USE_XCB
393    const GLuint cmdlen = 8;
394#endif
395    if (__builtin_expect(dpy != NULL, 1)) {
396#ifdef USE_XCB
397        xcb_connection_t *c = XGetXCBConnection(dpy);
398        (void) __glXFlushRenderBuffer(gc, gc->pc);
399        xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
400#else
401        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
402(void) memcpy((void *)(pc + 0), (void *)(&list), 4);
403(void) memcpy((void *)(pc + 4), (void *)(&range), 4);
404        UnlockDisplay(dpy); SyncHandle();
405#endif /* USE_XCB */
406    }
407    return;
408}
409
410#define X_GLsop_GenLists 104
411GLuint __indirect_glGenLists(GLsizei range)
412{
413    struct glx_context * const gc = __glXGetCurrentContext();
414    Display * const dpy = gc->currentDpy;
415    GLuint retval = (GLuint) 0;
416#ifndef USE_XCB
417    const GLuint cmdlen = 4;
418#endif
419    if (__builtin_expect(dpy != NULL, 1)) {
420#ifdef USE_XCB
421        xcb_connection_t *c = XGetXCBConnection(dpy);
422        (void) __glXFlushRenderBuffer(gc, gc->pc);
423        xcb_glx_gen_lists_reply_t *reply = xcb_glx_gen_lists_reply(c, xcb_glx_gen_lists(c, gc->currentContextTag, range), NULL);
424        retval = reply->ret_val;
425        free(reply);
426#else
427        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
428(void) memcpy((void *)(pc + 0), (void *)(&range), 4);
429        retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
430        UnlockDisplay(dpy); SyncHandle();
431#endif /* USE_XCB */
432    }
433    return retval;
434}
435
436#define X_GLrop_ListBase 3
437void __indirect_glListBase(GLuint base)
438{
439    struct glx_context * const gc = __glXGetCurrentContext();
440    const GLuint cmdlen = 8;
441emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
442(void) memcpy((void *)(gc->pc + 4), (void *)(&base), 4);
443gc->pc += cmdlen;
444if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
445}
446
447#define X_GLrop_Begin 4
448void __indirect_glBegin(GLenum mode)
449{
450    struct glx_context * const gc = __glXGetCurrentContext();
451    const GLuint cmdlen = 8;
452emit_header(gc->pc, X_GLrop_Begin, cmdlen);
453(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
454gc->pc += cmdlen;
455if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
456}
457
458#define X_GLrop_Bitmap 5
459void __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap)
460{
461    struct glx_context * const gc = __glXGetCurrentContext();
462    const GLuint compsize = (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
463    const GLuint cmdlen = 48 + safe_pad(compsize);
464    if (0 + safe_pad(compsize) < 0) {
465        __glXSetError(gc, GL_INVALID_VALUE);
466        return;
467    }
468    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
469if (cmdlen <= gc->maxSmallRenderCommandSize) {
470    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
471        (void) __glXFlushRenderBuffer(gc, gc->pc);
472    }
473emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
474(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
475(void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
476(void) memcpy((void *)(gc->pc + 32), (void *)(&xorig), 4);
477(void) memcpy((void *)(gc->pc + 36), (void *)(&yorig), 4);
478(void) memcpy((void *)(gc->pc + 40), (void *)(&xmove), 4);
479(void) memcpy((void *)(gc->pc + 44), (void *)(&ymove), 4);
480if (compsize > 0) {
481    gc->fillImage(gc, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
482} else {
483    (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
484}
485gc->pc += cmdlen;
486if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
487}
488else {
489const GLint op = X_GLrop_Bitmap;
490const GLuint cmdlenLarge = cmdlen + 4;
491GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
492(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
493(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
494(void) memcpy((void *)(pc + 28), (void *)(&width), 4);
495(void) memcpy((void *)(pc + 32), (void *)(&height), 4);
496(void) memcpy((void *)(pc + 36), (void *)(&xorig), 4);
497(void) memcpy((void *)(pc + 40), (void *)(&yorig), 4);
498(void) memcpy((void *)(pc + 44), (void *)(&xmove), 4);
499(void) memcpy((void *)(pc + 48), (void *)(&ymove), 4);
500__glXSendLargeImage(gc, compsize, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52, pc + 8);
501}
502    }
503}
504
505#define X_GLrop_Color3bv 6
506void __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
507{
508    struct glx_context * const gc = __glXGetCurrentContext();
509    const GLuint cmdlen = 8;
510emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
511(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
512(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
513(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
514gc->pc += cmdlen;
515if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
516}
517
518#define X_GLrop_Color3bv 6
519void __indirect_glColor3bv(const GLbyte * v)
520{
521    generic_3_byte( X_GLrop_Color3bv, v );
522}
523
524#define X_GLrop_Color3dv 7
525void __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
526{
527    struct glx_context * const gc = __glXGetCurrentContext();
528    const GLuint cmdlen = 28;
529emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
530(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
531(void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
532(void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
533gc->pc += cmdlen;
534if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
535}
536
537#define X_GLrop_Color3dv 7
538void __indirect_glColor3dv(const GLdouble * v)
539{
540    generic_24_byte( X_GLrop_Color3dv, v );
541}
542
543#define X_GLrop_Color3fv 8
544void __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
545{
546    struct glx_context * const gc = __glXGetCurrentContext();
547    const GLuint cmdlen = 16;
548emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
549(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
550(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
551(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
552gc->pc += cmdlen;
553if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
554}
555
556#define X_GLrop_Color3fv 8
557void __indirect_glColor3fv(const GLfloat * v)
558{
559    generic_12_byte( X_GLrop_Color3fv, v );
560}
561
562#define X_GLrop_Color3iv 9
563void __indirect_glColor3i(GLint red, GLint green, GLint blue)
564{
565    struct glx_context * const gc = __glXGetCurrentContext();
566    const GLuint cmdlen = 16;
567emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
568(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
569(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
570(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
571gc->pc += cmdlen;
572if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
573}
574
575#define X_GLrop_Color3iv 9
576void __indirect_glColor3iv(const GLint * v)
577{
578    generic_12_byte( X_GLrop_Color3iv, v );
579}
580
581#define X_GLrop_Color3sv 10
582void __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
583{
584    struct glx_context * const gc = __glXGetCurrentContext();
585    const GLuint cmdlen = 12;
586emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
587(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
588(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
589(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
590gc->pc += cmdlen;
591if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
592}
593
594#define X_GLrop_Color3sv 10
595void __indirect_glColor3sv(const GLshort * v)
596{
597    generic_6_byte( X_GLrop_Color3sv, v );
598}
599
600#define X_GLrop_Color3ubv 11
601void __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
602{
603    struct glx_context * const gc = __glXGetCurrentContext();
604    const GLuint cmdlen = 8;
605emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
606(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
607(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
608(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
609gc->pc += cmdlen;
610if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
611}
612
613#define X_GLrop_Color3ubv 11
614void __indirect_glColor3ubv(const GLubyte * v)
615{
616    generic_3_byte( X_GLrop_Color3ubv, v );
617}
618
619#define X_GLrop_Color3uiv 12
620void __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
621{
622    struct glx_context * const gc = __glXGetCurrentContext();
623    const GLuint cmdlen = 16;
624emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
625(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
626(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
627(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
628gc->pc += cmdlen;
629if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
630}
631
632#define X_GLrop_Color3uiv 12
633void __indirect_glColor3uiv(const GLuint * v)
634{
635    generic_12_byte( X_GLrop_Color3uiv, v );
636}
637
638#define X_GLrop_Color3usv 13
639void __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
640{
641    struct glx_context * const gc = __glXGetCurrentContext();
642    const GLuint cmdlen = 12;
643emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
644(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
645(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
646(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
647gc->pc += cmdlen;
648if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
649}
650
651#define X_GLrop_Color3usv 13
652void __indirect_glColor3usv(const GLushort * v)
653{
654    generic_6_byte( X_GLrop_Color3usv, v );
655}
656
657#define X_GLrop_Color4bv 14
658void __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
659{
660    struct glx_context * const gc = __glXGetCurrentContext();
661    const GLuint cmdlen = 8;
662emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
663(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
664(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
665(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
666(void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
667gc->pc += cmdlen;
668if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
669}
670
671#define X_GLrop_Color4bv 14
672void __indirect_glColor4bv(const GLbyte * v)
673{
674    generic_4_byte( X_GLrop_Color4bv, v );
675}
676
677#define X_GLrop_Color4dv 15
678void __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
679{
680    struct glx_context * const gc = __glXGetCurrentContext();
681    const GLuint cmdlen = 36;
682emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
683(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
684(void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
685(void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
686(void) memcpy((void *)(gc->pc + 28), (void *)(&alpha), 8);
687gc->pc += cmdlen;
688if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
689}
690
691#define X_GLrop_Color4dv 15
692void __indirect_glColor4dv(const GLdouble * v)
693{
694    generic_32_byte( X_GLrop_Color4dv, v );
695}
696
697#define X_GLrop_Color4fv 16
698void __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
699{
700    struct glx_context * const gc = __glXGetCurrentContext();
701    const GLuint cmdlen = 20;
702emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
703(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
704(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
705(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
706(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
707gc->pc += cmdlen;
708if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
709}
710
711#define X_GLrop_Color4fv 16
712void __indirect_glColor4fv(const GLfloat * v)
713{
714    generic_16_byte( X_GLrop_Color4fv, v );
715}
716
717#define X_GLrop_Color4iv 17
718void __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
719{
720    struct glx_context * const gc = __glXGetCurrentContext();
721    const GLuint cmdlen = 20;
722emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
723(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
724(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
725(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
726(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
727gc->pc += cmdlen;
728if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
729}
730
731#define X_GLrop_Color4iv 17
732void __indirect_glColor4iv(const GLint * v)
733{
734    generic_16_byte( X_GLrop_Color4iv, v );
735}
736
737#define X_GLrop_Color4sv 18
738void __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
739{
740    struct glx_context * const gc = __glXGetCurrentContext();
741    const GLuint cmdlen = 12;
742emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
743(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
744(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
745(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
746(void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2);
747gc->pc += cmdlen;
748if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
749}
750
751#define X_GLrop_Color4sv 18
752void __indirect_glColor4sv(const GLshort * v)
753{
754    generic_8_byte( X_GLrop_Color4sv, v );
755}
756
757#define X_GLrop_Color4ubv 19
758void __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
759{
760    struct glx_context * const gc = __glXGetCurrentContext();
761    const GLuint cmdlen = 8;
762emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
763(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
764(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
765(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
766(void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
767gc->pc += cmdlen;
768if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
769}
770
771#define X_GLrop_Color4ubv 19
772void __indirect_glColor4ubv(const GLubyte * v)
773{
774    generic_4_byte( X_GLrop_Color4ubv, v );
775}
776
777#define X_GLrop_Color4uiv 20
778void __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
779{
780    struct glx_context * const gc = __glXGetCurrentContext();
781    const GLuint cmdlen = 20;
782emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
783(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
784(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
785(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
786(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
787gc->pc += cmdlen;
788if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
789}
790
791#define X_GLrop_Color4uiv 20
792void __indirect_glColor4uiv(const GLuint * v)
793{
794    generic_16_byte( X_GLrop_Color4uiv, v );
795}
796
797#define X_GLrop_Color4usv 21
798void __indirect_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
799{
800    struct glx_context * const gc = __glXGetCurrentContext();
801    const GLuint cmdlen = 12;
802emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
803(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
804(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
805(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
806(void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2);
807gc->pc += cmdlen;
808if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
809}
810
811#define X_GLrop_Color4usv 21
812void __indirect_glColor4usv(const GLushort * v)
813{
814    generic_8_byte( X_GLrop_Color4usv, v );
815}
816
817#define X_GLrop_EdgeFlagv 22
818void __indirect_glEdgeFlag(GLboolean flag)
819{
820    struct glx_context * const gc = __glXGetCurrentContext();
821    const GLuint cmdlen = 8;
822emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
823(void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
824gc->pc += cmdlen;
825if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
826}
827
828#define X_GLrop_EdgeFlagv 22
829void __indirect_glEdgeFlagv(const GLboolean * flag)
830{
831    struct glx_context * const gc = __glXGetCurrentContext();
832    const GLuint cmdlen = 8;
833emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
834(void) memcpy((void *)(gc->pc + 4), (void *)(flag), 1);
835gc->pc += cmdlen;
836if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
837}
838
839#define X_GLrop_End 23
840void __indirect_glEnd(void)
841{
842    struct glx_context * const gc = __glXGetCurrentContext();
843    const GLuint cmdlen = 4;
844emit_header(gc->pc, X_GLrop_End, cmdlen);
845gc->pc += cmdlen;
846if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
847}
848
849#define X_GLrop_Indexdv 24
850void __indirect_glIndexd(GLdouble c)
851{
852    struct glx_context * const gc = __glXGetCurrentContext();
853    const GLuint cmdlen = 12;
854emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
855(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 8);
856gc->pc += cmdlen;
857if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
858}
859
860#define X_GLrop_Indexdv 24
861void __indirect_glIndexdv(const GLdouble * c)
862{
863    generic_8_byte( X_GLrop_Indexdv, c );
864}
865
866#define X_GLrop_Indexfv 25
867void __indirect_glIndexf(GLfloat c)
868{
869    struct glx_context * const gc = __glXGetCurrentContext();
870    const GLuint cmdlen = 8;
871emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
872(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
873gc->pc += cmdlen;
874if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
875}
876
877#define X_GLrop_Indexfv 25
878void __indirect_glIndexfv(const GLfloat * c)
879{
880    generic_4_byte( X_GLrop_Indexfv, c );
881}
882
883#define X_GLrop_Indexiv 26
884void __indirect_glIndexi(GLint c)
885{
886    struct glx_context * const gc = __glXGetCurrentContext();
887    const GLuint cmdlen = 8;
888emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
889(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
890gc->pc += cmdlen;
891if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
892}
893
894#define X_GLrop_Indexiv 26
895void __indirect_glIndexiv(const GLint * c)
896{
897    generic_4_byte( X_GLrop_Indexiv, c );
898}
899
900#define X_GLrop_Indexsv 27
901void __indirect_glIndexs(GLshort c)
902{
903    struct glx_context * const gc = __glXGetCurrentContext();
904    const GLuint cmdlen = 8;
905emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
906(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 2);
907gc->pc += cmdlen;
908if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
909}
910
911#define X_GLrop_Indexsv 27
912void __indirect_glIndexsv(const GLshort * c)
913{
914    struct glx_context * const gc = __glXGetCurrentContext();
915    const GLuint cmdlen = 8;
916emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
917(void) memcpy((void *)(gc->pc + 4), (void *)(c), 2);
918gc->pc += cmdlen;
919if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
920}
921
922#define X_GLrop_Normal3bv 28
923void __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
924{
925    struct glx_context * const gc = __glXGetCurrentContext();
926    const GLuint cmdlen = 8;
927emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
928(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 1);
929(void) memcpy((void *)(gc->pc + 5), (void *)(&ny), 1);
930(void) memcpy((void *)(gc->pc + 6), (void *)(&nz), 1);
931gc->pc += cmdlen;
932if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
933}
934
935#define X_GLrop_Normal3bv 28
936void __indirect_glNormal3bv(const GLbyte * v)
937{
938    generic_3_byte( X_GLrop_Normal3bv, v );
939}
940
941#define X_GLrop_Normal3dv 29
942void __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
943{
944    struct glx_context * const gc = __glXGetCurrentContext();
945    const GLuint cmdlen = 28;
946emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
947(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 8);
948(void) memcpy((void *)(gc->pc + 12), (void *)(&ny), 8);
949(void) memcpy((void *)(gc->pc + 20), (void *)(&nz), 8);
950gc->pc += cmdlen;
951if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
952}
953
954#define X_GLrop_Normal3dv 29
955void __indirect_glNormal3dv(const GLdouble * v)
956{
957    generic_24_byte( X_GLrop_Normal3dv, v );
958}
959
960#define X_GLrop_Normal3fv 30
961void __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
962{
963    struct glx_context * const gc = __glXGetCurrentContext();
964    const GLuint cmdlen = 16;
965emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
966(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4);
967(void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4);
968(void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4);
969gc->pc += cmdlen;
970if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
971}
972
973#define X_GLrop_Normal3fv 30
974void __indirect_glNormal3fv(const GLfloat * v)
975{
976    generic_12_byte( X_GLrop_Normal3fv, v );
977}
978
979#define X_GLrop_Normal3iv 31
980void __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
981{
982    struct glx_context * const gc = __glXGetCurrentContext();
983    const GLuint cmdlen = 16;
984emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
985(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4);
986(void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4);
987(void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4);
988gc->pc += cmdlen;
989if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
990}
991
992#define X_GLrop_Normal3iv 31
993void __indirect_glNormal3iv(const GLint * v)
994{
995    generic_12_byte( X_GLrop_Normal3iv, v );
996}
997
998#define X_GLrop_Normal3sv 32
999void __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
1000{
1001    struct glx_context * const gc = __glXGetCurrentContext();
1002    const GLuint cmdlen = 12;
1003emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
1004(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 2);
1005(void) memcpy((void *)(gc->pc + 6), (void *)(&ny), 2);
1006(void) memcpy((void *)(gc->pc + 8), (void *)(&nz), 2);
1007gc->pc += cmdlen;
1008if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1009}
1010
1011#define X_GLrop_Normal3sv 32
1012void __indirect_glNormal3sv(const GLshort * v)
1013{
1014    generic_6_byte( X_GLrop_Normal3sv, v );
1015}
1016
1017#define X_GLrop_RasterPos2dv 33
1018void __indirect_glRasterPos2d(GLdouble x, GLdouble y)
1019{
1020    struct glx_context * const gc = __glXGetCurrentContext();
1021    const GLuint cmdlen = 20;
1022emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
1023(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1024(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1025gc->pc += cmdlen;
1026if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1027}
1028
1029#define X_GLrop_RasterPos2dv 33
1030void __indirect_glRasterPos2dv(const GLdouble * v)
1031{
1032    generic_16_byte( X_GLrop_RasterPos2dv, v );
1033}
1034
1035#define X_GLrop_RasterPos2fv 34
1036void __indirect_glRasterPos2f(GLfloat x, GLfloat y)
1037{
1038    struct glx_context * const gc = __glXGetCurrentContext();
1039    const GLuint cmdlen = 12;
1040emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
1041(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1042(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1043gc->pc += cmdlen;
1044if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1045}
1046
1047#define X_GLrop_RasterPos2fv 34
1048void __indirect_glRasterPos2fv(const GLfloat * v)
1049{
1050    generic_8_byte( X_GLrop_RasterPos2fv, v );
1051}
1052
1053#define X_GLrop_RasterPos2iv 35
1054void __indirect_glRasterPos2i(GLint x, GLint y)
1055{
1056    struct glx_context * const gc = __glXGetCurrentContext();
1057    const GLuint cmdlen = 12;
1058emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
1059(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1060(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1061gc->pc += cmdlen;
1062if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1063}
1064
1065#define X_GLrop_RasterPos2iv 35
1066void __indirect_glRasterPos2iv(const GLint * v)
1067{
1068    generic_8_byte( X_GLrop_RasterPos2iv, v );
1069}
1070
1071#define X_GLrop_RasterPos2sv 36
1072void __indirect_glRasterPos2s(GLshort x, GLshort y)
1073{
1074    struct glx_context * const gc = __glXGetCurrentContext();
1075    const GLuint cmdlen = 8;
1076emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
1077(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1078(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1079gc->pc += cmdlen;
1080if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1081}
1082
1083#define X_GLrop_RasterPos2sv 36
1084void __indirect_glRasterPos2sv(const GLshort * v)
1085{
1086    generic_4_byte( X_GLrop_RasterPos2sv, v );
1087}
1088
1089#define X_GLrop_RasterPos3dv 37
1090void __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
1091{
1092    struct glx_context * const gc = __glXGetCurrentContext();
1093    const GLuint cmdlen = 28;
1094emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
1095(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1096(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1097(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
1098gc->pc += cmdlen;
1099if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1100}
1101
1102#define X_GLrop_RasterPos3dv 37
1103void __indirect_glRasterPos3dv(const GLdouble * v)
1104{
1105    generic_24_byte( X_GLrop_RasterPos3dv, v );
1106}
1107
1108#define X_GLrop_RasterPos3fv 38
1109void __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
1110{
1111    struct glx_context * const gc = __glXGetCurrentContext();
1112    const GLuint cmdlen = 16;
1113emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
1114(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1115(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1116(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1117gc->pc += cmdlen;
1118if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1119}
1120
1121#define X_GLrop_RasterPos3fv 38
1122void __indirect_glRasterPos3fv(const GLfloat * v)
1123{
1124    generic_12_byte( X_GLrop_RasterPos3fv, v );
1125}
1126
1127#define X_GLrop_RasterPos3iv 39
1128void __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
1129{
1130    struct glx_context * const gc = __glXGetCurrentContext();
1131    const GLuint cmdlen = 16;
1132emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
1133(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1134(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1135(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1136gc->pc += cmdlen;
1137if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1138}
1139
1140#define X_GLrop_RasterPos3iv 39
1141void __indirect_glRasterPos3iv(const GLint * v)
1142{
1143    generic_12_byte( X_GLrop_RasterPos3iv, v );
1144}
1145
1146#define X_GLrop_RasterPos3sv 40
1147void __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
1148{
1149    struct glx_context * const gc = __glXGetCurrentContext();
1150    const GLuint cmdlen = 12;
1151emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
1152(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1153(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1154(void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
1155gc->pc += cmdlen;
1156if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1157}
1158
1159#define X_GLrop_RasterPos3sv 40
1160void __indirect_glRasterPos3sv(const GLshort * v)
1161{
1162    generic_6_byte( X_GLrop_RasterPos3sv, v );
1163}
1164
1165#define X_GLrop_RasterPos4dv 41
1166void __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1167{
1168    struct glx_context * const gc = __glXGetCurrentContext();
1169    const GLuint cmdlen = 36;
1170emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
1171(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1172(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1173(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
1174(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
1175gc->pc += cmdlen;
1176if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1177}
1178
1179#define X_GLrop_RasterPos4dv 41
1180void __indirect_glRasterPos4dv(const GLdouble * v)
1181{
1182    generic_32_byte( X_GLrop_RasterPos4dv, v );
1183}
1184
1185#define X_GLrop_RasterPos4fv 42
1186void __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1187{
1188    struct glx_context * const gc = __glXGetCurrentContext();
1189    const GLuint cmdlen = 20;
1190emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
1191(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1192(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1193(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1194(void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
1195gc->pc += cmdlen;
1196if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1197}
1198
1199#define X_GLrop_RasterPos4fv 42
1200void __indirect_glRasterPos4fv(const GLfloat * v)
1201{
1202    generic_16_byte( X_GLrop_RasterPos4fv, v );
1203}
1204
1205#define X_GLrop_RasterPos4iv 43
1206void __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
1207{
1208    struct glx_context * const gc = __glXGetCurrentContext();
1209    const GLuint cmdlen = 20;
1210emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
1211(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1212(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1213(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1214(void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
1215gc->pc += cmdlen;
1216if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1217}
1218
1219#define X_GLrop_RasterPos4iv 43
1220void __indirect_glRasterPos4iv(const GLint * v)
1221{
1222    generic_16_byte( X_GLrop_RasterPos4iv, v );
1223}
1224
1225#define X_GLrop_RasterPos4sv 44
1226void __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
1227{
1228    struct glx_context * const gc = __glXGetCurrentContext();
1229    const GLuint cmdlen = 12;
1230emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
1231(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1232(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1233(void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
1234(void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2);
1235gc->pc += cmdlen;
1236if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1237}
1238
1239#define X_GLrop_RasterPos4sv 44
1240void __indirect_glRasterPos4sv(const GLshort * v)
1241{
1242    generic_8_byte( X_GLrop_RasterPos4sv, v );
1243}
1244
1245#define X_GLrop_Rectdv 45
1246void __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1247{
1248    struct glx_context * const gc = __glXGetCurrentContext();
1249    const GLuint cmdlen = 36;
1250emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1251(void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 8);
1252(void) memcpy((void *)(gc->pc + 12), (void *)(&y1), 8);
1253(void) memcpy((void *)(gc->pc + 20), (void *)(&x2), 8);
1254(void) memcpy((void *)(gc->pc + 28), (void *)(&y2), 8);
1255gc->pc += cmdlen;
1256if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1257}
1258
1259#define X_GLrop_Rectdv 45
1260void __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
1261{
1262    struct glx_context * const gc = __glXGetCurrentContext();
1263    const GLuint cmdlen = 36;
1264emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1265(void) memcpy((void *)(gc->pc + 4), (void *)(v1), 16);
1266(void) memcpy((void *)(gc->pc + 20), (void *)(v2), 16);
1267gc->pc += cmdlen;
1268if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1269}
1270
1271#define X_GLrop_Rectfv 46
1272void __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
1273{
1274    struct glx_context * const gc = __glXGetCurrentContext();
1275    const GLuint cmdlen = 20;
1276emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1277(void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4);
1278(void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4);
1279(void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4);
1280(void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4);
1281gc->pc += cmdlen;
1282if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1283}
1284
1285#define X_GLrop_Rectfv 46
1286void __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
1287{
1288    struct glx_context * const gc = __glXGetCurrentContext();
1289    const GLuint cmdlen = 20;
1290emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1291(void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8);
1292(void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8);
1293gc->pc += cmdlen;
1294if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1295}
1296
1297#define X_GLrop_Rectiv 47
1298void __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
1299{
1300    struct glx_context * const gc = __glXGetCurrentContext();
1301    const GLuint cmdlen = 20;
1302emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1303(void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4);
1304(void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4);
1305(void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4);
1306(void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4);
1307gc->pc += cmdlen;
1308if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1309}
1310
1311#define X_GLrop_Rectiv 47
1312void __indirect_glRectiv(const GLint * v1, const GLint * v2)
1313{
1314    struct glx_context * const gc = __glXGetCurrentContext();
1315    const GLuint cmdlen = 20;
1316emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1317(void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8);
1318(void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8);
1319gc->pc += cmdlen;
1320if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1321}
1322
1323#define X_GLrop_Rectsv 48
1324void __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1325{
1326    struct glx_context * const gc = __glXGetCurrentContext();
1327    const GLuint cmdlen = 12;
1328emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1329(void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 2);
1330(void) memcpy((void *)(gc->pc + 6), (void *)(&y1), 2);
1331(void) memcpy((void *)(gc->pc + 8), (void *)(&x2), 2);
1332(void) memcpy((void *)(gc->pc + 10), (void *)(&y2), 2);
1333gc->pc += cmdlen;
1334if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1335}
1336
1337#define X_GLrop_Rectsv 48
1338void __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
1339{
1340    struct glx_context * const gc = __glXGetCurrentContext();
1341    const GLuint cmdlen = 12;
1342emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1343(void) memcpy((void *)(gc->pc + 4), (void *)(v1), 4);
1344(void) memcpy((void *)(gc->pc + 8), (void *)(v2), 4);
1345gc->pc += cmdlen;
1346if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1347}
1348
1349#define X_GLrop_TexCoord1dv 49
1350void __indirect_glTexCoord1d(GLdouble s)
1351{
1352    struct glx_context * const gc = __glXGetCurrentContext();
1353    const GLuint cmdlen = 12;
1354emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
1355(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
1356gc->pc += cmdlen;
1357if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1358}
1359
1360#define X_GLrop_TexCoord1dv 49
1361void __indirect_glTexCoord1dv(const GLdouble * v)
1362{
1363    generic_8_byte( X_GLrop_TexCoord1dv, v );
1364}
1365
1366#define X_GLrop_TexCoord1fv 50
1367void __indirect_glTexCoord1f(GLfloat s)
1368{
1369    struct glx_context * const gc = __glXGetCurrentContext();
1370    const GLuint cmdlen = 8;
1371emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
1372(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1373gc->pc += cmdlen;
1374if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1375}
1376
1377#define X_GLrop_TexCoord1fv 50
1378void __indirect_glTexCoord1fv(const GLfloat * v)
1379{
1380    generic_4_byte( X_GLrop_TexCoord1fv, v );
1381}
1382
1383#define X_GLrop_TexCoord1iv 51
1384void __indirect_glTexCoord1i(GLint s)
1385{
1386    struct glx_context * const gc = __glXGetCurrentContext();
1387    const GLuint cmdlen = 8;
1388emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
1389(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1390gc->pc += cmdlen;
1391if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1392}
1393
1394#define X_GLrop_TexCoord1iv 51
1395void __indirect_glTexCoord1iv(const GLint * v)
1396{
1397    generic_4_byte( X_GLrop_TexCoord1iv, v );
1398}
1399
1400#define X_GLrop_TexCoord1sv 52
1401void __indirect_glTexCoord1s(GLshort s)
1402{
1403    struct glx_context * const gc = __glXGetCurrentContext();
1404    const GLuint cmdlen = 8;
1405emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1406(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
1407gc->pc += cmdlen;
1408if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1409}
1410
1411#define X_GLrop_TexCoord1sv 52
1412void __indirect_glTexCoord1sv(const GLshort * v)
1413{
1414    struct glx_context * const gc = __glXGetCurrentContext();
1415    const GLuint cmdlen = 8;
1416emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1417(void) memcpy((void *)(gc->pc + 4), (void *)(v), 2);
1418gc->pc += cmdlen;
1419if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1420}
1421
1422#define X_GLrop_TexCoord2dv 53
1423void __indirect_glTexCoord2d(GLdouble s, GLdouble t)
1424{
1425    struct glx_context * const gc = __glXGetCurrentContext();
1426    const GLuint cmdlen = 20;
1427emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
1428(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
1429(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
1430gc->pc += cmdlen;
1431if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1432}
1433
1434#define X_GLrop_TexCoord2dv 53
1435void __indirect_glTexCoord2dv(const GLdouble * v)
1436{
1437    generic_16_byte( X_GLrop_TexCoord2dv, v );
1438}
1439
1440#define X_GLrop_TexCoord2fv 54
1441void __indirect_glTexCoord2f(GLfloat s, GLfloat t)
1442{
1443    struct glx_context * const gc = __glXGetCurrentContext();
1444    const GLuint cmdlen = 12;
1445emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
1446(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1447(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1448gc->pc += cmdlen;
1449if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1450}
1451
1452#define X_GLrop_TexCoord2fv 54
1453void __indirect_glTexCoord2fv(const GLfloat * v)
1454{
1455    generic_8_byte( X_GLrop_TexCoord2fv, v );
1456}
1457
1458#define X_GLrop_TexCoord2iv 55
1459void __indirect_glTexCoord2i(GLint s, GLint t)
1460{
1461    struct glx_context * const gc = __glXGetCurrentContext();
1462    const GLuint cmdlen = 12;
1463emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
1464(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1465(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1466gc->pc += cmdlen;
1467if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1468}
1469
1470#define X_GLrop_TexCoord2iv 55
1471void __indirect_glTexCoord2iv(const GLint * v)
1472{
1473    generic_8_byte( X_GLrop_TexCoord2iv, v );
1474}
1475
1476#define X_GLrop_TexCoord2sv 56
1477void __indirect_glTexCoord2s(GLshort s, GLshort t)
1478{
1479    struct glx_context * const gc = __glXGetCurrentContext();
1480    const GLuint cmdlen = 8;
1481emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
1482(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
1483(void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
1484gc->pc += cmdlen;
1485if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1486}
1487
1488#define X_GLrop_TexCoord2sv 56
1489void __indirect_glTexCoord2sv(const GLshort * v)
1490{
1491    generic_4_byte( X_GLrop_TexCoord2sv, v );
1492}
1493
1494#define X_GLrop_TexCoord3dv 57
1495void __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
1496{
1497    struct glx_context * const gc = __glXGetCurrentContext();
1498    const GLuint cmdlen = 28;
1499emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
1500(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
1501(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
1502(void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
1503gc->pc += cmdlen;
1504if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1505}
1506
1507#define X_GLrop_TexCoord3dv 57
1508void __indirect_glTexCoord3dv(const GLdouble * v)
1509{
1510    generic_24_byte( X_GLrop_TexCoord3dv, v );
1511}
1512
1513#define X_GLrop_TexCoord3fv 58
1514void __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
1515{
1516    struct glx_context * const gc = __glXGetCurrentContext();
1517    const GLuint cmdlen = 16;
1518emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
1519(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1520(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1521(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
1522gc->pc += cmdlen;
1523if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1524}
1525
1526#define X_GLrop_TexCoord3fv 58
1527void __indirect_glTexCoord3fv(const GLfloat * v)
1528{
1529    generic_12_byte( X_GLrop_TexCoord3fv, v );
1530}
1531
1532#define X_GLrop_TexCoord3iv 59
1533void __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
1534{
1535    struct glx_context * const gc = __glXGetCurrentContext();
1536    const GLuint cmdlen = 16;
1537emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
1538(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1539(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1540(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
1541gc->pc += cmdlen;
1542if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1543}
1544
1545#define X_GLrop_TexCoord3iv 59
1546void __indirect_glTexCoord3iv(const GLint * v)
1547{
1548    generic_12_byte( X_GLrop_TexCoord3iv, v );
1549}
1550
1551#define X_GLrop_TexCoord3sv 60
1552void __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
1553{
1554    struct glx_context * const gc = __glXGetCurrentContext();
1555    const GLuint cmdlen = 12;
1556emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
1557(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
1558(void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
1559(void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2);
1560gc->pc += cmdlen;
1561if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1562}
1563
1564#define X_GLrop_TexCoord3sv 60
1565void __indirect_glTexCoord3sv(const GLshort * v)
1566{
1567    generic_6_byte( X_GLrop_TexCoord3sv, v );
1568}
1569
1570#define X_GLrop_TexCoord4dv 61
1571void __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1572{
1573    struct glx_context * const gc = __glXGetCurrentContext();
1574    const GLuint cmdlen = 36;
1575emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
1576(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
1577(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
1578(void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
1579(void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8);
1580gc->pc += cmdlen;
1581if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1582}
1583
1584#define X_GLrop_TexCoord4dv 61
1585void __indirect_glTexCoord4dv(const GLdouble * v)
1586{
1587    generic_32_byte( X_GLrop_TexCoord4dv, v );
1588}
1589
1590#define X_GLrop_TexCoord4fv 62
1591void __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1592{
1593    struct glx_context * const gc = __glXGetCurrentContext();
1594    const GLuint cmdlen = 20;
1595emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
1596(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1597(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1598(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
1599(void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4);
1600gc->pc += cmdlen;
1601if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1602}
1603
1604#define X_GLrop_TexCoord4fv 62
1605void __indirect_glTexCoord4fv(const GLfloat * v)
1606{
1607    generic_16_byte( X_GLrop_TexCoord4fv, v );
1608}
1609
1610#define X_GLrop_TexCoord4iv 63
1611void __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
1612{
1613    struct glx_context * const gc = __glXGetCurrentContext();
1614    const GLuint cmdlen = 20;
1615emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
1616(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1617(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1618(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
1619(void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4);
1620gc->pc += cmdlen;
1621if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1622}
1623
1624#define X_GLrop_TexCoord4iv 63
1625void __indirect_glTexCoord4iv(const GLint * v)
1626{
1627    generic_16_byte( X_GLrop_TexCoord4iv, v );
1628}
1629
1630#define X_GLrop_TexCoord4sv 64
1631void __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
1632{
1633    struct glx_context * const gc = __glXGetCurrentContext();
1634    const GLuint cmdlen = 12;
1635emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
1636(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
1637(void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
1638(void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2);
1639(void) memcpy((void *)(gc->pc + 10), (void *)(&q), 2);
1640gc->pc += cmdlen;
1641if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1642}
1643
1644#define X_GLrop_TexCoord4sv 64
1645void __indirect_glTexCoord4sv(const GLshort * v)
1646{
1647    generic_8_byte( X_GLrop_TexCoord4sv, v );
1648}
1649
1650#define X_GLrop_Vertex2dv 65
1651void __indirect_glVertex2d(GLdouble x, GLdouble y)
1652{
1653    struct glx_context * const gc = __glXGetCurrentContext();
1654    const GLuint cmdlen = 20;
1655emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
1656(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1657(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1658gc->pc += cmdlen;
1659if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1660}
1661
1662#define X_GLrop_Vertex2dv 65
1663void __indirect_glVertex2dv(const GLdouble * v)
1664{
1665    generic_16_byte( X_GLrop_Vertex2dv, v );
1666}
1667
1668#define X_GLrop_Vertex2fv 66
1669void __indirect_glVertex2f(GLfloat x, GLfloat y)
1670{
1671    struct glx_context * const gc = __glXGetCurrentContext();
1672    const GLuint cmdlen = 12;
1673emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
1674(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1675(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1676gc->pc += cmdlen;
1677if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1678}
1679
1680#define X_GLrop_Vertex2fv 66
1681void __indirect_glVertex2fv(const GLfloat * v)
1682{
1683    generic_8_byte( X_GLrop_Vertex2fv, v );
1684}
1685
1686#define X_GLrop_Vertex2iv 67
1687void __indirect_glVertex2i(GLint x, GLint y)
1688{
1689    struct glx_context * const gc = __glXGetCurrentContext();
1690    const GLuint cmdlen = 12;
1691emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
1692(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1693(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1694gc->pc += cmdlen;
1695if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1696}
1697
1698#define X_GLrop_Vertex2iv 67
1699void __indirect_glVertex2iv(const GLint * v)
1700{
1701    generic_8_byte( X_GLrop_Vertex2iv, v );
1702}
1703
1704#define X_GLrop_Vertex2sv 68
1705void __indirect_glVertex2s(GLshort x, GLshort y)
1706{
1707    struct glx_context * const gc = __glXGetCurrentContext();
1708    const GLuint cmdlen = 8;
1709emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
1710(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1711(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1712gc->pc += cmdlen;
1713if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1714}
1715
1716#define X_GLrop_Vertex2sv 68
1717void __indirect_glVertex2sv(const GLshort * v)
1718{
1719    generic_4_byte( X_GLrop_Vertex2sv, v );
1720}
1721
1722#define X_GLrop_Vertex3dv 69
1723void __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
1724{
1725    struct glx_context * const gc = __glXGetCurrentContext();
1726    const GLuint cmdlen = 28;
1727emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
1728(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1729(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1730(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
1731gc->pc += cmdlen;
1732if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1733}
1734
1735#define X_GLrop_Vertex3dv 69
1736void __indirect_glVertex3dv(const GLdouble * v)
1737{
1738    generic_24_byte( X_GLrop_Vertex3dv, v );
1739}
1740
1741#define X_GLrop_Vertex3fv 70
1742void __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
1743{
1744    struct glx_context * const gc = __glXGetCurrentContext();
1745    const GLuint cmdlen = 16;
1746emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
1747(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1748(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1749(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1750gc->pc += cmdlen;
1751if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1752}
1753
1754#define X_GLrop_Vertex3fv 70
1755void __indirect_glVertex3fv(const GLfloat * v)
1756{
1757    generic_12_byte( X_GLrop_Vertex3fv, v );
1758}
1759
1760#define X_GLrop_Vertex3iv 71
1761void __indirect_glVertex3i(GLint x, GLint y, GLint z)
1762{
1763    struct glx_context * const gc = __glXGetCurrentContext();
1764    const GLuint cmdlen = 16;
1765emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
1766(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1767(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1768(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1769gc->pc += cmdlen;
1770if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1771}
1772
1773#define X_GLrop_Vertex3iv 71
1774void __indirect_glVertex3iv(const GLint * v)
1775{
1776    generic_12_byte( X_GLrop_Vertex3iv, v );
1777}
1778
1779#define X_GLrop_Vertex3sv 72
1780void __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
1781{
1782    struct glx_context * const gc = __glXGetCurrentContext();
1783    const GLuint cmdlen = 12;
1784emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
1785(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1786(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1787(void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
1788gc->pc += cmdlen;
1789if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1790}
1791
1792#define X_GLrop_Vertex3sv 72
1793void __indirect_glVertex3sv(const GLshort * v)
1794{
1795    generic_6_byte( X_GLrop_Vertex3sv, v );
1796}
1797
1798#define X_GLrop_Vertex4dv 73
1799void __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1800{
1801    struct glx_context * const gc = __glXGetCurrentContext();
1802    const GLuint cmdlen = 36;
1803emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
1804(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1805(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1806(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
1807(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
1808gc->pc += cmdlen;
1809if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1810}
1811
1812#define X_GLrop_Vertex4dv 73
1813void __indirect_glVertex4dv(const GLdouble * v)
1814{
1815    generic_32_byte( X_GLrop_Vertex4dv, v );
1816}
1817
1818#define X_GLrop_Vertex4fv 74
1819void __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1820{
1821    struct glx_context * const gc = __glXGetCurrentContext();
1822    const GLuint cmdlen = 20;
1823emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
1824(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1825(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1826(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1827(void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
1828gc->pc += cmdlen;
1829if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1830}
1831
1832#define X_GLrop_Vertex4fv 74
1833void __indirect_glVertex4fv(const GLfloat * v)
1834{
1835    generic_16_byte( X_GLrop_Vertex4fv, v );
1836}
1837
1838#define X_GLrop_Vertex4iv 75
1839void __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
1840{
1841    struct glx_context * const gc = __glXGetCurrentContext();
1842    const GLuint cmdlen = 20;
1843emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
1844(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1845(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1846(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1847(void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
1848gc->pc += cmdlen;
1849if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1850}
1851
1852#define X_GLrop_Vertex4iv 75
1853void __indirect_glVertex4iv(const GLint * v)
1854{
1855    generic_16_byte( X_GLrop_Vertex4iv, v );
1856}
1857
1858#define X_GLrop_Vertex4sv 76
1859void __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
1860{
1861    struct glx_context * const gc = __glXGetCurrentContext();
1862    const GLuint cmdlen = 12;
1863emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
1864(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1865(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1866(void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
1867(void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2);
1868gc->pc += cmdlen;
1869if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1870}
1871
1872#define X_GLrop_Vertex4sv 76
1873void __indirect_glVertex4sv(const GLshort * v)
1874{
1875    generic_8_byte( X_GLrop_Vertex4sv, v );
1876}
1877
1878#define X_GLrop_ClipPlane 77
1879void __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
1880{
1881    struct glx_context * const gc = __glXGetCurrentContext();
1882    const GLuint cmdlen = 40;
1883emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
1884(void) memcpy((void *)(gc->pc + 4), (void *)(equation), 32);
1885(void) memcpy((void *)(gc->pc + 36), (void *)(&plane), 4);
1886gc->pc += cmdlen;
1887if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1888}
1889
1890#define X_GLrop_ColorMaterial 78
1891void __indirect_glColorMaterial(GLenum face, GLenum mode)
1892{
1893    struct glx_context * const gc = __glXGetCurrentContext();
1894    const GLuint cmdlen = 12;
1895emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
1896(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
1897(void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
1898gc->pc += cmdlen;
1899if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1900}
1901
1902#define X_GLrop_CullFace 79
1903void __indirect_glCullFace(GLenum mode)
1904{
1905    struct glx_context * const gc = __glXGetCurrentContext();
1906    const GLuint cmdlen = 8;
1907emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
1908(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
1909gc->pc += cmdlen;
1910if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1911}
1912
1913#define X_GLrop_Fogf 80
1914void __indirect_glFogf(GLenum pname, GLfloat param)
1915{
1916    struct glx_context * const gc = __glXGetCurrentContext();
1917    const GLuint cmdlen = 12;
1918emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
1919(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
1920(void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
1921gc->pc += cmdlen;
1922if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1923}
1924
1925#define X_GLrop_Fogfv 81
1926void __indirect_glFogfv(GLenum pname, const GLfloat * params)
1927{
1928    struct glx_context * const gc = __glXGetCurrentContext();
1929    const GLuint compsize = __glFogfv_size(pname);
1930    const GLuint cmdlen = 8 + safe_pad(safe_mul(compsize, 4));
1931    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
1932        __glXSetError(gc, GL_INVALID_VALUE);
1933        return;
1934    }
1935emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
1936(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
1937(void) memcpy((void *)(gc->pc + 8), (void *)(params), safe_mul(compsize, 4));
1938gc->pc += cmdlen;
1939if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1940}
1941
1942#define X_GLrop_Fogi 82
1943void __indirect_glFogi(GLenum pname, GLint param)
1944{
1945    struct glx_context * const gc = __glXGetCurrentContext();
1946    const GLuint cmdlen = 12;
1947emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
1948(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
1949(void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
1950gc->pc += cmdlen;
1951if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1952}
1953
1954#define X_GLrop_Fogiv 83
1955void __indirect_glFogiv(GLenum pname, const GLint * params)
1956{
1957    struct glx_context * const gc = __glXGetCurrentContext();
1958    const GLuint compsize = __glFogiv_size(pname);
1959    const GLuint cmdlen = 8 + safe_pad(safe_mul(compsize, 4));
1960    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
1961        __glXSetError(gc, GL_INVALID_VALUE);
1962        return;
1963    }
1964emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
1965(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
1966(void) memcpy((void *)(gc->pc + 8), (void *)(params), safe_mul(compsize, 4));
1967gc->pc += cmdlen;
1968if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1969}
1970
1971#define X_GLrop_FrontFace 84
1972void __indirect_glFrontFace(GLenum mode)
1973{
1974    struct glx_context * const gc = __glXGetCurrentContext();
1975    const GLuint cmdlen = 8;
1976emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
1977(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
1978gc->pc += cmdlen;
1979if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1980}
1981
1982#define X_GLrop_Hint 85
1983void __indirect_glHint(GLenum target, GLenum mode)
1984{
1985    struct glx_context * const gc = __glXGetCurrentContext();
1986    const GLuint cmdlen = 12;
1987emit_header(gc->pc, X_GLrop_Hint, cmdlen);
1988(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
1989(void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
1990gc->pc += cmdlen;
1991if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1992}
1993
1994#define X_GLrop_Lightf 86
1995void __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
1996{
1997    struct glx_context * const gc = __glXGetCurrentContext();
1998    const GLuint cmdlen = 16;
1999emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
2000(void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
2001(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2002(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2003gc->pc += cmdlen;
2004if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2005}
2006
2007#define X_GLrop_Lightfv 87
2008void __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
2009{
2010    struct glx_context * const gc = __glXGetCurrentContext();
2011    const GLuint compsize = __glLightfv_size(pname);
2012    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2013    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2014        __glXSetError(gc, GL_INVALID_VALUE);
2015        return;
2016    }
2017emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
2018(void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
2019(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2020(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2021gc->pc += cmdlen;
2022if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2023}
2024
2025#define X_GLrop_Lighti 88
2026void __indirect_glLighti(GLenum light, GLenum pname, GLint param)
2027{
2028    struct glx_context * const gc = __glXGetCurrentContext();
2029    const GLuint cmdlen = 16;
2030emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
2031(void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
2032(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2033(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2034gc->pc += cmdlen;
2035if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2036}
2037
2038#define X_GLrop_Lightiv 89
2039void __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
2040{
2041    struct glx_context * const gc = __glXGetCurrentContext();
2042    const GLuint compsize = __glLightiv_size(pname);
2043    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2044    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2045        __glXSetError(gc, GL_INVALID_VALUE);
2046        return;
2047    }
2048emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
2049(void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
2050(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2051(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2052gc->pc += cmdlen;
2053if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2054}
2055
2056#define X_GLrop_LightModelf 90
2057void __indirect_glLightModelf(GLenum pname, GLfloat param)
2058{
2059    struct glx_context * const gc = __glXGetCurrentContext();
2060    const GLuint cmdlen = 12;
2061emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
2062(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2063(void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
2064gc->pc += cmdlen;
2065if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2066}
2067
2068#define X_GLrop_LightModelfv 91
2069void __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
2070{
2071    struct glx_context * const gc = __glXGetCurrentContext();
2072    const GLuint compsize = __glLightModelfv_size(pname);
2073    const GLuint cmdlen = 8 + safe_pad(safe_mul(compsize, 4));
2074    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2075        __glXSetError(gc, GL_INVALID_VALUE);
2076        return;
2077    }
2078emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
2079(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2080(void) memcpy((void *)(gc->pc + 8), (void *)(params), safe_mul(compsize, 4));
2081gc->pc += cmdlen;
2082if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2083}
2084
2085#define X_GLrop_LightModeli 92
2086void __indirect_glLightModeli(GLenum pname, GLint param)
2087{
2088    struct glx_context * const gc = __glXGetCurrentContext();
2089    const GLuint cmdlen = 12;
2090emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
2091(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2092(void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
2093gc->pc += cmdlen;
2094if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2095}
2096
2097#define X_GLrop_LightModeliv 93
2098void __indirect_glLightModeliv(GLenum pname, const GLint * params)
2099{
2100    struct glx_context * const gc = __glXGetCurrentContext();
2101    const GLuint compsize = __glLightModeliv_size(pname);
2102    const GLuint cmdlen = 8 + safe_pad(safe_mul(compsize, 4));
2103    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2104        __glXSetError(gc, GL_INVALID_VALUE);
2105        return;
2106    }
2107emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
2108(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2109(void) memcpy((void *)(gc->pc + 8), (void *)(params), safe_mul(compsize, 4));
2110gc->pc += cmdlen;
2111if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2112}
2113
2114#define X_GLrop_LineStipple 94
2115void __indirect_glLineStipple(GLint factor, GLushort pattern)
2116{
2117    struct glx_context * const gc = __glXGetCurrentContext();
2118    const GLuint cmdlen = 12;
2119emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
2120(void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4);
2121(void) memcpy((void *)(gc->pc + 8), (void *)(&pattern), 2);
2122gc->pc += cmdlen;
2123if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2124}
2125
2126#define X_GLrop_LineWidth 95
2127void __indirect_glLineWidth(GLfloat width)
2128{
2129    struct glx_context * const gc = __glXGetCurrentContext();
2130    const GLuint cmdlen = 8;
2131emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
2132(void) memcpy((void *)(gc->pc + 4), (void *)(&width), 4);
2133gc->pc += cmdlen;
2134if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2135}
2136
2137#define X_GLrop_Materialf 96
2138void __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
2139{
2140    struct glx_context * const gc = __glXGetCurrentContext();
2141    const GLuint cmdlen = 16;
2142emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
2143(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2144(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2145(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2146gc->pc += cmdlen;
2147if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2148}
2149
2150#define X_GLrop_Materialfv 97
2151void __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
2152{
2153    struct glx_context * const gc = __glXGetCurrentContext();
2154    const GLuint compsize = __glMaterialfv_size(pname);
2155    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2156    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2157        __glXSetError(gc, GL_INVALID_VALUE);
2158        return;
2159    }
2160emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
2161(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2162(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2163(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2164gc->pc += cmdlen;
2165if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2166}
2167
2168#define X_GLrop_Materiali 98
2169void __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
2170{
2171    struct glx_context * const gc = __glXGetCurrentContext();
2172    const GLuint cmdlen = 16;
2173emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
2174(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2175(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2176(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2177gc->pc += cmdlen;
2178if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2179}
2180
2181#define X_GLrop_Materialiv 99
2182void __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
2183{
2184    struct glx_context * const gc = __glXGetCurrentContext();
2185    const GLuint compsize = __glMaterialiv_size(pname);
2186    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2187    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2188        __glXSetError(gc, GL_INVALID_VALUE);
2189        return;
2190    }
2191emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
2192(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2193(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2194(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2195gc->pc += cmdlen;
2196if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2197}
2198
2199#define X_GLrop_PointSize 100
2200void __indirect_glPointSize(GLfloat size)
2201{
2202    struct glx_context * const gc = __glXGetCurrentContext();
2203    const GLuint cmdlen = 8;
2204emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
2205(void) memcpy((void *)(gc->pc + 4), (void *)(&size), 4);
2206gc->pc += cmdlen;
2207if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2208}
2209
2210#define X_GLrop_PolygonMode 101
2211void __indirect_glPolygonMode(GLenum face, GLenum mode)
2212{
2213    struct glx_context * const gc = __glXGetCurrentContext();
2214    const GLuint cmdlen = 12;
2215emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
2216(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2217(void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
2218gc->pc += cmdlen;
2219if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2220}
2221
2222#define X_GLrop_PolygonStipple 102
2223void __indirect_glPolygonStipple(const GLubyte * mask)
2224{
2225    struct glx_context * const gc = __glXGetCurrentContext();
2226    const GLuint compsize = (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
2227    const GLuint cmdlen = 24 + safe_pad(compsize);
2228    if (0 + safe_pad(compsize) < 0) {
2229        __glXSetError(gc, GL_INVALID_VALUE);
2230        return;
2231    }
2232emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
2233if (compsize > 0) {
2234    gc->fillImage(gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, gc->pc + 24, gc->pc + 4);
2235} else {
2236    (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
2237}
2238gc->pc += cmdlen;
2239if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2240}
2241
2242#define X_GLrop_Scissor 103
2243void __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
2244{
2245    struct glx_context * const gc = __glXGetCurrentContext();
2246    const GLuint cmdlen = 20;
2247emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
2248(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
2249(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
2250(void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
2251(void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
2252gc->pc += cmdlen;
2253if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2254}
2255
2256#define X_GLrop_ShadeModel 104
2257void __indirect_glShadeModel(GLenum mode)
2258{
2259    struct glx_context * const gc = __glXGetCurrentContext();
2260    const GLuint cmdlen = 8;
2261emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
2262(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
2263gc->pc += cmdlen;
2264if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2265}
2266
2267#define X_GLrop_TexParameterf 105
2268void __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
2269{
2270    struct glx_context * const gc = __glXGetCurrentContext();
2271    const GLuint cmdlen = 16;
2272emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
2273(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2274(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2275(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2276gc->pc += cmdlen;
2277if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2278}
2279
2280#define X_GLrop_TexParameterfv 106
2281void __indirect_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params)
2282{
2283    struct glx_context * const gc = __glXGetCurrentContext();
2284    const GLuint compsize = __glTexParameterfv_size(pname);
2285    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2286    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2287        __glXSetError(gc, GL_INVALID_VALUE);
2288        return;
2289    }
2290emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
2291(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2292(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2293(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2294gc->pc += cmdlen;
2295if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2296}
2297
2298#define X_GLrop_TexParameteri 107
2299void __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
2300{
2301    struct glx_context * const gc = __glXGetCurrentContext();
2302    const GLuint cmdlen = 16;
2303emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
2304(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2305(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2306(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2307gc->pc += cmdlen;
2308if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2309}
2310
2311#define X_GLrop_TexParameteriv 108
2312void __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
2313{
2314    struct glx_context * const gc = __glXGetCurrentContext();
2315    const GLuint compsize = __glTexParameteriv_size(pname);
2316    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2317    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2318        __glXSetError(gc, GL_INVALID_VALUE);
2319        return;
2320    }
2321emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
2322(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2323(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2324(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2325gc->pc += cmdlen;
2326if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2327}
2328
2329static void
2330__glx_TexImage_1D2D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels )
2331{
2332    struct glx_context * const gc = __glXGetCurrentContext();
2333    const GLuint compsize = __glImageSize(width, height, 1, format, type, target);
2334    const GLuint cmdlen = 56 + safe_pad(compsize);
2335    if (0 + safe_pad(compsize) < 0) {
2336        __glXSetError(gc, GL_INVALID_VALUE);
2337        return;
2338    }
2339    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
2340if (cmdlen <= gc->maxSmallRenderCommandSize) {
2341    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
2342        (void) __glXFlushRenderBuffer(gc, gc->pc);
2343    }
2344emit_header(gc->pc, opcode, cmdlen);
2345(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
2346(void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4);
2347(void) memcpy((void *)(gc->pc + 32), (void *)(&internalformat), 4);
2348(void) memcpy((void *)(gc->pc + 36), (void *)(&width), 4);
2349(void) memcpy((void *)(gc->pc + 40), (void *)(&height), 4);
2350(void) memcpy((void *)(gc->pc + 44), (void *)(&border), 4);
2351(void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4);
2352(void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4);
2353if ((compsize > 0) && (pixels != NULL)) {
2354    gc->fillImage(gc, dim, width, height, 1, format, type, pixels, gc->pc + 56, gc->pc + 4);
2355} else {
2356    (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
2357}
2358gc->pc += cmdlen;
2359if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2360}
2361else {
2362const GLint op = opcode;
2363const GLuint cmdlenLarge = cmdlen + 4;
2364GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
2365(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
2366(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
2367(void) memcpy((void *)(pc + 28), (void *)(&target), 4);
2368(void) memcpy((void *)(pc + 32), (void *)(&level), 4);
2369(void) memcpy((void *)(pc + 36), (void *)(&internalformat), 4);
2370(void) memcpy((void *)(pc + 40), (void *)(&width), 4);
2371(void) memcpy((void *)(pc + 44), (void *)(&height), 4);
2372(void) memcpy((void *)(pc + 48), (void *)(&border), 4);
2373(void) memcpy((void *)(pc + 52), (void *)(&format), 4);
2374(void) memcpy((void *)(pc + 56), (void *)(&type), 4);
2375__glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 60, pc + 8);
2376}
2377    }
2378}
2379
2380#define X_GLrop_TexImage1D 109
2381void __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
2382{
2383    __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat, width, 1, border, format, type, pixels );
2384}
2385
2386#define X_GLrop_TexImage2D 110
2387void __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
2388{
2389    __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat, width, height, border, format, type, pixels );
2390}
2391
2392#define X_GLrop_TexEnvf 111
2393void __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
2394{
2395    struct glx_context * const gc = __glXGetCurrentContext();
2396    const GLuint cmdlen = 16;
2397emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
2398(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2399(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2400(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2401gc->pc += cmdlen;
2402if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2403}
2404
2405#define X_GLrop_TexEnvfv 112
2406void __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
2407{
2408    struct glx_context * const gc = __glXGetCurrentContext();
2409    const GLuint compsize = __glTexEnvfv_size(pname);
2410    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2411    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2412        __glXSetError(gc, GL_INVALID_VALUE);
2413        return;
2414    }
2415emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
2416(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2417(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2418(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2419gc->pc += cmdlen;
2420if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2421}
2422
2423#define X_GLrop_TexEnvi 113
2424void __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
2425{
2426    struct glx_context * const gc = __glXGetCurrentContext();
2427    const GLuint cmdlen = 16;
2428emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
2429(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2430(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2431(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2432gc->pc += cmdlen;
2433if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2434}
2435
2436#define X_GLrop_TexEnviv 114
2437void __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
2438{
2439    struct glx_context * const gc = __glXGetCurrentContext();
2440    const GLuint compsize = __glTexEnviv_size(pname);
2441    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2442    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2443        __glXSetError(gc, GL_INVALID_VALUE);
2444        return;
2445    }
2446emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
2447(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2448(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2449(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2450gc->pc += cmdlen;
2451if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2452}
2453
2454#define X_GLrop_TexGend 115
2455void __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
2456{
2457    struct glx_context * const gc = __glXGetCurrentContext();
2458    const GLuint cmdlen = 20;
2459emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
2460(void) memcpy((void *)(gc->pc + 4), (void *)(&param), 8);
2461(void) memcpy((void *)(gc->pc + 12), (void *)(&coord), 4);
2462(void) memcpy((void *)(gc->pc + 16), (void *)(&pname), 4);
2463gc->pc += cmdlen;
2464if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2465}
2466
2467#define X_GLrop_TexGendv 116
2468void __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
2469{
2470    struct glx_context * const gc = __glXGetCurrentContext();
2471    const GLuint compsize = __glTexGendv_size(pname);
2472    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 8));
2473    if (0 + safe_pad(safe_mul(compsize, 8)) < 0) {
2474        __glXSetError(gc, GL_INVALID_VALUE);
2475        return;
2476    }
2477emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
2478(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2479(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2480(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 8));
2481gc->pc += cmdlen;
2482if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2483}
2484
2485#define X_GLrop_TexGenf 117
2486void __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
2487{
2488    struct glx_context * const gc = __glXGetCurrentContext();
2489    const GLuint cmdlen = 16;
2490emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
2491(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2492(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2493(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2494gc->pc += cmdlen;
2495if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2496}
2497
2498#define X_GLrop_TexGenfv 118
2499void __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
2500{
2501    struct glx_context * const gc = __glXGetCurrentContext();
2502    const GLuint compsize = __glTexGenfv_size(pname);
2503    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2504    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2505        __glXSetError(gc, GL_INVALID_VALUE);
2506        return;
2507    }
2508emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
2509(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2510(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2511(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2512gc->pc += cmdlen;
2513if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2514}
2515
2516#define X_GLrop_TexGeni 119
2517void __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
2518{
2519    struct glx_context * const gc = __glXGetCurrentContext();
2520    const GLuint cmdlen = 16;
2521emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
2522(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2523(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2524(void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
2525gc->pc += cmdlen;
2526if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2527}
2528
2529#define X_GLrop_TexGeniv 120
2530void __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
2531{
2532    struct glx_context * const gc = __glXGetCurrentContext();
2533    const GLuint compsize = __glTexGeniv_size(pname);
2534    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
2535    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
2536        __glXSetError(gc, GL_INVALID_VALUE);
2537        return;
2538    }
2539emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
2540(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2541(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2542(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
2543gc->pc += cmdlen;
2544if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2545}
2546
2547#define X_GLrop_InitNames 121
2548void __indirect_glInitNames(void)
2549{
2550    struct glx_context * const gc = __glXGetCurrentContext();
2551    const GLuint cmdlen = 4;
2552emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
2553gc->pc += cmdlen;
2554if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2555}
2556
2557#define X_GLrop_LoadName 122
2558void __indirect_glLoadName(GLuint name)
2559{
2560    struct glx_context * const gc = __glXGetCurrentContext();
2561    const GLuint cmdlen = 8;
2562emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
2563(void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
2564gc->pc += cmdlen;
2565if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2566}
2567
2568#define X_GLrop_PassThrough 123
2569void __indirect_glPassThrough(GLfloat token)
2570{
2571    struct glx_context * const gc = __glXGetCurrentContext();
2572    const GLuint cmdlen = 8;
2573emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
2574(void) memcpy((void *)(gc->pc + 4), (void *)(&token), 4);
2575gc->pc += cmdlen;
2576if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2577}
2578
2579#define X_GLrop_PopName 124
2580void __indirect_glPopName(void)
2581{
2582    struct glx_context * const gc = __glXGetCurrentContext();
2583    const GLuint cmdlen = 4;
2584emit_header(gc->pc, X_GLrop_PopName, cmdlen);
2585gc->pc += cmdlen;
2586if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2587}
2588
2589#define X_GLrop_PushName 125
2590void __indirect_glPushName(GLuint name)
2591{
2592    struct glx_context * const gc = __glXGetCurrentContext();
2593    const GLuint cmdlen = 8;
2594emit_header(gc->pc, X_GLrop_PushName, cmdlen);
2595(void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
2596gc->pc += cmdlen;
2597if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2598}
2599
2600#define X_GLrop_DrawBuffer 126
2601void __indirect_glDrawBuffer(GLenum mode)
2602{
2603    struct glx_context * const gc = __glXGetCurrentContext();
2604    const GLuint cmdlen = 8;
2605emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
2606(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
2607gc->pc += cmdlen;
2608if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2609}
2610
2611#define X_GLrop_Clear 127
2612void __indirect_glClear(GLbitfield mask)
2613{
2614    struct glx_context * const gc = __glXGetCurrentContext();
2615    const GLuint cmdlen = 8;
2616emit_header(gc->pc, X_GLrop_Clear, cmdlen);
2617(void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
2618gc->pc += cmdlen;
2619if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2620}
2621
2622#define X_GLrop_ClearAccum 128
2623void __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
2624{
2625    struct glx_context * const gc = __glXGetCurrentContext();
2626    const GLuint cmdlen = 20;
2627emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
2628(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
2629(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
2630(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
2631(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
2632gc->pc += cmdlen;
2633if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2634}
2635
2636#define X_GLrop_ClearIndex 129
2637void __indirect_glClearIndex(GLfloat c)
2638{
2639    struct glx_context * const gc = __glXGetCurrentContext();
2640    const GLuint cmdlen = 8;
2641emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
2642(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
2643gc->pc += cmdlen;
2644if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2645}
2646
2647#define X_GLrop_ClearColor 130
2648void __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
2649{
2650    struct glx_context * const gc = __glXGetCurrentContext();
2651    const GLuint cmdlen = 20;
2652emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
2653(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
2654(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
2655(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
2656(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
2657gc->pc += cmdlen;
2658if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2659}
2660
2661#define X_GLrop_ClearStencil 131
2662void __indirect_glClearStencil(GLint s)
2663{
2664    struct glx_context * const gc = __glXGetCurrentContext();
2665    const GLuint cmdlen = 8;
2666emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
2667(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
2668gc->pc += cmdlen;
2669if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2670}
2671
2672#define X_GLrop_ClearDepth 132
2673void __indirect_glClearDepth(GLclampd depth)
2674{
2675    struct glx_context * const gc = __glXGetCurrentContext();
2676    const GLuint cmdlen = 12;
2677emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
2678(void) memcpy((void *)(gc->pc + 4), (void *)(&depth), 8);
2679gc->pc += cmdlen;
2680if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2681}
2682
2683#define X_GLrop_StencilMask 133
2684void __indirect_glStencilMask(GLuint mask)
2685{
2686    struct glx_context * const gc = __glXGetCurrentContext();
2687    const GLuint cmdlen = 8;
2688emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
2689(void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
2690gc->pc += cmdlen;
2691if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2692}
2693
2694#define X_GLrop_ColorMask 134
2695void __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
2696{
2697    struct glx_context * const gc = __glXGetCurrentContext();
2698    const GLuint cmdlen = 8;
2699emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
2700(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
2701(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
2702(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
2703(void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
2704gc->pc += cmdlen;
2705if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2706}
2707
2708#define X_GLrop_DepthMask 135
2709void __indirect_glDepthMask(GLboolean flag)
2710{
2711    struct glx_context * const gc = __glXGetCurrentContext();
2712    const GLuint cmdlen = 8;
2713emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
2714(void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
2715gc->pc += cmdlen;
2716if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2717}
2718
2719#define X_GLrop_IndexMask 136
2720void __indirect_glIndexMask(GLuint mask)
2721{
2722    struct glx_context * const gc = __glXGetCurrentContext();
2723    const GLuint cmdlen = 8;
2724emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
2725(void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
2726gc->pc += cmdlen;
2727if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2728}
2729
2730#define X_GLrop_Accum 137
2731void __indirect_glAccum(GLenum op, GLfloat value)
2732{
2733    struct glx_context * const gc = __glXGetCurrentContext();
2734    const GLuint cmdlen = 12;
2735emit_header(gc->pc, X_GLrop_Accum, cmdlen);
2736(void) memcpy((void *)(gc->pc + 4), (void *)(&op), 4);
2737(void) memcpy((void *)(gc->pc + 8), (void *)(&value), 4);
2738gc->pc += cmdlen;
2739if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2740}
2741
2742#define X_GLrop_PopAttrib 141
2743void __indirect_glPopAttrib(void)
2744{
2745    struct glx_context * const gc = __glXGetCurrentContext();
2746    const GLuint cmdlen = 4;
2747emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
2748gc->pc += cmdlen;
2749if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2750}
2751
2752#define X_GLrop_PushAttrib 142
2753void __indirect_glPushAttrib(GLbitfield mask)
2754{
2755    struct glx_context * const gc = __glXGetCurrentContext();
2756    const GLuint cmdlen = 8;
2757emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
2758(void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
2759gc->pc += cmdlen;
2760if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2761}
2762
2763#define X_GLrop_MapGrid1d 147
2764void __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
2765{
2766    struct glx_context * const gc = __glXGetCurrentContext();
2767    const GLuint cmdlen = 24;
2768emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
2769(void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8);
2770(void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8);
2771(void) memcpy((void *)(gc->pc + 20), (void *)(&un), 4);
2772gc->pc += cmdlen;
2773if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2774}
2775
2776#define X_GLrop_MapGrid1f 148
2777void __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
2778{
2779    struct glx_context * const gc = __glXGetCurrentContext();
2780    const GLuint cmdlen = 16;
2781emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
2782(void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4);
2783(void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4);
2784(void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4);
2785gc->pc += cmdlen;
2786if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2787}
2788
2789#define X_GLrop_MapGrid2d 149
2790void __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
2791{
2792    struct glx_context * const gc = __glXGetCurrentContext();
2793    const GLuint cmdlen = 44;
2794emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
2795(void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8);
2796(void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8);
2797(void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 8);
2798(void) memcpy((void *)(gc->pc + 28), (void *)(&v2), 8);
2799(void) memcpy((void *)(gc->pc + 36), (void *)(&un), 4);
2800(void) memcpy((void *)(gc->pc + 40), (void *)(&vn), 4);
2801gc->pc += cmdlen;
2802if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2803}
2804
2805#define X_GLrop_MapGrid2f 150
2806void __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
2807{
2808    struct glx_context * const gc = __glXGetCurrentContext();
2809    const GLuint cmdlen = 28;
2810emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
2811(void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4);
2812(void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4);
2813(void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4);
2814(void) memcpy((void *)(gc->pc + 16), (void *)(&vn), 4);
2815(void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 4);
2816(void) memcpy((void *)(gc->pc + 24), (void *)(&v2), 4);
2817gc->pc += cmdlen;
2818if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2819}
2820
2821#define X_GLrop_EvalCoord1dv 151
2822void __indirect_glEvalCoord1d(GLdouble u)
2823{
2824    struct glx_context * const gc = __glXGetCurrentContext();
2825    const GLuint cmdlen = 12;
2826emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
2827(void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8);
2828gc->pc += cmdlen;
2829if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2830}
2831
2832#define X_GLrop_EvalCoord1dv 151
2833void __indirect_glEvalCoord1dv(const GLdouble * u)
2834{
2835    generic_8_byte( X_GLrop_EvalCoord1dv, u );
2836}
2837
2838#define X_GLrop_EvalCoord1fv 152
2839void __indirect_glEvalCoord1f(GLfloat u)
2840{
2841    struct glx_context * const gc = __glXGetCurrentContext();
2842    const GLuint cmdlen = 8;
2843emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
2844(void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4);
2845gc->pc += cmdlen;
2846if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2847}
2848
2849#define X_GLrop_EvalCoord1fv 152
2850void __indirect_glEvalCoord1fv(const GLfloat * u)
2851{
2852    generic_4_byte( X_GLrop_EvalCoord1fv, u );
2853}
2854
2855#define X_GLrop_EvalCoord2dv 153
2856void __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
2857{
2858    struct glx_context * const gc = __glXGetCurrentContext();
2859    const GLuint cmdlen = 20;
2860emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
2861(void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8);
2862(void) memcpy((void *)(gc->pc + 12), (void *)(&v), 8);
2863gc->pc += cmdlen;
2864if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2865}
2866
2867#define X_GLrop_EvalCoord2dv 153
2868void __indirect_glEvalCoord2dv(const GLdouble * u)
2869{
2870    generic_16_byte( X_GLrop_EvalCoord2dv, u );
2871}
2872
2873#define X_GLrop_EvalCoord2fv 154
2874void __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
2875{
2876    struct glx_context * const gc = __glXGetCurrentContext();
2877    const GLuint cmdlen = 12;
2878emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
2879(void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4);
2880(void) memcpy((void *)(gc->pc + 8), (void *)(&v), 4);
2881gc->pc += cmdlen;
2882if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2883}
2884
2885#define X_GLrop_EvalCoord2fv 154
2886void __indirect_glEvalCoord2fv(const GLfloat * u)
2887{
2888    generic_8_byte( X_GLrop_EvalCoord2fv, u );
2889}
2890
2891#define X_GLrop_EvalMesh1 155
2892void __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
2893{
2894    struct glx_context * const gc = __glXGetCurrentContext();
2895    const GLuint cmdlen = 16;
2896emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
2897(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
2898(void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4);
2899(void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4);
2900gc->pc += cmdlen;
2901if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2902}
2903
2904#define X_GLrop_EvalPoint1 156
2905void __indirect_glEvalPoint1(GLint i)
2906{
2907    struct glx_context * const gc = __glXGetCurrentContext();
2908    const GLuint cmdlen = 8;
2909emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
2910(void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4);
2911gc->pc += cmdlen;
2912if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2913}
2914
2915#define X_GLrop_EvalMesh2 157
2916void __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
2917{
2918    struct glx_context * const gc = __glXGetCurrentContext();
2919    const GLuint cmdlen = 24;
2920emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
2921(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
2922(void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4);
2923(void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4);
2924(void) memcpy((void *)(gc->pc + 16), (void *)(&j1), 4);
2925(void) memcpy((void *)(gc->pc + 20), (void *)(&j2), 4);
2926gc->pc += cmdlen;
2927if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2928}
2929
2930#define X_GLrop_EvalPoint2 158
2931void __indirect_glEvalPoint2(GLint i, GLint j)
2932{
2933    struct glx_context * const gc = __glXGetCurrentContext();
2934    const GLuint cmdlen = 12;
2935emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
2936(void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4);
2937(void) memcpy((void *)(gc->pc + 8), (void *)(&j), 4);
2938gc->pc += cmdlen;
2939if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2940}
2941
2942#define X_GLrop_AlphaFunc 159
2943void __indirect_glAlphaFunc(GLenum func, GLclampf ref)
2944{
2945    struct glx_context * const gc = __glXGetCurrentContext();
2946    const GLuint cmdlen = 12;
2947emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
2948(void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
2949(void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4);
2950gc->pc += cmdlen;
2951if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2952}
2953
2954#define X_GLrop_BlendFunc 160
2955void __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
2956{
2957    struct glx_context * const gc = __glXGetCurrentContext();
2958    const GLuint cmdlen = 12;
2959emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
2960(void) memcpy((void *)(gc->pc + 4), (void *)(&sfactor), 4);
2961(void) memcpy((void *)(gc->pc + 8), (void *)(&dfactor), 4);
2962gc->pc += cmdlen;
2963if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2964}
2965
2966#define X_GLrop_LogicOp 161
2967void __indirect_glLogicOp(GLenum opcode)
2968{
2969    struct glx_context * const gc = __glXGetCurrentContext();
2970    const GLuint cmdlen = 8;
2971emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
2972(void) memcpy((void *)(gc->pc + 4), (void *)(&opcode), 4);
2973gc->pc += cmdlen;
2974if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2975}
2976
2977#define X_GLrop_StencilFunc 162
2978void __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
2979{
2980    struct glx_context * const gc = __glXGetCurrentContext();
2981    const GLuint cmdlen = 16;
2982emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
2983(void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
2984(void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4);
2985(void) memcpy((void *)(gc->pc + 12), (void *)(&mask), 4);
2986gc->pc += cmdlen;
2987if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2988}
2989
2990#define X_GLrop_StencilOp 163
2991void __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
2992{
2993    struct glx_context * const gc = __glXGetCurrentContext();
2994    const GLuint cmdlen = 16;
2995emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
2996(void) memcpy((void *)(gc->pc + 4), (void *)(&fail), 4);
2997(void) memcpy((void *)(gc->pc + 8), (void *)(&zfail), 4);
2998(void) memcpy((void *)(gc->pc + 12), (void *)(&zpass), 4);
2999gc->pc += cmdlen;
3000if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3001}
3002
3003#define X_GLrop_DepthFunc 164
3004void __indirect_glDepthFunc(GLenum func)
3005{
3006    struct glx_context * const gc = __glXGetCurrentContext();
3007    const GLuint cmdlen = 8;
3008emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
3009(void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
3010gc->pc += cmdlen;
3011if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3012}
3013
3014#define X_GLrop_PixelZoom 165
3015void __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
3016{
3017    struct glx_context * const gc = __glXGetCurrentContext();
3018    const GLuint cmdlen = 12;
3019emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
3020(void) memcpy((void *)(gc->pc + 4), (void *)(&xfactor), 4);
3021(void) memcpy((void *)(gc->pc + 8), (void *)(&yfactor), 4);
3022gc->pc += cmdlen;
3023if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3024}
3025
3026#define X_GLrop_PixelTransferf 166
3027void __indirect_glPixelTransferf(GLenum pname, GLfloat param)
3028{
3029    struct glx_context * const gc = __glXGetCurrentContext();
3030    const GLuint cmdlen = 12;
3031emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
3032(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
3033(void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
3034gc->pc += cmdlen;
3035if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3036}
3037
3038#define X_GLrop_PixelTransferi 167
3039void __indirect_glPixelTransferi(GLenum pname, GLint param)
3040{
3041    struct glx_context * const gc = __glXGetCurrentContext();
3042    const GLuint cmdlen = 12;
3043emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
3044(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
3045(void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
3046gc->pc += cmdlen;
3047if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3048}
3049
3050#define X_GLrop_PixelMapfv 168
3051void __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
3052{
3053    struct glx_context * const gc = __glXGetCurrentContext();
3054    const GLuint cmdlen = 12 + safe_pad(safe_mul(mapsize, 4));
3055    if (0 + safe_pad(safe_mul(mapsize, 4)) < 0) {
3056        __glXSetError(gc, GL_INVALID_VALUE);
3057        return;
3058    }
3059    if (mapsize < 0) {
3060        __glXSetError(gc, GL_INVALID_VALUE);
3061        return;
3062    }
3063    if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3064if (cmdlen <= gc->maxSmallRenderCommandSize) {
3065    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
3066        (void) __glXFlushRenderBuffer(gc, gc->pc);
3067    }
3068emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
3069(void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
3070(void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
3071(void) memcpy((void *)(gc->pc + 12), (void *)(values), safe_mul(mapsize, 4));
3072gc->pc += cmdlen;
3073if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3074}
3075else {
3076const GLint op = X_GLrop_PixelMapfv;
3077const GLuint cmdlenLarge = cmdlen + 4;
3078GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
3079(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
3080(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
3081(void) memcpy((void *)(pc + 8), (void *)(&map), 4);
3082(void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
3083    __glXSendLargeCommand(gc, pc, 16, values, safe_mul(mapsize, 4));
3084}
3085    }
3086}
3087
3088#define X_GLrop_PixelMapuiv 169
3089void __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
3090{
3091    struct glx_context * const gc = __glXGetCurrentContext();
3092    const GLuint cmdlen = 12 + safe_pad(safe_mul(mapsize, 4));
3093    if (0 + safe_pad(safe_mul(mapsize, 4)) < 0) {
3094        __glXSetError(gc, GL_INVALID_VALUE);
3095        return;
3096    }
3097    if (mapsize < 0) {
3098        __glXSetError(gc, GL_INVALID_VALUE);
3099        return;
3100    }
3101    if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3102if (cmdlen <= gc->maxSmallRenderCommandSize) {
3103    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
3104        (void) __glXFlushRenderBuffer(gc, gc->pc);
3105    }
3106emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
3107(void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
3108(void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
3109(void) memcpy((void *)(gc->pc + 12), (void *)(values), safe_mul(mapsize, 4));
3110gc->pc += cmdlen;
3111if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3112}
3113else {
3114const GLint op = X_GLrop_PixelMapuiv;
3115const GLuint cmdlenLarge = cmdlen + 4;
3116GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
3117(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
3118(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
3119(void) memcpy((void *)(pc + 8), (void *)(&map), 4);
3120(void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
3121    __glXSendLargeCommand(gc, pc, 16, values, safe_mul(mapsize, 4));
3122}
3123    }
3124}
3125
3126#define X_GLrop_PixelMapusv 170
3127void __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
3128{
3129    struct glx_context * const gc = __glXGetCurrentContext();
3130    const GLuint cmdlen = 12 + safe_pad(safe_mul(mapsize, 2));
3131    if (0 + safe_pad(safe_mul(mapsize, 2)) < 0) {
3132        __glXSetError(gc, GL_INVALID_VALUE);
3133        return;
3134    }
3135    if (mapsize < 0) {
3136        __glXSetError(gc, GL_INVALID_VALUE);
3137        return;
3138    }
3139    if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3140if (cmdlen <= gc->maxSmallRenderCommandSize) {
3141    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
3142        (void) __glXFlushRenderBuffer(gc, gc->pc);
3143    }
3144emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
3145(void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
3146(void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
3147(void) memcpy((void *)(gc->pc + 12), (void *)(values), safe_mul(mapsize, 2));
3148gc->pc += cmdlen;
3149if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3150}
3151else {
3152const GLint op = X_GLrop_PixelMapusv;
3153const GLuint cmdlenLarge = cmdlen + 4;
3154GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
3155(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
3156(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
3157(void) memcpy((void *)(pc + 8), (void *)(&map), 4);
3158(void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
3159    __glXSendLargeCommand(gc, pc, 16, values, safe_mul(mapsize, 2));
3160}
3161    }
3162}
3163
3164#define X_GLrop_ReadBuffer 171
3165void __indirect_glReadBuffer(GLenum mode)
3166{
3167    struct glx_context * const gc = __glXGetCurrentContext();
3168    const GLuint cmdlen = 8;
3169emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
3170(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
3171gc->pc += cmdlen;
3172if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3173}
3174
3175#define X_GLrop_CopyPixels 172
3176void __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
3177{
3178    struct glx_context * const gc = __glXGetCurrentContext();
3179    const GLuint cmdlen = 24;
3180emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
3181(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
3182(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
3183(void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
3184(void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
3185(void) memcpy((void *)(gc->pc + 20), (void *)(&type), 4);
3186gc->pc += cmdlen;
3187if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3188}
3189
3190#define X_GLsop_ReadPixels 111
3191void __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels)
3192{
3193    struct glx_context * const gc = __glXGetCurrentContext();
3194    const __GLXattribute * const state = gc->client_state_private;
3195    Display * const dpy = gc->currentDpy;
3196#ifndef USE_XCB
3197    const GLuint cmdlen = 28;
3198#endif
3199    if (__builtin_expect(dpy != NULL, 1)) {
3200#ifdef USE_XCB
3201        xcb_connection_t *c = XGetXCBConnection(dpy);
3202        (void) __glXFlushRenderBuffer(gc, gc->pc);
3203        xcb_glx_read_pixels_reply_t *reply = xcb_glx_read_pixels_reply(c, xcb_glx_read_pixels(c, gc->currentContextTag, x, y, width, height, format, type, state->storePack.swapEndian, 0), NULL);
3204        __glEmptyImage(gc, 3, width, height, 1, format, type, xcb_glx_read_pixels_data(reply), pixels);
3205        free(reply);
3206#else
3207        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
3208(void) memcpy((void *)(pc + 0), (void *)(&x), 4);
3209(void) memcpy((void *)(pc + 4), (void *)(&y), 4);
3210(void) memcpy((void *)(pc + 8), (void *)(&width), 4);
3211(void) memcpy((void *)(pc + 12), (void *)(&height), 4);
3212(void) memcpy((void *)(pc + 16), (void *)(&format), 4);
3213(void) memcpy((void *)(pc + 20), (void *)(&type), 4);
3214        *(int32_t *)(pc + 24) = 0;
3215        * (int8_t *)(pc + 24) = state->storePack.swapEndian;
3216        __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type, pixels, GL_FALSE);
3217        UnlockDisplay(dpy); SyncHandle();
3218#endif /* USE_XCB */
3219    }
3220    return;
3221}
3222
3223#define X_GLrop_DrawPixels 173
3224void __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
3225{
3226    struct glx_context * const gc = __glXGetCurrentContext();
3227    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, 0) : 0;
3228    const GLuint cmdlen = 40 + safe_pad(compsize);
3229    if (0 + safe_pad(compsize) < 0) {
3230        __glXSetError(gc, GL_INVALID_VALUE);
3231        return;
3232    }
3233    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
3234if (cmdlen <= gc->maxSmallRenderCommandSize) {
3235    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
3236        (void) __glXFlushRenderBuffer(gc, gc->pc);
3237    }
3238emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
3239(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
3240(void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
3241(void) memcpy((void *)(gc->pc + 32), (void *)(&format), 4);
3242(void) memcpy((void *)(gc->pc + 36), (void *)(&type), 4);
3243if (compsize > 0) {
3244    gc->fillImage(gc, 2, width, height, 1, format, type, pixels, gc->pc + 40, gc->pc + 4);
3245} else {
3246    (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
3247}
3248gc->pc += cmdlen;
3249if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3250}
3251else {
3252const GLint op = X_GLrop_DrawPixels;
3253const GLuint cmdlenLarge = cmdlen + 4;
3254GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
3255(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
3256(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
3257(void) memcpy((void *)(pc + 28), (void *)(&width), 4);
3258(void) memcpy((void *)(pc + 32), (void *)(&height), 4);
3259(void) memcpy((void *)(pc + 36), (void *)(&format), 4);
3260(void) memcpy((void *)(pc + 40), (void *)(&type), 4);
3261__glXSendLargeImage(gc, compsize, 2, width, height, 1, format, type, pixels, pc + 44, pc + 8);
3262}
3263    }
3264}
3265
3266#define X_GLsop_GetClipPlane 113
3267void __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
3268{
3269    struct glx_context * const gc = __glXGetCurrentContext();
3270    Display * const dpy = gc->currentDpy;
3271#ifndef USE_XCB
3272    const GLuint cmdlen = 4;
3273#endif
3274    if (__builtin_expect(dpy != NULL, 1)) {
3275#ifdef USE_XCB
3276        xcb_connection_t *c = XGetXCBConnection(dpy);
3277        (void) __glXFlushRenderBuffer(gc, gc->pc);
3278        xcb_glx_get_clip_plane_reply_t *reply = xcb_glx_get_clip_plane_reply(c, xcb_glx_get_clip_plane(c, gc->currentContextTag, plane), NULL);
3279        (void)memcpy(equation, xcb_glx_get_clip_plane_data(reply), xcb_glx_get_clip_plane_data_length(reply) * sizeof(GLdouble));
3280        free(reply);
3281#else
3282        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
3283(void) memcpy((void *)(pc + 0), (void *)(&plane), 4);
3284        (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
3285        UnlockDisplay(dpy); SyncHandle();
3286#endif /* USE_XCB */
3287    }
3288    return;
3289}
3290
3291#define X_GLsop_GetLightfv 118
3292void __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
3293{
3294    struct glx_context * const gc = __glXGetCurrentContext();
3295    Display * const dpy = gc->currentDpy;
3296#ifndef USE_XCB
3297    const GLuint cmdlen = 8;
3298#endif
3299    if (__builtin_expect(dpy != NULL, 1)) {
3300#ifdef USE_XCB
3301        xcb_connection_t *c = XGetXCBConnection(dpy);
3302        (void) __glXFlushRenderBuffer(gc, gc->pc);
3303        xcb_glx_get_lightfv_reply_t *reply = xcb_glx_get_lightfv_reply(c, xcb_glx_get_lightfv(c, gc->currentContextTag, light, pname), NULL);
3304        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3305        /* of elements, not the length of the data part. A single element is embedded. */
3306        if (xcb_glx_get_lightfv_data_length(reply) == 1)
3307            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3308        else
3309            (void)memcpy(params, xcb_glx_get_lightfv_data(reply), xcb_glx_get_lightfv_data_length(reply) * sizeof(GLfloat));
3310        free(reply);
3311#else
3312        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
3313(void) memcpy((void *)(pc + 0), (void *)(&light), 4);
3314(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3315        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3316        UnlockDisplay(dpy); SyncHandle();
3317#endif /* USE_XCB */
3318    }
3319    return;
3320}
3321
3322#define X_GLsop_GetLightiv 119
3323void __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
3324{
3325    struct glx_context * const gc = __glXGetCurrentContext();
3326    Display * const dpy = gc->currentDpy;
3327#ifndef USE_XCB
3328    const GLuint cmdlen = 8;
3329#endif
3330    if (__builtin_expect(dpy != NULL, 1)) {
3331#ifdef USE_XCB
3332        xcb_connection_t *c = XGetXCBConnection(dpy);
3333        (void) __glXFlushRenderBuffer(gc, gc->pc);
3334        xcb_glx_get_lightiv_reply_t *reply = xcb_glx_get_lightiv_reply(c, xcb_glx_get_lightiv(c, gc->currentContextTag, light, pname), NULL);
3335        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3336        /* of elements, not the length of the data part. A single element is embedded. */
3337        if (xcb_glx_get_lightiv_data_length(reply) == 1)
3338            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3339        else
3340            (void)memcpy(params, xcb_glx_get_lightiv_data(reply), xcb_glx_get_lightiv_data_length(reply) * sizeof(GLint));
3341        free(reply);
3342#else
3343        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
3344(void) memcpy((void *)(pc + 0), (void *)(&light), 4);
3345(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3346        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3347        UnlockDisplay(dpy); SyncHandle();
3348#endif /* USE_XCB */
3349    }
3350    return;
3351}
3352
3353#define X_GLsop_GetMapdv 120
3354void __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
3355{
3356    struct glx_context * const gc = __glXGetCurrentContext();
3357    Display * const dpy = gc->currentDpy;
3358#ifndef USE_XCB
3359    const GLuint cmdlen = 8;
3360#endif
3361    if (__builtin_expect(dpy != NULL, 1)) {
3362#ifdef USE_XCB
3363        xcb_connection_t *c = XGetXCBConnection(dpy);
3364        (void) __glXFlushRenderBuffer(gc, gc->pc);
3365        xcb_glx_get_mapdv_reply_t *reply = xcb_glx_get_mapdv_reply(c, xcb_glx_get_mapdv(c, gc->currentContextTag, target, query), NULL);
3366        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3367        /* of elements, not the length of the data part. A single element is embedded. */
3368        if (xcb_glx_get_mapdv_data_length(reply) == 1)
3369            (void)memcpy(v, &reply->datum, sizeof(reply->datum));
3370        else
3371            (void)memcpy(v, xcb_glx_get_mapdv_data(reply), xcb_glx_get_mapdv_data_length(reply) * sizeof(GLdouble));
3372        free(reply);
3373#else
3374        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
3375(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3376(void) memcpy((void *)(pc + 4), (void *)(&query), 4);
3377        (void) __glXReadReply(dpy, 8, v, GL_FALSE);
3378        UnlockDisplay(dpy); SyncHandle();
3379#endif /* USE_XCB */
3380    }
3381    return;
3382}
3383
3384#define X_GLsop_GetMapfv 121
3385void __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
3386{
3387    struct glx_context * const gc = __glXGetCurrentContext();
3388    Display * const dpy = gc->currentDpy;
3389#ifndef USE_XCB
3390    const GLuint cmdlen = 8;
3391#endif
3392    if (__builtin_expect(dpy != NULL, 1)) {
3393#ifdef USE_XCB
3394        xcb_connection_t *c = XGetXCBConnection(dpy);
3395        (void) __glXFlushRenderBuffer(gc, gc->pc);
3396        xcb_glx_get_mapfv_reply_t *reply = xcb_glx_get_mapfv_reply(c, xcb_glx_get_mapfv(c, gc->currentContextTag, target, query), NULL);
3397        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3398        /* of elements, not the length of the data part. A single element is embedded. */
3399        if (xcb_glx_get_mapfv_data_length(reply) == 1)
3400            (void)memcpy(v, &reply->datum, sizeof(reply->datum));
3401        else
3402            (void)memcpy(v, xcb_glx_get_mapfv_data(reply), xcb_glx_get_mapfv_data_length(reply) * sizeof(GLfloat));
3403        free(reply);
3404#else
3405        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
3406(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3407(void) memcpy((void *)(pc + 4), (void *)(&query), 4);
3408        (void) __glXReadReply(dpy, 4, v, GL_FALSE);
3409        UnlockDisplay(dpy); SyncHandle();
3410#endif /* USE_XCB */
3411    }
3412    return;
3413}
3414
3415#define X_GLsop_GetMapiv 122
3416void __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
3417{
3418    struct glx_context * const gc = __glXGetCurrentContext();
3419    Display * const dpy = gc->currentDpy;
3420#ifndef USE_XCB
3421    const GLuint cmdlen = 8;
3422#endif
3423    if (__builtin_expect(dpy != NULL, 1)) {
3424#ifdef USE_XCB
3425        xcb_connection_t *c = XGetXCBConnection(dpy);
3426        (void) __glXFlushRenderBuffer(gc, gc->pc);
3427        xcb_glx_get_mapiv_reply_t *reply = xcb_glx_get_mapiv_reply(c, xcb_glx_get_mapiv(c, gc->currentContextTag, target, query), NULL);
3428        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3429        /* of elements, not the length of the data part. A single element is embedded. */
3430        if (xcb_glx_get_mapiv_data_length(reply) == 1)
3431            (void)memcpy(v, &reply->datum, sizeof(reply->datum));
3432        else
3433            (void)memcpy(v, xcb_glx_get_mapiv_data(reply), xcb_glx_get_mapiv_data_length(reply) * sizeof(GLint));
3434        free(reply);
3435#else
3436        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
3437(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3438(void) memcpy((void *)(pc + 4), (void *)(&query), 4);
3439        (void) __glXReadReply(dpy, 4, v, GL_FALSE);
3440        UnlockDisplay(dpy); SyncHandle();
3441#endif /* USE_XCB */
3442    }
3443    return;
3444}
3445
3446#define X_GLsop_GetMaterialfv 123
3447void __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
3448{
3449    struct glx_context * const gc = __glXGetCurrentContext();
3450    Display * const dpy = gc->currentDpy;
3451#ifndef USE_XCB
3452    const GLuint cmdlen = 8;
3453#endif
3454    if (__builtin_expect(dpy != NULL, 1)) {
3455#ifdef USE_XCB
3456        xcb_connection_t *c = XGetXCBConnection(dpy);
3457        (void) __glXFlushRenderBuffer(gc, gc->pc);
3458        xcb_glx_get_materialfv_reply_t *reply = xcb_glx_get_materialfv_reply(c, xcb_glx_get_materialfv(c, gc->currentContextTag, face, pname), NULL);
3459        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3460        /* of elements, not the length of the data part. A single element is embedded. */
3461        if (xcb_glx_get_materialfv_data_length(reply) == 1)
3462            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3463        else
3464            (void)memcpy(params, xcb_glx_get_materialfv_data(reply), xcb_glx_get_materialfv_data_length(reply) * sizeof(GLfloat));
3465        free(reply);
3466#else
3467        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
3468(void) memcpy((void *)(pc + 0), (void *)(&face), 4);
3469(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3470        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3471        UnlockDisplay(dpy); SyncHandle();
3472#endif /* USE_XCB */
3473    }
3474    return;
3475}
3476
3477#define X_GLsop_GetMaterialiv 124
3478void __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
3479{
3480    struct glx_context * const gc = __glXGetCurrentContext();
3481    Display * const dpy = gc->currentDpy;
3482#ifndef USE_XCB
3483    const GLuint cmdlen = 8;
3484#endif
3485    if (__builtin_expect(dpy != NULL, 1)) {
3486#ifdef USE_XCB
3487        xcb_connection_t *c = XGetXCBConnection(dpy);
3488        (void) __glXFlushRenderBuffer(gc, gc->pc);
3489        xcb_glx_get_materialiv_reply_t *reply = xcb_glx_get_materialiv_reply(c, xcb_glx_get_materialiv(c, gc->currentContextTag, face, pname), NULL);
3490        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3491        /* of elements, not the length of the data part. A single element is embedded. */
3492        if (xcb_glx_get_materialiv_data_length(reply) == 1)
3493            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3494        else
3495            (void)memcpy(params, xcb_glx_get_materialiv_data(reply), xcb_glx_get_materialiv_data_length(reply) * sizeof(GLint));
3496        free(reply);
3497#else
3498        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
3499(void) memcpy((void *)(pc + 0), (void *)(&face), 4);
3500(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3501        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3502        UnlockDisplay(dpy); SyncHandle();
3503#endif /* USE_XCB */
3504    }
3505    return;
3506}
3507
3508#define X_GLsop_GetPixelMapfv 125
3509void __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
3510{
3511    struct glx_context * const gc = __glXGetCurrentContext();
3512    Display * const dpy = gc->currentDpy;
3513#ifndef USE_XCB
3514    const GLuint cmdlen = 4;
3515#endif
3516    if (__builtin_expect(dpy != NULL, 1)) {
3517#ifdef USE_XCB
3518        xcb_connection_t *c = XGetXCBConnection(dpy);
3519        (void) __glXFlushRenderBuffer(gc, gc->pc);
3520        xcb_glx_get_pixel_mapfv_reply_t *reply = xcb_glx_get_pixel_mapfv_reply(c, xcb_glx_get_pixel_mapfv(c, gc->currentContextTag, map), NULL);
3521        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3522        /* of elements, not the length of the data part. A single element is embedded. */
3523        if (xcb_glx_get_pixel_mapfv_data_length(reply) == 1)
3524            (void)memcpy(values, &reply->datum, sizeof(reply->datum));
3525        else
3526            (void)memcpy(values, xcb_glx_get_pixel_mapfv_data(reply), xcb_glx_get_pixel_mapfv_data_length(reply) * sizeof(GLfloat));
3527        free(reply);
3528#else
3529        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
3530(void) memcpy((void *)(pc + 0), (void *)(&map), 4);
3531        (void) __glXReadReply(dpy, 4, values, GL_FALSE);
3532        UnlockDisplay(dpy); SyncHandle();
3533#endif /* USE_XCB */
3534    }
3535    return;
3536}
3537
3538#define X_GLsop_GetPixelMapuiv 126
3539void __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
3540{
3541    struct glx_context * const gc = __glXGetCurrentContext();
3542    Display * const dpy = gc->currentDpy;
3543#ifndef USE_XCB
3544    const GLuint cmdlen = 4;
3545#endif
3546    if (__builtin_expect(dpy != NULL, 1)) {
3547#ifdef USE_XCB
3548        xcb_connection_t *c = XGetXCBConnection(dpy);
3549        (void) __glXFlushRenderBuffer(gc, gc->pc);
3550        xcb_glx_get_pixel_mapuiv_reply_t *reply = xcb_glx_get_pixel_mapuiv_reply(c, xcb_glx_get_pixel_mapuiv(c, gc->currentContextTag, map), NULL);
3551        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3552        /* of elements, not the length of the data part. A single element is embedded. */
3553        if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 1)
3554            (void)memcpy(values, &reply->datum, sizeof(reply->datum));
3555        else
3556            (void)memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply), xcb_glx_get_pixel_mapuiv_data_length(reply) * sizeof(GLuint));
3557        free(reply);
3558#else
3559        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
3560(void) memcpy((void *)(pc + 0), (void *)(&map), 4);
3561        (void) __glXReadReply(dpy, 4, values, GL_FALSE);
3562        UnlockDisplay(dpy); SyncHandle();
3563#endif /* USE_XCB */
3564    }
3565    return;
3566}
3567
3568#define X_GLsop_GetPixelMapusv 127
3569void __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
3570{
3571    struct glx_context * const gc = __glXGetCurrentContext();
3572    Display * const dpy = gc->currentDpy;
3573#ifndef USE_XCB
3574    const GLuint cmdlen = 4;
3575#endif
3576    if (__builtin_expect(dpy != NULL, 1)) {
3577#ifdef USE_XCB
3578        xcb_connection_t *c = XGetXCBConnection(dpy);
3579        (void) __glXFlushRenderBuffer(gc, gc->pc);
3580        xcb_glx_get_pixel_mapusv_reply_t *reply = xcb_glx_get_pixel_mapusv_reply(c, xcb_glx_get_pixel_mapusv(c, gc->currentContextTag, map), NULL);
3581        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3582        /* of elements, not the length of the data part. A single element is embedded. */
3583        if (xcb_glx_get_pixel_mapusv_data_length(reply) == 1)
3584            (void)memcpy(values, &reply->datum, sizeof(reply->datum));
3585        else
3586            (void)memcpy(values, xcb_glx_get_pixel_mapusv_data(reply), xcb_glx_get_pixel_mapusv_data_length(reply) * sizeof(GLushort));
3587        free(reply);
3588#else
3589        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
3590(void) memcpy((void *)(pc + 0), (void *)(&map), 4);
3591        (void) __glXReadReply(dpy, 2, values, GL_FALSE);
3592        UnlockDisplay(dpy); SyncHandle();
3593#endif /* USE_XCB */
3594    }
3595    return;
3596}
3597
3598#define X_GLsop_GetPolygonStipple 128
3599void __indirect_glGetPolygonStipple(GLubyte * mask)
3600{
3601    struct glx_context * const gc = __glXGetCurrentContext();
3602    Display * const dpy = gc->currentDpy;
3603#ifndef USE_XCB
3604    const GLuint cmdlen = 4;
3605#endif
3606    if (__builtin_expect(dpy != NULL, 1)) {
3607#ifdef USE_XCB
3608        xcb_connection_t *c = XGetXCBConnection(dpy);
3609        (void) __glXFlushRenderBuffer(gc, gc->pc);
3610        xcb_glx_get_polygon_stipple_reply_t *reply = xcb_glx_get_polygon_stipple_reply(c, xcb_glx_get_polygon_stipple(c, gc->currentContextTag, 0), NULL);
3611        __glEmptyImage(gc, 3, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, xcb_glx_get_polygon_stipple_data(reply), mask);
3612        free(reply);
3613#else
3614        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
3615        *(int32_t *)(pc + 0) = 0;
3616        __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, GL_FALSE);
3617        UnlockDisplay(dpy); SyncHandle();
3618#endif /* USE_XCB */
3619    }
3620    return;
3621}
3622
3623#define X_GLsop_GetTexEnvfv 130
3624void __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
3625{
3626    struct glx_context * const gc = __glXGetCurrentContext();
3627    Display * const dpy = gc->currentDpy;
3628#ifndef USE_XCB
3629    const GLuint cmdlen = 8;
3630#endif
3631    if (__builtin_expect(dpy != NULL, 1)) {
3632#ifdef USE_XCB
3633        xcb_connection_t *c = XGetXCBConnection(dpy);
3634        (void) __glXFlushRenderBuffer(gc, gc->pc);
3635        xcb_glx_get_tex_envfv_reply_t *reply = xcb_glx_get_tex_envfv_reply(c, xcb_glx_get_tex_envfv(c, gc->currentContextTag, target, pname), NULL);
3636        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3637        /* of elements, not the length of the data part. A single element is embedded. */
3638        if (xcb_glx_get_tex_envfv_data_length(reply) == 1)
3639            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3640        else
3641            (void)memcpy(params, xcb_glx_get_tex_envfv_data(reply), xcb_glx_get_tex_envfv_data_length(reply) * sizeof(GLfloat));
3642        free(reply);
3643#else
3644        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
3645(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3646(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3647        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3648        UnlockDisplay(dpy); SyncHandle();
3649#endif /* USE_XCB */
3650    }
3651    return;
3652}
3653
3654#define X_GLsop_GetTexEnviv 131
3655void __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
3656{
3657    struct glx_context * const gc = __glXGetCurrentContext();
3658    Display * const dpy = gc->currentDpy;
3659#ifndef USE_XCB
3660    const GLuint cmdlen = 8;
3661#endif
3662    if (__builtin_expect(dpy != NULL, 1)) {
3663#ifdef USE_XCB
3664        xcb_connection_t *c = XGetXCBConnection(dpy);
3665        (void) __glXFlushRenderBuffer(gc, gc->pc);
3666        xcb_glx_get_tex_enviv_reply_t *reply = xcb_glx_get_tex_enviv_reply(c, xcb_glx_get_tex_enviv(c, gc->currentContextTag, target, pname), NULL);
3667        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3668        /* of elements, not the length of the data part. A single element is embedded. */
3669        if (xcb_glx_get_tex_enviv_data_length(reply) == 1)
3670            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3671        else
3672            (void)memcpy(params, xcb_glx_get_tex_enviv_data(reply), xcb_glx_get_tex_enviv_data_length(reply) * sizeof(GLint));
3673        free(reply);
3674#else
3675        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
3676(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3677(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3678        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3679        UnlockDisplay(dpy); SyncHandle();
3680#endif /* USE_XCB */
3681    }
3682    return;
3683}
3684
3685#define X_GLsop_GetTexGendv 132
3686void __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
3687{
3688    struct glx_context * const gc = __glXGetCurrentContext();
3689    Display * const dpy = gc->currentDpy;
3690#ifndef USE_XCB
3691    const GLuint cmdlen = 8;
3692#endif
3693    if (__builtin_expect(dpy != NULL, 1)) {
3694#ifdef USE_XCB
3695        xcb_connection_t *c = XGetXCBConnection(dpy);
3696        (void) __glXFlushRenderBuffer(gc, gc->pc);
3697        xcb_glx_get_tex_gendv_reply_t *reply = xcb_glx_get_tex_gendv_reply(c, xcb_glx_get_tex_gendv(c, gc->currentContextTag, coord, pname), NULL);
3698        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3699        /* of elements, not the length of the data part. A single element is embedded. */
3700        if (xcb_glx_get_tex_gendv_data_length(reply) == 1)
3701            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3702        else
3703            (void)memcpy(params, xcb_glx_get_tex_gendv_data(reply), xcb_glx_get_tex_gendv_data_length(reply) * sizeof(GLdouble));
3704        free(reply);
3705#else
3706        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
3707(void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
3708(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3709        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
3710        UnlockDisplay(dpy); SyncHandle();
3711#endif /* USE_XCB */
3712    }
3713    return;
3714}
3715
3716#define X_GLsop_GetTexGenfv 133
3717void __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
3718{
3719    struct glx_context * const gc = __glXGetCurrentContext();
3720    Display * const dpy = gc->currentDpy;
3721#ifndef USE_XCB
3722    const GLuint cmdlen = 8;
3723#endif
3724    if (__builtin_expect(dpy != NULL, 1)) {
3725#ifdef USE_XCB
3726        xcb_connection_t *c = XGetXCBConnection(dpy);
3727        (void) __glXFlushRenderBuffer(gc, gc->pc);
3728        xcb_glx_get_tex_genfv_reply_t *reply = xcb_glx_get_tex_genfv_reply(c, xcb_glx_get_tex_genfv(c, gc->currentContextTag, coord, pname), NULL);
3729        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3730        /* of elements, not the length of the data part. A single element is embedded. */
3731        if (xcb_glx_get_tex_genfv_data_length(reply) == 1)
3732            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3733        else
3734            (void)memcpy(params, xcb_glx_get_tex_genfv_data(reply), xcb_glx_get_tex_genfv_data_length(reply) * sizeof(GLfloat));
3735        free(reply);
3736#else
3737        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
3738(void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
3739(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3740        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3741        UnlockDisplay(dpy); SyncHandle();
3742#endif /* USE_XCB */
3743    }
3744    return;
3745}
3746
3747#define X_GLsop_GetTexGeniv 134
3748void __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
3749{
3750    struct glx_context * const gc = __glXGetCurrentContext();
3751    Display * const dpy = gc->currentDpy;
3752#ifndef USE_XCB
3753    const GLuint cmdlen = 8;
3754#endif
3755    if (__builtin_expect(dpy != NULL, 1)) {
3756#ifdef USE_XCB
3757        xcb_connection_t *c = XGetXCBConnection(dpy);
3758        (void) __glXFlushRenderBuffer(gc, gc->pc);
3759        xcb_glx_get_tex_geniv_reply_t *reply = xcb_glx_get_tex_geniv_reply(c, xcb_glx_get_tex_geniv(c, gc->currentContextTag, coord, pname), NULL);
3760        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3761        /* of elements, not the length of the data part. A single element is embedded. */
3762        if (xcb_glx_get_tex_geniv_data_length(reply) == 1)
3763            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3764        else
3765            (void)memcpy(params, xcb_glx_get_tex_geniv_data(reply), xcb_glx_get_tex_geniv_data_length(reply) * sizeof(GLint));
3766        free(reply);
3767#else
3768        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
3769(void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
3770(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3771        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3772        UnlockDisplay(dpy); SyncHandle();
3773#endif /* USE_XCB */
3774    }
3775    return;
3776}
3777
3778#define X_GLsop_GetTexImage 135
3779void __indirect_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels)
3780{
3781    struct glx_context * const gc = __glXGetCurrentContext();
3782    const __GLXattribute * const state = gc->client_state_private;
3783    Display * const dpy = gc->currentDpy;
3784#ifndef USE_XCB
3785    const GLuint cmdlen = 20;
3786#endif
3787    if (__builtin_expect(dpy != NULL, 1)) {
3788#ifdef USE_XCB
3789        xcb_connection_t *c = XGetXCBConnection(dpy);
3790        (void) __glXFlushRenderBuffer(gc, gc->pc);
3791        xcb_glx_get_tex_image_reply_t *reply = xcb_glx_get_tex_image_reply(c, xcb_glx_get_tex_image(c, gc->currentContextTag, target, level, format, type, state->storePack.swapEndian), NULL);
3792        if (reply->height == 0) { reply->height = 1; }
3793        if (reply->depth == 0) { reply->depth = 1; }
3794        __glEmptyImage(gc, 3, reply->width, reply->height, reply->depth, format, type, xcb_glx_get_tex_image_data(reply), pixels);
3795        free(reply);
3796#else
3797        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
3798(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3799(void) memcpy((void *)(pc + 4), (void *)(&level), 4);
3800(void) memcpy((void *)(pc + 8), (void *)(&format), 4);
3801(void) memcpy((void *)(pc + 12), (void *)(&type), 4);
3802        *(int32_t *)(pc + 16) = 0;
3803        * (int8_t *)(pc + 16) = state->storePack.swapEndian;
3804        __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels, GL_TRUE);
3805        UnlockDisplay(dpy); SyncHandle();
3806#endif /* USE_XCB */
3807    }
3808    return;
3809}
3810
3811#define X_GLsop_GetTexParameterfv 136
3812void __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
3813{
3814    struct glx_context * const gc = __glXGetCurrentContext();
3815    Display * const dpy = gc->currentDpy;
3816#ifndef USE_XCB
3817    const GLuint cmdlen = 8;
3818#endif
3819    if (__builtin_expect(dpy != NULL, 1)) {
3820#ifdef USE_XCB
3821        xcb_connection_t *c = XGetXCBConnection(dpy);
3822        (void) __glXFlushRenderBuffer(gc, gc->pc);
3823        xcb_glx_get_tex_parameterfv_reply_t *reply = xcb_glx_get_tex_parameterfv_reply(c, xcb_glx_get_tex_parameterfv(c, gc->currentContextTag, target, pname), NULL);
3824        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3825        /* of elements, not the length of the data part. A single element is embedded. */
3826        if (xcb_glx_get_tex_parameterfv_data_length(reply) == 1)
3827            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3828        else
3829            (void)memcpy(params, xcb_glx_get_tex_parameterfv_data(reply), xcb_glx_get_tex_parameterfv_data_length(reply) * sizeof(GLfloat));
3830        free(reply);
3831#else
3832        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
3833(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3834(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3835        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3836        UnlockDisplay(dpy); SyncHandle();
3837#endif /* USE_XCB */
3838    }
3839    return;
3840}
3841
3842#define X_GLsop_GetTexParameteriv 137
3843void __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
3844{
3845    struct glx_context * const gc = __glXGetCurrentContext();
3846    Display * const dpy = gc->currentDpy;
3847#ifndef USE_XCB
3848    const GLuint cmdlen = 8;
3849#endif
3850    if (__builtin_expect(dpy != NULL, 1)) {
3851#ifdef USE_XCB
3852        xcb_connection_t *c = XGetXCBConnection(dpy);
3853        (void) __glXFlushRenderBuffer(gc, gc->pc);
3854        xcb_glx_get_tex_parameteriv_reply_t *reply = xcb_glx_get_tex_parameteriv_reply(c, xcb_glx_get_tex_parameteriv(c, gc->currentContextTag, target, pname), NULL);
3855        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3856        /* of elements, not the length of the data part. A single element is embedded. */
3857        if (xcb_glx_get_tex_parameteriv_data_length(reply) == 1)
3858            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3859        else
3860            (void)memcpy(params, xcb_glx_get_tex_parameteriv_data(reply), xcb_glx_get_tex_parameteriv_data_length(reply) * sizeof(GLint));
3861        free(reply);
3862#else
3863        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
3864(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3865(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
3866        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3867        UnlockDisplay(dpy); SyncHandle();
3868#endif /* USE_XCB */
3869    }
3870    return;
3871}
3872
3873#define X_GLsop_GetTexLevelParameterfv 138
3874void __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params)
3875{
3876    struct glx_context * const gc = __glXGetCurrentContext();
3877    Display * const dpy = gc->currentDpy;
3878#ifndef USE_XCB
3879    const GLuint cmdlen = 12;
3880#endif
3881    if (__builtin_expect(dpy != NULL, 1)) {
3882#ifdef USE_XCB
3883        xcb_connection_t *c = XGetXCBConnection(dpy);
3884        (void) __glXFlushRenderBuffer(gc, gc->pc);
3885        xcb_glx_get_tex_level_parameterfv_reply_t *reply = xcb_glx_get_tex_level_parameterfv_reply(c, xcb_glx_get_tex_level_parameterfv(c, gc->currentContextTag, target, level, pname), NULL);
3886        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3887        /* of elements, not the length of the data part. A single element is embedded. */
3888        if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 1)
3889            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3890        else
3891            (void)memcpy(params, xcb_glx_get_tex_level_parameterfv_data(reply), xcb_glx_get_tex_level_parameterfv_data_length(reply) * sizeof(GLfloat));
3892        free(reply);
3893#else
3894        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv, cmdlen);
3895(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3896(void) memcpy((void *)(pc + 4), (void *)(&level), 4);
3897(void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
3898        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3899        UnlockDisplay(dpy); SyncHandle();
3900#endif /* USE_XCB */
3901    }
3902    return;
3903}
3904
3905#define X_GLsop_GetTexLevelParameteriv 139
3906void __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params)
3907{
3908    struct glx_context * const gc = __glXGetCurrentContext();
3909    Display * const dpy = gc->currentDpy;
3910#ifndef USE_XCB
3911    const GLuint cmdlen = 12;
3912#endif
3913    if (__builtin_expect(dpy != NULL, 1)) {
3914#ifdef USE_XCB
3915        xcb_connection_t *c = XGetXCBConnection(dpy);
3916        (void) __glXFlushRenderBuffer(gc, gc->pc);
3917        xcb_glx_get_tex_level_parameteriv_reply_t *reply = xcb_glx_get_tex_level_parameteriv_reply(c, xcb_glx_get_tex_level_parameteriv(c, gc->currentContextTag, target, level, pname), NULL);
3918        /* the XXX_data_length() xcb function name is misleading, it returns the number */
3919        /* of elements, not the length of the data part. A single element is embedded. */
3920        if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 1)
3921            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
3922        else
3923            (void)memcpy(params, xcb_glx_get_tex_level_parameteriv_data(reply), xcb_glx_get_tex_level_parameteriv_data_length(reply) * sizeof(GLint));
3924        free(reply);
3925#else
3926        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv, cmdlen);
3927(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3928(void) memcpy((void *)(pc + 4), (void *)(&level), 4);
3929(void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
3930        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3931        UnlockDisplay(dpy); SyncHandle();
3932#endif /* USE_XCB */
3933    }
3934    return;
3935}
3936
3937#define X_GLsop_IsList 141
3938GLboolean __indirect_glIsList(GLuint list)
3939{
3940    struct glx_context * const gc = __glXGetCurrentContext();
3941    Display * const dpy = gc->currentDpy;
3942    GLboolean retval = (GLboolean) 0;
3943#ifndef USE_XCB
3944    const GLuint cmdlen = 4;
3945#endif
3946    if (__builtin_expect(dpy != NULL, 1)) {
3947#ifdef USE_XCB
3948        xcb_connection_t *c = XGetXCBConnection(dpy);
3949        (void) __glXFlushRenderBuffer(gc, gc->pc);
3950        xcb_glx_is_list_reply_t *reply = xcb_glx_is_list_reply(c, xcb_glx_is_list(c, gc->currentContextTag, list), NULL);
3951        retval = reply->ret_val;
3952        free(reply);
3953#else
3954        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
3955(void) memcpy((void *)(pc + 0), (void *)(&list), 4);
3956        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
3957        UnlockDisplay(dpy); SyncHandle();
3958#endif /* USE_XCB */
3959    }
3960    return retval;
3961}
3962
3963#define X_GLrop_DepthRange 174
3964void __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
3965{
3966    struct glx_context * const gc = __glXGetCurrentContext();
3967    const GLuint cmdlen = 20;
3968emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
3969(void) memcpy((void *)(gc->pc + 4), (void *)(&zNear), 8);
3970(void) memcpy((void *)(gc->pc + 12), (void *)(&zFar), 8);
3971gc->pc += cmdlen;
3972if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3973}
3974
3975#define X_GLrop_Frustum 175
3976void __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
3977{
3978    struct glx_context * const gc = __glXGetCurrentContext();
3979    const GLuint cmdlen = 52;
3980emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
3981(void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8);
3982(void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8);
3983(void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8);
3984(void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8);
3985(void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8);
3986(void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8);
3987gc->pc += cmdlen;
3988if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3989}
3990
3991#define X_GLrop_LoadIdentity 176
3992void __indirect_glLoadIdentity(void)
3993{
3994    struct glx_context * const gc = __glXGetCurrentContext();
3995    const GLuint cmdlen = 4;
3996emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
3997gc->pc += cmdlen;
3998if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3999}
4000
4001#define X_GLrop_LoadMatrixf 177
4002void __indirect_glLoadMatrixf(const GLfloat * m)
4003{
4004    struct glx_context * const gc = __glXGetCurrentContext();
4005    const GLuint cmdlen = 68;
4006emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
4007(void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
4008gc->pc += cmdlen;
4009if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4010}
4011
4012#define X_GLrop_LoadMatrixd 178
4013void __indirect_glLoadMatrixd(const GLdouble * m)
4014{
4015    struct glx_context * const gc = __glXGetCurrentContext();
4016    const GLuint cmdlen = 132;
4017emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
4018(void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
4019gc->pc += cmdlen;
4020if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4021}
4022
4023#define X_GLrop_MatrixMode 179
4024void __indirect_glMatrixMode(GLenum mode)
4025{
4026    struct glx_context * const gc = __glXGetCurrentContext();
4027    const GLuint cmdlen = 8;
4028emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
4029(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
4030gc->pc += cmdlen;
4031if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4032}
4033
4034#define X_GLrop_MultMatrixf 180
4035void __indirect_glMultMatrixf(const GLfloat * m)
4036{
4037    struct glx_context * const gc = __glXGetCurrentContext();
4038    const GLuint cmdlen = 68;
4039emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
4040(void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
4041gc->pc += cmdlen;
4042if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4043}
4044
4045#define X_GLrop_MultMatrixd 181
4046void __indirect_glMultMatrixd(const GLdouble * m)
4047{
4048    struct glx_context * const gc = __glXGetCurrentContext();
4049    const GLuint cmdlen = 132;
4050emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
4051(void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
4052gc->pc += cmdlen;
4053if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4054}
4055
4056#define X_GLrop_Ortho 182
4057void __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
4058{
4059    struct glx_context * const gc = __glXGetCurrentContext();
4060    const GLuint cmdlen = 52;
4061emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
4062(void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8);
4063(void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8);
4064(void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8);
4065(void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8);
4066(void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8);
4067(void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8);
4068gc->pc += cmdlen;
4069if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4070}
4071
4072#define X_GLrop_PopMatrix 183
4073void __indirect_glPopMatrix(void)
4074{
4075    struct glx_context * const gc = __glXGetCurrentContext();
4076    const GLuint cmdlen = 4;
4077emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
4078gc->pc += cmdlen;
4079if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4080}
4081
4082#define X_GLrop_PushMatrix 184
4083void __indirect_glPushMatrix(void)
4084{
4085    struct glx_context * const gc = __glXGetCurrentContext();
4086    const GLuint cmdlen = 4;
4087emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
4088gc->pc += cmdlen;
4089if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4090}
4091
4092#define X_GLrop_Rotated 185
4093void __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4094{
4095    struct glx_context * const gc = __glXGetCurrentContext();
4096    const GLuint cmdlen = 36;
4097emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
4098(void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 8);
4099(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
4100(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
4101(void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
4102gc->pc += cmdlen;
4103if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4104}
4105
4106#define X_GLrop_Rotatef 186
4107void __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
4108{
4109    struct glx_context * const gc = __glXGetCurrentContext();
4110    const GLuint cmdlen = 20;
4111emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
4112(void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 4);
4113(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
4114(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
4115(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
4116gc->pc += cmdlen;
4117if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4118}
4119
4120#define X_GLrop_Scaled 187
4121void __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
4122{
4123    struct glx_context * const gc = __glXGetCurrentContext();
4124    const GLuint cmdlen = 28;
4125emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
4126(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
4127(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
4128(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
4129gc->pc += cmdlen;
4130if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4131}
4132
4133#define X_GLrop_Scalef 188
4134void __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
4135{
4136    struct glx_context * const gc = __glXGetCurrentContext();
4137    const GLuint cmdlen = 16;
4138emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
4139(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
4140(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
4141(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
4142gc->pc += cmdlen;
4143if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4144}
4145
4146#define X_GLrop_Translated 189
4147void __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
4148{
4149    struct glx_context * const gc = __glXGetCurrentContext();
4150    const GLuint cmdlen = 28;
4151emit_header(gc->pc, X_GLrop_Translated, cmdlen);
4152(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
4153(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
4154(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
4155gc->pc += cmdlen;
4156if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4157}
4158
4159#define X_GLrop_Translatef 190
4160void __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
4161{
4162    struct glx_context * const gc = __glXGetCurrentContext();
4163    const GLuint cmdlen = 16;
4164emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
4165(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
4166(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
4167(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
4168gc->pc += cmdlen;
4169if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4170}
4171
4172#define X_GLrop_Viewport 191
4173void __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
4174{
4175    struct glx_context * const gc = __glXGetCurrentContext();
4176    const GLuint cmdlen = 20;
4177emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
4178(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
4179(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
4180(void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
4181(void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
4182gc->pc += cmdlen;
4183if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4184}
4185
4186#define X_GLrop_BindTexture 4117
4187void __indirect_glBindTexture(GLenum target, GLuint texture)
4188{
4189    struct glx_context * const gc = __glXGetCurrentContext();
4190    const GLuint cmdlen = 12;
4191emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
4192(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4193(void) memcpy((void *)(gc->pc + 8), (void *)(&texture), 4);
4194gc->pc += cmdlen;
4195if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4196}
4197
4198#define X_GLrop_Indexubv 194
4199void __indirect_glIndexub(GLubyte c)
4200{
4201    struct glx_context * const gc = __glXGetCurrentContext();
4202    const GLuint cmdlen = 8;
4203emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4204(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 1);
4205gc->pc += cmdlen;
4206if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4207}
4208
4209#define X_GLrop_Indexubv 194
4210void __indirect_glIndexubv(const GLubyte * c)
4211{
4212    struct glx_context * const gc = __glXGetCurrentContext();
4213    const GLuint cmdlen = 8;
4214emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4215(void) memcpy((void *)(gc->pc + 4), (void *)(c), 1);
4216gc->pc += cmdlen;
4217if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4218}
4219
4220#define X_GLrop_PolygonOffset 192
4221void __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
4222{
4223    struct glx_context * const gc = __glXGetCurrentContext();
4224    const GLuint cmdlen = 12;
4225emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
4226(void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4);
4227(void) memcpy((void *)(gc->pc + 8), (void *)(&units), 4);
4228gc->pc += cmdlen;
4229if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4230}
4231
4232#define X_GLrop_CopyTexImage1D 4119
4233void __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
4234{
4235    struct glx_context * const gc = __glXGetCurrentContext();
4236    const GLuint cmdlen = 32;
4237emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
4238(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4239(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
4240(void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
4241(void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4);
4242(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
4243(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
4244(void) memcpy((void *)(gc->pc + 28), (void *)(&border), 4);
4245gc->pc += cmdlen;
4246if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4247}
4248
4249#define X_GLrop_CopyTexImage2D 4120
4250void __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
4251{
4252    struct glx_context * const gc = __glXGetCurrentContext();
4253    const GLuint cmdlen = 36;
4254emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
4255(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4256(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
4257(void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
4258(void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4);
4259(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
4260(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
4261(void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
4262(void) memcpy((void *)(gc->pc + 32), (void *)(&border), 4);
4263gc->pc += cmdlen;
4264if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4265}
4266
4267#define X_GLrop_CopyTexSubImage1D 4121
4268void __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
4269{
4270    struct glx_context * const gc = __glXGetCurrentContext();
4271    const GLuint cmdlen = 28;
4272emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
4273(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4274(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
4275(void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4);
4276(void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4);
4277(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
4278(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
4279gc->pc += cmdlen;
4280if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4281}
4282
4283#define X_GLrop_CopyTexSubImage2D 4122
4284void __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
4285{
4286    struct glx_context * const gc = __glXGetCurrentContext();
4287    const GLuint cmdlen = 36;
4288emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
4289(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4290(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
4291(void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4);
4292(void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4);
4293(void) memcpy((void *)(gc->pc + 20), (void *)(&x), 4);
4294(void) memcpy((void *)(gc->pc + 24), (void *)(&y), 4);
4295(void) memcpy((void *)(gc->pc + 28), (void *)(&width), 4);
4296(void) memcpy((void *)(gc->pc + 32), (void *)(&height), 4);
4297gc->pc += cmdlen;
4298if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4299}
4300
4301#define X_GLsop_DeleteTextures 144
4302void __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
4303{
4304    struct glx_context * const gc = __glXGetCurrentContext();
4305    Display * const dpy = gc->currentDpy;
4306#ifndef USE_XCB
4307    const GLuint cmdlen = 4 + safe_pad(safe_mul(n, 4));
4308#endif
4309    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
4310        __glXSetError(gc, GL_INVALID_VALUE);
4311        return;
4312    }
4313    if (n < 0) {
4314        __glXSetError(gc, GL_INVALID_VALUE);
4315        return;
4316    }
4317    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
4318#ifdef USE_XCB
4319        xcb_connection_t *c = XGetXCBConnection(dpy);
4320        (void) __glXFlushRenderBuffer(gc, gc->pc);
4321        xcb_glx_delete_textures(c, gc->currentContextTag, n, textures);
4322#else
4323        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
4324(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
4325(void) memcpy((void *)(pc + 4), (void *)(textures), safe_mul(n, 4));
4326        UnlockDisplay(dpy); SyncHandle();
4327#endif /* USE_XCB */
4328    }
4329    return;
4330}
4331
4332#define X_GLvop_DeleteTexturesEXT 12
4333void glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
4334{
4335    struct glx_context * const gc = __glXGetCurrentContext();
4336
4337#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
4338    if (gc->isDirect) {
4339        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
4340        PFNGLDELETETEXTURESEXTPROC p =
4341            (PFNGLDELETETEXTURESEXTPROC) disp_table[327];
4342    p(n, textures);
4343    } else
4344#endif
4345    {
4346    struct glx_context * const gc = __glXGetCurrentContext();
4347    Display * const dpy = gc->currentDpy;
4348    const GLuint cmdlen = 4 + safe_pad(safe_mul(n, 4));
4349    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
4350        __glXSetError(gc, GL_INVALID_VALUE);
4351        return;
4352    }
4353    if (n < 0) {
4354        __glXSetError(gc, GL_INVALID_VALUE);
4355        return;
4356    }
4357    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
4358        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteTexturesEXT, cmdlen);
4359(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
4360(void) memcpy((void *)(pc + 4), (void *)(textures), safe_mul(n, 4));
4361        UnlockDisplay(dpy); SyncHandle();
4362    }
4363    return;
4364}
4365}
4366
4367#define X_GLsop_GenTextures 145
4368void __indirect_glGenTextures(GLsizei n, GLuint * textures)
4369{
4370    struct glx_context * const gc = __glXGetCurrentContext();
4371    Display * const dpy = gc->currentDpy;
4372#ifndef USE_XCB
4373    const GLuint cmdlen = 4;
4374#endif
4375    if (n < 0) {
4376        __glXSetError(gc, GL_INVALID_VALUE);
4377        return;
4378    }
4379    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
4380#ifdef USE_XCB
4381        xcb_connection_t *c = XGetXCBConnection(dpy);
4382        (void) __glXFlushRenderBuffer(gc, gc->pc);
4383        xcb_glx_gen_textures_reply_t *reply = xcb_glx_gen_textures_reply(c, xcb_glx_gen_textures(c, gc->currentContextTag, n), NULL);
4384        (void)memcpy(textures, xcb_glx_gen_textures_data(reply), xcb_glx_gen_textures_data_length(reply) * sizeof(GLuint));
4385        free(reply);
4386#else
4387        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
4388(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
4389        (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
4390        UnlockDisplay(dpy); SyncHandle();
4391#endif /* USE_XCB */
4392    }
4393    return;
4394}
4395
4396#define X_GLvop_GenTexturesEXT 13
4397void glGenTexturesEXT(GLsizei n, GLuint * textures)
4398{
4399    struct glx_context * const gc = __glXGetCurrentContext();
4400
4401#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
4402    if (gc->isDirect) {
4403        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
4404        PFNGLGENTEXTURESEXTPROC p =
4405            (PFNGLGENTEXTURESEXTPROC) disp_table[328];
4406    p(n, textures);
4407    } else
4408#endif
4409    {
4410    struct glx_context * const gc = __glXGetCurrentContext();
4411    Display * const dpy = gc->currentDpy;
4412    const GLuint cmdlen = 4;
4413    if (n < 0) {
4414        __glXSetError(gc, GL_INVALID_VALUE);
4415        return;
4416    }
4417    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
4418        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen);
4419(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
4420        (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
4421        UnlockDisplay(dpy); SyncHandle();
4422    }
4423    return;
4424}
4425}
4426
4427#define X_GLsop_IsTexture 146
4428GLboolean __indirect_glIsTexture(GLuint texture)
4429{
4430    struct glx_context * const gc = __glXGetCurrentContext();
4431    Display * const dpy = gc->currentDpy;
4432    GLboolean retval = (GLboolean) 0;
4433#ifndef USE_XCB
4434    const GLuint cmdlen = 4;
4435#endif
4436    if (__builtin_expect(dpy != NULL, 1)) {
4437#ifdef USE_XCB
4438        xcb_connection_t *c = XGetXCBConnection(dpy);
4439        (void) __glXFlushRenderBuffer(gc, gc->pc);
4440        xcb_glx_is_texture_reply_t *reply = xcb_glx_is_texture_reply(c, xcb_glx_is_texture(c, gc->currentContextTag, texture), NULL);
4441        retval = reply->ret_val;
4442        free(reply);
4443#else
4444        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
4445(void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
4446        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4447        UnlockDisplay(dpy); SyncHandle();
4448#endif /* USE_XCB */
4449    }
4450    return retval;
4451}
4452
4453#define X_GLvop_IsTextureEXT 14
4454GLboolean glIsTextureEXT(GLuint texture)
4455{
4456    struct glx_context * const gc = __glXGetCurrentContext();
4457
4458#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
4459    if (gc->isDirect) {
4460        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
4461        PFNGLISTEXTUREEXTPROC p =
4462            (PFNGLISTEXTUREEXTPROC) disp_table[330];
4463    return p(texture);
4464    } else
4465#endif
4466    {
4467    struct glx_context * const gc = __glXGetCurrentContext();
4468    Display * const dpy = gc->currentDpy;
4469    GLboolean retval = (GLboolean) 0;
4470    const GLuint cmdlen = 4;
4471    if (__builtin_expect(dpy != NULL, 1)) {
4472        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsTextureEXT, cmdlen);
4473(void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
4474        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4475        UnlockDisplay(dpy); SyncHandle();
4476    }
4477    return retval;
4478}
4479}
4480
4481#define X_GLrop_PrioritizeTextures 4118
4482void __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclampf * priorities)
4483{
4484    struct glx_context * const gc = __glXGetCurrentContext();
4485    const GLuint cmdlen = 8 + safe_pad(safe_mul(n, 4)) + safe_pad(safe_mul(n, 4));
4486    if (0 + safe_pad(safe_mul(n, 4)) + safe_pad(safe_mul(n, 4)) < 0) {
4487        __glXSetError(gc, GL_INVALID_VALUE);
4488        return;
4489    }
4490    if (n < 0) {
4491        __glXSetError(gc, GL_INVALID_VALUE);
4492        return;
4493    }
4494    if (__builtin_expect(n >= 0, 1)) {
4495emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
4496(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
4497(void) memcpy((void *)(gc->pc + 8), (void *)(textures), safe_mul(n, 4));
4498(void) memcpy((void *)(gc->pc + 8 + safe_mul(n, 4)), (void *)(priorities), safe_mul(n, 4));
4499gc->pc += cmdlen;
4500if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4501    }
4502}
4503
4504static void
4505__glx_TexSubImage_1D2D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels )
4506{
4507    struct glx_context * const gc = __glXGetCurrentContext();
4508    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
4509    const GLuint cmdlen = 60 + safe_pad(compsize);
4510    if (0 + safe_pad(compsize) < 0) {
4511        __glXSetError(gc, GL_INVALID_VALUE);
4512        return;
4513    }
4514    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4515if (cmdlen <= gc->maxSmallRenderCommandSize) {
4516    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
4517        (void) __glXFlushRenderBuffer(gc, gc->pc);
4518    }
4519emit_header(gc->pc, opcode, cmdlen);
4520(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
4521(void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4);
4522(void) memcpy((void *)(gc->pc + 32), (void *)(&xoffset), 4);
4523(void) memcpy((void *)(gc->pc + 36), (void *)(&yoffset), 4);
4524(void) memcpy((void *)(gc->pc + 40), (void *)(&width), 4);
4525(void) memcpy((void *)(gc->pc + 44), (void *)(&height), 4);
4526(void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4);
4527(void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4);
4528(void) memset((void *)(gc->pc + 56), 0, 4);
4529if (compsize > 0) {
4530    gc->fillImage(gc, dim, width, height, 1, format, type, pixels, gc->pc + 60, gc->pc + 4);
4531} else {
4532    (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
4533}
4534gc->pc += cmdlen;
4535if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4536}
4537else {
4538const GLint op = opcode;
4539const GLuint cmdlenLarge = cmdlen + 4;
4540GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
4541(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
4542(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
4543(void) memcpy((void *)(pc + 28), (void *)(&target), 4);
4544(void) memcpy((void *)(pc + 32), (void *)(&level), 4);
4545(void) memcpy((void *)(pc + 36), (void *)(&xoffset), 4);
4546(void) memcpy((void *)(pc + 40), (void *)(&yoffset), 4);
4547(void) memcpy((void *)(pc + 44), (void *)(&width), 4);
4548(void) memcpy((void *)(pc + 48), (void *)(&height), 4);
4549(void) memcpy((void *)(pc + 52), (void *)(&format), 4);
4550(void) memcpy((void *)(pc + 56), (void *)(&type), 4);
4551(void) memset((void *)(pc + 60), 0, 4);
4552__glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 64, pc + 8);
4553}
4554    }
4555}
4556
4557#define X_GLrop_TexSubImage1D 4099
4558void __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
4559{
4560    __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset, 1, width, 1, format, type, pixels );
4561}
4562
4563#define X_GLrop_TexSubImage2D 4100
4564void __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
4565{
4566    __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset, yoffset, width, height, format, type, pixels );
4567}
4568
4569#define X_GLrop_BlendColor 4096
4570void __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
4571{
4572    struct glx_context * const gc = __glXGetCurrentContext();
4573    const GLuint cmdlen = 20;
4574emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
4575(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
4576(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
4577(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
4578(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
4579gc->pc += cmdlen;
4580if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4581}
4582
4583#define X_GLrop_BlendEquation 4097
4584void __indirect_glBlendEquation(GLenum mode)
4585{
4586    struct glx_context * const gc = __glXGetCurrentContext();
4587    const GLuint cmdlen = 8;
4588emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
4589(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
4590gc->pc += cmdlen;
4591if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4592}
4593
4594#define X_GLrop_ColorTable 2053
4595void __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
4596{
4597    struct glx_context * const gc = __glXGetCurrentContext();
4598    const GLuint compsize = (table != NULL) ? __glImageSize(width, 1, 1, format, type, target) : 0;
4599    const GLuint cmdlen = 44 + safe_pad(compsize);
4600    if (0 + safe_pad(compsize) < 0) {
4601        __glXSetError(gc, GL_INVALID_VALUE);
4602        return;
4603    }
4604    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4605if (cmdlen <= gc->maxSmallRenderCommandSize) {
4606    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
4607        (void) __glXFlushRenderBuffer(gc, gc->pc);
4608    }
4609emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
4610(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
4611(void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4);
4612(void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
4613(void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4);
4614(void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4);
4615if (compsize > 0) {
4616    gc->fillImage(gc, 1, width, 1, 1, format, type, table, gc->pc + 44, gc->pc + 4);
4617} else {
4618    (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size );
4619}
4620gc->pc += cmdlen;
4621if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4622}
4623else {
4624const GLint op = X_GLrop_ColorTable;
4625const GLuint cmdlenLarge = cmdlen + 4;
4626GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
4627(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
4628(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
4629(void) memcpy((void *)(pc + 28), (void *)(&target), 4);
4630(void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4);
4631(void) memcpy((void *)(pc + 36), (void *)(&width), 4);
4632(void) memcpy((void *)(pc + 40), (void *)(&format), 4);
4633(void) memcpy((void *)(pc + 44), (void *)(&type), 4);
4634__glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type, table, pc + 48, pc + 8);
4635}
4636    }
4637}
4638
4639#define X_GLrop_ColorTableParameterfv 2054
4640void __indirect_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params)
4641{
4642    struct glx_context * const gc = __glXGetCurrentContext();
4643    const GLuint compsize = __glColorTableParameterfv_size(pname);
4644    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
4645    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
4646        __glXSetError(gc, GL_INVALID_VALUE);
4647        return;
4648    }
4649emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
4650(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4651(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
4652(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
4653gc->pc += cmdlen;
4654if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4655}
4656
4657#define X_GLrop_ColorTableParameteriv 2055
4658void __indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params)
4659{
4660    struct glx_context * const gc = __glXGetCurrentContext();
4661    const GLuint compsize = __glColorTableParameteriv_size(pname);
4662    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
4663    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
4664        __glXSetError(gc, GL_INVALID_VALUE);
4665        return;
4666    }
4667emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
4668(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4669(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
4670(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
4671gc->pc += cmdlen;
4672if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4673}
4674
4675#define X_GLrop_CopyColorTable 2056
4676void __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
4677{
4678    struct glx_context * const gc = __glXGetCurrentContext();
4679    const GLuint cmdlen = 24;
4680emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
4681(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4682(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
4683(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
4684(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
4685(void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
4686gc->pc += cmdlen;
4687if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4688}
4689
4690#define X_GLsop_GetColorTable 147
4691void __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table)
4692{
4693    struct glx_context * const gc = __glXGetCurrentContext();
4694    const __GLXattribute * const state = gc->client_state_private;
4695    Display * const dpy = gc->currentDpy;
4696#ifndef USE_XCB
4697    const GLuint cmdlen = 16;
4698#endif
4699    if (__builtin_expect(dpy != NULL, 1)) {
4700#ifdef USE_XCB
4701        xcb_connection_t *c = XGetXCBConnection(dpy);
4702        (void) __glXFlushRenderBuffer(gc, gc->pc);
4703        xcb_glx_get_color_table_reply_t *reply = xcb_glx_get_color_table_reply(c, xcb_glx_get_color_table(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
4704        __glEmptyImage(gc, 3, reply->width, 1, 1, format, type, xcb_glx_get_color_table_data(reply), table);
4705        free(reply);
4706#else
4707        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
4708(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4709(void) memcpy((void *)(pc + 4), (void *)(&format), 4);
4710(void) memcpy((void *)(pc + 8), (void *)(&type), 4);
4711        *(int32_t *)(pc + 12) = 0;
4712        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
4713        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE);
4714        UnlockDisplay(dpy); SyncHandle();
4715#endif /* USE_XCB */
4716    }
4717    return;
4718}
4719
4720#define X_GLvop_GetColorTableSGI 4098
4721void gl_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid * table)
4722{
4723    struct glx_context * const gc = __glXGetCurrentContext();
4724
4725#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
4726    if (gc->isDirect) {
4727        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
4728        PFNGLGETCOLORTABLESGIPROC p =
4729            (PFNGLGETCOLORTABLESGIPROC) disp_table[343];
4730    p(target, format, type, table);
4731    } else
4732#endif
4733    {
4734    struct glx_context * const gc = __glXGetCurrentContext();
4735    const __GLXattribute * const state = gc->client_state_private;
4736    Display * const dpy = gc->currentDpy;
4737    const GLuint cmdlen = 16;
4738    if (__builtin_expect(dpy != NULL, 1)) {
4739        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableSGI, cmdlen);
4740(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4741(void) memcpy((void *)(pc + 4), (void *)(&format), 4);
4742(void) memcpy((void *)(pc + 8), (void *)(&type), 4);
4743        *(int32_t *)(pc + 12) = 0;
4744        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
4745        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE);
4746        UnlockDisplay(dpy); SyncHandle();
4747    }
4748    return;
4749}
4750}
4751
4752#define X_GLsop_GetColorTableParameterfv 148
4753void __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params)
4754{
4755    struct glx_context * const gc = __glXGetCurrentContext();
4756    Display * const dpy = gc->currentDpy;
4757#ifndef USE_XCB
4758    const GLuint cmdlen = 8;
4759#endif
4760    if (__builtin_expect(dpy != NULL, 1)) {
4761#ifdef USE_XCB
4762        xcb_connection_t *c = XGetXCBConnection(dpy);
4763        (void) __glXFlushRenderBuffer(gc, gc->pc);
4764        xcb_glx_get_color_table_parameterfv_reply_t *reply = xcb_glx_get_color_table_parameterfv_reply(c, xcb_glx_get_color_table_parameterfv(c, gc->currentContextTag, target, pname), NULL);
4765        /* the XXX_data_length() xcb function name is misleading, it returns the number */
4766        /* of elements, not the length of the data part. A single element is embedded. */
4767        if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 1)
4768            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
4769        else
4770            (void)memcpy(params, xcb_glx_get_color_table_parameterfv_data(reply), xcb_glx_get_color_table_parameterfv_data_length(reply) * sizeof(GLfloat));
4771        free(reply);
4772#else
4773        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv, cmdlen);
4774(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4775(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
4776        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4777        UnlockDisplay(dpy); SyncHandle();
4778#endif /* USE_XCB */
4779    }
4780    return;
4781}
4782
4783#define X_GLvop_GetColorTableParameterfvSGI 4099
4784void gl_dispatch_stub_344(GLenum target, GLenum pname, GLfloat * params)
4785{
4786    struct glx_context * const gc = __glXGetCurrentContext();
4787
4788#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
4789    if (gc->isDirect) {
4790        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
4791        PFNGLGETCOLORTABLEPARAMETERFVSGIPROC p =
4792            (PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) disp_table[344];
4793    p(target, pname, params);
4794    } else
4795#endif
4796    {
4797    struct glx_context * const gc = __glXGetCurrentContext();
4798    Display * const dpy = gc->currentDpy;
4799    const GLuint cmdlen = 8;
4800    if (__builtin_expect(dpy != NULL, 1)) {
4801        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterfvSGI, cmdlen);
4802(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4803(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
4804        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4805        UnlockDisplay(dpy); SyncHandle();
4806    }
4807    return;
4808}
4809}
4810
4811#define X_GLsop_GetColorTableParameteriv 149
4812void __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * params)
4813{
4814    struct glx_context * const gc = __glXGetCurrentContext();
4815    Display * const dpy = gc->currentDpy;
4816#ifndef USE_XCB
4817    const GLuint cmdlen = 8;
4818#endif
4819    if (__builtin_expect(dpy != NULL, 1)) {
4820#ifdef USE_XCB
4821        xcb_connection_t *c = XGetXCBConnection(dpy);
4822        (void) __glXFlushRenderBuffer(gc, gc->pc);
4823        xcb_glx_get_color_table_parameteriv_reply_t *reply = xcb_glx_get_color_table_parameteriv_reply(c, xcb_glx_get_color_table_parameteriv(c, gc->currentContextTag, target, pname), NULL);
4824        /* the XXX_data_length() xcb function name is misleading, it returns the number */
4825        /* of elements, not the length of the data part. A single element is embedded. */
4826        if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 1)
4827            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
4828        else
4829            (void)memcpy(params, xcb_glx_get_color_table_parameteriv_data(reply), xcb_glx_get_color_table_parameteriv_data_length(reply) * sizeof(GLint));
4830        free(reply);
4831#else
4832        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv, cmdlen);
4833(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4834(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
4835        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4836        UnlockDisplay(dpy); SyncHandle();
4837#endif /* USE_XCB */
4838    }
4839    return;
4840}
4841
4842#define X_GLvop_GetColorTableParameterivSGI 4100
4843void gl_dispatch_stub_345(GLenum target, GLenum pname, GLint * params)
4844{
4845    struct glx_context * const gc = __glXGetCurrentContext();
4846
4847#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
4848    if (gc->isDirect) {
4849        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
4850        PFNGLGETCOLORTABLEPARAMETERIVSGIPROC p =
4851            (PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) disp_table[345];
4852    p(target, pname, params);
4853    } else
4854#endif
4855    {
4856    struct glx_context * const gc = __glXGetCurrentContext();
4857    Display * const dpy = gc->currentDpy;
4858    const GLuint cmdlen = 8;
4859    if (__builtin_expect(dpy != NULL, 1)) {
4860        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterivSGI, cmdlen);
4861(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4862(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
4863        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4864        UnlockDisplay(dpy); SyncHandle();
4865    }
4866    return;
4867}
4868}
4869
4870#define X_GLrop_ColorSubTable 195
4871void __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data)
4872{
4873    struct glx_context * const gc = __glXGetCurrentContext();
4874    const GLuint compsize = (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
4875    const GLuint cmdlen = 44 + safe_pad(compsize);
4876    if (0 + safe_pad(compsize) < 0) {
4877        __glXSetError(gc, GL_INVALID_VALUE);
4878        return;
4879    }
4880    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4881if (cmdlen <= gc->maxSmallRenderCommandSize) {
4882    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
4883        (void) __glXFlushRenderBuffer(gc, gc->pc);
4884    }
4885emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
4886(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
4887(void) memcpy((void *)(gc->pc + 28), (void *)(&start), 4);
4888(void) memcpy((void *)(gc->pc + 32), (void *)(&count), 4);
4889(void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4);
4890(void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4);
4891if (compsize > 0) {
4892    gc->fillImage(gc, 1, count, 1, 1, format, type, data, gc->pc + 44, gc->pc + 4);
4893} else {
4894    (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size );
4895}
4896gc->pc += cmdlen;
4897if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4898}
4899else {
4900const GLint op = X_GLrop_ColorSubTable;
4901const GLuint cmdlenLarge = cmdlen + 4;
4902GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
4903(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
4904(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
4905(void) memcpy((void *)(pc + 28), (void *)(&target), 4);
4906(void) memcpy((void *)(pc + 32), (void *)(&start), 4);
4907(void) memcpy((void *)(pc + 36), (void *)(&count), 4);
4908(void) memcpy((void *)(pc + 40), (void *)(&format), 4);
4909(void) memcpy((void *)(pc + 44), (void *)(&type), 4);
4910__glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type, data, pc + 48, pc + 8);
4911}
4912    }
4913}
4914
4915#define X_GLrop_CopyColorSubTable 196
4916void __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
4917{
4918    struct glx_context * const gc = __glXGetCurrentContext();
4919    const GLuint cmdlen = 24;
4920emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
4921(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4922(void) memcpy((void *)(gc->pc + 8), (void *)(&start), 4);
4923(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
4924(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
4925(void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
4926gc->pc += cmdlen;
4927if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4928}
4929
4930static void
4931__glx_ConvolutionFilter_1D2D( unsigned opcode, unsigned dim, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image )
4932{
4933    struct glx_context * const gc = __glXGetCurrentContext();
4934    const GLuint compsize = (image != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
4935    const GLuint cmdlen = 48 + safe_pad(compsize);
4936    if (0 + safe_pad(compsize) < 0) {
4937        __glXSetError(gc, GL_INVALID_VALUE);
4938        return;
4939    }
4940    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4941if (cmdlen <= gc->maxSmallRenderCommandSize) {
4942    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
4943        (void) __glXFlushRenderBuffer(gc, gc->pc);
4944    }
4945emit_header(gc->pc, opcode, cmdlen);
4946(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
4947(void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4);
4948(void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
4949(void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4);
4950(void) memcpy((void *)(gc->pc + 40), (void *)(&format), 4);
4951(void) memcpy((void *)(gc->pc + 44), (void *)(&type), 4);
4952if (compsize > 0) {
4953    gc->fillImage(gc, dim, width, height, 1, format, type, image, gc->pc + 48, gc->pc + 4);
4954} else {
4955    (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
4956}
4957gc->pc += cmdlen;
4958if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4959}
4960else {
4961const GLint op = opcode;
4962const GLuint cmdlenLarge = cmdlen + 4;
4963GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
4964(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
4965(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
4966(void) memcpy((void *)(pc + 28), (void *)(&target), 4);
4967(void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4);
4968(void) memcpy((void *)(pc + 36), (void *)(&width), 4);
4969(void) memcpy((void *)(pc + 40), (void *)(&height), 4);
4970(void) memcpy((void *)(pc + 44), (void *)(&format), 4);
4971(void) memcpy((void *)(pc + 48), (void *)(&type), 4);
4972__glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, image, pc + 52, pc + 8);
4973}
4974    }
4975}
4976
4977#define X_GLrop_ConvolutionFilter1D 4101
4978void __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image)
4979{
4980    __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target, internalformat, width, 1, format, type, image );
4981}
4982
4983#define X_GLrop_ConvolutionFilter2D 4102
4984void __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image)
4985{
4986    __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target, internalformat, width, height, format, type, image );
4987}
4988
4989#define X_GLrop_ConvolutionParameterf 4103
4990void __indirect_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
4991{
4992    struct glx_context * const gc = __glXGetCurrentContext();
4993    const GLuint cmdlen = 16;
4994emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
4995(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4996(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
4997(void) memcpy((void *)(gc->pc + 12), (void *)(&params), 4);
4998gc->pc += cmdlen;
4999if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5000}
5001
5002#define X_GLrop_ConvolutionParameterfv 4104
5003void __indirect_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params)
5004{
5005    struct glx_context * const gc = __glXGetCurrentContext();
5006    const GLuint compsize = __glConvolutionParameterfv_size(pname);
5007    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
5008    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
5009        __glXSetError(gc, GL_INVALID_VALUE);
5010        return;
5011    }
5012emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
5013(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5014(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
5015(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
5016gc->pc += cmdlen;
5017if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5018}
5019
5020#define X_GLrop_ConvolutionParameteri 4105
5021void __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
5022{
5023    struct glx_context * const gc = __glXGetCurrentContext();
5024    const GLuint cmdlen = 16;
5025emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
5026(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5027(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
5028(void) memcpy((void *)(gc->pc + 12), (void *)(&params), 4);
5029gc->pc += cmdlen;
5030if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5031}
5032
5033#define X_GLrop_ConvolutionParameteriv 4106
5034void __indirect_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params)
5035{
5036    struct glx_context * const gc = __glXGetCurrentContext();
5037    const GLuint compsize = __glConvolutionParameteriv_size(pname);
5038    const GLuint cmdlen = 12 + safe_pad(safe_mul(compsize, 4));
5039    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
5040        __glXSetError(gc, GL_INVALID_VALUE);
5041        return;
5042    }
5043emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
5044(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5045(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
5046(void) memcpy((void *)(gc->pc + 12), (void *)(params), safe_mul(compsize, 4));
5047gc->pc += cmdlen;
5048if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5049}
5050
5051#define X_GLrop_CopyConvolutionFilter1D 4107
5052void __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
5053{
5054    struct glx_context * const gc = __glXGetCurrentContext();
5055    const GLuint cmdlen = 24;
5056emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
5057(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5058(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
5059(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
5060(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
5061(void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
5062gc->pc += cmdlen;
5063if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5064}
5065
5066#define X_GLrop_CopyConvolutionFilter2D 4108
5067void __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
5068{
5069    struct glx_context * const gc = __glXGetCurrentContext();
5070    const GLuint cmdlen = 28;
5071emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
5072(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5073(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
5074(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
5075(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
5076(void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
5077(void) memcpy((void *)(gc->pc + 24), (void *)(&height), 4);
5078gc->pc += cmdlen;
5079if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5080}
5081
5082#define X_GLsop_GetConvolutionFilter 150
5083void __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image)
5084{
5085    struct glx_context * const gc = __glXGetCurrentContext();
5086    const __GLXattribute * const state = gc->client_state_private;
5087    Display * const dpy = gc->currentDpy;
5088#ifndef USE_XCB
5089    const GLuint cmdlen = 16;
5090#endif
5091    if (__builtin_expect(dpy != NULL, 1)) {
5092#ifdef USE_XCB
5093        xcb_connection_t *c = XGetXCBConnection(dpy);
5094        (void) __glXFlushRenderBuffer(gc, gc->pc);
5095        xcb_glx_get_convolution_filter_reply_t *reply = xcb_glx_get_convolution_filter_reply(c, xcb_glx_get_convolution_filter(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
5096        if (reply->height == 0) { reply->height = 1; }
5097        __glEmptyImage(gc, 3, reply->width, reply->height, 1, format, type, xcb_glx_get_convolution_filter_data(reply), image);
5098        free(reply);
5099#else
5100        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
5101(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5102(void) memcpy((void *)(pc + 4), (void *)(&format), 4);
5103(void) memcpy((void *)(pc + 8), (void *)(&type), 4);
5104        *(int32_t *)(pc + 12) = 0;
5105        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
5106        __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image, GL_TRUE);
5107        UnlockDisplay(dpy); SyncHandle();
5108#endif /* USE_XCB */
5109    }
5110    return;
5111}
5112
5113#define X_GLvop_GetConvolutionFilterEXT 1
5114void gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid * image)
5115{
5116    struct glx_context * const gc = __glXGetCurrentContext();
5117
5118#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5119    if (gc->isDirect) {
5120        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
5121        PFNGLGETCONVOLUTIONFILTEREXTPROC p =
5122            (PFNGLGETCONVOLUTIONFILTEREXTPROC) disp_table[356];
5123    p(target, format, type, image);
5124    } else
5125#endif
5126    {
5127    struct glx_context * const gc = __glXGetCurrentContext();
5128    const __GLXattribute * const state = gc->client_state_private;
5129    Display * const dpy = gc->currentDpy;
5130    const GLuint cmdlen = 16;
5131    if (__builtin_expect(dpy != NULL, 1)) {
5132        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetConvolutionFilterEXT, cmdlen);
5133(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5134(void) memcpy((void *)(pc + 4), (void *)(&format), 4);
5135(void) memcpy((void *)(pc + 8), (void *)(&type), 4);
5136        *(int32_t *)(pc + 12) = 0;
5137        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
5138        __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image, GL_TRUE);
5139        UnlockDisplay(dpy); SyncHandle();
5140    }
5141    return;
5142}
5143}
5144
5145#define X_GLsop_GetConvolutionParameterfv 151
5146void __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params)
5147{
5148    struct glx_context * const gc = __glXGetCurrentContext();
5149    Display * const dpy = gc->currentDpy;
5150#ifndef USE_XCB
5151    const GLuint cmdlen = 8;
5152#endif
5153    if (__builtin_expect(dpy != NULL, 1)) {
5154#ifdef USE_XCB
5155        xcb_connection_t *c = XGetXCBConnection(dpy);
5156        (void) __glXFlushRenderBuffer(gc, gc->pc);
5157        xcb_glx_get_convolution_parameterfv_reply_t *reply = xcb_glx_get_convolution_parameterfv_reply(c, xcb_glx_get_convolution_parameterfv(c, gc->currentContextTag, target, pname), NULL);
5158        /* the XXX_data_length() xcb function name is misleading, it returns the number */
5159        /* of elements, not the length of the data part. A single element is embedded. */
5160        if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 1)
5161            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
5162        else
5163            (void)memcpy(params, xcb_glx_get_convolution_parameterfv_data(reply), xcb_glx_get_convolution_parameterfv_data_length(reply) * sizeof(GLfloat));
5164        free(reply);
5165#else
5166        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv, cmdlen);
5167(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5168(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5169        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5170        UnlockDisplay(dpy); SyncHandle();
5171#endif /* USE_XCB */
5172    }
5173    return;
5174}
5175
5176#define X_GLvop_GetConvolutionParameterfvEXT 2
5177void gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
5178{
5179    struct glx_context * const gc = __glXGetCurrentContext();
5180
5181#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5182    if (gc->isDirect) {
5183        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
5184        PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC p =
5185            (PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) disp_table[357];
5186    p(target, pname, params);
5187    } else
5188#endif
5189    {
5190    struct glx_context * const gc = __glXGetCurrentContext();
5191    Display * const dpy = gc->currentDpy;
5192    const GLuint cmdlen = 8;
5193    if (__builtin_expect(dpy != NULL, 1)) {
5194        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetConvolutionParameterfvEXT, cmdlen);
5195(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5196(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5197        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5198        UnlockDisplay(dpy); SyncHandle();
5199    }
5200    return;
5201}
5202}
5203
5204#define X_GLsop_GetConvolutionParameteriv 152
5205void __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params)
5206{
5207    struct glx_context * const gc = __glXGetCurrentContext();
5208    Display * const dpy = gc->currentDpy;
5209#ifndef USE_XCB
5210    const GLuint cmdlen = 8;
5211#endif
5212    if (__builtin_expect(dpy != NULL, 1)) {
5213#ifdef USE_XCB
5214        xcb_connection_t *c = XGetXCBConnection(dpy);
5215        (void) __glXFlushRenderBuffer(gc, gc->pc);
5216        xcb_glx_get_convolution_parameteriv_reply_t *reply = xcb_glx_get_convolution_parameteriv_reply(c, xcb_glx_get_convolution_parameteriv(c, gc->currentContextTag, target, pname), NULL);
5217        /* the XXX_data_length() xcb function name is misleading, it returns the number */
5218        /* of elements, not the length of the data part. A single element is embedded. */
5219        if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 1)
5220            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
5221        else
5222            (void)memcpy(params, xcb_glx_get_convolution_parameteriv_data(reply), xcb_glx_get_convolution_parameteriv_data_length(reply) * sizeof(GLint));
5223        free(reply);
5224#else
5225        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv, cmdlen);
5226(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5227(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5228        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5229        UnlockDisplay(dpy); SyncHandle();
5230#endif /* USE_XCB */
5231    }
5232    return;
5233}
5234
5235#define X_GLvop_GetConvolutionParameterivEXT 3
5236void gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
5237{
5238    struct glx_context * const gc = __glXGetCurrentContext();
5239
5240#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5241    if (gc->isDirect) {
5242        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
5243        PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC p =
5244            (PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) disp_table[358];
5245    p(target, pname, params);
5246    } else
5247#endif
5248    {
5249    struct glx_context * const gc = __glXGetCurrentContext();
5250    Display * const dpy = gc->currentDpy;
5251    const GLuint cmdlen = 8;
5252    if (__builtin_expect(dpy != NULL, 1)) {
5253        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetConvolutionParameterivEXT, cmdlen);
5254(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5255(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5256        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5257        UnlockDisplay(dpy); SyncHandle();
5258    }
5259    return;
5260}
5261}
5262
5263#define X_GLsop_GetHistogram 154
5264void __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
5265{
5266    struct glx_context * const gc = __glXGetCurrentContext();
5267    const __GLXattribute * const state = gc->client_state_private;
5268    Display * const dpy = gc->currentDpy;
5269#ifndef USE_XCB
5270    const GLuint cmdlen = 16;
5271#endif
5272    if (__builtin_expect(dpy != NULL, 1)) {
5273#ifdef USE_XCB
5274        xcb_connection_t *c = XGetXCBConnection(dpy);
5275        (void) __glXFlushRenderBuffer(gc, gc->pc);
5276        xcb_glx_get_histogram_reply_t *reply = xcb_glx_get_histogram_reply(c, xcb_glx_get_histogram(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
5277        __glEmptyImage(gc, 3, reply->width, 1, 1, format, type, xcb_glx_get_histogram_data(reply), values);
5278        free(reply);
5279#else
5280        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
5281(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5282(void) memcpy((void *)(pc + 4), (void *)(&format), 4);
5283(void) memcpy((void *)(pc + 8), (void *)(&type), 4);
5284        *(int32_t *)(pc + 12) = 0;
5285        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
5286        * (int8_t *)(pc + 13) = reset;
5287        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values, GL_TRUE);
5288        UnlockDisplay(dpy); SyncHandle();
5289#endif /* USE_XCB */
5290    }
5291    return;
5292}
5293
5294#define X_GLvop_GetHistogramEXT 5
5295void gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
5296{
5297    struct glx_context * const gc = __glXGetCurrentContext();
5298
5299#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5300    if (gc->isDirect) {
5301        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
5302        PFNGLGETHISTOGRAMEXTPROC p =
5303            (PFNGLGETHISTOGRAMEXTPROC) disp_table[361];
5304    p(target, reset, format, type, values);
5305    } else
5306#endif
5307    {
5308    struct glx_context * const gc = __glXGetCurrentContext();
5309    const __GLXattribute * const state = gc->client_state_private;
5310    Display * const dpy = gc->currentDpy;
5311    const GLuint cmdlen = 16;
5312    if (__builtin_expect(dpy != NULL, 1)) {
5313        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetHistogramEXT, cmdlen);
5314(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5315(void) memcpy((void *)(pc + 4), (void *)(&format), 4);
5316(void) memcpy((void *)(pc + 8), (void *)(&type), 4);
5317        *(int32_t *)(pc + 12) = 0;
5318        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
5319        * (int8_t *)(pc + 13) = reset;
5320        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values, GL_TRUE);
5321        UnlockDisplay(dpy); SyncHandle();
5322    }
5323    return;
5324}
5325}
5326
5327#define X_GLsop_GetHistogramParameterfv 155
5328void __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params)
5329{
5330    struct glx_context * const gc = __glXGetCurrentContext();
5331    Display * const dpy = gc->currentDpy;
5332#ifndef USE_XCB
5333    const GLuint cmdlen = 8;
5334#endif
5335    if (__builtin_expect(dpy != NULL, 1)) {
5336#ifdef USE_XCB
5337        xcb_connection_t *c = XGetXCBConnection(dpy);
5338        (void) __glXFlushRenderBuffer(gc, gc->pc);
5339        xcb_glx_get_histogram_parameterfv_reply_t *reply = xcb_glx_get_histogram_parameterfv_reply(c, xcb_glx_get_histogram_parameterfv(c, gc->currentContextTag, target, pname), NULL);
5340        /* the XXX_data_length() xcb function name is misleading, it returns the number */
5341        /* of elements, not the length of the data part. A single element is embedded. */
5342        if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 1)
5343            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
5344        else
5345            (void)memcpy(params, xcb_glx_get_histogram_parameterfv_data(reply), xcb_glx_get_histogram_parameterfv_data_length(reply) * sizeof(GLfloat));
5346        free(reply);
5347#else
5348        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv, cmdlen);
5349(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5350(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5351        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5352        UnlockDisplay(dpy); SyncHandle();
5353#endif /* USE_XCB */
5354    }
5355    return;
5356}
5357
5358#define X_GLvop_GetHistogramParameterfvEXT 6
5359void gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
5360{
5361    struct glx_context * const gc = __glXGetCurrentContext();
5362
5363#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5364    if (gc->isDirect) {
5365        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
5366        PFNGLGETHISTOGRAMPARAMETERFVEXTPROC p =
5367            (PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) disp_table[362];
5368    p(target, pname, params);
5369    } else
5370#endif
5371    {
5372    struct glx_context * const gc = __glXGetCurrentContext();
5373    Display * const dpy = gc->currentDpy;
5374    const GLuint cmdlen = 8;
5375    if (__builtin_expect(dpy != NULL, 1)) {
5376        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetHistogramParameterfvEXT, cmdlen);
5377(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5378(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5379        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5380        UnlockDisplay(dpy); SyncHandle();
5381    }
5382    return;
5383}
5384}
5385
5386#define X_GLsop_GetHistogramParameteriv 156
5387void __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params)
5388{
5389    struct glx_context * const gc = __glXGetCurrentContext();
5390    Display * const dpy = gc->currentDpy;
5391#ifndef USE_XCB
5392    const GLuint cmdlen = 8;
5393#endif
5394    if (__builtin_expect(dpy != NULL, 1)) {
5395#ifdef USE_XCB
5396        xcb_connection_t *c = XGetXCBConnection(dpy);
5397        (void) __glXFlushRenderBuffer(gc, gc->pc);
5398        xcb_glx_get_histogram_parameteriv_reply_t *reply = xcb_glx_get_histogram_parameteriv_reply(c, xcb_glx_get_histogram_parameteriv(c, gc->currentContextTag, target, pname), NULL);
5399        /* the XXX_data_length() xcb function name is misleading, it returns the number */
5400        /* of elements, not the length of the data part. A single element is embedded. */
5401        if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 1)
5402            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
5403        else
5404            (void)memcpy(params, xcb_glx_get_histogram_parameteriv_data(reply), xcb_glx_get_histogram_parameteriv_data_length(reply) * sizeof(GLint));
5405        free(reply);
5406#else
5407        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv, cmdlen);
5408(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5409(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5410        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5411        UnlockDisplay(dpy); SyncHandle();
5412#endif /* USE_XCB */
5413    }
5414    return;
5415}
5416
5417#define X_GLvop_GetHistogramParameterivEXT 7
5418void gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
5419{
5420    struct glx_context * const gc = __glXGetCurrentContext();
5421
5422#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5423    if (gc->isDirect) {
5424        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
5425        PFNGLGETHISTOGRAMPARAMETERIVEXTPROC p =
5426            (PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) disp_table[363];
5427    p(target, pname, params);
5428    } else
5429#endif
5430    {
5431    struct glx_context * const gc = __glXGetCurrentContext();
5432    Display * const dpy = gc->currentDpy;
5433    const GLuint cmdlen = 8;
5434    if (__builtin_expect(dpy != NULL, 1)) {
5435        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetHistogramParameterivEXT, cmdlen);
5436(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5437(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5438        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5439        UnlockDisplay(dpy); SyncHandle();
5440    }
5441    return;
5442}
5443}
5444
5445#define X_GLsop_GetMinmax 157
5446void __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
5447{
5448    struct glx_context * const gc = __glXGetCurrentContext();
5449    const __GLXattribute * const state = gc->client_state_private;
5450    Display * const dpy = gc->currentDpy;
5451#ifndef USE_XCB
5452    const GLuint cmdlen = 16;
5453#endif
5454    if (__builtin_expect(dpy != NULL, 1)) {
5455#ifdef USE_XCB
5456        xcb_connection_t *c = XGetXCBConnection(dpy);
5457        (void) __glXFlushRenderBuffer(gc, gc->pc);
5458        xcb_glx_get_minmax_reply_t *reply = xcb_glx_get_minmax_reply(c, xcb_glx_get_minmax(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
5459        __glEmptyImage(gc, 3, 2, 1, 1, format, type, xcb_glx_get_minmax_data(reply), values);
5460        free(reply);
5461#else
5462        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
5463(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5464(void) memcpy((void *)(pc + 4), (void *)(&format), 4);
5465(void) memcpy((void *)(pc + 8), (void *)(&type), 4);
5466        *(int32_t *)(pc + 12) = 0;
5467        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
5468        * (int8_t *)(pc + 13) = reset;
5469        __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values, GL_FALSE);
5470        UnlockDisplay(dpy); SyncHandle();
5471#endif /* USE_XCB */
5472    }
5473    return;
5474}
5475
5476#define X_GLvop_GetMinmaxEXT 8
5477void gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
5478{
5479    struct glx_context * const gc = __glXGetCurrentContext();
5480
5481#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5482    if (gc->isDirect) {
5483        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
5484        PFNGLGETMINMAXEXTPROC p =
5485            (PFNGLGETMINMAXEXTPROC) disp_table[364];
5486    p(target, reset, format, type, values);
5487    } else
5488#endif
5489    {
5490    struct glx_context * const gc = __glXGetCurrentContext();
5491    const __GLXattribute * const state = gc->client_state_private;
5492    Display * const dpy = gc->currentDpy;
5493    const GLuint cmdlen = 16;
5494    if (__builtin_expect(dpy != NULL, 1)) {
5495        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetMinmaxEXT, cmdlen);
5496(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5497(void) memcpy((void *)(pc + 4), (void *)(&format), 4);
5498(void) memcpy((void *)(pc + 8), (void *)(&type), 4);
5499        *(int32_t *)(pc + 12) = 0;
5500        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
5501        * (int8_t *)(pc + 13) = reset;
5502        __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values, GL_FALSE);
5503        UnlockDisplay(dpy); SyncHandle();
5504    }
5505    return;
5506}
5507}
5508
5509#define X_GLsop_GetMinmaxParameterfv 158
5510void __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params)
5511{
5512    struct glx_context * const gc = __glXGetCurrentContext();
5513    Display * const dpy = gc->currentDpy;
5514#ifndef USE_XCB
5515    const GLuint cmdlen = 8;
5516#endif
5517    if (__builtin_expect(dpy != NULL, 1)) {
5518#ifdef USE_XCB
5519        xcb_connection_t *c = XGetXCBConnection(dpy);
5520        (void) __glXFlushRenderBuffer(gc, gc->pc);
5521        xcb_glx_get_minmax_parameterfv_reply_t *reply = xcb_glx_get_minmax_parameterfv_reply(c, xcb_glx_get_minmax_parameterfv(c, gc->currentContextTag, target, pname), NULL);
5522        /* the XXX_data_length() xcb function name is misleading, it returns the number */
5523        /* of elements, not the length of the data part. A single element is embedded. */
5524        if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 1)
5525            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
5526        else
5527            (void)memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply), xcb_glx_get_minmax_parameterfv_data_length(reply) * sizeof(GLfloat));
5528        free(reply);
5529#else
5530        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
5531(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5532(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5533        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5534        UnlockDisplay(dpy); SyncHandle();
5535#endif /* USE_XCB */
5536    }
5537    return;
5538}
5539
5540#define X_GLvop_GetMinmaxParameterfvEXT 9
5541void gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
5542{
5543    struct glx_context * const gc = __glXGetCurrentContext();
5544
5545#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5546    if (gc->isDirect) {
5547        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
5548        PFNGLGETMINMAXPARAMETERFVEXTPROC p =
5549            (PFNGLGETMINMAXPARAMETERFVEXTPROC) disp_table[365];
5550    p(target, pname, params);
5551    } else
5552#endif
5553    {
5554    struct glx_context * const gc = __glXGetCurrentContext();
5555    Display * const dpy = gc->currentDpy;
5556    const GLuint cmdlen = 8;
5557    if (__builtin_expect(dpy != NULL, 1)) {
5558        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetMinmaxParameterfvEXT, cmdlen);
5559(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5560(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5561        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5562        UnlockDisplay(dpy); SyncHandle();
5563    }
5564    return;
5565}
5566}
5567
5568#define X_GLsop_GetMinmaxParameteriv 159
5569void __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
5570{
5571    struct glx_context * const gc = __glXGetCurrentContext();
5572    Display * const dpy = gc->currentDpy;
5573#ifndef USE_XCB
5574    const GLuint cmdlen = 8;
5575#endif
5576    if (__builtin_expect(dpy != NULL, 1)) {
5577#ifdef USE_XCB
5578        xcb_connection_t *c = XGetXCBConnection(dpy);
5579        (void) __glXFlushRenderBuffer(gc, gc->pc);
5580        xcb_glx_get_minmax_parameteriv_reply_t *reply = xcb_glx_get_minmax_parameteriv_reply(c, xcb_glx_get_minmax_parameteriv(c, gc->currentContextTag, target, pname), NULL);
5581        /* the XXX_data_length() xcb function name is misleading, it returns the number */
5582        /* of elements, not the length of the data part. A single element is embedded. */
5583        if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 1)
5584            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
5585        else
5586            (void)memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply), xcb_glx_get_minmax_parameteriv_data_length(reply) * sizeof(GLint));
5587        free(reply);
5588#else
5589        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
5590(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5591(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5592        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5593        UnlockDisplay(dpy); SyncHandle();
5594#endif /* USE_XCB */
5595    }
5596    return;
5597}
5598
5599#define X_GLvop_GetMinmaxParameterivEXT 10
5600void gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
5601{
5602    struct glx_context * const gc = __glXGetCurrentContext();
5603
5604#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5605    if (gc->isDirect) {
5606        const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();
5607        PFNGLGETMINMAXPARAMETERIVEXTPROC p =
5608            (PFNGLGETMINMAXPARAMETERIVEXTPROC) disp_table[366];
5609    p(target, pname, params);
5610    } else
5611#endif
5612    {
5613    struct glx_context * const gc = __glXGetCurrentContext();
5614    Display * const dpy = gc->currentDpy;
5615    const GLuint cmdlen = 8;
5616    if (__builtin_expect(dpy != NULL, 1)) {
5617        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetMinmaxParameterivEXT, cmdlen);
5618(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5619(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5620        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5621        UnlockDisplay(dpy); SyncHandle();
5622    }
5623    return;
5624}
5625}
5626
5627#define X_GLrop_Histogram 4110
5628void __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
5629{
5630    struct glx_context * const gc = __glXGetCurrentContext();
5631    const GLuint cmdlen = 20;
5632emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
5633(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5634(void) memcpy((void *)(gc->pc + 8), (void *)(&width), 4);
5635(void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
5636(void) memcpy((void *)(gc->pc + 16), (void *)(&sink), 1);
5637gc->pc += cmdlen;
5638if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5639}
5640
5641#define X_GLrop_Minmax 4111
5642void __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
5643{
5644    struct glx_context * const gc = __glXGetCurrentContext();
5645    const GLuint cmdlen = 16;
5646emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
5647(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5648(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
5649(void) memcpy((void *)(gc->pc + 12), (void *)(&sink), 1);
5650gc->pc += cmdlen;
5651if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5652}
5653
5654#define X_GLrop_ResetHistogram 4112
5655void __indirect_glResetHistogram(GLenum target)
5656{
5657    struct glx_context * const gc = __glXGetCurrentContext();
5658    const GLuint cmdlen = 8;
5659emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
5660(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5661gc->pc += cmdlen;
5662if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5663}
5664
5665#define X_GLrop_ResetMinmax 4113
5666void __indirect_glResetMinmax(GLenum target)
5667{
5668    struct glx_context * const gc = __glXGetCurrentContext();
5669    const GLuint cmdlen = 8;
5670emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
5671(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5672gc->pc += cmdlen;
5673if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5674}
5675
5676static void
5677__glx_TexImage_3D4D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const GLvoid * pixels )
5678{
5679    struct glx_context * const gc = __glXGetCurrentContext();
5680    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
5681    const GLuint cmdlen = 84 + safe_pad(compsize);
5682    if (0 + safe_pad(compsize) < 0) {
5683        __glXSetError(gc, GL_INVALID_VALUE);
5684        return;
5685    }
5686    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5687if (cmdlen <= gc->maxSmallRenderCommandSize) {
5688    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
5689        (void) __glXFlushRenderBuffer(gc, gc->pc);
5690    }
5691emit_header(gc->pc, opcode, cmdlen);
5692(void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4);
5693(void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4);
5694(void) memcpy((void *)(gc->pc + 48), (void *)(&internalformat), 4);
5695(void) memcpy((void *)(gc->pc + 52), (void *)(&width), 4);
5696(void) memcpy((void *)(gc->pc + 56), (void *)(&height), 4);
5697(void) memcpy((void *)(gc->pc + 60), (void *)(&depth), 4);
5698(void) memcpy((void *)(gc->pc + 64), (void *)(&extent), 4);
5699(void) memcpy((void *)(gc->pc + 68), (void *)(&border), 4);
5700(void) memcpy((void *)(gc->pc + 72), (void *)(&format), 4);
5701(void) memcpy((void *)(gc->pc + 76), (void *)(&type), 4);
5702(void) memcpy((void *)(gc->pc + 80), (void *)((pixels == NULL) ? one : zero), 4);
5703if (compsize > 0) {
5704    gc->fillImage(gc, dim, width, height, depth, format, type, pixels, gc->pc + 84, gc->pc + 4);
5705} else {
5706    (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size );
5707}
5708gc->pc += cmdlen;
5709if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5710}
5711else {
5712const GLint op = opcode;
5713const GLuint cmdlenLarge = cmdlen + 4;
5714GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
5715(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
5716(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
5717(void) memcpy((void *)(pc + 44), (void *)(&target), 4);
5718(void) memcpy((void *)(pc + 48), (void *)(&level), 4);
5719(void) memcpy((void *)(pc + 52), (void *)(&internalformat), 4);
5720(void) memcpy((void *)(pc + 56), (void *)(&width), 4);
5721(void) memcpy((void *)(pc + 60), (void *)(&height), 4);
5722(void) memcpy((void *)(pc + 64), (void *)(&depth), 4);
5723(void) memcpy((void *)(pc + 68), (void *)(&extent), 4);
5724(void) memcpy((void *)(pc + 72), (void *)(&border), 4);
5725(void) memcpy((void *)(pc + 76), (void *)(&format), 4);
5726(void) memcpy((void *)(pc + 80), (void *)(&type), 4);
5727(void) memcpy((void *)(pc + 84), zero, 4);
5728__glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 88, pc + 8);
5729}
5730    }
5731}
5732
5733#define X_GLrop_TexImage3D 4114
5734void __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
5735{
5736    __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat, width, height, depth, 1, border, format, type, pixels );
5737}
5738
5739static void
5740__glx_TexSubImage_3D4D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const GLvoid * pixels )
5741{
5742    struct glx_context * const gc = __glXGetCurrentContext();
5743    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
5744    const GLuint cmdlen = 92 + safe_pad(compsize);
5745    if (0 + safe_pad(compsize) < 0) {
5746        __glXSetError(gc, GL_INVALID_VALUE);
5747        return;
5748    }
5749    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5750if (cmdlen <= gc->maxSmallRenderCommandSize) {
5751    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
5752        (void) __glXFlushRenderBuffer(gc, gc->pc);
5753    }
5754emit_header(gc->pc, opcode, cmdlen);
5755(void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4);
5756(void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4);
5757(void) memcpy((void *)(gc->pc + 48), (void *)(&xoffset), 4);
5758(void) memcpy((void *)(gc->pc + 52), (void *)(&yoffset), 4);
5759(void) memcpy((void *)(gc->pc + 56), (void *)(&zoffset), 4);
5760(void) memcpy((void *)(gc->pc + 60), (void *)(&woffset), 4);
5761(void) memcpy((void *)(gc->pc + 64), (void *)(&width), 4);
5762(void) memcpy((void *)(gc->pc + 68), (void *)(&height), 4);
5763(void) memcpy((void *)(gc->pc + 72), (void *)(&depth), 4);
5764(void) memcpy((void *)(gc->pc + 76), (void *)(&extent), 4);
5765(void) memcpy((void *)(gc->pc + 80), (void *)(&format), 4);
5766(void) memcpy((void *)(gc->pc + 84), (void *)(&type), 4);
5767(void) memset((void *)(gc->pc + 88), 0, 4);
5768if (compsize > 0) {
5769    gc->fillImage(gc, dim, width, height, depth, format, type, pixels, gc->pc + 92, gc->pc + 4);
5770} else {
5771    (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size );
5772}
5773gc->pc += cmdlen;
5774if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5775}
5776else {
5777const GLint op = opcode;
5778const GLuint cmdlenLarge = cmdlen + 4;
5779GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
5780(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
5781(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
5782(void) memcpy((void *)(pc + 44), (void *)(&target), 4);
5783(void) memcpy((void *)(pc + 48), (void *)(&level), 4);
5784(void) memcpy((void *)(pc + 52), (void *)(&xoffset), 4);
5785(void) memcpy((void *)(pc + 56), (void *)(&yoffset), 4);
5786(void) memcpy((void *)(pc + 60), (void *)(&zoffset), 4);
5787(void) memcpy((void *)(pc + 64), (void *)(&woffset), 4);
5788(void) memcpy((void *)(pc + 68), (void *)(&width), 4);
5789(void) memcpy((void *)(pc + 72), (void *)(&height), 4);
5790(void) memcpy((void *)(pc + 76), (void *)(&depth), 4);
5791(void) memcpy((void *)(pc + 80), (void *)(&extent), 4);
5792(void) memcpy((void *)(pc + 84), (void *)(&format), 4);
5793(void) memcpy((void *)(pc + 88), (void *)(&type), 4);
5794(void) memset((void *)(pc + 92), 0, 4);
5795__glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 96, pc + 8);
5796}
5797    }
5798}
5799
5800#define X_GLrop_TexSubImage3D 4115
5801void __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels)
5802{
5803    __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset, yoffset, zoffset, 1, width, height, depth, 1, format, type, pixels );
5804}
5805
5806#define X_GLrop_CopyTexSubImage3D 4123
5807void __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
5808{
5809    struct glx_context * const gc = __glXGetCurrentContext();
5810    const GLuint cmdlen = 40;
5811emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
5812(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5813(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
5814(void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4);
5815(void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4);
5816(void) memcpy((void *)(gc->pc + 20), (void *)(&zoffset), 4);
5817(void) memcpy((void *)(gc->pc + 24), (void *)(&x), 4);
5818(void) memcpy((void *)(gc->pc + 28), (void *)(&y), 4);
5819(void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
5820(void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4);
5821gc->pc += cmdlen;
5822if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5823}
5824
5825#define X_GLrop_ActiveTexture 197
5826void __indirect_glActiveTexture(GLenum texture)
5827{
5828    struct glx_context * const gc = __glXGetCurrentContext();
5829    const GLuint cmdlen = 8;
5830emit_header(gc->pc, X_GLrop_ActiveTexture, cmdlen);
5831(void) memcpy((void *)(gc->pc + 4), (void *)(&texture), 4);
5832gc->pc += cmdlen;
5833if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5834}
5835
5836#define X_GLrop_MultiTexCoord1dv 198
5837void __indirect_glMultiTexCoord1d(GLenum target, GLdouble s)
5838{
5839    struct glx_context * const gc = __glXGetCurrentContext();
5840    const GLuint cmdlen = 16;
5841emit_header(gc->pc, X_GLrop_MultiTexCoord1dv, cmdlen);
5842(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
5843(void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4);
5844gc->pc += cmdlen;
5845if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5846}
5847
5848#define X_GLrop_MultiTexCoord1dv 198
5849void __indirect_glMultiTexCoord1dv(GLenum target, const GLdouble * v)
5850{
5851    struct glx_context * const gc = __glXGetCurrentContext();
5852    const GLuint cmdlen = 16;
5853emit_header(gc->pc, X_GLrop_MultiTexCoord1dv, cmdlen);
5854(void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
5855(void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4);
5856gc->pc += cmdlen;
5857if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5858}
5859
5860#define X_GLrop_MultiTexCoord1fvARB 199
5861void __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
5862{
5863    struct glx_context * const gc = __glXGetCurrentContext();
5864    const GLuint cmdlen = 12;
5865emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
5866(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5867(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5868gc->pc += cmdlen;
5869if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5870}
5871
5872#define X_GLrop_MultiTexCoord1fvARB 199
5873void __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
5874{
5875    struct glx_context * const gc = __glXGetCurrentContext();
5876    const GLuint cmdlen = 12;
5877emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
5878(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5879(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
5880gc->pc += cmdlen;
5881if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5882}
5883
5884#define X_GLrop_MultiTexCoord1iv 200
5885void __indirect_glMultiTexCoord1i(GLenum target, GLint s)
5886{
5887    struct glx_context * const gc = __glXGetCurrentContext();
5888    const GLuint cmdlen = 12;
5889emit_header(gc->pc, X_GLrop_MultiTexCoord1iv, cmdlen);
5890(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5891(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5892gc->pc += cmdlen;
5893if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5894}
5895
5896#define X_GLrop_MultiTexCoord1iv 200
5897void __indirect_glMultiTexCoord1iv(GLenum target, const GLint * v)
5898{
5899    struct glx_context * const gc = __glXGetCurrentContext();
5900    const GLuint cmdlen = 12;
5901emit_header(gc->pc, X_GLrop_MultiTexCoord1iv, cmdlen);
5902(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5903(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
5904gc->pc += cmdlen;
5905if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5906}
5907
5908#define X_GLrop_MultiTexCoord1sv 201
5909void __indirect_glMultiTexCoord1s(GLenum target, GLshort s)
5910{
5911    struct glx_context * const gc = __glXGetCurrentContext();
5912    const GLuint cmdlen = 12;
5913emit_header(gc->pc, X_GLrop_MultiTexCoord1sv, cmdlen);
5914(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5915(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
5916gc->pc += cmdlen;
5917if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5918}
5919
5920#define X_GLrop_MultiTexCoord1sv 201
5921void __indirect_glMultiTexCoord1sv(GLenum target, const GLshort * v)
5922{
5923    struct glx_context * const gc = __glXGetCurrentContext();
5924    const GLuint cmdlen = 12;
5925emit_header(gc->pc, X_GLrop_MultiTexCoord1sv, cmdlen);
5926(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5927(void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
5928gc->pc += cmdlen;
5929if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5930}
5931
5932#define X_GLrop_MultiTexCoord2dv 202
5933void __indirect_glMultiTexCoord2d(GLenum target, GLdouble s, GLdouble t)
5934{
5935    struct glx_context * const gc = __glXGetCurrentContext();
5936    const GLuint cmdlen = 24;
5937emit_header(gc->pc, X_GLrop_MultiTexCoord2dv, cmdlen);
5938(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
5939(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
5940(void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4);
5941gc->pc += cmdlen;
5942if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5943}
5944
5945#define X_GLrop_MultiTexCoord2dv 202
5946void __indirect_glMultiTexCoord2dv(GLenum target, const GLdouble * v)
5947{
5948    struct glx_context * const gc = __glXGetCurrentContext();
5949    const GLuint cmdlen = 24;
5950emit_header(gc->pc, X_GLrop_MultiTexCoord2dv, cmdlen);
5951(void) memcpy((void *)(gc->pc + 4), (void *)(v), 16);
5952(void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4);
5953gc->pc += cmdlen;
5954if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5955}
5956
5957#define X_GLrop_MultiTexCoord2fvARB 203
5958void __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
5959{
5960    struct glx_context * const gc = __glXGetCurrentContext();
5961    const GLuint cmdlen = 16;
5962emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
5963(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5964(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5965(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
5966gc->pc += cmdlen;
5967if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5968}
5969
5970#define X_GLrop_MultiTexCoord2fvARB 203
5971void __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
5972{
5973    struct glx_context * const gc = __glXGetCurrentContext();
5974    const GLuint cmdlen = 16;
5975emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
5976(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5977(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
5978gc->pc += cmdlen;
5979if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5980}
5981
5982#define X_GLrop_MultiTexCoord2iv 204
5983void __indirect_glMultiTexCoord2i(GLenum target, GLint s, GLint t)
5984{
5985    struct glx_context * const gc = __glXGetCurrentContext();
5986    const GLuint cmdlen = 16;
5987emit_header(gc->pc, X_GLrop_MultiTexCoord2iv, cmdlen);
5988(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5989(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5990(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
5991gc->pc += cmdlen;
5992if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5993}
5994
5995#define X_GLrop_MultiTexCoord2iv 204
5996void __indirect_glMultiTexCoord2iv(GLenum target, const GLint * v)
5997{
5998    struct glx_context * const gc = __glXGetCurrentContext();
5999    const GLuint cmdlen = 16;
6000emit_header(gc->pc, X_GLrop_MultiTexCoord2iv, cmdlen);
6001(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6002(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6003gc->pc += cmdlen;
6004if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6005}
6006
6007#define X_GLrop_MultiTexCoord2sv 205
6008void __indirect_glMultiTexCoord2s(GLenum target, GLshort s, GLshort t)
6009{
6010    struct glx_context * const gc = __glXGetCurrentContext();
6011    const GLuint cmdlen = 12;
6012emit_header(gc->pc, X_GLrop_MultiTexCoord2sv, cmdlen);
6013(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6014(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
6015(void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
6016gc->pc += cmdlen;
6017if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6018}
6019
6020#define X_GLrop_MultiTexCoord2sv 205
6021void __indirect_glMultiTexCoord2sv(GLenum target, const GLshort * v)
6022{
6023    struct glx_context * const gc = __glXGetCurrentContext();
6024    const GLuint cmdlen = 12;
6025emit_header(gc->pc, X_GLrop_MultiTexCoord2sv, cmdlen);
6026(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6027(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6028gc->pc += cmdlen;
6029if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6030}
6031
6032#define X_GLrop_MultiTexCoord3dv 206
6033void __indirect_glMultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r)
6034{
6035    struct glx_context * const gc = __glXGetCurrentContext();
6036    const GLuint cmdlen = 32;
6037emit_header(gc->pc, X_GLrop_MultiTexCoord3dv, cmdlen);
6038(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
6039(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
6040(void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
6041(void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4);
6042gc->pc += cmdlen;
6043if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6044}
6045
6046#define X_GLrop_MultiTexCoord3dv 206
6047void __indirect_glMultiTexCoord3dv(GLenum target, const GLdouble * v)
6048{
6049    struct glx_context * const gc = __glXGetCurrentContext();
6050    const GLuint cmdlen = 32;
6051emit_header(gc->pc, X_GLrop_MultiTexCoord3dv, cmdlen);
6052(void) memcpy((void *)(gc->pc + 4), (void *)(v), 24);
6053(void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4);
6054gc->pc += cmdlen;
6055if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6056}
6057
6058#define X_GLrop_MultiTexCoord3fvARB 207
6059void __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r)
6060{
6061    struct glx_context * const gc = __glXGetCurrentContext();
6062    const GLuint cmdlen = 20;
6063emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
6064(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6065(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
6066(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
6067(void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
6068gc->pc += cmdlen;
6069if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6070}
6071
6072#define X_GLrop_MultiTexCoord3fvARB 207
6073void __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
6074{
6075    struct glx_context * const gc = __glXGetCurrentContext();
6076    const GLuint cmdlen = 20;
6077emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
6078(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6079(void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
6080gc->pc += cmdlen;
6081if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6082}
6083
6084#define X_GLrop_MultiTexCoord3iv 208
6085void __indirect_glMultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r)
6086{
6087    struct glx_context * const gc = __glXGetCurrentContext();
6088    const GLuint cmdlen = 20;
6089emit_header(gc->pc, X_GLrop_MultiTexCoord3iv, cmdlen);
6090(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6091(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
6092(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
6093(void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
6094gc->pc += cmdlen;
6095if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6096}
6097
6098#define X_GLrop_MultiTexCoord3iv 208
6099void __indirect_glMultiTexCoord3iv(GLenum target, const GLint * v)
6100{
6101    struct glx_context * const gc = __glXGetCurrentContext();
6102    const GLuint cmdlen = 20;
6103emit_header(gc->pc, X_GLrop_MultiTexCoord3iv, cmdlen);
6104(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6105(void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
6106gc->pc += cmdlen;
6107if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6108}
6109
6110#define X_GLrop_MultiTexCoord3sv 209
6111void __indirect_glMultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r)
6112{
6113    struct glx_context * const gc = __glXGetCurrentContext();
6114    const GLuint cmdlen = 16;
6115emit_header(gc->pc, X_GLrop_MultiTexCoord3sv, cmdlen);
6116(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6117(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
6118(void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
6119(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2);
6120gc->pc += cmdlen;
6121if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6122}
6123
6124#define X_GLrop_MultiTexCoord3sv 209
6125void __indirect_glMultiTexCoord3sv(GLenum target, const GLshort * v)
6126{
6127    struct glx_context * const gc = __glXGetCurrentContext();
6128    const GLuint cmdlen = 16;
6129emit_header(gc->pc, X_GLrop_MultiTexCoord3sv, cmdlen);
6130(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6131(void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
6132gc->pc += cmdlen;
6133if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6134}
6135
6136#define X_GLrop_MultiTexCoord4dv 210
6137void __indirect_glMultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
6138{
6139    struct glx_context * const gc = __glXGetCurrentContext();
6140    const GLuint cmdlen = 40;
6141emit_header(gc->pc, X_GLrop_MultiTexCoord4dv, cmdlen);
6142(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
6143(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
6144(void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
6145(void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8);
6146(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
6147gc->pc += cmdlen;
6148if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6149}
6150
6151#define X_GLrop_MultiTexCoord4dv 210
6152void __indirect_glMultiTexCoord4dv(GLenum target, const GLdouble * v)
6153{
6154    struct glx_context * const gc = __glXGetCurrentContext();
6155    const GLuint cmdlen = 40;
6156emit_header(gc->pc, X_GLrop_MultiTexCoord4dv, cmdlen);
6157(void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
6158(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
6159gc->pc += cmdlen;
6160if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6161}
6162
6163#define X_GLrop_MultiTexCoord4fvARB 211
6164void __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
6165{
6166    struct glx_context * const gc = __glXGetCurrentContext();
6167    const GLuint cmdlen = 24;
6168emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
6169(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6170(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
6171(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
6172(void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
6173(void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4);
6174gc->pc += cmdlen;
6175if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6176}
6177
6178#define X_GLrop_MultiTexCoord4fvARB 211
6179void __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
6180{
6181    struct glx_context * const gc = __glXGetCurrentContext();
6182    const GLuint cmdlen = 24;
6183emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
6184(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6185(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6186gc->pc += cmdlen;
6187if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6188}
6189
6190#define X_GLrop_MultiTexCoord4iv 212
6191void __indirect_glMultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q)
6192{
6193    struct glx_context * const gc = __glXGetCurrentContext();
6194    const GLuint cmdlen = 24;
6195emit_header(gc->pc, X_GLrop_MultiTexCoord4iv, cmdlen);
6196(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6197(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
6198(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
6199(void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
6200(void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4);
6201gc->pc += cmdlen;
6202if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6203}
6204
6205#define X_GLrop_MultiTexCoord4iv 212
6206void __indirect_glMultiTexCoord4iv(GLenum target, const GLint * v)
6207{
6208    struct glx_context * const gc = __glXGetCurrentContext();
6209    const GLuint cmdlen = 24;
6210emit_header(gc->pc, X_GLrop_MultiTexCoord4iv, cmdlen);
6211(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6212(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6213gc->pc += cmdlen;
6214if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6215}
6216
6217#define X_GLrop_MultiTexCoord4sv 213
6218void __indirect_glMultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
6219{
6220    struct glx_context * const gc = __glXGetCurrentContext();
6221    const GLuint cmdlen = 16;
6222emit_header(gc->pc, X_GLrop_MultiTexCoord4sv, cmdlen);
6223(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6224(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
6225(void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
6226(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2);
6227(void) memcpy((void *)(gc->pc + 14), (void *)(&q), 2);
6228gc->pc += cmdlen;
6229if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6230}
6231
6232#define X_GLrop_MultiTexCoord4sv 213
6233void __indirect_glMultiTexCoord4sv(GLenum target, const GLshort * v)
6234{
6235    struct glx_context * const gc = __glXGetCurrentContext();
6236    const GLuint cmdlen = 16;
6237emit_header(gc->pc, X_GLrop_MultiTexCoord4sv, cmdlen);
6238(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6239(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6240gc->pc += cmdlen;
6241if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6242}
6243
6244#define X_GLrop_SampleCoverage 229
6245void __indirect_glSampleCoverage(GLclampf value, GLboolean invert)
6246{
6247    struct glx_context * const gc = __glXGetCurrentContext();
6248    const GLuint cmdlen = 12;
6249emit_header(gc->pc, X_GLrop_SampleCoverage, cmdlen);
6250(void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4);
6251(void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1);
6252gc->pc += cmdlen;
6253if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6254}
6255
6256#define X_GLrop_BlendFuncSeparate 4134
6257void __indirect_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
6258{
6259    struct glx_context * const gc = __glXGetCurrentContext();
6260    const GLuint cmdlen = 20;
6261emit_header(gc->pc, X_GLrop_BlendFuncSeparate, cmdlen);
6262(void) memcpy((void *)(gc->pc + 4), (void *)(&sfactorRGB), 4);
6263(void) memcpy((void *)(gc->pc + 8), (void *)(&dfactorRGB), 4);
6264(void) memcpy((void *)(gc->pc + 12), (void *)(&sfactorAlpha), 4);
6265(void) memcpy((void *)(gc->pc + 16), (void *)(&dfactorAlpha), 4);
6266gc->pc += cmdlen;
6267if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6268}
6269
6270#define X_GLrop_FogCoorddv 4125
6271void __indirect_glFogCoordd(GLdouble coord)
6272{
6273    struct glx_context * const gc = __glXGetCurrentContext();
6274    const GLuint cmdlen = 12;
6275emit_header(gc->pc, X_GLrop_FogCoorddv, cmdlen);
6276(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 8);
6277gc->pc += cmdlen;
6278if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6279}
6280
6281#define X_GLrop_FogCoorddv 4125
6282void __indirect_glFogCoorddv(const GLdouble * coord)
6283{
6284    generic_8_byte( X_GLrop_FogCoorddv, coord );
6285}
6286
6287#define X_GLrop_PointParameterf 2065
6288void __indirect_glPointParameterf(GLenum pname, GLfloat param)
6289{
6290    struct glx_context * const gc = __glXGetCurrentContext();
6291    const GLuint cmdlen = 12;
6292emit_header(gc->pc, X_GLrop_PointParameterf, cmdlen);
6293(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
6294(void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
6295gc->pc += cmdlen;
6296if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6297}
6298
6299#define X_GLrop_PointParameterfv 2066
6300void __indirect_glPointParameterfv(GLenum pname, const GLfloat * params)
6301{
6302    struct glx_context * const gc = __glXGetCurrentContext();
6303    const GLuint compsize = __glPointParameterfv_size(pname);
6304    const GLuint cmdlen = 8 + safe_pad(safe_mul(compsize, 4));
6305    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
6306        __glXSetError(gc, GL_INVALID_VALUE);
6307        return;
6308    }
6309emit_header(gc->pc, X_GLrop_PointParameterfv, cmdlen);
6310(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
6311(void) memcpy((void *)(gc->pc + 8), (void *)(params), safe_mul(compsize, 4));
6312gc->pc += cmdlen;
6313if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6314}
6315
6316#define X_GLrop_PointParameteri 4221
6317void __indirect_glPointParameteri(GLenum pname, GLint param)
6318{
6319    struct glx_context * const gc = __glXGetCurrentContext();
6320    const GLuint cmdlen = 12;
6321emit_header(gc->pc, X_GLrop_PointParameteri, cmdlen);
6322(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
6323(void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
6324gc->pc += cmdlen;
6325if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6326}
6327
6328#define X_GLrop_PointParameteriv 4222
6329void __indirect_glPointParameteriv(GLenum pname, const GLint * params)
6330{
6331    struct glx_context * const gc = __glXGetCurrentContext();
6332    const GLuint compsize = __glPointParameteriv_size(pname);
6333    const GLuint cmdlen = 8 + safe_pad(safe_mul(compsize, 4));
6334    if (0 + safe_pad(safe_mul(compsize, 4)) < 0) {
6335        __glXSetError(gc, GL_INVALID_VALUE);
6336        return;
6337    }
6338emit_header(gc->pc, X_GLrop_PointParameteriv, cmdlen);
6339(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
6340(void) memcpy((void *)(gc->pc + 8), (void *)(params), safe_mul(compsize, 4));
6341gc->pc += cmdlen;
6342if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6343}
6344
6345#define X_GLrop_SecondaryColor3bv 4126
6346void __indirect_glSecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue)
6347{
6348    struct glx_context * const gc = __glXGetCurrentContext();
6349    const GLuint cmdlen = 8;
6350emit_header(gc->pc, X_GLrop_SecondaryColor3bv, cmdlen);
6351(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
6352(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
6353(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
6354gc->pc += cmdlen;
6355if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6356}
6357
6358#define X_GLrop_SecondaryColor3bv 4126
6359void __indirect_glSecondaryColor3bv(const GLbyte * v)
6360{
6361    generic_3_byte( X_GLrop_SecondaryColor3bv, v );
6362}
6363
6364#define X_GLrop_SecondaryColor3dv 4130
6365void __indirect_glSecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue)
6366{
6367    struct glx_context * const gc = __glXGetCurrentContext();
6368    const GLuint cmdlen = 28;
6369emit_header(gc->pc, X_GLrop_SecondaryColor3dv, cmdlen);
6370(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
6371(void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
6372(void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
6373gc->pc += cmdlen;
6374if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6375}
6376
6377#define X_GLrop_SecondaryColor3dv 4130
6378void __indirect_glSecondaryColor3dv(const GLdouble * v)
6379{
6380    generic_24_byte( X_GLrop_SecondaryColor3dv, v );
6381}
6382
6383#define X_GLrop_SecondaryColor3iv 4128
6384void __indirect_glSecondaryColor3i(GLint red, GLint green, GLint blue)
6385{
6386    struct glx_context * const gc = __glXGetCurrentContext();
6387    const GLuint cmdlen = 16;
6388emit_header(gc->pc, X_GLrop_SecondaryColor3iv, cmdlen);
6389(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
6390(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
6391(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
6392gc->pc += cmdlen;
6393if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6394}
6395
6396#define X_GLrop_SecondaryColor3iv 4128
6397void __indirect_glSecondaryColor3iv(const GLint * v)
6398{
6399    generic_12_byte( X_GLrop_SecondaryColor3iv, v );
6400}
6401
6402#define X_GLrop_SecondaryColor3sv 4127
6403void __indirect_glSecondaryColor3s(GLshort red, GLshort green, GLshort blue)
6404{
6405    struct glx_context * const gc = __glXGetCurrentContext();
6406    const GLuint cmdlen = 12;
6407emit_header(gc->pc, X_GLrop_SecondaryColor3sv, cmdlen);
6408(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
6409(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
6410(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
6411gc->pc += cmdlen;
6412if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6413}
6414
6415#define X_GLrop_SecondaryColor3sv 4127
6416void __indirect_glSecondaryColor3sv(const GLshort * v)
6417{
6418    generic_6_byte( X_GLrop_SecondaryColor3sv, v );
6419}
6420
6421#define X_GLrop_SecondaryColor3ubv 4131
6422void __indirect_glSecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue)
6423{
6424    struct glx_context * const gc = __glXGetCurrentContext();
6425    const GLuint cmdlen = 8;
6426emit_header(gc->pc, X_GLrop_SecondaryColor3ubv, cmdlen);
6427(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
6428(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
6429(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
6430gc->pc += cmdlen;
6431if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6432}
6433
6434#define X_GLrop_SecondaryColor3ubv 4131
6435void __indirect_glSecondaryColor3ubv(const GLubyte * v)
6436{
6437    generic_3_byte( X_GLrop_SecondaryColor3ubv, v );
6438}
6439
6440#define X_GLrop_SecondaryColor3uiv 4133
6441void __indirect_glSecondaryColor3ui(GLuint red, GLuint green, GLuint blue)
6442{
6443    struct glx_context * const gc = __glXGetCurrentContext();
6444    const GLuint cmdlen = 16;
6445emit_header(gc->pc, X_GLrop_SecondaryColor3uiv, cmdlen);
6446(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
6447(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
6448(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
6449gc->pc += cmdlen;
6450if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6451}
6452
6453#define X_GLrop_SecondaryColor3uiv 4133
6454void __indirect_glSecondaryColor3uiv(const GLuint * v)
6455{
6456    generic_12_byte( X_GLrop_SecondaryColor3uiv, v );
6457}
6458
6459#define X_GLrop_SecondaryColor3usv 4132
6460void __indirect_glSecondaryColor3us(GLushort red, GLushort green, GLushort blue)
6461{
6462    struct glx_context * const gc = __glXGetCurrentContext();
6463    const GLuint cmdlen = 12;
6464emit_header(gc->pc, X_GLrop_SecondaryColor3usv, cmdlen);
6465(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
6466(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
6467(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
6468gc->pc += cmdlen;
6469if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6470}
6471
6472#define X_GLrop_SecondaryColor3usv 4132
6473void __indirect_glSecondaryColor3usv(const GLushort * v)
6474{
6475    generic_6_byte( X_GLrop_SecondaryColor3usv, v );
6476}
6477
6478#define X_GLrop_WindowPos3fv 230
6479void __indirect_glWindowPos3f(GLfloat x, GLfloat y, GLfloat z)
6480{
6481    struct glx_context * const gc = __glXGetCurrentContext();
6482    const GLuint cmdlen = 16;
6483emit_header(gc->pc, X_GLrop_WindowPos3fv, cmdlen);
6484(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
6485(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
6486(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
6487gc->pc += cmdlen;
6488if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6489}
6490
6491#define X_GLrop_WindowPos3fv 230
6492void __indirect_glWindowPos3fv(const GLfloat * v)
6493{
6494    generic_12_byte( X_GLrop_WindowPos3fv, v );
6495}
6496
6497#define X_GLrop_BeginQuery 231
6498void __indirect_glBeginQuery(GLenum target, GLuint id)
6499{
6500    struct glx_context * const gc = __glXGetCurrentContext();
6501    const GLuint cmdlen = 12;
6502emit_header(gc->pc, X_GLrop_BeginQuery, cmdlen);
6503(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6504(void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
6505gc->pc += cmdlen;
6506if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6507}
6508
6509#define X_GLsop_DeleteQueries 161
6510void __indirect_glDeleteQueries(GLsizei n, const GLuint * ids)
6511{
6512    struct glx_context * const gc = __glXGetCurrentContext();
6513    Display * const dpy = gc->currentDpy;
6514#ifndef USE_XCB
6515    const GLuint cmdlen = 4 + safe_pad(safe_mul(n, 4));
6516#endif
6517    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
6518        __glXSetError(gc, GL_INVALID_VALUE);
6519        return;
6520    }
6521    if (n < 0) {
6522        __glXSetError(gc, GL_INVALID_VALUE);
6523        return;
6524    }
6525    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
6526#ifdef USE_XCB
6527        xcb_connection_t *c = XGetXCBConnection(dpy);
6528        (void) __glXFlushRenderBuffer(gc, gc->pc);
6529        xcb_glx_delete_queries(c, gc->currentContextTag, n, ids);
6530#else
6531        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteQueries, cmdlen);
6532(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
6533(void) memcpy((void *)(pc + 4), (void *)(ids), safe_mul(n, 4));
6534        UnlockDisplay(dpy); SyncHandle();
6535#endif /* USE_XCB */
6536    }
6537    return;
6538}
6539
6540#define X_GLrop_EndQuery 232
6541void __indirect_glEndQuery(GLenum target)
6542{
6543    struct glx_context * const gc = __glXGetCurrentContext();
6544    const GLuint cmdlen = 8;
6545emit_header(gc->pc, X_GLrop_EndQuery, cmdlen);
6546(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6547gc->pc += cmdlen;
6548if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6549}
6550
6551#define X_GLsop_GenQueries 162
6552void __indirect_glGenQueries(GLsizei n, GLuint * ids)
6553{
6554    struct glx_context * const gc = __glXGetCurrentContext();
6555    Display * const dpy = gc->currentDpy;
6556#ifndef USE_XCB
6557    const GLuint cmdlen = 4;
6558#endif
6559    if (n < 0) {
6560        __glXSetError(gc, GL_INVALID_VALUE);
6561        return;
6562    }
6563    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
6564#ifdef USE_XCB
6565        xcb_connection_t *c = XGetXCBConnection(dpy);
6566        (void) __glXFlushRenderBuffer(gc, gc->pc);
6567        xcb_glx_gen_queries_reply_t *reply = xcb_glx_gen_queries_reply(c, xcb_glx_gen_queries(c, gc->currentContextTag, n), NULL);
6568        (void)memcpy(ids, xcb_glx_gen_queries_data(reply), xcb_glx_gen_queries_data_length(reply) * sizeof(GLuint));
6569        free(reply);
6570#else
6571        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenQueries, cmdlen);
6572(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
6573        (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
6574        UnlockDisplay(dpy); SyncHandle();
6575#endif /* USE_XCB */
6576    }
6577    return;
6578}
6579
6580#define X_GLsop_GetQueryObjectiv 165
6581void __indirect_glGetQueryObjectiv(GLuint id, GLenum pname, GLint * params)
6582{
6583    struct glx_context * const gc = __glXGetCurrentContext();
6584    Display * const dpy = gc->currentDpy;
6585#ifndef USE_XCB
6586    const GLuint cmdlen = 8;
6587#endif
6588    if (__builtin_expect(dpy != NULL, 1)) {
6589#ifdef USE_XCB
6590        xcb_connection_t *c = XGetXCBConnection(dpy);
6591        (void) __glXFlushRenderBuffer(gc, gc->pc);
6592        xcb_glx_get_query_objectiv_reply_t *reply = xcb_glx_get_query_objectiv_reply(c, xcb_glx_get_query_objectiv(c, gc->currentContextTag, id, pname), NULL);
6593        /* the XXX_data_length() xcb function name is misleading, it returns the number */
6594        /* of elements, not the length of the data part. A single element is embedded. */
6595        if (xcb_glx_get_query_objectiv_data_length(reply) == 1)
6596            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
6597        else
6598            (void)memcpy(params, xcb_glx_get_query_objectiv_data(reply), xcb_glx_get_query_objectiv_data_length(reply) * sizeof(GLint));
6599        free(reply);
6600#else
6601        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectiv, cmdlen);
6602(void) memcpy((void *)(pc + 0), (void *)(&id), 4);
6603(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
6604        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6605        UnlockDisplay(dpy); SyncHandle();
6606#endif /* USE_XCB */
6607    }
6608    return;
6609}
6610
6611#define X_GLsop_GetQueryObjectuiv 166
6612void __indirect_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint * params)
6613{
6614    struct glx_context * const gc = __glXGetCurrentContext();
6615    Display * const dpy = gc->currentDpy;
6616#ifndef USE_XCB
6617    const GLuint cmdlen = 8;
6618#endif
6619    if (__builtin_expect(dpy != NULL, 1)) {
6620#ifdef USE_XCB
6621        xcb_connection_t *c = XGetXCBConnection(dpy);
6622        (void) __glXFlushRenderBuffer(gc, gc->pc);
6623        xcb_glx_get_query_objectuiv_reply_t *reply = xcb_glx_get_query_objectuiv_reply(c, xcb_glx_get_query_objectuiv(c, gc->currentContextTag, id, pname), NULL);
6624        /* the XXX_data_length() xcb function name is misleading, it returns the number */
6625        /* of elements, not the length of the data part. A single element is embedded. */
6626        if (xcb_glx_get_query_objectuiv_data_length(reply) == 1)
6627            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
6628        else
6629            (void)memcpy(params, xcb_glx_get_query_objectuiv_data(reply), xcb_glx_get_query_objectuiv_data_length(reply) * sizeof(GLuint));
6630        free(reply);
6631#else
6632        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuiv, cmdlen);
6633(void) memcpy((void *)(pc + 0), (void *)(&id), 4);
6634(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
6635        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6636        UnlockDisplay(dpy); SyncHandle();
6637#endif /* USE_XCB */
6638    }
6639    return;
6640}
6641
6642#define X_GLsop_GetQueryiv 164
6643void __indirect_glGetQueryiv(GLenum target, GLenum pname, GLint * params)
6644{
6645    struct glx_context * const gc = __glXGetCurrentContext();
6646    Display * const dpy = gc->currentDpy;
6647#ifndef USE_XCB
6648    const GLuint cmdlen = 8;
6649#endif
6650    if (__builtin_expect(dpy != NULL, 1)) {
6651#ifdef USE_XCB
6652        xcb_connection_t *c = XGetXCBConnection(dpy);
6653        (void) __glXFlushRenderBuffer(gc, gc->pc);
6654        xcb_glx_get_queryiv_reply_t *reply = xcb_glx_get_queryiv_reply(c, xcb_glx_get_queryiv(c, gc->currentContextTag, target, pname), NULL);
6655        /* the XXX_data_length() xcb function name is misleading, it returns the number */
6656        /* of elements, not the length of the data part. A single element is embedded. */
6657        if (xcb_glx_get_queryiv_data_length(reply) == 1)
6658            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
6659        else
6660            (void)memcpy(params, xcb_glx_get_queryiv_data(reply), xcb_glx_get_queryiv_data_length(reply) * sizeof(GLint));
6661        free(reply);
6662#else
6663        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryiv, cmdlen);
6664(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
6665(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
6666        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6667        UnlockDisplay(dpy); SyncHandle();
6668#endif /* USE_XCB */
6669    }
6670    return;
6671}
6672
6673#define X_GLsop_IsQuery 163
6674GLboolean __indirect_glIsQuery(GLuint id)
6675{
6676    struct glx_context * const gc = __glXGetCurrentContext();
6677    Display * const dpy = gc->currentDpy;
6678    GLboolean retval = (GLboolean) 0;
6679#ifndef USE_XCB
6680    const GLuint cmdlen = 4;
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_is_query_reply_t *reply = xcb_glx_is_query_reply(c, xcb_glx_is_query(c, gc->currentContextTag, id), NULL);
6687        retval = reply->ret_val;
6688        free(reply);
6689#else
6690        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsQuery, cmdlen);
6691(void) memcpy((void *)(pc + 0), (void *)(&id), 4);
6692        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
6693        UnlockDisplay(dpy); SyncHandle();
6694#endif /* USE_XCB */
6695    }
6696    return retval;
6697}
6698
6699#define X_GLrop_BlendEquationSeparate 4228
6700void __indirect_glBlendEquationSeparate(GLenum modeRGB, GLenum modeA)
6701{
6702    struct glx_context * const gc = __glXGetCurrentContext();
6703    const GLuint cmdlen = 12;
6704emit_header(gc->pc, X_GLrop_BlendEquationSeparate, cmdlen);
6705(void) memcpy((void *)(gc->pc + 4), (void *)(&modeRGB), 4);
6706(void) memcpy((void *)(gc->pc + 8), (void *)(&modeA), 4);
6707gc->pc += cmdlen;
6708if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6709}
6710
6711#define X_GLrop_DrawBuffers 233
6712void __indirect_glDrawBuffers(GLsizei n, const GLenum * bufs)
6713{
6714    struct glx_context * const gc = __glXGetCurrentContext();
6715    const GLuint cmdlen = 8 + safe_pad(safe_mul(n, 4));
6716    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
6717        __glXSetError(gc, GL_INVALID_VALUE);
6718        return;
6719    }
6720    if (n < 0) {
6721        __glXSetError(gc, GL_INVALID_VALUE);
6722        return;
6723    }
6724    if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
6725if (cmdlen <= gc->maxSmallRenderCommandSize) {
6726    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
6727        (void) __glXFlushRenderBuffer(gc, gc->pc);
6728    }
6729emit_header(gc->pc, X_GLrop_DrawBuffers, cmdlen);
6730(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
6731(void) memcpy((void *)(gc->pc + 8), (void *)(bufs), safe_mul(n, 4));
6732gc->pc += cmdlen;
6733if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6734}
6735else {
6736const GLint op = X_GLrop_DrawBuffers;
6737const GLuint cmdlenLarge = cmdlen + 4;
6738GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
6739(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
6740(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
6741(void) memcpy((void *)(pc + 8), (void *)(&n), 4);
6742    __glXSendLargeCommand(gc, pc, 12, bufs, safe_mul(n, 4));
6743}
6744    }
6745}
6746
6747#define X_GLrop_VertexAttrib1dv 4197
6748void __indirect_glVertexAttrib1d(GLuint index, GLdouble x)
6749{
6750    struct glx_context * const gc = __glXGetCurrentContext();
6751    const GLuint cmdlen = 16;
6752emit_header(gc->pc, X_GLrop_VertexAttrib1dv, cmdlen);
6753(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6754(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
6755gc->pc += cmdlen;
6756if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6757}
6758
6759#define X_GLrop_VertexAttrib1dv 4197
6760void __indirect_glVertexAttrib1dv(GLuint index, const GLdouble * v)
6761{
6762    struct glx_context * const gc = __glXGetCurrentContext();
6763    const GLuint cmdlen = 16;
6764emit_header(gc->pc, X_GLrop_VertexAttrib1dv, cmdlen);
6765(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6766(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6767gc->pc += cmdlen;
6768if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6769}
6770
6771#define X_GLrop_VertexAttrib1sv 4189
6772void __indirect_glVertexAttrib1s(GLuint index, GLshort x)
6773{
6774    struct glx_context * const gc = __glXGetCurrentContext();
6775    const GLuint cmdlen = 12;
6776emit_header(gc->pc, X_GLrop_VertexAttrib1sv, cmdlen);
6777(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6778(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6779gc->pc += cmdlen;
6780if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6781}
6782
6783#define X_GLrop_VertexAttrib1sv 4189
6784void __indirect_glVertexAttrib1sv(GLuint index, const GLshort * v)
6785{
6786    struct glx_context * const gc = __glXGetCurrentContext();
6787    const GLuint cmdlen = 12;
6788emit_header(gc->pc, X_GLrop_VertexAttrib1sv, cmdlen);
6789(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6790(void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
6791gc->pc += cmdlen;
6792if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6793}
6794
6795#define X_GLrop_VertexAttrib2dv 4198
6796void __indirect_glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
6797{
6798    struct glx_context * const gc = __glXGetCurrentContext();
6799    const GLuint cmdlen = 24;
6800emit_header(gc->pc, X_GLrop_VertexAttrib2dv, cmdlen);
6801(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6802(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
6803(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
6804gc->pc += cmdlen;
6805if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6806}
6807
6808#define X_GLrop_VertexAttrib2dv 4198
6809void __indirect_glVertexAttrib2dv(GLuint index, const GLdouble * v)
6810{
6811    struct glx_context * const gc = __glXGetCurrentContext();
6812    const GLuint cmdlen = 24;
6813emit_header(gc->pc, X_GLrop_VertexAttrib2dv, cmdlen);
6814(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6815(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6816gc->pc += cmdlen;
6817if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6818}
6819
6820#define X_GLrop_VertexAttrib2sv 4190
6821void __indirect_glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
6822{
6823    struct glx_context * const gc = __glXGetCurrentContext();
6824    const GLuint cmdlen = 12;
6825emit_header(gc->pc, X_GLrop_VertexAttrib2sv, cmdlen);
6826(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6827(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6828(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
6829gc->pc += cmdlen;
6830if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6831}
6832
6833#define X_GLrop_VertexAttrib2sv 4190
6834void __indirect_glVertexAttrib2sv(GLuint index, const GLshort * v)
6835{
6836    struct glx_context * const gc = __glXGetCurrentContext();
6837    const GLuint cmdlen = 12;
6838emit_header(gc->pc, X_GLrop_VertexAttrib2sv, cmdlen);
6839(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6840(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6841gc->pc += cmdlen;
6842if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6843}
6844
6845#define X_GLrop_VertexAttrib3dv 4199
6846void __indirect_glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
6847{
6848    struct glx_context * const gc = __glXGetCurrentContext();
6849    const GLuint cmdlen = 32;
6850emit_header(gc->pc, X_GLrop_VertexAttrib3dv, cmdlen);
6851(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6852(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
6853(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
6854(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
6855gc->pc += cmdlen;
6856if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6857}
6858
6859#define X_GLrop_VertexAttrib3dv 4199
6860void __indirect_glVertexAttrib3dv(GLuint index, const GLdouble * v)
6861{
6862    struct glx_context * const gc = __glXGetCurrentContext();
6863    const GLuint cmdlen = 32;
6864emit_header(gc->pc, X_GLrop_VertexAttrib3dv, cmdlen);
6865(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6866(void) memcpy((void *)(gc->pc + 8), (void *)(v), 24);
6867gc->pc += cmdlen;
6868if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6869}
6870
6871#define X_GLrop_VertexAttrib3sv 4191
6872void __indirect_glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
6873{
6874    struct glx_context * const gc = __glXGetCurrentContext();
6875    const GLuint cmdlen = 16;
6876emit_header(gc->pc, X_GLrop_VertexAttrib3sv, cmdlen);
6877(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6878(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6879(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
6880(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
6881gc->pc += cmdlen;
6882if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6883}
6884
6885#define X_GLrop_VertexAttrib3sv 4191
6886void __indirect_glVertexAttrib3sv(GLuint index, const GLshort * v)
6887{
6888    struct glx_context * const gc = __glXGetCurrentContext();
6889    const GLuint cmdlen = 16;
6890emit_header(gc->pc, X_GLrop_VertexAttrib3sv, cmdlen);
6891(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6892(void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
6893gc->pc += cmdlen;
6894if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6895}
6896
6897#define X_GLrop_VertexAttrib4Nbv 4235
6898void __indirect_glVertexAttrib4Nbv(GLuint index, const GLbyte * v)
6899{
6900    struct glx_context * const gc = __glXGetCurrentContext();
6901    const GLuint cmdlen = 12;
6902emit_header(gc->pc, X_GLrop_VertexAttrib4Nbv, cmdlen);
6903(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6904(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6905gc->pc += cmdlen;
6906if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6907}
6908
6909#define X_GLrop_VertexAttrib4Niv 4237
6910void __indirect_glVertexAttrib4Niv(GLuint index, const GLint * v)
6911{
6912    struct glx_context * const gc = __glXGetCurrentContext();
6913    const GLuint cmdlen = 24;
6914emit_header(gc->pc, X_GLrop_VertexAttrib4Niv, cmdlen);
6915(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6916(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6917gc->pc += cmdlen;
6918if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6919}
6920
6921#define X_GLrop_VertexAttrib4Nsv 4236
6922void __indirect_glVertexAttrib4Nsv(GLuint index, const GLshort * v)
6923{
6924    struct glx_context * const gc = __glXGetCurrentContext();
6925    const GLuint cmdlen = 16;
6926emit_header(gc->pc, X_GLrop_VertexAttrib4Nsv, cmdlen);
6927(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6928(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6929gc->pc += cmdlen;
6930if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6931}
6932
6933#define X_GLrop_VertexAttrib4Nubv 4201
6934void __indirect_glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
6935{
6936    struct glx_context * const gc = __glXGetCurrentContext();
6937    const GLuint cmdlen = 12;
6938emit_header(gc->pc, X_GLrop_VertexAttrib4Nubv, cmdlen);
6939(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6940(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
6941(void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
6942(void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
6943(void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
6944gc->pc += cmdlen;
6945if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6946}
6947
6948#define X_GLrop_VertexAttrib4Nubv 4201
6949void __indirect_glVertexAttrib4Nubv(GLuint index, const GLubyte * v)
6950{
6951    struct glx_context * const gc = __glXGetCurrentContext();
6952    const GLuint cmdlen = 12;
6953emit_header(gc->pc, X_GLrop_VertexAttrib4Nubv, cmdlen);
6954(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6955(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6956gc->pc += cmdlen;
6957if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6958}
6959
6960#define X_GLrop_VertexAttrib4Nuiv 4239
6961void __indirect_glVertexAttrib4Nuiv(GLuint index, const GLuint * v)
6962{
6963    struct glx_context * const gc = __glXGetCurrentContext();
6964    const GLuint cmdlen = 24;
6965emit_header(gc->pc, X_GLrop_VertexAttrib4Nuiv, cmdlen);
6966(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6967(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6968gc->pc += cmdlen;
6969if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6970}
6971
6972#define X_GLrop_VertexAttrib4Nusv 4238
6973void __indirect_glVertexAttrib4Nusv(GLuint index, const GLushort * v)
6974{
6975    struct glx_context * const gc = __glXGetCurrentContext();
6976    const GLuint cmdlen = 16;
6977emit_header(gc->pc, X_GLrop_VertexAttrib4Nusv, cmdlen);
6978(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6979(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6980gc->pc += cmdlen;
6981if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6982}
6983
6984#define X_GLrop_VertexAttrib4bv 4230
6985void __indirect_glVertexAttrib4bv(GLuint index, const GLbyte * v)
6986{
6987    struct glx_context * const gc = __glXGetCurrentContext();
6988    const GLuint cmdlen = 12;
6989emit_header(gc->pc, X_GLrop_VertexAttrib4bv, cmdlen);
6990(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6991(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6992gc->pc += cmdlen;
6993if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6994}
6995
6996#define X_GLrop_VertexAttrib4dv 4200
6997void __indirect_glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
6998{
6999    struct glx_context * const gc = __glXGetCurrentContext();
7000    const GLuint cmdlen = 40;
7001emit_header(gc->pc, X_GLrop_VertexAttrib4dv, cmdlen);
7002(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7003(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
7004(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
7005(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
7006(void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8);
7007gc->pc += cmdlen;
7008if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7009}
7010
7011#define X_GLrop_VertexAttrib4dv 4200
7012void __indirect_glVertexAttrib4dv(GLuint index, const GLdouble * v)
7013{
7014    struct glx_context * const gc = __glXGetCurrentContext();
7015    const GLuint cmdlen = 40;
7016emit_header(gc->pc, X_GLrop_VertexAttrib4dv, cmdlen);
7017(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7018(void) memcpy((void *)(gc->pc + 8), (void *)(v), 32);
7019gc->pc += cmdlen;
7020if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7021}
7022
7023#define X_GLrop_VertexAttrib4iv 4231
7024void __indirect_glVertexAttrib4iv(GLuint index, const GLint * v)
7025{
7026    struct glx_context * const gc = __glXGetCurrentContext();
7027    const GLuint cmdlen = 24;
7028emit_header(gc->pc, X_GLrop_VertexAttrib4iv, cmdlen);
7029(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7030(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7031gc->pc += cmdlen;
7032if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7033}
7034
7035#define X_GLrop_VertexAttrib4sv 4192
7036void __indirect_glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
7037{
7038    struct glx_context * const gc = __glXGetCurrentContext();
7039    const GLuint cmdlen = 16;
7040emit_header(gc->pc, X_GLrop_VertexAttrib4sv, cmdlen);
7041(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7042(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
7043(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
7044(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
7045(void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
7046gc->pc += cmdlen;
7047if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7048}
7049
7050#define X_GLrop_VertexAttrib4sv 4192
7051void __indirect_glVertexAttrib4sv(GLuint index, const GLshort * v)
7052{
7053    struct glx_context * const gc = __glXGetCurrentContext();
7054    const GLuint cmdlen = 16;
7055emit_header(gc->pc, X_GLrop_VertexAttrib4sv, cmdlen);
7056(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7057(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7058gc->pc += cmdlen;
7059if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7060}
7061
7062#define X_GLrop_VertexAttrib4ubv 4232
7063void __indirect_glVertexAttrib4ubv(GLuint index, const GLubyte * v)
7064{
7065    struct glx_context * const gc = __glXGetCurrentContext();
7066    const GLuint cmdlen = 12;
7067emit_header(gc->pc, X_GLrop_VertexAttrib4ubv, cmdlen);
7068(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7069(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
7070gc->pc += cmdlen;
7071if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7072}
7073
7074#define X_GLrop_VertexAttrib4uiv 4234
7075void __indirect_glVertexAttrib4uiv(GLuint index, const GLuint * v)
7076{
7077    struct glx_context * const gc = __glXGetCurrentContext();
7078    const GLuint cmdlen = 24;
7079emit_header(gc->pc, X_GLrop_VertexAttrib4uiv, cmdlen);
7080(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7081(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7082gc->pc += cmdlen;
7083if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7084}
7085
7086#define X_GLrop_VertexAttrib4usv 4233
7087void __indirect_glVertexAttrib4usv(GLuint index, const GLushort * v)
7088{
7089    struct glx_context * const gc = __glXGetCurrentContext();
7090    const GLuint cmdlen = 16;
7091emit_header(gc->pc, X_GLrop_VertexAttrib4usv, cmdlen);
7092(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7093(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7094gc->pc += cmdlen;
7095if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7096}
7097
7098#define X_GLrop_ClampColor 234
7099void __indirect_glClampColor(GLenum target, GLenum clamp)
7100{
7101    struct glx_context * const gc = __glXGetCurrentContext();
7102    const GLuint cmdlen = 12;
7103emit_header(gc->pc, X_GLrop_ClampColor, cmdlen);
7104(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7105(void) memcpy((void *)(gc->pc + 8), (void *)(&clamp), 4);
7106gc->pc += cmdlen;
7107if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7108}
7109
7110#define X_GLrop_BindProgramARB 4180
7111void __indirect_glBindProgramARB(GLenum target, GLuint program)
7112{
7113    struct glx_context * const gc = __glXGetCurrentContext();
7114    const GLuint cmdlen = 12;
7115emit_header(gc->pc, X_GLrop_BindProgramARB, cmdlen);
7116(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7117(void) memcpy((void *)(gc->pc + 8), (void *)(&program), 4);
7118gc->pc += cmdlen;
7119if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7120}
7121
7122#define X_GLvop_DeleteProgramsARB 1294
7123void __indirect_glDeleteProgramsARB(GLsizei n, const GLuint * programs)
7124{
7125    struct glx_context * const gc = __glXGetCurrentContext();
7126    Display * const dpy = gc->currentDpy;
7127    const GLuint cmdlen = 4 + safe_pad(safe_mul(n, 4));
7128    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
7129        __glXSetError(gc, GL_INVALID_VALUE);
7130        return;
7131    }
7132    if (n < 0) {
7133        __glXSetError(gc, GL_INVALID_VALUE);
7134        return;
7135    }
7136    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7137        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteProgramsARB, cmdlen);
7138(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7139(void) memcpy((void *)(pc + 4), (void *)(programs), safe_mul(n, 4));
7140        UnlockDisplay(dpy); SyncHandle();
7141    }
7142    return;
7143}
7144
7145#define X_GLvop_GenProgramsARB 1295
7146void __indirect_glGenProgramsARB(GLsizei n, GLuint * programs)
7147{
7148    struct glx_context * const gc = __glXGetCurrentContext();
7149    Display * const dpy = gc->currentDpy;
7150    const GLuint cmdlen = 4;
7151    if (n < 0) {
7152        __glXSetError(gc, GL_INVALID_VALUE);
7153        return;
7154    }
7155    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7156        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenProgramsARB, cmdlen);
7157(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7158        (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
7159        UnlockDisplay(dpy); SyncHandle();
7160    }
7161    return;
7162}
7163
7164#define X_GLvop_GetProgramStringARB 1308
7165void __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
7166{
7167    struct glx_context * const gc = __glXGetCurrentContext();
7168    Display * const dpy = gc->currentDpy;
7169    const GLuint cmdlen = 8;
7170    if (__builtin_expect(dpy != NULL, 1)) {
7171        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringARB, cmdlen);
7172(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7173(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7174        (void) __glXReadReply(dpy, 1, string, GL_TRUE);
7175        UnlockDisplay(dpy); SyncHandle();
7176    }
7177    return;
7178}
7179
7180#define X_GLvop_GetProgramivARB 1307
7181void __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
7182{
7183    struct glx_context * const gc = __glXGetCurrentContext();
7184    Display * const dpy = gc->currentDpy;
7185    const GLuint cmdlen = 8;
7186    if (__builtin_expect(dpy != NULL, 1)) {
7187        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivARB, cmdlen);
7188(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7189(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7190        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7191        UnlockDisplay(dpy); SyncHandle();
7192    }
7193    return;
7194}
7195
7196#define X_GLvop_IsProgramARB 1304
7197GLboolean __indirect_glIsProgramARB(GLuint program)
7198{
7199    struct glx_context * const gc = __glXGetCurrentContext();
7200    Display * const dpy = gc->currentDpy;
7201    GLboolean retval = (GLboolean) 0;
7202    const GLuint cmdlen = 4;
7203    if (__builtin_expect(dpy != NULL, 1)) {
7204        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsProgramARB, cmdlen);
7205(void) memcpy((void *)(pc + 0), (void *)(&program), 4);
7206        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
7207        UnlockDisplay(dpy); SyncHandle();
7208    }
7209    return retval;
7210}
7211
7212#define X_GLrop_ProgramEnvParameter4dvARB 4185
7213void __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
7214{
7215    struct glx_context * const gc = __glXGetCurrentContext();
7216    const GLuint cmdlen = 44;
7217emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7218(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7219(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7220(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
7221(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
7222(void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
7223(void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
7224gc->pc += cmdlen;
7225if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7226}
7227
7228#define X_GLrop_ProgramEnvParameter4dvARB 4185
7229void __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
7230{
7231    struct glx_context * const gc = __glXGetCurrentContext();
7232    const GLuint cmdlen = 44;
7233emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7234(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7235(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7236(void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
7237gc->pc += cmdlen;
7238if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7239}
7240
7241#define X_GLrop_ProgramEnvParameter4fvARB 4184
7242void __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
7243{
7244    struct glx_context * const gc = __glXGetCurrentContext();
7245    const GLuint cmdlen = 28;
7246emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7247(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7248(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7249(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
7250(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
7251(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
7252(void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
7253gc->pc += cmdlen;
7254if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7255}
7256
7257#define X_GLrop_ProgramEnvParameter4fvARB 4184
7258void __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
7259{
7260    struct glx_context * const gc = __glXGetCurrentContext();
7261    const GLuint cmdlen = 28;
7262emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7263(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7264(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7265(void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
7266gc->pc += cmdlen;
7267if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7268}
7269
7270#define X_GLrop_ProgramLocalParameter4dvARB 4216
7271void __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
7272{
7273    struct glx_context * const gc = __glXGetCurrentContext();
7274    const GLuint cmdlen = 44;
7275emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7276(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7277(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7278(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
7279(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
7280(void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
7281(void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
7282gc->pc += cmdlen;
7283if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7284}
7285
7286#define X_GLrop_ProgramLocalParameter4dvARB 4216
7287void __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
7288{
7289    struct glx_context * const gc = __glXGetCurrentContext();
7290    const GLuint cmdlen = 44;
7291emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7292(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7293(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7294(void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
7295gc->pc += cmdlen;
7296if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7297}
7298
7299#define X_GLrop_ProgramLocalParameter4fvARB 4215
7300void __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
7301{
7302    struct glx_context * const gc = __glXGetCurrentContext();
7303    const GLuint cmdlen = 28;
7304emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7305(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7306(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7307(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
7308(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
7309(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
7310(void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
7311gc->pc += cmdlen;
7312if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7313}
7314
7315#define X_GLrop_ProgramLocalParameter4fvARB 4215
7316void __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
7317{
7318    struct glx_context * const gc = __glXGetCurrentContext();
7319    const GLuint cmdlen = 28;
7320emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7321(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7322(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7323(void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
7324gc->pc += cmdlen;
7325if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7326}
7327
7328#define X_GLrop_ProgramStringARB 4217
7329void __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string)
7330{
7331    struct glx_context * const gc = __glXGetCurrentContext();
7332    const GLuint cmdlen = 16 + safe_pad(len);
7333    if (0 + safe_pad(len) < 0) {
7334        __glXSetError(gc, GL_INVALID_VALUE);
7335        return;
7336    }
7337    if (len < 0) {
7338        __glXSetError(gc, GL_INVALID_VALUE);
7339        return;
7340    }
7341    if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
7342if (cmdlen <= gc->maxSmallRenderCommandSize) {
7343    if ( (gc->pc + cmdlen) > gc->bufEnd ) {
7344        (void) __glXFlushRenderBuffer(gc, gc->pc);
7345    }
7346emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
7347(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7348(void) memcpy((void *)(gc->pc + 8), (void *)(&format), 4);
7349(void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
7350(void) memcpy((void *)(gc->pc + 16), (void *)(string), len);
7351gc->pc += cmdlen;
7352if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7353}
7354else {
7355const GLint op = X_GLrop_ProgramStringARB;
7356const GLuint cmdlenLarge = cmdlen + 4;
7357GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
7358(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
7359(void) memcpy((void *)(pc + 4), (void *)(&op), 4);
7360(void) memcpy((void *)(pc + 8), (void *)(&target), 4);
7361(void) memcpy((void *)(pc + 12), (void *)(&format), 4);
7362(void) memcpy((void *)(pc + 16), (void *)(&len), 4);
7363    __glXSendLargeCommand(gc, pc, 20, string, len);
7364}
7365    }
7366}
7367
7368#define X_GLrop_VertexAttrib1fvARB 4193
7369void __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
7370{
7371    struct glx_context * const gc = __glXGetCurrentContext();
7372    const GLuint cmdlen = 12;
7373emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7374(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7375(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7376gc->pc += cmdlen;
7377if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7378}
7379
7380#define X_GLrop_VertexAttrib1fvARB 4193
7381void __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
7382{
7383    struct glx_context * const gc = __glXGetCurrentContext();
7384    const GLuint cmdlen = 12;
7385emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7386(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7387(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
7388gc->pc += cmdlen;
7389if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7390}
7391
7392#define X_GLrop_VertexAttrib2fvARB 4194
7393void __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
7394{
7395    struct glx_context * const gc = __glXGetCurrentContext();
7396    const GLuint cmdlen = 16;
7397emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7398(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7399(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7400(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
7401gc->pc += cmdlen;
7402if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7403}
7404
7405#define X_GLrop_VertexAttrib2fvARB 4194
7406void __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
7407{
7408    struct glx_context * const gc = __glXGetCurrentContext();
7409    const GLuint cmdlen = 16;
7410emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7411(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7412(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7413gc->pc += cmdlen;
7414if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7415}
7416
7417#define X_GLrop_VertexAttrib3fvARB 4195
7418void __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
7419{
7420    struct glx_context * const gc = __glXGetCurrentContext();
7421    const GLuint cmdlen = 20;
7422emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7423(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7424(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7425(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
7426(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
7427gc->pc += cmdlen;
7428if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7429}
7430
7431#define X_GLrop_VertexAttrib3fvARB 4195
7432void __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
7433{
7434    struct glx_context * const gc = __glXGetCurrentContext();
7435    const GLuint cmdlen = 20;
7436emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7437(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7438(void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
7439gc->pc += cmdlen;
7440if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7441}
7442
7443#define X_GLrop_VertexAttrib4fvARB 4196
7444void __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
7445{
7446    struct glx_context * const gc = __glXGetCurrentContext();
7447    const GLuint cmdlen = 24;
7448emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
7449(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7450(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7451(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
7452(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
7453(void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
7454gc->pc += cmdlen;
7455if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7456}
7457
7458#define X_GLrop_VertexAttrib4fvARB 4196
7459void __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
7460{
7461    struct glx_context * const gc = __glXGetCurrentContext();
7462    const GLuint cmdlen = 24;
7463emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
7464(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7465(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7466gc->pc += cmdlen;
7467if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7468}
7469
7470#define X_GLrop_BindFramebuffer 236
7471void __indirect_glBindFramebuffer(GLenum target, GLuint framebuffer)
7472{
7473    struct glx_context * const gc = __glXGetCurrentContext();
7474    const GLuint cmdlen = 12;
7475emit_header(gc->pc, X_GLrop_BindFramebuffer, cmdlen);
7476(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7477(void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4);
7478gc->pc += cmdlen;
7479if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7480}
7481
7482#define X_GLrop_BindRenderbuffer 235
7483void __indirect_glBindRenderbuffer(GLenum target, GLuint renderbuffer)
7484{
7485    struct glx_context * const gc = __glXGetCurrentContext();
7486    const GLuint cmdlen = 12;
7487emit_header(gc->pc, X_GLrop_BindRenderbuffer, cmdlen);
7488(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7489(void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4);
7490gc->pc += cmdlen;
7491if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7492}
7493
7494#define X_GLrop_BlitFramebuffer 4330
7495void __indirect_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
7496{
7497    struct glx_context * const gc = __glXGetCurrentContext();
7498    const GLuint cmdlen = 44;
7499emit_header(gc->pc, X_GLrop_BlitFramebuffer, cmdlen);
7500(void) memcpy((void *)(gc->pc + 4), (void *)(&srcX0), 4);
7501(void) memcpy((void *)(gc->pc + 8), (void *)(&srcY0), 4);
7502(void) memcpy((void *)(gc->pc + 12), (void *)(&srcX1), 4);
7503(void) memcpy((void *)(gc->pc + 16), (void *)(&srcY1), 4);
7504(void) memcpy((void *)(gc->pc + 20), (void *)(&dstX0), 4);
7505(void) memcpy((void *)(gc->pc + 24), (void *)(&dstY0), 4);
7506(void) memcpy((void *)(gc->pc + 28), (void *)(&dstX1), 4);
7507(void) memcpy((void *)(gc->pc + 32), (void *)(&dstY1), 4);
7508(void) memcpy((void *)(gc->pc + 36), (void *)(&mask), 4);
7509(void) memcpy((void *)(gc->pc + 40), (void *)(&filter), 4);
7510gc->pc += cmdlen;
7511if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7512}
7513
7514#define X_GLvop_CheckFramebufferStatus 1427
7515GLenum __indirect_glCheckFramebufferStatus(GLenum target)
7516{
7517    struct glx_context * const gc = __glXGetCurrentContext();
7518    Display * const dpy = gc->currentDpy;
7519    GLenum retval = (GLenum) 0;
7520    const GLuint cmdlen = 4;
7521    if (__builtin_expect(dpy != NULL, 1)) {
7522        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_CheckFramebufferStatus, cmdlen);
7523(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7524        retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
7525        UnlockDisplay(dpy); SyncHandle();
7526    }
7527    return retval;
7528}
7529
7530#define X_GLrop_DeleteFramebuffers 4320
7531void __indirect_glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers)
7532{
7533    struct glx_context * const gc = __glXGetCurrentContext();
7534    const GLuint cmdlen = 8 + safe_pad(safe_mul(n, 4));
7535    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
7536        __glXSetError(gc, GL_INVALID_VALUE);
7537        return;
7538    }
7539    if (n < 0) {
7540        __glXSetError(gc, GL_INVALID_VALUE);
7541        return;
7542    }
7543    if (__builtin_expect(n >= 0, 1)) {
7544emit_header(gc->pc, X_GLrop_DeleteFramebuffers, cmdlen);
7545(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
7546(void) memcpy((void *)(gc->pc + 8), (void *)(framebuffers), safe_mul(n, 4));
7547gc->pc += cmdlen;
7548if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7549    }
7550}
7551
7552#define X_GLrop_DeleteRenderbuffers 4317
7553void __indirect_glDeleteRenderbuffers(GLsizei n, const GLuint * renderbuffers)
7554{
7555    struct glx_context * const gc = __glXGetCurrentContext();
7556    const GLuint cmdlen = 8 + safe_pad(safe_mul(n, 4));
7557    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
7558        __glXSetError(gc, GL_INVALID_VALUE);
7559        return;
7560    }
7561    if (n < 0) {
7562        __glXSetError(gc, GL_INVALID_VALUE);
7563        return;
7564    }
7565    if (__builtin_expect(n >= 0, 1)) {
7566emit_header(gc->pc, X_GLrop_DeleteRenderbuffers, cmdlen);
7567(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
7568(void) memcpy((void *)(gc->pc + 8), (void *)(renderbuffers), safe_mul(n, 4));
7569gc->pc += cmdlen;
7570if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7571    }
7572}
7573
7574#define X_GLrop_FramebufferRenderbuffer 4324
7575void __indirect_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
7576{
7577    struct glx_context * const gc = __glXGetCurrentContext();
7578    const GLuint cmdlen = 20;
7579emit_header(gc->pc, X_GLrop_FramebufferRenderbuffer, cmdlen);
7580(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7581(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
7582(void) memcpy((void *)(gc->pc + 12), (void *)(&renderbuffertarget), 4);
7583(void) memcpy((void *)(gc->pc + 16), (void *)(&renderbuffer), 4);
7584gc->pc += cmdlen;
7585if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7586}
7587
7588#define X_GLrop_FramebufferTexture1D 4321
7589void __indirect_glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
7590{
7591    struct glx_context * const gc = __glXGetCurrentContext();
7592    const GLuint cmdlen = 24;
7593emit_header(gc->pc, X_GLrop_FramebufferTexture1D, cmdlen);
7594(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7595(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
7596(void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
7597(void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
7598(void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
7599gc->pc += cmdlen;
7600if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7601}
7602
7603#define X_GLrop_FramebufferTexture2D 4322
7604void __indirect_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
7605{
7606    struct glx_context * const gc = __glXGetCurrentContext();
7607    const GLuint cmdlen = 24;
7608emit_header(gc->pc, X_GLrop_FramebufferTexture2D, cmdlen);
7609(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7610(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
7611(void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
7612(void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
7613(void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
7614gc->pc += cmdlen;
7615if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7616}
7617
7618#define X_GLrop_FramebufferTexture3D 4323
7619void __indirect_glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer)
7620{
7621    struct glx_context * const gc = __glXGetCurrentContext();
7622    const GLuint cmdlen = 28;
7623emit_header(gc->pc, X_GLrop_FramebufferTexture3D, cmdlen);
7624(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7625(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
7626(void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
7627(void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
7628(void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
7629(void) memcpy((void *)(gc->pc + 24), (void *)(&layer), 4);
7630gc->pc += cmdlen;
7631if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7632}
7633
7634#define X_GLrop_FramebufferTextureLayer 237
7635void __indirect_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
7636{
7637    struct glx_context * const gc = __glXGetCurrentContext();
7638    const GLuint cmdlen = 24;
7639emit_header(gc->pc, X_GLrop_FramebufferTextureLayer, cmdlen);
7640(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7641(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
7642(void) memcpy((void *)(gc->pc + 12), (void *)(&texture), 4);
7643(void) memcpy((void *)(gc->pc + 16), (void *)(&level), 4);
7644(void) memcpy((void *)(gc->pc + 20), (void *)(&layer), 4);
7645gc->pc += cmdlen;
7646if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7647}
7648
7649#define X_GLvop_GenFramebuffers 1426
7650void __indirect_glGenFramebuffers(GLsizei n, GLuint * framebuffers)
7651{
7652    struct glx_context * const gc = __glXGetCurrentContext();
7653    Display * const dpy = gc->currentDpy;
7654    const GLuint cmdlen = 4;
7655    if (n < 0) {
7656        __glXSetError(gc, GL_INVALID_VALUE);
7657        return;
7658    }
7659    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7660        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenFramebuffers, cmdlen);
7661(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7662        (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
7663        UnlockDisplay(dpy); SyncHandle();
7664    }
7665    return;
7666}
7667
7668#define X_GLvop_GenRenderbuffers 1423
7669void __indirect_glGenRenderbuffers(GLsizei n, GLuint * renderbuffers)
7670{
7671    struct glx_context * const gc = __glXGetCurrentContext();
7672    Display * const dpy = gc->currentDpy;
7673    const GLuint cmdlen = 4;
7674    if (n < 0) {
7675        __glXSetError(gc, GL_INVALID_VALUE);
7676        return;
7677    }
7678    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7679        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenRenderbuffers, cmdlen);
7680(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7681        (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
7682        UnlockDisplay(dpy); SyncHandle();
7683    }
7684    return;
7685}
7686
7687#define X_GLrop_GenerateMipmap 4325
7688void __indirect_glGenerateMipmap(GLenum target)
7689{
7690    struct glx_context * const gc = __glXGetCurrentContext();
7691    const GLuint cmdlen = 8;
7692emit_header(gc->pc, X_GLrop_GenerateMipmap, cmdlen);
7693(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7694gc->pc += cmdlen;
7695if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7696}
7697
7698#define X_GLvop_GetFramebufferAttachmentParameteriv 1428
7699void __indirect_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params)
7700{
7701    struct glx_context * const gc = __glXGetCurrentContext();
7702    Display * const dpy = gc->currentDpy;
7703    const GLuint cmdlen = 12;
7704    if (__builtin_expect(dpy != NULL, 1)) {
7705        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetFramebufferAttachmentParameteriv, cmdlen);
7706(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7707(void) memcpy((void *)(pc + 4), (void *)(&attachment), 4);
7708(void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
7709        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7710        UnlockDisplay(dpy); SyncHandle();
7711    }
7712    return;
7713}
7714
7715#define X_GLvop_GetRenderbufferParameteriv 1424
7716void __indirect_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params)
7717{
7718    struct glx_context * const gc = __glXGetCurrentContext();
7719    Display * const dpy = gc->currentDpy;
7720    const GLuint cmdlen = 8;
7721    if (__builtin_expect(dpy != NULL, 1)) {
7722        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetRenderbufferParameteriv, cmdlen);
7723(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7724(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7725        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7726        UnlockDisplay(dpy); SyncHandle();
7727    }
7728    return;
7729}
7730
7731#define X_GLvop_IsFramebuffer 1425
7732GLboolean __indirect_glIsFramebuffer(GLuint framebuffer)
7733{
7734    struct glx_context * const gc = __glXGetCurrentContext();
7735    Display * const dpy = gc->currentDpy;
7736    GLboolean retval = (GLboolean) 0;
7737    const GLuint cmdlen = 4;
7738    if (__builtin_expect(dpy != NULL, 1)) {
7739        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsFramebuffer, cmdlen);
7740(void) memcpy((void *)(pc + 0), (void *)(&framebuffer), 4);
7741        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
7742        UnlockDisplay(dpy); SyncHandle();
7743    }
7744    return retval;
7745}
7746
7747#define X_GLvop_IsRenderbuffer 1422
7748GLboolean __indirect_glIsRenderbuffer(GLuint renderbuffer)
7749{
7750    struct glx_context * const gc = __glXGetCurrentContext();
7751    Display * const dpy = gc->currentDpy;
7752    GLboolean retval = (GLboolean) 0;
7753    const GLuint cmdlen = 4;
7754    if (__builtin_expect(dpy != NULL, 1)) {
7755        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsRenderbuffer, cmdlen);
7756(void) memcpy((void *)(pc + 0), (void *)(&renderbuffer), 4);
7757        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
7758        UnlockDisplay(dpy); SyncHandle();
7759    }
7760    return retval;
7761}
7762
7763#define X_GLrop_RenderbufferStorage 4318
7764void __indirect_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
7765{
7766    struct glx_context * const gc = __glXGetCurrentContext();
7767    const GLuint cmdlen = 20;
7768emit_header(gc->pc, X_GLrop_RenderbufferStorage, cmdlen);
7769(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7770(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
7771(void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
7772(void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
7773gc->pc += cmdlen;
7774if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7775}
7776
7777#define X_GLrop_RenderbufferStorageMultisample 4331
7778void __indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
7779{
7780    struct glx_context * const gc = __glXGetCurrentContext();
7781    const GLuint cmdlen = 24;
7782emit_header(gc->pc, X_GLrop_RenderbufferStorageMultisample, cmdlen);
7783(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7784(void) memcpy((void *)(gc->pc + 8), (void *)(&samples), 4);
7785(void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
7786(void) memcpy((void *)(gc->pc + 16), (void *)(&width), 4);
7787(void) memcpy((void *)(gc->pc + 20), (void *)(&height), 4);
7788gc->pc += cmdlen;
7789if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7790}
7791
7792#define X_GLrop_SampleMaskSGIS 2048
7793void __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
7794{
7795    struct glx_context * const gc = __glXGetCurrentContext();
7796    const GLuint cmdlen = 12;
7797emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
7798(void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4);
7799(void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1);
7800gc->pc += cmdlen;
7801if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7802}
7803
7804#define X_GLrop_SamplePatternSGIS 2049
7805void __indirect_glSamplePatternSGIS(GLenum pattern)
7806{
7807    struct glx_context * const gc = __glXGetCurrentContext();
7808    const GLuint cmdlen = 8;
7809emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
7810(void) memcpy((void *)(gc->pc + 4), (void *)(&pattern), 4);
7811gc->pc += cmdlen;
7812if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7813}
7814
7815#define X_GLrop_SecondaryColor3fvEXT 4129
7816void __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
7817{
7818    struct glx_context * const gc = __glXGetCurrentContext();
7819    const GLuint cmdlen = 16;
7820emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
7821(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
7822(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
7823(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
7824gc->pc += cmdlen;
7825if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7826}
7827
7828#define X_GLrop_SecondaryColor3fvEXT 4129
7829void __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
7830{
7831    generic_12_byte( X_GLrop_SecondaryColor3fvEXT, v );
7832}
7833
7834#define X_GLrop_FogCoordfvEXT 4124
7835void __indirect_glFogCoordfEXT(GLfloat coord)
7836{
7837    struct glx_context * const gc = __glXGetCurrentContext();
7838    const GLuint cmdlen = 8;
7839emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
7840(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
7841gc->pc += cmdlen;
7842if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7843}
7844
7845#define X_GLrop_FogCoordfvEXT 4124
7846void __indirect_glFogCoordfvEXT(const GLfloat * coord)
7847{
7848    generic_4_byte( X_GLrop_FogCoordfvEXT, coord );
7849}
7850
7851#define X_GLvop_AreProgramsResidentNV 1293
7852GLboolean __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences)
7853{
7854    struct glx_context * const gc = __glXGetCurrentContext();
7855    Display * const dpy = gc->currentDpy;
7856    GLboolean retval = (GLboolean) 0;
7857    const GLuint cmdlen = 4 + safe_pad(safe_mul(n, 4));
7858    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
7859        __glXSetError(gc, GL_INVALID_VALUE);
7860        return 0;
7861    }
7862    if (n < 0) {
7863        __glXSetError(gc, GL_INVALID_VALUE);
7864        return 0;
7865    }
7866    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7867        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreProgramsResidentNV, cmdlen);
7868(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7869(void) memcpy((void *)(pc + 4), (void *)(ids), safe_mul(n, 4));
7870        retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
7871        UnlockDisplay(dpy); SyncHandle();
7872    }
7873    return retval;
7874}
7875
7876#define X_GLrop_ExecuteProgramNV 4181
7877void __indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params)
7878{
7879    struct glx_context * const gc = __glXGetCurrentContext();
7880    const GLuint cmdlen = 28;
7881emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
7882(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7883(void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
7884(void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
7885gc->pc += cmdlen;
7886if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7887}
7888
7889#define X_GLvop_GetProgramParameterdvNV 1297
7890void __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params)
7891{
7892    struct glx_context * const gc = __glXGetCurrentContext();
7893    Display * const dpy = gc->currentDpy;
7894    const GLuint cmdlen = 12;
7895    if (__builtin_expect(dpy != NULL, 1)) {
7896        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterdvNV, cmdlen);
7897(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7898(void) memcpy((void *)(pc + 4), (void *)(&index), 4);
7899(void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
7900        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
7901        UnlockDisplay(dpy); SyncHandle();
7902    }
7903    return;
7904}
7905
7906#define X_GLvop_GetProgramParameterfvNV 1296
7907void __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params)
7908{
7909    struct glx_context * const gc = __glXGetCurrentContext();
7910    Display * const dpy = gc->currentDpy;
7911    const GLuint cmdlen = 12;
7912    if (__builtin_expect(dpy != NULL, 1)) {
7913        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterfvNV, cmdlen);
7914(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7915(void) memcpy((void *)(pc + 4), (void *)(&index), 4);
7916(void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
7917        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7918        UnlockDisplay(dpy); SyncHandle();
7919    }
7920    return;
7921}
7922
7923#define X_GLvop_GetProgramStringNV 1299
7924void __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program)
7925{
7926    struct glx_context * const gc = __glXGetCurrentContext();
7927    Display * const dpy = gc->currentDpy;
7928    const GLuint cmdlen = 8;
7929    if (__builtin_expect(dpy != NULL, 1)) {
7930        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringNV, cmdlen);
7931(void) memcpy((void *)(pc + 0), (void *)(&id), 4);
7932(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7933        (void) __glXReadReply(dpy, 1, program, GL_TRUE);
7934        UnlockDisplay(dpy); SyncHandle();
7935    }
7936    return;
7937}
7938
7939#define X_GLvop_GetProgramivNV 1298
7940void __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
7941{
7942    struct glx_context * const gc = __glXGetCurrentContext();
7943    Display * const dpy = gc->currentDpy;
7944    const GLuint cmdlen = 8;
7945    if (__builtin_expect(dpy != NULL, 1)) {
7946        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivNV, cmdlen);
7947(void) memcpy((void *)(pc + 0), (void *)(&id), 4);
7948(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7949        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7950        UnlockDisplay(dpy); SyncHandle();
7951    }
7952    return;
7953}
7954
7955#define X_GLvop_GetTrackMatrixivNV 1300
7956void __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params)
7957{
7958    struct glx_context * const gc = __glXGetCurrentContext();
7959    Display * const dpy = gc->currentDpy;
7960    const GLuint cmdlen = 12;
7961    if (__builtin_expect(dpy != NULL, 1)) {
7962        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetTrackMatrixivNV, cmdlen);
7963(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7964(void) memcpy((void *)(pc + 4), (void *)(&address), 4);
7965(void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
7966        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7967        UnlockDisplay(dpy); SyncHandle();
7968    }
7969    return;
7970}
7971
7972#define X_GLvop_GetVertexAttribdvNV 1301
7973void __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params)
7974{
7975    struct glx_context * const gc = __glXGetCurrentContext();
7976    Display * const dpy = gc->currentDpy;
7977    const GLuint cmdlen = 8;
7978    if (__builtin_expect(dpy != NULL, 1)) {
7979        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribdvNV, cmdlen);
7980(void) memcpy((void *)(pc + 0), (void *)(&index), 4);
7981(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7982        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
7983        UnlockDisplay(dpy); SyncHandle();
7984    }
7985    return;
7986}
7987
7988#define X_GLvop_GetVertexAttribfvNV 1302
7989void __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
7990{
7991    struct glx_context * const gc = __glXGetCurrentContext();
7992    Display * const dpy = gc->currentDpy;
7993    const GLuint cmdlen = 8;
7994    if (__builtin_expect(dpy != NULL, 1)) {
7995        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribfvNV, cmdlen);
7996(void) memcpy((void *)(pc + 0), (void *)(&index), 4);
7997(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7998        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7999        UnlockDisplay(dpy); SyncHandle();
8000    }
8001    return;
8002}
8003
8004#define X_GLvop_GetVertexAttribivNV 1303
8005void __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
8006{
8007    struct glx_context * const gc = __glXGetCurrentContext();
8008    Display * const dpy = gc->currentDpy;
8009    const GLuint cmdlen = 8;
8010    if (__builtin_expect(dpy != NULL, 1)) {
8011        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribivNV, cmdlen);
8012(void) memcpy((void *)(pc + 0), (void *)(&index), 4);
8013(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
8014        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8015        UnlockDisplay(dpy); SyncHandle();
8016    }
8017    return;
8018}
8019
8020#define X_GLrop_LoadProgramNV 4183
8021void __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program)
8022{
8023    struct glx_context * const gc = __glXGetCurrentContext();
8024    const GLuint cmdlen = 16 + safe_pad(len);
8025    if (0 + safe_pad(len) < 0) {
8026        __glXSetError(gc, GL_INVALID_VALUE);
8027        return;
8028    }
8029    if (len < 0) {
8030        __glXSetError(gc, GL_INVALID_VALUE);
8031        return;
8032    }
8033    if (__builtin_expect(len >= 0, 1)) {
8034emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
8035(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8036(void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
8037(void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
8038(void) memcpy((void *)(gc->pc + 16), (void *)(program), len);
8039gc->pc += cmdlen;
8040if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8041    }
8042}
8043
8044#define X_GLrop_ProgramParameters4dvNV 4187
8045void __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLsizei num, const GLdouble * params)
8046{
8047    struct glx_context * const gc = __glXGetCurrentContext();
8048    const GLuint cmdlen = 16 + safe_pad(safe_mul(num, 32));
8049    if (0 + safe_pad(safe_mul(num, 32)) < 0) {
8050        __glXSetError(gc, GL_INVALID_VALUE);
8051        return;
8052    }
8053    if (num < 0) {
8054        __glXSetError(gc, GL_INVALID_VALUE);
8055        return;
8056    }
8057    if (__builtin_expect(num >= 0, 1)) {
8058emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
8059(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8060(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
8061(void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
8062(void) memcpy((void *)(gc->pc + 16), (void *)(params), safe_mul(num, 32));
8063gc->pc += cmdlen;
8064if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8065    }
8066}
8067
8068#define X_GLrop_ProgramParameters4fvNV 4186
8069void __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLsizei num, const GLfloat * params)
8070{
8071    struct glx_context * const gc = __glXGetCurrentContext();
8072    const GLuint cmdlen = 16 + safe_pad(safe_mul(num, 16));
8073    if (0 + safe_pad(safe_mul(num, 16)) < 0) {
8074        __glXSetError(gc, GL_INVALID_VALUE);
8075        return;
8076    }
8077    if (num < 0) {
8078        __glXSetError(gc, GL_INVALID_VALUE);
8079        return;
8080    }
8081    if (__builtin_expect(num >= 0, 1)) {
8082emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
8083(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8084(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
8085(void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
8086(void) memcpy((void *)(gc->pc + 16), (void *)(params), safe_mul(num, 16));
8087gc->pc += cmdlen;
8088if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8089    }
8090}
8091
8092#define X_GLrop_RequestResidentProgramsNV 4182
8093void __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
8094{
8095    struct glx_context * const gc = __glXGetCurrentContext();
8096    const GLuint cmdlen = 8 + safe_pad(safe_mul(n, 4));
8097    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
8098        __glXSetError(gc, GL_INVALID_VALUE);
8099        return;
8100    }
8101    if (n < 0) {
8102        __glXSetError(gc, GL_INVALID_VALUE);
8103        return;
8104    }
8105    if (__builtin_expect(n >= 0, 1)) {
8106emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
8107(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
8108(void) memcpy((void *)(gc->pc + 8), (void *)(ids), safe_mul(n, 4));
8109gc->pc += cmdlen;
8110if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8111    }
8112}
8113
8114#define X_GLrop_TrackMatrixNV 4188
8115void __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform)
8116{
8117    struct glx_context * const gc = __glXGetCurrentContext();
8118    const GLuint cmdlen = 20;
8119emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
8120(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8121(void) memcpy((void *)(gc->pc + 8), (void *)(&address), 4);
8122(void) memcpy((void *)(gc->pc + 12), (void *)(&matrix), 4);
8123(void) memcpy((void *)(gc->pc + 16), (void *)(&transform), 4);
8124gc->pc += cmdlen;
8125if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8126}
8127
8128#define X_GLrop_VertexAttrib1dvNV 4273
8129void __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
8130{
8131    struct glx_context * const gc = __glXGetCurrentContext();
8132    const GLuint cmdlen = 16;
8133emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
8134(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8135(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
8136gc->pc += cmdlen;
8137if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8138}
8139
8140#define X_GLrop_VertexAttrib1dvNV 4273
8141void __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
8142{
8143    struct glx_context * const gc = __glXGetCurrentContext();
8144    const GLuint cmdlen = 16;
8145emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
8146(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8147(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
8148gc->pc += cmdlen;
8149if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8150}
8151
8152#define X_GLrop_VertexAttrib1fvNV 4269
8153void __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
8154{
8155    struct glx_context * const gc = __glXGetCurrentContext();
8156    const GLuint cmdlen = 12;
8157emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
8158(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8159(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
8160gc->pc += cmdlen;
8161if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8162}
8163
8164#define X_GLrop_VertexAttrib1fvNV 4269
8165void __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
8166{
8167    struct glx_context * const gc = __glXGetCurrentContext();
8168    const GLuint cmdlen = 12;
8169emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
8170(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8171(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
8172gc->pc += cmdlen;
8173if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8174}
8175
8176#define X_GLrop_VertexAttrib1svNV 4265
8177void __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
8178{
8179    struct glx_context * const gc = __glXGetCurrentContext();
8180    const GLuint cmdlen = 12;
8181emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
8182(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8183(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
8184gc->pc += cmdlen;
8185if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8186}
8187
8188#define X_GLrop_VertexAttrib1svNV 4265
8189void __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
8190{
8191    struct glx_context * const gc = __glXGetCurrentContext();
8192    const GLuint cmdlen = 12;
8193emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
8194(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8195(void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
8196gc->pc += cmdlen;
8197if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8198}
8199
8200#define X_GLrop_VertexAttrib2dvNV 4274
8201void __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
8202{
8203    struct glx_context * const gc = __glXGetCurrentContext();
8204    const GLuint cmdlen = 24;
8205emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
8206(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8207(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
8208(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
8209gc->pc += cmdlen;
8210if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8211}
8212
8213#define X_GLrop_VertexAttrib2dvNV 4274
8214void __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
8215{
8216    struct glx_context * const gc = __glXGetCurrentContext();
8217    const GLuint cmdlen = 24;
8218emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
8219(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8220(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
8221gc->pc += cmdlen;
8222if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8223}
8224
8225#define X_GLrop_VertexAttrib2fvNV 4270
8226void __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
8227{
8228    struct glx_context * const gc = __glXGetCurrentContext();
8229    const GLuint cmdlen = 16;
8230emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
8231(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8232(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
8233(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
8234gc->pc += cmdlen;
8235if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8236}
8237
8238#define X_GLrop_VertexAttrib2fvNV 4270
8239void __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
8240{
8241    struct glx_context * const gc = __glXGetCurrentContext();
8242    const GLuint cmdlen = 16;
8243emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
8244(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8245(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
8246gc->pc += cmdlen;
8247if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8248}
8249
8250#define X_GLrop_VertexAttrib2svNV 4266
8251void __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
8252{
8253    struct glx_context * const gc = __glXGetCurrentContext();
8254    const GLuint cmdlen = 12;
8255emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
8256(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8257(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
8258(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
8259gc->pc += cmdlen;
8260if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8261}
8262
8263#define X_GLrop_VertexAttrib2svNV 4266
8264void __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
8265{
8266    struct glx_context * const gc = __glXGetCurrentContext();
8267    const GLuint cmdlen = 12;
8268emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
8269(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8270(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
8271gc->pc += cmdlen;
8272if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8273}
8274
8275#define X_GLrop_VertexAttrib3dvNV 4275
8276void __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
8277{
8278    struct glx_context * const gc = __glXGetCurrentContext();
8279    const GLuint cmdlen = 32;
8280emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
8281(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8282(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
8283(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
8284(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
8285gc->pc += cmdlen;
8286if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8287}
8288
8289#define X_GLrop_VertexAttrib3dvNV 4275
8290void __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
8291{
8292    struct glx_context * const gc = __glXGetCurrentContext();
8293    const GLuint cmdlen = 32;
8294emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
8295(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8296(void) memcpy((void *)(gc->pc + 8), (void *)(v), 24);
8297gc->pc += cmdlen;
8298if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8299}
8300
8301#define X_GLrop_VertexAttrib3fvNV 4271
8302void __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
8303{
8304    struct glx_context * const gc = __glXGetCurrentContext();
8305    const GLuint cmdlen = 20;
8306emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
8307(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8308(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
8309(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
8310(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
8311gc->pc += cmdlen;
8312if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8313}
8314
8315#define X_GLrop_VertexAttrib3fvNV 4271
8316void __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
8317{
8318    struct glx_context * const gc = __glXGetCurrentContext();
8319    const GLuint cmdlen = 20;
8320emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
8321(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8322(void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
8323gc->pc += cmdlen;
8324if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8325}
8326
8327#define X_GLrop_VertexAttrib3svNV 4267
8328void __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
8329{
8330    struct glx_context * const gc = __glXGetCurrentContext();
8331    const GLuint cmdlen = 16;
8332emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
8333(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8334(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
8335(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
8336(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
8337gc->pc += cmdlen;
8338if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8339}
8340
8341#define X_GLrop_VertexAttrib3svNV 4267
8342void __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
8343{
8344    struct glx_context * const gc = __glXGetCurrentContext();
8345    const GLuint cmdlen = 16;
8346emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
8347(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8348(void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
8349gc->pc += cmdlen;
8350if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8351}
8352
8353#define X_GLrop_VertexAttrib4dvNV 4276
8354void __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
8355{
8356    struct glx_context * const gc = __glXGetCurrentContext();
8357    const GLuint cmdlen = 40;
8358emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
8359(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8360(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
8361(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
8362(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
8363(void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8);
8364gc->pc += cmdlen;
8365if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8366}
8367
8368#define X_GLrop_VertexAttrib4dvNV 4276
8369void __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
8370{
8371    struct glx_context * const gc = __glXGetCurrentContext();
8372    const GLuint cmdlen = 40;
8373emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
8374(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8375(void) memcpy((void *)(gc->pc + 8), (void *)(v), 32);
8376gc->pc += cmdlen;
8377if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8378}
8379
8380#define X_GLrop_VertexAttrib4fvNV 4272
8381void __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
8382{
8383    struct glx_context * const gc = __glXGetCurrentContext();
8384    const GLuint cmdlen = 24;
8385emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
8386(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8387(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
8388(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
8389(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
8390(void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
8391gc->pc += cmdlen;
8392if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8393}
8394
8395#define X_GLrop_VertexAttrib4fvNV 4272
8396void __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
8397{
8398    struct glx_context * const gc = __glXGetCurrentContext();
8399    const GLuint cmdlen = 24;
8400emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
8401(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8402(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
8403gc->pc += cmdlen;
8404if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8405}
8406
8407#define X_GLrop_VertexAttrib4svNV 4268
8408void __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
8409{
8410    struct glx_context * const gc = __glXGetCurrentContext();
8411    const GLuint cmdlen = 16;
8412emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
8413(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8414(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
8415(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
8416(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
8417(void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
8418gc->pc += cmdlen;
8419if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8420}
8421
8422#define X_GLrop_VertexAttrib4svNV 4268
8423void __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
8424{
8425    struct glx_context * const gc = __glXGetCurrentContext();
8426    const GLuint cmdlen = 16;
8427emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
8428(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8429(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
8430gc->pc += cmdlen;
8431if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8432}
8433
8434#define X_GLrop_VertexAttrib4ubvNV 4277
8435void __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
8436{
8437    struct glx_context * const gc = __glXGetCurrentContext();
8438    const GLuint cmdlen = 12;
8439emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
8440(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8441(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
8442(void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
8443(void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
8444(void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
8445gc->pc += cmdlen;
8446if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8447}
8448
8449#define X_GLrop_VertexAttrib4ubvNV 4277
8450void __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v)
8451{
8452    struct glx_context * const gc = __glXGetCurrentContext();
8453    const GLuint cmdlen = 12;
8454emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
8455(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8456(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
8457gc->pc += cmdlen;
8458if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8459}
8460
8461#define X_GLrop_VertexAttribs1dvNV 4210
8462void __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
8463{
8464    struct glx_context * const gc = __glXGetCurrentContext();
8465    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 8));
8466    if (0 + safe_pad(safe_mul(n, 8)) < 0) {
8467        __glXSetError(gc, GL_INVALID_VALUE);
8468        return;
8469    }
8470    if (n < 0) {
8471        __glXSetError(gc, GL_INVALID_VALUE);
8472        return;
8473    }
8474    if (__builtin_expect(n >= 0, 1)) {
8475emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
8476(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8477(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8478(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 8));
8479gc->pc += cmdlen;
8480if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8481    }
8482}
8483
8484#define X_GLrop_VertexAttribs1fvNV 4206
8485void __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
8486{
8487    struct glx_context * const gc = __glXGetCurrentContext();
8488    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 4));
8489    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
8490        __glXSetError(gc, GL_INVALID_VALUE);
8491        return;
8492    }
8493    if (n < 0) {
8494        __glXSetError(gc, GL_INVALID_VALUE);
8495        return;
8496    }
8497    if (__builtin_expect(n >= 0, 1)) {
8498emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
8499(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8500(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8501(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 4));
8502gc->pc += cmdlen;
8503if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8504    }
8505}
8506
8507#define X_GLrop_VertexAttribs1svNV 4202
8508void __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
8509{
8510    struct glx_context * const gc = __glXGetCurrentContext();
8511    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 2));
8512    if (0 + safe_pad(safe_mul(n, 2)) < 0) {
8513        __glXSetError(gc, GL_INVALID_VALUE);
8514        return;
8515    }
8516    if (n < 0) {
8517        __glXSetError(gc, GL_INVALID_VALUE);
8518        return;
8519    }
8520    if (__builtin_expect(n >= 0, 1)) {
8521emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
8522(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8523(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8524(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 2));
8525gc->pc += cmdlen;
8526if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8527    }
8528}
8529
8530#define X_GLrop_VertexAttribs2dvNV 4211
8531void __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
8532{
8533    struct glx_context * const gc = __glXGetCurrentContext();
8534    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 16));
8535    if (0 + safe_pad(safe_mul(n, 16)) < 0) {
8536        __glXSetError(gc, GL_INVALID_VALUE);
8537        return;
8538    }
8539    if (n < 0) {
8540        __glXSetError(gc, GL_INVALID_VALUE);
8541        return;
8542    }
8543    if (__builtin_expect(n >= 0, 1)) {
8544emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
8545(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8546(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8547(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 16));
8548gc->pc += cmdlen;
8549if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8550    }
8551}
8552
8553#define X_GLrop_VertexAttribs2fvNV 4207
8554void __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
8555{
8556    struct glx_context * const gc = __glXGetCurrentContext();
8557    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 8));
8558    if (0 + safe_pad(safe_mul(n, 8)) < 0) {
8559        __glXSetError(gc, GL_INVALID_VALUE);
8560        return;
8561    }
8562    if (n < 0) {
8563        __glXSetError(gc, GL_INVALID_VALUE);
8564        return;
8565    }
8566    if (__builtin_expect(n >= 0, 1)) {
8567emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
8568(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8569(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8570(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 8));
8571gc->pc += cmdlen;
8572if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8573    }
8574}
8575
8576#define X_GLrop_VertexAttribs2svNV 4203
8577void __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
8578{
8579    struct glx_context * const gc = __glXGetCurrentContext();
8580    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 4));
8581    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
8582        __glXSetError(gc, GL_INVALID_VALUE);
8583        return;
8584    }
8585    if (n < 0) {
8586        __glXSetError(gc, GL_INVALID_VALUE);
8587        return;
8588    }
8589    if (__builtin_expect(n >= 0, 1)) {
8590emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
8591(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8592(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8593(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 4));
8594gc->pc += cmdlen;
8595if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8596    }
8597}
8598
8599#define X_GLrop_VertexAttribs3dvNV 4212
8600void __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
8601{
8602    struct glx_context * const gc = __glXGetCurrentContext();
8603    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 24));
8604    if (0 + safe_pad(safe_mul(n, 24)) < 0) {
8605        __glXSetError(gc, GL_INVALID_VALUE);
8606        return;
8607    }
8608    if (n < 0) {
8609        __glXSetError(gc, GL_INVALID_VALUE);
8610        return;
8611    }
8612    if (__builtin_expect(n >= 0, 1)) {
8613emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
8614(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8615(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8616(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 24));
8617gc->pc += cmdlen;
8618if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8619    }
8620}
8621
8622#define X_GLrop_VertexAttribs3fvNV 4208
8623void __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
8624{
8625    struct glx_context * const gc = __glXGetCurrentContext();
8626    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 12));
8627    if (0 + safe_pad(safe_mul(n, 12)) < 0) {
8628        __glXSetError(gc, GL_INVALID_VALUE);
8629        return;
8630    }
8631    if (n < 0) {
8632        __glXSetError(gc, GL_INVALID_VALUE);
8633        return;
8634    }
8635    if (__builtin_expect(n >= 0, 1)) {
8636emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
8637(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8638(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8639(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 12));
8640gc->pc += cmdlen;
8641if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8642    }
8643}
8644
8645#define X_GLrop_VertexAttribs3svNV 4204
8646void __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
8647{
8648    struct glx_context * const gc = __glXGetCurrentContext();
8649    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 6));
8650    if (0 + safe_pad(safe_mul(n, 6)) < 0) {
8651        __glXSetError(gc, GL_INVALID_VALUE);
8652        return;
8653    }
8654    if (n < 0) {
8655        __glXSetError(gc, GL_INVALID_VALUE);
8656        return;
8657    }
8658    if (__builtin_expect(n >= 0, 1)) {
8659emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
8660(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8661(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8662(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 6));
8663gc->pc += cmdlen;
8664if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8665    }
8666}
8667
8668#define X_GLrop_VertexAttribs4dvNV 4213
8669void __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
8670{
8671    struct glx_context * const gc = __glXGetCurrentContext();
8672    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 32));
8673    if (0 + safe_pad(safe_mul(n, 32)) < 0) {
8674        __glXSetError(gc, GL_INVALID_VALUE);
8675        return;
8676    }
8677    if (n < 0) {
8678        __glXSetError(gc, GL_INVALID_VALUE);
8679        return;
8680    }
8681    if (__builtin_expect(n >= 0, 1)) {
8682emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
8683(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8684(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8685(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 32));
8686gc->pc += cmdlen;
8687if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8688    }
8689}
8690
8691#define X_GLrop_VertexAttribs4fvNV 4209
8692void __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
8693{
8694    struct glx_context * const gc = __glXGetCurrentContext();
8695    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 16));
8696    if (0 + safe_pad(safe_mul(n, 16)) < 0) {
8697        __glXSetError(gc, GL_INVALID_VALUE);
8698        return;
8699    }
8700    if (n < 0) {
8701        __glXSetError(gc, GL_INVALID_VALUE);
8702        return;
8703    }
8704    if (__builtin_expect(n >= 0, 1)) {
8705emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
8706(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8707(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8708(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 16));
8709gc->pc += cmdlen;
8710if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8711    }
8712}
8713
8714#define X_GLrop_VertexAttribs4svNV 4205
8715void __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
8716{
8717    struct glx_context * const gc = __glXGetCurrentContext();
8718    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 8));
8719    if (0 + safe_pad(safe_mul(n, 8)) < 0) {
8720        __glXSetError(gc, GL_INVALID_VALUE);
8721        return;
8722    }
8723    if (n < 0) {
8724        __glXSetError(gc, GL_INVALID_VALUE);
8725        return;
8726    }
8727    if (__builtin_expect(n >= 0, 1)) {
8728emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
8729(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8730(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8731(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 8));
8732gc->pc += cmdlen;
8733if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8734    }
8735}
8736
8737#define X_GLrop_VertexAttribs4ubvNV 4214
8738void __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
8739{
8740    struct glx_context * const gc = __glXGetCurrentContext();
8741    const GLuint cmdlen = 12 + safe_pad(safe_mul(n, 4));
8742    if (0 + safe_pad(safe_mul(n, 4)) < 0) {
8743        __glXSetError(gc, GL_INVALID_VALUE);
8744        return;
8745    }
8746    if (n < 0) {
8747        __glXSetError(gc, GL_INVALID_VALUE);
8748        return;
8749    }
8750    if (__builtin_expect(n >= 0, 1)) {
8751emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
8752(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8753(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8754(void) memcpy((void *)(gc->pc + 12), (void *)(v), safe_mul(n, 4));
8755gc->pc += cmdlen;
8756if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8757    }
8758}
8759
8760#define X_GLrop_ActiveStencilFaceEXT 4220
8761void __indirect_glActiveStencilFaceEXT(GLenum face)
8762{
8763    struct glx_context * const gc = __glXGetCurrentContext();
8764    const GLuint cmdlen = 8;
8765emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
8766(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
8767gc->pc += cmdlen;
8768if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8769}
8770
8771#define X_GLvop_GetProgramNamedParameterdvNV 1311
8772void __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params)
8773{
8774    struct glx_context * const gc = __glXGetCurrentContext();
8775    Display * const dpy = gc->currentDpy;
8776    const GLuint cmdlen = 8 + safe_pad(len);
8777    if (0 + safe_pad(len) < 0) {
8778        __glXSetError(gc, GL_INVALID_VALUE);
8779        return;
8780    }
8781    if (len < 0) {
8782        __glXSetError(gc, GL_INVALID_VALUE);
8783        return;
8784    }
8785    if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
8786        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterdvNV, cmdlen);
8787(void) memcpy((void *)(pc + 0), (void *)(&id), 4);
8788(void) memcpy((void *)(pc + 4), (void *)(&len), 4);
8789(void) memcpy((void *)(pc + 8), (void *)(name), len);
8790        (void) __glXReadReply(dpy, 8, params, GL_TRUE);
8791        UnlockDisplay(dpy); SyncHandle();
8792    }
8793    return;
8794}
8795
8796#define X_GLvop_GetProgramNamedParameterfvNV 1310
8797void __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params)
8798{
8799    struct glx_context * const gc = __glXGetCurrentContext();
8800    Display * const dpy = gc->currentDpy;
8801    const GLuint cmdlen = 8 + safe_pad(len);
8802    if (0 + safe_pad(len) < 0) {
8803        __glXSetError(gc, GL_INVALID_VALUE);
8804        return;
8805    }
8806    if (len < 0) {
8807        __glXSetError(gc, GL_INVALID_VALUE);
8808        return;
8809    }
8810    if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
8811        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterfvNV, cmdlen);
8812(void) memcpy((void *)(pc + 0), (void *)(&id), 4);
8813(void) memcpy((void *)(pc + 4), (void *)(&len), 4);
8814(void) memcpy((void *)(pc + 8), (void *)(name), len);
8815        (void) __glXReadReply(dpy, 4, params, GL_TRUE);
8816        UnlockDisplay(dpy); SyncHandle();
8817    }
8818    return;
8819}
8820
8821#define X_GLrop_ProgramNamedParameter4dvNV 4219
8822void __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
8823{
8824    struct glx_context * const gc = __glXGetCurrentContext();
8825    const GLuint cmdlen = 44 + safe_pad(len);
8826    if (0 + safe_pad(len) < 0) {
8827        __glXSetError(gc, GL_INVALID_VALUE);
8828        return;
8829    }
8830    if (len < 0) {
8831        __glXSetError(gc, GL_INVALID_VALUE);
8832        return;
8833    }
8834    if (__builtin_expect(len >= 0, 1)) {
8835emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
8836(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
8837(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
8838(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
8839(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
8840(void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
8841(void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
8842(void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
8843gc->pc += cmdlen;
8844if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8845    }
8846}
8847
8848#define X_GLrop_ProgramNamedParameter4dvNV 4219
8849void __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v)
8850{
8851    struct glx_context * const gc = __glXGetCurrentContext();
8852    const GLuint cmdlen = 44 + safe_pad(len);
8853    if (0 + safe_pad(len) < 0) {
8854        __glXSetError(gc, GL_INVALID_VALUE);
8855        return;
8856    }
8857    if (len < 0) {
8858        __glXSetError(gc, GL_INVALID_VALUE);
8859        return;
8860    }
8861    if (__builtin_expect(len >= 0, 1)) {
8862emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
8863(void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
8864(void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
8865(void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
8866(void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
8867gc->pc += cmdlen;
8868if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8869    }
8870}
8871
8872#define X_GLrop_ProgramNamedParameter4fvNV 4218
8873void __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
8874{
8875    struct glx_context * const gc = __glXGetCurrentContext();
8876    const GLuint cmdlen = 28 + safe_pad(len);
8877    if (0 + safe_pad(len) < 0) {
8878        __glXSetError(gc, GL_INVALID_VALUE);
8879        return;
8880    }
8881    if (len < 0) {
8882        __glXSetError(gc, GL_INVALID_VALUE);
8883        return;
8884    }
8885    if (__builtin_expect(len >= 0, 1)) {
8886emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
8887(void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
8888(void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
8889(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
8890(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
8891(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
8892(void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
8893(void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
8894gc->pc += cmdlen;
8895if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8896    }
8897}
8898
8899#define X_GLrop_ProgramNamedParameter4fvNV 4218
8900void __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v)
8901{
8902    struct glx_context * const gc = __glXGetCurrentContext();
8903    const GLuint cmdlen = 28 + safe_pad(len);
8904    if (0 + safe_pad(len) < 0) {
8905        __glXSetError(gc, GL_INVALID_VALUE);
8906        return;
8907    }
8908    if (len < 0) {
8909        __glXSetError(gc, GL_INVALID_VALUE);
8910        return;
8911    }
8912    if (__builtin_expect(len >= 0, 1)) {
8913emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
8914(void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
8915(void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
8916(void) memcpy((void *)(gc->pc + 12), (void *)(v), 16);
8917(void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
8918gc->pc += cmdlen;
8919if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8920    }
8921}
8922
8923#define X_GLrop_BindFramebufferEXT 4319
8924void __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
8925{
8926    struct glx_context * const gc = __glXGetCurrentContext();
8927    const GLuint cmdlen = 12;
8928emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
8929(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8930(void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4);
8931gc->pc += cmdlen;
8932if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8933}
8934
8935#define X_GLrop_BindRenderbufferEXT 4316
8936void __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
8937{
8938    struct glx_context * const gc = __glXGetCurrentContext();
8939    const GLuint cmdlen = 12;
8940emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
8941(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8942(void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4);
8943gc->pc += cmdlen;
8944if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8945}
8946
8947
8948#ifdef GLX_INDIRECT_RENDERING
8949
8950static const struct proc_pair
8951{
8952   const char *name;
8953   _glapi_proc proc;
8954} proc_pairs[20] = {
8955   { "AreTexturesResidentEXT", (_glapi_proc) glAreTexturesResidentEXT },
8956   { "DeleteTexturesEXT", (_glapi_proc) glDeleteTexturesEXT },
8957   { "GenTexturesEXT", (_glapi_proc) glGenTexturesEXT },
8958   { "GetColorTableEXT", (_glapi_proc) gl_dispatch_stub_343 },
8959   { "GetColorTableParameterfvEXT", (_glapi_proc) gl_dispatch_stub_344 },
8960   { "GetColorTableParameterfvSGI", (_glapi_proc) gl_dispatch_stub_344 },
8961   { "GetColorTableParameterivEXT", (_glapi_proc) gl_dispatch_stub_345 },
8962   { "GetColorTableParameterivSGI", (_glapi_proc) gl_dispatch_stub_345 },
8963   { "GetColorTableSGI", (_glapi_proc) gl_dispatch_stub_343 },
8964   { "GetConvolutionFilterEXT", (_glapi_proc) gl_dispatch_stub_356 },
8965   { "GetConvolutionParameterfvEXT", (_glapi_proc) gl_dispatch_stub_357 },
8966   { "GetConvolutionParameterivEXT", (_glapi_proc) gl_dispatch_stub_358 },
8967   { "GetHistogramEXT", (_glapi_proc) gl_dispatch_stub_361 },
8968   { "GetHistogramParameterfvEXT", (_glapi_proc) gl_dispatch_stub_362 },
8969   { "GetHistogramParameterivEXT", (_glapi_proc) gl_dispatch_stub_363 },
8970   { "GetMinmaxEXT", (_glapi_proc) gl_dispatch_stub_364 },
8971   { "GetMinmaxParameterfvEXT", (_glapi_proc) gl_dispatch_stub_365 },
8972   { "GetMinmaxParameterivEXT", (_glapi_proc) gl_dispatch_stub_366 },
8973   { "GetSeparableFilterEXT", (_glapi_proc) gl_dispatch_stub_359 },
8974   { "IsTextureEXT", (_glapi_proc) glIsTextureEXT }
8975};
8976
8977static int
8978__indirect_get_proc_compare(const void *key, const void *memb)
8979{
8980   const struct proc_pair *pair = (const struct proc_pair *) memb;
8981   return strcmp((const char *) key, pair->name);
8982}
8983
8984_glapi_proc
8985__indirect_get_proc_address(const char *name)
8986{
8987   const struct proc_pair *pair;
8988
8989   /* skip "gl" */
8990   name += 2;
8991
8992   pair = (const struct proc_pair *) bsearch((const void *) name,
8993      (const void *) proc_pairs, ARRAY_SIZE(proc_pairs), sizeof(proc_pairs[0]),
8994      __indirect_get_proc_compare);
8995
8996   return (pair) ? pair->proc : NULL;
8997}
8998
8999#endif /* GLX_INDIRECT_RENDERING */
9000
9001
9002#  undef FASTCALL
9003#  undef NOINLINE
9004