~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/glx/x11/indirect.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-02-21 12:44:07 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20070221124407-rgcacs32mycrtadl
ImportĀ upstreamĀ versionĀ 6.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "indirect.h"
31
31
#include "glxclient.h"
32
32
#include "indirect_size.h"
 
33
#include "dispatch.h"
 
34
#include "glapi.h"
 
35
#include "glthread.h"
33
36
#include <GL/glxproto.h>
34
37
#ifdef USE_XCB
35
 
#include <X11/xcl.h>
36
 
#include <X11/XCB/xcb.h>
37
 
#include <X11/XCB/glx.h>
 
38
#include <X11/Xlib-xcb.h>
 
39
#include <xcb/xcb.h>
 
40
#include <xcb/glx.h>
38
41
#endif /* USE_XCB */
39
42
 
40
43
#define __GLX_PAD(n) (((n) + 3) & ~3)
63
66
         *((int *)(dest)) = temp.i; } while(0)
64
67
 
65
68
NOINLINE CARD32
66
 
__glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_array )
 
69
__glXReadReply(Display * dpy, size_t size, void *dest,
 
70
               GLboolean reply_is_always_array)
67
71
{
68
72
    xGLXSingleReply reply;
69
 
    
 
73
 
70
74
    (void) _XReply(dpy, (xReply *) & reply, 0, False);
71
75
    if (size != 0) {
72
76
        if ((reply.length > 0) || reply_is_always_array) {
73
 
            const GLint bytes = (reply_is_always_array) 
74
 
              ? (4 * reply.length) : (reply.size * size);
 
77
            const GLint bytes = (reply_is_always_array)
 
78
                ? (4 * reply.length) : (reply.size * size);
75
79
            const GLint extra = 4 - (bytes & 3);
76
80
 
77
81
            _XRead(dpy, dest, bytes);
78
 
            if ( extra < 4 ) {
 
82
            if (extra < 4) {
79
83
                _XEatData(dpy, extra);
80
84
            }
81
 
        }
82
 
        else {
83
 
            (void) memcpy( dest, &(reply.pad3), size);
 
85
        } else {
 
86
            (void) memcpy(dest, &(reply.pad3), size);
84
87
        }
85
88
    }
86
89
 
88
91
}
89
92
 
90
93
NOINLINE void
91
 
__glXReadPixelReply( Display *dpy, __GLXcontext * gc, unsigned max_dim,
92
 
    GLint width, GLint height, GLint depth, GLenum format, GLenum type,
93
 
    void * dest, GLboolean dimensions_in_reply )
 
94
__glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim,
 
95
                    GLint width, GLint height, GLint depth, GLenum format,
 
96
                    GLenum type, void *dest, GLboolean dimensions_in_reply)
94
97
{
95
98
    xGLXSingleReply reply;
96
99
    GLint size;
97
 
    
 
100
 
98
101
    (void) _XReply(dpy, (xReply *) & reply, 0, False);
99
102
 
100
 
    if ( dimensions_in_reply ) {
101
 
        width  = reply.pad3;
 
103
    if (dimensions_in_reply) {
 
104
        width = reply.pad3;
102
105
        height = reply.pad4;
103
 
        depth  = reply.pad5;
104
 
        
105
 
        if ((height == 0) || (max_dim < 2)) { height = 1; }
106
 
        if ((depth  == 0) || (max_dim < 3)) { depth  = 1; }
 
106
        depth = reply.pad5;
 
107
 
 
108
        if ((height == 0) || (max_dim < 2)) {
 
109
            height = 1;
 
110
        }
 
111
        if ((depth == 0) || (max_dim < 3)) {
 
112
            depth = 1;
 
113
        }
107
114
    }
108
115
 
109
116
    size = reply.length * 4;
110
117
    if (size != 0) {
111
 
        void * buf = Xmalloc( size );
 
118
        void *buf = Xmalloc(size);
112
119
 
113
 
        if ( buf == NULL ) {
 
120
        if (buf == NULL) {
114
121
            _XEatData(dpy, size);
115
122
            __glXSetError(gc, GL_OUT_OF_MEMORY);
116
 
        }
117
 
        else {
 
123
        } else {
118
124
            const GLint extra = 4 - (size & 3);
119
125
 
120
126
            _XRead(dpy, buf, size);
121
 
            if ( extra < 4 ) {
 
127
            if (extra < 4) {
122
128
                _XEatData(dpy, extra);
123
129
            }
124
130
 
132
138
#define X_GLXSingle 0
133
139
 
134
140
NOINLINE FASTCALL GLubyte *
135
 
__glXSetupSingleRequest( __GLXcontext * gc, GLint sop, GLint cmdlen )
 
141
__glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
136
142
{
137
 
    xGLXSingleReq * req;
138
 
    Display * const dpy = gc->currentDpy;
 
143
    xGLXSingleReq *req;
 
144
    Display *const dpy = gc->currentDpy;
139
145
 
140
146
    (void) __glXFlushRenderBuffer(gc, gc->pc);
141
147
    LockDisplay(dpy);
143
149
    req->reqType = gc->majorOpcode;
144
150
    req->contextTag = gc->currentContextTag;
145
151
    req->glxCode = sop;
146
 
    return (GLubyte *)(req) + sz_xGLXSingleReq;
 
152
    return (GLubyte *) (req) + sz_xGLXSingleReq;
147
153
}
148
154
 
149
155
NOINLINE FASTCALL GLubyte *
150
 
__glXSetupVendorRequest( __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen )
 
156
__glXSetupVendorRequest(__GLXcontext * gc, GLint code, GLint vop,
 
157
                        GLint cmdlen)
151
158
{
152
 
    xGLXVendorPrivateReq * req;
153
 
    Display * const dpy = gc->currentDpy;
 
159
    xGLXVendorPrivateReq *req;
 
160
    Display *const dpy = gc->currentDpy;
154
161
 
155
162
    (void) __glXFlushRenderBuffer(gc, gc->pc);
156
163
    LockDisplay(dpy);
159
166
    req->glxCode = code;
160
167
    req->vendorCode = vop;
161
168
    req->contextTag = gc->currentContextTag;
162
 
    return (GLubyte *)(req) + sz_xGLXVendorPrivateReq;
 
169
    return (GLubyte *) (req) + sz_xGLXVendorPrivateReq;
163
170
}
164
171
 
165
172
const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
176
183
#define default_pixel_store_4D_size 36
177
184
 
178
185
static FASTCALL NOINLINE void
179
 
generic_3_byte( GLint rop, const void * ptr )
180
 
{
181
 
    __GLXcontext * const gc = __glXGetCurrentContext();
182
 
    const GLuint cmdlen = 8;
183
 
 
184
 
    emit_header(gc->pc, rop, cmdlen);
185
 
    (void) memcpy((void *)(gc->pc + 4), ptr, 4);
186
 
    gc->pc += cmdlen;
187
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
188
 
}
189
 
 
190
 
static FASTCALL NOINLINE void
191
 
generic_4_byte( GLint rop, const void * ptr )
192
 
{
193
 
    __GLXcontext * const gc = __glXGetCurrentContext();
194
 
    const GLuint cmdlen = 8;
195
 
 
196
 
    emit_header(gc->pc, rop, cmdlen);
197
 
    (void) memcpy((void *)(gc->pc + 4), ptr, 4);
198
 
    gc->pc += cmdlen;
199
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
200
 
}
201
 
 
202
 
static FASTCALL NOINLINE void
203
 
generic_6_byte( GLint rop, const void * ptr )
204
 
{
205
 
    __GLXcontext * const gc = __glXGetCurrentContext();
206
 
    const GLuint cmdlen = 12;
207
 
 
208
 
    emit_header(gc->pc, rop, cmdlen);
209
 
    (void) memcpy((void *)(gc->pc + 4), ptr, 8);
210
 
    gc->pc += cmdlen;
211
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
212
 
}
213
 
 
214
 
static FASTCALL NOINLINE void
215
 
generic_8_byte( GLint rop, const void * ptr )
216
 
{
217
 
    __GLXcontext * const gc = __glXGetCurrentContext();
218
 
    const GLuint cmdlen = 12;
219
 
 
220
 
    emit_header(gc->pc, rop, cmdlen);
221
 
    (void) memcpy((void *)(gc->pc + 4), ptr, 8);
222
 
    gc->pc += cmdlen;
223
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
224
 
}
225
 
 
226
 
static FASTCALL NOINLINE void
227
 
generic_12_byte( GLint rop, const void * ptr )
228
 
{
229
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
186
generic_3_byte(GLint rop, const void *ptr)
 
187
{
 
188
    __GLXcontext *const gc = __glXGetCurrentContext();
 
189
    const GLuint cmdlen = 8;
 
190
 
 
191
    emit_header(gc->pc, rop, cmdlen);
 
192
    (void) memcpy((void *) (gc->pc + 4), ptr, 4);
 
193
    gc->pc += cmdlen;
 
194
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
195
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
196
    }
 
197
}
 
198
 
 
199
static FASTCALL NOINLINE void
 
200
generic_4_byte(GLint rop, const void *ptr)
 
201
{
 
202
    __GLXcontext *const gc = __glXGetCurrentContext();
 
203
    const GLuint cmdlen = 8;
 
204
 
 
205
    emit_header(gc->pc, rop, cmdlen);
 
206
    (void) memcpy((void *) (gc->pc + 4), ptr, 4);
 
207
    gc->pc += cmdlen;
 
208
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
209
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
210
    }
 
211
}
 
212
 
 
213
static FASTCALL NOINLINE void
 
214
generic_6_byte(GLint rop, const void *ptr)
 
215
{
 
216
    __GLXcontext *const gc = __glXGetCurrentContext();
 
217
    const GLuint cmdlen = 12;
 
218
 
 
219
    emit_header(gc->pc, rop, cmdlen);
 
220
    (void) memcpy((void *) (gc->pc + 4), ptr, 8);
 
221
    gc->pc += cmdlen;
 
222
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
223
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
224
    }
 
225
}
 
226
 
 
227
static FASTCALL NOINLINE void
 
228
generic_8_byte(GLint rop, const void *ptr)
 
229
{
 
230
    __GLXcontext *const gc = __glXGetCurrentContext();
 
231
    const GLuint cmdlen = 12;
 
232
 
 
233
    emit_header(gc->pc, rop, cmdlen);
 
234
    (void) memcpy((void *) (gc->pc + 4), ptr, 8);
 
235
    gc->pc += cmdlen;
 
236
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
237
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
238
    }
 
239
}
 
240
 
 
241
static FASTCALL NOINLINE void
 
242
generic_12_byte(GLint rop, const void *ptr)
 
243
{
 
244
    __GLXcontext *const gc = __glXGetCurrentContext();
230
245
    const GLuint cmdlen = 16;
231
246
 
232
247
    emit_header(gc->pc, rop, cmdlen);
233
 
    (void) memcpy((void *)(gc->pc + 4), ptr, 12);
 
248
    (void) memcpy((void *) (gc->pc + 4), ptr, 12);
234
249
    gc->pc += cmdlen;
235
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
250
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
251
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
252
    }
236
253
}
237
254
 
238
255
static FASTCALL NOINLINE void
239
 
generic_16_byte( GLint rop, const void * ptr )
 
256
generic_16_byte(GLint rop, const void *ptr)
240
257
{
241
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
258
    __GLXcontext *const gc = __glXGetCurrentContext();
242
259
    const GLuint cmdlen = 20;
243
260
 
244
261
    emit_header(gc->pc, rop, cmdlen);
245
 
    (void) memcpy((void *)(gc->pc + 4), ptr, 16);
 
262
    (void) memcpy((void *) (gc->pc + 4), ptr, 16);
246
263
    gc->pc += cmdlen;
247
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
264
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
265
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
266
    }
248
267
}
249
268
 
250
269
static FASTCALL NOINLINE void
251
 
generic_24_byte( GLint rop, const void * ptr )
 
270
generic_24_byte(GLint rop, const void *ptr)
252
271
{
253
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
272
    __GLXcontext *const gc = __glXGetCurrentContext();
254
273
    const GLuint cmdlen = 28;
255
274
 
256
275
    emit_header(gc->pc, rop, cmdlen);
257
 
    (void) memcpy((void *)(gc->pc + 4), ptr, 24);
 
276
    (void) memcpy((void *) (gc->pc + 4), ptr, 24);
258
277
    gc->pc += cmdlen;
259
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
278
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
279
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
280
    }
260
281
}
261
282
 
262
283
static FASTCALL NOINLINE void
263
 
generic_32_byte( GLint rop, const void * ptr )
 
284
generic_32_byte(GLint rop, const void *ptr)
264
285
{
265
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
286
    __GLXcontext *const gc = __glXGetCurrentContext();
266
287
    const GLuint cmdlen = 36;
267
288
 
268
289
    emit_header(gc->pc, rop, cmdlen);
269
 
    (void) memcpy((void *)(gc->pc + 4), ptr, 32);
 
290
    (void) memcpy((void *) (gc->pc + 4), ptr, 32);
270
291
    gc->pc += cmdlen;
271
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
292
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
293
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
294
    }
272
295
}
273
296
 
274
297
#define X_GLsop_NewList 101
275
298
void
276
299
__indirect_glNewList(GLuint list, GLenum mode)
277
300
{
278
 
    __GLXcontext * const gc = __glXGetCurrentContext();
279
 
    Display * const dpy = gc->currentDpy;
 
301
    __GLXcontext *const gc = __glXGetCurrentContext();
 
302
    Display *const dpy = gc->currentDpy;
280
303
    const GLuint cmdlen = 8;
281
304
    if (__builtin_expect(dpy != NULL, 1)) {
282
305
#ifdef USE_XCB
283
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
306
        xcb_connection_t *c = XGetXCBConnection(dpy);
284
307
        (void) __glXFlushRenderBuffer(gc, gc->pc);
285
 
        XCBGlxNewList(c, gc->currentContextTag, list, mode);
 
308
        xcb_glx_new_list(c, gc->currentContextTag, list, mode);
286
309
#else
287
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
288
 
        (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
289
 
        (void) memcpy((void *)(pc + 4), (void *)(&mode), 4);
290
 
        UnlockDisplay(dpy); SyncHandle();
 
310
        GLubyte const *pc =
 
311
            __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
 
312
        (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
 
313
        (void) memcpy((void *) (pc + 4), (void *) (&mode), 4);
 
314
        UnlockDisplay(dpy);
 
315
        SyncHandle();
291
316
#endif /* USE_XCB */
292
317
    }
293
318
    return;
297
322
void
298
323
__indirect_glEndList(void)
299
324
{
300
 
    __GLXcontext * const gc = __glXGetCurrentContext();
301
 
    Display * const dpy = gc->currentDpy;
 
325
    __GLXcontext *const gc = __glXGetCurrentContext();
 
326
    Display *const dpy = gc->currentDpy;
302
327
    const GLuint cmdlen = 0;
303
328
    if (__builtin_expect(dpy != NULL, 1)) {
304
329
#ifdef USE_XCB
305
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
330
        xcb_connection_t *c = XGetXCBConnection(dpy);
306
331
        (void) __glXFlushRenderBuffer(gc, gc->pc);
307
 
        XCBGlxEndList(c, gc->currentContextTag);
 
332
        xcb_glx_end_list(c, gc->currentContextTag);
308
333
#else
309
334
        (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
310
 
        UnlockDisplay(dpy); SyncHandle();
 
335
        UnlockDisplay(dpy);
 
336
        SyncHandle();
311
337
#endif /* USE_XCB */
312
338
    }
313
339
    return;
317
343
void
318
344
__indirect_glCallList(GLuint list)
319
345
{
320
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
346
    __GLXcontext *const gc = __glXGetCurrentContext();
321
347
    const GLuint cmdlen = 8;
322
348
    emit_header(gc->pc, X_GLrop_CallList, cmdlen);
323
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&list), 4);
 
349
    (void) memcpy((void *) (gc->pc + 4), (void *) (&list), 4);
324
350
    gc->pc += cmdlen;
325
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
351
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
352
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
353
    }
326
354
}
327
355
 
328
356
#define X_GLrop_CallLists 2
329
357
void
330
358
__indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
331
359
{
332
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
360
    __GLXcontext *const gc = __glXGetCurrentContext();
333
361
    const GLuint compsize = __glCallLists_size(type);
334
362
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
335
363
    if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
336
364
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
337
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
365
            if ((gc->pc + cmdlen) > gc->bufEnd) {
338
366
                (void) __glXFlushRenderBuffer(gc, gc->pc);
339
367
            }
340
368
            emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
341
 
            (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
342
 
            (void) memcpy((void *)(gc->pc + 8), (void *)(&type), 4);
343
 
            (void) memcpy((void *)(gc->pc + 12), (void *)(lists), (compsize * n));
 
369
            (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
 
370
            (void) memcpy((void *) (gc->pc + 8), (void *) (&type), 4);
 
371
            (void) memcpy((void *) (gc->pc + 12), (void *) (lists),
 
372
                          (compsize * n));
344
373
            gc->pc += cmdlen;
345
 
            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
346
 
        }
347
 
        else {
 
374
            if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
375
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
376
            }
 
377
        } else {
348
378
            const GLint op = X_GLrop_CallLists;
349
379
            const GLuint cmdlenLarge = cmdlen + 4;
350
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
351
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
352
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
353
 
            (void) memcpy((void *)(pc + 8), (void *)(&n), 4);
354
 
            (void) memcpy((void *)(pc + 12), (void *)(&type), 4);
 
380
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
381
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
382
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
383
            (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
 
384
            (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
355
385
            __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
356
386
        }
357
387
    }
361
391
void
362
392
__indirect_glDeleteLists(GLuint list, GLsizei range)
363
393
{
364
 
    __GLXcontext * const gc = __glXGetCurrentContext();
365
 
    Display * const dpy = gc->currentDpy;
 
394
    __GLXcontext *const gc = __glXGetCurrentContext();
 
395
    Display *const dpy = gc->currentDpy;
366
396
    const GLuint cmdlen = 8;
367
397
    if (__builtin_expect(dpy != NULL, 1)) {
368
398
#ifdef USE_XCB
369
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
399
        xcb_connection_t *c = XGetXCBConnection(dpy);
370
400
        (void) __glXFlushRenderBuffer(gc, gc->pc);
371
 
        XCBGlxDeleteLists(c, gc->currentContextTag, list, range);
 
401
        xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
372
402
#else
373
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
374
 
        (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
375
 
        (void) memcpy((void *)(pc + 4), (void *)(&range), 4);
376
 
        UnlockDisplay(dpy); SyncHandle();
 
403
        GLubyte const *pc =
 
404
            __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
 
405
        (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
 
406
        (void) memcpy((void *) (pc + 4), (void *) (&range), 4);
 
407
        UnlockDisplay(dpy);
 
408
        SyncHandle();
377
409
#endif /* USE_XCB */
378
410
    }
379
411
    return;
383
415
GLuint
384
416
__indirect_glGenLists(GLsizei range)
385
417
{
386
 
    __GLXcontext * const gc = __glXGetCurrentContext();
387
 
    Display * const dpy = gc->currentDpy;
 
418
    __GLXcontext *const gc = __glXGetCurrentContext();
 
419
    Display *const dpy = gc->currentDpy;
388
420
    GLuint retval = (GLuint) 0;
389
421
    const GLuint cmdlen = 4;
390
422
    if (__builtin_expect(dpy != NULL, 1)) {
391
423
#ifdef USE_XCB
392
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
424
        xcb_connection_t *c = XGetXCBConnection(dpy);
393
425
        (void) __glXFlushRenderBuffer(gc, gc->pc);
394
 
        XCBGlxGenListsRep *reply = XCBGlxGenListsReply(c, XCBGlxGenLists(c, gc->currentContextTag, range), NULL);
 
426
        xcb_glx_gen_lists_reply_t *reply =
 
427
            xcb_glx_gen_lists_reply(c,
 
428
                                    xcb_glx_gen_lists(c,
 
429
                                                      gc->currentContextTag,
 
430
                                                      range), NULL);
395
431
        retval = reply->ret_val;
396
432
        free(reply);
397
433
#else
398
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
399
 
        (void) memcpy((void *)(pc + 0), (void *)(&range), 4);
 
434
        GLubyte const *pc =
 
435
            __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
 
436
        (void) memcpy((void *) (pc + 0), (void *) (&range), 4);
400
437
        retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
401
 
        UnlockDisplay(dpy); SyncHandle();
 
438
        UnlockDisplay(dpy);
 
439
        SyncHandle();
402
440
#endif /* USE_XCB */
403
441
    }
404
442
    return retval;
408
446
void
409
447
__indirect_glListBase(GLuint base)
410
448
{
411
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
449
    __GLXcontext *const gc = __glXGetCurrentContext();
412
450
    const GLuint cmdlen = 8;
413
451
    emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
414
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&base), 4);
 
452
    (void) memcpy((void *) (gc->pc + 4), (void *) (&base), 4);
415
453
    gc->pc += cmdlen;
416
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
454
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
455
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
456
    }
417
457
}
418
458
 
419
459
#define X_GLrop_Begin 4
420
460
void
421
461
__indirect_glBegin(GLenum mode)
422
462
{
423
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
463
    __GLXcontext *const gc = __glXGetCurrentContext();
424
464
    const GLuint cmdlen = 8;
425
465
    emit_header(gc->pc, X_GLrop_Begin, cmdlen);
426
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
 
466
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
427
467
    gc->pc += cmdlen;
428
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
468
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
469
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
470
    }
429
471
}
430
472
 
431
473
#define X_GLrop_Bitmap 5
432
474
void
433
 
__indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap)
 
475
__indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
 
476
                    GLfloat yorig, GLfloat xmove, GLfloat ymove,
 
477
                    const GLubyte * bitmap)
434
478
{
435
 
    __GLXcontext * const gc = __glXGetCurrentContext();
436
 
    const GLuint compsize = (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
 
479
    __GLXcontext *const gc = __glXGetCurrentContext();
 
480
    const GLuint compsize =
 
481
        (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX,
 
482
                                         GL_BITMAP, 0) : 0;
437
483
    const GLuint cmdlen = 48 + __GLX_PAD(compsize);
438
484
    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
439
485
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
440
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
486
            if ((gc->pc + cmdlen) > gc->bufEnd) {
441
487
                (void) __glXFlushRenderBuffer(gc, gc->pc);
442
488
            }
443
489
            emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
444
 
            (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
445
 
            (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
446
 
            (void) memcpy((void *)(gc->pc + 32), (void *)(&xorig), 4);
447
 
            (void) memcpy((void *)(gc->pc + 36), (void *)(&yorig), 4);
448
 
            (void) memcpy((void *)(gc->pc + 40), (void *)(&xmove), 4);
449
 
            (void) memcpy((void *)(gc->pc + 44), (void *)(&ymove), 4);
 
490
            (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
 
491
            (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
 
492
            (void) memcpy((void *) (gc->pc + 32), (void *) (&xorig), 4);
 
493
            (void) memcpy((void *) (gc->pc + 36), (void *) (&yorig), 4);
 
494
            (void) memcpy((void *) (gc->pc + 40), (void *) (&xmove), 4);
 
495
            (void) memcpy((void *) (gc->pc + 44), (void *) (&ymove), 4);
450
496
            if (compsize > 0) {
451
 
                (*gc->fillImage)(gc, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
452
 
            }
453
 
            else {
454
 
                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
 
497
                (*gc->fillImage) (gc, 2, width, height, 1, GL_COLOR_INDEX,
 
498
                                  GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
 
499
            } else {
 
500
                (void) memcpy(gc->pc + 4, default_pixel_store_2D,
 
501
                              default_pixel_store_2D_size);
455
502
            }
456
503
            gc->pc += cmdlen;
457
 
            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
458
 
        }
459
 
        else {
 
504
            if (gc->pc > gc->limit) {
 
505
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
506
            }
 
507
        } else {
460
508
            const GLint op = X_GLrop_Bitmap;
461
509
            const GLuint cmdlenLarge = cmdlen + 4;
462
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
463
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
464
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
465
 
            (void) memcpy((void *)(pc + 28), (void *)(&width), 4);
466
 
            (void) memcpy((void *)(pc + 32), (void *)(&height), 4);
467
 
            (void) memcpy((void *)(pc + 36), (void *)(&xorig), 4);
468
 
            (void) memcpy((void *)(pc + 40), (void *)(&yorig), 4);
469
 
            (void) memcpy((void *)(pc + 44), (void *)(&xmove), 4);
470
 
            (void) memcpy((void *)(pc + 48), (void *)(&ymove), 4);
471
 
            __glXSendLargeImage(gc, compsize, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52, pc + 8);
 
510
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
511
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
512
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
513
            (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
 
514
            (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
 
515
            (void) memcpy((void *) (pc + 36), (void *) (&xorig), 4);
 
516
            (void) memcpy((void *) (pc + 40), (void *) (&yorig), 4);
 
517
            (void) memcpy((void *) (pc + 44), (void *) (&xmove), 4);
 
518
            (void) memcpy((void *) (pc + 48), (void *) (&ymove), 4);
 
519
            __glXSendLargeImage(gc, compsize, 2, width, height, 1,
 
520
                                GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52,
 
521
                                pc + 8);
472
522
        }
473
523
    }
474
524
}
477
527
void
478
528
__indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
479
529
{
480
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
530
    __GLXcontext *const gc = __glXGetCurrentContext();
481
531
    const GLuint cmdlen = 8;
482
532
    emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
483
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
484
 
    (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
485
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
 
533
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
 
534
    (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
 
535
    (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
486
536
    gc->pc += cmdlen;
487
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
537
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
538
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
539
    }
488
540
}
489
541
 
490
542
#define X_GLrop_Color3bv 6
491
543
void
492
544
__indirect_glColor3bv(const GLbyte * v)
493
545
{
494
 
    generic_3_byte( X_GLrop_Color3bv, v );
 
546
    generic_3_byte(X_GLrop_Color3bv, v);
495
547
}
496
548
 
497
549
#define X_GLrop_Color3dv 7
498
550
void
499
551
__indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
500
552
{
501
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
553
    __GLXcontext *const gc = __glXGetCurrentContext();
502
554
    const GLuint cmdlen = 28;
503
555
    emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
504
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
505
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
506
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
 
556
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
 
557
    (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
 
558
    (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
507
559
    gc->pc += cmdlen;
508
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
560
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
561
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
562
    }
509
563
}
510
564
 
511
565
#define X_GLrop_Color3dv 7
512
566
void
513
567
__indirect_glColor3dv(const GLdouble * v)
514
568
{
515
 
    generic_24_byte( X_GLrop_Color3dv, v );
 
569
    generic_24_byte(X_GLrop_Color3dv, v);
516
570
}
517
571
 
518
572
#define X_GLrop_Color3fv 8
519
573
void
520
574
__indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
521
575
{
522
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
576
    __GLXcontext *const gc = __glXGetCurrentContext();
523
577
    const GLuint cmdlen = 16;
524
578
    emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
525
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
526
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
527
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
 
579
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
580
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
581
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
528
582
    gc->pc += cmdlen;
529
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
583
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
584
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
585
    }
530
586
}
531
587
 
532
588
#define X_GLrop_Color3fv 8
533
589
void
534
590
__indirect_glColor3fv(const GLfloat * v)
535
591
{
536
 
    generic_12_byte( X_GLrop_Color3fv, v );
 
592
    generic_12_byte(X_GLrop_Color3fv, v);
537
593
}
538
594
 
539
595
#define X_GLrop_Color3iv 9
540
596
void
541
597
__indirect_glColor3i(GLint red, GLint green, GLint blue)
542
598
{
543
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
599
    __GLXcontext *const gc = __glXGetCurrentContext();
544
600
    const GLuint cmdlen = 16;
545
601
    emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
546
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
547
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
548
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
 
602
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
603
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
604
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
549
605
    gc->pc += cmdlen;
550
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
606
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
607
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
608
    }
551
609
}
552
610
 
553
611
#define X_GLrop_Color3iv 9
554
612
void
555
613
__indirect_glColor3iv(const GLint * v)
556
614
{
557
 
    generic_12_byte( X_GLrop_Color3iv, v );
 
615
    generic_12_byte(X_GLrop_Color3iv, v);
558
616
}
559
617
 
560
618
#define X_GLrop_Color3sv 10
561
619
void
562
620
__indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
563
621
{
564
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
622
    __GLXcontext *const gc = __glXGetCurrentContext();
565
623
    const GLuint cmdlen = 12;
566
624
    emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
567
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
568
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
569
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
 
625
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
 
626
    (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
 
627
    (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
570
628
    gc->pc += cmdlen;
571
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
629
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
630
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
631
    }
572
632
}
573
633
 
574
634
#define X_GLrop_Color3sv 10
575
635
void
576
636
__indirect_glColor3sv(const GLshort * v)
577
637
{
578
 
    generic_6_byte( X_GLrop_Color3sv, v );
 
638
    generic_6_byte(X_GLrop_Color3sv, v);
579
639
}
580
640
 
581
641
#define X_GLrop_Color3ubv 11
582
642
void
583
643
__indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
584
644
{
585
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
645
    __GLXcontext *const gc = __glXGetCurrentContext();
586
646
    const GLuint cmdlen = 8;
587
647
    emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
588
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
589
 
    (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
590
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
 
648
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
 
649
    (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
 
650
    (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
591
651
    gc->pc += cmdlen;
592
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
652
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
653
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
654
    }
593
655
}
594
656
 
595
657
#define X_GLrop_Color3ubv 11
596
658
void
597
659
__indirect_glColor3ubv(const GLubyte * v)
598
660
{
599
 
    generic_3_byte( X_GLrop_Color3ubv, v );
 
661
    generic_3_byte(X_GLrop_Color3ubv, v);
600
662
}
601
663
 
602
664
#define X_GLrop_Color3uiv 12
603
665
void
604
666
__indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
605
667
{
606
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
668
    __GLXcontext *const gc = __glXGetCurrentContext();
607
669
    const GLuint cmdlen = 16;
608
670
    emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
609
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
610
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
611
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
 
671
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
672
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
673
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
612
674
    gc->pc += cmdlen;
613
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
675
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
676
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
677
    }
614
678
}
615
679
 
616
680
#define X_GLrop_Color3uiv 12
617
681
void
618
682
__indirect_glColor3uiv(const GLuint * v)
619
683
{
620
 
    generic_12_byte( X_GLrop_Color3uiv, v );
 
684
    generic_12_byte(X_GLrop_Color3uiv, v);
621
685
}
622
686
 
623
687
#define X_GLrop_Color3usv 13
624
688
void
625
689
__indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
626
690
{
627
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
691
    __GLXcontext *const gc = __glXGetCurrentContext();
628
692
    const GLuint cmdlen = 12;
629
693
    emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
630
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
631
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
632
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
 
694
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
 
695
    (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
 
696
    (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
633
697
    gc->pc += cmdlen;
634
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
698
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
699
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
700
    }
635
701
}
636
702
 
637
703
#define X_GLrop_Color3usv 13
638
704
void
639
705
__indirect_glColor3usv(const GLushort * v)
640
706
{
641
 
    generic_6_byte( X_GLrop_Color3usv, v );
 
707
    generic_6_byte(X_GLrop_Color3usv, v);
642
708
}
643
709
 
644
710
#define X_GLrop_Color4bv 14
645
711
void
646
712
__indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
647
713
{
648
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
714
    __GLXcontext *const gc = __glXGetCurrentContext();
649
715
    const GLuint cmdlen = 8;
650
716
    emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
651
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
652
 
    (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
653
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
654
 
    (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
 
717
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
 
718
    (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
 
719
    (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
 
720
    (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
655
721
    gc->pc += cmdlen;
656
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
722
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
723
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
724
    }
657
725
}
658
726
 
659
727
#define X_GLrop_Color4bv 14
660
728
void
661
729
__indirect_glColor4bv(const GLbyte * v)
662
730
{
663
 
    generic_4_byte( X_GLrop_Color4bv, v );
 
731
    generic_4_byte(X_GLrop_Color4bv, v);
664
732
}
665
733
 
666
734
#define X_GLrop_Color4dv 15
667
735
void
668
 
__indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
 
736
__indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue,
 
737
                     GLdouble alpha)
669
738
{
670
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
739
    __GLXcontext *const gc = __glXGetCurrentContext();
671
740
    const GLuint cmdlen = 36;
672
741
    emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
673
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
674
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
675
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
676
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&alpha), 8);
 
742
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
 
743
    (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
 
744
    (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
 
745
    (void) memcpy((void *) (gc->pc + 28), (void *) (&alpha), 8);
677
746
    gc->pc += cmdlen;
678
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
747
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
748
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
749
    }
679
750
}
680
751
 
681
752
#define X_GLrop_Color4dv 15
682
753
void
683
754
__indirect_glColor4dv(const GLdouble * v)
684
755
{
685
 
    generic_32_byte( X_GLrop_Color4dv, v );
 
756
    generic_32_byte(X_GLrop_Color4dv, v);
686
757
}
687
758
 
688
759
#define X_GLrop_Color4fv 16
689
760
void
690
761
__indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
691
762
{
692
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
763
    __GLXcontext *const gc = __glXGetCurrentContext();
693
764
    const GLuint cmdlen = 20;
694
765
    emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
695
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
696
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
697
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
698
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
 
766
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
767
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
768
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
 
769
    (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
699
770
    gc->pc += cmdlen;
700
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
771
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
772
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
773
    }
701
774
}
702
775
 
703
776
#define X_GLrop_Color4fv 16
704
777
void
705
778
__indirect_glColor4fv(const GLfloat * v)
706
779
{
707
 
    generic_16_byte( X_GLrop_Color4fv, v );
 
780
    generic_16_byte(X_GLrop_Color4fv, v);
708
781
}
709
782
 
710
783
#define X_GLrop_Color4iv 17
711
784
void
712
785
__indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
713
786
{
714
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
787
    __GLXcontext *const gc = __glXGetCurrentContext();
715
788
    const GLuint cmdlen = 20;
716
789
    emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
717
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
718
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
719
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
720
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
 
790
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
791
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
792
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
 
793
    (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
721
794
    gc->pc += cmdlen;
722
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
795
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
796
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
797
    }
723
798
}
724
799
 
725
800
#define X_GLrop_Color4iv 17
726
801
void
727
802
__indirect_glColor4iv(const GLint * v)
728
803
{
729
 
    generic_16_byte( X_GLrop_Color4iv, v );
 
804
    generic_16_byte(X_GLrop_Color4iv, v);
730
805
}
731
806
 
732
807
#define X_GLrop_Color4sv 18
733
808
void
734
809
__indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
735
810
{
736
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
811
    __GLXcontext *const gc = __glXGetCurrentContext();
737
812
    const GLuint cmdlen = 12;
738
813
    emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
739
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
740
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
741
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
742
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2);
 
814
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
 
815
    (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
 
816
    (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
 
817
    (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
743
818
    gc->pc += cmdlen;
744
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
819
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
820
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
821
    }
745
822
}
746
823
 
747
824
#define X_GLrop_Color4sv 18
748
825
void
749
826
__indirect_glColor4sv(const GLshort * v)
750
827
{
751
 
    generic_8_byte( X_GLrop_Color4sv, v );
 
828
    generic_8_byte(X_GLrop_Color4sv, v);
752
829
}
753
830
 
754
831
#define X_GLrop_Color4ubv 19
755
832
void
756
833
__indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
757
834
{
758
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
835
    __GLXcontext *const gc = __glXGetCurrentContext();
759
836
    const GLuint cmdlen = 8;
760
837
    emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
761
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
762
 
    (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
763
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
764
 
    (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
 
838
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
 
839
    (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
 
840
    (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
 
841
    (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
765
842
    gc->pc += cmdlen;
766
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
843
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
844
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
845
    }
767
846
}
768
847
 
769
848
#define X_GLrop_Color4ubv 19
770
849
void
771
850
__indirect_glColor4ubv(const GLubyte * v)
772
851
{
773
 
    generic_4_byte( X_GLrop_Color4ubv, v );
 
852
    generic_4_byte(X_GLrop_Color4ubv, v);
774
853
}
775
854
 
776
855
#define X_GLrop_Color4uiv 20
777
856
void
778
857
__indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
779
858
{
780
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
859
    __GLXcontext *const gc = __glXGetCurrentContext();
781
860
    const GLuint cmdlen = 20;
782
861
    emit_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);
 
862
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
863
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
864
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
 
865
    (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
787
866
    gc->pc += cmdlen;
788
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
867
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
868
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
869
    }
789
870
}
790
871
 
791
872
#define X_GLrop_Color4uiv 20
792
873
void
793
874
__indirect_glColor4uiv(const GLuint * v)
794
875
{
795
 
    generic_16_byte( X_GLrop_Color4uiv, v );
 
876
    generic_16_byte(X_GLrop_Color4uiv, v);
796
877
}
797
878
 
798
879
#define X_GLrop_Color4usv 21
799
880
void
800
 
__indirect_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
 
881
__indirect_glColor4us(GLushort red, GLushort green, GLushort blue,
 
882
                      GLushort alpha)
801
883
{
802
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
884
    __GLXcontext *const gc = __glXGetCurrentContext();
803
885
    const GLuint cmdlen = 12;
804
886
    emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
805
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
806
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
807
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
808
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2);
 
887
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
 
888
    (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
 
889
    (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
 
890
    (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
809
891
    gc->pc += cmdlen;
810
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
892
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
893
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
894
    }
811
895
}
812
896
 
813
897
#define X_GLrop_Color4usv 21
814
898
void
815
899
__indirect_glColor4usv(const GLushort * v)
816
900
{
817
 
    generic_8_byte( X_GLrop_Color4usv, v );
 
901
    generic_8_byte(X_GLrop_Color4usv, v);
818
902
}
819
903
 
820
904
#define X_GLrop_EdgeFlagv 22
821
905
void
822
906
__indirect_glEdgeFlag(GLboolean flag)
823
907
{
824
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
908
    __GLXcontext *const gc = __glXGetCurrentContext();
825
909
    const GLuint cmdlen = 8;
826
910
    emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
827
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
 
911
    (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
828
912
    gc->pc += cmdlen;
829
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
913
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
914
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
915
    }
830
916
}
831
917
 
832
918
#define X_GLrop_EdgeFlagv 22
833
919
void
834
920
__indirect_glEdgeFlagv(const GLboolean * flag)
835
921
{
836
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
922
    __GLXcontext *const gc = __glXGetCurrentContext();
837
923
    const GLuint cmdlen = 8;
838
924
    emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
839
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(flag), 1);
 
925
    (void) memcpy((void *) (gc->pc + 4), (void *) (flag), 1);
840
926
    gc->pc += cmdlen;
841
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
927
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
928
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
929
    }
842
930
}
843
931
 
844
932
#define X_GLrop_End 23
845
933
void
846
934
__indirect_glEnd(void)
847
935
{
848
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
936
    __GLXcontext *const gc = __glXGetCurrentContext();
849
937
    const GLuint cmdlen = 4;
850
938
    emit_header(gc->pc, X_GLrop_End, cmdlen);
851
939
    gc->pc += cmdlen;
852
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
940
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
941
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
942
    }
853
943
}
854
944
 
855
945
#define X_GLrop_Indexdv 24
856
946
void
857
947
__indirect_glIndexd(GLdouble c)
858
948
{
859
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
949
    __GLXcontext *const gc = __glXGetCurrentContext();
860
950
    const GLuint cmdlen = 12;
861
951
    emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
862
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 8);
 
952
    (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 8);
863
953
    gc->pc += cmdlen;
864
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
954
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
955
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
956
    }
865
957
}
866
958
 
867
959
#define X_GLrop_Indexdv 24
868
960
void
869
961
__indirect_glIndexdv(const GLdouble * c)
870
962
{
871
 
    generic_8_byte( X_GLrop_Indexdv, c );
 
963
    generic_8_byte(X_GLrop_Indexdv, c);
872
964
}
873
965
 
874
966
#define X_GLrop_Indexfv 25
875
967
void
876
968
__indirect_glIndexf(GLfloat c)
877
969
{
878
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
970
    __GLXcontext *const gc = __glXGetCurrentContext();
879
971
    const GLuint cmdlen = 8;
880
972
    emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
881
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
 
973
    (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
882
974
    gc->pc += cmdlen;
883
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
975
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
976
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
977
    }
884
978
}
885
979
 
886
980
#define X_GLrop_Indexfv 25
887
981
void
888
982
__indirect_glIndexfv(const GLfloat * c)
889
983
{
890
 
    generic_4_byte( X_GLrop_Indexfv, c );
 
984
    generic_4_byte(X_GLrop_Indexfv, c);
891
985
}
892
986
 
893
987
#define X_GLrop_Indexiv 26
894
988
void
895
989
__indirect_glIndexi(GLint c)
896
990
{
897
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
991
    __GLXcontext *const gc = __glXGetCurrentContext();
898
992
    const GLuint cmdlen = 8;
899
993
    emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
900
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
 
994
    (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
901
995
    gc->pc += cmdlen;
902
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
996
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
997
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
998
    }
903
999
}
904
1000
 
905
1001
#define X_GLrop_Indexiv 26
906
1002
void
907
1003
__indirect_glIndexiv(const GLint * c)
908
1004
{
909
 
    generic_4_byte( X_GLrop_Indexiv, c );
 
1005
    generic_4_byte(X_GLrop_Indexiv, c);
910
1006
}
911
1007
 
912
1008
#define X_GLrop_Indexsv 27
913
1009
void
914
1010
__indirect_glIndexs(GLshort c)
915
1011
{
916
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1012
    __GLXcontext *const gc = __glXGetCurrentContext();
917
1013
    const GLuint cmdlen = 8;
918
1014
    emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
919
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 2);
 
1015
    (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 2);
920
1016
    gc->pc += cmdlen;
921
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1017
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1018
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1019
    }
922
1020
}
923
1021
 
924
1022
#define X_GLrop_Indexsv 27
925
1023
void
926
1024
__indirect_glIndexsv(const GLshort * c)
927
1025
{
928
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1026
    __GLXcontext *const gc = __glXGetCurrentContext();
929
1027
    const GLuint cmdlen = 8;
930
1028
    emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
931
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(c), 2);
 
1029
    (void) memcpy((void *) (gc->pc + 4), (void *) (c), 2);
932
1030
    gc->pc += cmdlen;
933
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1031
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1032
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1033
    }
934
1034
}
935
1035
 
936
1036
#define X_GLrop_Normal3bv 28
937
1037
void
938
1038
__indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
939
1039
{
940
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1040
    __GLXcontext *const gc = __glXGetCurrentContext();
941
1041
    const GLuint cmdlen = 8;
942
1042
    emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
943
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 1);
944
 
    (void) memcpy((void *)(gc->pc + 5), (void *)(&ny), 1);
945
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&nz), 1);
 
1043
    (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 1);
 
1044
    (void) memcpy((void *) (gc->pc + 5), (void *) (&ny), 1);
 
1045
    (void) memcpy((void *) (gc->pc + 6), (void *) (&nz), 1);
946
1046
    gc->pc += cmdlen;
947
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1047
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1048
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1049
    }
948
1050
}
949
1051
 
950
1052
#define X_GLrop_Normal3bv 28
951
1053
void
952
1054
__indirect_glNormal3bv(const GLbyte * v)
953
1055
{
954
 
    generic_3_byte( X_GLrop_Normal3bv, v );
 
1056
    generic_3_byte(X_GLrop_Normal3bv, v);
955
1057
}
956
1058
 
957
1059
#define X_GLrop_Normal3dv 29
958
1060
void
959
1061
__indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
960
1062
{
961
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1063
    __GLXcontext *const gc = __glXGetCurrentContext();
962
1064
    const GLuint cmdlen = 28;
963
1065
    emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
964
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 8);
965
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&ny), 8);
966
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&nz), 8);
 
1066
    (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 8);
 
1067
    (void) memcpy((void *) (gc->pc + 12), (void *) (&ny), 8);
 
1068
    (void) memcpy((void *) (gc->pc + 20), (void *) (&nz), 8);
967
1069
    gc->pc += cmdlen;
968
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1070
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1071
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1072
    }
969
1073
}
970
1074
 
971
1075
#define X_GLrop_Normal3dv 29
972
1076
void
973
1077
__indirect_glNormal3dv(const GLdouble * v)
974
1078
{
975
 
    generic_24_byte( X_GLrop_Normal3dv, v );
 
1079
    generic_24_byte(X_GLrop_Normal3dv, v);
976
1080
}
977
1081
 
978
1082
#define X_GLrop_Normal3fv 30
979
1083
void
980
1084
__indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
981
1085
{
982
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1086
    __GLXcontext *const gc = __glXGetCurrentContext();
983
1087
    const GLuint cmdlen = 16;
984
1088
    emit_header(gc->pc, X_GLrop_Normal3fv, 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);
 
1089
    (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
 
1090
    (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
 
1091
    (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
988
1092
    gc->pc += cmdlen;
989
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1093
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1094
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1095
    }
990
1096
}
991
1097
 
992
1098
#define X_GLrop_Normal3fv 30
993
1099
void
994
1100
__indirect_glNormal3fv(const GLfloat * v)
995
1101
{
996
 
    generic_12_byte( X_GLrop_Normal3fv, v );
 
1102
    generic_12_byte(X_GLrop_Normal3fv, v);
997
1103
}
998
1104
 
999
1105
#define X_GLrop_Normal3iv 31
1000
1106
void
1001
1107
__indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
1002
1108
{
1003
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1109
    __GLXcontext *const gc = __glXGetCurrentContext();
1004
1110
    const GLuint cmdlen = 16;
1005
1111
    emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
1006
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4);
1007
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4);
1008
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4);
 
1112
    (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
 
1113
    (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
 
1114
    (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1009
1115
    gc->pc += cmdlen;
1010
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1116
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1117
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1118
    }
1011
1119
}
1012
1120
 
1013
1121
#define X_GLrop_Normal3iv 31
1014
1122
void
1015
1123
__indirect_glNormal3iv(const GLint * v)
1016
1124
{
1017
 
    generic_12_byte( X_GLrop_Normal3iv, v );
 
1125
    generic_12_byte(X_GLrop_Normal3iv, v);
1018
1126
}
1019
1127
 
1020
1128
#define X_GLrop_Normal3sv 32
1021
1129
void
1022
1130
__indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
1023
1131
{
1024
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1132
    __GLXcontext *const gc = __glXGetCurrentContext();
1025
1133
    const GLuint cmdlen = 12;
1026
1134
    emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
1027
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 2);
1028
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&ny), 2);
1029
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&nz), 2);
 
1135
    (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 2);
 
1136
    (void) memcpy((void *) (gc->pc + 6), (void *) (&ny), 2);
 
1137
    (void) memcpy((void *) (gc->pc + 8), (void *) (&nz), 2);
1030
1138
    gc->pc += cmdlen;
1031
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1139
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1140
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1141
    }
1032
1142
}
1033
1143
 
1034
1144
#define X_GLrop_Normal3sv 32
1035
1145
void
1036
1146
__indirect_glNormal3sv(const GLshort * v)
1037
1147
{
1038
 
    generic_6_byte( X_GLrop_Normal3sv, v );
 
1148
    generic_6_byte(X_GLrop_Normal3sv, v);
1039
1149
}
1040
1150
 
1041
1151
#define X_GLrop_RasterPos2dv 33
1042
1152
void
1043
1153
__indirect_glRasterPos2d(GLdouble x, GLdouble y)
1044
1154
{
1045
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1155
    __GLXcontext *const gc = __glXGetCurrentContext();
1046
1156
    const GLuint cmdlen = 20;
1047
1157
    emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
1048
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1049
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
 
1158
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
 
1159
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1050
1160
    gc->pc += cmdlen;
1051
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1161
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1162
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1163
    }
1052
1164
}
1053
1165
 
1054
1166
#define X_GLrop_RasterPos2dv 33
1055
1167
void
1056
1168
__indirect_glRasterPos2dv(const GLdouble * v)
1057
1169
{
1058
 
    generic_16_byte( X_GLrop_RasterPos2dv, v );
 
1170
    generic_16_byte(X_GLrop_RasterPos2dv, v);
1059
1171
}
1060
1172
 
1061
1173
#define X_GLrop_RasterPos2fv 34
1062
1174
void
1063
1175
__indirect_glRasterPos2f(GLfloat x, GLfloat y)
1064
1176
{
1065
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1177
    __GLXcontext *const gc = __glXGetCurrentContext();
1066
1178
    const GLuint cmdlen = 12;
1067
1179
    emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
1068
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1069
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
 
1180
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
1181
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1070
1182
    gc->pc += cmdlen;
1071
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1183
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1184
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1185
    }
1072
1186
}
1073
1187
 
1074
1188
#define X_GLrop_RasterPos2fv 34
1075
1189
void
1076
1190
__indirect_glRasterPos2fv(const GLfloat * v)
1077
1191
{
1078
 
    generic_8_byte( X_GLrop_RasterPos2fv, v );
 
1192
    generic_8_byte(X_GLrop_RasterPos2fv, v);
1079
1193
}
1080
1194
 
1081
1195
#define X_GLrop_RasterPos2iv 35
1082
1196
void
1083
1197
__indirect_glRasterPos2i(GLint x, GLint y)
1084
1198
{
1085
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1199
    __GLXcontext *const gc = __glXGetCurrentContext();
1086
1200
    const GLuint cmdlen = 12;
1087
1201
    emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
1088
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1089
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
 
1202
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
1203
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1090
1204
    gc->pc += cmdlen;
1091
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1205
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1206
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1207
    }
1092
1208
}
1093
1209
 
1094
1210
#define X_GLrop_RasterPos2iv 35
1095
1211
void
1096
1212
__indirect_glRasterPos2iv(const GLint * v)
1097
1213
{
1098
 
    generic_8_byte( X_GLrop_RasterPos2iv, v );
 
1214
    generic_8_byte(X_GLrop_RasterPos2iv, v);
1099
1215
}
1100
1216
 
1101
1217
#define X_GLrop_RasterPos2sv 36
1102
1218
void
1103
1219
__indirect_glRasterPos2s(GLshort x, GLshort y)
1104
1220
{
1105
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1221
    __GLXcontext *const gc = __glXGetCurrentContext();
1106
1222
    const GLuint cmdlen = 8;
1107
1223
    emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
1108
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1109
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
 
1224
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
 
1225
    (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1110
1226
    gc->pc += cmdlen;
1111
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1227
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1228
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1229
    }
1112
1230
}
1113
1231
 
1114
1232
#define X_GLrop_RasterPos2sv 36
1115
1233
void
1116
1234
__indirect_glRasterPos2sv(const GLshort * v)
1117
1235
{
1118
 
    generic_4_byte( X_GLrop_RasterPos2sv, v );
 
1236
    generic_4_byte(X_GLrop_RasterPos2sv, v);
1119
1237
}
1120
1238
 
1121
1239
#define X_GLrop_RasterPos3dv 37
1122
1240
void
1123
1241
__indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
1124
1242
{
1125
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1243
    __GLXcontext *const gc = __glXGetCurrentContext();
1126
1244
    const GLuint cmdlen = 28;
1127
1245
    emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
1128
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1129
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1130
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
 
1246
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
 
1247
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
 
1248
    (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1131
1249
    gc->pc += cmdlen;
1132
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1250
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1251
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1252
    }
1133
1253
}
1134
1254
 
1135
1255
#define X_GLrop_RasterPos3dv 37
1136
1256
void
1137
1257
__indirect_glRasterPos3dv(const GLdouble * v)
1138
1258
{
1139
 
    generic_24_byte( X_GLrop_RasterPos3dv, v );
 
1259
    generic_24_byte(X_GLrop_RasterPos3dv, v);
1140
1260
}
1141
1261
 
1142
1262
#define X_GLrop_RasterPos3fv 38
1143
1263
void
1144
1264
__indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
1145
1265
{
1146
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1266
    __GLXcontext *const gc = __glXGetCurrentContext();
1147
1267
    const GLuint cmdlen = 16;
1148
1268
    emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
1149
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1150
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1151
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
 
1269
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
1270
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
1271
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1152
1272
    gc->pc += cmdlen;
1153
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1273
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1274
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1275
    }
1154
1276
}
1155
1277
 
1156
1278
#define X_GLrop_RasterPos3fv 38
1157
1279
void
1158
1280
__indirect_glRasterPos3fv(const GLfloat * v)
1159
1281
{
1160
 
    generic_12_byte( X_GLrop_RasterPos3fv, v );
 
1282
    generic_12_byte(X_GLrop_RasterPos3fv, v);
1161
1283
}
1162
1284
 
1163
1285
#define X_GLrop_RasterPos3iv 39
1164
1286
void
1165
1287
__indirect_glRasterPos3i(GLint x, GLint y, GLint z)
1166
1288
{
1167
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1289
    __GLXcontext *const gc = __glXGetCurrentContext();
1168
1290
    const GLuint cmdlen = 16;
1169
1291
    emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
1170
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1171
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1172
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
 
1292
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
1293
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
1294
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1173
1295
    gc->pc += cmdlen;
1174
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1296
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1297
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1298
    }
1175
1299
}
1176
1300
 
1177
1301
#define X_GLrop_RasterPos3iv 39
1178
1302
void
1179
1303
__indirect_glRasterPos3iv(const GLint * v)
1180
1304
{
1181
 
    generic_12_byte( X_GLrop_RasterPos3iv, v );
 
1305
    generic_12_byte(X_GLrop_RasterPos3iv, v);
1182
1306
}
1183
1307
 
1184
1308
#define X_GLrop_RasterPos3sv 40
1185
1309
void
1186
1310
__indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
1187
1311
{
1188
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1312
    __GLXcontext *const gc = __glXGetCurrentContext();
1189
1313
    const GLuint cmdlen = 12;
1190
1314
    emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
1191
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1192
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1193
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
 
1315
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
 
1316
    (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
 
1317
    (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1194
1318
    gc->pc += cmdlen;
1195
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1319
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1320
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1321
    }
1196
1322
}
1197
1323
 
1198
1324
#define X_GLrop_RasterPos3sv 40
1199
1325
void
1200
1326
__indirect_glRasterPos3sv(const GLshort * v)
1201
1327
{
1202
 
    generic_6_byte( X_GLrop_RasterPos3sv, v );
 
1328
    generic_6_byte(X_GLrop_RasterPos3sv, v);
1203
1329
}
1204
1330
 
1205
1331
#define X_GLrop_RasterPos4dv 41
1206
1332
void
1207
1333
__indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1208
1334
{
1209
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1335
    __GLXcontext *const gc = __glXGetCurrentContext();
1210
1336
    const GLuint cmdlen = 36;
1211
1337
    emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
1212
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1213
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1214
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
1215
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
 
1338
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
 
1339
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
 
1340
    (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
 
1341
    (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
1216
1342
    gc->pc += cmdlen;
1217
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1343
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1344
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1345
    }
1218
1346
}
1219
1347
 
1220
1348
#define X_GLrop_RasterPos4dv 41
1221
1349
void
1222
1350
__indirect_glRasterPos4dv(const GLdouble * v)
1223
1351
{
1224
 
    generic_32_byte( X_GLrop_RasterPos4dv, v );
 
1352
    generic_32_byte(X_GLrop_RasterPos4dv, v);
1225
1353
}
1226
1354
 
1227
1355
#define X_GLrop_RasterPos4fv 42
1228
1356
void
1229
1357
__indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1230
1358
{
1231
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1359
    __GLXcontext *const gc = __glXGetCurrentContext();
1232
1360
    const GLuint cmdlen = 20;
1233
1361
    emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
1234
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1235
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1236
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1237
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
 
1362
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
1363
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
1364
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
 
1365
    (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1238
1366
    gc->pc += cmdlen;
1239
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1367
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1368
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1369
    }
1240
1370
}
1241
1371
 
1242
1372
#define X_GLrop_RasterPos4fv 42
1243
1373
void
1244
1374
__indirect_glRasterPos4fv(const GLfloat * v)
1245
1375
{
1246
 
    generic_16_byte( X_GLrop_RasterPos4fv, v );
 
1376
    generic_16_byte(X_GLrop_RasterPos4fv, v);
1247
1377
}
1248
1378
 
1249
1379
#define X_GLrop_RasterPos4iv 43
1250
1380
void
1251
1381
__indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
1252
1382
{
1253
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1383
    __GLXcontext *const gc = __glXGetCurrentContext();
1254
1384
    const GLuint cmdlen = 20;
1255
1385
    emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
1256
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1257
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1258
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1259
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
 
1386
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
1387
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
1388
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
 
1389
    (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1260
1390
    gc->pc += cmdlen;
1261
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1391
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1392
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1393
    }
1262
1394
}
1263
1395
 
1264
1396
#define X_GLrop_RasterPos4iv 43
1265
1397
void
1266
1398
__indirect_glRasterPos4iv(const GLint * v)
1267
1399
{
1268
 
    generic_16_byte( X_GLrop_RasterPos4iv, v );
 
1400
    generic_16_byte(X_GLrop_RasterPos4iv, v);
1269
1401
}
1270
1402
 
1271
1403
#define X_GLrop_RasterPos4sv 44
1272
1404
void
1273
1405
__indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
1274
1406
{
1275
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1407
    __GLXcontext *const gc = __glXGetCurrentContext();
1276
1408
    const GLuint cmdlen = 12;
1277
1409
    emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
1278
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1279
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1280
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
1281
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2);
 
1410
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
 
1411
    (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
 
1412
    (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
 
1413
    (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
1282
1414
    gc->pc += cmdlen;
1283
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1415
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1416
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1417
    }
1284
1418
}
1285
1419
 
1286
1420
#define X_GLrop_RasterPos4sv 44
1287
1421
void
1288
1422
__indirect_glRasterPos4sv(const GLshort * v)
1289
1423
{
1290
 
    generic_8_byte( X_GLrop_RasterPos4sv, v );
 
1424
    generic_8_byte(X_GLrop_RasterPos4sv, v);
1291
1425
}
1292
1426
 
1293
1427
#define X_GLrop_Rectdv 45
1294
1428
void
1295
1429
__indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1296
1430
{
1297
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1431
    __GLXcontext *const gc = __glXGetCurrentContext();
1298
1432
    const GLuint cmdlen = 36;
1299
1433
    emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1300
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 8);
1301
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y1), 8);
1302
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&x2), 8);
1303
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&y2), 8);
 
1434
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 8);
 
1435
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y1), 8);
 
1436
    (void) memcpy((void *) (gc->pc + 20), (void *) (&x2), 8);
 
1437
    (void) memcpy((void *) (gc->pc + 28), (void *) (&y2), 8);
1304
1438
    gc->pc += cmdlen;
1305
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1439
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1440
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1441
    }
1306
1442
}
1307
1443
 
1308
1444
#define X_GLrop_Rectdv 45
1309
1445
void
1310
1446
__indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
1311
1447
{
1312
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1448
    __GLXcontext *const gc = __glXGetCurrentContext();
1313
1449
    const GLuint cmdlen = 36;
1314
1450
    emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1315
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 16);
1316
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(v2), 16);
 
1451
    (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 16);
 
1452
    (void) memcpy((void *) (gc->pc + 20), (void *) (v2), 16);
1317
1453
    gc->pc += cmdlen;
1318
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1454
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1455
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1456
    }
1319
1457
}
1320
1458
 
1321
1459
#define X_GLrop_Rectfv 46
1322
1460
void
1323
1461
__indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
1324
1462
{
1325
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1463
    __GLXcontext *const gc = __glXGetCurrentContext();
1326
1464
    const GLuint cmdlen = 20;
1327
1465
    emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1328
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4);
1329
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4);
1330
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4);
1331
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4);
 
1466
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
 
1467
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
 
1468
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
 
1469
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1332
1470
    gc->pc += cmdlen;
1333
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1471
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1472
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1473
    }
1334
1474
}
1335
1475
 
1336
1476
#define X_GLrop_Rectfv 46
1337
1477
void
1338
1478
__indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
1339
1479
{
1340
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1480
    __GLXcontext *const gc = __glXGetCurrentContext();
1341
1481
    const GLuint cmdlen = 20;
1342
1482
    emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1343
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8);
1344
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8);
 
1483
    (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
 
1484
    (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1345
1485
    gc->pc += cmdlen;
1346
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1486
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1487
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1488
    }
1347
1489
}
1348
1490
 
1349
1491
#define X_GLrop_Rectiv 47
1350
1492
void
1351
1493
__indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
1352
1494
{
1353
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1495
    __GLXcontext *const gc = __glXGetCurrentContext();
1354
1496
    const GLuint cmdlen = 20;
1355
1497
    emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1356
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4);
1357
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4);
1358
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4);
1359
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4);
 
1498
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
 
1499
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
 
1500
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
 
1501
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1360
1502
    gc->pc += cmdlen;
1361
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1503
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1504
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1505
    }
1362
1506
}
1363
1507
 
1364
1508
#define X_GLrop_Rectiv 47
1365
1509
void
1366
1510
__indirect_glRectiv(const GLint * v1, const GLint * v2)
1367
1511
{
1368
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1512
    __GLXcontext *const gc = __glXGetCurrentContext();
1369
1513
    const GLuint cmdlen = 20;
1370
1514
    emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1371
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8);
1372
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8);
 
1515
    (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
 
1516
    (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1373
1517
    gc->pc += cmdlen;
1374
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1518
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1519
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1520
    }
1375
1521
}
1376
1522
 
1377
1523
#define X_GLrop_Rectsv 48
1378
1524
void
1379
1525
__indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1380
1526
{
1381
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1527
    __GLXcontext *const gc = __glXGetCurrentContext();
1382
1528
    const GLuint cmdlen = 12;
1383
1529
    emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1384
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 2);
1385
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&y1), 2);
1386
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x2), 2);
1387
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&y2), 2);
 
1530
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 2);
 
1531
    (void) memcpy((void *) (gc->pc + 6), (void *) (&y1), 2);
 
1532
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x2), 2);
 
1533
    (void) memcpy((void *) (gc->pc + 10), (void *) (&y2), 2);
1388
1534
    gc->pc += cmdlen;
1389
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1535
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1536
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1537
    }
1390
1538
}
1391
1539
 
1392
1540
#define X_GLrop_Rectsv 48
1393
1541
void
1394
1542
__indirect_glRectsv(const GLshort * v1, const GLshort * v2)
1395
1543
{
1396
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1544
    __GLXcontext *const gc = __glXGetCurrentContext();
1397
1545
    const GLuint cmdlen = 12;
1398
1546
    emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1399
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v1), 4);
1400
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v2), 4);
 
1547
    (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 4);
 
1548
    (void) memcpy((void *) (gc->pc + 8), (void *) (v2), 4);
1401
1549
    gc->pc += cmdlen;
1402
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1550
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1551
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1552
    }
1403
1553
}
1404
1554
 
1405
1555
#define X_GLrop_TexCoord1dv 49
1406
1556
void
1407
1557
__indirect_glTexCoord1d(GLdouble s)
1408
1558
{
1409
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1559
    __GLXcontext *const gc = __glXGetCurrentContext();
1410
1560
    const GLuint cmdlen = 12;
1411
1561
    emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
1412
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
 
1562
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1413
1563
    gc->pc += cmdlen;
1414
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1564
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1565
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1566
    }
1415
1567
}
1416
1568
 
1417
1569
#define X_GLrop_TexCoord1dv 49
1418
1570
void
1419
1571
__indirect_glTexCoord1dv(const GLdouble * v)
1420
1572
{
1421
 
    generic_8_byte( X_GLrop_TexCoord1dv, v );
 
1573
    generic_8_byte(X_GLrop_TexCoord1dv, v);
1422
1574
}
1423
1575
 
1424
1576
#define X_GLrop_TexCoord1fv 50
1425
1577
void
1426
1578
__indirect_glTexCoord1f(GLfloat s)
1427
1579
{
1428
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1580
    __GLXcontext *const gc = __glXGetCurrentContext();
1429
1581
    const GLuint cmdlen = 8;
1430
1582
    emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
1431
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
 
1583
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1432
1584
    gc->pc += cmdlen;
1433
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1585
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1586
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1587
    }
1434
1588
}
1435
1589
 
1436
1590
#define X_GLrop_TexCoord1fv 50
1437
1591
void
1438
1592
__indirect_glTexCoord1fv(const GLfloat * v)
1439
1593
{
1440
 
    generic_4_byte( X_GLrop_TexCoord1fv, v );
 
1594
    generic_4_byte(X_GLrop_TexCoord1fv, v);
1441
1595
}
1442
1596
 
1443
1597
#define X_GLrop_TexCoord1iv 51
1444
1598
void
1445
1599
__indirect_glTexCoord1i(GLint s)
1446
1600
{
1447
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1601
    __GLXcontext *const gc = __glXGetCurrentContext();
1448
1602
    const GLuint cmdlen = 8;
1449
1603
    emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
1450
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
 
1604
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1451
1605
    gc->pc += cmdlen;
1452
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1606
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1607
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1608
    }
1453
1609
}
1454
1610
 
1455
1611
#define X_GLrop_TexCoord1iv 51
1456
1612
void
1457
1613
__indirect_glTexCoord1iv(const GLint * v)
1458
1614
{
1459
 
    generic_4_byte( X_GLrop_TexCoord1iv, v );
 
1615
    generic_4_byte(X_GLrop_TexCoord1iv, v);
1460
1616
}
1461
1617
 
1462
1618
#define X_GLrop_TexCoord1sv 52
1463
1619
void
1464
1620
__indirect_glTexCoord1s(GLshort s)
1465
1621
{
1466
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1622
    __GLXcontext *const gc = __glXGetCurrentContext();
1467
1623
    const GLuint cmdlen = 8;
1468
1624
    emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1469
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
 
1625
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1470
1626
    gc->pc += cmdlen;
1471
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1627
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1628
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1629
    }
1472
1630
}
1473
1631
 
1474
1632
#define X_GLrop_TexCoord1sv 52
1475
1633
void
1476
1634
__indirect_glTexCoord1sv(const GLshort * v)
1477
1635
{
1478
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1636
    __GLXcontext *const gc = __glXGetCurrentContext();
1479
1637
    const GLuint cmdlen = 8;
1480
1638
    emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1481
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 2);
 
1639
    (void) memcpy((void *) (gc->pc + 4), (void *) (v), 2);
1482
1640
    gc->pc += cmdlen;
1483
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1641
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1642
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1643
    }
1484
1644
}
1485
1645
 
1486
1646
#define X_GLrop_TexCoord2dv 53
1487
1647
void
1488
1648
__indirect_glTexCoord2d(GLdouble s, GLdouble t)
1489
1649
{
1490
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1650
    __GLXcontext *const gc = __glXGetCurrentContext();
1491
1651
    const GLuint cmdlen = 20;
1492
1652
    emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
1493
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
1494
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
 
1653
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
 
1654
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1495
1655
    gc->pc += cmdlen;
1496
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1656
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1657
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1658
    }
1497
1659
}
1498
1660
 
1499
1661
#define X_GLrop_TexCoord2dv 53
1500
1662
void
1501
1663
__indirect_glTexCoord2dv(const GLdouble * v)
1502
1664
{
1503
 
    generic_16_byte( X_GLrop_TexCoord2dv, v );
 
1665
    generic_16_byte(X_GLrop_TexCoord2dv, v);
1504
1666
}
1505
1667
 
1506
1668
#define X_GLrop_TexCoord2fv 54
1507
1669
void
1508
1670
__indirect_glTexCoord2f(GLfloat s, GLfloat t)
1509
1671
{
1510
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1672
    __GLXcontext *const gc = __glXGetCurrentContext();
1511
1673
    const GLuint cmdlen = 12;
1512
1674
    emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
1513
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1514
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
 
1675
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
 
1676
    (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1515
1677
    gc->pc += cmdlen;
1516
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1678
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1679
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1680
    }
1517
1681
}
1518
1682
 
1519
1683
#define X_GLrop_TexCoord2fv 54
1520
1684
void
1521
1685
__indirect_glTexCoord2fv(const GLfloat * v)
1522
1686
{
1523
 
    generic_8_byte( X_GLrop_TexCoord2fv, v );
 
1687
    generic_8_byte(X_GLrop_TexCoord2fv, v);
1524
1688
}
1525
1689
 
1526
1690
#define X_GLrop_TexCoord2iv 55
1527
1691
void
1528
1692
__indirect_glTexCoord2i(GLint s, GLint t)
1529
1693
{
1530
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1694
    __GLXcontext *const gc = __glXGetCurrentContext();
1531
1695
    const GLuint cmdlen = 12;
1532
1696
    emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
1533
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1534
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
 
1697
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
 
1698
    (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1535
1699
    gc->pc += cmdlen;
1536
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1700
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1701
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1702
    }
1537
1703
}
1538
1704
 
1539
1705
#define X_GLrop_TexCoord2iv 55
1540
1706
void
1541
1707
__indirect_glTexCoord2iv(const GLint * v)
1542
1708
{
1543
 
    generic_8_byte( X_GLrop_TexCoord2iv, v );
 
1709
    generic_8_byte(X_GLrop_TexCoord2iv, v);
1544
1710
}
1545
1711
 
1546
1712
#define X_GLrop_TexCoord2sv 56
1547
1713
void
1548
1714
__indirect_glTexCoord2s(GLshort s, GLshort t)
1549
1715
{
1550
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1716
    __GLXcontext *const gc = __glXGetCurrentContext();
1551
1717
    const GLuint cmdlen = 8;
1552
1718
    emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
1553
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
1554
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
 
1719
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
 
1720
    (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1555
1721
    gc->pc += cmdlen;
1556
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1722
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1723
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1724
    }
1557
1725
}
1558
1726
 
1559
1727
#define X_GLrop_TexCoord2sv 56
1560
1728
void
1561
1729
__indirect_glTexCoord2sv(const GLshort * v)
1562
1730
{
1563
 
    generic_4_byte( X_GLrop_TexCoord2sv, v );
 
1731
    generic_4_byte(X_GLrop_TexCoord2sv, v);
1564
1732
}
1565
1733
 
1566
1734
#define X_GLrop_TexCoord3dv 57
1567
1735
void
1568
1736
__indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
1569
1737
{
1570
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1738
    __GLXcontext *const gc = __glXGetCurrentContext();
1571
1739
    const GLuint cmdlen = 28;
1572
1740
    emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
1573
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
1574
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
1575
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
 
1741
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
 
1742
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
 
1743
    (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1576
1744
    gc->pc += cmdlen;
1577
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1745
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1746
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1747
    }
1578
1748
}
1579
1749
 
1580
1750
#define X_GLrop_TexCoord3dv 57
1581
1751
void
1582
1752
__indirect_glTexCoord3dv(const GLdouble * v)
1583
1753
{
1584
 
    generic_24_byte( X_GLrop_TexCoord3dv, v );
 
1754
    generic_24_byte(X_GLrop_TexCoord3dv, v);
1585
1755
}
1586
1756
 
1587
1757
#define X_GLrop_TexCoord3fv 58
1588
1758
void
1589
1759
__indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
1590
1760
{
1591
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1761
    __GLXcontext *const gc = __glXGetCurrentContext();
1592
1762
    const GLuint cmdlen = 16;
1593
1763
    emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
1594
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1595
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1596
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
 
1764
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
 
1765
    (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
 
1766
    (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1597
1767
    gc->pc += cmdlen;
1598
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1768
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1769
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1770
    }
1599
1771
}
1600
1772
 
1601
1773
#define X_GLrop_TexCoord3fv 58
1602
1774
void
1603
1775
__indirect_glTexCoord3fv(const GLfloat * v)
1604
1776
{
1605
 
    generic_12_byte( X_GLrop_TexCoord3fv, v );
 
1777
    generic_12_byte(X_GLrop_TexCoord3fv, v);
1606
1778
}
1607
1779
 
1608
1780
#define X_GLrop_TexCoord3iv 59
1609
1781
void
1610
1782
__indirect_glTexCoord3i(GLint s, GLint t, GLint r)
1611
1783
{
1612
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1784
    __GLXcontext *const gc = __glXGetCurrentContext();
1613
1785
    const GLuint cmdlen = 16;
1614
1786
    emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
1615
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1616
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1617
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
 
1787
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
 
1788
    (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
 
1789
    (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1618
1790
    gc->pc += cmdlen;
1619
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1791
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1792
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1793
    }
1620
1794
}
1621
1795
 
1622
1796
#define X_GLrop_TexCoord3iv 59
1623
1797
void
1624
1798
__indirect_glTexCoord3iv(const GLint * v)
1625
1799
{
1626
 
    generic_12_byte( X_GLrop_TexCoord3iv, v );
 
1800
    generic_12_byte(X_GLrop_TexCoord3iv, v);
1627
1801
}
1628
1802
 
1629
1803
#define X_GLrop_TexCoord3sv 60
1630
1804
void
1631
1805
__indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
1632
1806
{
1633
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1807
    __GLXcontext *const gc = __glXGetCurrentContext();
1634
1808
    const GLuint cmdlen = 12;
1635
1809
    emit_header(gc->pc, X_GLrop_TexCoord3sv, 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);
 
1810
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
 
1811
    (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
 
1812
    (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1639
1813
    gc->pc += cmdlen;
1640
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1814
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1815
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1816
    }
1641
1817
}
1642
1818
 
1643
1819
#define X_GLrop_TexCoord3sv 60
1644
1820
void
1645
1821
__indirect_glTexCoord3sv(const GLshort * v)
1646
1822
{
1647
 
    generic_6_byte( X_GLrop_TexCoord3sv, v );
 
1823
    generic_6_byte(X_GLrop_TexCoord3sv, v);
1648
1824
}
1649
1825
 
1650
1826
#define X_GLrop_TexCoord4dv 61
1651
1827
void
1652
1828
__indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1653
1829
{
1654
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1830
    __GLXcontext *const gc = __glXGetCurrentContext();
1655
1831
    const GLuint cmdlen = 36;
1656
1832
    emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
1657
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
1658
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
1659
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
1660
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8);
 
1833
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
 
1834
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
 
1835
    (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
 
1836
    (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
1661
1837
    gc->pc += cmdlen;
1662
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1838
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1839
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1840
    }
1663
1841
}
1664
1842
 
1665
1843
#define X_GLrop_TexCoord4dv 61
1666
1844
void
1667
1845
__indirect_glTexCoord4dv(const GLdouble * v)
1668
1846
{
1669
 
    generic_32_byte( X_GLrop_TexCoord4dv, v );
 
1847
    generic_32_byte(X_GLrop_TexCoord4dv, v);
1670
1848
}
1671
1849
 
1672
1850
#define X_GLrop_TexCoord4fv 62
1673
1851
void
1674
1852
__indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1675
1853
{
1676
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1854
    __GLXcontext *const gc = __glXGetCurrentContext();
1677
1855
    const GLuint cmdlen = 20;
1678
1856
    emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
1679
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1680
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1681
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
1682
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4);
 
1857
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
 
1858
    (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
 
1859
    (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
 
1860
    (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1683
1861
    gc->pc += cmdlen;
1684
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1862
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1863
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1864
    }
1685
1865
}
1686
1866
 
1687
1867
#define X_GLrop_TexCoord4fv 62
1688
1868
void
1689
1869
__indirect_glTexCoord4fv(const GLfloat * v)
1690
1870
{
1691
 
    generic_16_byte( X_GLrop_TexCoord4fv, v );
 
1871
    generic_16_byte(X_GLrop_TexCoord4fv, v);
1692
1872
}
1693
1873
 
1694
1874
#define X_GLrop_TexCoord4iv 63
1695
1875
void
1696
1876
__indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
1697
1877
{
1698
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1878
    __GLXcontext *const gc = __glXGetCurrentContext();
1699
1879
    const GLuint cmdlen = 20;
1700
1880
    emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
1701
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1702
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4);
1703
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4);
1704
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4);
 
1881
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
 
1882
    (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
 
1883
    (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
 
1884
    (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1705
1885
    gc->pc += cmdlen;
1706
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1886
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1887
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1888
    }
1707
1889
}
1708
1890
 
1709
1891
#define X_GLrop_TexCoord4iv 63
1710
1892
void
1711
1893
__indirect_glTexCoord4iv(const GLint * v)
1712
1894
{
1713
 
    generic_16_byte( X_GLrop_TexCoord4iv, v );
 
1895
    generic_16_byte(X_GLrop_TexCoord4iv, v);
1714
1896
}
1715
1897
 
1716
1898
#define X_GLrop_TexCoord4sv 64
1717
1899
void
1718
1900
__indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
1719
1901
{
1720
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1902
    __GLXcontext *const gc = __glXGetCurrentContext();
1721
1903
    const GLuint cmdlen = 12;
1722
1904
    emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
1723
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
1724
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2);
1725
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2);
1726
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&q), 2);
 
1905
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
 
1906
    (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
 
1907
    (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
 
1908
    (void) memcpy((void *) (gc->pc + 10), (void *) (&q), 2);
1727
1909
    gc->pc += cmdlen;
1728
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1910
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1911
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1912
    }
1729
1913
}
1730
1914
 
1731
1915
#define X_GLrop_TexCoord4sv 64
1732
1916
void
1733
1917
__indirect_glTexCoord4sv(const GLshort * v)
1734
1918
{
1735
 
    generic_8_byte( X_GLrop_TexCoord4sv, v );
 
1919
    generic_8_byte(X_GLrop_TexCoord4sv, v);
1736
1920
}
1737
1921
 
1738
1922
#define X_GLrop_Vertex2dv 65
1739
1923
void
1740
1924
__indirect_glVertex2d(GLdouble x, GLdouble y)
1741
1925
{
1742
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1926
    __GLXcontext *const gc = __glXGetCurrentContext();
1743
1927
    const GLuint cmdlen = 20;
1744
1928
    emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
1745
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1746
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
 
1929
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
 
1930
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1747
1931
    gc->pc += cmdlen;
1748
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1932
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1933
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1934
    }
1749
1935
}
1750
1936
 
1751
1937
#define X_GLrop_Vertex2dv 65
1752
1938
void
1753
1939
__indirect_glVertex2dv(const GLdouble * v)
1754
1940
{
1755
 
    generic_16_byte( X_GLrop_Vertex2dv, v );
 
1941
    generic_16_byte(X_GLrop_Vertex2dv, v);
1756
1942
}
1757
1943
 
1758
1944
#define X_GLrop_Vertex2fv 66
1759
1945
void
1760
1946
__indirect_glVertex2f(GLfloat x, GLfloat y)
1761
1947
{
1762
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1948
    __GLXcontext *const gc = __glXGetCurrentContext();
1763
1949
    const GLuint cmdlen = 12;
1764
1950
    emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
1765
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1766
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
 
1951
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
1952
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1767
1953
    gc->pc += cmdlen;
1768
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1954
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1955
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1956
    }
1769
1957
}
1770
1958
 
1771
1959
#define X_GLrop_Vertex2fv 66
1772
1960
void
1773
1961
__indirect_glVertex2fv(const GLfloat * v)
1774
1962
{
1775
 
    generic_8_byte( X_GLrop_Vertex2fv, v );
 
1963
    generic_8_byte(X_GLrop_Vertex2fv, v);
1776
1964
}
1777
1965
 
1778
1966
#define X_GLrop_Vertex2iv 67
1779
1967
void
1780
1968
__indirect_glVertex2i(GLint x, GLint y)
1781
1969
{
1782
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1970
    __GLXcontext *const gc = __glXGetCurrentContext();
1783
1971
    const GLuint cmdlen = 12;
1784
1972
    emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
1785
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1786
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
 
1973
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
1974
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1787
1975
    gc->pc += cmdlen;
1788
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1976
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1977
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
1978
    }
1789
1979
}
1790
1980
 
1791
1981
#define X_GLrop_Vertex2iv 67
1792
1982
void
1793
1983
__indirect_glVertex2iv(const GLint * v)
1794
1984
{
1795
 
    generic_8_byte( X_GLrop_Vertex2iv, v );
 
1985
    generic_8_byte(X_GLrop_Vertex2iv, v);
1796
1986
}
1797
1987
 
1798
1988
#define X_GLrop_Vertex2sv 68
1799
1989
void
1800
1990
__indirect_glVertex2s(GLshort x, GLshort y)
1801
1991
{
1802
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
1992
    __GLXcontext *const gc = __glXGetCurrentContext();
1803
1993
    const GLuint cmdlen = 8;
1804
1994
    emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
1805
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1806
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
 
1995
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
 
1996
    (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1807
1997
    gc->pc += cmdlen;
1808
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
1998
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
1999
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2000
    }
1809
2001
}
1810
2002
 
1811
2003
#define X_GLrop_Vertex2sv 68
1812
2004
void
1813
2005
__indirect_glVertex2sv(const GLshort * v)
1814
2006
{
1815
 
    generic_4_byte( X_GLrop_Vertex2sv, v );
 
2007
    generic_4_byte(X_GLrop_Vertex2sv, v);
1816
2008
}
1817
2009
 
1818
2010
#define X_GLrop_Vertex3dv 69
1819
2011
void
1820
2012
__indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
1821
2013
{
1822
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2014
    __GLXcontext *const gc = __glXGetCurrentContext();
1823
2015
    const GLuint cmdlen = 28;
1824
2016
    emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
1825
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1826
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1827
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
 
2017
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
 
2018
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
 
2019
    (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1828
2020
    gc->pc += cmdlen;
1829
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2021
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2022
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2023
    }
1830
2024
}
1831
2025
 
1832
2026
#define X_GLrop_Vertex3dv 69
1833
2027
void
1834
2028
__indirect_glVertex3dv(const GLdouble * v)
1835
2029
{
1836
 
    generic_24_byte( X_GLrop_Vertex3dv, v );
 
2030
    generic_24_byte(X_GLrop_Vertex3dv, v);
1837
2031
}
1838
2032
 
1839
2033
#define X_GLrop_Vertex3fv 70
1840
2034
void
1841
2035
__indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
1842
2036
{
1843
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2037
    __GLXcontext *const gc = __glXGetCurrentContext();
1844
2038
    const GLuint cmdlen = 16;
1845
2039
    emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
1846
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1847
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1848
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
 
2040
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
2041
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
2042
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1849
2043
    gc->pc += cmdlen;
1850
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2044
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2045
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2046
    }
1851
2047
}
1852
2048
 
1853
2049
#define X_GLrop_Vertex3fv 70
1854
2050
void
1855
2051
__indirect_glVertex3fv(const GLfloat * v)
1856
2052
{
1857
 
    generic_12_byte( X_GLrop_Vertex3fv, v );
 
2053
    generic_12_byte(X_GLrop_Vertex3fv, v);
1858
2054
}
1859
2055
 
1860
2056
#define X_GLrop_Vertex3iv 71
1861
2057
void
1862
2058
__indirect_glVertex3i(GLint x, GLint y, GLint z)
1863
2059
{
1864
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2060
    __GLXcontext *const gc = __glXGetCurrentContext();
1865
2061
    const GLuint cmdlen = 16;
1866
2062
    emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
1867
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1868
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1869
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
 
2063
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
2064
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
2065
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1870
2066
    gc->pc += cmdlen;
1871
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2067
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2068
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2069
    }
1872
2070
}
1873
2071
 
1874
2072
#define X_GLrop_Vertex3iv 71
1875
2073
void
1876
2074
__indirect_glVertex3iv(const GLint * v)
1877
2075
{
1878
 
    generic_12_byte( X_GLrop_Vertex3iv, v );
 
2076
    generic_12_byte(X_GLrop_Vertex3iv, v);
1879
2077
}
1880
2078
 
1881
2079
#define X_GLrop_Vertex3sv 72
1882
2080
void
1883
2081
__indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
1884
2082
{
1885
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2083
    __GLXcontext *const gc = __glXGetCurrentContext();
1886
2084
    const GLuint cmdlen = 12;
1887
2085
    emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
1888
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1889
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1890
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
 
2086
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
 
2087
    (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
 
2088
    (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1891
2089
    gc->pc += cmdlen;
1892
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2090
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2091
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2092
    }
1893
2093
}
1894
2094
 
1895
2095
#define X_GLrop_Vertex3sv 72
1896
2096
void
1897
2097
__indirect_glVertex3sv(const GLshort * v)
1898
2098
{
1899
 
    generic_6_byte( X_GLrop_Vertex3sv, v );
 
2099
    generic_6_byte(X_GLrop_Vertex3sv, v);
1900
2100
}
1901
2101
 
1902
2102
#define X_GLrop_Vertex4dv 73
1903
2103
void
1904
2104
__indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1905
2105
{
1906
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2106
    __GLXcontext *const gc = __glXGetCurrentContext();
1907
2107
    const GLuint cmdlen = 36;
1908
2108
    emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
1909
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
1910
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
1911
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
1912
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
 
2109
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
 
2110
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
 
2111
    (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
 
2112
    (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
1913
2113
    gc->pc += cmdlen;
1914
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2114
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2115
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2116
    }
1915
2117
}
1916
2118
 
1917
2119
#define X_GLrop_Vertex4dv 73
1918
2120
void
1919
2121
__indirect_glVertex4dv(const GLdouble * v)
1920
2122
{
1921
 
    generic_32_byte( X_GLrop_Vertex4dv, v );
 
2123
    generic_32_byte(X_GLrop_Vertex4dv, v);
1922
2124
}
1923
2125
 
1924
2126
#define X_GLrop_Vertex4fv 74
1925
2127
void
1926
2128
__indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1927
2129
{
1928
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2130
    __GLXcontext *const gc = __glXGetCurrentContext();
1929
2131
    const GLuint cmdlen = 20;
1930
2132
    emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
1931
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1932
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1933
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1934
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
 
2133
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
2134
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
2135
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
 
2136
    (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1935
2137
    gc->pc += cmdlen;
1936
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2138
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2139
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2140
    }
1937
2141
}
1938
2142
 
1939
2143
#define X_GLrop_Vertex4fv 74
1940
2144
void
1941
2145
__indirect_glVertex4fv(const GLfloat * v)
1942
2146
{
1943
 
    generic_16_byte( X_GLrop_Vertex4fv, v );
 
2147
    generic_16_byte(X_GLrop_Vertex4fv, v);
1944
2148
}
1945
2149
 
1946
2150
#define X_GLrop_Vertex4iv 75
1947
2151
void
1948
2152
__indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
1949
2153
{
1950
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2154
    __GLXcontext *const gc = __glXGetCurrentContext();
1951
2155
    const GLuint cmdlen = 20;
1952
2156
    emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
1953
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
1954
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
1955
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
1956
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4);
 
2157
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
2158
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
2159
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
 
2160
    (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1957
2161
    gc->pc += cmdlen;
1958
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2162
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2163
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2164
    }
1959
2165
}
1960
2166
 
1961
2167
#define X_GLrop_Vertex4iv 75
1962
2168
void
1963
2169
__indirect_glVertex4iv(const GLint * v)
1964
2170
{
1965
 
    generic_16_byte( X_GLrop_Vertex4iv, v );
 
2171
    generic_16_byte(X_GLrop_Vertex4iv, v);
1966
2172
}
1967
2173
 
1968
2174
#define X_GLrop_Vertex4sv 76
1969
2175
void
1970
2176
__indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
1971
2177
{
1972
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2178
    __GLXcontext *const gc = __glXGetCurrentContext();
1973
2179
    const GLuint cmdlen = 12;
1974
2180
    emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
1975
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2);
1976
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2);
1977
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2);
1978
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2);
 
2181
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
 
2182
    (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
 
2183
    (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
 
2184
    (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
1979
2185
    gc->pc += cmdlen;
1980
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2186
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2187
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2188
    }
1981
2189
}
1982
2190
 
1983
2191
#define X_GLrop_Vertex4sv 76
1984
2192
void
1985
2193
__indirect_glVertex4sv(const GLshort * v)
1986
2194
{
1987
 
    generic_8_byte( X_GLrop_Vertex4sv, v );
 
2195
    generic_8_byte(X_GLrop_Vertex4sv, v);
1988
2196
}
1989
2197
 
1990
2198
#define X_GLrop_ClipPlane 77
1991
2199
void
1992
2200
__indirect_glClipPlane(GLenum plane, const GLdouble * equation)
1993
2201
{
1994
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2202
    __GLXcontext *const gc = __glXGetCurrentContext();
1995
2203
    const GLuint cmdlen = 40;
1996
2204
    emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
1997
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(equation), 32);
1998
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&plane), 4);
 
2205
    (void) memcpy((void *) (gc->pc + 4), (void *) (equation), 32);
 
2206
    (void) memcpy((void *) (gc->pc + 36), (void *) (&plane), 4);
1999
2207
    gc->pc += cmdlen;
2000
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2208
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2209
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2210
    }
2001
2211
}
2002
2212
 
2003
2213
#define X_GLrop_ColorMaterial 78
2004
2214
void
2005
2215
__indirect_glColorMaterial(GLenum face, GLenum mode)
2006
2216
{
2007
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2217
    __GLXcontext *const gc = __glXGetCurrentContext();
2008
2218
    const GLuint cmdlen = 12;
2009
2219
    emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
2010
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2011
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
 
2220
    (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
 
2221
    (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2012
2222
    gc->pc += cmdlen;
2013
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2223
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2224
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2225
    }
2014
2226
}
2015
2227
 
2016
2228
#define X_GLrop_CullFace 79
2017
2229
void
2018
2230
__indirect_glCullFace(GLenum mode)
2019
2231
{
2020
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2232
    __GLXcontext *const gc = __glXGetCurrentContext();
2021
2233
    const GLuint cmdlen = 8;
2022
2234
    emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
2023
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
 
2235
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2024
2236
    gc->pc += cmdlen;
2025
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2237
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2238
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2239
    }
2026
2240
}
2027
2241
 
2028
2242
#define X_GLrop_Fogf 80
2029
2243
void
2030
2244
__indirect_glFogf(GLenum pname, GLfloat param)
2031
2245
{
2032
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2246
    __GLXcontext *const gc = __glXGetCurrentContext();
2033
2247
    const GLuint cmdlen = 12;
2034
2248
    emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
2035
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2036
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
 
2249
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
2250
    (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2037
2251
    gc->pc += cmdlen;
2038
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2252
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2253
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2254
    }
2039
2255
}
2040
2256
 
2041
2257
#define X_GLrop_Fogfv 81
2042
2258
void
2043
2259
__indirect_glFogfv(GLenum pname, const GLfloat * params)
2044
2260
{
2045
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2261
    __GLXcontext *const gc = __glXGetCurrentContext();
2046
2262
    const GLuint compsize = __glFogfv_size(pname);
2047
2263
    const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2048
2264
    emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
2049
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2050
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
 
2265
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
2266
    (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2051
2267
    gc->pc += cmdlen;
2052
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2268
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2269
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2270
    }
2053
2271
}
2054
2272
 
2055
2273
#define X_GLrop_Fogi 82
2056
2274
void
2057
2275
__indirect_glFogi(GLenum pname, GLint param)
2058
2276
{
2059
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2277
    __GLXcontext *const gc = __glXGetCurrentContext();
2060
2278
    const GLuint cmdlen = 12;
2061
2279
    emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
2062
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2063
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
 
2280
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
2281
    (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2064
2282
    gc->pc += cmdlen;
2065
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2283
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2284
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2285
    }
2066
2286
}
2067
2287
 
2068
2288
#define X_GLrop_Fogiv 83
2069
2289
void
2070
2290
__indirect_glFogiv(GLenum pname, const GLint * params)
2071
2291
{
2072
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2292
    __GLXcontext *const gc = __glXGetCurrentContext();
2073
2293
    const GLuint compsize = __glFogiv_size(pname);
2074
2294
    const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2075
2295
    emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
2076
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2077
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
 
2296
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
2297
    (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2078
2298
    gc->pc += cmdlen;
2079
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2299
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2300
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2301
    }
2080
2302
}
2081
2303
 
2082
2304
#define X_GLrop_FrontFace 84
2083
2305
void
2084
2306
__indirect_glFrontFace(GLenum mode)
2085
2307
{
2086
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2308
    __GLXcontext *const gc = __glXGetCurrentContext();
2087
2309
    const GLuint cmdlen = 8;
2088
2310
    emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
2089
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
 
2311
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2090
2312
    gc->pc += cmdlen;
2091
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2313
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2314
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2315
    }
2092
2316
}
2093
2317
 
2094
2318
#define X_GLrop_Hint 85
2095
2319
void
2096
2320
__indirect_glHint(GLenum target, GLenum mode)
2097
2321
{
2098
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2322
    __GLXcontext *const gc = __glXGetCurrentContext();
2099
2323
    const GLuint cmdlen = 12;
2100
2324
    emit_header(gc->pc, X_GLrop_Hint, cmdlen);
2101
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2102
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
 
2325
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
2326
    (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2103
2327
    gc->pc += cmdlen;
2104
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2328
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2329
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2330
    }
2105
2331
}
2106
2332
 
2107
2333
#define X_GLrop_Lightf 86
2108
2334
void
2109
2335
__indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
2110
2336
{
2111
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2337
    __GLXcontext *const gc = __glXGetCurrentContext();
2112
2338
    const GLuint cmdlen = 16;
2113
2339
    emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
2114
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
2115
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2116
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2340
    (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
 
2341
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2342
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2117
2343
    gc->pc += cmdlen;
2118
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2344
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2345
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2346
    }
2119
2347
}
2120
2348
 
2121
2349
#define X_GLrop_Lightfv 87
2122
2350
void
2123
2351
__indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
2124
2352
{
2125
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2353
    __GLXcontext *const gc = __glXGetCurrentContext();
2126
2354
    const GLuint compsize = __glLightfv_size(pname);
2127
2355
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2128
2356
    emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
2129
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
2130
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2131
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2357
    (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
 
2358
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2359
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2132
2360
    gc->pc += cmdlen;
2133
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2361
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2362
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2363
    }
2134
2364
}
2135
2365
 
2136
2366
#define X_GLrop_Lighti 88
2137
2367
void
2138
2368
__indirect_glLighti(GLenum light, GLenum pname, GLint param)
2139
2369
{
2140
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2370
    __GLXcontext *const gc = __glXGetCurrentContext();
2141
2371
    const GLuint cmdlen = 16;
2142
2372
    emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
2143
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
2144
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2145
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2373
    (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
 
2374
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2375
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2146
2376
    gc->pc += cmdlen;
2147
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2377
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2378
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2379
    }
2148
2380
}
2149
2381
 
2150
2382
#define X_GLrop_Lightiv 89
2151
2383
void
2152
2384
__indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
2153
2385
{
2154
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2386
    __GLXcontext *const gc = __glXGetCurrentContext();
2155
2387
    const GLuint compsize = __glLightiv_size(pname);
2156
2388
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2157
2389
    emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
2158
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4);
2159
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2160
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2390
    (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
 
2391
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2392
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2161
2393
    gc->pc += cmdlen;
2162
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2394
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2395
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2396
    }
2163
2397
}
2164
2398
 
2165
2399
#define X_GLrop_LightModelf 90
2166
2400
void
2167
2401
__indirect_glLightModelf(GLenum pname, GLfloat param)
2168
2402
{
2169
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2403
    __GLXcontext *const gc = __glXGetCurrentContext();
2170
2404
    const GLuint cmdlen = 12;
2171
2405
    emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
2172
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2173
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
 
2406
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
2407
    (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2174
2408
    gc->pc += cmdlen;
2175
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2409
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2410
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2411
    }
2176
2412
}
2177
2413
 
2178
2414
#define X_GLrop_LightModelfv 91
2179
2415
void
2180
2416
__indirect_glLightModelfv(GLenum pname, const GLfloat * params)
2181
2417
{
2182
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2418
    __GLXcontext *const gc = __glXGetCurrentContext();
2183
2419
    const GLuint compsize = __glLightModelfv_size(pname);
2184
2420
    const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2185
2421
    emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
2186
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2187
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
 
2422
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
2423
    (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2188
2424
    gc->pc += cmdlen;
2189
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2425
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2426
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2427
    }
2190
2428
}
2191
2429
 
2192
2430
#define X_GLrop_LightModeli 92
2193
2431
void
2194
2432
__indirect_glLightModeli(GLenum pname, GLint param)
2195
2433
{
2196
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2434
    __GLXcontext *const gc = __glXGetCurrentContext();
2197
2435
    const GLuint cmdlen = 12;
2198
2436
    emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
2199
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2200
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
 
2437
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
2438
    (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2201
2439
    gc->pc += cmdlen;
2202
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2440
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2441
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2442
    }
2203
2443
}
2204
2444
 
2205
2445
#define X_GLrop_LightModeliv 93
2206
2446
void
2207
2447
__indirect_glLightModeliv(GLenum pname, const GLint * params)
2208
2448
{
2209
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2449
    __GLXcontext *const gc = __glXGetCurrentContext();
2210
2450
    const GLuint compsize = __glLightModeliv_size(pname);
2211
2451
    const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2212
2452
    emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
2213
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
2214
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
 
2453
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
2454
    (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2215
2455
    gc->pc += cmdlen;
2216
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2456
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2457
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2458
    }
2217
2459
}
2218
2460
 
2219
2461
#define X_GLrop_LineStipple 94
2220
2462
void
2221
2463
__indirect_glLineStipple(GLint factor, GLushort pattern)
2222
2464
{
2223
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2465
    __GLXcontext *const gc = __glXGetCurrentContext();
2224
2466
    const GLuint cmdlen = 12;
2225
2467
    emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
2226
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4);
2227
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pattern), 2);
 
2468
    (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
 
2469
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pattern), 2);
2228
2470
    gc->pc += cmdlen;
2229
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2471
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2472
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2473
    }
2230
2474
}
2231
2475
 
2232
2476
#define X_GLrop_LineWidth 95
2233
2477
void
2234
2478
__indirect_glLineWidth(GLfloat width)
2235
2479
{
2236
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2480
    __GLXcontext *const gc = __glXGetCurrentContext();
2237
2481
    const GLuint cmdlen = 8;
2238
2482
    emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
2239
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&width), 4);
 
2483
    (void) memcpy((void *) (gc->pc + 4), (void *) (&width), 4);
2240
2484
    gc->pc += cmdlen;
2241
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2485
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2486
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2487
    }
2242
2488
}
2243
2489
 
2244
2490
#define X_GLrop_Materialf 96
2245
2491
void
2246
2492
__indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
2247
2493
{
2248
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2494
    __GLXcontext *const gc = __glXGetCurrentContext();
2249
2495
    const GLuint cmdlen = 16;
2250
2496
    emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
2251
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2252
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2253
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2497
    (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
 
2498
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2499
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2254
2500
    gc->pc += cmdlen;
2255
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2501
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2502
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2503
    }
2256
2504
}
2257
2505
 
2258
2506
#define X_GLrop_Materialfv 97
2259
2507
void
2260
2508
__indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
2261
2509
{
2262
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2510
    __GLXcontext *const gc = __glXGetCurrentContext();
2263
2511
    const GLuint compsize = __glMaterialfv_size(pname);
2264
2512
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2265
2513
    emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
2266
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2267
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2268
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2514
    (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
 
2515
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2516
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2269
2517
    gc->pc += cmdlen;
2270
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2518
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2519
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2520
    }
2271
2521
}
2272
2522
 
2273
2523
#define X_GLrop_Materiali 98
2274
2524
void
2275
2525
__indirect_glMateriali(GLenum face, GLenum pname, GLint param)
2276
2526
{
2277
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2527
    __GLXcontext *const gc = __glXGetCurrentContext();
2278
2528
    const GLuint cmdlen = 16;
2279
2529
    emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
2280
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2281
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2282
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2530
    (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
 
2531
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2532
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2283
2533
    gc->pc += cmdlen;
2284
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2534
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2535
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2536
    }
2285
2537
}
2286
2538
 
2287
2539
#define X_GLrop_Materialiv 99
2288
2540
void
2289
2541
__indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
2290
2542
{
2291
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2543
    __GLXcontext *const gc = __glXGetCurrentContext();
2292
2544
    const GLuint compsize = __glMaterialiv_size(pname);
2293
2545
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2294
2546
    emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
2295
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2296
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2297
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2547
    (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
 
2548
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2549
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2298
2550
    gc->pc += cmdlen;
2299
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2551
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2552
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2553
    }
2300
2554
}
2301
2555
 
2302
2556
#define X_GLrop_PointSize 100
2303
2557
void
2304
2558
__indirect_glPointSize(GLfloat size)
2305
2559
{
2306
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2560
    __GLXcontext *const gc = __glXGetCurrentContext();
2307
2561
    const GLuint cmdlen = 8;
2308
2562
    emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
2309
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&size), 4);
 
2563
    (void) memcpy((void *) (gc->pc + 4), (void *) (&size), 4);
2310
2564
    gc->pc += cmdlen;
2311
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2565
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2566
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2567
    }
2312
2568
}
2313
2569
 
2314
2570
#define X_GLrop_PolygonMode 101
2315
2571
void
2316
2572
__indirect_glPolygonMode(GLenum face, GLenum mode)
2317
2573
{
2318
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2574
    __GLXcontext *const gc = __glXGetCurrentContext();
2319
2575
    const GLuint cmdlen = 12;
2320
2576
    emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
2321
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
2322
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4);
 
2577
    (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
 
2578
    (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2323
2579
    gc->pc += cmdlen;
2324
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2580
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2581
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2582
    }
2325
2583
}
2326
2584
 
2327
2585
#define X_GLrop_PolygonStipple 102
2328
2586
void
2329
2587
__indirect_glPolygonStipple(const GLubyte * mask)
2330
2588
{
2331
 
    __GLXcontext * const gc = __glXGetCurrentContext();
2332
 
    const GLuint compsize = (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
 
2589
    __GLXcontext *const gc = __glXGetCurrentContext();
 
2590
    const GLuint compsize =
 
2591
        (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
 
2592
                                       0) : 0;
2333
2593
    const GLuint cmdlen = 24 + __GLX_PAD(compsize);
2334
2594
    emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
2335
2595
    if (compsize > 0) {
2336
 
        (*gc->fillImage)(gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, gc->pc + 24, gc->pc + 4);
2337
 
    }
2338
 
    else {
2339
 
        (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
 
2596
        (*gc->fillImage) (gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask,
 
2597
                          gc->pc + 24, gc->pc + 4);
 
2598
    } else {
 
2599
        (void) memcpy(gc->pc + 4, default_pixel_store_2D,
 
2600
                      default_pixel_store_2D_size);
2340
2601
    }
2341
2602
    gc->pc += cmdlen;
2342
 
    if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2603
    if (gc->pc > gc->limit) {
 
2604
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2605
    }
2343
2606
}
2344
2607
 
2345
2608
#define X_GLrop_Scissor 103
2346
2609
void
2347
2610
__indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
2348
2611
{
2349
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2612
    __GLXcontext *const gc = __glXGetCurrentContext();
2350
2613
    const GLuint cmdlen = 20;
2351
2614
    emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
2352
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
2353
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
2354
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
2355
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
 
2615
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
2616
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
2617
    (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
 
2618
    (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
2356
2619
    gc->pc += cmdlen;
2357
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2620
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2621
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2622
    }
2358
2623
}
2359
2624
 
2360
2625
#define X_GLrop_ShadeModel 104
2361
2626
void
2362
2627
__indirect_glShadeModel(GLenum mode)
2363
2628
{
2364
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2629
    __GLXcontext *const gc = __glXGetCurrentContext();
2365
2630
    const GLuint cmdlen = 8;
2366
2631
    emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
2367
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
 
2632
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2368
2633
    gc->pc += cmdlen;
2369
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2634
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2635
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2636
    }
2370
2637
}
2371
2638
 
2372
2639
#define X_GLrop_TexParameterf 105
2373
2640
void
2374
2641
__indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
2375
2642
{
2376
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2643
    __GLXcontext *const gc = __glXGetCurrentContext();
2377
2644
    const GLuint cmdlen = 16;
2378
2645
    emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
2379
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2380
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2381
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2646
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
2647
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2648
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2382
2649
    gc->pc += cmdlen;
2383
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2650
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2651
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2652
    }
2384
2653
}
2385
2654
 
2386
2655
#define X_GLrop_TexParameterfv 106
2387
2656
void
2388
 
__indirect_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params)
 
2657
__indirect_glTexParameterfv(GLenum target, GLenum pname,
 
2658
                            const GLfloat * params)
2389
2659
{
2390
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2660
    __GLXcontext *const gc = __glXGetCurrentContext();
2391
2661
    const GLuint compsize = __glTexParameterfv_size(pname);
2392
2662
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2393
2663
    emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
2394
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2395
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2396
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2664
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
2665
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2666
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2397
2667
    gc->pc += cmdlen;
2398
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2668
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2669
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2670
    }
2399
2671
}
2400
2672
 
2401
2673
#define X_GLrop_TexParameteri 107
2402
2674
void
2403
2675
__indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
2404
2676
{
2405
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2677
    __GLXcontext *const gc = __glXGetCurrentContext();
2406
2678
    const GLuint cmdlen = 16;
2407
2679
    emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
2408
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2409
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2410
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2680
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
2681
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2682
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2411
2683
    gc->pc += cmdlen;
2412
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2684
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2685
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2686
    }
2413
2687
}
2414
2688
 
2415
2689
#define X_GLrop_TexParameteriv 108
2416
2690
void
2417
2691
__indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
2418
2692
{
2419
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2693
    __GLXcontext *const gc = __glXGetCurrentContext();
2420
2694
    const GLuint compsize = __glTexParameteriv_size(pname);
2421
2695
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2422
2696
    emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
2423
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2424
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2425
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2697
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
2698
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2699
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2426
2700
    gc->pc += cmdlen;
2427
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2701
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2702
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2703
    }
2428
2704
}
2429
2705
 
2430
2706
static void
2431
 
__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 )
 
2707
__glx_TexImage_1D2D(unsigned opcode, unsigned dim, GLenum target, GLint level,
 
2708
                    GLint internalformat, GLsizei width, GLsizei height,
 
2709
                    GLint border, GLenum format, GLenum type,
 
2710
                    const GLvoid * pixels)
2432
2711
{
2433
 
    __GLXcontext * const gc = __glXGetCurrentContext();
2434
 
    const GLuint compsize = __glImageSize(width, height, 1, format, type, target);
 
2712
    __GLXcontext *const gc = __glXGetCurrentContext();
 
2713
    const GLuint compsize =
 
2714
        __glImageSize(width, height, 1, format, type, target);
2435
2715
    const GLuint cmdlen = 56 + __GLX_PAD(compsize);
2436
2716
    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
2437
2717
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
2438
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
2718
            if ((gc->pc + cmdlen) > gc->bufEnd) {
2439
2719
                (void) __glXFlushRenderBuffer(gc, gc->pc);
2440
2720
            }
2441
2721
            emit_header(gc->pc, opcode, cmdlen);
2442
 
            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
2443
 
            (void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4);
2444
 
            (void) memcpy((void *)(gc->pc + 32), (void *)(&internalformat), 4);
2445
 
            (void) memcpy((void *)(gc->pc + 36), (void *)(&width), 4);
2446
 
            (void) memcpy((void *)(gc->pc + 40), (void *)(&height), 4);
2447
 
            (void) memcpy((void *)(gc->pc + 44), (void *)(&border), 4);
2448
 
            (void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4);
2449
 
            (void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4);
 
2722
            (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
 
2723
            (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
 
2724
            (void) memcpy((void *) (gc->pc + 32), (void *) (&internalformat),
 
2725
                          4);
 
2726
            (void) memcpy((void *) (gc->pc + 36), (void *) (&width), 4);
 
2727
            (void) memcpy((void *) (gc->pc + 40), (void *) (&height), 4);
 
2728
            (void) memcpy((void *) (gc->pc + 44), (void *) (&border), 4);
 
2729
            (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
 
2730
            (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
2450
2731
            if ((compsize > 0) && (pixels != NULL)) {
2451
 
                (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 56, gc->pc + 4);
2452
 
            }
2453
 
            else {
2454
 
                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
 
2732
                (*gc->fillImage) (gc, dim, width, height, 1, format, type,
 
2733
                                  pixels, gc->pc + 56, gc->pc + 4);
 
2734
            } else {
 
2735
                (void) memcpy(gc->pc + 4, default_pixel_store_2D,
 
2736
                              default_pixel_store_2D_size);
2455
2737
            }
2456
2738
            gc->pc += cmdlen;
2457
 
            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2458
 
        }
2459
 
        else {
 
2739
            if (gc->pc > gc->limit) {
 
2740
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2741
            }
 
2742
        } else {
2460
2743
            const GLint op = opcode;
2461
2744
            const GLuint cmdlenLarge = cmdlen + 4;
2462
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
2463
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
2464
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
2465
 
            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
2466
 
            (void) memcpy((void *)(pc + 32), (void *)(&level), 4);
2467
 
            (void) memcpy((void *)(pc + 36), (void *)(&internalformat), 4);
2468
 
            (void) memcpy((void *)(pc + 40), (void *)(&width), 4);
2469
 
            (void) memcpy((void *)(pc + 44), (void *)(&height), 4);
2470
 
            (void) memcpy((void *)(pc + 48), (void *)(&border), 4);
2471
 
            (void) memcpy((void *)(pc + 52), (void *)(&format), 4);
2472
 
            (void) memcpy((void *)(pc + 56), (void *)(&type), 4);
2473
 
            __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 60, pc + 8);
 
2745
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
2746
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
2747
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
2748
            (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
 
2749
            (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
 
2750
            (void) memcpy((void *) (pc + 36), (void *) (&internalformat), 4);
 
2751
            (void) memcpy((void *) (pc + 40), (void *) (&width), 4);
 
2752
            (void) memcpy((void *) (pc + 44), (void *) (&height), 4);
 
2753
            (void) memcpy((void *) (pc + 48), (void *) (&border), 4);
 
2754
            (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
 
2755
            (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
 
2756
            __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
 
2757
                                type, pixels, pc + 60, pc + 8);
2474
2758
        }
2475
2759
    }
2476
2760
}
2477
2761
 
2478
2762
#define X_GLrop_TexImage1D 109
2479
2763
void
2480
 
__indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
 
2764
__indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat,
 
2765
                        GLsizei width, GLint border, GLenum format,
 
2766
                        GLenum type, const GLvoid * pixels)
2481
2767
{
2482
 
    __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat, width, 1, border, format, type, pixels );
 
2768
    __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat,
 
2769
                        width, 1, border, format, type, pixels);
2483
2770
}
2484
2771
 
2485
2772
#define X_GLrop_TexImage2D 110
2486
2773
void
2487
 
__indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
 
2774
__indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat,
 
2775
                        GLsizei width, GLsizei height, GLint border,
 
2776
                        GLenum format, GLenum type, const GLvoid * pixels)
2488
2777
{
2489
 
    __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat, width, height, border, format, type, pixels );
 
2778
    __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat,
 
2779
                        width, height, border, format, type, pixels);
2490
2780
}
2491
2781
 
2492
2782
#define X_GLrop_TexEnvf 111
2493
2783
void
2494
2784
__indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
2495
2785
{
2496
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2786
    __GLXcontext *const gc = __glXGetCurrentContext();
2497
2787
    const GLuint cmdlen = 16;
2498
2788
    emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
2499
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2500
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2501
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2789
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
2790
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2791
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2502
2792
    gc->pc += cmdlen;
2503
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2793
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2794
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2795
    }
2504
2796
}
2505
2797
 
2506
2798
#define X_GLrop_TexEnvfv 112
2507
2799
void
2508
2800
__indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
2509
2801
{
2510
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2802
    __GLXcontext *const gc = __glXGetCurrentContext();
2511
2803
    const GLuint compsize = __glTexEnvfv_size(pname);
2512
2804
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2513
2805
    emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
2514
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2515
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2516
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2806
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
2807
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2808
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2517
2809
    gc->pc += cmdlen;
2518
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2810
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2811
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2812
    }
2519
2813
}
2520
2814
 
2521
2815
#define X_GLrop_TexEnvi 113
2522
2816
void
2523
2817
__indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
2524
2818
{
2525
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2819
    __GLXcontext *const gc = __glXGetCurrentContext();
2526
2820
    const GLuint cmdlen = 16;
2527
2821
    emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
2528
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2529
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2530
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2822
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
2823
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2824
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2531
2825
    gc->pc += cmdlen;
2532
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2826
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2827
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2828
    }
2533
2829
}
2534
2830
 
2535
2831
#define X_GLrop_TexEnviv 114
2536
2832
void
2537
2833
__indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
2538
2834
{
2539
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2835
    __GLXcontext *const gc = __glXGetCurrentContext();
2540
2836
    const GLuint compsize = __glTexEnviv_size(pname);
2541
2837
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2542
2838
    emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
2543
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
2544
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2545
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2839
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
2840
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2841
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2546
2842
    gc->pc += cmdlen;
2547
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2843
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2844
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2845
    }
2548
2846
}
2549
2847
 
2550
2848
#define X_GLrop_TexGend 115
2551
2849
void
2552
2850
__indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
2553
2851
{
2554
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2852
    __GLXcontext *const gc = __glXGetCurrentContext();
2555
2853
    const GLuint cmdlen = 20;
2556
2854
    emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
2557
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&param), 8);
2558
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&coord), 4);
2559
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&pname), 4);
 
2855
    (void) memcpy((void *) (gc->pc + 4), (void *) (&param), 8);
 
2856
    (void) memcpy((void *) (gc->pc + 12), (void *) (&coord), 4);
 
2857
    (void) memcpy((void *) (gc->pc + 16), (void *) (&pname), 4);
2560
2858
    gc->pc += cmdlen;
2561
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2859
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2860
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2861
    }
2562
2862
}
2563
2863
 
2564
2864
#define X_GLrop_TexGendv 116
2565
2865
void
2566
2866
__indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
2567
2867
{
2568
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2868
    __GLXcontext *const gc = __glXGetCurrentContext();
2569
2869
    const GLuint compsize = __glTexGendv_size(pname);
2570
2870
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
2571
2871
    emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
2572
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2573
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2574
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 8));
 
2872
    (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
 
2873
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2874
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 8));
2575
2875
    gc->pc += cmdlen;
2576
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2876
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2877
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2878
    }
2577
2879
}
2578
2880
 
2579
2881
#define X_GLrop_TexGenf 117
2580
2882
void
2581
2883
__indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
2582
2884
{
2583
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2885
    __GLXcontext *const gc = __glXGetCurrentContext();
2584
2886
    const GLuint cmdlen = 16;
2585
2887
    emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
2586
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2587
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2588
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2888
    (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
 
2889
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2890
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2589
2891
    gc->pc += cmdlen;
2590
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2892
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2893
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2894
    }
2591
2895
}
2592
2896
 
2593
2897
#define X_GLrop_TexGenfv 118
2594
2898
void
2595
2899
__indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
2596
2900
{
2597
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2901
    __GLXcontext *const gc = __glXGetCurrentContext();
2598
2902
    const GLuint compsize = __glTexGenfv_size(pname);
2599
2903
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2600
2904
    emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
2601
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2602
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2603
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2905
    (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
 
2906
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2907
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2604
2908
    gc->pc += cmdlen;
2605
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2909
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2910
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2911
    }
2606
2912
}
2607
2913
 
2608
2914
#define X_GLrop_TexGeni 119
2609
2915
void
2610
2916
__indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
2611
2917
{
2612
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2918
    __GLXcontext *const gc = __glXGetCurrentContext();
2613
2919
    const GLuint cmdlen = 16;
2614
2920
    emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
2615
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2616
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2617
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&param), 4);
 
2921
    (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
 
2922
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2923
    (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2618
2924
    gc->pc += cmdlen;
2619
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2925
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2926
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2927
    }
2620
2928
}
2621
2929
 
2622
2930
#define X_GLrop_TexGeniv 120
2623
2931
void
2624
2932
__indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
2625
2933
{
2626
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2934
    __GLXcontext *const gc = __glXGetCurrentContext();
2627
2935
    const GLuint compsize = __glTexGeniv_size(pname);
2628
2936
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2629
2937
    emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
2630
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
2631
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
2632
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
2938
    (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
 
2939
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
2940
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2633
2941
    gc->pc += cmdlen;
2634
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2942
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2943
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2944
    }
2635
2945
}
2636
2946
 
2637
2947
#define X_GLrop_InitNames 121
2638
2948
void
2639
2949
__indirect_glInitNames(void)
2640
2950
{
2641
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2951
    __GLXcontext *const gc = __glXGetCurrentContext();
2642
2952
    const GLuint cmdlen = 4;
2643
2953
    emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
2644
2954
    gc->pc += cmdlen;
2645
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2955
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2956
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2957
    }
2646
2958
}
2647
2959
 
2648
2960
#define X_GLrop_LoadName 122
2649
2961
void
2650
2962
__indirect_glLoadName(GLuint name)
2651
2963
{
2652
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2964
    __GLXcontext *const gc = __glXGetCurrentContext();
2653
2965
    const GLuint cmdlen = 8;
2654
2966
    emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
2655
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
 
2967
    (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
2656
2968
    gc->pc += cmdlen;
2657
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2969
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2970
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2971
    }
2658
2972
}
2659
2973
 
2660
2974
#define X_GLrop_PassThrough 123
2661
2975
void
2662
2976
__indirect_glPassThrough(GLfloat token)
2663
2977
{
2664
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2978
    __GLXcontext *const gc = __glXGetCurrentContext();
2665
2979
    const GLuint cmdlen = 8;
2666
2980
    emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
2667
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&token), 4);
 
2981
    (void) memcpy((void *) (gc->pc + 4), (void *) (&token), 4);
2668
2982
    gc->pc += cmdlen;
2669
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2983
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2984
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2985
    }
2670
2986
}
2671
2987
 
2672
2988
#define X_GLrop_PopName 124
2673
2989
void
2674
2990
__indirect_glPopName(void)
2675
2991
{
2676
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
2992
    __GLXcontext *const gc = __glXGetCurrentContext();
2677
2993
    const GLuint cmdlen = 4;
2678
2994
    emit_header(gc->pc, X_GLrop_PopName, cmdlen);
2679
2995
    gc->pc += cmdlen;
2680
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
2996
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
2997
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
2998
    }
2681
2999
}
2682
3000
 
2683
3001
#define X_GLrop_PushName 125
2684
3002
void
2685
3003
__indirect_glPushName(GLuint name)
2686
3004
{
2687
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3005
    __GLXcontext *const gc = __glXGetCurrentContext();
2688
3006
    const GLuint cmdlen = 8;
2689
3007
    emit_header(gc->pc, X_GLrop_PushName, cmdlen);
2690
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
 
3008
    (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
2691
3009
    gc->pc += cmdlen;
2692
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3010
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3011
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3012
    }
2693
3013
}
2694
3014
 
2695
3015
#define X_GLrop_DrawBuffer 126
2696
3016
void
2697
3017
__indirect_glDrawBuffer(GLenum mode)
2698
3018
{
2699
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3019
    __GLXcontext *const gc = __glXGetCurrentContext();
2700
3020
    const GLuint cmdlen = 8;
2701
3021
    emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
2702
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
 
3022
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2703
3023
    gc->pc += cmdlen;
2704
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3024
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3025
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3026
    }
2705
3027
}
2706
3028
 
2707
3029
#define X_GLrop_Clear 127
2708
3030
void
2709
3031
__indirect_glClear(GLbitfield mask)
2710
3032
{
2711
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3033
    __GLXcontext *const gc = __glXGetCurrentContext();
2712
3034
    const GLuint cmdlen = 8;
2713
3035
    emit_header(gc->pc, X_GLrop_Clear, cmdlen);
2714
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
 
3036
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
2715
3037
    gc->pc += cmdlen;
2716
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3038
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3039
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3040
    }
2717
3041
}
2718
3042
 
2719
3043
#define X_GLrop_ClearAccum 128
2720
3044
void
2721
 
__indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
 
3045
__indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue,
 
3046
                        GLfloat alpha)
2722
3047
{
2723
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3048
    __GLXcontext *const gc = __glXGetCurrentContext();
2724
3049
    const GLuint cmdlen = 20;
2725
3050
    emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
2726
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
2727
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
2728
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
2729
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
 
3051
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
3052
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
3053
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
 
3054
    (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
2730
3055
    gc->pc += cmdlen;
2731
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3056
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3057
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3058
    }
2732
3059
}
2733
3060
 
2734
3061
#define X_GLrop_ClearIndex 129
2735
3062
void
2736
3063
__indirect_glClearIndex(GLfloat c)
2737
3064
{
2738
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3065
    __GLXcontext *const gc = __glXGetCurrentContext();
2739
3066
    const GLuint cmdlen = 8;
2740
3067
    emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
2741
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
 
3068
    (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
2742
3069
    gc->pc += cmdlen;
2743
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3070
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3071
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3072
    }
2744
3073
}
2745
3074
 
2746
3075
#define X_GLrop_ClearColor 130
2747
3076
void
2748
 
__indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
 
3077
__indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue,
 
3078
                        GLclampf alpha)
2749
3079
{
2750
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3080
    __GLXcontext *const gc = __glXGetCurrentContext();
2751
3081
    const GLuint cmdlen = 20;
2752
3082
    emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
2753
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
2754
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
2755
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
2756
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
 
3083
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
3084
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
3085
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
 
3086
    (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
2757
3087
    gc->pc += cmdlen;
2758
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3088
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3089
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3090
    }
2759
3091
}
2760
3092
 
2761
3093
#define X_GLrop_ClearStencil 131
2762
3094
void
2763
3095
__indirect_glClearStencil(GLint s)
2764
3096
{
2765
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3097
    __GLXcontext *const gc = __glXGetCurrentContext();
2766
3098
    const GLuint cmdlen = 8;
2767
3099
    emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
2768
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
 
3100
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
2769
3101
    gc->pc += cmdlen;
2770
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3102
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3103
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3104
    }
2771
3105
}
2772
3106
 
2773
3107
#define X_GLrop_ClearDepth 132
2774
3108
void
2775
3109
__indirect_glClearDepth(GLclampd depth)
2776
3110
{
2777
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3111
    __GLXcontext *const gc = __glXGetCurrentContext();
2778
3112
    const GLuint cmdlen = 12;
2779
3113
    emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
2780
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&depth), 8);
 
3114
    (void) memcpy((void *) (gc->pc + 4), (void *) (&depth), 8);
2781
3115
    gc->pc += cmdlen;
2782
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3116
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3117
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3118
    }
2783
3119
}
2784
3120
 
2785
3121
#define X_GLrop_StencilMask 133
2786
3122
void
2787
3123
__indirect_glStencilMask(GLuint mask)
2788
3124
{
2789
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3125
    __GLXcontext *const gc = __glXGetCurrentContext();
2790
3126
    const GLuint cmdlen = 8;
2791
3127
    emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
2792
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
 
3128
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
2793
3129
    gc->pc += cmdlen;
2794
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3130
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3131
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3132
    }
2795
3133
}
2796
3134
 
2797
3135
#define X_GLrop_ColorMask 134
2798
3136
void
2799
 
__indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
 
3137
__indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue,
 
3138
                       GLboolean alpha)
2800
3139
{
2801
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3140
    __GLXcontext *const gc = __glXGetCurrentContext();
2802
3141
    const GLuint cmdlen = 8;
2803
3142
    emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
2804
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
2805
 
    (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
2806
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
2807
 
    (void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1);
 
3143
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
 
3144
    (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
 
3145
    (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
 
3146
    (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
2808
3147
    gc->pc += cmdlen;
2809
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3148
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3149
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3150
    }
2810
3151
}
2811
3152
 
2812
3153
#define X_GLrop_DepthMask 135
2813
3154
void
2814
3155
__indirect_glDepthMask(GLboolean flag)
2815
3156
{
2816
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3157
    __GLXcontext *const gc = __glXGetCurrentContext();
2817
3158
    const GLuint cmdlen = 8;
2818
3159
    emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
2819
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
 
3160
    (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
2820
3161
    gc->pc += cmdlen;
2821
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3162
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3163
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3164
    }
2822
3165
}
2823
3166
 
2824
3167
#define X_GLrop_IndexMask 136
2825
3168
void
2826
3169
__indirect_glIndexMask(GLuint mask)
2827
3170
{
2828
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3171
    __GLXcontext *const gc = __glXGetCurrentContext();
2829
3172
    const GLuint cmdlen = 8;
2830
3173
    emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
2831
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
 
3174
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
2832
3175
    gc->pc += cmdlen;
2833
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3176
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3177
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3178
    }
2834
3179
}
2835
3180
 
2836
3181
#define X_GLrop_Accum 137
2837
3182
void
2838
3183
__indirect_glAccum(GLenum op, GLfloat value)
2839
3184
{
2840
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3185
    __GLXcontext *const gc = __glXGetCurrentContext();
2841
3186
    const GLuint cmdlen = 12;
2842
3187
    emit_header(gc->pc, X_GLrop_Accum, cmdlen);
2843
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&op), 4);
2844
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&value), 4);
 
3188
    (void) memcpy((void *) (gc->pc + 4), (void *) (&op), 4);
 
3189
    (void) memcpy((void *) (gc->pc + 8), (void *) (&value), 4);
2845
3190
    gc->pc += cmdlen;
2846
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3191
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3192
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3193
    }
2847
3194
}
2848
3195
 
2849
3196
#define X_GLrop_PopAttrib 141
2850
3197
void
2851
3198
__indirect_glPopAttrib(void)
2852
3199
{
2853
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3200
    __GLXcontext *const gc = __glXGetCurrentContext();
2854
3201
    const GLuint cmdlen = 4;
2855
3202
    emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
2856
3203
    gc->pc += cmdlen;
2857
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3204
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3205
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3206
    }
2858
3207
}
2859
3208
 
2860
3209
#define X_GLrop_PushAttrib 142
2861
3210
void
2862
3211
__indirect_glPushAttrib(GLbitfield mask)
2863
3212
{
2864
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3213
    __GLXcontext *const gc = __glXGetCurrentContext();
2865
3214
    const GLuint cmdlen = 8;
2866
3215
    emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
2867
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
 
3216
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
2868
3217
    gc->pc += cmdlen;
2869
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3218
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3219
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3220
    }
2870
3221
}
2871
3222
 
2872
3223
#define X_GLrop_MapGrid1d 147
2873
3224
void
2874
3225
__indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
2875
3226
{
2876
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3227
    __GLXcontext *const gc = __glXGetCurrentContext();
2877
3228
    const GLuint cmdlen = 24;
2878
3229
    emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
2879
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8);
2880
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8);
2881
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&un), 4);
 
3230
    (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
 
3231
    (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
 
3232
    (void) memcpy((void *) (gc->pc + 20), (void *) (&un), 4);
2882
3233
    gc->pc += cmdlen;
2883
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3234
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3235
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3236
    }
2884
3237
}
2885
3238
 
2886
3239
#define X_GLrop_MapGrid1f 148
2887
3240
void
2888
3241
__indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
2889
3242
{
2890
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3243
    __GLXcontext *const gc = __glXGetCurrentContext();
2891
3244
    const GLuint cmdlen = 16;
2892
3245
    emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
2893
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4);
2894
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4);
2895
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4);
 
3246
    (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
 
3247
    (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
 
3248
    (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
2896
3249
    gc->pc += cmdlen;
2897
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3250
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3251
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3252
    }
2898
3253
}
2899
3254
 
2900
3255
#define X_GLrop_MapGrid2d 149
2901
3256
void
2902
 
__indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
 
3257
__indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn,
 
3258
                       GLdouble v1, GLdouble v2)
2903
3259
{
2904
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3260
    __GLXcontext *const gc = __glXGetCurrentContext();
2905
3261
    const GLuint cmdlen = 44;
2906
3262
    emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
2907
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8);
2908
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8);
2909
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 8);
2910
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&v2), 8);
2911
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&un), 4);
2912
 
    (void) memcpy((void *)(gc->pc + 40), (void *)(&vn), 4);
 
3263
    (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
 
3264
    (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
 
3265
    (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 8);
 
3266
    (void) memcpy((void *) (gc->pc + 28), (void *) (&v2), 8);
 
3267
    (void) memcpy((void *) (gc->pc + 36), (void *) (&un), 4);
 
3268
    (void) memcpy((void *) (gc->pc + 40), (void *) (&vn), 4);
2913
3269
    gc->pc += cmdlen;
2914
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3270
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3271
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3272
    }
2915
3273
}
2916
3274
 
2917
3275
#define X_GLrop_MapGrid2f 150
2918
3276
void
2919
 
__indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
 
3277
__indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
 
3278
                       GLfloat v2)
2920
3279
{
2921
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3280
    __GLXcontext *const gc = __glXGetCurrentContext();
2922
3281
    const GLuint cmdlen = 28;
2923
3282
    emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
2924
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4);
2925
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4);
2926
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4);
2927
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&vn), 4);
2928
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 4);
2929
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&v2), 4);
 
3283
    (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
 
3284
    (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
 
3285
    (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
 
3286
    (void) memcpy((void *) (gc->pc + 16), (void *) (&vn), 4);
 
3287
    (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 4);
 
3288
    (void) memcpy((void *) (gc->pc + 24), (void *) (&v2), 4);
2930
3289
    gc->pc += cmdlen;
2931
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3290
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3291
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3292
    }
2932
3293
}
2933
3294
 
2934
3295
#define X_GLrop_EvalCoord1dv 151
2935
3296
void
2936
3297
__indirect_glEvalCoord1d(GLdouble u)
2937
3298
{
2938
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3299
    __GLXcontext *const gc = __glXGetCurrentContext();
2939
3300
    const GLuint cmdlen = 12;
2940
3301
    emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
2941
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8);
 
3302
    (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
2942
3303
    gc->pc += cmdlen;
2943
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3304
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3305
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3306
    }
2944
3307
}
2945
3308
 
2946
3309
#define X_GLrop_EvalCoord1dv 151
2947
3310
void
2948
3311
__indirect_glEvalCoord1dv(const GLdouble * u)
2949
3312
{
2950
 
    generic_8_byte( X_GLrop_EvalCoord1dv, u );
 
3313
    generic_8_byte(X_GLrop_EvalCoord1dv, u);
2951
3314
}
2952
3315
 
2953
3316
#define X_GLrop_EvalCoord1fv 152
2954
3317
void
2955
3318
__indirect_glEvalCoord1f(GLfloat u)
2956
3319
{
2957
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3320
    __GLXcontext *const gc = __glXGetCurrentContext();
2958
3321
    const GLuint cmdlen = 8;
2959
3322
    emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
2960
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4);
 
3323
    (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
2961
3324
    gc->pc += cmdlen;
2962
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3325
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3326
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3327
    }
2963
3328
}
2964
3329
 
2965
3330
#define X_GLrop_EvalCoord1fv 152
2966
3331
void
2967
3332
__indirect_glEvalCoord1fv(const GLfloat * u)
2968
3333
{
2969
 
    generic_4_byte( X_GLrop_EvalCoord1fv, u );
 
3334
    generic_4_byte(X_GLrop_EvalCoord1fv, u);
2970
3335
}
2971
3336
 
2972
3337
#define X_GLrop_EvalCoord2dv 153
2973
3338
void
2974
3339
__indirect_glEvalCoord2d(GLdouble u, GLdouble v)
2975
3340
{
2976
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3341
    __GLXcontext *const gc = __glXGetCurrentContext();
2977
3342
    const GLuint cmdlen = 20;
2978
3343
    emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
2979
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8);
2980
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&v), 8);
 
3344
    (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
 
3345
    (void) memcpy((void *) (gc->pc + 12), (void *) (&v), 8);
2981
3346
    gc->pc += cmdlen;
2982
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3347
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3348
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3349
    }
2983
3350
}
2984
3351
 
2985
3352
#define X_GLrop_EvalCoord2dv 153
2986
3353
void
2987
3354
__indirect_glEvalCoord2dv(const GLdouble * u)
2988
3355
{
2989
 
    generic_16_byte( X_GLrop_EvalCoord2dv, u );
 
3356
    generic_16_byte(X_GLrop_EvalCoord2dv, u);
2990
3357
}
2991
3358
 
2992
3359
#define X_GLrop_EvalCoord2fv 154
2993
3360
void
2994
3361
__indirect_glEvalCoord2f(GLfloat u, GLfloat v)
2995
3362
{
2996
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3363
    __GLXcontext *const gc = __glXGetCurrentContext();
2997
3364
    const GLuint cmdlen = 12;
2998
3365
    emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
2999
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4);
3000
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&v), 4);
 
3366
    (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
 
3367
    (void) memcpy((void *) (gc->pc + 8), (void *) (&v), 4);
3001
3368
    gc->pc += cmdlen;
3002
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3369
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3370
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3371
    }
3003
3372
}
3004
3373
 
3005
3374
#define X_GLrop_EvalCoord2fv 154
3006
3375
void
3007
3376
__indirect_glEvalCoord2fv(const GLfloat * u)
3008
3377
{
3009
 
    generic_8_byte( X_GLrop_EvalCoord2fv, u );
 
3378
    generic_8_byte(X_GLrop_EvalCoord2fv, u);
3010
3379
}
3011
3380
 
3012
3381
#define X_GLrop_EvalMesh1 155
3013
3382
void
3014
3383
__indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
3015
3384
{
3016
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3385
    __GLXcontext *const gc = __glXGetCurrentContext();
3017
3386
    const GLuint cmdlen = 16;
3018
3387
    emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
3019
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
3020
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4);
3021
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4);
 
3388
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
 
3389
    (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
 
3390
    (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3022
3391
    gc->pc += cmdlen;
3023
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3392
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3393
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3394
    }
3024
3395
}
3025
3396
 
3026
3397
#define X_GLrop_EvalPoint1 156
3027
3398
void
3028
3399
__indirect_glEvalPoint1(GLint i)
3029
3400
{
3030
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3401
    __GLXcontext *const gc = __glXGetCurrentContext();
3031
3402
    const GLuint cmdlen = 8;
3032
3403
    emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
3033
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4);
 
3404
    (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3034
3405
    gc->pc += cmdlen;
3035
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3406
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3407
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3408
    }
3036
3409
}
3037
3410
 
3038
3411
#define X_GLrop_EvalMesh2 157
3039
3412
void
3040
3413
__indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
3041
3414
{
3042
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3415
    __GLXcontext *const gc = __glXGetCurrentContext();
3043
3416
    const GLuint cmdlen = 24;
3044
3417
    emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
3045
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
3046
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4);
3047
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4);
3048
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&j1), 4);
3049
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&j2), 4);
 
3418
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
 
3419
    (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
 
3420
    (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
 
3421
    (void) memcpy((void *) (gc->pc + 16), (void *) (&j1), 4);
 
3422
    (void) memcpy((void *) (gc->pc + 20), (void *) (&j2), 4);
3050
3423
    gc->pc += cmdlen;
3051
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3424
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3425
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3426
    }
3052
3427
}
3053
3428
 
3054
3429
#define X_GLrop_EvalPoint2 158
3055
3430
void
3056
3431
__indirect_glEvalPoint2(GLint i, GLint j)
3057
3432
{
3058
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3433
    __GLXcontext *const gc = __glXGetCurrentContext();
3059
3434
    const GLuint cmdlen = 12;
3060
3435
    emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
3061
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4);
3062
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&j), 4);
 
3436
    (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
 
3437
    (void) memcpy((void *) (gc->pc + 8), (void *) (&j), 4);
3063
3438
    gc->pc += cmdlen;
3064
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3439
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3440
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3441
    }
3065
3442
}
3066
3443
 
3067
3444
#define X_GLrop_AlphaFunc 159
3068
3445
void
3069
3446
__indirect_glAlphaFunc(GLenum func, GLclampf ref)
3070
3447
{
3071
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3448
    __GLXcontext *const gc = __glXGetCurrentContext();
3072
3449
    const GLuint cmdlen = 12;
3073
3450
    emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
3074
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
3075
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4);
 
3451
    (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
 
3452
    (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3076
3453
    gc->pc += cmdlen;
3077
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3454
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3455
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3456
    }
3078
3457
}
3079
3458
 
3080
3459
#define X_GLrop_BlendFunc 160
3081
3460
void
3082
3461
__indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
3083
3462
{
3084
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3463
    __GLXcontext *const gc = __glXGetCurrentContext();
3085
3464
    const GLuint cmdlen = 12;
3086
3465
    emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
3087
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&sfactor), 4);
3088
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&dfactor), 4);
 
3466
    (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactor), 4);
 
3467
    (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactor), 4);
3089
3468
    gc->pc += cmdlen;
3090
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3469
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3470
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3471
    }
3091
3472
}
3092
3473
 
3093
3474
#define X_GLrop_LogicOp 161
3094
3475
void
3095
3476
__indirect_glLogicOp(GLenum opcode)
3096
3477
{
3097
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3478
    __GLXcontext *const gc = __glXGetCurrentContext();
3098
3479
    const GLuint cmdlen = 8;
3099
3480
    emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
3100
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&opcode), 4);
 
3481
    (void) memcpy((void *) (gc->pc + 4), (void *) (&opcode), 4);
3101
3482
    gc->pc += cmdlen;
3102
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3483
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3484
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3485
    }
3103
3486
}
3104
3487
 
3105
3488
#define X_GLrop_StencilFunc 162
3106
3489
void
3107
3490
__indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
3108
3491
{
3109
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3492
    __GLXcontext *const gc = __glXGetCurrentContext();
3110
3493
    const GLuint cmdlen = 16;
3111
3494
    emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
3112
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
3113
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4);
3114
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&mask), 4);
 
3495
    (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
 
3496
    (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
 
3497
    (void) memcpy((void *) (gc->pc + 12), (void *) (&mask), 4);
3115
3498
    gc->pc += cmdlen;
3116
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3499
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3500
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3501
    }
3117
3502
}
3118
3503
 
3119
3504
#define X_GLrop_StencilOp 163
3120
3505
void
3121
3506
__indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
3122
3507
{
3123
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3508
    __GLXcontext *const gc = __glXGetCurrentContext();
3124
3509
    const GLuint cmdlen = 16;
3125
3510
    emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
3126
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&fail), 4);
3127
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&zfail), 4);
3128
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&zpass), 4);
 
3511
    (void) memcpy((void *) (gc->pc + 4), (void *) (&fail), 4);
 
3512
    (void) memcpy((void *) (gc->pc + 8), (void *) (&zfail), 4);
 
3513
    (void) memcpy((void *) (gc->pc + 12), (void *) (&zpass), 4);
3129
3514
    gc->pc += cmdlen;
3130
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3515
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3516
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3517
    }
3131
3518
}
3132
3519
 
3133
3520
#define X_GLrop_DepthFunc 164
3134
3521
void
3135
3522
__indirect_glDepthFunc(GLenum func)
3136
3523
{
3137
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3524
    __GLXcontext *const gc = __glXGetCurrentContext();
3138
3525
    const GLuint cmdlen = 8;
3139
3526
    emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
3140
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
 
3527
    (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3141
3528
    gc->pc += cmdlen;
3142
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3529
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3530
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3531
    }
3143
3532
}
3144
3533
 
3145
3534
#define X_GLrop_PixelZoom 165
3146
3535
void
3147
3536
__indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
3148
3537
{
3149
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3538
    __GLXcontext *const gc = __glXGetCurrentContext();
3150
3539
    const GLuint cmdlen = 12;
3151
3540
    emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
3152
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&xfactor), 4);
3153
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&yfactor), 4);
 
3541
    (void) memcpy((void *) (gc->pc + 4), (void *) (&xfactor), 4);
 
3542
    (void) memcpy((void *) (gc->pc + 8), (void *) (&yfactor), 4);
3154
3543
    gc->pc += cmdlen;
3155
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3544
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3545
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3546
    }
3156
3547
}
3157
3548
 
3158
3549
#define X_GLrop_PixelTransferf 166
3159
3550
void
3160
3551
__indirect_glPixelTransferf(GLenum pname, GLfloat param)
3161
3552
{
3162
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3553
    __GLXcontext *const gc = __glXGetCurrentContext();
3163
3554
    const GLuint cmdlen = 12;
3164
3555
    emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
3165
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
3166
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
 
3556
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
3557
    (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3167
3558
    gc->pc += cmdlen;
3168
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3559
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3560
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3561
    }
3169
3562
}
3170
3563
 
3171
3564
#define X_GLrop_PixelTransferi 167
3172
3565
void
3173
3566
__indirect_glPixelTransferi(GLenum pname, GLint param)
3174
3567
{
3175
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3568
    __GLXcontext *const gc = __glXGetCurrentContext();
3176
3569
    const GLuint cmdlen = 12;
3177
3570
    emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
3178
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
3179
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
 
3571
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
3572
    (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3180
3573
    gc->pc += cmdlen;
3181
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3574
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3575
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3576
    }
3182
3577
}
3183
3578
 
3184
3579
#define X_GLrop_PixelMapfv 168
3185
3580
void
3186
3581
__indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
3187
3582
{
3188
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3583
    __GLXcontext *const gc = __glXGetCurrentContext();
3189
3584
    const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3190
3585
    if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3191
3586
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
3192
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
3587
            if ((gc->pc + cmdlen) > gc->bufEnd) {
3193
3588
                (void) __glXFlushRenderBuffer(gc, gc->pc);
3194
3589
            }
3195
3590
            emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
3196
 
            (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
3197
 
            (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
3198
 
            (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4));
 
3591
            (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
 
3592
            (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
 
3593
            (void) memcpy((void *) (gc->pc + 12), (void *) (values),
 
3594
                          (mapsize * 4));
3199
3595
            gc->pc += cmdlen;
3200
 
            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3201
 
        }
3202
 
        else {
 
3596
            if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3597
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3598
            }
 
3599
        } else {
3203
3600
            const GLint op = X_GLrop_PixelMapfv;
3204
3601
            const GLuint cmdlenLarge = cmdlen + 4;
3205
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
3206
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
3207
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
3208
 
            (void) memcpy((void *)(pc + 8), (void *)(&map), 4);
3209
 
            (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
 
3602
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
3603
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
3604
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
3605
            (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
 
3606
            (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3210
3607
            __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3211
3608
        }
3212
3609
    }
3216
3613
void
3217
3614
__indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
3218
3615
{
3219
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3616
    __GLXcontext *const gc = __glXGetCurrentContext();
3220
3617
    const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3221
3618
    if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3222
3619
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
3223
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
3620
            if ((gc->pc + cmdlen) > gc->bufEnd) {
3224
3621
                (void) __glXFlushRenderBuffer(gc, gc->pc);
3225
3622
            }
3226
3623
            emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
3227
 
            (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
3228
 
            (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
3229
 
            (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4));
 
3624
            (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
 
3625
            (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
 
3626
            (void) memcpy((void *) (gc->pc + 12), (void *) (values),
 
3627
                          (mapsize * 4));
3230
3628
            gc->pc += cmdlen;
3231
 
            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3232
 
        }
3233
 
        else {
 
3629
            if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3630
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3631
            }
 
3632
        } else {
3234
3633
            const GLint op = X_GLrop_PixelMapuiv;
3235
3634
            const GLuint cmdlenLarge = cmdlen + 4;
3236
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
3237
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
3238
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
3239
 
            (void) memcpy((void *)(pc + 8), (void *)(&map), 4);
3240
 
            (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
 
3635
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
3636
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
3637
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
3638
            (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
 
3639
            (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3241
3640
            __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3242
3641
        }
3243
3642
    }
3247
3646
void
3248
3647
__indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
3249
3648
{
3250
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3649
    __GLXcontext *const gc = __glXGetCurrentContext();
3251
3650
    const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
3252
3651
    if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3253
3652
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
3254
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
3653
            if ((gc->pc + cmdlen) > gc->bufEnd) {
3255
3654
                (void) __glXFlushRenderBuffer(gc, gc->pc);
3256
3655
            }
3257
3656
            emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
3258
 
            (void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4);
3259
 
            (void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4);
3260
 
            (void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 2));
 
3657
            (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
 
3658
            (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
 
3659
            (void) memcpy((void *) (gc->pc + 12), (void *) (values),
 
3660
                          (mapsize * 2));
3261
3661
            gc->pc += cmdlen;
3262
 
            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3263
 
        }
3264
 
        else {
 
3662
            if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3663
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3664
            }
 
3665
        } else {
3265
3666
            const GLint op = X_GLrop_PixelMapusv;
3266
3667
            const GLuint cmdlenLarge = cmdlen + 4;
3267
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
3268
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
3269
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
3270
 
            (void) memcpy((void *)(pc + 8), (void *)(&map), 4);
3271
 
            (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4);
 
3668
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
3669
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
3670
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
3671
            (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
 
3672
            (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3272
3673
            __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
3273
3674
        }
3274
3675
    }
3278
3679
void
3279
3680
__indirect_glReadBuffer(GLenum mode)
3280
3681
{
3281
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3682
    __GLXcontext *const gc = __glXGetCurrentContext();
3282
3683
    const GLuint cmdlen = 8;
3283
3684
    emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
3284
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
 
3685
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3285
3686
    gc->pc += cmdlen;
3286
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3687
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3688
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3689
    }
3287
3690
}
3288
3691
 
3289
3692
#define X_GLrop_CopyPixels 172
3290
3693
void
3291
 
__indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
 
3694
__indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height,
 
3695
                        GLenum type)
3292
3696
{
3293
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
3697
    __GLXcontext *const gc = __glXGetCurrentContext();
3294
3698
    const GLuint cmdlen = 24;
3295
3699
    emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
3296
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
3297
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
3298
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
3299
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
3300
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&type), 4);
 
3700
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
3701
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
3702
    (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
 
3703
    (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
 
3704
    (void) memcpy((void *) (gc->pc + 20), (void *) (&type), 4);
3301
3705
    gc->pc += cmdlen;
3302
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
3706
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
3707
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3708
    }
3303
3709
}
3304
3710
 
3305
3711
#define X_GLsop_ReadPixels 111
3306
3712
void
3307
 
__indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels)
 
3713
__indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
 
3714
                        GLenum format, GLenum type, GLvoid * pixels)
3308
3715
{
3309
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3310
 
    const __GLXattribute * const state = gc->client_state_private;
3311
 
    Display * const dpy = gc->currentDpy;
 
3716
    __GLXcontext *const gc = __glXGetCurrentContext();
 
3717
    const __GLXattribute *const state = gc->client_state_private;
 
3718
    Display *const dpy = gc->currentDpy;
3312
3719
    const GLuint cmdlen = 28;
3313
3720
    if (__builtin_expect(dpy != NULL, 1)) {
3314
3721
#ifdef USE_XCB
3315
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
3722
        xcb_connection_t *c = XGetXCBConnection(dpy);
3316
3723
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3317
 
        XCBGlxReadPixelsRep *reply = XCBGlxReadPixelsReply(c, XCBGlxReadPixels(c, gc->currentContextTag, x, y, width, height, format, type, state->storePack.swapEndian, 0), NULL);
3318
 
        (void)memcpy(pixels, XCBGlxReadPixelsData(reply), XCBGlxReadPixelsDataLength(reply) * sizeof(GLvoid));
 
3724
        xcb_glx_read_pixels_reply_t *reply =
 
3725
            xcb_glx_read_pixels_reply(c,
 
3726
                                      xcb_glx_read_pixels(c,
 
3727
                                                          gc->
 
3728
                                                          currentContextTag,
 
3729
                                                          x, y, width, height,
 
3730
                                                          format, type,
 
3731
                                                          state->storePack.
 
3732
                                                          swapEndian, 0),
 
3733
                                      NULL);
 
3734
        (void) memcpy(pixels, xcb_glx_read_pixels_data(reply),
 
3735
                      xcb_glx_read_pixels_data_length(reply) *
 
3736
                      sizeof(GLvoid));
3319
3737
        free(reply);
3320
3738
#else
3321
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
3322
 
        (void) memcpy((void *)(pc + 0), (void *)(&x), 4);
3323
 
        (void) memcpy((void *)(pc + 4), (void *)(&y), 4);
3324
 
        (void) memcpy((void *)(pc + 8), (void *)(&width), 4);
3325
 
        (void) memcpy((void *)(pc + 12), (void *)(&height), 4);
3326
 
        (void) memcpy((void *)(pc + 16), (void *)(&format), 4);
3327
 
        (void) memcpy((void *)(pc + 20), (void *)(&type), 4);
3328
 
        *(int32_t *)(pc + 24) = 0;
3329
 
        * (int8_t *)(pc + 24) = state->storePack.swapEndian;
3330
 
        __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type, pixels, GL_FALSE);
3331
 
        UnlockDisplay(dpy); SyncHandle();
 
3739
        GLubyte const *pc =
 
3740
            __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
 
3741
        (void) memcpy((void *) (pc + 0), (void *) (&x), 4);
 
3742
        (void) memcpy((void *) (pc + 4), (void *) (&y), 4);
 
3743
        (void) memcpy((void *) (pc + 8), (void *) (&width), 4);
 
3744
        (void) memcpy((void *) (pc + 12), (void *) (&height), 4);
 
3745
        (void) memcpy((void *) (pc + 16), (void *) (&format), 4);
 
3746
        (void) memcpy((void *) (pc + 20), (void *) (&type), 4);
 
3747
        *(int32_t *) (pc + 24) = 0;
 
3748
        *(int8_t *) (pc + 24) = state->storePack.swapEndian;
 
3749
        __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type,
 
3750
                            pixels, GL_FALSE);
 
3751
        UnlockDisplay(dpy);
 
3752
        SyncHandle();
3332
3753
#endif /* USE_XCB */
3333
3754
    }
3334
3755
    return;
3336
3757
 
3337
3758
#define X_GLrop_DrawPixels 173
3338
3759
void
3339
 
__indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
 
3760
__indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format,
 
3761
                        GLenum type, const GLvoid * pixels)
3340
3762
{
3341
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3342
 
    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, 0) : 0;
 
3763
    __GLXcontext *const gc = __glXGetCurrentContext();
 
3764
    const GLuint compsize =
 
3765
        (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
 
3766
                                         0) : 0;
3343
3767
    const GLuint cmdlen = 40 + __GLX_PAD(compsize);
3344
3768
    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
3345
3769
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
3346
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
3770
            if ((gc->pc + cmdlen) > gc->bufEnd) {
3347
3771
                (void) __glXFlushRenderBuffer(gc, gc->pc);
3348
3772
            }
3349
3773
            emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
3350
 
            (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
3351
 
            (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
3352
 
            (void) memcpy((void *)(gc->pc + 32), (void *)(&format), 4);
3353
 
            (void) memcpy((void *)(gc->pc + 36), (void *)(&type), 4);
 
3774
            (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
 
3775
            (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
 
3776
            (void) memcpy((void *) (gc->pc + 32), (void *) (&format), 4);
 
3777
            (void) memcpy((void *) (gc->pc + 36), (void *) (&type), 4);
3354
3778
            if (compsize > 0) {
3355
 
                (*gc->fillImage)(gc, 2, width, height, 1, format, type, pixels, gc->pc + 40, gc->pc + 4);
3356
 
            }
3357
 
            else {
3358
 
                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
 
3779
                (*gc->fillImage) (gc, 2, width, height, 1, format, type,
 
3780
                                  pixels, gc->pc + 40, gc->pc + 4);
 
3781
            } else {
 
3782
                (void) memcpy(gc->pc + 4, default_pixel_store_2D,
 
3783
                              default_pixel_store_2D_size);
3359
3784
            }
3360
3785
            gc->pc += cmdlen;
3361
 
            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3362
 
        }
3363
 
        else {
 
3786
            if (gc->pc > gc->limit) {
 
3787
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
3788
            }
 
3789
        } else {
3364
3790
            const GLint op = X_GLrop_DrawPixels;
3365
3791
            const GLuint cmdlenLarge = cmdlen + 4;
3366
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
3367
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
3368
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
3369
 
            (void) memcpy((void *)(pc + 28), (void *)(&width), 4);
3370
 
            (void) memcpy((void *)(pc + 32), (void *)(&height), 4);
3371
 
            (void) memcpy((void *)(pc + 36), (void *)(&format), 4);
3372
 
            (void) memcpy((void *)(pc + 40), (void *)(&type), 4);
3373
 
            __glXSendLargeImage(gc, compsize, 2, width, height, 1, format, type, pixels, pc + 44, pc + 8);
 
3792
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
3793
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
3794
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
3795
            (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
 
3796
            (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
 
3797
            (void) memcpy((void *) (pc + 36), (void *) (&format), 4);
 
3798
            (void) memcpy((void *) (pc + 40), (void *) (&type), 4);
 
3799
            __glXSendLargeImage(gc, compsize, 2, width, height, 1, format,
 
3800
                                type, pixels, pc + 44, pc + 8);
3374
3801
        }
3375
3802
    }
3376
3803
}
3379
3806
void
3380
3807
__indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
3381
3808
{
3382
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3383
 
    Display * const dpy = gc->currentDpy;
 
3809
    __GLXcontext *const gc = __glXGetCurrentContext();
 
3810
    Display *const dpy = gc->currentDpy;
3384
3811
    const GLuint cmdlen = 4;
3385
3812
    if (__builtin_expect(dpy != NULL, 1)) {
3386
3813
#ifdef USE_XCB
3387
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
3814
        xcb_connection_t *c = XGetXCBConnection(dpy);
3388
3815
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3389
 
        XCBGlxGetClipPlaneRep *reply = XCBGlxGetClipPlaneReply(c, XCBGlxGetClipPlane(c, gc->currentContextTag, plane), NULL);
3390
 
        (void)memcpy(equation, XCBGlxGetClipPlaneData(reply), XCBGlxGetClipPlaneDataLength(reply) * sizeof(GLdouble));
 
3816
        xcb_glx_get_clip_plane_reply_t *reply =
 
3817
            xcb_glx_get_clip_plane_reply(c,
 
3818
                                         xcb_glx_get_clip_plane(c,
 
3819
                                                                gc->
 
3820
                                                                currentContextTag,
 
3821
                                                                plane), NULL);
 
3822
        (void) memcpy(equation, xcb_glx_get_clip_plane_data(reply),
 
3823
                      xcb_glx_get_clip_plane_data_length(reply) *
 
3824
                      sizeof(GLdouble));
3391
3825
        free(reply);
3392
3826
#else
3393
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
3394
 
        (void) memcpy((void *)(pc + 0), (void *)(&plane), 4);
 
3827
        GLubyte const *pc =
 
3828
            __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
 
3829
        (void) memcpy((void *) (pc + 0), (void *) (&plane), 4);
3395
3830
        (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
3396
 
        UnlockDisplay(dpy); SyncHandle();
 
3831
        UnlockDisplay(dpy);
 
3832
        SyncHandle();
3397
3833
#endif /* USE_XCB */
3398
3834
    }
3399
3835
    return;
3403
3839
void
3404
3840
__indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
3405
3841
{
3406
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3407
 
    Display * const dpy = gc->currentDpy;
 
3842
    __GLXcontext *const gc = __glXGetCurrentContext();
 
3843
    Display *const dpy = gc->currentDpy;
3408
3844
    const GLuint cmdlen = 8;
3409
3845
    if (__builtin_expect(dpy != NULL, 1)) {
3410
3846
#ifdef USE_XCB
3411
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
3847
        xcb_connection_t *c = XGetXCBConnection(dpy);
3412
3848
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3413
 
        XCBGlxGetLightfvRep *reply = XCBGlxGetLightfvReply(c, XCBGlxGetLightfv(c, gc->currentContextTag, light, pname), NULL);
3414
 
        if (XCBGlxGetLightfvDataLength(reply) == 0)
3415
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
3849
        xcb_glx_get_lightfv_reply_t *reply =
 
3850
            xcb_glx_get_lightfv_reply(c,
 
3851
                                      xcb_glx_get_lightfv(c,
 
3852
                                                          gc->
 
3853
                                                          currentContextTag,
 
3854
                                                          light, pname),
 
3855
                                      NULL);
 
3856
        if (xcb_glx_get_lightfv_data_length(reply) == 0)
 
3857
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3416
3858
        else
3417
 
        (void)memcpy(params, XCBGlxGetLightfvData(reply), XCBGlxGetLightfvDataLength(reply) * sizeof(GLfloat));
 
3859
            (void) memcpy(params, xcb_glx_get_lightfv_data(reply),
 
3860
                          xcb_glx_get_lightfv_data_length(reply) *
 
3861
                          sizeof(GLfloat));
3418
3862
        free(reply);
3419
3863
#else
3420
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
3421
 
        (void) memcpy((void *)(pc + 0), (void *)(&light), 4);
3422
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
3864
        GLubyte const *pc =
 
3865
            __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
 
3866
        (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
 
3867
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3423
3868
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3424
 
        UnlockDisplay(dpy); SyncHandle();
 
3869
        UnlockDisplay(dpy);
 
3870
        SyncHandle();
3425
3871
#endif /* USE_XCB */
3426
3872
    }
3427
3873
    return;
3431
3877
void
3432
3878
__indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
3433
3879
{
3434
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3435
 
    Display * const dpy = gc->currentDpy;
 
3880
    __GLXcontext *const gc = __glXGetCurrentContext();
 
3881
    Display *const dpy = gc->currentDpy;
3436
3882
    const GLuint cmdlen = 8;
3437
3883
    if (__builtin_expect(dpy != NULL, 1)) {
3438
3884
#ifdef USE_XCB
3439
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
3885
        xcb_connection_t *c = XGetXCBConnection(dpy);
3440
3886
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3441
 
        XCBGlxGetLightivRep *reply = XCBGlxGetLightivReply(c, XCBGlxGetLightiv(c, gc->currentContextTag, light, pname), NULL);
3442
 
        if (XCBGlxGetLightivDataLength(reply) == 0)
3443
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
3887
        xcb_glx_get_lightiv_reply_t *reply =
 
3888
            xcb_glx_get_lightiv_reply(c,
 
3889
                                      xcb_glx_get_lightiv(c,
 
3890
                                                          gc->
 
3891
                                                          currentContextTag,
 
3892
                                                          light, pname),
 
3893
                                      NULL);
 
3894
        if (xcb_glx_get_lightiv_data_length(reply) == 0)
 
3895
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3444
3896
        else
3445
 
        (void)memcpy(params, XCBGlxGetLightivData(reply), XCBGlxGetLightivDataLength(reply) * sizeof(GLint));
 
3897
            (void) memcpy(params, xcb_glx_get_lightiv_data(reply),
 
3898
                          xcb_glx_get_lightiv_data_length(reply) *
 
3899
                          sizeof(GLint));
3446
3900
        free(reply);
3447
3901
#else
3448
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
3449
 
        (void) memcpy((void *)(pc + 0), (void *)(&light), 4);
3450
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
3902
        GLubyte const *pc =
 
3903
            __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
 
3904
        (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
 
3905
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3451
3906
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3452
 
        UnlockDisplay(dpy); SyncHandle();
 
3907
        UnlockDisplay(dpy);
 
3908
        SyncHandle();
3453
3909
#endif /* USE_XCB */
3454
3910
    }
3455
3911
    return;
3459
3915
void
3460
3916
__indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
3461
3917
{
3462
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3463
 
    Display * const dpy = gc->currentDpy;
 
3918
    __GLXcontext *const gc = __glXGetCurrentContext();
 
3919
    Display *const dpy = gc->currentDpy;
3464
3920
    const GLuint cmdlen = 8;
3465
3921
    if (__builtin_expect(dpy != NULL, 1)) {
3466
3922
#ifdef USE_XCB
3467
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
3923
        xcb_connection_t *c = XGetXCBConnection(dpy);
3468
3924
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3469
 
        XCBGlxGetMapdvRep *reply = XCBGlxGetMapdvReply(c, XCBGlxGetMapdv(c, gc->currentContextTag, target, query), NULL);
3470
 
        if (XCBGlxGetMapdvDataLength(reply) == 0)
3471
 
            (void)memcpy(v, &reply->datum, sizeof(reply->datum));
 
3925
        xcb_glx_get_mapdv_reply_t *reply =
 
3926
            xcb_glx_get_mapdv_reply(c,
 
3927
                                    xcb_glx_get_mapdv(c,
 
3928
                                                      gc->currentContextTag,
 
3929
                                                      target, query), NULL);
 
3930
        if (xcb_glx_get_mapdv_data_length(reply) == 0)
 
3931
            (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3472
3932
        else
3473
 
        (void)memcpy(v, XCBGlxGetMapdvData(reply), XCBGlxGetMapdvDataLength(reply) * sizeof(GLdouble));
 
3933
            (void) memcpy(v, xcb_glx_get_mapdv_data(reply),
 
3934
                          xcb_glx_get_mapdv_data_length(reply) *
 
3935
                          sizeof(GLdouble));
3474
3936
        free(reply);
3475
3937
#else
3476
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
3477
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3478
 
        (void) memcpy((void *)(pc + 4), (void *)(&query), 4);
 
3938
        GLubyte const *pc =
 
3939
            __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
 
3940
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
3941
        (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3479
3942
        (void) __glXReadReply(dpy, 8, v, GL_FALSE);
3480
 
        UnlockDisplay(dpy); SyncHandle();
 
3943
        UnlockDisplay(dpy);
 
3944
        SyncHandle();
3481
3945
#endif /* USE_XCB */
3482
3946
    }
3483
3947
    return;
3487
3951
void
3488
3952
__indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
3489
3953
{
3490
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3491
 
    Display * const dpy = gc->currentDpy;
 
3954
    __GLXcontext *const gc = __glXGetCurrentContext();
 
3955
    Display *const dpy = gc->currentDpy;
3492
3956
    const GLuint cmdlen = 8;
3493
3957
    if (__builtin_expect(dpy != NULL, 1)) {
3494
3958
#ifdef USE_XCB
3495
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
3959
        xcb_connection_t *c = XGetXCBConnection(dpy);
3496
3960
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3497
 
        XCBGlxGetMapfvRep *reply = XCBGlxGetMapfvReply(c, XCBGlxGetMapfv(c, gc->currentContextTag, target, query), NULL);
3498
 
        if (XCBGlxGetMapfvDataLength(reply) == 0)
3499
 
            (void)memcpy(v, &reply->datum, sizeof(reply->datum));
 
3961
        xcb_glx_get_mapfv_reply_t *reply =
 
3962
            xcb_glx_get_mapfv_reply(c,
 
3963
                                    xcb_glx_get_mapfv(c,
 
3964
                                                      gc->currentContextTag,
 
3965
                                                      target, query), NULL);
 
3966
        if (xcb_glx_get_mapfv_data_length(reply) == 0)
 
3967
            (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3500
3968
        else
3501
 
        (void)memcpy(v, XCBGlxGetMapfvData(reply), XCBGlxGetMapfvDataLength(reply) * sizeof(GLfloat));
 
3969
            (void) memcpy(v, xcb_glx_get_mapfv_data(reply),
 
3970
                          xcb_glx_get_mapfv_data_length(reply) *
 
3971
                          sizeof(GLfloat));
3502
3972
        free(reply);
3503
3973
#else
3504
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
3505
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3506
 
        (void) memcpy((void *)(pc + 4), (void *)(&query), 4);
 
3974
        GLubyte const *pc =
 
3975
            __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
 
3976
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
3977
        (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3507
3978
        (void) __glXReadReply(dpy, 4, v, GL_FALSE);
3508
 
        UnlockDisplay(dpy); SyncHandle();
 
3979
        UnlockDisplay(dpy);
 
3980
        SyncHandle();
3509
3981
#endif /* USE_XCB */
3510
3982
    }
3511
3983
    return;
3515
3987
void
3516
3988
__indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
3517
3989
{
3518
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3519
 
    Display * const dpy = gc->currentDpy;
 
3990
    __GLXcontext *const gc = __glXGetCurrentContext();
 
3991
    Display *const dpy = gc->currentDpy;
3520
3992
    const GLuint cmdlen = 8;
3521
3993
    if (__builtin_expect(dpy != NULL, 1)) {
3522
3994
#ifdef USE_XCB
3523
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
3995
        xcb_connection_t *c = XGetXCBConnection(dpy);
3524
3996
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3525
 
        XCBGlxGetMapivRep *reply = XCBGlxGetMapivReply(c, XCBGlxGetMapiv(c, gc->currentContextTag, target, query), NULL);
3526
 
        if (XCBGlxGetMapivDataLength(reply) == 0)
3527
 
            (void)memcpy(v, &reply->datum, sizeof(reply->datum));
 
3997
        xcb_glx_get_mapiv_reply_t *reply =
 
3998
            xcb_glx_get_mapiv_reply(c,
 
3999
                                    xcb_glx_get_mapiv(c,
 
4000
                                                      gc->currentContextTag,
 
4001
                                                      target, query), NULL);
 
4002
        if (xcb_glx_get_mapiv_data_length(reply) == 0)
 
4003
            (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3528
4004
        else
3529
 
        (void)memcpy(v, XCBGlxGetMapivData(reply), XCBGlxGetMapivDataLength(reply) * sizeof(GLint));
 
4005
            (void) memcpy(v, xcb_glx_get_mapiv_data(reply),
 
4006
                          xcb_glx_get_mapiv_data_length(reply) *
 
4007
                          sizeof(GLint));
3530
4008
        free(reply);
3531
4009
#else
3532
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
3533
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3534
 
        (void) memcpy((void *)(pc + 4), (void *)(&query), 4);
 
4010
        GLubyte const *pc =
 
4011
            __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
 
4012
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
4013
        (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3535
4014
        (void) __glXReadReply(dpy, 4, v, GL_FALSE);
3536
 
        UnlockDisplay(dpy); SyncHandle();
 
4015
        UnlockDisplay(dpy);
 
4016
        SyncHandle();
3537
4017
#endif /* USE_XCB */
3538
4018
    }
3539
4019
    return;
3543
4023
void
3544
4024
__indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
3545
4025
{
3546
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3547
 
    Display * const dpy = gc->currentDpy;
 
4026
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4027
    Display *const dpy = gc->currentDpy;
3548
4028
    const GLuint cmdlen = 8;
3549
4029
    if (__builtin_expect(dpy != NULL, 1)) {
3550
4030
#ifdef USE_XCB
3551
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4031
        xcb_connection_t *c = XGetXCBConnection(dpy);
3552
4032
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3553
 
        XCBGlxGetMaterialfvRep *reply = XCBGlxGetMaterialfvReply(c, XCBGlxGetMaterialfv(c, gc->currentContextTag, face, pname), NULL);
3554
 
        if (XCBGlxGetMaterialfvDataLength(reply) == 0)
3555
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4033
        xcb_glx_get_materialfv_reply_t *reply =
 
4034
            xcb_glx_get_materialfv_reply(c,
 
4035
                                         xcb_glx_get_materialfv(c,
 
4036
                                                                gc->
 
4037
                                                                currentContextTag,
 
4038
                                                                face, pname),
 
4039
                                         NULL);
 
4040
        if (xcb_glx_get_materialfv_data_length(reply) == 0)
 
4041
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3556
4042
        else
3557
 
        (void)memcpy(params, XCBGlxGetMaterialfvData(reply), XCBGlxGetMaterialfvDataLength(reply) * sizeof(GLfloat));
 
4043
            (void) memcpy(params, xcb_glx_get_materialfv_data(reply),
 
4044
                          xcb_glx_get_materialfv_data_length(reply) *
 
4045
                          sizeof(GLfloat));
3558
4046
        free(reply);
3559
4047
#else
3560
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
3561
 
        (void) memcpy((void *)(pc + 0), (void *)(&face), 4);
3562
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
4048
        GLubyte const *pc =
 
4049
            __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
 
4050
        (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
 
4051
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3563
4052
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3564
 
        UnlockDisplay(dpy); SyncHandle();
 
4053
        UnlockDisplay(dpy);
 
4054
        SyncHandle();
3565
4055
#endif /* USE_XCB */
3566
4056
    }
3567
4057
    return;
3571
4061
void
3572
4062
__indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
3573
4063
{
3574
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3575
 
    Display * const dpy = gc->currentDpy;
 
4064
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4065
    Display *const dpy = gc->currentDpy;
3576
4066
    const GLuint cmdlen = 8;
3577
4067
    if (__builtin_expect(dpy != NULL, 1)) {
3578
4068
#ifdef USE_XCB
3579
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4069
        xcb_connection_t *c = XGetXCBConnection(dpy);
3580
4070
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3581
 
        XCBGlxGetMaterialivRep *reply = XCBGlxGetMaterialivReply(c, XCBGlxGetMaterialiv(c, gc->currentContextTag, face, pname), NULL);
3582
 
        if (XCBGlxGetMaterialivDataLength(reply) == 0)
3583
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4071
        xcb_glx_get_materialiv_reply_t *reply =
 
4072
            xcb_glx_get_materialiv_reply(c,
 
4073
                                         xcb_glx_get_materialiv(c,
 
4074
                                                                gc->
 
4075
                                                                currentContextTag,
 
4076
                                                                face, pname),
 
4077
                                         NULL);
 
4078
        if (xcb_glx_get_materialiv_data_length(reply) == 0)
 
4079
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3584
4080
        else
3585
 
        (void)memcpy(params, XCBGlxGetMaterialivData(reply), XCBGlxGetMaterialivDataLength(reply) * sizeof(GLint));
 
4081
            (void) memcpy(params, xcb_glx_get_materialiv_data(reply),
 
4082
                          xcb_glx_get_materialiv_data_length(reply) *
 
4083
                          sizeof(GLint));
3586
4084
        free(reply);
3587
4085
#else
3588
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
3589
 
        (void) memcpy((void *)(pc + 0), (void *)(&face), 4);
3590
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
4086
        GLubyte const *pc =
 
4087
            __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
 
4088
        (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
 
4089
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3591
4090
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3592
 
        UnlockDisplay(dpy); SyncHandle();
 
4091
        UnlockDisplay(dpy);
 
4092
        SyncHandle();
3593
4093
#endif /* USE_XCB */
3594
4094
    }
3595
4095
    return;
3599
4099
void
3600
4100
__indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
3601
4101
{
3602
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3603
 
    Display * const dpy = gc->currentDpy;
 
4102
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4103
    Display *const dpy = gc->currentDpy;
3604
4104
    const GLuint cmdlen = 4;
3605
4105
    if (__builtin_expect(dpy != NULL, 1)) {
3606
4106
#ifdef USE_XCB
3607
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4107
        xcb_connection_t *c = XGetXCBConnection(dpy);
3608
4108
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3609
 
        XCBGlxGetPixelMapfvRep *reply = XCBGlxGetPixelMapfvReply(c, XCBGlxGetPixelMapfv(c, gc->currentContextTag, map), NULL);
3610
 
        if (XCBGlxGetPixelMapfvDataLength(reply) == 0)
3611
 
            (void)memcpy(values, &reply->datum, sizeof(reply->datum));
 
4109
        xcb_glx_get_pixel_mapfv_reply_t *reply =
 
4110
            xcb_glx_get_pixel_mapfv_reply(c,
 
4111
                                          xcb_glx_get_pixel_mapfv(c,
 
4112
                                                                  gc->
 
4113
                                                                  currentContextTag,
 
4114
                                                                  map), NULL);
 
4115
        if (xcb_glx_get_pixel_mapfv_data_length(reply) == 0)
 
4116
            (void) memcpy(values, &reply->datum, sizeof(reply->datum));
3612
4117
        else
3613
 
        (void)memcpy(values, XCBGlxGetPixelMapfvData(reply), XCBGlxGetPixelMapfvDataLength(reply) * sizeof(GLfloat));
 
4118
            (void) memcpy(values, xcb_glx_get_pixel_mapfv_data(reply),
 
4119
                          xcb_glx_get_pixel_mapfv_data_length(reply) *
 
4120
                          sizeof(GLfloat));
3614
4121
        free(reply);
3615
4122
#else
3616
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
3617
 
        (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
 
4123
        GLubyte const *pc =
 
4124
            __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
 
4125
        (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
3618
4126
        (void) __glXReadReply(dpy, 4, values, GL_FALSE);
3619
 
        UnlockDisplay(dpy); SyncHandle();
 
4127
        UnlockDisplay(dpy);
 
4128
        SyncHandle();
3620
4129
#endif /* USE_XCB */
3621
4130
    }
3622
4131
    return;
3626
4135
void
3627
4136
__indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
3628
4137
{
3629
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3630
 
    Display * const dpy = gc->currentDpy;
 
4138
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4139
    Display *const dpy = gc->currentDpy;
3631
4140
    const GLuint cmdlen = 4;
3632
4141
    if (__builtin_expect(dpy != NULL, 1)) {
3633
4142
#ifdef USE_XCB
3634
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4143
        xcb_connection_t *c = XGetXCBConnection(dpy);
3635
4144
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3636
 
        XCBGlxGetPixelMapuivRep *reply = XCBGlxGetPixelMapuivReply(c, XCBGlxGetPixelMapuiv(c, gc->currentContextTag, map), NULL);
3637
 
        if (XCBGlxGetPixelMapuivDataLength(reply) == 0)
3638
 
            (void)memcpy(values, &reply->datum, sizeof(reply->datum));
 
4145
        xcb_glx_get_pixel_mapuiv_reply_t *reply =
 
4146
            xcb_glx_get_pixel_mapuiv_reply(c,
 
4147
                                           xcb_glx_get_pixel_mapuiv(c,
 
4148
                                                                    gc->
 
4149
                                                                    currentContextTag,
 
4150
                                                                    map),
 
4151
                                           NULL);
 
4152
        if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 0)
 
4153
            (void) memcpy(values, &reply->datum, sizeof(reply->datum));
3639
4154
        else
3640
 
        (void)memcpy(values, XCBGlxGetPixelMapuivData(reply), XCBGlxGetPixelMapuivDataLength(reply) * sizeof(GLuint));
 
4155
            (void) memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply),
 
4156
                          xcb_glx_get_pixel_mapuiv_data_length(reply) *
 
4157
                          sizeof(GLuint));
3641
4158
        free(reply);
3642
4159
#else
3643
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
3644
 
        (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
 
4160
        GLubyte const *pc =
 
4161
            __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
 
4162
        (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
3645
4163
        (void) __glXReadReply(dpy, 4, values, GL_FALSE);
3646
 
        UnlockDisplay(dpy); SyncHandle();
 
4164
        UnlockDisplay(dpy);
 
4165
        SyncHandle();
3647
4166
#endif /* USE_XCB */
3648
4167
    }
3649
4168
    return;
3653
4172
void
3654
4173
__indirect_glGetPixelMapusv(GLenum map, GLushort * values)
3655
4174
{
3656
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3657
 
    Display * const dpy = gc->currentDpy;
 
4175
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4176
    Display *const dpy = gc->currentDpy;
3658
4177
    const GLuint cmdlen = 4;
3659
4178
    if (__builtin_expect(dpy != NULL, 1)) {
3660
4179
#ifdef USE_XCB
3661
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4180
        xcb_connection_t *c = XGetXCBConnection(dpy);
3662
4181
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3663
 
        XCBGlxGetPixelMapusvRep *reply = XCBGlxGetPixelMapusvReply(c, XCBGlxGetPixelMapusv(c, gc->currentContextTag, map), NULL);
3664
 
        if (XCBGlxGetPixelMapusvDataLength(reply) == 0)
3665
 
            (void)memcpy(values, &reply->datum, sizeof(reply->datum));
 
4182
        xcb_glx_get_pixel_mapusv_reply_t *reply =
 
4183
            xcb_glx_get_pixel_mapusv_reply(c,
 
4184
                                           xcb_glx_get_pixel_mapusv(c,
 
4185
                                                                    gc->
 
4186
                                                                    currentContextTag,
 
4187
                                                                    map),
 
4188
                                           NULL);
 
4189
        if (xcb_glx_get_pixel_mapusv_data_length(reply) == 0)
 
4190
            (void) memcpy(values, &reply->datum, sizeof(reply->datum));
3666
4191
        else
3667
 
        (void)memcpy(values, XCBGlxGetPixelMapusvData(reply), XCBGlxGetPixelMapusvDataLength(reply) * sizeof(GLushort));
 
4192
            (void) memcpy(values, xcb_glx_get_pixel_mapusv_data(reply),
 
4193
                          xcb_glx_get_pixel_mapusv_data_length(reply) *
 
4194
                          sizeof(GLushort));
3668
4195
        free(reply);
3669
4196
#else
3670
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
3671
 
        (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
 
4197
        GLubyte const *pc =
 
4198
            __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
 
4199
        (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
3672
4200
        (void) __glXReadReply(dpy, 2, values, GL_FALSE);
3673
 
        UnlockDisplay(dpy); SyncHandle();
 
4201
        UnlockDisplay(dpy);
 
4202
        SyncHandle();
3674
4203
#endif /* USE_XCB */
3675
4204
    }
3676
4205
    return;
3680
4209
void
3681
4210
__indirect_glGetPolygonStipple(GLubyte * mask)
3682
4211
{
3683
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3684
 
    const __GLXattribute * const state = gc->client_state_private;
3685
 
    Display * const dpy = gc->currentDpy;
 
4212
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4213
    const __GLXattribute *const state = gc->client_state_private;
 
4214
    Display *const dpy = gc->currentDpy;
3686
4215
    const GLuint cmdlen = 4;
3687
4216
    if (__builtin_expect(dpy != NULL, 1)) {
3688
4217
#ifdef USE_XCB
3689
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4218
        xcb_connection_t *c = XGetXCBConnection(dpy);
3690
4219
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3691
 
        XCBGlxGetPolygonStippleRep *reply = XCBGlxGetPolygonStippleReply(c, XCBGlxGetPolygonStipple(c, gc->currentContextTag, 0), NULL);
3692
 
        (void)memcpy(mask, XCBGlxGetPolygonStippleData(reply), XCBGlxGetPolygonStippleDataLength(reply) * sizeof(GLubyte));
 
4220
        xcb_glx_get_polygon_stipple_reply_t *reply =
 
4221
            xcb_glx_get_polygon_stipple_reply(c,
 
4222
                                              xcb_glx_get_polygon_stipple(c,
 
4223
                                                                          gc->
 
4224
                                                                          currentContextTag,
 
4225
                                                                          0),
 
4226
                                              NULL);
 
4227
        (void) memcpy(mask, xcb_glx_get_polygon_stipple_data(reply),
 
4228
                      xcb_glx_get_polygon_stipple_data_length(reply) *
 
4229
                      sizeof(GLubyte));
3693
4230
        free(reply);
3694
4231
#else
3695
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
3696
 
        *(int32_t *)(pc + 0) = 0;
3697
 
        __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, GL_FALSE);
3698
 
        UnlockDisplay(dpy); SyncHandle();
 
4232
        GLubyte const *pc =
 
4233
            __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
 
4234
        *(int32_t *) (pc + 0) = 0;
 
4235
        __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
 
4236
                            mask, GL_FALSE);
 
4237
        UnlockDisplay(dpy);
 
4238
        SyncHandle();
3699
4239
#endif /* USE_XCB */
3700
4240
    }
3701
4241
    return;
3705
4245
void
3706
4246
__indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
3707
4247
{
3708
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3709
 
    Display * const dpy = gc->currentDpy;
 
4248
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4249
    Display *const dpy = gc->currentDpy;
3710
4250
    const GLuint cmdlen = 8;
3711
4251
    if (__builtin_expect(dpy != NULL, 1)) {
3712
4252
#ifdef USE_XCB
3713
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4253
        xcb_connection_t *c = XGetXCBConnection(dpy);
3714
4254
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3715
 
        XCBGlxGetTexEnvfvRep *reply = XCBGlxGetTexEnvfvReply(c, XCBGlxGetTexEnvfv(c, gc->currentContextTag, target, pname), NULL);
3716
 
        if (XCBGlxGetTexEnvfvDataLength(reply) == 0)
3717
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4255
        xcb_glx_get_tex_envfv_reply_t *reply =
 
4256
            xcb_glx_get_tex_envfv_reply(c,
 
4257
                                        xcb_glx_get_tex_envfv(c,
 
4258
                                                              gc->
 
4259
                                                              currentContextTag,
 
4260
                                                              target, pname),
 
4261
                                        NULL);
 
4262
        if (xcb_glx_get_tex_envfv_data_length(reply) == 0)
 
4263
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3718
4264
        else
3719
 
        (void)memcpy(params, XCBGlxGetTexEnvfvData(reply), XCBGlxGetTexEnvfvDataLength(reply) * sizeof(GLfloat));
 
4265
            (void) memcpy(params, xcb_glx_get_tex_envfv_data(reply),
 
4266
                          xcb_glx_get_tex_envfv_data_length(reply) *
 
4267
                          sizeof(GLfloat));
3720
4268
        free(reply);
3721
4269
#else
3722
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
3723
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3724
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
4270
        GLubyte const *pc =
 
4271
            __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
 
4272
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
4273
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3725
4274
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3726
 
        UnlockDisplay(dpy); SyncHandle();
 
4275
        UnlockDisplay(dpy);
 
4276
        SyncHandle();
3727
4277
#endif /* USE_XCB */
3728
4278
    }
3729
4279
    return;
3733
4283
void
3734
4284
__indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
3735
4285
{
3736
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3737
 
    Display * const dpy = gc->currentDpy;
 
4286
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4287
    Display *const dpy = gc->currentDpy;
3738
4288
    const GLuint cmdlen = 8;
3739
4289
    if (__builtin_expect(dpy != NULL, 1)) {
3740
4290
#ifdef USE_XCB
3741
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4291
        xcb_connection_t *c = XGetXCBConnection(dpy);
3742
4292
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3743
 
        XCBGlxGetTexEnvivRep *reply = XCBGlxGetTexEnvivReply(c, XCBGlxGetTexEnviv(c, gc->currentContextTag, target, pname), NULL);
3744
 
        if (XCBGlxGetTexEnvivDataLength(reply) == 0)
3745
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4293
        xcb_glx_get_tex_enviv_reply_t *reply =
 
4294
            xcb_glx_get_tex_enviv_reply(c,
 
4295
                                        xcb_glx_get_tex_enviv(c,
 
4296
                                                              gc->
 
4297
                                                              currentContextTag,
 
4298
                                                              target, pname),
 
4299
                                        NULL);
 
4300
        if (xcb_glx_get_tex_enviv_data_length(reply) == 0)
 
4301
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3746
4302
        else
3747
 
        (void)memcpy(params, XCBGlxGetTexEnvivData(reply), XCBGlxGetTexEnvivDataLength(reply) * sizeof(GLint));
 
4303
            (void) memcpy(params, xcb_glx_get_tex_enviv_data(reply),
 
4304
                          xcb_glx_get_tex_enviv_data_length(reply) *
 
4305
                          sizeof(GLint));
3748
4306
        free(reply);
3749
4307
#else
3750
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
3751
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3752
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
4308
        GLubyte const *pc =
 
4309
            __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
 
4310
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
4311
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3753
4312
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3754
 
        UnlockDisplay(dpy); SyncHandle();
 
4313
        UnlockDisplay(dpy);
 
4314
        SyncHandle();
3755
4315
#endif /* USE_XCB */
3756
4316
    }
3757
4317
    return;
3761
4321
void
3762
4322
__indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
3763
4323
{
3764
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3765
 
    Display * const dpy = gc->currentDpy;
 
4324
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4325
    Display *const dpy = gc->currentDpy;
3766
4326
    const GLuint cmdlen = 8;
3767
4327
    if (__builtin_expect(dpy != NULL, 1)) {
3768
4328
#ifdef USE_XCB
3769
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4329
        xcb_connection_t *c = XGetXCBConnection(dpy);
3770
4330
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3771
 
        XCBGlxGetTexGendvRep *reply = XCBGlxGetTexGendvReply(c, XCBGlxGetTexGendv(c, gc->currentContextTag, coord, pname), NULL);
3772
 
        if (XCBGlxGetTexGendvDataLength(reply) == 0)
3773
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4331
        xcb_glx_get_tex_gendv_reply_t *reply =
 
4332
            xcb_glx_get_tex_gendv_reply(c,
 
4333
                                        xcb_glx_get_tex_gendv(c,
 
4334
                                                              gc->
 
4335
                                                              currentContextTag,
 
4336
                                                              coord, pname),
 
4337
                                        NULL);
 
4338
        if (xcb_glx_get_tex_gendv_data_length(reply) == 0)
 
4339
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3774
4340
        else
3775
 
        (void)memcpy(params, XCBGlxGetTexGendvData(reply), XCBGlxGetTexGendvDataLength(reply) * sizeof(GLdouble));
 
4341
            (void) memcpy(params, xcb_glx_get_tex_gendv_data(reply),
 
4342
                          xcb_glx_get_tex_gendv_data_length(reply) *
 
4343
                          sizeof(GLdouble));
3776
4344
        free(reply);
3777
4345
#else
3778
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
3779
 
        (void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
3780
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
4346
        GLubyte const *pc =
 
4347
            __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
 
4348
        (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
 
4349
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3781
4350
        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
3782
 
        UnlockDisplay(dpy); SyncHandle();
 
4351
        UnlockDisplay(dpy);
 
4352
        SyncHandle();
3783
4353
#endif /* USE_XCB */
3784
4354
    }
3785
4355
    return;
3789
4359
void
3790
4360
__indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
3791
4361
{
3792
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3793
 
    Display * const dpy = gc->currentDpy;
 
4362
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4363
    Display *const dpy = gc->currentDpy;
3794
4364
    const GLuint cmdlen = 8;
3795
4365
    if (__builtin_expect(dpy != NULL, 1)) {
3796
4366
#ifdef USE_XCB
3797
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4367
        xcb_connection_t *c = XGetXCBConnection(dpy);
3798
4368
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3799
 
        XCBGlxGetTexGenfvRep *reply = XCBGlxGetTexGenfvReply(c, XCBGlxGetTexGenfv(c, gc->currentContextTag, coord, pname), NULL);
3800
 
        if (XCBGlxGetTexGenfvDataLength(reply) == 0)
3801
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4369
        xcb_glx_get_tex_genfv_reply_t *reply =
 
4370
            xcb_glx_get_tex_genfv_reply(c,
 
4371
                                        xcb_glx_get_tex_genfv(c,
 
4372
                                                              gc->
 
4373
                                                              currentContextTag,
 
4374
                                                              coord, pname),
 
4375
                                        NULL);
 
4376
        if (xcb_glx_get_tex_genfv_data_length(reply) == 0)
 
4377
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3802
4378
        else
3803
 
        (void)memcpy(params, XCBGlxGetTexGenfvData(reply), XCBGlxGetTexGenfvDataLength(reply) * sizeof(GLfloat));
 
4379
            (void) memcpy(params, xcb_glx_get_tex_genfv_data(reply),
 
4380
                          xcb_glx_get_tex_genfv_data_length(reply) *
 
4381
                          sizeof(GLfloat));
3804
4382
        free(reply);
3805
4383
#else
3806
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
3807
 
        (void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
3808
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
4384
        GLubyte const *pc =
 
4385
            __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
 
4386
        (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
 
4387
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3809
4388
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3810
 
        UnlockDisplay(dpy); SyncHandle();
 
4389
        UnlockDisplay(dpy);
 
4390
        SyncHandle();
3811
4391
#endif /* USE_XCB */
3812
4392
    }
3813
4393
    return;
3817
4397
void
3818
4398
__indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
3819
4399
{
3820
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3821
 
    Display * const dpy = gc->currentDpy;
 
4400
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4401
    Display *const dpy = gc->currentDpy;
3822
4402
    const GLuint cmdlen = 8;
3823
4403
    if (__builtin_expect(dpy != NULL, 1)) {
3824
4404
#ifdef USE_XCB
3825
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4405
        xcb_connection_t *c = XGetXCBConnection(dpy);
3826
4406
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3827
 
        XCBGlxGetTexGenivRep *reply = XCBGlxGetTexGenivReply(c, XCBGlxGetTexGeniv(c, gc->currentContextTag, coord, pname), NULL);
3828
 
        if (XCBGlxGetTexGenivDataLength(reply) == 0)
3829
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4407
        xcb_glx_get_tex_geniv_reply_t *reply =
 
4408
            xcb_glx_get_tex_geniv_reply(c,
 
4409
                                        xcb_glx_get_tex_geniv(c,
 
4410
                                                              gc->
 
4411
                                                              currentContextTag,
 
4412
                                                              coord, pname),
 
4413
                                        NULL);
 
4414
        if (xcb_glx_get_tex_geniv_data_length(reply) == 0)
 
4415
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3830
4416
        else
3831
 
        (void)memcpy(params, XCBGlxGetTexGenivData(reply), XCBGlxGetTexGenivDataLength(reply) * sizeof(GLint));
 
4417
            (void) memcpy(params, xcb_glx_get_tex_geniv_data(reply),
 
4418
                          xcb_glx_get_tex_geniv_data_length(reply) *
 
4419
                          sizeof(GLint));
3832
4420
        free(reply);
3833
4421
#else
3834
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
3835
 
        (void) memcpy((void *)(pc + 0), (void *)(&coord), 4);
3836
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
4422
        GLubyte const *pc =
 
4423
            __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
 
4424
        (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
 
4425
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3837
4426
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3838
 
        UnlockDisplay(dpy); SyncHandle();
 
4427
        UnlockDisplay(dpy);
 
4428
        SyncHandle();
3839
4429
#endif /* USE_XCB */
3840
4430
    }
3841
4431
    return;
3843
4433
 
3844
4434
#define X_GLsop_GetTexImage 135
3845
4435
void
3846
 
__indirect_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels)
 
4436
__indirect_glGetTexImage(GLenum target, GLint level, GLenum format,
 
4437
                         GLenum type, GLvoid * pixels)
3847
4438
{
3848
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3849
 
    const __GLXattribute * const state = gc->client_state_private;
3850
 
    Display * const dpy = gc->currentDpy;
 
4439
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4440
    const __GLXattribute *const state = gc->client_state_private;
 
4441
    Display *const dpy = gc->currentDpy;
3851
4442
    const GLuint cmdlen = 20;
3852
4443
    if (__builtin_expect(dpy != NULL, 1)) {
3853
4444
#ifdef USE_XCB
3854
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4445
        xcb_connection_t *c = XGetXCBConnection(dpy);
3855
4446
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3856
 
        XCBGlxGetTexImageRep *reply = XCBGlxGetTexImageReply(c, XCBGlxGetTexImage(c, gc->currentContextTag, target, level, format, type, state->storePack.swapEndian), NULL);
3857
 
        (void)memcpy(pixels, XCBGlxGetTexImageData(reply), XCBGlxGetTexImageDataLength(reply) * sizeof(GLvoid));
 
4447
        xcb_glx_get_tex_image_reply_t *reply =
 
4448
            xcb_glx_get_tex_image_reply(c,
 
4449
                                        xcb_glx_get_tex_image(c,
 
4450
                                                              gc->
 
4451
                                                              currentContextTag,
 
4452
                                                              target, level,
 
4453
                                                              format, type,
 
4454
                                                              state->
 
4455
                                                              storePack.
 
4456
                                                              swapEndian),
 
4457
                                        NULL);
 
4458
        (void) memcpy(pixels, xcb_glx_get_tex_image_data(reply),
 
4459
                      xcb_glx_get_tex_image_data_length(reply) *
 
4460
                      sizeof(GLvoid));
3858
4461
        free(reply);
3859
4462
#else
3860
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
3861
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3862
 
        (void) memcpy((void *)(pc + 4), (void *)(&level), 4);
3863
 
        (void) memcpy((void *)(pc + 8), (void *)(&format), 4);
3864
 
        (void) memcpy((void *)(pc + 12), (void *)(&type), 4);
3865
 
        *(int32_t *)(pc + 16) = 0;
3866
 
        * (int8_t *)(pc + 16) = state->storePack.swapEndian;
3867
 
        __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels, GL_TRUE);
3868
 
        UnlockDisplay(dpy); SyncHandle();
 
4463
        GLubyte const *pc =
 
4464
            __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
 
4465
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
4466
        (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
 
4467
        (void) memcpy((void *) (pc + 8), (void *) (&format), 4);
 
4468
        (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
 
4469
        *(int32_t *) (pc + 16) = 0;
 
4470
        *(int8_t *) (pc + 16) = state->storePack.swapEndian;
 
4471
        __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels,
 
4472
                            GL_TRUE);
 
4473
        UnlockDisplay(dpy);
 
4474
        SyncHandle();
3869
4475
#endif /* USE_XCB */
3870
4476
    }
3871
4477
    return;
3875
4481
void
3876
4482
__indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
3877
4483
{
3878
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3879
 
    Display * const dpy = gc->currentDpy;
 
4484
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4485
    Display *const dpy = gc->currentDpy;
3880
4486
    const GLuint cmdlen = 8;
3881
4487
    if (__builtin_expect(dpy != NULL, 1)) {
3882
4488
#ifdef USE_XCB
3883
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4489
        xcb_connection_t *c = XGetXCBConnection(dpy);
3884
4490
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3885
 
        XCBGlxGetTexParameterfvRep *reply = XCBGlxGetTexParameterfvReply(c, XCBGlxGetTexParameterfv(c, gc->currentContextTag, target, pname), NULL);
3886
 
        if (XCBGlxGetTexParameterfvDataLength(reply) == 0)
3887
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4491
        xcb_glx_get_tex_parameterfv_reply_t *reply =
 
4492
            xcb_glx_get_tex_parameterfv_reply(c,
 
4493
                                              xcb_glx_get_tex_parameterfv(c,
 
4494
                                                                          gc->
 
4495
                                                                          currentContextTag,
 
4496
                                                                          target,
 
4497
                                                                          pname),
 
4498
                                              NULL);
 
4499
        if (xcb_glx_get_tex_parameterfv_data_length(reply) == 0)
 
4500
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3888
4501
        else
3889
 
        (void)memcpy(params, XCBGlxGetTexParameterfvData(reply), XCBGlxGetTexParameterfvDataLength(reply) * sizeof(GLfloat));
 
4502
            (void) memcpy(params, xcb_glx_get_tex_parameterfv_data(reply),
 
4503
                          xcb_glx_get_tex_parameterfv_data_length(reply) *
 
4504
                          sizeof(GLfloat));
3890
4505
        free(reply);
3891
4506
#else
3892
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
3893
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3894
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
4507
        GLubyte const *pc =
 
4508
            __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
 
4509
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
4510
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3895
4511
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3896
 
        UnlockDisplay(dpy); SyncHandle();
 
4512
        UnlockDisplay(dpy);
 
4513
        SyncHandle();
3897
4514
#endif /* USE_XCB */
3898
4515
    }
3899
4516
    return;
3903
4520
void
3904
4521
__indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
3905
4522
{
3906
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3907
 
    Display * const dpy = gc->currentDpy;
 
4523
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4524
    Display *const dpy = gc->currentDpy;
3908
4525
    const GLuint cmdlen = 8;
3909
4526
    if (__builtin_expect(dpy != NULL, 1)) {
3910
4527
#ifdef USE_XCB
3911
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4528
        xcb_connection_t *c = XGetXCBConnection(dpy);
3912
4529
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3913
 
        XCBGlxGetTexParameterivRep *reply = XCBGlxGetTexParameterivReply(c, XCBGlxGetTexParameteriv(c, gc->currentContextTag, target, pname), NULL);
3914
 
        if (XCBGlxGetTexParameterivDataLength(reply) == 0)
3915
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4530
        xcb_glx_get_tex_parameteriv_reply_t *reply =
 
4531
            xcb_glx_get_tex_parameteriv_reply(c,
 
4532
                                              xcb_glx_get_tex_parameteriv(c,
 
4533
                                                                          gc->
 
4534
                                                                          currentContextTag,
 
4535
                                                                          target,
 
4536
                                                                          pname),
 
4537
                                              NULL);
 
4538
        if (xcb_glx_get_tex_parameteriv_data_length(reply) == 0)
 
4539
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3916
4540
        else
3917
 
        (void)memcpy(params, XCBGlxGetTexParameterivData(reply), XCBGlxGetTexParameterivDataLength(reply) * sizeof(GLint));
 
4541
            (void) memcpy(params, xcb_glx_get_tex_parameteriv_data(reply),
 
4542
                          xcb_glx_get_tex_parameteriv_data_length(reply) *
 
4543
                          sizeof(GLint));
3918
4544
        free(reply);
3919
4545
#else
3920
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
3921
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3922
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
4546
        GLubyte const *pc =
 
4547
            __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
 
4548
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
4549
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3923
4550
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3924
 
        UnlockDisplay(dpy); SyncHandle();
 
4551
        UnlockDisplay(dpy);
 
4552
        SyncHandle();
3925
4553
#endif /* USE_XCB */
3926
4554
    }
3927
4555
    return;
3929
4557
 
3930
4558
#define X_GLsop_GetTexLevelParameterfv 138
3931
4559
void
3932
 
__indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params)
 
4560
__indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
 
4561
                                    GLfloat * params)
3933
4562
{
3934
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3935
 
    Display * const dpy = gc->currentDpy;
 
4563
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4564
    Display *const dpy = gc->currentDpy;
3936
4565
    const GLuint cmdlen = 12;
3937
4566
    if (__builtin_expect(dpy != NULL, 1)) {
3938
4567
#ifdef USE_XCB
3939
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4568
        xcb_connection_t *c = XGetXCBConnection(dpy);
3940
4569
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3941
 
        XCBGlxGetTexLevelParameterfvRep *reply = XCBGlxGetTexLevelParameterfvReply(c, XCBGlxGetTexLevelParameterfv(c, gc->currentContextTag, target, level, pname), NULL);
3942
 
        if (XCBGlxGetTexLevelParameterfvDataLength(reply) == 0)
3943
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4570
        xcb_glx_get_tex_level_parameterfv_reply_t *reply =
 
4571
            xcb_glx_get_tex_level_parameterfv_reply(c,
 
4572
                                                    xcb_glx_get_tex_level_parameterfv
 
4573
                                                    (c, gc->currentContextTag,
 
4574
                                                     target, level, pname),
 
4575
                                                    NULL);
 
4576
        if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 0)
 
4577
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3944
4578
        else
3945
 
        (void)memcpy(params, XCBGlxGetTexLevelParameterfvData(reply), XCBGlxGetTexLevelParameterfvDataLength(reply) * sizeof(GLfloat));
 
4579
            (void) memcpy(params,
 
4580
                          xcb_glx_get_tex_level_parameterfv_data(reply),
 
4581
                          xcb_glx_get_tex_level_parameterfv_data_length(reply)
 
4582
                          * sizeof(GLfloat));
3946
4583
        free(reply);
3947
4584
#else
3948
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv, cmdlen);
3949
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3950
 
        (void) memcpy((void *)(pc + 4), (void *)(&level), 4);
3951
 
        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
 
4585
        GLubyte const *pc =
 
4586
            __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv,
 
4587
                                    cmdlen);
 
4588
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
4589
        (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
 
4590
        (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
3952
4591
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3953
 
        UnlockDisplay(dpy); SyncHandle();
 
4592
        UnlockDisplay(dpy);
 
4593
        SyncHandle();
3954
4594
#endif /* USE_XCB */
3955
4595
    }
3956
4596
    return;
3958
4598
 
3959
4599
#define X_GLsop_GetTexLevelParameteriv 139
3960
4600
void
3961
 
__indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params)
 
4601
__indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
 
4602
                                    GLint * params)
3962
4603
{
3963
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3964
 
    Display * const dpy = gc->currentDpy;
 
4604
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4605
    Display *const dpy = gc->currentDpy;
3965
4606
    const GLuint cmdlen = 12;
3966
4607
    if (__builtin_expect(dpy != NULL, 1)) {
3967
4608
#ifdef USE_XCB
3968
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4609
        xcb_connection_t *c = XGetXCBConnection(dpy);
3969
4610
        (void) __glXFlushRenderBuffer(gc, gc->pc);
3970
 
        XCBGlxGetTexLevelParameterivRep *reply = XCBGlxGetTexLevelParameterivReply(c, XCBGlxGetTexLevelParameteriv(c, gc->currentContextTag, target, level, pname), NULL);
3971
 
        if (XCBGlxGetTexLevelParameterivDataLength(reply) == 0)
3972
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
4611
        xcb_glx_get_tex_level_parameteriv_reply_t *reply =
 
4612
            xcb_glx_get_tex_level_parameteriv_reply(c,
 
4613
                                                    xcb_glx_get_tex_level_parameteriv
 
4614
                                                    (c, gc->currentContextTag,
 
4615
                                                     target, level, pname),
 
4616
                                                    NULL);
 
4617
        if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 0)
 
4618
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3973
4619
        else
3974
 
        (void)memcpy(params, XCBGlxGetTexLevelParameterivData(reply), XCBGlxGetTexLevelParameterivDataLength(reply) * sizeof(GLint));
 
4620
            (void) memcpy(params,
 
4621
                          xcb_glx_get_tex_level_parameteriv_data(reply),
 
4622
                          xcb_glx_get_tex_level_parameteriv_data_length(reply)
 
4623
                          * sizeof(GLint));
3975
4624
        free(reply);
3976
4625
#else
3977
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv, cmdlen);
3978
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
3979
 
        (void) memcpy((void *)(pc + 4), (void *)(&level), 4);
3980
 
        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
 
4626
        GLubyte const *pc =
 
4627
            __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv,
 
4628
                                    cmdlen);
 
4629
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
4630
        (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
 
4631
        (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
3981
4632
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3982
 
        UnlockDisplay(dpy); SyncHandle();
 
4633
        UnlockDisplay(dpy);
 
4634
        SyncHandle();
3983
4635
#endif /* USE_XCB */
3984
4636
    }
3985
4637
    return;
3989
4641
GLboolean
3990
4642
__indirect_glIsList(GLuint list)
3991
4643
{
3992
 
    __GLXcontext * const gc = __glXGetCurrentContext();
3993
 
    Display * const dpy = gc->currentDpy;
 
4644
    __GLXcontext *const gc = __glXGetCurrentContext();
 
4645
    Display *const dpy = gc->currentDpy;
3994
4646
    GLboolean retval = (GLboolean) 0;
3995
4647
    const GLuint cmdlen = 4;
3996
4648
    if (__builtin_expect(dpy != NULL, 1)) {
3997
4649
#ifdef USE_XCB
3998
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
4650
        xcb_connection_t *c = XGetXCBConnection(dpy);
3999
4651
        (void) __glXFlushRenderBuffer(gc, gc->pc);
4000
 
        XCBGlxIsListRep *reply = XCBGlxIsListReply(c, XCBGlxIsList(c, gc->currentContextTag, list), NULL);
 
4652
        xcb_glx_is_list_reply_t *reply =
 
4653
            xcb_glx_is_list_reply(c,
 
4654
                                  xcb_glx_is_list(c, gc->currentContextTag,
 
4655
                                                  list), NULL);
4001
4656
        retval = reply->ret_val;
4002
4657
        free(reply);
4003
4658
#else
4004
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
4005
 
        (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
 
4659
        GLubyte const *pc =
 
4660
            __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
 
4661
        (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
4006
4662
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4007
 
        UnlockDisplay(dpy); SyncHandle();
 
4663
        UnlockDisplay(dpy);
 
4664
        SyncHandle();
4008
4665
#endif /* USE_XCB */
4009
4666
    }
4010
4667
    return retval;
4014
4671
void
4015
4672
__indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
4016
4673
{
4017
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4674
    __GLXcontext *const gc = __glXGetCurrentContext();
4018
4675
    const GLuint cmdlen = 20;
4019
4676
    emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
4020
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&zNear), 8);
4021
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&zFar), 8);
 
4677
    (void) memcpy((void *) (gc->pc + 4), (void *) (&zNear), 8);
 
4678
    (void) memcpy((void *) (gc->pc + 12), (void *) (&zFar), 8);
4022
4679
    gc->pc += cmdlen;
4023
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4680
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4681
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4682
    }
4024
4683
}
4025
4684
 
4026
4685
#define X_GLrop_Frustum 175
4027
4686
void
4028
 
__indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
 
4687
__indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
 
4688
                     GLdouble top, GLdouble zNear, GLdouble zFar)
4029
4689
{
4030
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4690
    __GLXcontext *const gc = __glXGetCurrentContext();
4031
4691
    const GLuint cmdlen = 52;
4032
4692
    emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
4033
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8);
4034
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8);
4035
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8);
4036
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8);
4037
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8);
4038
 
    (void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8);
 
4693
    (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
 
4694
    (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
 
4695
    (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
 
4696
    (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
 
4697
    (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
 
4698
    (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4039
4699
    gc->pc += cmdlen;
4040
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4700
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4701
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4702
    }
4041
4703
}
4042
4704
 
4043
4705
#define X_GLrop_LoadIdentity 176
4044
4706
void
4045
4707
__indirect_glLoadIdentity(void)
4046
4708
{
4047
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4709
    __GLXcontext *const gc = __glXGetCurrentContext();
4048
4710
    const GLuint cmdlen = 4;
4049
4711
    emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
4050
4712
    gc->pc += cmdlen;
4051
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4713
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4714
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4715
    }
4052
4716
}
4053
4717
 
4054
4718
#define X_GLrop_LoadMatrixf 177
4055
4719
void
4056
4720
__indirect_glLoadMatrixf(const GLfloat * m)
4057
4721
{
4058
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4722
    __GLXcontext *const gc = __glXGetCurrentContext();
4059
4723
    const GLuint cmdlen = 68;
4060
4724
    emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
4061
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
 
4725
    (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4062
4726
    gc->pc += cmdlen;
4063
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4727
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4728
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4729
    }
4064
4730
}
4065
4731
 
4066
4732
#define X_GLrop_LoadMatrixd 178
4067
4733
void
4068
4734
__indirect_glLoadMatrixd(const GLdouble * m)
4069
4735
{
4070
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4736
    __GLXcontext *const gc = __glXGetCurrentContext();
4071
4737
    const GLuint cmdlen = 132;
4072
4738
    emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
4073
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
 
4739
    (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4074
4740
    gc->pc += cmdlen;
4075
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4741
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4742
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4743
    }
4076
4744
}
4077
4745
 
4078
4746
#define X_GLrop_MatrixMode 179
4079
4747
void
4080
4748
__indirect_glMatrixMode(GLenum mode)
4081
4749
{
4082
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4750
    __GLXcontext *const gc = __glXGetCurrentContext();
4083
4751
    const GLuint cmdlen = 8;
4084
4752
    emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
4085
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
 
4753
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
4086
4754
    gc->pc += cmdlen;
4087
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4755
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4756
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4757
    }
4088
4758
}
4089
4759
 
4090
4760
#define X_GLrop_MultMatrixf 180
4091
4761
void
4092
4762
__indirect_glMultMatrixf(const GLfloat * m)
4093
4763
{
4094
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4764
    __GLXcontext *const gc = __glXGetCurrentContext();
4095
4765
    const GLuint cmdlen = 68;
4096
4766
    emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
4097
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
 
4767
    (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4098
4768
    gc->pc += cmdlen;
4099
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4769
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4770
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4771
    }
4100
4772
}
4101
4773
 
4102
4774
#define X_GLrop_MultMatrixd 181
4103
4775
void
4104
4776
__indirect_glMultMatrixd(const GLdouble * m)
4105
4777
{
4106
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4778
    __GLXcontext *const gc = __glXGetCurrentContext();
4107
4779
    const GLuint cmdlen = 132;
4108
4780
    emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
4109
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
 
4781
    (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4110
4782
    gc->pc += cmdlen;
4111
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4783
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4784
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4785
    }
4112
4786
}
4113
4787
 
4114
4788
#define X_GLrop_Ortho 182
4115
4789
void
4116
 
__indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
 
4790
__indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
 
4791
                   GLdouble top, GLdouble zNear, GLdouble zFar)
4117
4792
{
4118
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4793
    __GLXcontext *const gc = __glXGetCurrentContext();
4119
4794
    const GLuint cmdlen = 52;
4120
4795
    emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
4121
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8);
4122
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8);
4123
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8);
4124
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8);
4125
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8);
4126
 
    (void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8);
 
4796
    (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
 
4797
    (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
 
4798
    (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
 
4799
    (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
 
4800
    (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
 
4801
    (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4127
4802
    gc->pc += cmdlen;
4128
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4803
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4804
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4805
    }
4129
4806
}
4130
4807
 
4131
4808
#define X_GLrop_PopMatrix 183
4132
4809
void
4133
4810
__indirect_glPopMatrix(void)
4134
4811
{
4135
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4812
    __GLXcontext *const gc = __glXGetCurrentContext();
4136
4813
    const GLuint cmdlen = 4;
4137
4814
    emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
4138
4815
    gc->pc += cmdlen;
4139
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4816
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4817
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4818
    }
4140
4819
}
4141
4820
 
4142
4821
#define X_GLrop_PushMatrix 184
4143
4822
void
4144
4823
__indirect_glPushMatrix(void)
4145
4824
{
4146
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4825
    __GLXcontext *const gc = __glXGetCurrentContext();
4147
4826
    const GLuint cmdlen = 4;
4148
4827
    emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
4149
4828
    gc->pc += cmdlen;
4150
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4829
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4830
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4831
    }
4151
4832
}
4152
4833
 
4153
4834
#define X_GLrop_Rotated 185
4154
4835
void
4155
4836
__indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4156
4837
{
4157
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4838
    __GLXcontext *const gc = __glXGetCurrentContext();
4158
4839
    const GLuint cmdlen = 36;
4159
4840
    emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
4160
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 8);
4161
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
4162
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
4163
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
 
4841
    (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 8);
 
4842
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
 
4843
    (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
 
4844
    (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
4164
4845
    gc->pc += cmdlen;
4165
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4846
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4847
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4848
    }
4166
4849
}
4167
4850
 
4168
4851
#define X_GLrop_Rotatef 186
4169
4852
void
4170
4853
__indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
4171
4854
{
4172
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4855
    __GLXcontext *const gc = __glXGetCurrentContext();
4173
4856
    const GLuint cmdlen = 20;
4174
4857
    emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
4175
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 4);
4176
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
4177
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
4178
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
 
4858
    (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 4);
 
4859
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
 
4860
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
 
4861
    (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
4179
4862
    gc->pc += cmdlen;
4180
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4863
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4864
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4865
    }
4181
4866
}
4182
4867
 
4183
4868
#define X_GLrop_Scaled 187
4184
4869
void
4185
4870
__indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
4186
4871
{
4187
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4872
    __GLXcontext *const gc = __glXGetCurrentContext();
4188
4873
    const GLuint cmdlen = 28;
4189
4874
    emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
4190
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
4191
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
4192
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
 
4875
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
 
4876
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
 
4877
    (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4193
4878
    gc->pc += cmdlen;
4194
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4879
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4880
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4881
    }
4195
4882
}
4196
4883
 
4197
4884
#define X_GLrop_Scalef 188
4198
4885
void
4199
4886
__indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
4200
4887
{
4201
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4888
    __GLXcontext *const gc = __glXGetCurrentContext();
4202
4889
    const GLuint cmdlen = 16;
4203
4890
    emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
4204
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
4205
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
4206
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
 
4891
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
4892
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
4893
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4207
4894
    gc->pc += cmdlen;
4208
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4895
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4896
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4897
    }
4209
4898
}
4210
4899
 
4211
4900
#define X_GLrop_Translated 189
4212
4901
void
4213
4902
__indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
4214
4903
{
4215
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4904
    __GLXcontext *const gc = __glXGetCurrentContext();
4216
4905
    const GLuint cmdlen = 28;
4217
4906
    emit_header(gc->pc, X_GLrop_Translated, cmdlen);
4218
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
4219
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
4220
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
 
4907
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
 
4908
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
 
4909
    (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4221
4910
    gc->pc += cmdlen;
4222
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4911
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4912
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4913
    }
4223
4914
}
4224
4915
 
4225
4916
#define X_GLrop_Translatef 190
4226
4917
void
4227
4918
__indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
4228
4919
{
4229
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4920
    __GLXcontext *const gc = __glXGetCurrentContext();
4230
4921
    const GLuint cmdlen = 16;
4231
4922
    emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
4232
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
4233
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
4234
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
 
4923
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
4924
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
4925
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4235
4926
    gc->pc += cmdlen;
4236
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4927
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4928
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4929
    }
4237
4930
}
4238
4931
 
4239
4932
#define X_GLrop_Viewport 191
4240
4933
void
4241
4934
__indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
4242
4935
{
4243
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4936
    __GLXcontext *const gc = __glXGetCurrentContext();
4244
4937
    const GLuint cmdlen = 20;
4245
4938
    emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
4246
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
4247
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
4248
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
4249
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
 
4939
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
4940
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
4941
    (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
 
4942
    (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
4250
4943
    gc->pc += cmdlen;
4251
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4944
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4945
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4946
    }
4252
4947
}
4253
4948
 
4254
4949
#define X_GLrop_BindTexture 4117
4255
4950
void
4256
4951
__indirect_glBindTexture(GLenum target, GLuint texture)
4257
4952
{
4258
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4953
    __GLXcontext *const gc = __glXGetCurrentContext();
4259
4954
    const GLuint cmdlen = 12;
4260
4955
    emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
4261
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4262
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&texture), 4);
 
4956
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
4957
    (void) memcpy((void *) (gc->pc + 8), (void *) (&texture), 4);
4263
4958
    gc->pc += cmdlen;
4264
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4959
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4960
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4961
    }
4265
4962
}
4266
4963
 
4267
4964
#define X_GLrop_Indexubv 194
4268
4965
void
4269
4966
__indirect_glIndexub(GLubyte c)
4270
4967
{
4271
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4968
    __GLXcontext *const gc = __glXGetCurrentContext();
4272
4969
    const GLuint cmdlen = 8;
4273
4970
    emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4274
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 1);
 
4971
    (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 1);
4275
4972
    gc->pc += cmdlen;
4276
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4973
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4974
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4975
    }
4277
4976
}
4278
4977
 
4279
4978
#define X_GLrop_Indexubv 194
4280
4979
void
4281
4980
__indirect_glIndexubv(const GLubyte * c)
4282
4981
{
4283
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4982
    __GLXcontext *const gc = __glXGetCurrentContext();
4284
4983
    const GLuint cmdlen = 8;
4285
4984
    emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4286
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(c), 1);
 
4985
    (void) memcpy((void *) (gc->pc + 4), (void *) (c), 1);
4287
4986
    gc->pc += cmdlen;
4288
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
4987
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
4988
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
4989
    }
4289
4990
}
4290
4991
 
4291
4992
#define X_GLrop_PolygonOffset 192
4292
4993
void
4293
4994
__indirect_glPolygonOffset(GLfloat factor, GLfloat units)
4294
4995
{
4295
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
4996
    __GLXcontext *const gc = __glXGetCurrentContext();
4296
4997
    const GLuint cmdlen = 12;
4297
4998
    emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
4298
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4);
4299
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&units), 4);
 
4999
    (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
 
5000
    (void) memcpy((void *) (gc->pc + 8), (void *) (&units), 4);
4300
5001
    gc->pc += cmdlen;
4301
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5002
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5003
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5004
    }
4302
5005
}
4303
5006
 
4304
5007
#define X_GLsop_AreTexturesResident 143
4305
5008
GLboolean
4306
 
__indirect_glAreTexturesResident(GLsizei n, const GLuint * textures, GLboolean * residences)
 
5009
__indirect_glAreTexturesResident(GLsizei n, const GLuint * textures,
 
5010
                                 GLboolean * residences)
4307
5011
{
4308
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4309
 
    Display * const dpy = gc->currentDpy;
 
5012
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5013
    Display *const dpy = gc->currentDpy;
4310
5014
    GLboolean retval = (GLboolean) 0;
4311
5015
    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
4312
5016
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
4313
5017
#ifdef USE_XCB
4314
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
5018
        xcb_connection_t *c = XGetXCBConnection(dpy);
4315
5019
        (void) __glXFlushRenderBuffer(gc, gc->pc);
4316
 
        XCBGlxAreTexturesResidentRep *reply = XCBGlxAreTexturesResidentReply(c, XCBGlxAreTexturesResident(c, gc->currentContextTag, n, textures), NULL);
4317
 
        (void)memcpy(residences, XCBGlxAreTexturesResidentData(reply), XCBGlxAreTexturesResidentDataLength(reply) * sizeof(GLboolean));
 
5020
        xcb_glx_are_textures_resident_reply_t *reply =
 
5021
            xcb_glx_are_textures_resident_reply(c,
 
5022
                                                xcb_glx_are_textures_resident
 
5023
                                                (c, gc->currentContextTag, n,
 
5024
                                                 textures), NULL);
 
5025
        (void) memcpy(residences, xcb_glx_are_textures_resident_data(reply),
 
5026
                      xcb_glx_are_textures_resident_data_length(reply) *
 
5027
                      sizeof(GLboolean));
4318
5028
        retval = reply->ret_val;
4319
5029
        free(reply);
4320
5030
#else
4321
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_AreTexturesResident, cmdlen);
4322
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
4323
 
        (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
 
5031
        GLubyte const *pc =
 
5032
            __glXSetupSingleRequest(gc, X_GLsop_AreTexturesResident, cmdlen);
 
5033
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
5034
        (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
4324
5035
        retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
4325
 
        UnlockDisplay(dpy); SyncHandle();
 
5036
        UnlockDisplay(dpy);
 
5037
        SyncHandle();
4326
5038
#endif /* USE_XCB */
4327
5039
    }
4328
5040
    return retval;
4329
5041
}
4330
5042
 
 
5043
#define X_GLvop_AreTexturesResidentEXT 11
 
5044
GLboolean
 
5045
glAreTexturesResidentEXT(GLsizei n, const GLuint * textures,
 
5046
                         GLboolean * residences)
 
5047
{
 
5048
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5049
 
 
5050
    if (gc->isDirect) {
 
5051
        return CALL_AreTexturesResident(GET_DISPATCH(),
 
5052
                                        (n, textures, residences));
 
5053
    } else {
 
5054
        __GLXcontext *const gc = __glXGetCurrentContext();
 
5055
        Display *const dpy = gc->currentDpy;
 
5056
        GLboolean retval = (GLboolean) 0;
 
5057
        const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
 
5058
        if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
 
5059
            GLubyte const *pc =
 
5060
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
5061
                                        X_GLvop_AreTexturesResidentEXT,
 
5062
                                        cmdlen);
 
5063
            (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
5064
            (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
 
5065
            retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
 
5066
            UnlockDisplay(dpy);
 
5067
            SyncHandle();
 
5068
        }
 
5069
        return retval;
 
5070
    }
 
5071
}
 
5072
 
4331
5073
#define X_GLrop_CopyTexImage1D 4119
4332
5074
void
4333
 
__indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
 
5075
__indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
 
5076
                            GLint x, GLint y, GLsizei width, GLint border)
4334
5077
{
4335
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5078
    __GLXcontext *const gc = __glXGetCurrentContext();
4336
5079
    const GLuint cmdlen = 32;
4337
5080
    emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
4338
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4339
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
4340
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
4341
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4);
4342
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
4343
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
4344
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&border), 4);
 
5081
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5082
    (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
 
5083
    (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
 
5084
    (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
 
5085
    (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
 
5086
    (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
 
5087
    (void) memcpy((void *) (gc->pc + 28), (void *) (&border), 4);
4345
5088
    gc->pc += cmdlen;
4346
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5089
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5090
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5091
    }
4347
5092
}
4348
5093
 
4349
5094
#define X_GLrop_CopyTexImage2D 4120
4350
5095
void
4351
 
__indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
 
5096
__indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
 
5097
                            GLint x, GLint y, GLsizei width, GLsizei height,
 
5098
                            GLint border)
4352
5099
{
4353
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5100
    __GLXcontext *const gc = __glXGetCurrentContext();
4354
5101
    const GLuint cmdlen = 36;
4355
5102
    emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
4356
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4357
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
4358
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
4359
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4);
4360
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
4361
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
4362
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4);
4363
 
    (void) memcpy((void *)(gc->pc + 32), (void *)(&border), 4);
 
5103
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5104
    (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
 
5105
    (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
 
5106
    (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
 
5107
    (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
 
5108
    (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
 
5109
    (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
 
5110
    (void) memcpy((void *) (gc->pc + 32), (void *) (&border), 4);
4364
5111
    gc->pc += cmdlen;
4365
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5112
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5113
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5114
    }
4366
5115
}
4367
5116
 
4368
5117
#define X_GLrop_CopyTexSubImage1D 4121
4369
5118
void
4370
 
__indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
 
5119
__indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
 
5120
                               GLint x, GLint y, GLsizei width)
4371
5121
{
4372
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5122
    __GLXcontext *const gc = __glXGetCurrentContext();
4373
5123
    const GLuint cmdlen = 28;
4374
5124
    emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
4375
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4376
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
4377
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4);
4378
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4);
4379
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4);
4380
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4);
 
5125
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5126
    (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
 
5127
    (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
 
5128
    (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
 
5129
    (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
 
5130
    (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
4381
5131
    gc->pc += cmdlen;
4382
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5132
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5133
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5134
    }
4383
5135
}
4384
5136
 
4385
5137
#define X_GLrop_CopyTexSubImage2D 4122
4386
5138
void
4387
 
__indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 
5139
__indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
 
5140
                               GLint yoffset, GLint x, GLint y, GLsizei width,
 
5141
                               GLsizei height)
4388
5142
{
4389
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5143
    __GLXcontext *const gc = __glXGetCurrentContext();
4390
5144
    const GLuint cmdlen = 36;
4391
5145
    emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
4392
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4393
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
4394
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4);
4395
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4);
4396
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&x), 4);
4397
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&y), 4);
4398
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&width), 4);
4399
 
    (void) memcpy((void *)(gc->pc + 32), (void *)(&height), 4);
 
5146
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5147
    (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
 
5148
    (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
 
5149
    (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
 
5150
    (void) memcpy((void *) (gc->pc + 20), (void *) (&x), 4);
 
5151
    (void) memcpy((void *) (gc->pc + 24), (void *) (&y), 4);
 
5152
    (void) memcpy((void *) (gc->pc + 28), (void *) (&width), 4);
 
5153
    (void) memcpy((void *) (gc->pc + 32), (void *) (&height), 4);
4400
5154
    gc->pc += cmdlen;
4401
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5155
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5156
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5157
    }
4402
5158
}
4403
5159
 
4404
 
#define X_GLvop_DeleteTextures 12
 
5160
#define X_GLsop_DeleteTextures 144
4405
5161
void
4406
5162
__indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
4407
5163
{
4408
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4409
 
    Display * const dpy = gc->currentDpy;
 
5164
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5165
    Display *const dpy = gc->currentDpy;
4410
5166
    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
4411
5167
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
4412
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteTextures, cmdlen);
4413
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
4414
 
        (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
4415
 
        UnlockDisplay(dpy); SyncHandle();
 
5168
#ifdef USE_XCB
 
5169
        xcb_connection_t *c = XGetXCBConnection(dpy);
 
5170
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5171
        xcb_glx_delete_textures(c, gc->currentContextTag, n, textures);
 
5172
#else
 
5173
        GLubyte const *pc =
 
5174
            __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
 
5175
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
5176
        (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
 
5177
        UnlockDisplay(dpy);
 
5178
        SyncHandle();
 
5179
#endif /* USE_XCB */
4416
5180
    }
4417
5181
    return;
4418
5182
}
4419
5183
 
 
5184
#define X_GLvop_DeleteTexturesEXT 12
 
5185
void
 
5186
glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
 
5187
{
 
5188
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5189
 
 
5190
    if (gc->isDirect) {
 
5191
        CALL_DeleteTextures(GET_DISPATCH(), (n, textures));
 
5192
    } else {
 
5193
        __GLXcontext *const gc = __glXGetCurrentContext();
 
5194
        Display *const dpy = gc->currentDpy;
 
5195
        const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
 
5196
        if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
 
5197
            GLubyte const *pc =
 
5198
                __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
 
5199
                                        X_GLvop_DeleteTexturesEXT, cmdlen);
 
5200
            (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
5201
            (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
 
5202
            UnlockDisplay(dpy);
 
5203
            SyncHandle();
 
5204
        }
 
5205
        return;
 
5206
    }
 
5207
}
 
5208
 
4420
5209
#define X_GLsop_GenTextures 145
4421
5210
void
4422
5211
__indirect_glGenTextures(GLsizei n, GLuint * textures)
4423
5212
{
4424
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4425
 
    Display * const dpy = gc->currentDpy;
 
5213
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5214
    Display *const dpy = gc->currentDpy;
4426
5215
    const GLuint cmdlen = 4;
4427
5216
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
4428
5217
#ifdef USE_XCB
4429
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
5218
        xcb_connection_t *c = XGetXCBConnection(dpy);
4430
5219
        (void) __glXFlushRenderBuffer(gc, gc->pc);
4431
 
        XCBGlxGenTexturesRep *reply = XCBGlxGenTexturesReply(c, XCBGlxGenTextures(c, gc->currentContextTag, n), NULL);
4432
 
        (void)memcpy(textures, XCBGlxGenTexturesData(reply), XCBGlxGenTexturesDataLength(reply) * sizeof(GLuint));
 
5220
        xcb_glx_gen_textures_reply_t *reply =
 
5221
            xcb_glx_gen_textures_reply(c,
 
5222
                                       xcb_glx_gen_textures(c,
 
5223
                                                            gc->
 
5224
                                                            currentContextTag,
 
5225
                                                            n), NULL);
 
5226
        (void) memcpy(textures, xcb_glx_gen_textures_data(reply),
 
5227
                      xcb_glx_gen_textures_data_length(reply) *
 
5228
                      sizeof(GLuint));
4433
5229
        free(reply);
4434
5230
#else
4435
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
4436
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
 
5231
        GLubyte const *pc =
 
5232
            __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
 
5233
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
4437
5234
        (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
4438
 
        UnlockDisplay(dpy); SyncHandle();
 
5235
        UnlockDisplay(dpy);
 
5236
        SyncHandle();
4439
5237
#endif /* USE_XCB */
4440
5238
    }
4441
5239
    return;
4442
5240
}
4443
5241
 
 
5242
#define X_GLvop_GenTexturesEXT 13
 
5243
void
 
5244
glGenTexturesEXT(GLsizei n, GLuint * textures)
 
5245
{
 
5246
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5247
 
 
5248
    if (gc->isDirect) {
 
5249
        CALL_GenTextures(GET_DISPATCH(), (n, textures));
 
5250
    } else {
 
5251
        __GLXcontext *const gc = __glXGetCurrentContext();
 
5252
        Display *const dpy = gc->currentDpy;
 
5253
        const GLuint cmdlen = 4;
 
5254
        if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
 
5255
            GLubyte const *pc =
 
5256
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
5257
                                        X_GLvop_GenTexturesEXT, cmdlen);
 
5258
            (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
5259
            (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
 
5260
            UnlockDisplay(dpy);
 
5261
            SyncHandle();
 
5262
        }
 
5263
        return;
 
5264
    }
 
5265
}
 
5266
 
4444
5267
#define X_GLsop_IsTexture 146
4445
5268
GLboolean
4446
5269
__indirect_glIsTexture(GLuint texture)
4447
5270
{
4448
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4449
 
    Display * const dpy = gc->currentDpy;
 
5271
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5272
    Display *const dpy = gc->currentDpy;
4450
5273
    GLboolean retval = (GLboolean) 0;
4451
5274
    const GLuint cmdlen = 4;
4452
5275
    if (__builtin_expect(dpy != NULL, 1)) {
4453
5276
#ifdef USE_XCB
4454
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
5277
        xcb_connection_t *c = XGetXCBConnection(dpy);
4455
5278
        (void) __glXFlushRenderBuffer(gc, gc->pc);
4456
 
        XCBGlxIsTextureRep *reply = XCBGlxIsTextureReply(c, XCBGlxIsTexture(c, gc->currentContextTag, texture), NULL);
 
5279
        xcb_glx_is_texture_reply_t *reply =
 
5280
            xcb_glx_is_texture_reply(c,
 
5281
                                     xcb_glx_is_texture(c,
 
5282
                                                        gc->currentContextTag,
 
5283
                                                        texture), NULL);
4457
5284
        retval = reply->ret_val;
4458
5285
        free(reply);
4459
5286
#else
4460
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
4461
 
        (void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
 
5287
        GLubyte const *pc =
 
5288
            __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
 
5289
        (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
4462
5290
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4463
 
        UnlockDisplay(dpy); SyncHandle();
 
5291
        UnlockDisplay(dpy);
 
5292
        SyncHandle();
4464
5293
#endif /* USE_XCB */
4465
5294
    }
4466
5295
    return retval;
4467
5296
}
4468
5297
 
 
5298
#define X_GLvop_IsTextureEXT 14
 
5299
GLboolean
 
5300
glIsTextureEXT(GLuint texture)
 
5301
{
 
5302
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5303
 
 
5304
    if (gc->isDirect) {
 
5305
        return CALL_IsTexture(GET_DISPATCH(), (texture));
 
5306
    } else {
 
5307
        __GLXcontext *const gc = __glXGetCurrentContext();
 
5308
        Display *const dpy = gc->currentDpy;
 
5309
        GLboolean retval = (GLboolean) 0;
 
5310
        const GLuint cmdlen = 4;
 
5311
        if (__builtin_expect(dpy != NULL, 1)) {
 
5312
            GLubyte const *pc =
 
5313
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
5314
                                        X_GLvop_IsTextureEXT, cmdlen);
 
5315
            (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
 
5316
            retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
 
5317
            UnlockDisplay(dpy);
 
5318
            SyncHandle();
 
5319
        }
 
5320
        return retval;
 
5321
    }
 
5322
}
 
5323
 
4469
5324
#define X_GLrop_PrioritizeTextures 4118
4470
5325
void
4471
 
__indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclampf * priorities)
 
5326
__indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures,
 
5327
                                const GLclampf * priorities)
4472
5328
{
4473
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5329
    __GLXcontext *const gc = __glXGetCurrentContext();
4474
5330
    const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
4475
5331
    if (__builtin_expect(n >= 0, 1)) {
4476
5332
        emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
4477
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
4478
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(textures), (n * 4));
4479
 
        (void) memcpy((void *)(gc->pc + 8 + (n * 4)), (void *)(priorities), (n * 4));
 
5333
        (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
 
5334
        (void) memcpy((void *) (gc->pc + 8), (void *) (textures), (n * 4));
 
5335
        (void) memcpy((void *) (gc->pc + 8 + (n * 4)), (void *) (priorities),
 
5336
                      (n * 4));
4480
5337
        gc->pc += cmdlen;
4481
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5338
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5339
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5340
        }
4482
5341
    }
4483
5342
}
4484
5343
 
4485
5344
static void
4486
 
__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 )
 
5345
__glx_TexSubImage_1D2D(unsigned opcode, unsigned dim, GLenum target,
 
5346
                       GLint level, GLint xoffset, GLint yoffset,
 
5347
                       GLsizei width, GLsizei height, GLenum format,
 
5348
                       GLenum type, const GLvoid * pixels)
4487
5349
{
4488
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4489
 
    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
 
5350
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5351
    const GLuint compsize =
 
5352
        (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
 
5353
                                         target) : 0;
4490
5354
    const GLuint cmdlen = 60 + __GLX_PAD(compsize);
4491
5355
    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4492
5356
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
4493
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
5357
            if ((gc->pc + cmdlen) > gc->bufEnd) {
4494
5358
                (void) __glXFlushRenderBuffer(gc, gc->pc);
4495
5359
            }
4496
5360
            emit_header(gc->pc, opcode, cmdlen);
4497
 
            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
4498
 
            (void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4);
4499
 
            (void) memcpy((void *)(gc->pc + 32), (void *)(&xoffset), 4);
4500
 
            (void) memcpy((void *)(gc->pc + 36), (void *)(&yoffset), 4);
4501
 
            (void) memcpy((void *)(gc->pc + 40), (void *)(&width), 4);
4502
 
            (void) memcpy((void *)(gc->pc + 44), (void *)(&height), 4);
4503
 
            (void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4);
4504
 
            (void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4);
4505
 
            (void) memcpy((void *)(gc->pc + 56), (void *)((pixels == NULL) ? one : zero), 4);
 
5361
            (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
 
5362
            (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
 
5363
            (void) memcpy((void *) (gc->pc + 32), (void *) (&xoffset), 4);
 
5364
            (void) memcpy((void *) (gc->pc + 36), (void *) (&yoffset), 4);
 
5365
            (void) memcpy((void *) (gc->pc + 40), (void *) (&width), 4);
 
5366
            (void) memcpy((void *) (gc->pc + 44), (void *) (&height), 4);
 
5367
            (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
 
5368
            (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
 
5369
            (void) memcpy((void *) (gc->pc + 56),
 
5370
                          (void *) ((pixels == NULL) ? one : zero), 4);
4506
5371
            if (compsize > 0) {
4507
 
                (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 60, gc->pc + 4);
4508
 
            }
4509
 
            else {
4510
 
                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
 
5372
                (*gc->fillImage) (gc, dim, width, height, 1, format, type,
 
5373
                                  pixels, gc->pc + 60, gc->pc + 4);
 
5374
            } else {
 
5375
                (void) memcpy(gc->pc + 4, default_pixel_store_2D,
 
5376
                              default_pixel_store_2D_size);
4511
5377
            }
4512
5378
            gc->pc += cmdlen;
4513
 
            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4514
 
        }
4515
 
        else {
 
5379
            if (gc->pc > gc->limit) {
 
5380
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5381
            }
 
5382
        } else {
4516
5383
            const GLint op = opcode;
4517
5384
            const GLuint cmdlenLarge = cmdlen + 4;
4518
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
4519
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
4520
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
4521
 
            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
4522
 
            (void) memcpy((void *)(pc + 32), (void *)(&level), 4);
4523
 
            (void) memcpy((void *)(pc + 36), (void *)(&xoffset), 4);
4524
 
            (void) memcpy((void *)(pc + 40), (void *)(&yoffset), 4);
4525
 
            (void) memcpy((void *)(pc + 44), (void *)(&width), 4);
4526
 
            (void) memcpy((void *)(pc + 48), (void *)(&height), 4);
4527
 
            (void) memcpy((void *)(pc + 52), (void *)(&format), 4);
4528
 
            (void) memcpy((void *)(pc + 56), (void *)(&type), 4);
4529
 
            (void) memcpy((void *)(pc + 60), zero, 4);
4530
 
            __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 64, pc + 8);
 
5385
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
5386
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
5387
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
5388
            (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
 
5389
            (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
 
5390
            (void) memcpy((void *) (pc + 36), (void *) (&xoffset), 4);
 
5391
            (void) memcpy((void *) (pc + 40), (void *) (&yoffset), 4);
 
5392
            (void) memcpy((void *) (pc + 44), (void *) (&width), 4);
 
5393
            (void) memcpy((void *) (pc + 48), (void *) (&height), 4);
 
5394
            (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
 
5395
            (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
 
5396
            (void) memcpy((void *) (pc + 60), zero, 4);
 
5397
            __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
 
5398
                                type, pixels, pc + 64, pc + 8);
4531
5399
        }
4532
5400
    }
4533
5401
}
4534
5402
 
4535
5403
#define X_GLrop_TexSubImage1D 4099
4536
5404
void
4537
 
__indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
 
5405
__indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset,
 
5406
                           GLsizei width, GLenum format, GLenum type,
 
5407
                           const GLvoid * pixels)
4538
5408
{
4539
 
    __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset, 1, width, 1, format, type, pixels );
 
5409
    __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset,
 
5410
                           1, width, 1, format, type, pixels);
4540
5411
}
4541
5412
 
4542
5413
#define X_GLrop_TexSubImage2D 4100
4543
5414
void
4544
 
__indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
 
5415
__indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset,
 
5416
                           GLint yoffset, GLsizei width, GLsizei height,
 
5417
                           GLenum format, GLenum type, const GLvoid * pixels)
4545
5418
{
4546
 
    __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset, yoffset, width, height, format, type, pixels );
 
5419
    __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset,
 
5420
                           yoffset, width, height, format, type, pixels);
4547
5421
}
4548
5422
 
4549
5423
#define X_GLrop_BlendColor 4096
4550
5424
void
4551
 
__indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
 
5425
__indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue,
 
5426
                        GLclampf alpha)
4552
5427
{
4553
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5428
    __GLXcontext *const gc = __glXGetCurrentContext();
4554
5429
    const GLuint cmdlen = 20;
4555
5430
    emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
4556
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
4557
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
4558
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
4559
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4);
 
5431
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
5432
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
5433
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
 
5434
    (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
4560
5435
    gc->pc += cmdlen;
4561
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5436
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5437
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5438
    }
4562
5439
}
4563
5440
 
4564
5441
#define X_GLrop_BlendEquation 4097
4565
5442
void
4566
5443
__indirect_glBlendEquation(GLenum mode)
4567
5444
{
4568
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5445
    __GLXcontext *const gc = __glXGetCurrentContext();
4569
5446
    const GLuint cmdlen = 8;
4570
5447
    emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
4571
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
 
5448
    (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
4572
5449
    gc->pc += cmdlen;
4573
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5450
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5451
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5452
    }
4574
5453
}
4575
5454
 
4576
5455
#define X_GLrop_ColorTable 2053
4577
5456
void
4578
 
__indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
 
5457
__indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width,
 
5458
                        GLenum format, GLenum type, const GLvoid * table)
4579
5459
{
4580
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4581
 
    const GLuint compsize = (table != NULL) ? __glImageSize(width, 1, 1, format, type, target) : 0;
 
5460
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5461
    const GLuint compsize =
 
5462
        (table != NULL) ? __glImageSize(width, 1, 1, format, type,
 
5463
                                        target) : 0;
4582
5464
    const GLuint cmdlen = 44 + __GLX_PAD(compsize);
4583
5465
    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4584
5466
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
4585
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
5467
            if ((gc->pc + cmdlen) > gc->bufEnd) {
4586
5468
                (void) __glXFlushRenderBuffer(gc, gc->pc);
4587
5469
            }
4588
5470
            emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
4589
 
            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
4590
 
            (void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4);
4591
 
            (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
4592
 
            (void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4);
4593
 
            (void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4);
 
5471
            (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
 
5472
            (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
 
5473
                          4);
 
5474
            (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
 
5475
            (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
 
5476
            (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
4594
5477
            if (compsize > 0) {
4595
 
                (*gc->fillImage)(gc, 1, width, 1, 1, format, type, table, gc->pc + 44, gc->pc + 4);
4596
 
            }
4597
 
            else {
4598
 
                (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size );
 
5478
                (*gc->fillImage) (gc, 1, width, 1, 1, format, type, table,
 
5479
                                  gc->pc + 44, gc->pc + 4);
 
5480
            } else {
 
5481
                (void) memcpy(gc->pc + 4, default_pixel_store_1D,
 
5482
                              default_pixel_store_1D_size);
4599
5483
            }
4600
5484
            gc->pc += cmdlen;
4601
 
            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4602
 
        }
4603
 
        else {
 
5485
            if (gc->pc > gc->limit) {
 
5486
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5487
            }
 
5488
        } else {
4604
5489
            const GLint op = X_GLrop_ColorTable;
4605
5490
            const GLuint cmdlenLarge = cmdlen + 4;
4606
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
4607
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
4608
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
4609
 
            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
4610
 
            (void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4);
4611
 
            (void) memcpy((void *)(pc + 36), (void *)(&width), 4);
4612
 
            (void) memcpy((void *)(pc + 40), (void *)(&format), 4);
4613
 
            (void) memcpy((void *)(pc + 44), (void *)(&type), 4);
4614
 
            __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type, table, pc + 48, pc + 8);
 
5491
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
5492
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
5493
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
5494
            (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
 
5495
            (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
 
5496
            (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
 
5497
            (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
 
5498
            (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
 
5499
            __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type,
 
5500
                                table, pc + 48, pc + 8);
4615
5501
        }
4616
5502
    }
4617
5503
}
4618
5504
 
4619
5505
#define X_GLrop_ColorTableParameterfv 2054
4620
5506
void
4621
 
__indirect_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params)
 
5507
__indirect_glColorTableParameterfv(GLenum target, GLenum pname,
 
5508
                                   const GLfloat * params)
4622
5509
{
4623
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5510
    __GLXcontext *const gc = __glXGetCurrentContext();
4624
5511
    const GLuint compsize = __glColorTableParameterfv_size(pname);
4625
5512
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
4626
5513
    emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
4627
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4628
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
4629
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
5514
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5515
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
5516
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
4630
5517
    gc->pc += cmdlen;
4631
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5518
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5519
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5520
    }
4632
5521
}
4633
5522
 
4634
5523
#define X_GLrop_ColorTableParameteriv 2055
4635
5524
void
4636
 
__indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params)
 
5525
__indirect_glColorTableParameteriv(GLenum target, GLenum pname,
 
5526
                                   const GLint * params)
4637
5527
{
4638
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5528
    __GLXcontext *const gc = __glXGetCurrentContext();
4639
5529
    const GLuint compsize = __glColorTableParameteriv_size(pname);
4640
5530
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
4641
5531
    emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
4642
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4643
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
4644
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
5532
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5533
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
5534
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
4645
5535
    gc->pc += cmdlen;
4646
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5536
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5537
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5538
    }
4647
5539
}
4648
5540
 
4649
5541
#define X_GLrop_CopyColorTable 2056
4650
5542
void
4651
 
__indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
 
5543
__indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x,
 
5544
                            GLint y, GLsizei width)
4652
5545
{
4653
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5546
    __GLXcontext *const gc = __glXGetCurrentContext();
4654
5547
    const GLuint cmdlen = 24;
4655
5548
    emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
4656
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4657
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
4658
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
4659
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
4660
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
 
5549
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5550
    (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
 
5551
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
 
5552
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
 
5553
    (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
4661
5554
    gc->pc += cmdlen;
4662
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5555
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5556
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5557
    }
4663
5558
}
4664
5559
 
4665
5560
#define X_GLsop_GetColorTable 147
4666
5561
void
4667
 
__indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table)
 
5562
__indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
 
5563
                           GLvoid * table)
4668
5564
{
4669
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4670
 
    const __GLXattribute * const state = gc->client_state_private;
4671
 
    Display * const dpy = gc->currentDpy;
 
5565
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5566
    const __GLXattribute *const state = gc->client_state_private;
 
5567
    Display *const dpy = gc->currentDpy;
4672
5568
    const GLuint cmdlen = 16;
4673
5569
    if (__builtin_expect(dpy != NULL, 1)) {
4674
5570
#ifdef USE_XCB
4675
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
5571
        xcb_connection_t *c = XGetXCBConnection(dpy);
4676
5572
        (void) __glXFlushRenderBuffer(gc, gc->pc);
4677
 
        XCBGlxGetColorTableRep *reply = XCBGlxGetColorTableReply(c, XCBGlxGetColorTable(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
4678
 
        (void)memcpy(table, XCBGlxGetColorTableData(reply), XCBGlxGetColorTableDataLength(reply) * sizeof(GLvoid));
 
5573
        xcb_glx_get_color_table_reply_t *reply =
 
5574
            xcb_glx_get_color_table_reply(c,
 
5575
                                          xcb_glx_get_color_table(c,
 
5576
                                                                  gc->
 
5577
                                                                  currentContextTag,
 
5578
                                                                  target,
 
5579
                                                                  format,
 
5580
                                                                  type,
 
5581
                                                                  state->
 
5582
                                                                  storePack.
 
5583
                                                                  swapEndian),
 
5584
                                          NULL);
 
5585
        (void) memcpy(table, xcb_glx_get_color_table_data(reply),
 
5586
                      xcb_glx_get_color_table_data_length(reply) *
 
5587
                      sizeof(GLvoid));
4679
5588
        free(reply);
4680
5589
#else
4681
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
4682
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4683
 
        (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
4684
 
        (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
4685
 
        *(int32_t *)(pc + 12) = 0;
4686
 
        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
4687
 
        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE);
4688
 
        UnlockDisplay(dpy); SyncHandle();
 
5590
        GLubyte const *pc =
 
5591
            __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
 
5592
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
5593
        (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
 
5594
        (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
 
5595
        *(int32_t *) (pc + 12) = 0;
 
5596
        *(int8_t *) (pc + 12) = state->storePack.swapEndian;
 
5597
        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
 
5598
                            GL_TRUE);
 
5599
        UnlockDisplay(dpy);
 
5600
        SyncHandle();
4689
5601
#endif /* USE_XCB */
4690
5602
    }
4691
5603
    return;
4692
5604
}
4693
5605
 
 
5606
#define X_GLvop_GetColorTableSGI 4098
 
5607
void
 
5608
glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
 
5609
{
 
5610
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5611
 
 
5612
    if (gc->isDirect) {
 
5613
        CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table));
 
5614
    } else {
 
5615
        __GLXcontext *const gc = __glXGetCurrentContext();
 
5616
        const __GLXattribute *const state = gc->client_state_private;
 
5617
        Display *const dpy = gc->currentDpy;
 
5618
        const GLuint cmdlen = 16;
 
5619
        if (__builtin_expect(dpy != NULL, 1)) {
 
5620
            GLubyte const *pc =
 
5621
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
5622
                                        X_GLvop_GetColorTableSGI, cmdlen);
 
5623
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
5624
            (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
 
5625
            (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
 
5626
            *(int32_t *) (pc + 12) = 0;
 
5627
            *(int8_t *) (pc + 12) = state->storePack.swapEndian;
 
5628
            __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
 
5629
                                GL_TRUE);
 
5630
            UnlockDisplay(dpy);
 
5631
            SyncHandle();
 
5632
        }
 
5633
        return;
 
5634
    }
 
5635
}
 
5636
 
4694
5637
#define X_GLsop_GetColorTableParameterfv 148
4695
5638
void
4696
 
__indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params)
 
5639
__indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
 
5640
                                      GLfloat * params)
4697
5641
{
4698
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4699
 
    Display * const dpy = gc->currentDpy;
 
5642
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5643
    Display *const dpy = gc->currentDpy;
4700
5644
    const GLuint cmdlen = 8;
4701
5645
    if (__builtin_expect(dpy != NULL, 1)) {
4702
5646
#ifdef USE_XCB
4703
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
5647
        xcb_connection_t *c = XGetXCBConnection(dpy);
4704
5648
        (void) __glXFlushRenderBuffer(gc, gc->pc);
4705
 
        XCBGlxGetColorTableParameterfvRep *reply = XCBGlxGetColorTableParameterfvReply(c, XCBGlxGetColorTableParameterfv(c, gc->currentContextTag, target, pname), NULL);
4706
 
        if (XCBGlxGetColorTableParameterfvDataLength(reply) == 0)
4707
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
5649
        xcb_glx_get_color_table_parameterfv_reply_t *reply =
 
5650
            xcb_glx_get_color_table_parameterfv_reply(c,
 
5651
                                                      xcb_glx_get_color_table_parameterfv
 
5652
                                                      (c,
 
5653
                                                       gc->currentContextTag,
 
5654
                                                       target, pname), NULL);
 
5655
        if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 0)
 
5656
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4708
5657
        else
4709
 
        (void)memcpy(params, XCBGlxGetColorTableParameterfvData(reply), XCBGlxGetColorTableParameterfvDataLength(reply) * sizeof(GLfloat));
 
5658
            (void) memcpy(params,
 
5659
                          xcb_glx_get_color_table_parameterfv_data(reply),
 
5660
                          xcb_glx_get_color_table_parameterfv_data_length
 
5661
                          (reply) * sizeof(GLfloat));
4710
5662
        free(reply);
4711
5663
#else
4712
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv, cmdlen);
4713
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4714
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
5664
        GLubyte const *pc =
 
5665
            __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv,
 
5666
                                    cmdlen);
 
5667
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
5668
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4715
5669
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4716
 
        UnlockDisplay(dpy); SyncHandle();
 
5670
        UnlockDisplay(dpy);
 
5671
        SyncHandle();
4717
5672
#endif /* USE_XCB */
4718
5673
    }
4719
5674
    return;
4720
5675
}
4721
5676
 
 
5677
#define X_GLvop_GetColorTableParameterfvSGI 4099
 
5678
void
 
5679
glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
 
5680
{
 
5681
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5682
 
 
5683
    if (gc->isDirect) {
 
5684
        CALL_GetColorTableParameterfv(GET_DISPATCH(),
 
5685
                                      (target, pname, params));
 
5686
    } else {
 
5687
        __GLXcontext *const gc = __glXGetCurrentContext();
 
5688
        Display *const dpy = gc->currentDpy;
 
5689
        const GLuint cmdlen = 8;
 
5690
        if (__builtin_expect(dpy != NULL, 1)) {
 
5691
            GLubyte const *pc =
 
5692
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
5693
                                        X_GLvop_GetColorTableParameterfvSGI,
 
5694
                                        cmdlen);
 
5695
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
5696
            (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
5697
            (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
5698
            UnlockDisplay(dpy);
 
5699
            SyncHandle();
 
5700
        }
 
5701
        return;
 
5702
    }
 
5703
}
 
5704
 
4722
5705
#define X_GLsop_GetColorTableParameteriv 149
4723
5706
void
4724
 
__indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * params)
 
5707
__indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
 
5708
                                      GLint * params)
4725
5709
{
4726
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4727
 
    Display * const dpy = gc->currentDpy;
 
5710
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5711
    Display *const dpy = gc->currentDpy;
4728
5712
    const GLuint cmdlen = 8;
4729
5713
    if (__builtin_expect(dpy != NULL, 1)) {
4730
5714
#ifdef USE_XCB
4731
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
5715
        xcb_connection_t *c = XGetXCBConnection(dpy);
4732
5716
        (void) __glXFlushRenderBuffer(gc, gc->pc);
4733
 
        XCBGlxGetColorTableParameterivRep *reply = XCBGlxGetColorTableParameterivReply(c, XCBGlxGetColorTableParameteriv(c, gc->currentContextTag, target, pname), NULL);
4734
 
        if (XCBGlxGetColorTableParameterivDataLength(reply) == 0)
4735
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
5717
        xcb_glx_get_color_table_parameteriv_reply_t *reply =
 
5718
            xcb_glx_get_color_table_parameteriv_reply(c,
 
5719
                                                      xcb_glx_get_color_table_parameteriv
 
5720
                                                      (c,
 
5721
                                                       gc->currentContextTag,
 
5722
                                                       target, pname), NULL);
 
5723
        if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 0)
 
5724
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4736
5725
        else
4737
 
        (void)memcpy(params, XCBGlxGetColorTableParameterivData(reply), XCBGlxGetColorTableParameterivDataLength(reply) * sizeof(GLint));
 
5726
            (void) memcpy(params,
 
5727
                          xcb_glx_get_color_table_parameteriv_data(reply),
 
5728
                          xcb_glx_get_color_table_parameteriv_data_length
 
5729
                          (reply) * sizeof(GLint));
4738
5730
        free(reply);
4739
5731
#else
4740
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv, cmdlen);
4741
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4742
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
5732
        GLubyte const *pc =
 
5733
            __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv,
 
5734
                                    cmdlen);
 
5735
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
5736
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4743
5737
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4744
 
        UnlockDisplay(dpy); SyncHandle();
 
5738
        UnlockDisplay(dpy);
 
5739
        SyncHandle();
4745
5740
#endif /* USE_XCB */
4746
5741
    }
4747
5742
    return;
4748
5743
}
4749
5744
 
 
5745
#define X_GLvop_GetColorTableParameterivSGI 4100
 
5746
void
 
5747
glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
 
5748
{
 
5749
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5750
 
 
5751
    if (gc->isDirect) {
 
5752
        CALL_GetColorTableParameteriv(GET_DISPATCH(),
 
5753
                                      (target, pname, params));
 
5754
    } else {
 
5755
        __GLXcontext *const gc = __glXGetCurrentContext();
 
5756
        Display *const dpy = gc->currentDpy;
 
5757
        const GLuint cmdlen = 8;
 
5758
        if (__builtin_expect(dpy != NULL, 1)) {
 
5759
            GLubyte const *pc =
 
5760
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
5761
                                        X_GLvop_GetColorTableParameterivSGI,
 
5762
                                        cmdlen);
 
5763
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
5764
            (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
5765
            (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
5766
            UnlockDisplay(dpy);
 
5767
            SyncHandle();
 
5768
        }
 
5769
        return;
 
5770
    }
 
5771
}
 
5772
 
4750
5773
#define X_GLrop_ColorSubTable 195
4751
5774
void
4752
 
__indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data)
 
5775
__indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count,
 
5776
                           GLenum format, GLenum type, const GLvoid * data)
4753
5777
{
4754
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4755
 
    const GLuint compsize = (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
 
5778
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5779
    const GLuint compsize =
 
5780
        (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
4756
5781
    const GLuint cmdlen = 44 + __GLX_PAD(compsize);
4757
5782
    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4758
5783
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
4759
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
5784
            if ((gc->pc + cmdlen) > gc->bufEnd) {
4760
5785
                (void) __glXFlushRenderBuffer(gc, gc->pc);
4761
5786
            }
4762
5787
            emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
4763
 
            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
4764
 
            (void) memcpy((void *)(gc->pc + 28), (void *)(&start), 4);
4765
 
            (void) memcpy((void *)(gc->pc + 32), (void *)(&count), 4);
4766
 
            (void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4);
4767
 
            (void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4);
 
5788
            (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
 
5789
            (void) memcpy((void *) (gc->pc + 28), (void *) (&start), 4);
 
5790
            (void) memcpy((void *) (gc->pc + 32), (void *) (&count), 4);
 
5791
            (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
 
5792
            (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
4768
5793
            if (compsize > 0) {
4769
 
                (*gc->fillImage)(gc, 1, count, 1, 1, format, type, data, gc->pc + 44, gc->pc + 4);
4770
 
            }
4771
 
            else {
4772
 
                (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size );
 
5794
                (*gc->fillImage) (gc, 1, count, 1, 1, format, type, data,
 
5795
                                  gc->pc + 44, gc->pc + 4);
 
5796
            } else {
 
5797
                (void) memcpy(gc->pc + 4, default_pixel_store_1D,
 
5798
                              default_pixel_store_1D_size);
4773
5799
            }
4774
5800
            gc->pc += cmdlen;
4775
 
            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4776
 
        }
4777
 
        else {
 
5801
            if (gc->pc > gc->limit) {
 
5802
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5803
            }
 
5804
        } else {
4778
5805
            const GLint op = X_GLrop_ColorSubTable;
4779
5806
            const GLuint cmdlenLarge = cmdlen + 4;
4780
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
4781
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
4782
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
4783
 
            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
4784
 
            (void) memcpy((void *)(pc + 32), (void *)(&start), 4);
4785
 
            (void) memcpy((void *)(pc + 36), (void *)(&count), 4);
4786
 
            (void) memcpy((void *)(pc + 40), (void *)(&format), 4);
4787
 
            (void) memcpy((void *)(pc + 44), (void *)(&type), 4);
4788
 
            __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type, data, pc + 48, pc + 8);
 
5807
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
5808
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
5809
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
5810
            (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
 
5811
            (void) memcpy((void *) (pc + 32), (void *) (&start), 4);
 
5812
            (void) memcpy((void *) (pc + 36), (void *) (&count), 4);
 
5813
            (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
 
5814
            (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
 
5815
            __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type,
 
5816
                                data, pc + 48, pc + 8);
4789
5817
        }
4790
5818
    }
4791
5819
}
4792
5820
 
4793
5821
#define X_GLrop_CopyColorSubTable 196
4794
5822
void
4795
 
__indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
 
5823
__indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y,
 
5824
                               GLsizei width)
4796
5825
{
4797
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5826
    __GLXcontext *const gc = __glXGetCurrentContext();
4798
5827
    const GLuint cmdlen = 24;
4799
5828
    emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
4800
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4801
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&start), 4);
4802
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
4803
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
4804
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
 
5829
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5830
    (void) memcpy((void *) (gc->pc + 8), (void *) (&start), 4);
 
5831
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
 
5832
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
 
5833
    (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
4805
5834
    gc->pc += cmdlen;
4806
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5835
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5836
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5837
    }
4807
5838
}
4808
5839
 
4809
5840
static void
4810
 
__glx_ConvolutionFilter_1D2D( unsigned opcode, unsigned dim, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image )
 
5841
__glx_ConvolutionFilter_1D2D(unsigned opcode, unsigned dim, GLenum target,
 
5842
                             GLenum internalformat, GLsizei width,
 
5843
                             GLsizei height, GLenum format, GLenum type,
 
5844
                             const GLvoid * image)
4811
5845
{
4812
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4813
 
    const GLuint compsize = (image != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
 
5846
    __GLXcontext *const gc = __glXGetCurrentContext();
 
5847
    const GLuint compsize =
 
5848
        (image != NULL) ? __glImageSize(width, height, 1, format, type,
 
5849
                                        target) : 0;
4814
5850
    const GLuint cmdlen = 48 + __GLX_PAD(compsize);
4815
5851
    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4816
5852
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
4817
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
5853
            if ((gc->pc + cmdlen) > gc->bufEnd) {
4818
5854
                (void) __glXFlushRenderBuffer(gc, gc->pc);
4819
5855
            }
4820
5856
            emit_header(gc->pc, opcode, cmdlen);
4821
 
            (void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4);
4822
 
            (void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4);
4823
 
            (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
4824
 
            (void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4);
4825
 
            (void) memcpy((void *)(gc->pc + 40), (void *)(&format), 4);
4826
 
            (void) memcpy((void *)(gc->pc + 44), (void *)(&type), 4);
 
5857
            (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
 
5858
            (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
 
5859
                          4);
 
5860
            (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
 
5861
            (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
 
5862
            (void) memcpy((void *) (gc->pc + 40), (void *) (&format), 4);
 
5863
            (void) memcpy((void *) (gc->pc + 44), (void *) (&type), 4);
4827
5864
            if (compsize > 0) {
4828
 
                (*gc->fillImage)(gc, dim, width, height, 1, format, type, image, gc->pc + 48, gc->pc + 4);
4829
 
            }
4830
 
            else {
4831
 
                (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size );
 
5865
                (*gc->fillImage) (gc, dim, width, height, 1, format, type,
 
5866
                                  image, gc->pc + 48, gc->pc + 4);
 
5867
            } else {
 
5868
                (void) memcpy(gc->pc + 4, default_pixel_store_2D,
 
5869
                              default_pixel_store_2D_size);
4832
5870
            }
4833
5871
            gc->pc += cmdlen;
4834
 
            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4835
 
        }
4836
 
        else {
 
5872
            if (gc->pc > gc->limit) {
 
5873
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5874
            }
 
5875
        } else {
4837
5876
            const GLint op = opcode;
4838
5877
            const GLuint cmdlenLarge = cmdlen + 4;
4839
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
4840
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
4841
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
4842
 
            (void) memcpy((void *)(pc + 28), (void *)(&target), 4);
4843
 
            (void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4);
4844
 
            (void) memcpy((void *)(pc + 36), (void *)(&width), 4);
4845
 
            (void) memcpy((void *)(pc + 40), (void *)(&height), 4);
4846
 
            (void) memcpy((void *)(pc + 44), (void *)(&format), 4);
4847
 
            (void) memcpy((void *)(pc + 48), (void *)(&type), 4);
4848
 
            __glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, image, pc + 52, pc + 8);
 
5878
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
5879
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
5880
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
5881
            (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
 
5882
            (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
 
5883
            (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
 
5884
            (void) memcpy((void *) (pc + 40), (void *) (&height), 4);
 
5885
            (void) memcpy((void *) (pc + 44), (void *) (&format), 4);
 
5886
            (void) memcpy((void *) (pc + 48), (void *) (&type), 4);
 
5887
            __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
 
5888
                                type, image, pc + 52, pc + 8);
4849
5889
        }
4850
5890
    }
4851
5891
}
4852
5892
 
4853
5893
#define X_GLrop_ConvolutionFilter1D 4101
4854
5894
void
4855
 
__indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image)
 
5895
__indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat,
 
5896
                                 GLsizei width, GLenum format, GLenum type,
 
5897
                                 const GLvoid * image)
4856
5898
{
4857
 
    __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target, internalformat, width, 1, format, type, image );
 
5899
    __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target,
 
5900
                                 internalformat, width, 1, format, type,
 
5901
                                 image);
4858
5902
}
4859
5903
 
4860
5904
#define X_GLrop_ConvolutionFilter2D 4102
4861
5905
void
4862
 
__indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image)
 
5906
__indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat,
 
5907
                                 GLsizei width, GLsizei height, GLenum format,
 
5908
                                 GLenum type, const GLvoid * image)
4863
5909
{
4864
 
    __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target, internalformat, width, height, format, type, image );
 
5910
    __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target,
 
5911
                                 internalformat, width, height, format, type,
 
5912
                                 image);
4865
5913
}
4866
5914
 
4867
5915
#define X_GLrop_ConvolutionParameterf 4103
4868
5916
void
4869
 
__indirect_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
 
5917
__indirect_glConvolutionParameterf(GLenum target, GLenum pname,
 
5918
                                   GLfloat params)
4870
5919
{
4871
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5920
    __GLXcontext *const gc = __glXGetCurrentContext();
4872
5921
    const GLuint cmdlen = 16;
4873
5922
    emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
4874
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4875
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
4876
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&params), 4);
 
5923
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5924
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
5925
    (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
4877
5926
    gc->pc += cmdlen;
4878
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5927
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5928
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5929
    }
4879
5930
}
4880
5931
 
4881
5932
#define X_GLrop_ConvolutionParameterfv 4104
4882
5933
void
4883
 
__indirect_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params)
 
5934
__indirect_glConvolutionParameterfv(GLenum target, GLenum pname,
 
5935
                                    const GLfloat * params)
4884
5936
{
4885
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5937
    __GLXcontext *const gc = __glXGetCurrentContext();
4886
5938
    const GLuint compsize = __glConvolutionParameterfv_size(pname);
4887
5939
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
4888
5940
    emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
4889
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4890
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
4891
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
5941
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5942
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
5943
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
4892
5944
    gc->pc += cmdlen;
4893
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5945
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5946
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5947
    }
4894
5948
}
4895
5949
 
4896
5950
#define X_GLrop_ConvolutionParameteri 4105
4897
5951
void
4898
5952
__indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
4899
5953
{
4900
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5954
    __GLXcontext *const gc = __glXGetCurrentContext();
4901
5955
    const GLuint cmdlen = 16;
4902
5956
    emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
4903
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4904
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
4905
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&params), 4);
 
5957
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5958
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
5959
    (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
4906
5960
    gc->pc += cmdlen;
4907
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5961
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5962
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5963
    }
4908
5964
}
4909
5965
 
4910
5966
#define X_GLrop_ConvolutionParameteriv 4106
4911
5967
void
4912
 
__indirect_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params)
 
5968
__indirect_glConvolutionParameteriv(GLenum target, GLenum pname,
 
5969
                                    const GLint * params)
4913
5970
{
4914
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5971
    __GLXcontext *const gc = __glXGetCurrentContext();
4915
5972
    const GLuint compsize = __glConvolutionParameteriv_size(pname);
4916
5973
    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
4917
5974
    emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
4918
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4919
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4);
4920
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4));
 
5975
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5976
    (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
 
5977
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
4921
5978
    gc->pc += cmdlen;
4922
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5979
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5980
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
5981
    }
4923
5982
}
4924
5983
 
4925
5984
#define X_GLrop_CopyConvolutionFilter1D 4107
4926
5985
void
4927
 
__indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
 
5986
__indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat,
 
5987
                                     GLint x, GLint y, GLsizei width)
4928
5988
{
4929
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
5989
    __GLXcontext *const gc = __glXGetCurrentContext();
4930
5990
    const GLuint cmdlen = 24;
4931
5991
    emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
4932
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4933
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
4934
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
4935
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
4936
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
 
5992
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
5993
    (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
 
5994
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
 
5995
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
 
5996
    (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
4937
5997
    gc->pc += cmdlen;
4938
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
5998
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
5999
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6000
    }
4939
6001
}
4940
6002
 
4941
6003
#define X_GLrop_CopyConvolutionFilter2D 4108
4942
6004
void
4943
 
__indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
 
6005
__indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat,
 
6006
                                     GLint x, GLint y, GLsizei width,
 
6007
                                     GLsizei height)
4944
6008
{
4945
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6009
    __GLXcontext *const gc = __glXGetCurrentContext();
4946
6010
    const GLuint cmdlen = 28;
4947
6011
    emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
4948
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
4949
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
4950
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
4951
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
4952
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4);
4953
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&height), 4);
 
6012
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
6013
    (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
 
6014
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
 
6015
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
 
6016
    (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
 
6017
    (void) memcpy((void *) (gc->pc + 24), (void *) (&height), 4);
4954
6018
    gc->pc += cmdlen;
4955
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6019
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6020
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6021
    }
4956
6022
}
4957
6023
 
4958
6024
#define X_GLsop_GetConvolutionFilter 150
4959
6025
void
4960
 
__indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image)
 
6026
__indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type,
 
6027
                                  GLvoid * image)
4961
6028
{
4962
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4963
 
    const __GLXattribute * const state = gc->client_state_private;
4964
 
    Display * const dpy = gc->currentDpy;
 
6029
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6030
    const __GLXattribute *const state = gc->client_state_private;
 
6031
    Display *const dpy = gc->currentDpy;
4965
6032
    const GLuint cmdlen = 16;
4966
6033
    if (__builtin_expect(dpy != NULL, 1)) {
4967
6034
#ifdef USE_XCB
4968
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
6035
        xcb_connection_t *c = XGetXCBConnection(dpy);
4969
6036
        (void) __glXFlushRenderBuffer(gc, gc->pc);
4970
 
        XCBGlxGetConvolutionFilterRep *reply = XCBGlxGetConvolutionFilterReply(c, XCBGlxGetConvolutionFilter(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL);
4971
 
        (void)memcpy(image, XCBGlxGetConvolutionFilterData(reply), XCBGlxGetConvolutionFilterDataLength(reply) * sizeof(GLvoid));
 
6037
        xcb_glx_get_convolution_filter_reply_t *reply =
 
6038
            xcb_glx_get_convolution_filter_reply(c,
 
6039
                                                 xcb_glx_get_convolution_filter
 
6040
                                                 (c, gc->currentContextTag,
 
6041
                                                  target, format, type,
 
6042
                                                  state->storePack.
 
6043
                                                  swapEndian), NULL);
 
6044
        (void) memcpy(image, xcb_glx_get_convolution_filter_data(reply),
 
6045
                      xcb_glx_get_convolution_filter_data_length(reply) *
 
6046
                      sizeof(GLvoid));
4972
6047
        free(reply);
4973
6048
#else
4974
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
4975
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
4976
 
        (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
4977
 
        (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
4978
 
        *(int32_t *)(pc + 12) = 0;
4979
 
        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
4980
 
        __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image, GL_TRUE);
4981
 
        UnlockDisplay(dpy); SyncHandle();
 
6049
        GLubyte const *pc =
 
6050
            __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
 
6051
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6052
        (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
 
6053
        (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
 
6054
        *(int32_t *) (pc + 12) = 0;
 
6055
        *(int8_t *) (pc + 12) = state->storePack.swapEndian;
 
6056
        __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
 
6057
                            GL_TRUE);
 
6058
        UnlockDisplay(dpy);
 
6059
        SyncHandle();
4982
6060
#endif /* USE_XCB */
4983
6061
    }
4984
6062
    return;
4985
6063
}
4986
6064
 
 
6065
#define X_GLvop_GetConvolutionFilterEXT 1
 
6066
void
 
6067
gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
 
6068
                     GLvoid * image)
 
6069
{
 
6070
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6071
 
 
6072
    if (gc->isDirect) {
 
6073
        CALL_GetConvolutionFilter(GET_DISPATCH(),
 
6074
                                  (target, format, type, image));
 
6075
    } else {
 
6076
        __GLXcontext *const gc = __glXGetCurrentContext();
 
6077
        const __GLXattribute *const state = gc->client_state_private;
 
6078
        Display *const dpy = gc->currentDpy;
 
6079
        const GLuint cmdlen = 16;
 
6080
        if (__builtin_expect(dpy != NULL, 1)) {
 
6081
            GLubyte const *pc =
 
6082
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
6083
                                        X_GLvop_GetConvolutionFilterEXT,
 
6084
                                        cmdlen);
 
6085
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6086
            (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
 
6087
            (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
 
6088
            *(int32_t *) (pc + 12) = 0;
 
6089
            *(int8_t *) (pc + 12) = state->storePack.swapEndian;
 
6090
            __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
 
6091
                                GL_TRUE);
 
6092
            UnlockDisplay(dpy);
 
6093
            SyncHandle();
 
6094
        }
 
6095
        return;
 
6096
    }
 
6097
}
 
6098
 
4987
6099
#define X_GLsop_GetConvolutionParameterfv 151
4988
6100
void
4989
 
__indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params)
 
6101
__indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
 
6102
                                       GLfloat * params)
4990
6103
{
4991
 
    __GLXcontext * const gc = __glXGetCurrentContext();
4992
 
    Display * const dpy = gc->currentDpy;
 
6104
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6105
    Display *const dpy = gc->currentDpy;
4993
6106
    const GLuint cmdlen = 8;
4994
6107
    if (__builtin_expect(dpy != NULL, 1)) {
4995
6108
#ifdef USE_XCB
4996
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
6109
        xcb_connection_t *c = XGetXCBConnection(dpy);
4997
6110
        (void) __glXFlushRenderBuffer(gc, gc->pc);
4998
 
        XCBGlxGetConvolutionParameterfvRep *reply = XCBGlxGetConvolutionParameterfvReply(c, XCBGlxGetConvolutionParameterfv(c, gc->currentContextTag, target, pname), NULL);
4999
 
        if (XCBGlxGetConvolutionParameterfvDataLength(reply) == 0)
5000
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
6111
        xcb_glx_get_convolution_parameterfv_reply_t *reply =
 
6112
            xcb_glx_get_convolution_parameterfv_reply(c,
 
6113
                                                      xcb_glx_get_convolution_parameterfv
 
6114
                                                      (c,
 
6115
                                                       gc->currentContextTag,
 
6116
                                                       target, pname), NULL);
 
6117
        if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 0)
 
6118
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5001
6119
        else
5002
 
        (void)memcpy(params, XCBGlxGetConvolutionParameterfvData(reply), XCBGlxGetConvolutionParameterfvDataLength(reply) * sizeof(GLfloat));
 
6120
            (void) memcpy(params,
 
6121
                          xcb_glx_get_convolution_parameterfv_data(reply),
 
6122
                          xcb_glx_get_convolution_parameterfv_data_length
 
6123
                          (reply) * sizeof(GLfloat));
5003
6124
        free(reply);
5004
6125
#else
5005
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv, cmdlen);
5006
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5007
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
6126
        GLubyte const *pc =
 
6127
            __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv,
 
6128
                                    cmdlen);
 
6129
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6130
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5008
6131
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5009
 
        UnlockDisplay(dpy); SyncHandle();
 
6132
        UnlockDisplay(dpy);
 
6133
        SyncHandle();
5010
6134
#endif /* USE_XCB */
5011
6135
    }
5012
6136
    return;
5013
6137
}
5014
6138
 
 
6139
#define X_GLvop_GetConvolutionParameterfvEXT 2
 
6140
void
 
6141
gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
 
6142
{
 
6143
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6144
 
 
6145
    if (gc->isDirect) {
 
6146
        CALL_GetConvolutionParameterfv(GET_DISPATCH(),
 
6147
                                       (target, pname, params));
 
6148
    } else {
 
6149
        __GLXcontext *const gc = __glXGetCurrentContext();
 
6150
        Display *const dpy = gc->currentDpy;
 
6151
        const GLuint cmdlen = 8;
 
6152
        if (__builtin_expect(dpy != NULL, 1)) {
 
6153
            GLubyte const *pc =
 
6154
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
6155
                                        X_GLvop_GetConvolutionParameterfvEXT,
 
6156
                                        cmdlen);
 
6157
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6158
            (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
6159
            (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
6160
            UnlockDisplay(dpy);
 
6161
            SyncHandle();
 
6162
        }
 
6163
        return;
 
6164
    }
 
6165
}
 
6166
 
5015
6167
#define X_GLsop_GetConvolutionParameteriv 152
5016
6168
void
5017
 
__indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params)
 
6169
__indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
 
6170
                                       GLint * params)
5018
6171
{
5019
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5020
 
    Display * const dpy = gc->currentDpy;
 
6172
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6173
    Display *const dpy = gc->currentDpy;
5021
6174
    const GLuint cmdlen = 8;
5022
6175
    if (__builtin_expect(dpy != NULL, 1)) {
5023
6176
#ifdef USE_XCB
5024
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
6177
        xcb_connection_t *c = XGetXCBConnection(dpy);
5025
6178
        (void) __glXFlushRenderBuffer(gc, gc->pc);
5026
 
        XCBGlxGetConvolutionParameterivRep *reply = XCBGlxGetConvolutionParameterivReply(c, XCBGlxGetConvolutionParameteriv(c, gc->currentContextTag, target, pname), NULL);
5027
 
        if (XCBGlxGetConvolutionParameterivDataLength(reply) == 0)
5028
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
6179
        xcb_glx_get_convolution_parameteriv_reply_t *reply =
 
6180
            xcb_glx_get_convolution_parameteriv_reply(c,
 
6181
                                                      xcb_glx_get_convolution_parameteriv
 
6182
                                                      (c,
 
6183
                                                       gc->currentContextTag,
 
6184
                                                       target, pname), NULL);
 
6185
        if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 0)
 
6186
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5029
6187
        else
5030
 
        (void)memcpy(params, XCBGlxGetConvolutionParameterivData(reply), XCBGlxGetConvolutionParameterivDataLength(reply) * sizeof(GLint));
 
6188
            (void) memcpy(params,
 
6189
                          xcb_glx_get_convolution_parameteriv_data(reply),
 
6190
                          xcb_glx_get_convolution_parameteriv_data_length
 
6191
                          (reply) * sizeof(GLint));
5031
6192
        free(reply);
5032
6193
#else
5033
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv, cmdlen);
5034
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5035
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
6194
        GLubyte const *pc =
 
6195
            __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv,
 
6196
                                    cmdlen);
 
6197
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6198
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5036
6199
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5037
 
        UnlockDisplay(dpy); SyncHandle();
 
6200
        UnlockDisplay(dpy);
 
6201
        SyncHandle();
5038
6202
#endif /* USE_XCB */
5039
6203
    }
5040
6204
    return;
5041
6205
}
5042
6206
 
 
6207
#define X_GLvop_GetConvolutionParameterivEXT 3
 
6208
void
 
6209
gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
 
6210
{
 
6211
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6212
 
 
6213
    if (gc->isDirect) {
 
6214
        CALL_GetConvolutionParameteriv(GET_DISPATCH(),
 
6215
                                       (target, pname, params));
 
6216
    } else {
 
6217
        __GLXcontext *const gc = __glXGetCurrentContext();
 
6218
        Display *const dpy = gc->currentDpy;
 
6219
        const GLuint cmdlen = 8;
 
6220
        if (__builtin_expect(dpy != NULL, 1)) {
 
6221
            GLubyte const *pc =
 
6222
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
6223
                                        X_GLvop_GetConvolutionParameterivEXT,
 
6224
                                        cmdlen);
 
6225
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6226
            (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
6227
            (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
6228
            UnlockDisplay(dpy);
 
6229
            SyncHandle();
 
6230
        }
 
6231
        return;
 
6232
    }
 
6233
}
 
6234
 
5043
6235
#define X_GLsop_GetHistogram 154
5044
6236
void
5045
 
__indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
 
6237
__indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
 
6238
                          GLenum type, GLvoid * values)
5046
6239
{
5047
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5048
 
    const __GLXattribute * const state = gc->client_state_private;
5049
 
    Display * const dpy = gc->currentDpy;
 
6240
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6241
    const __GLXattribute *const state = gc->client_state_private;
 
6242
    Display *const dpy = gc->currentDpy;
5050
6243
    const GLuint cmdlen = 16;
5051
6244
    if (__builtin_expect(dpy != NULL, 1)) {
5052
6245
#ifdef USE_XCB
5053
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
6246
        xcb_connection_t *c = XGetXCBConnection(dpy);
5054
6247
        (void) __glXFlushRenderBuffer(gc, gc->pc);
5055
 
        XCBGlxGetHistogramRep *reply = XCBGlxGetHistogramReply(c, XCBGlxGetHistogram(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
5056
 
        (void)memcpy(values, XCBGlxGetHistogramData(reply), XCBGlxGetHistogramDataLength(reply) * sizeof(GLvoid));
 
6248
        xcb_glx_get_histogram_reply_t *reply =
 
6249
            xcb_glx_get_histogram_reply(c,
 
6250
                                        xcb_glx_get_histogram(c,
 
6251
                                                              gc->
 
6252
                                                              currentContextTag,
 
6253
                                                              target, reset,
 
6254
                                                              format, type,
 
6255
                                                              state->
 
6256
                                                              storePack.
 
6257
                                                              swapEndian),
 
6258
                                        NULL);
 
6259
        (void) memcpy(values, xcb_glx_get_histogram_data(reply),
 
6260
                      xcb_glx_get_histogram_data_length(reply) *
 
6261
                      sizeof(GLvoid));
5057
6262
        free(reply);
5058
6263
#else
5059
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
5060
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5061
 
        (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
5062
 
        (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
5063
 
        *(int32_t *)(pc + 12) = 0;
5064
 
        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
5065
 
        * (int8_t *)(pc + 13) = reset;
5066
 
        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values, GL_TRUE);
5067
 
        UnlockDisplay(dpy); SyncHandle();
 
6264
        GLubyte const *pc =
 
6265
            __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
 
6266
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6267
        (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
 
6268
        (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
 
6269
        *(int32_t *) (pc + 12) = 0;
 
6270
        *(int8_t *) (pc + 12) = state->storePack.swapEndian;
 
6271
        *(int8_t *) (pc + 13) = reset;
 
6272
        __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
 
6273
                            GL_TRUE);
 
6274
        UnlockDisplay(dpy);
 
6275
        SyncHandle();
5068
6276
#endif /* USE_XCB */
5069
6277
    }
5070
6278
    return;
5071
6279
}
5072
6280
 
 
6281
#define X_GLvop_GetHistogramEXT 5
 
6282
void
 
6283
gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
 
6284
                     GLenum type, GLvoid * values)
 
6285
{
 
6286
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6287
 
 
6288
    if (gc->isDirect) {
 
6289
        CALL_GetHistogram(GET_DISPATCH(),
 
6290
                          (target, reset, format, type, values));
 
6291
    } else {
 
6292
        __GLXcontext *const gc = __glXGetCurrentContext();
 
6293
        const __GLXattribute *const state = gc->client_state_private;
 
6294
        Display *const dpy = gc->currentDpy;
 
6295
        const GLuint cmdlen = 16;
 
6296
        if (__builtin_expect(dpy != NULL, 1)) {
 
6297
            GLubyte const *pc =
 
6298
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
6299
                                        X_GLvop_GetHistogramEXT, cmdlen);
 
6300
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6301
            (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
 
6302
            (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
 
6303
            *(int32_t *) (pc + 12) = 0;
 
6304
            *(int8_t *) (pc + 12) = state->storePack.swapEndian;
 
6305
            *(int8_t *) (pc + 13) = reset;
 
6306
            __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
 
6307
                                GL_TRUE);
 
6308
            UnlockDisplay(dpy);
 
6309
            SyncHandle();
 
6310
        }
 
6311
        return;
 
6312
    }
 
6313
}
 
6314
 
5073
6315
#define X_GLsop_GetHistogramParameterfv 155
5074
6316
void
5075
 
__indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params)
 
6317
__indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
 
6318
                                     GLfloat * params)
5076
6319
{
5077
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5078
 
    Display * const dpy = gc->currentDpy;
 
6320
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6321
    Display *const dpy = gc->currentDpy;
5079
6322
    const GLuint cmdlen = 8;
5080
6323
    if (__builtin_expect(dpy != NULL, 1)) {
5081
6324
#ifdef USE_XCB
5082
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
6325
        xcb_connection_t *c = XGetXCBConnection(dpy);
5083
6326
        (void) __glXFlushRenderBuffer(gc, gc->pc);
5084
 
        XCBGlxGetHistogramParameterfvRep *reply = XCBGlxGetHistogramParameterfvReply(c, XCBGlxGetHistogramParameterfv(c, gc->currentContextTag, target, pname), NULL);
5085
 
        if (XCBGlxGetHistogramParameterfvDataLength(reply) == 0)
5086
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
6327
        xcb_glx_get_histogram_parameterfv_reply_t *reply =
 
6328
            xcb_glx_get_histogram_parameterfv_reply(c,
 
6329
                                                    xcb_glx_get_histogram_parameterfv
 
6330
                                                    (c, gc->currentContextTag,
 
6331
                                                     target, pname), NULL);
 
6332
        if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 0)
 
6333
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5087
6334
        else
5088
 
        (void)memcpy(params, XCBGlxGetHistogramParameterfvData(reply), XCBGlxGetHistogramParameterfvDataLength(reply) * sizeof(GLfloat));
 
6335
            (void) memcpy(params,
 
6336
                          xcb_glx_get_histogram_parameterfv_data(reply),
 
6337
                          xcb_glx_get_histogram_parameterfv_data_length(reply)
 
6338
                          * sizeof(GLfloat));
5089
6339
        free(reply);
5090
6340
#else
5091
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv, cmdlen);
5092
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5093
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
6341
        GLubyte const *pc =
 
6342
            __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv,
 
6343
                                    cmdlen);
 
6344
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6345
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5094
6346
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5095
 
        UnlockDisplay(dpy); SyncHandle();
 
6347
        UnlockDisplay(dpy);
 
6348
        SyncHandle();
5096
6349
#endif /* USE_XCB */
5097
6350
    }
5098
6351
    return;
5099
6352
}
5100
6353
 
 
6354
#define X_GLvop_GetHistogramParameterfvEXT 6
 
6355
void
 
6356
gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
 
6357
{
 
6358
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6359
 
 
6360
    if (gc->isDirect) {
 
6361
        CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params));
 
6362
    } else {
 
6363
        __GLXcontext *const gc = __glXGetCurrentContext();
 
6364
        Display *const dpy = gc->currentDpy;
 
6365
        const GLuint cmdlen = 8;
 
6366
        if (__builtin_expect(dpy != NULL, 1)) {
 
6367
            GLubyte const *pc =
 
6368
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
6369
                                        X_GLvop_GetHistogramParameterfvEXT,
 
6370
                                        cmdlen);
 
6371
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6372
            (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
6373
            (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
6374
            UnlockDisplay(dpy);
 
6375
            SyncHandle();
 
6376
        }
 
6377
        return;
 
6378
    }
 
6379
}
 
6380
 
5101
6381
#define X_GLsop_GetHistogramParameteriv 156
5102
6382
void
5103
 
__indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params)
 
6383
__indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
 
6384
                                     GLint * params)
5104
6385
{
5105
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5106
 
    Display * const dpy = gc->currentDpy;
 
6386
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6387
    Display *const dpy = gc->currentDpy;
5107
6388
    const GLuint cmdlen = 8;
5108
6389
    if (__builtin_expect(dpy != NULL, 1)) {
5109
6390
#ifdef USE_XCB
5110
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
6391
        xcb_connection_t *c = XGetXCBConnection(dpy);
5111
6392
        (void) __glXFlushRenderBuffer(gc, gc->pc);
5112
 
        XCBGlxGetHistogramParameterivRep *reply = XCBGlxGetHistogramParameterivReply(c, XCBGlxGetHistogramParameteriv(c, gc->currentContextTag, target, pname), NULL);
5113
 
        if (XCBGlxGetHistogramParameterivDataLength(reply) == 0)
5114
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
6393
        xcb_glx_get_histogram_parameteriv_reply_t *reply =
 
6394
            xcb_glx_get_histogram_parameteriv_reply(c,
 
6395
                                                    xcb_glx_get_histogram_parameteriv
 
6396
                                                    (c, gc->currentContextTag,
 
6397
                                                     target, pname), NULL);
 
6398
        if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 0)
 
6399
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5115
6400
        else
5116
 
        (void)memcpy(params, XCBGlxGetHistogramParameterivData(reply), XCBGlxGetHistogramParameterivDataLength(reply) * sizeof(GLint));
 
6401
            (void) memcpy(params,
 
6402
                          xcb_glx_get_histogram_parameteriv_data(reply),
 
6403
                          xcb_glx_get_histogram_parameteriv_data_length(reply)
 
6404
                          * sizeof(GLint));
5117
6405
        free(reply);
5118
6406
#else
5119
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv, cmdlen);
5120
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5121
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
6407
        GLubyte const *pc =
 
6408
            __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv,
 
6409
                                    cmdlen);
 
6410
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6411
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5122
6412
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5123
 
        UnlockDisplay(dpy); SyncHandle();
 
6413
        UnlockDisplay(dpy);
 
6414
        SyncHandle();
5124
6415
#endif /* USE_XCB */
5125
6416
    }
5126
6417
    return;
5127
6418
}
5128
6419
 
 
6420
#define X_GLvop_GetHistogramParameterivEXT 7
 
6421
void
 
6422
gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
 
6423
{
 
6424
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6425
 
 
6426
    if (gc->isDirect) {
 
6427
        CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params));
 
6428
    } else {
 
6429
        __GLXcontext *const gc = __glXGetCurrentContext();
 
6430
        Display *const dpy = gc->currentDpy;
 
6431
        const GLuint cmdlen = 8;
 
6432
        if (__builtin_expect(dpy != NULL, 1)) {
 
6433
            GLubyte const *pc =
 
6434
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
6435
                                        X_GLvop_GetHistogramParameterivEXT,
 
6436
                                        cmdlen);
 
6437
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6438
            (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
6439
            (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
6440
            UnlockDisplay(dpy);
 
6441
            SyncHandle();
 
6442
        }
 
6443
        return;
 
6444
    }
 
6445
}
 
6446
 
5129
6447
#define X_GLsop_GetMinmax 157
5130
6448
void
5131
 
__indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
 
6449
__indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
 
6450
                       GLenum type, GLvoid * values)
5132
6451
{
5133
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5134
 
    const __GLXattribute * const state = gc->client_state_private;
5135
 
    Display * const dpy = gc->currentDpy;
 
6452
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6453
    const __GLXattribute *const state = gc->client_state_private;
 
6454
    Display *const dpy = gc->currentDpy;
5136
6455
    const GLuint cmdlen = 16;
5137
6456
    if (__builtin_expect(dpy != NULL, 1)) {
5138
6457
#ifdef USE_XCB
5139
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
6458
        xcb_connection_t *c = XGetXCBConnection(dpy);
5140
6459
        (void) __glXFlushRenderBuffer(gc, gc->pc);
5141
 
        XCBGlxGetMinmaxRep *reply = XCBGlxGetMinmaxReply(c, XCBGlxGetMinmax(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL);
5142
 
        (void)memcpy(values, XCBGlxGetMinmaxData(reply), XCBGlxGetMinmaxDataLength(reply) * sizeof(GLvoid));
 
6460
        xcb_glx_get_minmax_reply_t *reply =
 
6461
            xcb_glx_get_minmax_reply(c,
 
6462
                                     xcb_glx_get_minmax(c,
 
6463
                                                        gc->currentContextTag,
 
6464
                                                        target, reset, format,
 
6465
                                                        type,
 
6466
                                                        state->storePack.
 
6467
                                                        swapEndian), NULL);
 
6468
        (void) memcpy(values, xcb_glx_get_minmax_data(reply),
 
6469
                      xcb_glx_get_minmax_data_length(reply) * sizeof(GLvoid));
5143
6470
        free(reply);
5144
6471
#else
5145
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
5146
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5147
 
        (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
5148
 
        (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
5149
 
        *(int32_t *)(pc + 12) = 0;
5150
 
        * (int8_t *)(pc + 12) = state->storePack.swapEndian;
5151
 
        * (int8_t *)(pc + 13) = reset;
5152
 
        __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values, GL_FALSE);
5153
 
        UnlockDisplay(dpy); SyncHandle();
 
6472
        GLubyte const *pc =
 
6473
            __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
 
6474
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6475
        (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
 
6476
        (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
 
6477
        *(int32_t *) (pc + 12) = 0;
 
6478
        *(int8_t *) (pc + 12) = state->storePack.swapEndian;
 
6479
        *(int8_t *) (pc + 13) = reset;
 
6480
        __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
 
6481
                            GL_FALSE);
 
6482
        UnlockDisplay(dpy);
 
6483
        SyncHandle();
5154
6484
#endif /* USE_XCB */
5155
6485
    }
5156
6486
    return;
5157
6487
}
5158
6488
 
 
6489
#define X_GLvop_GetMinmaxEXT 8
 
6490
void
 
6491
gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
 
6492
                     GLenum type, GLvoid * values)
 
6493
{
 
6494
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6495
 
 
6496
    if (gc->isDirect) {
 
6497
        CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values));
 
6498
    } else {
 
6499
        __GLXcontext *const gc = __glXGetCurrentContext();
 
6500
        const __GLXattribute *const state = gc->client_state_private;
 
6501
        Display *const dpy = gc->currentDpy;
 
6502
        const GLuint cmdlen = 16;
 
6503
        if (__builtin_expect(dpy != NULL, 1)) {
 
6504
            GLubyte const *pc =
 
6505
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
6506
                                        X_GLvop_GetMinmaxEXT, cmdlen);
 
6507
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6508
            (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
 
6509
            (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
 
6510
            *(int32_t *) (pc + 12) = 0;
 
6511
            *(int8_t *) (pc + 12) = state->storePack.swapEndian;
 
6512
            *(int8_t *) (pc + 13) = reset;
 
6513
            __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
 
6514
                                GL_FALSE);
 
6515
            UnlockDisplay(dpy);
 
6516
            SyncHandle();
 
6517
        }
 
6518
        return;
 
6519
    }
 
6520
}
 
6521
 
5159
6522
#define X_GLsop_GetMinmaxParameterfv 158
5160
6523
void
5161
 
__indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params)
 
6524
__indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
 
6525
                                  GLfloat * params)
5162
6526
{
5163
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5164
 
    Display * const dpy = gc->currentDpy;
 
6527
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6528
    Display *const dpy = gc->currentDpy;
5165
6529
    const GLuint cmdlen = 8;
5166
6530
    if (__builtin_expect(dpy != NULL, 1)) {
5167
6531
#ifdef USE_XCB
5168
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
6532
        xcb_connection_t *c = XGetXCBConnection(dpy);
5169
6533
        (void) __glXFlushRenderBuffer(gc, gc->pc);
5170
 
        XCBGlxGetMinmaxParameterfvRep *reply = XCBGlxGetMinmaxParameterfvReply(c, XCBGlxGetMinmaxParameterfv(c, gc->currentContextTag, target, pname), NULL);
5171
 
        if (XCBGlxGetMinmaxParameterfvDataLength(reply) == 0)
5172
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
6534
        xcb_glx_get_minmax_parameterfv_reply_t *reply =
 
6535
            xcb_glx_get_minmax_parameterfv_reply(c,
 
6536
                                                 xcb_glx_get_minmax_parameterfv
 
6537
                                                 (c, gc->currentContextTag,
 
6538
                                                  target, pname), NULL);
 
6539
        if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 0)
 
6540
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5173
6541
        else
5174
 
        (void)memcpy(params, XCBGlxGetMinmaxParameterfvData(reply), XCBGlxGetMinmaxParameterfvDataLength(reply) * sizeof(GLfloat));
 
6542
            (void) memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply),
 
6543
                          xcb_glx_get_minmax_parameterfv_data_length(reply) *
 
6544
                          sizeof(GLfloat));
5175
6545
        free(reply);
5176
6546
#else
5177
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
5178
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5179
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
6547
        GLubyte const *pc =
 
6548
            __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
 
6549
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6550
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5180
6551
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5181
 
        UnlockDisplay(dpy); SyncHandle();
 
6552
        UnlockDisplay(dpy);
 
6553
        SyncHandle();
5182
6554
#endif /* USE_XCB */
5183
6555
    }
5184
6556
    return;
5185
6557
}
5186
6558
 
 
6559
#define X_GLvop_GetMinmaxParameterfvEXT 9
 
6560
void
 
6561
gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
 
6562
{
 
6563
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6564
 
 
6565
    if (gc->isDirect) {
 
6566
        CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params));
 
6567
    } else {
 
6568
        __GLXcontext *const gc = __glXGetCurrentContext();
 
6569
        Display *const dpy = gc->currentDpy;
 
6570
        const GLuint cmdlen = 8;
 
6571
        if (__builtin_expect(dpy != NULL, 1)) {
 
6572
            GLubyte const *pc =
 
6573
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
6574
                                        X_GLvop_GetMinmaxParameterfvEXT,
 
6575
                                        cmdlen);
 
6576
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6577
            (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
6578
            (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
6579
            UnlockDisplay(dpy);
 
6580
            SyncHandle();
 
6581
        }
 
6582
        return;
 
6583
    }
 
6584
}
 
6585
 
5187
6586
#define X_GLsop_GetMinmaxParameteriv 159
5188
6587
void
5189
6588
__indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
5190
6589
{
5191
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5192
 
    Display * const dpy = gc->currentDpy;
 
6590
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6591
    Display *const dpy = gc->currentDpy;
5193
6592
    const GLuint cmdlen = 8;
5194
6593
    if (__builtin_expect(dpy != NULL, 1)) {
5195
6594
#ifdef USE_XCB
5196
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
 
6595
        xcb_connection_t *c = XGetXCBConnection(dpy);
5197
6596
        (void) __glXFlushRenderBuffer(gc, gc->pc);
5198
 
        XCBGlxGetMinmaxParameterivRep *reply = XCBGlxGetMinmaxParameterivReply(c, XCBGlxGetMinmaxParameteriv(c, gc->currentContextTag, target, pname), NULL);
5199
 
        if (XCBGlxGetMinmaxParameterivDataLength(reply) == 0)
5200
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
 
6597
        xcb_glx_get_minmax_parameteriv_reply_t *reply =
 
6598
            xcb_glx_get_minmax_parameteriv_reply(c,
 
6599
                                                 xcb_glx_get_minmax_parameteriv
 
6600
                                                 (c, gc->currentContextTag,
 
6601
                                                  target, pname), NULL);
 
6602
        if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 0)
 
6603
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5201
6604
        else
5202
 
        (void)memcpy(params, XCBGlxGetMinmaxParameterivData(reply), XCBGlxGetMinmaxParameterivDataLength(reply) * sizeof(GLint));
 
6605
            (void) memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply),
 
6606
                          xcb_glx_get_minmax_parameteriv_data_length(reply) *
 
6607
                          sizeof(GLint));
5203
6608
        free(reply);
5204
6609
#else
5205
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
5206
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5207
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
6610
        GLubyte const *pc =
 
6611
            __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
 
6612
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6613
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5208
6614
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5209
 
        UnlockDisplay(dpy); SyncHandle();
 
6615
        UnlockDisplay(dpy);
 
6616
        SyncHandle();
5210
6617
#endif /* USE_XCB */
5211
6618
    }
5212
6619
    return;
5213
6620
}
5214
6621
 
 
6622
#define X_GLvop_GetMinmaxParameterivEXT 10
 
6623
void
 
6624
gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
 
6625
{
 
6626
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6627
 
 
6628
    if (gc->isDirect) {
 
6629
        CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params));
 
6630
    } else {
 
6631
        __GLXcontext *const gc = __glXGetCurrentContext();
 
6632
        Display *const dpy = gc->currentDpy;
 
6633
        const GLuint cmdlen = 8;
 
6634
        if (__builtin_expect(dpy != NULL, 1)) {
 
6635
            GLubyte const *pc =
 
6636
                __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
6637
                                        X_GLvop_GetMinmaxParameterivEXT,
 
6638
                                        cmdlen);
 
6639
            (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
6640
            (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
6641
            (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
6642
            UnlockDisplay(dpy);
 
6643
            SyncHandle();
 
6644
        }
 
6645
        return;
 
6646
    }
 
6647
}
 
6648
 
5215
6649
#define X_GLrop_Histogram 4110
5216
6650
void
5217
 
__indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
 
6651
__indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
 
6652
                       GLboolean sink)
5218
6653
{
5219
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6654
    __GLXcontext *const gc = __glXGetCurrentContext();
5220
6655
    const GLuint cmdlen = 20;
5221
6656
    emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
5222
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5223
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&width), 4);
5224
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4);
5225
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&sink), 1);
 
6657
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
6658
    (void) memcpy((void *) (gc->pc + 8), (void *) (&width), 4);
 
6659
    (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
 
6660
    (void) memcpy((void *) (gc->pc + 16), (void *) (&sink), 1);
5226
6661
    gc->pc += cmdlen;
5227
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6662
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6663
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6664
    }
5228
6665
}
5229
6666
 
5230
6667
#define X_GLrop_Minmax 4111
5231
6668
void
5232
6669
__indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
5233
6670
{
5234
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6671
    __GLXcontext *const gc = __glXGetCurrentContext();
5235
6672
    const GLuint cmdlen = 16;
5236
6673
    emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
5237
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5238
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
5239
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&sink), 1);
 
6674
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
6675
    (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
 
6676
    (void) memcpy((void *) (gc->pc + 12), (void *) (&sink), 1);
5240
6677
    gc->pc += cmdlen;
5241
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6678
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6679
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6680
    }
5242
6681
}
5243
6682
 
5244
6683
#define X_GLrop_ResetHistogram 4112
5245
6684
void
5246
6685
__indirect_glResetHistogram(GLenum target)
5247
6686
{
5248
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6687
    __GLXcontext *const gc = __glXGetCurrentContext();
5249
6688
    const GLuint cmdlen = 8;
5250
6689
    emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
5251
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
 
6690
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5252
6691
    gc->pc += cmdlen;
5253
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6692
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6693
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6694
    }
5254
6695
}
5255
6696
 
5256
6697
#define X_GLrop_ResetMinmax 4113
5257
6698
void
5258
6699
__indirect_glResetMinmax(GLenum target)
5259
6700
{
5260
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6701
    __GLXcontext *const gc = __glXGetCurrentContext();
5261
6702
    const GLuint cmdlen = 8;
5262
6703
    emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
5263
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
 
6704
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5264
6705
    gc->pc += cmdlen;
5265
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6706
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6707
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6708
    }
5266
6709
}
5267
6710
 
5268
6711
static void
5269
 
__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 )
 
6712
__glx_TexImage_3D4D(unsigned opcode, unsigned dim, GLenum target, GLint level,
 
6713
                    GLint internalformat, GLsizei width, GLsizei height,
 
6714
                    GLsizei depth, GLsizei extent, GLint border,
 
6715
                    GLenum format, GLenum type, const GLvoid * pixels)
5270
6716
{
5271
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5272
 
    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
 
6717
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6718
    const GLuint compsize =
 
6719
        (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
 
6720
                                         target) : 0;
5273
6721
    const GLuint cmdlen = 84 + __GLX_PAD(compsize);
5274
6722
    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5275
6723
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
5276
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
6724
            if ((gc->pc + cmdlen) > gc->bufEnd) {
5277
6725
                (void) __glXFlushRenderBuffer(gc, gc->pc);
5278
6726
            }
5279
6727
            emit_header(gc->pc, opcode, cmdlen);
5280
 
            (void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4);
5281
 
            (void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4);
5282
 
            (void) memcpy((void *)(gc->pc + 48), (void *)(&internalformat), 4);
5283
 
            (void) memcpy((void *)(gc->pc + 52), (void *)(&width), 4);
5284
 
            (void) memcpy((void *)(gc->pc + 56), (void *)(&height), 4);
5285
 
            (void) memcpy((void *)(gc->pc + 60), (void *)(&depth), 4);
5286
 
            (void) memcpy((void *)(gc->pc + 64), (void *)(&extent), 4);
5287
 
            (void) memcpy((void *)(gc->pc + 68), (void *)(&border), 4);
5288
 
            (void) memcpy((void *)(gc->pc + 72), (void *)(&format), 4);
5289
 
            (void) memcpy((void *)(gc->pc + 76), (void *)(&type), 4);
5290
 
            (void) memcpy((void *)(gc->pc + 80), (void *)((pixels == NULL) ? one : zero), 4);
 
6728
            (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
 
6729
            (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
 
6730
            (void) memcpy((void *) (gc->pc + 48), (void *) (&internalformat),
 
6731
                          4);
 
6732
            (void) memcpy((void *) (gc->pc + 52), (void *) (&width), 4);
 
6733
            (void) memcpy((void *) (gc->pc + 56), (void *) (&height), 4);
 
6734
            (void) memcpy((void *) (gc->pc + 60), (void *) (&depth), 4);
 
6735
            (void) memcpy((void *) (gc->pc + 64), (void *) (&extent), 4);
 
6736
            (void) memcpy((void *) (gc->pc + 68), (void *) (&border), 4);
 
6737
            (void) memcpy((void *) (gc->pc + 72), (void *) (&format), 4);
 
6738
            (void) memcpy((void *) (gc->pc + 76), (void *) (&type), 4);
 
6739
            (void) memcpy((void *) (gc->pc + 80),
 
6740
                          (void *) ((pixels == NULL) ? one : zero), 4);
5291
6741
            if (compsize > 0) {
5292
 
                (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 84, gc->pc + 4);
5293
 
            }
5294
 
            else {
5295
 
                (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size );
 
6742
                (*gc->fillImage) (gc, dim, width, height, depth, format, type,
 
6743
                                  pixels, gc->pc + 84, gc->pc + 4);
 
6744
            } else {
 
6745
                (void) memcpy(gc->pc + 4, default_pixel_store_4D,
 
6746
                              default_pixel_store_4D_size);
5296
6747
            }
5297
6748
            gc->pc += cmdlen;
5298
 
            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5299
 
        }
5300
 
        else {
 
6749
            if (gc->pc > gc->limit) {
 
6750
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6751
            }
 
6752
        } else {
5301
6753
            const GLint op = opcode;
5302
6754
            const GLuint cmdlenLarge = cmdlen + 4;
5303
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
5304
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
5305
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
5306
 
            (void) memcpy((void *)(pc + 44), (void *)(&target), 4);
5307
 
            (void) memcpy((void *)(pc + 48), (void *)(&level), 4);
5308
 
            (void) memcpy((void *)(pc + 52), (void *)(&internalformat), 4);
5309
 
            (void) memcpy((void *)(pc + 56), (void *)(&width), 4);
5310
 
            (void) memcpy((void *)(pc + 60), (void *)(&height), 4);
5311
 
            (void) memcpy((void *)(pc + 64), (void *)(&depth), 4);
5312
 
            (void) memcpy((void *)(pc + 68), (void *)(&extent), 4);
5313
 
            (void) memcpy((void *)(pc + 72), (void *)(&border), 4);
5314
 
            (void) memcpy((void *)(pc + 76), (void *)(&format), 4);
5315
 
            (void) memcpy((void *)(pc + 80), (void *)(&type), 4);
5316
 
            (void) memcpy((void *)(pc + 84), zero, 4);
5317
 
            __glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 88, pc + 8);
 
6755
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
6756
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
6757
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
6758
            (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
 
6759
            (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
 
6760
            (void) memcpy((void *) (pc + 52), (void *) (&internalformat), 4);
 
6761
            (void) memcpy((void *) (pc + 56), (void *) (&width), 4);
 
6762
            (void) memcpy((void *) (pc + 60), (void *) (&height), 4);
 
6763
            (void) memcpy((void *) (pc + 64), (void *) (&depth), 4);
 
6764
            (void) memcpy((void *) (pc + 68), (void *) (&extent), 4);
 
6765
            (void) memcpy((void *) (pc + 72), (void *) (&border), 4);
 
6766
            (void) memcpy((void *) (pc + 76), (void *) (&format), 4);
 
6767
            (void) memcpy((void *) (pc + 80), (void *) (&type), 4);
 
6768
            (void) memcpy((void *) (pc + 84), zero, 4);
 
6769
            __glXSendLargeImage(gc, compsize, dim, width, height, depth,
 
6770
                                format, type, pixels, pc + 88, pc + 8);
5318
6771
        }
5319
6772
    }
5320
6773
}
5321
6774
 
5322
6775
#define X_GLrop_TexImage3D 4114
5323
6776
void
5324
 
__indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
 
6777
__indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat,
 
6778
                        GLsizei width, GLsizei height, GLsizei depth,
 
6779
                        GLint border, GLenum format, GLenum type,
 
6780
                        const GLvoid * pixels)
5325
6781
{
5326
 
    __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat, width, height, depth, 1, border, format, type, pixels );
 
6782
    __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat,
 
6783
                        width, height, depth, 1, border, format, type,
 
6784
                        pixels);
5327
6785
}
5328
6786
 
5329
6787
static void
5330
 
__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 )
 
6788
__glx_TexSubImage_3D4D(unsigned opcode, unsigned dim, GLenum target,
 
6789
                       GLint level, GLint xoffset, GLint yoffset,
 
6790
                       GLint zoffset, GLint woffset, GLsizei width,
 
6791
                       GLsizei height, GLsizei depth, GLsizei extent,
 
6792
                       GLenum format, GLenum type, const GLvoid * pixels)
5331
6793
{
5332
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5333
 
    const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
 
6794
    __GLXcontext *const gc = __glXGetCurrentContext();
 
6795
    const GLuint compsize =
 
6796
        (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
 
6797
                                         target) : 0;
5334
6798
    const GLuint cmdlen = 92 + __GLX_PAD(compsize);
5335
6799
    if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5336
6800
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
5337
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
6801
            if ((gc->pc + cmdlen) > gc->bufEnd) {
5338
6802
                (void) __glXFlushRenderBuffer(gc, gc->pc);
5339
6803
            }
5340
6804
            emit_header(gc->pc, opcode, cmdlen);
5341
 
            (void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4);
5342
 
            (void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4);
5343
 
            (void) memcpy((void *)(gc->pc + 48), (void *)(&xoffset), 4);
5344
 
            (void) memcpy((void *)(gc->pc + 52), (void *)(&yoffset), 4);
5345
 
            (void) memcpy((void *)(gc->pc + 56), (void *)(&zoffset), 4);
5346
 
            (void) memcpy((void *)(gc->pc + 60), (void *)(&woffset), 4);
5347
 
            (void) memcpy((void *)(gc->pc + 64), (void *)(&width), 4);
5348
 
            (void) memcpy((void *)(gc->pc + 68), (void *)(&height), 4);
5349
 
            (void) memcpy((void *)(gc->pc + 72), (void *)(&depth), 4);
5350
 
            (void) memcpy((void *)(gc->pc + 76), (void *)(&extent), 4);
5351
 
            (void) memcpy((void *)(gc->pc + 80), (void *)(&format), 4);
5352
 
            (void) memcpy((void *)(gc->pc + 84), (void *)(&type), 4);
5353
 
            (void) memcpy((void *)(gc->pc + 88), (void *)((pixels == NULL) ? one : zero), 4);
 
6805
            (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
 
6806
            (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
 
6807
            (void) memcpy((void *) (gc->pc + 48), (void *) (&xoffset), 4);
 
6808
            (void) memcpy((void *) (gc->pc + 52), (void *) (&yoffset), 4);
 
6809
            (void) memcpy((void *) (gc->pc + 56), (void *) (&zoffset), 4);
 
6810
            (void) memcpy((void *) (gc->pc + 60), (void *) (&woffset), 4);
 
6811
            (void) memcpy((void *) (gc->pc + 64), (void *) (&width), 4);
 
6812
            (void) memcpy((void *) (gc->pc + 68), (void *) (&height), 4);
 
6813
            (void) memcpy((void *) (gc->pc + 72), (void *) (&depth), 4);
 
6814
            (void) memcpy((void *) (gc->pc + 76), (void *) (&extent), 4);
 
6815
            (void) memcpy((void *) (gc->pc + 80), (void *) (&format), 4);
 
6816
            (void) memcpy((void *) (gc->pc + 84), (void *) (&type), 4);
 
6817
            (void) memcpy((void *) (gc->pc + 88),
 
6818
                          (void *) ((pixels == NULL) ? one : zero), 4);
5354
6819
            if (compsize > 0) {
5355
 
                (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 92, gc->pc + 4);
5356
 
            }
5357
 
            else {
5358
 
                (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size );
 
6820
                (*gc->fillImage) (gc, dim, width, height, depth, format, type,
 
6821
                                  pixels, gc->pc + 92, gc->pc + 4);
 
6822
            } else {
 
6823
                (void) memcpy(gc->pc + 4, default_pixel_store_4D,
 
6824
                              default_pixel_store_4D_size);
5359
6825
            }
5360
6826
            gc->pc += cmdlen;
5361
 
            if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5362
 
        }
5363
 
        else {
 
6827
            if (gc->pc > gc->limit) {
 
6828
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6829
            }
 
6830
        } else {
5364
6831
            const GLint op = opcode;
5365
6832
            const GLuint cmdlenLarge = cmdlen + 4;
5366
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
5367
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
5368
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
5369
 
            (void) memcpy((void *)(pc + 44), (void *)(&target), 4);
5370
 
            (void) memcpy((void *)(pc + 48), (void *)(&level), 4);
5371
 
            (void) memcpy((void *)(pc + 52), (void *)(&xoffset), 4);
5372
 
            (void) memcpy((void *)(pc + 56), (void *)(&yoffset), 4);
5373
 
            (void) memcpy((void *)(pc + 60), (void *)(&zoffset), 4);
5374
 
            (void) memcpy((void *)(pc + 64), (void *)(&woffset), 4);
5375
 
            (void) memcpy((void *)(pc + 68), (void *)(&width), 4);
5376
 
            (void) memcpy((void *)(pc + 72), (void *)(&height), 4);
5377
 
            (void) memcpy((void *)(pc + 76), (void *)(&depth), 4);
5378
 
            (void) memcpy((void *)(pc + 80), (void *)(&extent), 4);
5379
 
            (void) memcpy((void *)(pc + 84), (void *)(&format), 4);
5380
 
            (void) memcpy((void *)(pc + 88), (void *)(&type), 4);
5381
 
            (void) memcpy((void *)(pc + 92), zero, 4);
5382
 
            __glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 96, pc + 8);
 
6833
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
6834
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
6835
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
6836
            (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
 
6837
            (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
 
6838
            (void) memcpy((void *) (pc + 52), (void *) (&xoffset), 4);
 
6839
            (void) memcpy((void *) (pc + 56), (void *) (&yoffset), 4);
 
6840
            (void) memcpy((void *) (pc + 60), (void *) (&zoffset), 4);
 
6841
            (void) memcpy((void *) (pc + 64), (void *) (&woffset), 4);
 
6842
            (void) memcpy((void *) (pc + 68), (void *) (&width), 4);
 
6843
            (void) memcpy((void *) (pc + 72), (void *) (&height), 4);
 
6844
            (void) memcpy((void *) (pc + 76), (void *) (&depth), 4);
 
6845
            (void) memcpy((void *) (pc + 80), (void *) (&extent), 4);
 
6846
            (void) memcpy((void *) (pc + 84), (void *) (&format), 4);
 
6847
            (void) memcpy((void *) (pc + 88), (void *) (&type), 4);
 
6848
            (void) memcpy((void *) (pc + 92), zero, 4);
 
6849
            __glXSendLargeImage(gc, compsize, dim, width, height, depth,
 
6850
                                format, type, pixels, pc + 96, pc + 8);
5383
6851
        }
5384
6852
    }
5385
6853
}
5386
6854
 
5387
6855
#define X_GLrop_TexSubImage3D 4115
5388
6856
void
5389
 
__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)
 
6857
__indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset,
 
6858
                           GLint yoffset, GLint zoffset, GLsizei width,
 
6859
                           GLsizei height, GLsizei depth, GLenum format,
 
6860
                           GLenum type, const GLvoid * pixels)
5390
6861
{
5391
 
    __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset, yoffset, zoffset, 1, width, height, depth, 1, format, type, pixels );
 
6862
    __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset,
 
6863
                           yoffset, zoffset, 1, width, height, depth, 1,
 
6864
                           format, type, pixels);
5392
6865
}
5393
6866
 
5394
6867
#define X_GLrop_CopyTexSubImage3D 4123
5395
6868
void
5396
 
__indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 
6869
__indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
 
6870
                               GLint yoffset, GLint zoffset, GLint x, GLint y,
 
6871
                               GLsizei width, GLsizei height)
5397
6872
{
5398
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6873
    __GLXcontext *const gc = __glXGetCurrentContext();
5399
6874
    const GLuint cmdlen = 40;
5400
6875
    emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
5401
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5402
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4);
5403
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4);
5404
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4);
5405
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&zoffset), 4);
5406
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&x), 4);
5407
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&y), 4);
5408
 
    (void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4);
5409
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4);
 
6876
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
6877
    (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
 
6878
    (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
 
6879
    (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
 
6880
    (void) memcpy((void *) (gc->pc + 20), (void *) (&zoffset), 4);
 
6881
    (void) memcpy((void *) (gc->pc + 24), (void *) (&x), 4);
 
6882
    (void) memcpy((void *) (gc->pc + 28), (void *) (&y), 4);
 
6883
    (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
 
6884
    (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
5410
6885
    gc->pc += cmdlen;
5411
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6886
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6887
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6888
    }
5412
6889
}
5413
6890
 
5414
6891
#define X_GLrop_ActiveTextureARB 197
5415
6892
void
5416
6893
__indirect_glActiveTextureARB(GLenum texture)
5417
6894
{
5418
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6895
    __GLXcontext *const gc = __glXGetCurrentContext();
5419
6896
    const GLuint cmdlen = 8;
5420
6897
    emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
5421
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&texture), 4);
 
6898
    (void) memcpy((void *) (gc->pc + 4), (void *) (&texture), 4);
5422
6899
    gc->pc += cmdlen;
5423
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6900
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6901
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6902
    }
5424
6903
}
5425
6904
 
5426
6905
#define X_GLrop_MultiTexCoord1dvARB 198
5427
6906
void
5428
6907
__indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
5429
6908
{
5430
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6909
    __GLXcontext *const gc = __glXGetCurrentContext();
5431
6910
    const GLuint cmdlen = 16;
5432
6911
    emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
5433
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
5434
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4);
 
6912
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
 
6913
    (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
5435
6914
    gc->pc += cmdlen;
5436
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6915
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6916
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6917
    }
5437
6918
}
5438
6919
 
5439
6920
#define X_GLrop_MultiTexCoord1dvARB 198
5440
6921
void
5441
6922
__indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
5442
6923
{
5443
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6924
    __GLXcontext *const gc = __glXGetCurrentContext();
5444
6925
    const GLuint cmdlen = 16;
5445
6926
    emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
5446
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
5447
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4);
 
6927
    (void) memcpy((void *) (gc->pc + 4), (void *) (v), 8);
 
6928
    (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
5448
6929
    gc->pc += cmdlen;
5449
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6930
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6931
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6932
    }
5450
6933
}
5451
6934
 
5452
6935
#define X_GLrop_MultiTexCoord1fvARB 199
5453
6936
void
5454
6937
__indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
5455
6938
{
5456
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6939
    __GLXcontext *const gc = __glXGetCurrentContext();
5457
6940
    const GLuint cmdlen = 12;
5458
6941
    emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
5459
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5460
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
 
6942
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
6943
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
5461
6944
    gc->pc += cmdlen;
5462
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6945
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6946
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6947
    }
5463
6948
}
5464
6949
 
5465
6950
#define X_GLrop_MultiTexCoord1fvARB 199
5466
6951
void
5467
6952
__indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
5468
6953
{
5469
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6954
    __GLXcontext *const gc = __glXGetCurrentContext();
5470
6955
    const GLuint cmdlen = 12;
5471
6956
    emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
5472
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5473
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
 
6957
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
6958
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
5474
6959
    gc->pc += cmdlen;
5475
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6960
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6961
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6962
    }
5476
6963
}
5477
6964
 
5478
6965
#define X_GLrop_MultiTexCoord1ivARB 200
5479
6966
void
5480
6967
__indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
5481
6968
{
5482
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6969
    __GLXcontext *const gc = __glXGetCurrentContext();
5483
6970
    const GLuint cmdlen = 12;
5484
6971
    emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
5485
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5486
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
 
6972
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
6973
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
5487
6974
    gc->pc += cmdlen;
5488
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6975
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6976
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6977
    }
5489
6978
}
5490
6979
 
5491
6980
#define X_GLrop_MultiTexCoord1ivARB 200
5492
6981
void
5493
6982
__indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
5494
6983
{
5495
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6984
    __GLXcontext *const gc = __glXGetCurrentContext();
5496
6985
    const GLuint cmdlen = 12;
5497
6986
    emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
5498
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5499
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
 
6987
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
6988
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
5500
6989
    gc->pc += cmdlen;
5501
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
6990
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
6991
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
6992
    }
5502
6993
}
5503
6994
 
5504
6995
#define X_GLrop_MultiTexCoord1svARB 201
5505
6996
void
5506
6997
__indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
5507
6998
{
5508
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
6999
    __GLXcontext *const gc = __glXGetCurrentContext();
5509
7000
    const GLuint cmdlen = 12;
5510
7001
    emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
5511
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5512
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
 
7002
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7003
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
5513
7004
    gc->pc += cmdlen;
5514
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7005
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7006
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7007
    }
5515
7008
}
5516
7009
 
5517
7010
#define X_GLrop_MultiTexCoord1svARB 201
5518
7011
void
5519
7012
__indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
5520
7013
{
5521
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7014
    __GLXcontext *const gc = __glXGetCurrentContext();
5522
7015
    const GLuint cmdlen = 12;
5523
7016
    emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
5524
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5525
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
 
7017
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7018
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
5526
7019
    gc->pc += cmdlen;
5527
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7020
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7021
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7022
    }
5528
7023
}
5529
7024
 
5530
7025
#define X_GLrop_MultiTexCoord2dvARB 202
5531
7026
void
5532
7027
__indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
5533
7028
{
5534
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7029
    __GLXcontext *const gc = __glXGetCurrentContext();
5535
7030
    const GLuint cmdlen = 24;
5536
7031
    emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
5537
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
5538
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
5539
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4);
 
7032
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
 
7033
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
 
7034
    (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
5540
7035
    gc->pc += cmdlen;
5541
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7036
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7037
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7038
    }
5542
7039
}
5543
7040
 
5544
7041
#define X_GLrop_MultiTexCoord2dvARB 202
5545
7042
void
5546
7043
__indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
5547
7044
{
5548
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7045
    __GLXcontext *const gc = __glXGetCurrentContext();
5549
7046
    const GLuint cmdlen = 24;
5550
7047
    emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
5551
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16);
5552
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4);
 
7048
    (void) memcpy((void *) (gc->pc + 4), (void *) (v), 16);
 
7049
    (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
5553
7050
    gc->pc += cmdlen;
5554
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7051
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7052
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7053
    }
5555
7054
}
5556
7055
 
5557
7056
#define X_GLrop_MultiTexCoord2fvARB 203
5558
7057
void
5559
7058
__indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
5560
7059
{
5561
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7060
    __GLXcontext *const gc = __glXGetCurrentContext();
5562
7061
    const GLuint cmdlen = 16;
5563
7062
    emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
5564
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5565
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5566
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
 
7063
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7064
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
 
7065
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
5567
7066
    gc->pc += cmdlen;
5568
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7067
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7068
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7069
    }
5569
7070
}
5570
7071
 
5571
7072
#define X_GLrop_MultiTexCoord2fvARB 203
5572
7073
void
5573
7074
__indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
5574
7075
{
5575
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7076
    __GLXcontext *const gc = __glXGetCurrentContext();
5576
7077
    const GLuint cmdlen = 16;
5577
7078
    emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
5578
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5579
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
 
7079
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7080
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
5580
7081
    gc->pc += cmdlen;
5581
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7082
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7083
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7084
    }
5582
7085
}
5583
7086
 
5584
7087
#define X_GLrop_MultiTexCoord2ivARB 204
5585
7088
void
5586
7089
__indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
5587
7090
{
5588
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7091
    __GLXcontext *const gc = __glXGetCurrentContext();
5589
7092
    const GLuint cmdlen = 16;
5590
7093
    emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
5591
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5592
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5593
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
 
7094
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7095
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
 
7096
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
5594
7097
    gc->pc += cmdlen;
5595
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7098
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7099
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7100
    }
5596
7101
}
5597
7102
 
5598
7103
#define X_GLrop_MultiTexCoord2ivARB 204
5599
7104
void
5600
7105
__indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
5601
7106
{
5602
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7107
    __GLXcontext *const gc = __glXGetCurrentContext();
5603
7108
    const GLuint cmdlen = 16;
5604
7109
    emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
5605
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5606
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
 
7110
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7111
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
5607
7112
    gc->pc += cmdlen;
5608
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7113
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7114
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7115
    }
5609
7116
}
5610
7117
 
5611
7118
#define X_GLrop_MultiTexCoord2svARB 205
5612
7119
void
5613
7120
__indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
5614
7121
{
5615
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7122
    __GLXcontext *const gc = __glXGetCurrentContext();
5616
7123
    const GLuint cmdlen = 12;
5617
7124
    emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
5618
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5619
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
5620
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
 
7125
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7126
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
 
7127
    (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
5621
7128
    gc->pc += cmdlen;
5622
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7129
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7130
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7131
    }
5623
7132
}
5624
7133
 
5625
7134
#define X_GLrop_MultiTexCoord2svARB 205
5626
7135
void
5627
7136
__indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
5628
7137
{
5629
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7138
    __GLXcontext *const gc = __glXGetCurrentContext();
5630
7139
    const GLuint cmdlen = 12;
5631
7140
    emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
5632
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5633
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
 
7141
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7142
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
5634
7143
    gc->pc += cmdlen;
5635
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7144
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7145
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7146
    }
5636
7147
}
5637
7148
 
5638
7149
#define X_GLrop_MultiTexCoord3dvARB 206
5639
7150
void
5640
 
__indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
 
7151
__indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t,
 
7152
                                GLdouble r)
5641
7153
{
5642
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7154
    __GLXcontext *const gc = __glXGetCurrentContext();
5643
7155
    const GLuint cmdlen = 32;
5644
7156
    emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
5645
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
5646
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
5647
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
5648
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4);
 
7157
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
 
7158
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
 
7159
    (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
 
7160
    (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
5649
7161
    gc->pc += cmdlen;
5650
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7162
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7163
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7164
    }
5651
7165
}
5652
7166
 
5653
7167
#define X_GLrop_MultiTexCoord3dvARB 206
5654
7168
void
5655
7169
__indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
5656
7170
{
5657
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7171
    __GLXcontext *const gc = __glXGetCurrentContext();
5658
7172
    const GLuint cmdlen = 32;
5659
7173
    emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
5660
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24);
5661
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4);
 
7174
    (void) memcpy((void *) (gc->pc + 4), (void *) (v), 24);
 
7175
    (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
5662
7176
    gc->pc += cmdlen;
5663
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7177
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7178
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7179
    }
5664
7180
}
5665
7181
 
5666
7182
#define X_GLrop_MultiTexCoord3fvARB 207
5667
7183
void
5668
 
__indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r)
 
7184
__indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t,
 
7185
                                GLfloat r)
5669
7186
{
5670
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7187
    __GLXcontext *const gc = __glXGetCurrentContext();
5671
7188
    const GLuint cmdlen = 20;
5672
7189
    emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
5673
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5674
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5675
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
5676
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
 
7190
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7191
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
 
7192
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
 
7193
    (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
5677
7194
    gc->pc += cmdlen;
5678
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7195
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7196
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7197
    }
5679
7198
}
5680
7199
 
5681
7200
#define X_GLrop_MultiTexCoord3fvARB 207
5682
7201
void
5683
7202
__indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
5684
7203
{
5685
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7204
    __GLXcontext *const gc = __glXGetCurrentContext();
5686
7205
    const GLuint cmdlen = 20;
5687
7206
    emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
5688
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5689
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
 
7207
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7208
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
5690
7209
    gc->pc += cmdlen;
5691
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7210
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7211
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7212
    }
5692
7213
}
5693
7214
 
5694
7215
#define X_GLrop_MultiTexCoord3ivARB 208
5695
7216
void
5696
7217
__indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
5697
7218
{
5698
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7219
    __GLXcontext *const gc = __glXGetCurrentContext();
5699
7220
    const GLuint cmdlen = 20;
5700
7221
    emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
5701
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5702
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5703
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
5704
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
 
7222
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7223
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
 
7224
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
 
7225
    (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
5705
7226
    gc->pc += cmdlen;
5706
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7227
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7228
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7229
    }
5707
7230
}
5708
7231
 
5709
7232
#define X_GLrop_MultiTexCoord3ivARB 208
5710
7233
void
5711
7234
__indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
5712
7235
{
5713
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7236
    __GLXcontext *const gc = __glXGetCurrentContext();
5714
7237
    const GLuint cmdlen = 20;
5715
7238
    emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
5716
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5717
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
 
7239
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7240
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
5718
7241
    gc->pc += cmdlen;
5719
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7242
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7243
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7244
    }
5720
7245
}
5721
7246
 
5722
7247
#define X_GLrop_MultiTexCoord3svARB 209
5723
7248
void
5724
 
__indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
 
7249
__indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t,
 
7250
                                GLshort r)
5725
7251
{
5726
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7252
    __GLXcontext *const gc = __glXGetCurrentContext();
5727
7253
    const GLuint cmdlen = 16;
5728
7254
    emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
5729
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5730
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
5731
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
5732
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2);
 
7255
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7256
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
 
7257
    (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
 
7258
    (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
5733
7259
    gc->pc += cmdlen;
5734
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7260
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7261
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7262
    }
5735
7263
}
5736
7264
 
5737
7265
#define X_GLrop_MultiTexCoord3svARB 209
5738
7266
void
5739
7267
__indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
5740
7268
{
5741
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7269
    __GLXcontext *const gc = __glXGetCurrentContext();
5742
7270
    const GLuint cmdlen = 16;
5743
7271
    emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
5744
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5745
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
 
7272
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7273
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
5746
7274
    gc->pc += cmdlen;
5747
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7275
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7276
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7277
    }
5748
7278
}
5749
7279
 
5750
7280
#define X_GLrop_MultiTexCoord4dvARB 210
5751
7281
void
5752
 
__indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
 
7282
__indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t,
 
7283
                                GLdouble r, GLdouble q)
5753
7284
{
5754
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7285
    __GLXcontext *const gc = __glXGetCurrentContext();
5755
7286
    const GLuint cmdlen = 40;
5756
7287
    emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
5757
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
5758
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8);
5759
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8);
5760
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8);
5761
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
 
7288
    (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
 
7289
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
 
7290
    (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
 
7291
    (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
 
7292
    (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
5762
7293
    gc->pc += cmdlen;
5763
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7294
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7295
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7296
    }
5764
7297
}
5765
7298
 
5766
7299
#define X_GLrop_MultiTexCoord4dvARB 210
5767
7300
void
5768
7301
__indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
5769
7302
{
5770
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7303
    __GLXcontext *const gc = __glXGetCurrentContext();
5771
7304
    const GLuint cmdlen = 40;
5772
7305
    emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
5773
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
5774
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
 
7306
    (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
 
7307
    (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
5775
7308
    gc->pc += cmdlen;
5776
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7309
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7310
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7311
    }
5777
7312
}
5778
7313
 
5779
7314
#define X_GLrop_MultiTexCoord4fvARB 211
5780
7315
void
5781
 
__indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
 
7316
__indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t,
 
7317
                                GLfloat r, GLfloat q)
5782
7318
{
5783
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7319
    __GLXcontext *const gc = __glXGetCurrentContext();
5784
7320
    const GLuint cmdlen = 24;
5785
7321
    emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
5786
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5787
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5788
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
5789
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
5790
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4);
 
7322
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7323
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
 
7324
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
 
7325
    (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
 
7326
    (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
5791
7327
    gc->pc += cmdlen;
5792
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7328
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7329
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7330
    }
5793
7331
}
5794
7332
 
5795
7333
#define X_GLrop_MultiTexCoord4fvARB 211
5796
7334
void
5797
7335
__indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
5798
7336
{
5799
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7337
    __GLXcontext *const gc = __glXGetCurrentContext();
5800
7338
    const GLuint cmdlen = 24;
5801
7339
    emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
5802
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5803
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
 
7340
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7341
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
5804
7342
    gc->pc += cmdlen;
5805
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7343
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7344
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7345
    }
5806
7346
}
5807
7347
 
5808
7348
#define X_GLrop_MultiTexCoord4ivARB 212
5809
7349
void
5810
 
__indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
 
7350
__indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r,
 
7351
                                GLint q)
5811
7352
{
5812
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7353
    __GLXcontext *const gc = __glXGetCurrentContext();
5813
7354
    const GLuint cmdlen = 24;
5814
7355
    emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
5815
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5816
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4);
5817
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4);
5818
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4);
5819
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4);
 
7356
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7357
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
 
7358
    (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
 
7359
    (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
 
7360
    (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
5820
7361
    gc->pc += cmdlen;
5821
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7362
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7363
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7364
    }
5822
7365
}
5823
7366
 
5824
7367
#define X_GLrop_MultiTexCoord4ivARB 212
5825
7368
void
5826
7369
__indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
5827
7370
{
5828
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7371
    __GLXcontext *const gc = __glXGetCurrentContext();
5829
7372
    const GLuint cmdlen = 24;
5830
7373
    emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
5831
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5832
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
 
7374
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7375
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
5833
7376
    gc->pc += cmdlen;
5834
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7377
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7378
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7379
    }
5835
7380
}
5836
7381
 
5837
7382
#define X_GLrop_MultiTexCoord4svARB 213
5838
7383
void
5839
 
__indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
 
7384
__indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t,
 
7385
                                GLshort r, GLshort q)
5840
7386
{
5841
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7387
    __GLXcontext *const gc = __glXGetCurrentContext();
5842
7388
    const GLuint cmdlen = 16;
5843
7389
    emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
5844
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5845
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2);
5846
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2);
5847
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2);
5848
 
    (void) memcpy((void *)(gc->pc + 14), (void *)(&q), 2);
 
7390
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7391
    (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
 
7392
    (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
 
7393
    (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
 
7394
    (void) memcpy((void *) (gc->pc + 14), (void *) (&q), 2);
5849
7395
    gc->pc += cmdlen;
5850
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7396
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7397
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7398
    }
5851
7399
}
5852
7400
 
5853
7401
#define X_GLrop_MultiTexCoord4svARB 213
5854
7402
void
5855
7403
__indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
5856
7404
{
5857
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7405
    __GLXcontext *const gc = __glXGetCurrentContext();
5858
7406
    const GLuint cmdlen = 16;
5859
7407
    emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
5860
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5861
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
 
7408
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7409
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
5862
7410
    gc->pc += cmdlen;
5863
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7411
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7412
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7413
    }
5864
7414
}
5865
7415
 
5866
7416
#define X_GLrop_SampleCoverageARB 229
5867
7417
void
5868
7418
__indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
5869
7419
{
5870
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
7420
    __GLXcontext *const gc = __glXGetCurrentContext();
5871
7421
    const GLuint cmdlen = 12;
5872
7422
    emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen);
5873
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4);
5874
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1);
5875
 
    gc->pc += cmdlen;
5876
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
7423
    (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
 
7424
    (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
 
7425
    gc->pc += cmdlen;
 
7426
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7427
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7428
    }
 
7429
}
 
7430
 
 
7431
#define X_GLvop_GetProgramStringARB 1308
 
7432
void
 
7433
__indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
 
7434
{
 
7435
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7436
    Display *const dpy = gc->currentDpy;
 
7437
    const GLuint cmdlen = 8;
 
7438
    if (__builtin_expect(dpy != NULL, 1)) {
 
7439
        GLubyte const *pc =
 
7440
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
7441
                                    X_GLvop_GetProgramStringARB, cmdlen);
 
7442
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
7443
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
7444
        (void) __glXReadReply(dpy, 1, string, GL_TRUE);
 
7445
        UnlockDisplay(dpy);
 
7446
        SyncHandle();
 
7447
    }
 
7448
    return;
 
7449
}
 
7450
 
 
7451
#define X_GLvop_GetProgramivARB 1307
 
7452
void
 
7453
__indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
 
7454
{
 
7455
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7456
    Display *const dpy = gc->currentDpy;
 
7457
    const GLuint cmdlen = 8;
 
7458
    if (__builtin_expect(dpy != NULL, 1)) {
 
7459
        GLubyte const *pc =
 
7460
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
7461
                                    X_GLvop_GetProgramivARB, cmdlen);
 
7462
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
7463
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
7464
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
7465
        UnlockDisplay(dpy);
 
7466
        SyncHandle();
 
7467
    }
 
7468
    return;
 
7469
}
 
7470
 
 
7471
#define X_GLrop_ProgramEnvParameter4dvARB 4185
 
7472
void
 
7473
__indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x,
 
7474
                                      GLdouble y, GLdouble z, GLdouble w)
 
7475
{
 
7476
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7477
    const GLuint cmdlen = 44;
 
7478
    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
 
7479
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7480
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
7481
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
 
7482
    (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
 
7483
    (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
 
7484
    (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
 
7485
    gc->pc += cmdlen;
 
7486
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7487
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7488
    }
 
7489
}
 
7490
 
 
7491
#define X_GLrop_ProgramEnvParameter4dvARB 4185
 
7492
void
 
7493
__indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index,
 
7494
                                       const GLdouble * params)
 
7495
{
 
7496
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7497
    const GLuint cmdlen = 44;
 
7498
    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
 
7499
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7500
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
7501
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
 
7502
    gc->pc += cmdlen;
 
7503
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7504
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7505
    }
 
7506
}
 
7507
 
 
7508
#define X_GLrop_ProgramEnvParameter4fvARB 4184
 
7509
void
 
7510
__indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x,
 
7511
                                      GLfloat y, GLfloat z, GLfloat w)
 
7512
{
 
7513
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7514
    const GLuint cmdlen = 28;
 
7515
    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
 
7516
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7517
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
7518
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
 
7519
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
 
7520
    (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
 
7521
    (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
 
7522
    gc->pc += cmdlen;
 
7523
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7524
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7525
    }
 
7526
}
 
7527
 
 
7528
#define X_GLrop_ProgramEnvParameter4fvARB 4184
 
7529
void
 
7530
__indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index,
 
7531
                                       const GLfloat * params)
 
7532
{
 
7533
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7534
    const GLuint cmdlen = 28;
 
7535
    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
 
7536
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7537
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
7538
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
 
7539
    gc->pc += cmdlen;
 
7540
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7541
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7542
    }
 
7543
}
 
7544
 
 
7545
#define X_GLrop_ProgramLocalParameter4dvARB 4216
 
7546
void
 
7547
__indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index,
 
7548
                                        GLdouble x, GLdouble y, GLdouble z,
 
7549
                                        GLdouble w)
 
7550
{
 
7551
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7552
    const GLuint cmdlen = 44;
 
7553
    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
 
7554
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7555
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
7556
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
 
7557
    (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
 
7558
    (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
 
7559
    (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
 
7560
    gc->pc += cmdlen;
 
7561
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7562
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7563
    }
 
7564
}
 
7565
 
 
7566
#define X_GLrop_ProgramLocalParameter4dvARB 4216
 
7567
void
 
7568
__indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index,
 
7569
                                         const GLdouble * params)
 
7570
{
 
7571
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7572
    const GLuint cmdlen = 44;
 
7573
    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
 
7574
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7575
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
7576
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
 
7577
    gc->pc += cmdlen;
 
7578
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7579
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7580
    }
 
7581
}
 
7582
 
 
7583
#define X_GLrop_ProgramLocalParameter4fvARB 4215
 
7584
void
 
7585
__indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index,
 
7586
                                        GLfloat x, GLfloat y, GLfloat z,
 
7587
                                        GLfloat w)
 
7588
{
 
7589
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7590
    const GLuint cmdlen = 28;
 
7591
    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
 
7592
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7593
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
7594
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
 
7595
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
 
7596
    (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
 
7597
    (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
 
7598
    gc->pc += cmdlen;
 
7599
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7600
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7601
    }
 
7602
}
 
7603
 
 
7604
#define X_GLrop_ProgramLocalParameter4fvARB 4215
 
7605
void
 
7606
__indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index,
 
7607
                                         const GLfloat * params)
 
7608
{
 
7609
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7610
    const GLuint cmdlen = 28;
 
7611
    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
 
7612
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7613
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
7614
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
 
7615
    gc->pc += cmdlen;
 
7616
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7617
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7618
    }
 
7619
}
 
7620
 
 
7621
#define X_GLrop_ProgramStringARB 4217
 
7622
void
 
7623
__indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len,
 
7624
                              const GLvoid * string)
 
7625
{
 
7626
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7627
    const GLuint cmdlen = 16 + __GLX_PAD(len);
 
7628
    if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
 
7629
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
 
7630
            if ((gc->pc + cmdlen) > gc->bufEnd) {
 
7631
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7632
            }
 
7633
            emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
 
7634
            (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
7635
            (void) memcpy((void *) (gc->pc + 8), (void *) (&format), 4);
 
7636
            (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
 
7637
            (void) memcpy((void *) (gc->pc + 16), (void *) (string), len);
 
7638
            gc->pc += cmdlen;
 
7639
            if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7640
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7641
            }
 
7642
        } else {
 
7643
            const GLint op = X_GLrop_ProgramStringARB;
 
7644
            const GLuint cmdlenLarge = cmdlen + 4;
 
7645
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
7646
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
7647
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
7648
            (void) memcpy((void *) (pc + 8), (void *) (&target), 4);
 
7649
            (void) memcpy((void *) (pc + 12), (void *) (&format), 4);
 
7650
            (void) memcpy((void *) (pc + 16), (void *) (&len), 4);
 
7651
            __glXSendLargeCommand(gc, pc, 20, string, len);
 
7652
        }
 
7653
    }
 
7654
}
 
7655
 
 
7656
#define X_GLrop_VertexAttrib1dvARB 4197
 
7657
void
 
7658
__indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
 
7659
{
 
7660
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7661
    const GLuint cmdlen = 16;
 
7662
    emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
 
7663
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7664
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
 
7665
    gc->pc += cmdlen;
 
7666
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7667
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7668
    }
 
7669
}
 
7670
 
 
7671
#define X_GLrop_VertexAttrib1dvARB 4197
 
7672
void
 
7673
__indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
 
7674
{
 
7675
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7676
    const GLuint cmdlen = 16;
 
7677
    emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
 
7678
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7679
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
 
7680
    gc->pc += cmdlen;
 
7681
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7682
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7683
    }
 
7684
}
 
7685
 
 
7686
#define X_GLrop_VertexAttrib1fvARB 4193
 
7687
void
 
7688
__indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
 
7689
{
 
7690
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7691
    const GLuint cmdlen = 12;
 
7692
    emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
 
7693
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7694
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
 
7695
    gc->pc += cmdlen;
 
7696
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7697
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7698
    }
 
7699
}
 
7700
 
 
7701
#define X_GLrop_VertexAttrib1fvARB 4193
 
7702
void
 
7703
__indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
 
7704
{
 
7705
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7706
    const GLuint cmdlen = 12;
 
7707
    emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
 
7708
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7709
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
 
7710
    gc->pc += cmdlen;
 
7711
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7712
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7713
    }
 
7714
}
 
7715
 
 
7716
#define X_GLrop_VertexAttrib1svARB 4189
 
7717
void
 
7718
__indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
 
7719
{
 
7720
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7721
    const GLuint cmdlen = 12;
 
7722
    emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
 
7723
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7724
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
 
7725
    gc->pc += cmdlen;
 
7726
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7727
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7728
    }
 
7729
}
 
7730
 
 
7731
#define X_GLrop_VertexAttrib1svARB 4189
 
7732
void
 
7733
__indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
 
7734
{
 
7735
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7736
    const GLuint cmdlen = 12;
 
7737
    emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
 
7738
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7739
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
 
7740
    gc->pc += cmdlen;
 
7741
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7742
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7743
    }
 
7744
}
 
7745
 
 
7746
#define X_GLrop_VertexAttrib2dvARB 4198
 
7747
void
 
7748
__indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
 
7749
{
 
7750
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7751
    const GLuint cmdlen = 24;
 
7752
    emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
 
7753
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7754
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
 
7755
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
 
7756
    gc->pc += cmdlen;
 
7757
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7758
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7759
    }
 
7760
}
 
7761
 
 
7762
#define X_GLrop_VertexAttrib2dvARB 4198
 
7763
void
 
7764
__indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
 
7765
{
 
7766
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7767
    const GLuint cmdlen = 24;
 
7768
    emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
 
7769
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7770
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
 
7771
    gc->pc += cmdlen;
 
7772
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7773
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7774
    }
 
7775
}
 
7776
 
 
7777
#define X_GLrop_VertexAttrib2fvARB 4194
 
7778
void
 
7779
__indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
 
7780
{
 
7781
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7782
    const GLuint cmdlen = 16;
 
7783
    emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
 
7784
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7785
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
 
7786
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
 
7787
    gc->pc += cmdlen;
 
7788
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7789
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7790
    }
 
7791
}
 
7792
 
 
7793
#define X_GLrop_VertexAttrib2fvARB 4194
 
7794
void
 
7795
__indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
 
7796
{
 
7797
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7798
    const GLuint cmdlen = 16;
 
7799
    emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
 
7800
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7801
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
 
7802
    gc->pc += cmdlen;
 
7803
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7804
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7805
    }
 
7806
}
 
7807
 
 
7808
#define X_GLrop_VertexAttrib2svARB 4190
 
7809
void
 
7810
__indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
 
7811
{
 
7812
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7813
    const GLuint cmdlen = 12;
 
7814
    emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
 
7815
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7816
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
 
7817
    (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
 
7818
    gc->pc += cmdlen;
 
7819
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7820
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7821
    }
 
7822
}
 
7823
 
 
7824
#define X_GLrop_VertexAttrib2svARB 4190
 
7825
void
 
7826
__indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
 
7827
{
 
7828
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7829
    const GLuint cmdlen = 12;
 
7830
    emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
 
7831
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7832
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
 
7833
    gc->pc += cmdlen;
 
7834
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7835
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7836
    }
 
7837
}
 
7838
 
 
7839
#define X_GLrop_VertexAttrib3dvARB 4199
 
7840
void
 
7841
__indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y,
 
7842
                               GLdouble z)
 
7843
{
 
7844
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7845
    const GLuint cmdlen = 32;
 
7846
    emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
 
7847
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7848
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
 
7849
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
 
7850
    (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
 
7851
    gc->pc += cmdlen;
 
7852
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7853
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7854
    }
 
7855
}
 
7856
 
 
7857
#define X_GLrop_VertexAttrib3dvARB 4199
 
7858
void
 
7859
__indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
 
7860
{
 
7861
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7862
    const GLuint cmdlen = 32;
 
7863
    emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
 
7864
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7865
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
 
7866
    gc->pc += cmdlen;
 
7867
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7868
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7869
    }
 
7870
}
 
7871
 
 
7872
#define X_GLrop_VertexAttrib3fvARB 4195
 
7873
void
 
7874
__indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
 
7875
{
 
7876
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7877
    const GLuint cmdlen = 20;
 
7878
    emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
 
7879
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7880
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
 
7881
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
 
7882
    (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
 
7883
    gc->pc += cmdlen;
 
7884
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7885
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7886
    }
 
7887
}
 
7888
 
 
7889
#define X_GLrop_VertexAttrib3fvARB 4195
 
7890
void
 
7891
__indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
 
7892
{
 
7893
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7894
    const GLuint cmdlen = 20;
 
7895
    emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
 
7896
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7897
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
 
7898
    gc->pc += cmdlen;
 
7899
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7900
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7901
    }
 
7902
}
 
7903
 
 
7904
#define X_GLrop_VertexAttrib3svARB 4191
 
7905
void
 
7906
__indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
 
7907
{
 
7908
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7909
    const GLuint cmdlen = 16;
 
7910
    emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
 
7911
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7912
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
 
7913
    (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
 
7914
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
 
7915
    gc->pc += cmdlen;
 
7916
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7917
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7918
    }
 
7919
}
 
7920
 
 
7921
#define X_GLrop_VertexAttrib3svARB 4191
 
7922
void
 
7923
__indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
 
7924
{
 
7925
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7926
    const GLuint cmdlen = 16;
 
7927
    emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
 
7928
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7929
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
 
7930
    gc->pc += cmdlen;
 
7931
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7932
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7933
    }
 
7934
}
 
7935
 
 
7936
#define X_GLrop_VertexAttrib4NbvARB 4235
 
7937
void
 
7938
__indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v)
 
7939
{
 
7940
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7941
    const GLuint cmdlen = 12;
 
7942
    emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
 
7943
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7944
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
 
7945
    gc->pc += cmdlen;
 
7946
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7947
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7948
    }
 
7949
}
 
7950
 
 
7951
#define X_GLrop_VertexAttrib4NivARB 4237
 
7952
void
 
7953
__indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
 
7954
{
 
7955
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7956
    const GLuint cmdlen = 24;
 
7957
    emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
 
7958
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7959
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
 
7960
    gc->pc += cmdlen;
 
7961
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7962
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7963
    }
 
7964
}
 
7965
 
 
7966
#define X_GLrop_VertexAttrib4NsvARB 4236
 
7967
void
 
7968
__indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
 
7969
{
 
7970
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7971
    const GLuint cmdlen = 16;
 
7972
    emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
 
7973
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7974
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
 
7975
    gc->pc += cmdlen;
 
7976
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7977
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7978
    }
 
7979
}
 
7980
 
 
7981
#define X_GLrop_VertexAttrib4NubvARB 4201
 
7982
void
 
7983
__indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
 
7984
                                 GLubyte z, GLubyte w)
 
7985
{
 
7986
    __GLXcontext *const gc = __glXGetCurrentContext();
 
7987
    const GLuint cmdlen = 12;
 
7988
    emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
 
7989
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
7990
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
 
7991
    (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
 
7992
    (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
 
7993
    (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
 
7994
    gc->pc += cmdlen;
 
7995
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
7996
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
7997
    }
 
7998
}
 
7999
 
 
8000
#define X_GLrop_VertexAttrib4NubvARB 4201
 
8001
void
 
8002
__indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v)
 
8003
{
 
8004
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8005
    const GLuint cmdlen = 12;
 
8006
    emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
 
8007
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8008
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
 
8009
    gc->pc += cmdlen;
 
8010
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8011
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8012
    }
 
8013
}
 
8014
 
 
8015
#define X_GLrop_VertexAttrib4NuivARB 4239
 
8016
void
 
8017
__indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
 
8018
{
 
8019
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8020
    const GLuint cmdlen = 24;
 
8021
    emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
 
8022
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8023
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
 
8024
    gc->pc += cmdlen;
 
8025
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8026
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8027
    }
 
8028
}
 
8029
 
 
8030
#define X_GLrop_VertexAttrib4NusvARB 4238
 
8031
void
 
8032
__indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
 
8033
{
 
8034
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8035
    const GLuint cmdlen = 16;
 
8036
    emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
 
8037
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8038
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
 
8039
    gc->pc += cmdlen;
 
8040
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8041
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8042
    }
 
8043
}
 
8044
 
 
8045
#define X_GLrop_VertexAttrib4bvARB 4230
 
8046
void
 
8047
__indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v)
 
8048
{
 
8049
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8050
    const GLuint cmdlen = 12;
 
8051
    emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
 
8052
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8053
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
 
8054
    gc->pc += cmdlen;
 
8055
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8056
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8057
    }
 
8058
}
 
8059
 
 
8060
#define X_GLrop_VertexAttrib4dvARB 4200
 
8061
void
 
8062
__indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y,
 
8063
                               GLdouble z, GLdouble w)
 
8064
{
 
8065
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8066
    const GLuint cmdlen = 40;
 
8067
    emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
 
8068
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8069
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
 
8070
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
 
8071
    (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
 
8072
    (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
 
8073
    gc->pc += cmdlen;
 
8074
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8075
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8076
    }
 
8077
}
 
8078
 
 
8079
#define X_GLrop_VertexAttrib4dvARB 4200
 
8080
void
 
8081
__indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
 
8082
{
 
8083
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8084
    const GLuint cmdlen = 40;
 
8085
    emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
 
8086
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8087
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
 
8088
    gc->pc += cmdlen;
 
8089
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8090
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8091
    }
 
8092
}
 
8093
 
 
8094
#define X_GLrop_VertexAttrib4fvARB 4196
 
8095
void
 
8096
__indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
 
8097
                               GLfloat w)
 
8098
{
 
8099
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8100
    const GLuint cmdlen = 24;
 
8101
    emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
 
8102
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8103
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
 
8104
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
 
8105
    (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
 
8106
    (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
 
8107
    gc->pc += cmdlen;
 
8108
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8109
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8110
    }
 
8111
}
 
8112
 
 
8113
#define X_GLrop_VertexAttrib4fvARB 4196
 
8114
void
 
8115
__indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
 
8116
{
 
8117
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8118
    const GLuint cmdlen = 24;
 
8119
    emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
 
8120
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8121
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
 
8122
    gc->pc += cmdlen;
 
8123
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8124
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8125
    }
 
8126
}
 
8127
 
 
8128
#define X_GLrop_VertexAttrib4ivARB 4231
 
8129
void
 
8130
__indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
 
8131
{
 
8132
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8133
    const GLuint cmdlen = 24;
 
8134
    emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
 
8135
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8136
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
 
8137
    gc->pc += cmdlen;
 
8138
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8139
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8140
    }
 
8141
}
 
8142
 
 
8143
#define X_GLrop_VertexAttrib4svARB 4192
 
8144
void
 
8145
__indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z,
 
8146
                               GLshort w)
 
8147
{
 
8148
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8149
    const GLuint cmdlen = 16;
 
8150
    emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
 
8151
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8152
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
 
8153
    (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
 
8154
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
 
8155
    (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
 
8156
    gc->pc += cmdlen;
 
8157
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8158
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8159
    }
 
8160
}
 
8161
 
 
8162
#define X_GLrop_VertexAttrib4svARB 4192
 
8163
void
 
8164
__indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
 
8165
{
 
8166
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8167
    const GLuint cmdlen = 16;
 
8168
    emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
 
8169
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8170
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
 
8171
    gc->pc += cmdlen;
 
8172
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8173
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8174
    }
 
8175
}
 
8176
 
 
8177
#define X_GLrop_VertexAttrib4ubvARB 4232
 
8178
void
 
8179
__indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v)
 
8180
{
 
8181
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8182
    const GLuint cmdlen = 12;
 
8183
    emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
 
8184
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8185
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
 
8186
    gc->pc += cmdlen;
 
8187
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8188
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8189
    }
 
8190
}
 
8191
 
 
8192
#define X_GLrop_VertexAttrib4uivARB 4234
 
8193
void
 
8194
__indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
 
8195
{
 
8196
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8197
    const GLuint cmdlen = 24;
 
8198
    emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
 
8199
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8200
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
 
8201
    gc->pc += cmdlen;
 
8202
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8203
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8204
    }
 
8205
}
 
8206
 
 
8207
#define X_GLrop_VertexAttrib4usvARB 4233
 
8208
void
 
8209
__indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
 
8210
{
 
8211
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8212
    const GLuint cmdlen = 16;
 
8213
    emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
 
8214
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
8215
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
 
8216
    gc->pc += cmdlen;
 
8217
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8218
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8219
    }
 
8220
}
 
8221
 
 
8222
#define X_GLrop_BeginQueryARB 231
 
8223
void
 
8224
__indirect_glBeginQueryARB(GLenum target, GLuint id)
 
8225
{
 
8226
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8227
    const GLuint cmdlen = 12;
 
8228
    emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
 
8229
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
8230
    (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
 
8231
    gc->pc += cmdlen;
 
8232
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8233
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8234
    }
 
8235
}
 
8236
 
 
8237
#define X_GLsop_DeleteQueriesARB 161
 
8238
void
 
8239
__indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
 
8240
{
 
8241
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8242
    Display *const dpy = gc->currentDpy;
 
8243
    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
 
8244
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
 
8245
#ifdef USE_XCB
 
8246
        xcb_connection_t *c = XGetXCBConnection(dpy);
 
8247
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8248
        xcb_glx_delete_queries_arb(c, gc->currentContextTag, n, ids);
 
8249
#else
 
8250
        GLubyte const *pc =
 
8251
            __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
 
8252
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
8253
        (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
 
8254
        UnlockDisplay(dpy);
 
8255
        SyncHandle();
 
8256
#endif /* USE_XCB */
 
8257
    }
 
8258
    return;
 
8259
}
 
8260
 
 
8261
#define X_GLrop_EndQueryARB 232
 
8262
void
 
8263
__indirect_glEndQueryARB(GLenum target)
 
8264
{
 
8265
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8266
    const GLuint cmdlen = 8;
 
8267
    emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
 
8268
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
8269
    gc->pc += cmdlen;
 
8270
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8271
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8272
    }
 
8273
}
 
8274
 
 
8275
#define X_GLsop_GenQueriesARB 162
 
8276
void
 
8277
__indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
 
8278
{
 
8279
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8280
    Display *const dpy = gc->currentDpy;
 
8281
    const GLuint cmdlen = 4;
 
8282
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
 
8283
#ifdef USE_XCB
 
8284
        xcb_connection_t *c = XGetXCBConnection(dpy);
 
8285
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8286
        xcb_glx_gen_queries_arb_reply_t *reply =
 
8287
            xcb_glx_gen_queries_arb_reply(c,
 
8288
                                          xcb_glx_gen_queries_arb(c,
 
8289
                                                                  gc->
 
8290
                                                                  currentContextTag,
 
8291
                                                                  n), NULL);
 
8292
        (void) memcpy(ids, xcb_glx_gen_queries_arb_data(reply),
 
8293
                      xcb_glx_gen_queries_arb_data_length(reply) *
 
8294
                      sizeof(GLuint));
 
8295
        free(reply);
 
8296
#else
 
8297
        GLubyte const *pc =
 
8298
            __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
 
8299
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
8300
        (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
 
8301
        UnlockDisplay(dpy);
 
8302
        SyncHandle();
 
8303
#endif /* USE_XCB */
 
8304
    }
 
8305
    return;
 
8306
}
 
8307
 
 
8308
#define X_GLsop_GetQueryObjectivARB 165
 
8309
void
 
8310
__indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
 
8311
{
 
8312
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8313
    Display *const dpy = gc->currentDpy;
 
8314
    const GLuint cmdlen = 8;
 
8315
    if (__builtin_expect(dpy != NULL, 1)) {
 
8316
#ifdef USE_XCB
 
8317
        xcb_connection_t *c = XGetXCBConnection(dpy);
 
8318
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8319
        xcb_glx_get_query_objectiv_arb_reply_t *reply =
 
8320
            xcb_glx_get_query_objectiv_arb_reply(c,
 
8321
                                                 xcb_glx_get_query_objectiv_arb
 
8322
                                                 (c, gc->currentContextTag,
 
8323
                                                  id, pname), NULL);
 
8324
        if (xcb_glx_get_query_objectiv_arb_data_length(reply) == 0)
 
8325
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
 
8326
        else
 
8327
            (void) memcpy(params, xcb_glx_get_query_objectiv_arb_data(reply),
 
8328
                          xcb_glx_get_query_objectiv_arb_data_length(reply) *
 
8329
                          sizeof(GLint));
 
8330
        free(reply);
 
8331
#else
 
8332
        GLubyte const *pc =
 
8333
            __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
 
8334
        (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
 
8335
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
8336
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
8337
        UnlockDisplay(dpy);
 
8338
        SyncHandle();
 
8339
#endif /* USE_XCB */
 
8340
    }
 
8341
    return;
 
8342
}
 
8343
 
 
8344
#define X_GLsop_GetQueryObjectuivARB 166
 
8345
void
 
8346
__indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
 
8347
{
 
8348
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8349
    Display *const dpy = gc->currentDpy;
 
8350
    const GLuint cmdlen = 8;
 
8351
    if (__builtin_expect(dpy != NULL, 1)) {
 
8352
#ifdef USE_XCB
 
8353
        xcb_connection_t *c = XGetXCBConnection(dpy);
 
8354
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8355
        xcb_glx_get_query_objectuiv_arb_reply_t *reply =
 
8356
            xcb_glx_get_query_objectuiv_arb_reply(c,
 
8357
                                                  xcb_glx_get_query_objectuiv_arb
 
8358
                                                  (c, gc->currentContextTag,
 
8359
                                                   id, pname), NULL);
 
8360
        if (xcb_glx_get_query_objectuiv_arb_data_length(reply) == 0)
 
8361
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
 
8362
        else
 
8363
            (void) memcpy(params, xcb_glx_get_query_objectuiv_arb_data(reply),
 
8364
                          xcb_glx_get_query_objectuiv_arb_data_length(reply) *
 
8365
                          sizeof(GLuint));
 
8366
        free(reply);
 
8367
#else
 
8368
        GLubyte const *pc =
 
8369
            __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
 
8370
        (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
 
8371
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
8372
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
8373
        UnlockDisplay(dpy);
 
8374
        SyncHandle();
 
8375
#endif /* USE_XCB */
 
8376
    }
 
8377
    return;
 
8378
}
 
8379
 
 
8380
#define X_GLsop_GetQueryivARB 164
 
8381
void
 
8382
__indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
 
8383
{
 
8384
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8385
    Display *const dpy = gc->currentDpy;
 
8386
    const GLuint cmdlen = 8;
 
8387
    if (__builtin_expect(dpy != NULL, 1)) {
 
8388
#ifdef USE_XCB
 
8389
        xcb_connection_t *c = XGetXCBConnection(dpy);
 
8390
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8391
        xcb_glx_get_queryiv_arb_reply_t *reply =
 
8392
            xcb_glx_get_queryiv_arb_reply(c,
 
8393
                                          xcb_glx_get_queryiv_arb(c,
 
8394
                                                                  gc->
 
8395
                                                                  currentContextTag,
 
8396
                                                                  target,
 
8397
                                                                  pname),
 
8398
                                          NULL);
 
8399
        if (xcb_glx_get_queryiv_arb_data_length(reply) == 0)
 
8400
            (void) memcpy(params, &reply->datum, sizeof(reply->datum));
 
8401
        else
 
8402
            (void) memcpy(params, xcb_glx_get_queryiv_arb_data(reply),
 
8403
                          xcb_glx_get_queryiv_arb_data_length(reply) *
 
8404
                          sizeof(GLint));
 
8405
        free(reply);
 
8406
#else
 
8407
        GLubyte const *pc =
 
8408
            __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
 
8409
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
8410
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
8411
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
8412
        UnlockDisplay(dpy);
 
8413
        SyncHandle();
 
8414
#endif /* USE_XCB */
 
8415
    }
 
8416
    return;
 
8417
}
 
8418
 
 
8419
#define X_GLsop_IsQueryARB 163
 
8420
GLboolean
 
8421
__indirect_glIsQueryARB(GLuint id)
 
8422
{
 
8423
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8424
    Display *const dpy = gc->currentDpy;
 
8425
    GLboolean retval = (GLboolean) 0;
 
8426
    const GLuint cmdlen = 4;
 
8427
    if (__builtin_expect(dpy != NULL, 1)) {
 
8428
#ifdef USE_XCB
 
8429
        xcb_connection_t *c = XGetXCBConnection(dpy);
 
8430
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8431
        xcb_glx_is_query_arb_reply_t *reply =
 
8432
            xcb_glx_is_query_arb_reply(c,
 
8433
                                       xcb_glx_is_query_arb(c,
 
8434
                                                            gc->
 
8435
                                                            currentContextTag,
 
8436
                                                            id), NULL);
 
8437
        retval = reply->ret_val;
 
8438
        free(reply);
 
8439
#else
 
8440
        GLubyte const *pc =
 
8441
            __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
 
8442
        (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
 
8443
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
 
8444
        UnlockDisplay(dpy);
 
8445
        SyncHandle();
 
8446
#endif /* USE_XCB */
 
8447
    }
 
8448
    return retval;
5877
8449
}
5878
8450
 
5879
8451
#define X_GLrop_DrawBuffersARB 233
5880
8452
void
5881
8453
__indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
5882
8454
{
5883
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8455
    __GLXcontext *const gc = __glXGetCurrentContext();
5884
8456
    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
5885
8457
    if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
5886
8458
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
5887
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
 
8459
            if ((gc->pc + cmdlen) > gc->bufEnd) {
5888
8460
                (void) __glXFlushRenderBuffer(gc, gc->pc);
5889
8461
            }
5890
8462
            emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
5891
 
            (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
5892
 
            (void) memcpy((void *)(gc->pc + 8), (void *)(bufs), (n * 4));
 
8463
            (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
 
8464
            (void) memcpy((void *) (gc->pc + 8), (void *) (bufs), (n * 4));
5893
8465
            gc->pc += cmdlen;
5894
 
            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5895
 
        }
5896
 
        else {
 
8466
            if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8467
                (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8468
            }
 
8469
        } else {
5897
8470
            const GLint op = X_GLrop_DrawBuffersARB;
5898
8471
            const GLuint cmdlenLarge = cmdlen + 4;
5899
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
5900
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
5901
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
5902
 
            (void) memcpy((void *)(pc + 8), (void *)(&n), 4);
 
8472
            GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
 
8473
            (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
 
8474
            (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
 
8475
            (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
5903
8476
            __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
5904
8477
        }
5905
8478
    }
5906
8479
}
5907
8480
 
5908
 
#define X_GLvop_AreTexturesResidentEXT 11
5909
 
GLboolean
5910
 
__indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences)
5911
 
{
5912
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5913
 
    Display * const dpy = gc->currentDpy;
5914
 
    GLboolean retval = (GLboolean) 0;
5915
 
    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5916
 
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5917
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreTexturesResidentEXT, cmdlen);
5918
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
5919
 
        (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
5920
 
        retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
5921
 
        UnlockDisplay(dpy); SyncHandle();
5922
 
    }
5923
 
    return retval;
5924
 
}
5925
 
 
5926
 
#define X_GLvop_GenTexturesEXT 13
5927
 
void
5928
 
__indirect_glGenTexturesEXT(GLsizei n, GLuint * textures)
5929
 
{
5930
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5931
 
    Display * const dpy = gc->currentDpy;
5932
 
    const GLuint cmdlen = 4;
5933
 
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5934
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen);
5935
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
5936
 
        (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5937
 
        UnlockDisplay(dpy); SyncHandle();
5938
 
    }
5939
 
    return;
5940
 
}
5941
 
 
5942
 
#define X_GLvop_IsTextureEXT 14
5943
 
GLboolean
5944
 
__indirect_glIsTextureEXT(GLuint texture)
5945
 
{
5946
 
    __GLXcontext * const gc = __glXGetCurrentContext();
5947
 
    Display * const dpy = gc->currentDpy;
5948
 
    GLboolean retval = (GLboolean) 0;
5949
 
    const GLuint cmdlen = 4;
5950
 
    if (__builtin_expect(dpy != NULL, 1)) {
5951
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsTextureEXT, cmdlen);
5952
 
        (void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
5953
 
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5954
 
        UnlockDisplay(dpy); SyncHandle();
5955
 
    }
5956
 
    return retval;
5957
 
}
5958
 
 
5959
8481
#define X_GLrop_SampleMaskSGIS 2048
5960
8482
void
5961
8483
__indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
5962
8484
{
5963
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8485
    __GLXcontext *const gc = __glXGetCurrentContext();
5964
8486
    const GLuint cmdlen = 12;
5965
8487
    emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
5966
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4);
5967
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1);
 
8488
    (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
 
8489
    (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
5968
8490
    gc->pc += cmdlen;
5969
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8491
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8492
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8493
    }
5970
8494
}
5971
8495
 
5972
8496
#define X_GLrop_SamplePatternSGIS 2049
5973
8497
void
5974
8498
__indirect_glSamplePatternSGIS(GLenum pattern)
5975
8499
{
5976
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8500
    __GLXcontext *const gc = __glXGetCurrentContext();
5977
8501
    const GLuint cmdlen = 8;
5978
8502
    emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
5979
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pattern), 4);
 
8503
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pattern), 4);
5980
8504
    gc->pc += cmdlen;
5981
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8505
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8506
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8507
    }
5982
8508
}
5983
8509
 
5984
8510
#define X_GLrop_PointParameterfEXT 2065
5985
8511
void
5986
8512
__indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
5987
8513
{
5988
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8514
    __GLXcontext *const gc = __glXGetCurrentContext();
5989
8515
    const GLuint cmdlen = 12;
5990
8516
    emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
5991
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
5992
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
 
8517
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
8518
    (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
5993
8519
    gc->pc += cmdlen;
5994
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8520
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8521
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8522
    }
5995
8523
}
5996
8524
 
5997
8525
#define X_GLrop_PointParameterfvEXT 2066
5998
8526
void
5999
8527
__indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
6000
8528
{
6001
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8529
    __GLXcontext *const gc = __glXGetCurrentContext();
6002
8530
    const GLuint compsize = __glPointParameterfvEXT_size(pname);
6003
8531
    const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
6004
8532
    emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
6005
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
6006
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
6007
 
    gc->pc += cmdlen;
6008
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6009
 
}
6010
 
 
6011
 
#define X_GLrop_WindowPos3fvMESA 230
6012
 
void
6013
 
__indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
6014
 
{
6015
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6016
 
    const GLuint cmdlen = 16;
6017
 
    emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
6018
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
6019
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
6020
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
6021
 
    gc->pc += cmdlen;
6022
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6023
 
}
6024
 
 
6025
 
#define X_GLrop_WindowPos3fvMESA 230
6026
 
void
6027
 
__indirect_glWindowPos3fvMESA(const GLfloat * v)
6028
 
{
6029
 
    generic_12_byte( X_GLrop_WindowPos3fvMESA, v );
6030
 
}
6031
 
 
6032
 
#define X_GLrop_BlendFuncSeparateEXT 4134
6033
 
void
6034
 
__indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
6035
 
{
6036
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6037
 
    const GLuint cmdlen = 20;
6038
 
    emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
6039
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&sfactorRGB), 4);
6040
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&dfactorRGB), 4);
6041
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&sfactorAlpha), 4);
6042
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&dfactorAlpha), 4);
6043
 
    gc->pc += cmdlen;
6044
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6045
 
}
6046
 
 
6047
 
#define X_GLrop_FogCoordfvEXT 4124
6048
 
void
6049
 
__indirect_glFogCoordfEXT(GLfloat coord)
6050
 
{
6051
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6052
 
    const GLuint cmdlen = 8;
6053
 
    emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
6054
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
6055
 
    gc->pc += cmdlen;
6056
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6057
 
}
6058
 
 
6059
 
#define X_GLrop_FogCoordfvEXT 4124
6060
 
void
6061
 
__indirect_glFogCoordfvEXT(const GLfloat * coord)
6062
 
{
6063
 
    generic_4_byte( X_GLrop_FogCoordfvEXT, coord );
6064
 
}
6065
 
 
6066
 
#define X_GLrop_FogCoorddvEXT 4125
6067
 
void
6068
 
__indirect_glFogCoorddEXT(GLdouble coord)
6069
 
{
6070
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6071
 
    const GLuint cmdlen = 12;
6072
 
    emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
6073
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 8);
6074
 
    gc->pc += cmdlen;
6075
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6076
 
}
6077
 
 
6078
 
#define X_GLrop_FogCoorddvEXT 4125
6079
 
void
6080
 
__indirect_glFogCoorddvEXT(const GLdouble * coord)
6081
 
{
6082
 
    generic_8_byte( X_GLrop_FogCoorddvEXT, coord );
 
8533
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
8534
    (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
 
8535
    gc->pc += cmdlen;
 
8536
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8537
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8538
    }
6083
8539
}
6084
8540
 
6085
8541
#define X_GLrop_SecondaryColor3bvEXT 4126
6086
8542
void
6087
8543
__indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
6088
8544
{
6089
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8545
    __GLXcontext *const gc = __glXGetCurrentContext();
6090
8546
    const GLuint cmdlen = 8;
6091
8547
    emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
6092
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
6093
 
    (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
6094
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
 
8548
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
 
8549
    (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
 
8550
    (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
6095
8551
    gc->pc += cmdlen;
6096
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8552
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8553
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8554
    }
6097
8555
}
6098
8556
 
6099
8557
#define X_GLrop_SecondaryColor3bvEXT 4126
6100
8558
void
6101
8559
__indirect_glSecondaryColor3bvEXT(const GLbyte * v)
6102
8560
{
6103
 
    generic_3_byte( X_GLrop_SecondaryColor3bvEXT, v );
 
8561
    generic_3_byte(X_GLrop_SecondaryColor3bvEXT, v);
6104
8562
}
6105
8563
 
6106
8564
#define X_GLrop_SecondaryColor3dvEXT 4130
6107
8565
void
6108
8566
__indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
6109
8567
{
6110
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8568
    __GLXcontext *const gc = __glXGetCurrentContext();
6111
8569
    const GLuint cmdlen = 28;
6112
8570
    emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
6113
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
6114
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
6115
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
 
8571
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
 
8572
    (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
 
8573
    (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
6116
8574
    gc->pc += cmdlen;
6117
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8575
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8576
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8577
    }
6118
8578
}
6119
8579
 
6120
8580
#define X_GLrop_SecondaryColor3dvEXT 4130
6121
8581
void
6122
8582
__indirect_glSecondaryColor3dvEXT(const GLdouble * v)
6123
8583
{
6124
 
    generic_24_byte( X_GLrop_SecondaryColor3dvEXT, v );
 
8584
    generic_24_byte(X_GLrop_SecondaryColor3dvEXT, v);
6125
8585
}
6126
8586
 
6127
8587
#define X_GLrop_SecondaryColor3fvEXT 4129
6128
8588
void
6129
8589
__indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
6130
8590
{
6131
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8591
    __GLXcontext *const gc = __glXGetCurrentContext();
6132
8592
    const GLuint cmdlen = 16;
6133
8593
    emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
6134
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
6135
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
6136
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
 
8594
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
8595
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
8596
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
6137
8597
    gc->pc += cmdlen;
6138
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8598
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8599
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8600
    }
6139
8601
}
6140
8602
 
6141
8603
#define X_GLrop_SecondaryColor3fvEXT 4129
6142
8604
void
6143
8605
__indirect_glSecondaryColor3fvEXT(const GLfloat * v)
6144
8606
{
6145
 
    generic_12_byte( X_GLrop_SecondaryColor3fvEXT, v );
 
8607
    generic_12_byte(X_GLrop_SecondaryColor3fvEXT, v);
6146
8608
}
6147
8609
 
6148
8610
#define X_GLrop_SecondaryColor3ivEXT 4128
6149
8611
void
6150
8612
__indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
6151
8613
{
6152
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8614
    __GLXcontext *const gc = __glXGetCurrentContext();
6153
8615
    const GLuint cmdlen = 16;
6154
8616
    emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
6155
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
6156
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
6157
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
 
8617
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
8618
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
8619
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
6158
8620
    gc->pc += cmdlen;
6159
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8621
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8622
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8623
    }
6160
8624
}
6161
8625
 
6162
8626
#define X_GLrop_SecondaryColor3ivEXT 4128
6163
8627
void
6164
8628
__indirect_glSecondaryColor3ivEXT(const GLint * v)
6165
8629
{
6166
 
    generic_12_byte( X_GLrop_SecondaryColor3ivEXT, v );
 
8630
    generic_12_byte(X_GLrop_SecondaryColor3ivEXT, v);
6167
8631
}
6168
8632
 
6169
8633
#define X_GLrop_SecondaryColor3svEXT 4127
6170
8634
void
6171
8635
__indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
6172
8636
{
6173
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8637
    __GLXcontext *const gc = __glXGetCurrentContext();
6174
8638
    const GLuint cmdlen = 12;
6175
8639
    emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
6176
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
6177
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
6178
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
 
8640
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
 
8641
    (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
 
8642
    (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
6179
8643
    gc->pc += cmdlen;
6180
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8644
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8645
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8646
    }
6181
8647
}
6182
8648
 
6183
8649
#define X_GLrop_SecondaryColor3svEXT 4127
6184
8650
void
6185
8651
__indirect_glSecondaryColor3svEXT(const GLshort * v)
6186
8652
{
6187
 
    generic_6_byte( X_GLrop_SecondaryColor3svEXT, v );
 
8653
    generic_6_byte(X_GLrop_SecondaryColor3svEXT, v);
6188
8654
}
6189
8655
 
6190
8656
#define X_GLrop_SecondaryColor3ubvEXT 4131
6191
8657
void
6192
8658
__indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
6193
8659
{
6194
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8660
    __GLXcontext *const gc = __glXGetCurrentContext();
6195
8661
    const GLuint cmdlen = 8;
6196
8662
    emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
6197
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
6198
 
    (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
6199
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
 
8663
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
 
8664
    (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
 
8665
    (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
6200
8666
    gc->pc += cmdlen;
6201
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8667
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8668
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8669
    }
6202
8670
}
6203
8671
 
6204
8672
#define X_GLrop_SecondaryColor3ubvEXT 4131
6205
8673
void
6206
8674
__indirect_glSecondaryColor3ubvEXT(const GLubyte * v)
6207
8675
{
6208
 
    generic_3_byte( X_GLrop_SecondaryColor3ubvEXT, v );
 
8676
    generic_3_byte(X_GLrop_SecondaryColor3ubvEXT, v);
6209
8677
}
6210
8678
 
6211
8679
#define X_GLrop_SecondaryColor3uivEXT 4133
6212
8680
void
6213
8681
__indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
6214
8682
{
6215
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8683
    __GLXcontext *const gc = __glXGetCurrentContext();
6216
8684
    const GLuint cmdlen = 16;
6217
8685
    emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
6218
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
6219
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
6220
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
 
8686
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
 
8687
    (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
 
8688
    (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
6221
8689
    gc->pc += cmdlen;
6222
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8690
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8691
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8692
    }
6223
8693
}
6224
8694
 
6225
8695
#define X_GLrop_SecondaryColor3uivEXT 4133
6226
8696
void
6227
8697
__indirect_glSecondaryColor3uivEXT(const GLuint * v)
6228
8698
{
6229
 
    generic_12_byte( X_GLrop_SecondaryColor3uivEXT, v );
 
8699
    generic_12_byte(X_GLrop_SecondaryColor3uivEXT, v);
6230
8700
}
6231
8701
 
6232
8702
#define X_GLrop_SecondaryColor3usvEXT 4132
6233
8703
void
6234
8704
__indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
6235
8705
{
6236
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8706
    __GLXcontext *const gc = __glXGetCurrentContext();
6237
8707
    const GLuint cmdlen = 12;
6238
8708
    emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
6239
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
6240
 
    (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
6241
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
 
8709
    (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
 
8710
    (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
 
8711
    (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
6242
8712
    gc->pc += cmdlen;
6243
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8713
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8714
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8715
    }
6244
8716
}
6245
8717
 
6246
8718
#define X_GLrop_SecondaryColor3usvEXT 4132
6247
8719
void
6248
8720
__indirect_glSecondaryColor3usvEXT(const GLushort * v)
6249
8721
{
6250
 
    generic_6_byte( X_GLrop_SecondaryColor3usvEXT, v );
 
8722
    generic_6_byte(X_GLrop_SecondaryColor3usvEXT, v);
 
8723
}
 
8724
 
 
8725
#define X_GLrop_FogCoorddvEXT 4125
 
8726
void
 
8727
__indirect_glFogCoorddEXT(GLdouble coord)
 
8728
{
 
8729
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8730
    const GLuint cmdlen = 12;
 
8731
    emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
 
8732
    (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 8);
 
8733
    gc->pc += cmdlen;
 
8734
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8735
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8736
    }
 
8737
}
 
8738
 
 
8739
#define X_GLrop_FogCoorddvEXT 4125
 
8740
void
 
8741
__indirect_glFogCoorddvEXT(const GLdouble * coord)
 
8742
{
 
8743
    generic_8_byte(X_GLrop_FogCoorddvEXT, coord);
 
8744
}
 
8745
 
 
8746
#define X_GLrop_FogCoordfvEXT 4124
 
8747
void
 
8748
__indirect_glFogCoordfEXT(GLfloat coord)
 
8749
{
 
8750
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8751
    const GLuint cmdlen = 8;
 
8752
    emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
 
8753
    (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
 
8754
    gc->pc += cmdlen;
 
8755
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8756
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8757
    }
 
8758
}
 
8759
 
 
8760
#define X_GLrop_FogCoordfvEXT 4124
 
8761
void
 
8762
__indirect_glFogCoordfvEXT(const GLfloat * coord)
 
8763
{
 
8764
    generic_4_byte(X_GLrop_FogCoordfvEXT, coord);
 
8765
}
 
8766
 
 
8767
#define X_GLrop_BlendFuncSeparateEXT 4134
 
8768
void
 
8769
__indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
 
8770
                                  GLenum sfactorAlpha, GLenum dfactorAlpha)
 
8771
{
 
8772
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8773
    const GLuint cmdlen = 20;
 
8774
    emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
 
8775
    (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactorRGB), 4);
 
8776
    (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactorRGB), 4);
 
8777
    (void) memcpy((void *) (gc->pc + 12), (void *) (&sfactorAlpha), 4);
 
8778
    (void) memcpy((void *) (gc->pc + 16), (void *) (&dfactorAlpha), 4);
 
8779
    gc->pc += cmdlen;
 
8780
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8781
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8782
    }
 
8783
}
 
8784
 
 
8785
#define X_GLrop_WindowPos3fvMESA 230
 
8786
void
 
8787
__indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
 
8788
{
 
8789
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8790
    const GLuint cmdlen = 16;
 
8791
    emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
 
8792
    (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
 
8793
    (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
 
8794
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
 
8795
    gc->pc += cmdlen;
 
8796
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8797
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8798
    }
 
8799
}
 
8800
 
 
8801
#define X_GLrop_WindowPos3fvMESA 230
 
8802
void
 
8803
__indirect_glWindowPos3fvMESA(const GLfloat * v)
 
8804
{
 
8805
    generic_12_byte(X_GLrop_WindowPos3fvMESA, v);
6251
8806
}
6252
8807
 
6253
8808
#define X_GLvop_AreProgramsResidentNV 1293
6254
8809
GLboolean
6255
 
__indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences)
 
8810
__indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids,
 
8811
                                   GLboolean * residences)
6256
8812
{
6257
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6258
 
    Display * const dpy = gc->currentDpy;
 
8813
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8814
    Display *const dpy = gc->currentDpy;
6259
8815
    GLboolean retval = (GLboolean) 0;
6260
8816
    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
6261
8817
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
6262
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreProgramsResidentNV, cmdlen);
6263
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
6264
 
        (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4));
 
8818
        GLubyte const *pc =
 
8819
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
8820
                                    X_GLvop_AreProgramsResidentNV, cmdlen);
 
8821
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
8822
        (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
6265
8823
        retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
6266
 
        UnlockDisplay(dpy); SyncHandle();
 
8824
        UnlockDisplay(dpy);
 
8825
        SyncHandle();
6267
8826
    }
6268
8827
    return retval;
6269
8828
}
6272
8831
void
6273
8832
__indirect_glBindProgramNV(GLenum target, GLuint program)
6274
8833
{
6275
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8834
    __GLXcontext *const gc = __glXGetCurrentContext();
6276
8835
    const GLuint cmdlen = 12;
6277
8836
    emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
6278
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6279
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&program), 4);
 
8837
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
8838
    (void) memcpy((void *) (gc->pc + 8), (void *) (&program), 4);
6280
8839
    gc->pc += cmdlen;
6281
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8840
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8841
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8842
    }
6282
8843
}
6283
8844
 
6284
8845
#define X_GLvop_DeleteProgramsNV 1294
6285
8846
void
6286
8847
__indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
6287
8848
{
6288
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6289
 
    Display * const dpy = gc->currentDpy;
 
8849
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8850
    Display *const dpy = gc->currentDpy;
6290
8851
    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
6291
8852
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
6292
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteProgramsNV, cmdlen);
6293
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
6294
 
        (void) memcpy((void *)(pc + 4), (void *)(programs), (n * 4));
6295
 
        UnlockDisplay(dpy); SyncHandle();
 
8853
        GLubyte const *pc =
 
8854
            __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
 
8855
                                    X_GLvop_DeleteProgramsNV, cmdlen);
 
8856
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
8857
        (void) memcpy((void *) (pc + 4), (void *) (programs), (n * 4));
 
8858
        UnlockDisplay(dpy);
 
8859
        SyncHandle();
6296
8860
    }
6297
8861
    return;
6298
8862
}
6299
8863
 
6300
8864
#define X_GLrop_ExecuteProgramNV 4181
6301
8865
void
6302
 
__indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params)
 
8866
__indirect_glExecuteProgramNV(GLenum target, GLuint id,
 
8867
                              const GLfloat * params)
6303
8868
{
6304
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
8869
    __GLXcontext *const gc = __glXGetCurrentContext();
6305
8870
    const GLuint cmdlen = 28;
6306
8871
    emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
6307
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6308
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
6309
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
 
8872
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
8873
    (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
 
8874
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
6310
8875
    gc->pc += cmdlen;
6311
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
8876
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
8877
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
8878
    }
6312
8879
}
6313
8880
 
6314
8881
#define X_GLvop_GenProgramsNV 1295
6315
8882
void
6316
8883
__indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
6317
8884
{
6318
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6319
 
    Display * const dpy = gc->currentDpy;
 
8885
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8886
    Display *const dpy = gc->currentDpy;
6320
8887
    const GLuint cmdlen = 4;
6321
8888
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
6322
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenProgramsNV, cmdlen);
6323
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
 
8889
        GLubyte const *pc =
 
8890
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
8891
                                    X_GLvop_GenProgramsNV, cmdlen);
 
8892
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
6324
8893
        (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
6325
 
        UnlockDisplay(dpy); SyncHandle();
 
8894
        UnlockDisplay(dpy);
 
8895
        SyncHandle();
6326
8896
    }
6327
8897
    return;
6328
8898
}
6329
8899
 
6330
8900
#define X_GLvop_GetProgramParameterdvNV 1297
6331
8901
void
6332
 
__indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params)
 
8902
__indirect_glGetProgramParameterdvNV(GLenum target, GLuint index,
 
8903
                                     GLenum pname, GLdouble * params)
6333
8904
{
6334
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6335
 
    Display * const dpy = gc->currentDpy;
 
8905
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8906
    Display *const dpy = gc->currentDpy;
6336
8907
    const GLuint cmdlen = 12;
6337
8908
    if (__builtin_expect(dpy != NULL, 1)) {
6338
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterdvNV, cmdlen);
6339
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
6340
 
        (void) memcpy((void *)(pc + 4), (void *)(&index), 4);
6341
 
        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
 
8909
        GLubyte const *pc =
 
8910
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
8911
                                    X_GLvop_GetProgramParameterdvNV, cmdlen);
 
8912
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
8913
        (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
 
8914
        (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
6342
8915
        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
6343
 
        UnlockDisplay(dpy); SyncHandle();
 
8916
        UnlockDisplay(dpy);
 
8917
        SyncHandle();
6344
8918
    }
6345
8919
    return;
6346
8920
}
6347
8921
 
6348
8922
#define X_GLvop_GetProgramParameterfvNV 1296
6349
8923
void
6350
 
__indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params)
 
8924
__indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
 
8925
                                     GLenum pname, GLfloat * params)
6351
8926
{
6352
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6353
 
    Display * const dpy = gc->currentDpy;
 
8927
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8928
    Display *const dpy = gc->currentDpy;
6354
8929
    const GLuint cmdlen = 12;
6355
8930
    if (__builtin_expect(dpy != NULL, 1)) {
6356
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterfvNV, cmdlen);
6357
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
6358
 
        (void) memcpy((void *)(pc + 4), (void *)(&index), 4);
6359
 
        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
6360
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6361
 
        UnlockDisplay(dpy); SyncHandle();
6362
 
    }
6363
 
    return;
6364
 
}
6365
 
 
6366
 
#define X_GLvop_GetProgramivNV 1298
6367
 
void
6368
 
__indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
6369
 
{
6370
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6371
 
    Display * const dpy = gc->currentDpy;
6372
 
    const GLuint cmdlen = 8;
6373
 
    if (__builtin_expect(dpy != NULL, 1)) {
6374
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivNV, cmdlen);
6375
 
        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
6376
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
6377
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6378
 
        UnlockDisplay(dpy); SyncHandle();
 
8931
        GLubyte const *pc =
 
8932
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
8933
                                    X_GLvop_GetProgramParameterfvNV, cmdlen);
 
8934
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
8935
        (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
 
8936
        (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
 
8937
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
8938
        UnlockDisplay(dpy);
 
8939
        SyncHandle();
6379
8940
    }
6380
8941
    return;
6381
8942
}
6384
8945
void
6385
8946
__indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program)
6386
8947
{
6387
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6388
 
    Display * const dpy = gc->currentDpy;
 
8948
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8949
    Display *const dpy = gc->currentDpy;
6389
8950
    const GLuint cmdlen = 8;
6390
8951
    if (__builtin_expect(dpy != NULL, 1)) {
6391
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringNV, cmdlen);
6392
 
        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
6393
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
 
8952
        GLubyte const *pc =
 
8953
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
8954
                                    X_GLvop_GetProgramStringNV, cmdlen);
 
8955
        (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
 
8956
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6394
8957
        (void) __glXReadReply(dpy, 1, program, GL_TRUE);
6395
 
        UnlockDisplay(dpy); SyncHandle();
 
8958
        UnlockDisplay(dpy);
 
8959
        SyncHandle();
 
8960
    }
 
8961
    return;
 
8962
}
 
8963
 
 
8964
#define X_GLvop_GetProgramivNV 1298
 
8965
void
 
8966
__indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
 
8967
{
 
8968
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8969
    Display *const dpy = gc->currentDpy;
 
8970
    const GLuint cmdlen = 8;
 
8971
    if (__builtin_expect(dpy != NULL, 1)) {
 
8972
        GLubyte const *pc =
 
8973
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
8974
                                    X_GLvop_GetProgramivNV, cmdlen);
 
8975
        (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
 
8976
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
8977
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
8978
        UnlockDisplay(dpy);
 
8979
        SyncHandle();
6396
8980
    }
6397
8981
    return;
6398
8982
}
6399
8983
 
6400
8984
#define X_GLvop_GetTrackMatrixivNV 1300
6401
8985
void
6402
 
__indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params)
 
8986
__indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname,
 
8987
                                GLint * params)
6403
8988
{
6404
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6405
 
    Display * const dpy = gc->currentDpy;
 
8989
    __GLXcontext *const gc = __glXGetCurrentContext();
 
8990
    Display *const dpy = gc->currentDpy;
6406
8991
    const GLuint cmdlen = 12;
6407
8992
    if (__builtin_expect(dpy != NULL, 1)) {
6408
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetTrackMatrixivNV, cmdlen);
6409
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
6410
 
        (void) memcpy((void *)(pc + 4), (void *)(&address), 4);
6411
 
        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
6412
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6413
 
        UnlockDisplay(dpy); SyncHandle();
 
8993
        GLubyte const *pc =
 
8994
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
8995
                                    X_GLvop_GetTrackMatrixivNV, cmdlen);
 
8996
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
8997
        (void) memcpy((void *) (pc + 4), (void *) (&address), 4);
 
8998
        (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
 
8999
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
9000
        UnlockDisplay(dpy);
 
9001
        SyncHandle();
 
9002
    }
 
9003
    return;
 
9004
}
 
9005
 
 
9006
#define X_GLvop_GetVertexAttribdvNV 1301
 
9007
void
 
9008
__indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname,
 
9009
                                 GLdouble * params)
 
9010
{
 
9011
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9012
    Display *const dpy = gc->currentDpy;
 
9013
    const GLuint cmdlen = 8;
 
9014
    if (__builtin_expect(dpy != NULL, 1)) {
 
9015
        GLubyte const *pc =
 
9016
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
9017
                                    X_GLvop_GetVertexAttribdvNV, cmdlen);
 
9018
        (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
 
9019
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
9020
        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
 
9021
        UnlockDisplay(dpy);
 
9022
        SyncHandle();
 
9023
    }
 
9024
    return;
 
9025
}
 
9026
 
 
9027
#define X_GLvop_GetVertexAttribfvNV 1302
 
9028
void
 
9029
__indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
 
9030
{
 
9031
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9032
    Display *const dpy = gc->currentDpy;
 
9033
    const GLuint cmdlen = 8;
 
9034
    if (__builtin_expect(dpy != NULL, 1)) {
 
9035
        GLubyte const *pc =
 
9036
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
9037
                                    X_GLvop_GetVertexAttribfvNV, cmdlen);
 
9038
        (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
 
9039
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
9040
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
9041
        UnlockDisplay(dpy);
 
9042
        SyncHandle();
 
9043
    }
 
9044
    return;
 
9045
}
 
9046
 
 
9047
#define X_GLvop_GetVertexAttribivNV 1303
 
9048
void
 
9049
__indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
 
9050
{
 
9051
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9052
    Display *const dpy = gc->currentDpy;
 
9053
    const GLuint cmdlen = 8;
 
9054
    if (__builtin_expect(dpy != NULL, 1)) {
 
9055
        GLubyte const *pc =
 
9056
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
9057
                                    X_GLvop_GetVertexAttribivNV, cmdlen);
 
9058
        (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
 
9059
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
9060
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
9061
        UnlockDisplay(dpy);
 
9062
        SyncHandle();
6414
9063
    }
6415
9064
    return;
6416
9065
}
6419
9068
GLboolean
6420
9069
__indirect_glIsProgramNV(GLuint program)
6421
9070
{
6422
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6423
 
    Display * const dpy = gc->currentDpy;
 
9071
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9072
    Display *const dpy = gc->currentDpy;
6424
9073
    GLboolean retval = (GLboolean) 0;
6425
9074
    const GLuint cmdlen = 4;
6426
9075
    if (__builtin_expect(dpy != NULL, 1)) {
6427
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsProgramNV, cmdlen);
6428
 
        (void) memcpy((void *)(pc + 0), (void *)(&program), 4);
 
9076
        GLubyte const *pc =
 
9077
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
9078
                                    X_GLvop_IsProgramNV, cmdlen);
 
9079
        (void) memcpy((void *) (pc + 0), (void *) (&program), 4);
6429
9080
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
6430
 
        UnlockDisplay(dpy); SyncHandle();
 
9081
        UnlockDisplay(dpy);
 
9082
        SyncHandle();
6431
9083
    }
6432
9084
    return retval;
6433
9085
}
6434
9086
 
6435
9087
#define X_GLrop_LoadProgramNV 4183
6436
9088
void
6437
 
__indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program)
 
9089
__indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len,
 
9090
                           const GLubyte * program)
6438
9091
{
6439
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9092
    __GLXcontext *const gc = __glXGetCurrentContext();
6440
9093
    const GLuint cmdlen = 16 + __GLX_PAD(len);
6441
9094
    if (__builtin_expect(len >= 0, 1)) {
6442
9095
        emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
6443
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6444
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
6445
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
6446
 
        (void) memcpy((void *)(gc->pc + 16), (void *)(program), len);
 
9096
        (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
9097
        (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
 
9098
        (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
 
9099
        (void) memcpy((void *) (gc->pc + 16), (void *) (program), len);
6447
9100
        gc->pc += cmdlen;
6448
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6449
 
    }
6450
 
}
6451
 
 
6452
 
#define X_GLrop_ProgramParameter4dvNV 4185
6453
 
void
6454
 
__indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
6455
 
{
6456
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6457
 
    const GLuint cmdlen = 44;
6458
 
    emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
6459
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6460
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
6461
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
6462
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
6463
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
6464
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
6465
 
    gc->pc += cmdlen;
6466
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6467
 
}
6468
 
 
6469
 
#define X_GLrop_ProgramParameter4dvNV 4185
6470
 
void
6471
 
__indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params)
6472
 
{
6473
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6474
 
    const GLuint cmdlen = 44;
6475
 
    emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
6476
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6477
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
6478
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
6479
 
    gc->pc += cmdlen;
6480
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6481
 
}
6482
 
 
6483
 
#define X_GLrop_ProgramParameter4fvNV 4184
6484
 
void
6485
 
__indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
6486
 
{
6487
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6488
 
    const GLuint cmdlen = 28;
6489
 
    emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
6490
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6491
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
6492
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
6493
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
6494
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
6495
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
6496
 
    gc->pc += cmdlen;
6497
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6498
 
}
6499
 
 
6500
 
#define X_GLrop_ProgramParameter4fvNV 4184
6501
 
void
6502
 
__indirect_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * params)
6503
 
{
6504
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6505
 
    const GLuint cmdlen = 28;
6506
 
    emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
6507
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6508
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
6509
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
6510
 
    gc->pc += cmdlen;
6511
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9101
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9102
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9103
        }
 
9104
    }
 
9105
}
 
9106
 
 
9107
#define X_GLrop_ProgramParameter4dvNV 4185
 
9108
void
 
9109
__indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x,
 
9110
                                  GLdouble y, GLdouble z, GLdouble w)
 
9111
{
 
9112
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9113
    const GLuint cmdlen = 44;
 
9114
    emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
 
9115
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
9116
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
9117
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
 
9118
    (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
 
9119
    (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
 
9120
    (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
 
9121
    gc->pc += cmdlen;
 
9122
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9123
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9124
    }
 
9125
}
 
9126
 
 
9127
#define X_GLrop_ProgramParameter4dvNV 4185
 
9128
void
 
9129
__indirect_glProgramParameter4dvNV(GLenum target, GLuint index,
 
9130
                                   const GLdouble * params)
 
9131
{
 
9132
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9133
    const GLuint cmdlen = 44;
 
9134
    emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
 
9135
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
9136
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
9137
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
 
9138
    gc->pc += cmdlen;
 
9139
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9140
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9141
    }
 
9142
}
 
9143
 
 
9144
#define X_GLrop_ProgramParameter4fvNV 4184
 
9145
void
 
9146
__indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x,
 
9147
                                  GLfloat y, GLfloat z, GLfloat w)
 
9148
{
 
9149
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9150
    const GLuint cmdlen = 28;
 
9151
    emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
 
9152
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
9153
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
9154
    (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
 
9155
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
 
9156
    (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
 
9157
    (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
 
9158
    gc->pc += cmdlen;
 
9159
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9160
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9161
    }
 
9162
}
 
9163
 
 
9164
#define X_GLrop_ProgramParameter4fvNV 4184
 
9165
void
 
9166
__indirect_glProgramParameter4fvNV(GLenum target, GLuint index,
 
9167
                                   const GLfloat * params)
 
9168
{
 
9169
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9170
    const GLuint cmdlen = 28;
 
9171
    emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
 
9172
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
9173
    (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
9174
    (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
 
9175
    gc->pc += cmdlen;
 
9176
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9177
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9178
    }
6512
9179
}
6513
9180
 
6514
9181
#define X_GLrop_ProgramParameters4dvNV 4187
6515
9182
void
6516
 
__indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params)
 
9183
__indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num,
 
9184
                                    const GLdouble * params)
6517
9185
{
6518
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9186
    __GLXcontext *const gc = __glXGetCurrentContext();
6519
9187
    const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
6520
9188
    if (__builtin_expect(num >= 0, 1)) {
6521
9189
        emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
6522
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6523
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
6524
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
6525
 
        (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 32));
 
9190
        (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
9191
        (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
9192
        (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
 
9193
        (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 32));
6526
9194
        gc->pc += cmdlen;
6527
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9195
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9196
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9197
        }
6528
9198
    }
6529
9199
}
6530
9200
 
6531
9201
#define X_GLrop_ProgramParameters4fvNV 4186
6532
9202
void
6533
 
__indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params)
 
9203
__indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num,
 
9204
                                    const GLfloat * params)
6534
9205
{
6535
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9206
    __GLXcontext *const gc = __glXGetCurrentContext();
6536
9207
    const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
6537
9208
    if (__builtin_expect(num >= 0, 1)) {
6538
9209
        emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
6539
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6540
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
6541
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
6542
 
        (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 16));
 
9210
        (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
9211
        (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
 
9212
        (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
 
9213
        (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 16));
6543
9214
        gc->pc += cmdlen;
6544
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9215
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9216
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9217
        }
6545
9218
    }
6546
9219
}
6547
9220
 
6549
9222
void
6550
9223
__indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
6551
9224
{
6552
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9225
    __GLXcontext *const gc = __glXGetCurrentContext();
6553
9226
    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
6554
9227
    if (__builtin_expect(n >= 0, 1)) {
6555
9228
        emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
6556
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
6557
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(ids), (n * 4));
 
9229
        (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
 
9230
        (void) memcpy((void *) (gc->pc + 8), (void *) (ids), (n * 4));
6558
9231
        gc->pc += cmdlen;
6559
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9232
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9233
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9234
        }
6560
9235
    }
6561
9236
}
6562
9237
 
6563
9238
#define X_GLrop_TrackMatrixNV 4188
6564
9239
void
6565
 
__indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform)
 
9240
__indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix,
 
9241
                           GLenum transform)
6566
9242
{
6567
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9243
    __GLXcontext *const gc = __glXGetCurrentContext();
6568
9244
    const GLuint cmdlen = 20;
6569
9245
    emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
6570
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6571
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&address), 4);
6572
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&matrix), 4);
6573
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&transform), 4);
6574
 
    gc->pc += cmdlen;
6575
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6576
 
}
6577
 
 
6578
 
#define X_GLrop_VertexAttrib1dvARB 4197
6579
 
void
6580
 
__indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
6581
 
{
6582
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6583
 
    const GLuint cmdlen = 16;
6584
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
6585
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
6586
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
6587
 
    gc->pc += cmdlen;
6588
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6589
 
}
6590
 
 
6591
 
#define X_GLrop_VertexAttrib1dvARB 4197
6592
 
void
6593
 
__indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
6594
 
{
6595
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6596
 
    const GLuint cmdlen = 16;
6597
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
6598
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
6599
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
6600
 
    gc->pc += cmdlen;
6601
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6602
 
}
6603
 
 
6604
 
#define X_GLrop_VertexAttrib1fvARB 4193
6605
 
void
6606
 
__indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
6607
 
{
6608
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6609
 
    const GLuint cmdlen = 12;
6610
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
6611
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6612
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
6613
 
    gc->pc += cmdlen;
6614
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6615
 
}
6616
 
 
6617
 
#define X_GLrop_VertexAttrib1fvARB 4193
6618
 
void
6619
 
__indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
6620
 
{
6621
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6622
 
    const GLuint cmdlen = 12;
6623
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
6624
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6625
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6626
 
    gc->pc += cmdlen;
6627
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6628
 
}
6629
 
 
6630
 
#define X_GLrop_VertexAttrib1svARB 4189
6631
 
void
6632
 
__indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
6633
 
{
6634
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6635
 
    const GLuint cmdlen = 12;
6636
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
6637
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6638
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6639
 
    gc->pc += cmdlen;
6640
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6641
 
}
6642
 
 
6643
 
#define X_GLrop_VertexAttrib1svARB 4189
6644
 
void
6645
 
__indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
6646
 
{
6647
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6648
 
    const GLuint cmdlen = 12;
6649
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
6650
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6651
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
6652
 
    gc->pc += cmdlen;
6653
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6654
 
}
6655
 
 
6656
 
#define X_GLrop_VertexAttrib2dvARB 4198
6657
 
void
6658
 
__indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
6659
 
{
6660
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6661
 
    const GLuint cmdlen = 24;
6662
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
6663
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
6664
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
6665
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4);
6666
 
    gc->pc += cmdlen;
6667
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6668
 
}
6669
 
 
6670
 
#define X_GLrop_VertexAttrib2dvARB 4198
6671
 
void
6672
 
__indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
6673
 
{
6674
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6675
 
    const GLuint cmdlen = 24;
6676
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
6677
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16);
6678
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4);
6679
 
    gc->pc += cmdlen;
6680
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6681
 
}
6682
 
 
6683
 
#define X_GLrop_VertexAttrib2fvARB 4194
6684
 
void
6685
 
__indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
6686
 
{
6687
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6688
 
    const GLuint cmdlen = 16;
6689
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
6690
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6691
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
6692
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
6693
 
    gc->pc += cmdlen;
6694
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6695
 
}
6696
 
 
6697
 
#define X_GLrop_VertexAttrib2fvARB 4194
6698
 
void
6699
 
__indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
6700
 
{
6701
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6702
 
    const GLuint cmdlen = 16;
6703
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
6704
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6705
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6706
 
    gc->pc += cmdlen;
6707
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6708
 
}
6709
 
 
6710
 
#define X_GLrop_VertexAttrib2svARB 4190
6711
 
void
6712
 
__indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
6713
 
{
6714
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6715
 
    const GLuint cmdlen = 12;
6716
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
6717
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6718
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6719
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
6720
 
    gc->pc += cmdlen;
6721
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6722
 
}
6723
 
 
6724
 
#define X_GLrop_VertexAttrib2svARB 4190
6725
 
void
6726
 
__indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
6727
 
{
6728
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6729
 
    const GLuint cmdlen = 12;
6730
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
6731
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6732
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6733
 
    gc->pc += cmdlen;
6734
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6735
 
}
6736
 
 
6737
 
#define X_GLrop_VertexAttrib3dvARB 4199
6738
 
void
6739
 
__indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z)
6740
 
{
6741
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6742
 
    const GLuint cmdlen = 32;
6743
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
6744
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
6745
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
6746
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
6747
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4);
6748
 
    gc->pc += cmdlen;
6749
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6750
 
}
6751
 
 
6752
 
#define X_GLrop_VertexAttrib3dvARB 4199
6753
 
void
6754
 
__indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
6755
 
{
6756
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6757
 
    const GLuint cmdlen = 32;
6758
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
6759
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24);
6760
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4);
6761
 
    gc->pc += cmdlen;
6762
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6763
 
}
6764
 
 
6765
 
#define X_GLrop_VertexAttrib3fvARB 4195
6766
 
void
6767
 
__indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
6768
 
{
6769
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6770
 
    const GLuint cmdlen = 20;
6771
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
6772
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6773
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
6774
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
6775
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
6776
 
    gc->pc += cmdlen;
6777
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6778
 
}
6779
 
 
6780
 
#define X_GLrop_VertexAttrib3fvARB 4195
6781
 
void
6782
 
__indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
6783
 
{
6784
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6785
 
    const GLuint cmdlen = 20;
6786
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
6787
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6788
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
6789
 
    gc->pc += cmdlen;
6790
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6791
 
}
6792
 
 
6793
 
#define X_GLrop_VertexAttrib3svARB 4191
6794
 
void
6795
 
__indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
6796
 
{
6797
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6798
 
    const GLuint cmdlen = 16;
6799
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
6800
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6801
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6802
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
6803
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
6804
 
    gc->pc += cmdlen;
6805
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6806
 
}
6807
 
 
6808
 
#define X_GLrop_VertexAttrib3svARB 4191
6809
 
void
6810
 
__indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
6811
 
{
6812
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6813
 
    const GLuint cmdlen = 16;
6814
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
6815
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6816
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
6817
 
    gc->pc += cmdlen;
6818
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6819
 
}
6820
 
 
6821
 
#define X_GLrop_VertexAttrib4dvARB 4200
6822
 
void
6823
 
__indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
6824
 
{
6825
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6826
 
    const GLuint cmdlen = 40;
6827
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
6828
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
6829
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
6830
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
6831
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
6832
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4);
6833
 
    gc->pc += cmdlen;
6834
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6835
 
}
6836
 
 
6837
 
#define X_GLrop_VertexAttrib4dvARB 4200
6838
 
void
6839
 
__indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
6840
 
{
6841
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6842
 
    const GLuint cmdlen = 40;
6843
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
6844
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
6845
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4);
6846
 
    gc->pc += cmdlen;
6847
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6848
 
}
6849
 
 
6850
 
#define X_GLrop_VertexAttrib4fvARB 4196
6851
 
void
6852
 
__indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
6853
 
{
6854
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6855
 
    const GLuint cmdlen = 24;
6856
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
6857
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6858
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
6859
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
6860
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
6861
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
6862
 
    gc->pc += cmdlen;
6863
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6864
 
}
6865
 
 
6866
 
#define X_GLrop_VertexAttrib4fvARB 4196
6867
 
void
6868
 
__indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
6869
 
{
6870
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6871
 
    const GLuint cmdlen = 24;
6872
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
6873
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6874
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6875
 
    gc->pc += cmdlen;
6876
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6877
 
}
6878
 
 
6879
 
#define X_GLrop_VertexAttrib4svARB 4192
6880
 
void
6881
 
__indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
6882
 
{
6883
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6884
 
    const GLuint cmdlen = 16;
6885
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
6886
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6887
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6888
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
6889
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
6890
 
    (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
6891
 
    gc->pc += cmdlen;
6892
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6893
 
}
6894
 
 
6895
 
#define X_GLrop_VertexAttrib4svARB 4192
6896
 
void
6897
 
__indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
6898
 
{
6899
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6900
 
    const GLuint cmdlen = 16;
6901
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
6902
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6903
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6904
 
    gc->pc += cmdlen;
6905
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6906
 
}
6907
 
 
6908
 
#define X_GLrop_VertexAttrib4NubvARB 4201
6909
 
void
6910
 
__indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
6911
 
{
6912
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6913
 
    const GLuint cmdlen = 12;
6914
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
6915
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6916
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
6917
 
    (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
6918
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
6919
 
    (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
6920
 
    gc->pc += cmdlen;
6921
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6922
 
}
6923
 
 
6924
 
#define X_GLrop_VertexAttrib4NubvARB 4201
6925
 
void
6926
 
__indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v)
6927
 
{
6928
 
    __GLXcontext * const gc = __glXGetCurrentContext();
6929
 
    const GLuint cmdlen = 12;
6930
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
6931
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6932
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6933
 
    gc->pc += cmdlen;
6934
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9246
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
9247
    (void) memcpy((void *) (gc->pc + 8), (void *) (&address), 4);
 
9248
    (void) memcpy((void *) (gc->pc + 12), (void *) (&matrix), 4);
 
9249
    (void) memcpy((void *) (gc->pc + 16), (void *) (&transform), 4);
 
9250
    gc->pc += cmdlen;
 
9251
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9252
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9253
    }
 
9254
}
 
9255
 
 
9256
#define X_GLrop_VertexAttrib1dvNV 4273
 
9257
void
 
9258
__indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
 
9259
{
 
9260
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9261
    const GLuint cmdlen = 16;
 
9262
    emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
 
9263
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9264
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
 
9265
    gc->pc += cmdlen;
 
9266
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9267
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9268
    }
 
9269
}
 
9270
 
 
9271
#define X_GLrop_VertexAttrib1dvNV 4273
 
9272
void
 
9273
__indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
 
9274
{
 
9275
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9276
    const GLuint cmdlen = 16;
 
9277
    emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
 
9278
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9279
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
 
9280
    gc->pc += cmdlen;
 
9281
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9282
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9283
    }
 
9284
}
 
9285
 
 
9286
#define X_GLrop_VertexAttrib1fvNV 4269
 
9287
void
 
9288
__indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
 
9289
{
 
9290
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9291
    const GLuint cmdlen = 12;
 
9292
    emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
 
9293
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9294
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
 
9295
    gc->pc += cmdlen;
 
9296
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9297
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9298
    }
 
9299
}
 
9300
 
 
9301
#define X_GLrop_VertexAttrib1fvNV 4269
 
9302
void
 
9303
__indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
 
9304
{
 
9305
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9306
    const GLuint cmdlen = 12;
 
9307
    emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
 
9308
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9309
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
 
9310
    gc->pc += cmdlen;
 
9311
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9312
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9313
    }
 
9314
}
 
9315
 
 
9316
#define X_GLrop_VertexAttrib1svNV 4265
 
9317
void
 
9318
__indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
 
9319
{
 
9320
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9321
    const GLuint cmdlen = 12;
 
9322
    emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
 
9323
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9324
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
 
9325
    gc->pc += cmdlen;
 
9326
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9327
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9328
    }
 
9329
}
 
9330
 
 
9331
#define X_GLrop_VertexAttrib1svNV 4265
 
9332
void
 
9333
__indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
 
9334
{
 
9335
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9336
    const GLuint cmdlen = 12;
 
9337
    emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
 
9338
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9339
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
 
9340
    gc->pc += cmdlen;
 
9341
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9342
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9343
    }
 
9344
}
 
9345
 
 
9346
#define X_GLrop_VertexAttrib2dvNV 4274
 
9347
void
 
9348
__indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
 
9349
{
 
9350
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9351
    const GLuint cmdlen = 24;
 
9352
    emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
 
9353
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9354
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
 
9355
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
 
9356
    gc->pc += cmdlen;
 
9357
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9358
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9359
    }
 
9360
}
 
9361
 
 
9362
#define X_GLrop_VertexAttrib2dvNV 4274
 
9363
void
 
9364
__indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
 
9365
{
 
9366
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9367
    const GLuint cmdlen = 24;
 
9368
    emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
 
9369
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9370
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
 
9371
    gc->pc += cmdlen;
 
9372
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9373
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9374
    }
 
9375
}
 
9376
 
 
9377
#define X_GLrop_VertexAttrib2fvNV 4270
 
9378
void
 
9379
__indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
 
9380
{
 
9381
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9382
    const GLuint cmdlen = 16;
 
9383
    emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
 
9384
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9385
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
 
9386
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
 
9387
    gc->pc += cmdlen;
 
9388
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9389
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9390
    }
 
9391
}
 
9392
 
 
9393
#define X_GLrop_VertexAttrib2fvNV 4270
 
9394
void
 
9395
__indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
 
9396
{
 
9397
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9398
    const GLuint cmdlen = 16;
 
9399
    emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
 
9400
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9401
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
 
9402
    gc->pc += cmdlen;
 
9403
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9404
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9405
    }
 
9406
}
 
9407
 
 
9408
#define X_GLrop_VertexAttrib2svNV 4266
 
9409
void
 
9410
__indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
 
9411
{
 
9412
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9413
    const GLuint cmdlen = 12;
 
9414
    emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
 
9415
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9416
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
 
9417
    (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
 
9418
    gc->pc += cmdlen;
 
9419
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9420
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9421
    }
 
9422
}
 
9423
 
 
9424
#define X_GLrop_VertexAttrib2svNV 4266
 
9425
void
 
9426
__indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
 
9427
{
 
9428
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9429
    const GLuint cmdlen = 12;
 
9430
    emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
 
9431
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9432
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
 
9433
    gc->pc += cmdlen;
 
9434
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9435
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9436
    }
 
9437
}
 
9438
 
 
9439
#define X_GLrop_VertexAttrib3dvNV 4275
 
9440
void
 
9441
__indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y,
 
9442
                              GLdouble z)
 
9443
{
 
9444
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9445
    const GLuint cmdlen = 32;
 
9446
    emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
 
9447
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9448
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
 
9449
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
 
9450
    (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
 
9451
    gc->pc += cmdlen;
 
9452
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9453
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9454
    }
 
9455
}
 
9456
 
 
9457
#define X_GLrop_VertexAttrib3dvNV 4275
 
9458
void
 
9459
__indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
 
9460
{
 
9461
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9462
    const GLuint cmdlen = 32;
 
9463
    emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
 
9464
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9465
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
 
9466
    gc->pc += cmdlen;
 
9467
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9468
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9469
    }
 
9470
}
 
9471
 
 
9472
#define X_GLrop_VertexAttrib3fvNV 4271
 
9473
void
 
9474
__indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
 
9475
{
 
9476
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9477
    const GLuint cmdlen = 20;
 
9478
    emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
 
9479
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9480
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
 
9481
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
 
9482
    (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
 
9483
    gc->pc += cmdlen;
 
9484
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9485
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9486
    }
 
9487
}
 
9488
 
 
9489
#define X_GLrop_VertexAttrib3fvNV 4271
 
9490
void
 
9491
__indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
 
9492
{
 
9493
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9494
    const GLuint cmdlen = 20;
 
9495
    emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
 
9496
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9497
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
 
9498
    gc->pc += cmdlen;
 
9499
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9500
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9501
    }
 
9502
}
 
9503
 
 
9504
#define X_GLrop_VertexAttrib3svNV 4267
 
9505
void
 
9506
__indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
 
9507
{
 
9508
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9509
    const GLuint cmdlen = 16;
 
9510
    emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
 
9511
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9512
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
 
9513
    (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
 
9514
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
 
9515
    gc->pc += cmdlen;
 
9516
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9517
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9518
    }
 
9519
}
 
9520
 
 
9521
#define X_GLrop_VertexAttrib3svNV 4267
 
9522
void
 
9523
__indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
 
9524
{
 
9525
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9526
    const GLuint cmdlen = 16;
 
9527
    emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
 
9528
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9529
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
 
9530
    gc->pc += cmdlen;
 
9531
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9532
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9533
    }
 
9534
}
 
9535
 
 
9536
#define X_GLrop_VertexAttrib4dvNV 4276
 
9537
void
 
9538
__indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y,
 
9539
                              GLdouble z, GLdouble w)
 
9540
{
 
9541
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9542
    const GLuint cmdlen = 40;
 
9543
    emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
 
9544
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9545
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
 
9546
    (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
 
9547
    (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
 
9548
    (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
 
9549
    gc->pc += cmdlen;
 
9550
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9551
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9552
    }
 
9553
}
 
9554
 
 
9555
#define X_GLrop_VertexAttrib4dvNV 4276
 
9556
void
 
9557
__indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
 
9558
{
 
9559
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9560
    const GLuint cmdlen = 40;
 
9561
    emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
 
9562
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9563
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
 
9564
    gc->pc += cmdlen;
 
9565
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9566
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9567
    }
 
9568
}
 
9569
 
 
9570
#define X_GLrop_VertexAttrib4fvNV 4272
 
9571
void
 
9572
__indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z,
 
9573
                              GLfloat w)
 
9574
{
 
9575
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9576
    const GLuint cmdlen = 24;
 
9577
    emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
 
9578
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9579
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
 
9580
    (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
 
9581
    (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
 
9582
    (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
 
9583
    gc->pc += cmdlen;
 
9584
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9585
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9586
    }
 
9587
}
 
9588
 
 
9589
#define X_GLrop_VertexAttrib4fvNV 4272
 
9590
void
 
9591
__indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
 
9592
{
 
9593
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9594
    const GLuint cmdlen = 24;
 
9595
    emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
 
9596
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9597
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
 
9598
    gc->pc += cmdlen;
 
9599
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9600
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9601
    }
 
9602
}
 
9603
 
 
9604
#define X_GLrop_VertexAttrib4svNV 4268
 
9605
void
 
9606
__indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z,
 
9607
                              GLshort w)
 
9608
{
 
9609
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9610
    const GLuint cmdlen = 16;
 
9611
    emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
 
9612
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9613
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
 
9614
    (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
 
9615
    (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
 
9616
    (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
 
9617
    gc->pc += cmdlen;
 
9618
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9619
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9620
    }
 
9621
}
 
9622
 
 
9623
#define X_GLrop_VertexAttrib4svNV 4268
 
9624
void
 
9625
__indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
 
9626
{
 
9627
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9628
    const GLuint cmdlen = 16;
 
9629
    emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
 
9630
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9631
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
 
9632
    gc->pc += cmdlen;
 
9633
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9634
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9635
    }
 
9636
}
 
9637
 
 
9638
#define X_GLrop_VertexAttrib4ubvNV 4277
 
9639
void
 
9640
__indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
 
9641
                               GLubyte w)
 
9642
{
 
9643
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9644
    const GLuint cmdlen = 12;
 
9645
    emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
 
9646
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9647
    (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
 
9648
    (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
 
9649
    (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
 
9650
    (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
 
9651
    gc->pc += cmdlen;
 
9652
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9653
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9654
    }
 
9655
}
 
9656
 
 
9657
#define X_GLrop_VertexAttrib4ubvNV 4277
 
9658
void
 
9659
__indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v)
 
9660
{
 
9661
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9662
    const GLuint cmdlen = 12;
 
9663
    emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
 
9664
    (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9665
    (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
 
9666
    gc->pc += cmdlen;
 
9667
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9668
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9669
    }
6935
9670
}
6936
9671
 
6937
9672
#define X_GLrop_VertexAttribs1dvNV 4210
6938
9673
void
6939
9674
__indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
6940
9675
{
6941
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9676
    __GLXcontext *const gc = __glXGetCurrentContext();
6942
9677
    const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
6943
9678
    if (__builtin_expect(n >= 0, 1)) {
6944
9679
        emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
6945
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6946
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
6947
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
 
9680
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9681
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9682
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
6948
9683
        gc->pc += cmdlen;
6949
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9684
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9685
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9686
        }
6950
9687
    }
6951
9688
}
6952
9689
 
6954
9691
void
6955
9692
__indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
6956
9693
{
6957
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9694
    __GLXcontext *const gc = __glXGetCurrentContext();
6958
9695
    const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
6959
9696
    if (__builtin_expect(n >= 0, 1)) {
6960
9697
        emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
6961
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6962
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
6963
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
 
9698
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9699
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9700
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
6964
9701
        gc->pc += cmdlen;
6965
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9702
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9703
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9704
        }
6966
9705
    }
6967
9706
}
6968
9707
 
6970
9709
void
6971
9710
__indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
6972
9711
{
6973
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9712
    __GLXcontext *const gc = __glXGetCurrentContext();
6974
9713
    const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
6975
9714
    if (__builtin_expect(n >= 0, 1)) {
6976
9715
        emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
6977
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6978
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
6979
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 2));
 
9716
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9717
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9718
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 2));
6980
9719
        gc->pc += cmdlen;
6981
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9720
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9721
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9722
        }
6982
9723
    }
6983
9724
}
6984
9725
 
6986
9727
void
6987
9728
__indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
6988
9729
{
6989
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9730
    __GLXcontext *const gc = __glXGetCurrentContext();
6990
9731
    const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
6991
9732
    if (__builtin_expect(n >= 0, 1)) {
6992
9733
        emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
6993
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6994
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
6995
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
 
9734
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9735
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9736
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
6996
9737
        gc->pc += cmdlen;
6997
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9738
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9739
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9740
        }
6998
9741
    }
6999
9742
}
7000
9743
 
7002
9745
void
7003
9746
__indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
7004
9747
{
7005
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9748
    __GLXcontext *const gc = __glXGetCurrentContext();
7006
9749
    const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
7007
9750
    if (__builtin_expect(n >= 0, 1)) {
7008
9751
        emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
7009
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7010
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7011
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
 
9752
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9753
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9754
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
7012
9755
        gc->pc += cmdlen;
7013
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9756
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9757
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9758
        }
7014
9759
    }
7015
9760
}
7016
9761
 
7018
9763
void
7019
9764
__indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
7020
9765
{
7021
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9766
    __GLXcontext *const gc = __glXGetCurrentContext();
7022
9767
    const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
7023
9768
    if (__builtin_expect(n >= 0, 1)) {
7024
9769
        emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
7025
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7026
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7027
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
 
9770
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9771
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9772
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
7028
9773
        gc->pc += cmdlen;
7029
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9774
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9775
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9776
        }
7030
9777
    }
7031
9778
}
7032
9779
 
7034
9781
void
7035
9782
__indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
7036
9783
{
7037
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9784
    __GLXcontext *const gc = __glXGetCurrentContext();
7038
9785
    const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
7039
9786
    if (__builtin_expect(n >= 0, 1)) {
7040
9787
        emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
7041
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7042
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7043
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 24));
 
9788
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9789
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9790
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 24));
7044
9791
        gc->pc += cmdlen;
7045
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9792
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9793
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9794
        }
7046
9795
    }
7047
9796
}
7048
9797
 
7050
9799
void
7051
9800
__indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
7052
9801
{
7053
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9802
    __GLXcontext *const gc = __glXGetCurrentContext();
7054
9803
    const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
7055
9804
    if (__builtin_expect(n >= 0, 1)) {
7056
9805
        emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
7057
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7058
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7059
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 12));
 
9806
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9807
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9808
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 12));
7060
9809
        gc->pc += cmdlen;
7061
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9810
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9811
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9812
        }
7062
9813
    }
7063
9814
}
7064
9815
 
7066
9817
void
7067
9818
__indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
7068
9819
{
7069
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9820
    __GLXcontext *const gc = __glXGetCurrentContext();
7070
9821
    const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
7071
9822
    if (__builtin_expect(n >= 0, 1)) {
7072
9823
        emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
7073
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7074
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7075
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 6));
 
9824
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9825
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9826
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 6));
7076
9827
        gc->pc += cmdlen;
7077
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9828
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9829
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9830
        }
7078
9831
    }
7079
9832
}
7080
9833
 
7082
9835
void
7083
9836
__indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
7084
9837
{
7085
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9838
    __GLXcontext *const gc = __glXGetCurrentContext();
7086
9839
    const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
7087
9840
    if (__builtin_expect(n >= 0, 1)) {
7088
9841
        emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
7089
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7090
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7091
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 32));
 
9842
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9843
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9844
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 32));
7092
9845
        gc->pc += cmdlen;
7093
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9846
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9847
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9848
        }
7094
9849
    }
7095
9850
}
7096
9851
 
7098
9853
void
7099
9854
__indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
7100
9855
{
7101
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9856
    __GLXcontext *const gc = __glXGetCurrentContext();
7102
9857
    const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
7103
9858
    if (__builtin_expect(n >= 0, 1)) {
7104
9859
        emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
7105
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7106
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7107
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
 
9860
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9861
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9862
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
7108
9863
        gc->pc += cmdlen;
7109
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9864
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9865
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9866
        }
7110
9867
    }
7111
9868
}
7112
9869
 
7114
9871
void
7115
9872
__indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
7116
9873
{
7117
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9874
    __GLXcontext *const gc = __glXGetCurrentContext();
7118
9875
    const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
7119
9876
    if (__builtin_expect(n >= 0, 1)) {
7120
9877
        emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
7121
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7122
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7123
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
 
9878
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9879
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9880
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
7124
9881
        gc->pc += cmdlen;
7125
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9882
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9883
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9884
        }
7126
9885
    }
7127
9886
}
7128
9887
 
7130
9889
void
7131
9890
__indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
7132
9891
{
7133
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9892
    __GLXcontext *const gc = __glXGetCurrentContext();
7134
9893
    const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
7135
9894
    if (__builtin_expect(n >= 0, 1)) {
7136
9895
        emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
7137
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7138
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7139
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
 
9896
        (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
 
9897
        (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
 
9898
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
7140
9899
        gc->pc += cmdlen;
7141
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9900
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9901
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9902
        }
7142
9903
    }
7143
9904
}
7144
9905
 
7146
9907
void
7147
9908
__indirect_glPointParameteriNV(GLenum pname, GLint param)
7148
9909
{
7149
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9910
    __GLXcontext *const gc = __glXGetCurrentContext();
7150
9911
    const GLuint cmdlen = 12;
7151
9912
    emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
7152
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
7153
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
 
9913
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
9914
    (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
7154
9915
    gc->pc += cmdlen;
7155
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9916
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9917
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9918
    }
7156
9919
}
7157
9920
 
7158
9921
#define X_GLrop_PointParameterivNV 4222
7159
9922
void
7160
9923
__indirect_glPointParameterivNV(GLenum pname, const GLint * params)
7161
9924
{
7162
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9925
    __GLXcontext *const gc = __glXGetCurrentContext();
7163
9926
    const GLuint compsize = __glPointParameterivNV_size(pname);
7164
9927
    const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
7165
9928
    emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
7166
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
7167
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
 
9929
    (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
 
9930
    (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
7168
9931
    gc->pc += cmdlen;
7169
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
9932
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9933
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9934
    }
7170
9935
}
7171
9936
 
7172
9937
#define X_GLrop_ActiveStencilFaceEXT 4220
7173
9938
void
7174
9939
__indirect_glActiveStencilFaceEXT(GLenum face)
7175
9940
{
7176
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
9941
    __GLXcontext *const gc = __glXGetCurrentContext();
7177
9942
    const GLuint cmdlen = 8;
7178
9943
    emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
7179
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
7180
 
    gc->pc += cmdlen;
7181
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7182
 
}
7183
 
 
7184
 
#define X_GLrop_VertexAttrib4bvARB 4230
7185
 
void
7186
 
__indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v)
7187
 
{
7188
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7189
 
    const GLuint cmdlen = 12;
7190
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
7191
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7192
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
7193
 
    gc->pc += cmdlen;
7194
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7195
 
}
7196
 
 
7197
 
#define X_GLrop_VertexAttrib4ivARB 4231
7198
 
void
7199
 
__indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
7200
 
{
7201
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7202
 
    const GLuint cmdlen = 24;
7203
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
7204
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7205
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7206
 
    gc->pc += cmdlen;
7207
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7208
 
}
7209
 
 
7210
 
#define X_GLrop_VertexAttrib4ubvARB 4232
7211
 
void
7212
 
__indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v)
7213
 
{
7214
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7215
 
    const GLuint cmdlen = 12;
7216
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
7217
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7218
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
7219
 
    gc->pc += cmdlen;
7220
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7221
 
}
7222
 
 
7223
 
#define X_GLrop_VertexAttrib4usvARB 4233
7224
 
void
7225
 
__indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
7226
 
{
7227
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7228
 
    const GLuint cmdlen = 16;
7229
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
7230
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7231
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7232
 
    gc->pc += cmdlen;
7233
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7234
 
}
7235
 
 
7236
 
#define X_GLrop_VertexAttrib4uivARB 4234
7237
 
void
7238
 
__indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
7239
 
{
7240
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7241
 
    const GLuint cmdlen = 24;
7242
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
7243
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7244
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7245
 
    gc->pc += cmdlen;
7246
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7247
 
}
7248
 
 
7249
 
#define X_GLrop_VertexAttrib4NbvARB 4235
7250
 
void
7251
 
__indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v)
7252
 
{
7253
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7254
 
    const GLuint cmdlen = 12;
7255
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
7256
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7257
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
7258
 
    gc->pc += cmdlen;
7259
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7260
 
}
7261
 
 
7262
 
#define X_GLrop_VertexAttrib4NsvARB 4236
7263
 
void
7264
 
__indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
7265
 
{
7266
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7267
 
    const GLuint cmdlen = 16;
7268
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
7269
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7270
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7271
 
    gc->pc += cmdlen;
7272
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7273
 
}
7274
 
 
7275
 
#define X_GLrop_VertexAttrib4NivARB 4237
7276
 
void
7277
 
__indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
7278
 
{
7279
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7280
 
    const GLuint cmdlen = 24;
7281
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
7282
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7283
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7284
 
    gc->pc += cmdlen;
7285
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7286
 
}
7287
 
 
7288
 
#define X_GLrop_VertexAttrib4NusvARB 4238
7289
 
void
7290
 
__indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
7291
 
{
7292
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7293
 
    const GLuint cmdlen = 16;
7294
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
7295
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7296
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7297
 
    gc->pc += cmdlen;
7298
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7299
 
}
7300
 
 
7301
 
#define X_GLrop_VertexAttrib4NuivARB 4239
7302
 
void
7303
 
__indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
7304
 
{
7305
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7306
 
    const GLuint cmdlen = 24;
7307
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
7308
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7309
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7310
 
    gc->pc += cmdlen;
7311
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7312
 
}
7313
 
 
7314
 
#define X_GLrop_ProgramStringARB 4217
7315
 
void
7316
 
__indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string)
7317
 
{
7318
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7319
 
    const GLuint cmdlen = 16 + __GLX_PAD(len);
7320
 
    if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
7321
 
        if (cmdlen <= gc->maxSmallRenderCommandSize) {
7322
 
            if ( (gc->pc + cmdlen) > gc->bufEnd ) {
7323
 
                (void) __glXFlushRenderBuffer(gc, gc->pc);
7324
 
            }
7325
 
            emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
7326
 
            (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7327
 
            (void) memcpy((void *)(gc->pc + 8), (void *)(&format), 4);
7328
 
            (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
7329
 
            (void) memcpy((void *)(gc->pc + 16), (void *)(string), len);
7330
 
            gc->pc += cmdlen;
7331
 
            if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7332
 
        }
7333
 
        else {
7334
 
            const GLint op = X_GLrop_ProgramStringARB;
7335
 
            const GLuint cmdlenLarge = cmdlen + 4;
7336
 
            GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
7337
 
            (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
7338
 
            (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
7339
 
            (void) memcpy((void *)(pc + 8), (void *)(&target), 4);
7340
 
            (void) memcpy((void *)(pc + 12), (void *)(&format), 4);
7341
 
            (void) memcpy((void *)(pc + 16), (void *)(&len), 4);
7342
 
            __glXSendLargeCommand(gc, pc, 20, string, len);
7343
 
        }
7344
 
    }
7345
 
}
7346
 
 
7347
 
#define X_GLrop_ProgramEnvParameter4dvARB 4185
7348
 
void
7349
 
__indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
7350
 
{
7351
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7352
 
    const GLuint cmdlen = 44;
7353
 
    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7354
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7355
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7356
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
7357
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
7358
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
7359
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
7360
 
    gc->pc += cmdlen;
7361
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7362
 
}
7363
 
 
7364
 
#define X_GLrop_ProgramEnvParameter4dvARB 4185
7365
 
void
7366
 
__indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
7367
 
{
7368
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7369
 
    const GLuint cmdlen = 44;
7370
 
    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7371
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7372
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7373
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
7374
 
    gc->pc += cmdlen;
7375
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7376
 
}
7377
 
 
7378
 
#define X_GLrop_ProgramEnvParameter4fvARB 4184
7379
 
void
7380
 
__indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
7381
 
{
7382
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7383
 
    const GLuint cmdlen = 28;
7384
 
    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7385
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7386
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7387
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
7388
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
7389
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
7390
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
7391
 
    gc->pc += cmdlen;
7392
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7393
 
}
7394
 
 
7395
 
#define X_GLrop_ProgramEnvParameter4fvARB 4184
7396
 
void
7397
 
__indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
7398
 
{
7399
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7400
 
    const GLuint cmdlen = 28;
7401
 
    emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7402
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7403
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7404
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
7405
 
    gc->pc += cmdlen;
7406
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7407
 
}
7408
 
 
7409
 
#define X_GLrop_ProgramLocalParameter4dvARB 4216
7410
 
void
7411
 
__indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
7412
 
{
7413
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7414
 
    const GLuint cmdlen = 44;
7415
 
    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7416
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7417
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7418
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
7419
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
7420
 
    (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
7421
 
    (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
7422
 
    gc->pc += cmdlen;
7423
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7424
 
}
7425
 
 
7426
 
#define X_GLrop_ProgramLocalParameter4dvARB 4216
7427
 
void
7428
 
__indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
7429
 
{
7430
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7431
 
    const GLuint cmdlen = 44;
7432
 
    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7433
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7434
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7435
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
7436
 
    gc->pc += cmdlen;
7437
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7438
 
}
7439
 
 
7440
 
#define X_GLrop_ProgramLocalParameter4fvARB 4215
7441
 
void
7442
 
__indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
7443
 
{
7444
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7445
 
    const GLuint cmdlen = 28;
7446
 
    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7447
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7448
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7449
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
7450
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
7451
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
7452
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
7453
 
    gc->pc += cmdlen;
7454
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7455
 
}
7456
 
 
7457
 
#define X_GLrop_ProgramLocalParameter4fvARB 4215
7458
 
void
7459
 
__indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
7460
 
{
7461
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7462
 
    const GLuint cmdlen = 28;
7463
 
    emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7464
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7465
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7466
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
7467
 
    gc->pc += cmdlen;
7468
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7469
 
}
7470
 
 
7471
 
#define X_GLvop_GetProgramivARB 1307
7472
 
void
7473
 
__indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
7474
 
{
7475
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7476
 
    Display * const dpy = gc->currentDpy;
7477
 
    const GLuint cmdlen = 8;
7478
 
    if (__builtin_expect(dpy != NULL, 1)) {
7479
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivARB, cmdlen);
7480
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7481
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7482
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7483
 
        UnlockDisplay(dpy); SyncHandle();
7484
 
    }
7485
 
    return;
7486
 
}
7487
 
 
7488
 
#define X_GLvop_GetProgramStringARB 1308
7489
 
void
7490
 
__indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
7491
 
{
7492
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7493
 
    Display * const dpy = gc->currentDpy;
7494
 
    const GLuint cmdlen = 8;
7495
 
    if (__builtin_expect(dpy != NULL, 1)) {
7496
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringARB, cmdlen);
7497
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7498
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7499
 
        (void) __glXReadReply(dpy, 1, string, GL_TRUE);
7500
 
        UnlockDisplay(dpy); SyncHandle();
7501
 
    }
7502
 
    return;
7503
 
}
7504
 
 
7505
 
#define X_GLrop_ProgramNamedParameter4fvNV 4218
7506
 
void
7507
 
__indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
7508
 
{
7509
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7510
 
    const GLuint cmdlen = 28 + __GLX_PAD(len);
7511
 
    if (__builtin_expect(len >= 0, 1)) {
7512
 
        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
7513
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
7514
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
7515
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
7516
 
        (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
7517
 
        (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
7518
 
        (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
7519
 
        (void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
7520
 
        gc->pc += cmdlen;
7521
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7522
 
    }
7523
 
}
7524
 
 
7525
 
#define X_GLrop_ProgramNamedParameter4dvNV 4219
7526
 
void
7527
 
__indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
7528
 
{
7529
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7530
 
    const GLuint cmdlen = 44 + __GLX_PAD(len);
7531
 
    if (__builtin_expect(len >= 0, 1)) {
7532
 
        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
7533
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
7534
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
7535
 
        (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
7536
 
        (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
7537
 
        (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
7538
 
        (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
7539
 
        (void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
7540
 
        gc->pc += cmdlen;
7541
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7542
 
    }
7543
 
}
7544
 
 
7545
 
#define X_GLrop_ProgramNamedParameter4fvNV 4218
7546
 
void
7547
 
__indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v)
7548
 
{
7549
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7550
 
    const GLuint cmdlen = 28 + __GLX_PAD(len);
7551
 
    if (__builtin_expect(len >= 0, 1)) {
7552
 
        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
7553
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
7554
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
7555
 
        (void) memcpy((void *)(gc->pc + 12), (void *)(v), 16);
7556
 
        (void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
7557
 
        gc->pc += cmdlen;
7558
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7559
 
    }
7560
 
}
7561
 
 
7562
 
#define X_GLrop_ProgramNamedParameter4dvNV 4219
7563
 
void
7564
 
__indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v)
7565
 
{
7566
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7567
 
    const GLuint cmdlen = 44 + __GLX_PAD(len);
7568
 
    if (__builtin_expect(len >= 0, 1)) {
7569
 
        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
7570
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
7571
 
        (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
7572
 
        (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
7573
 
        (void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
7574
 
        gc->pc += cmdlen;
7575
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7576
 
    }
 
9944
    (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
 
9945
    gc->pc += cmdlen;
 
9946
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
9947
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
9948
    }
 
9949
}
 
9950
 
 
9951
#define X_GLvop_GetProgramNamedParameterdvNV 1311
 
9952
void
 
9953
__indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
 
9954
                                          const GLubyte * name,
 
9955
                                          GLdouble * params)
 
9956
{
 
9957
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9958
    Display *const dpy = gc->currentDpy;
 
9959
    const GLuint cmdlen = 8 + __GLX_PAD(len);
 
9960
    if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
 
9961
        GLubyte const *pc =
 
9962
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
9963
                                    X_GLvop_GetProgramNamedParameterdvNV,
 
9964
                                    cmdlen);
 
9965
        (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
 
9966
        (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
 
9967
        (void) memcpy((void *) (pc + 8), (void *) (name), len);
 
9968
        (void) __glXReadReply(dpy, 8, params, GL_TRUE);
 
9969
        UnlockDisplay(dpy);
 
9970
        SyncHandle();
 
9971
    }
 
9972
    return;
7577
9973
}
7578
9974
 
7579
9975
#define X_GLvop_GetProgramNamedParameterfvNV 1310
7580
9976
void
7581
 
__indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params)
 
9977
__indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
 
9978
                                          const GLubyte * name,
 
9979
                                          GLfloat * params)
7582
9980
{
7583
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7584
 
    Display * const dpy = gc->currentDpy;
 
9981
    __GLXcontext *const gc = __glXGetCurrentContext();
 
9982
    Display *const dpy = gc->currentDpy;
7585
9983
    const GLuint cmdlen = 8 + __GLX_PAD(len);
7586
9984
    if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
7587
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterfvNV, cmdlen);
7588
 
        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
7589
 
        (void) memcpy((void *)(pc + 4), (void *)(&len), 4);
7590
 
        (void) memcpy((void *)(pc + 8), (void *)(name), len);
 
9985
        GLubyte const *pc =
 
9986
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
9987
                                    X_GLvop_GetProgramNamedParameterfvNV,
 
9988
                                    cmdlen);
 
9989
        (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
 
9990
        (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
 
9991
        (void) memcpy((void *) (pc + 8), (void *) (name), len);
7591
9992
        (void) __glXReadReply(dpy, 4, params, GL_TRUE);
7592
 
        UnlockDisplay(dpy); SyncHandle();
7593
 
    }
7594
 
    return;
7595
 
}
7596
 
 
7597
 
#define X_GLvop_GetProgramNamedParameterdvNV 1311
7598
 
void
7599
 
__indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params)
7600
 
{
7601
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7602
 
    Display * const dpy = gc->currentDpy;
7603
 
    const GLuint cmdlen = 8 + __GLX_PAD(len);
7604
 
    if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
7605
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterdvNV, cmdlen);
7606
 
        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
7607
 
        (void) memcpy((void *)(pc + 4), (void *)(&len), 4);
7608
 
        (void) memcpy((void *)(pc + 8), (void *)(name), len);
7609
 
        (void) __glXReadReply(dpy, 8, params, GL_TRUE);
7610
 
        UnlockDisplay(dpy); SyncHandle();
7611
 
    }
7612
 
    return;
7613
 
}
7614
 
 
7615
 
#define X_GLsop_GenQueriesARB 162
7616
 
void
7617
 
__indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
7618
 
{
7619
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7620
 
    Display * const dpy = gc->currentDpy;
7621
 
    const GLuint cmdlen = 4;
7622
 
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7623
 
#ifdef USE_XCB
7624
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
7625
 
        (void) __glXFlushRenderBuffer(gc, gc->pc);
7626
 
        XCBGlxGenQueriesARBRep *reply = XCBGlxGenQueriesARBReply(c, XCBGlxGenQueriesARB(c, gc->currentContextTag, n), NULL);
7627
 
        (void)memcpy(ids, XCBGlxGenQueriesARBData(reply), XCBGlxGenQueriesARBDataLength(reply) * sizeof(GLuint));
7628
 
        free(reply);
7629
 
#else
7630
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
7631
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7632
 
        (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
7633
 
        UnlockDisplay(dpy); SyncHandle();
7634
 
#endif /* USE_XCB */
7635
 
    }
7636
 
    return;
7637
 
}
7638
 
 
7639
 
#define X_GLsop_DeleteQueriesARB 161
7640
 
void
7641
 
__indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
7642
 
{
7643
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7644
 
    Display * const dpy = gc->currentDpy;
7645
 
    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
7646
 
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7647
 
#ifdef USE_XCB
7648
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
7649
 
        (void) __glXFlushRenderBuffer(gc, gc->pc);
7650
 
        XCBGlxDeleteQueriesARB(c, gc->currentContextTag, n, ids);
7651
 
#else
7652
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
7653
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7654
 
        (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4));
7655
 
        UnlockDisplay(dpy); SyncHandle();
7656
 
#endif /* USE_XCB */
7657
 
    }
7658
 
    return;
7659
 
}
7660
 
 
7661
 
#define X_GLsop_IsQueryARB 163
7662
 
GLboolean
7663
 
__indirect_glIsQueryARB(GLuint id)
7664
 
{
7665
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7666
 
    Display * const dpy = gc->currentDpy;
7667
 
    GLboolean retval = (GLboolean) 0;
7668
 
    const GLuint cmdlen = 4;
7669
 
    if (__builtin_expect(dpy != NULL, 1)) {
7670
 
#ifdef USE_XCB
7671
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
7672
 
        (void) __glXFlushRenderBuffer(gc, gc->pc);
7673
 
        XCBGlxIsQueryARBRep *reply = XCBGlxIsQueryARBReply(c, XCBGlxIsQueryARB(c, gc->currentContextTag, id), NULL);
7674
 
        retval = reply->ret_val;
7675
 
        free(reply);
7676
 
#else
7677
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
7678
 
        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
7679
 
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
7680
 
        UnlockDisplay(dpy); SyncHandle();
7681
 
#endif /* USE_XCB */
7682
 
    }
7683
 
    return retval;
7684
 
}
7685
 
 
7686
 
#define X_GLrop_BeginQueryARB 231
7687
 
void
7688
 
__indirect_glBeginQueryARB(GLenum target, GLuint id)
7689
 
{
7690
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7691
 
    const GLuint cmdlen = 12;
7692
 
    emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
7693
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7694
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
7695
 
    gc->pc += cmdlen;
7696
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7697
 
}
7698
 
 
7699
 
#define X_GLrop_EndQueryARB 232
7700
 
void
7701
 
__indirect_glEndQueryARB(GLenum target)
7702
 
{
7703
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7704
 
    const GLuint cmdlen = 8;
7705
 
    emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
7706
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7707
 
    gc->pc += cmdlen;
7708
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7709
 
}
7710
 
 
7711
 
#define X_GLsop_GetQueryivARB 164
7712
 
void
7713
 
__indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
7714
 
{
7715
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7716
 
    Display * const dpy = gc->currentDpy;
7717
 
    const GLuint cmdlen = 8;
7718
 
    if (__builtin_expect(dpy != NULL, 1)) {
7719
 
#ifdef USE_XCB
7720
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
7721
 
        (void) __glXFlushRenderBuffer(gc, gc->pc);
7722
 
        XCBGlxGetQueryivARBRep *reply = XCBGlxGetQueryivARBReply(c, XCBGlxGetQueryivARB(c, gc->currentContextTag, target, pname), NULL);
7723
 
        if (XCBGlxGetQueryivARBDataLength(reply) == 0)
7724
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
7725
 
        else
7726
 
        (void)memcpy(params, XCBGlxGetQueryivARBData(reply), XCBGlxGetQueryivARBDataLength(reply) * sizeof(GLint));
7727
 
        free(reply);
7728
 
#else
7729
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
7730
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7731
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7732
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7733
 
        UnlockDisplay(dpy); SyncHandle();
7734
 
#endif /* USE_XCB */
7735
 
    }
7736
 
    return;
7737
 
}
7738
 
 
7739
 
#define X_GLsop_GetQueryObjectivARB 165
7740
 
void
7741
 
__indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
7742
 
{
7743
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7744
 
    Display * const dpy = gc->currentDpy;
7745
 
    const GLuint cmdlen = 8;
7746
 
    if (__builtin_expect(dpy != NULL, 1)) {
7747
 
#ifdef USE_XCB
7748
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
7749
 
        (void) __glXFlushRenderBuffer(gc, gc->pc);
7750
 
        XCBGlxGetQueryObjectivARBRep *reply = XCBGlxGetQueryObjectivARBReply(c, XCBGlxGetQueryObjectivARB(c, gc->currentContextTag, id, pname), NULL);
7751
 
        if (XCBGlxGetQueryObjectivARBDataLength(reply) == 0)
7752
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
7753
 
        else
7754
 
        (void)memcpy(params, XCBGlxGetQueryObjectivARBData(reply), XCBGlxGetQueryObjectivARBDataLength(reply) * sizeof(GLint));
7755
 
        free(reply);
7756
 
#else
7757
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
7758
 
        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
7759
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7760
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7761
 
        UnlockDisplay(dpy); SyncHandle();
7762
 
#endif /* USE_XCB */
7763
 
    }
7764
 
    return;
7765
 
}
7766
 
 
7767
 
#define X_GLsop_GetQueryObjectuivARB 166
7768
 
void
7769
 
__indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
7770
 
{
7771
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7772
 
    Display * const dpy = gc->currentDpy;
7773
 
    const GLuint cmdlen = 8;
7774
 
    if (__builtin_expect(dpy != NULL, 1)) {
7775
 
#ifdef USE_XCB
7776
 
        XCBConnection *c = XCBConnectionOfDisplay(dpy);
7777
 
        (void) __glXFlushRenderBuffer(gc, gc->pc);
7778
 
        XCBGlxGetQueryObjectuivARBRep *reply = XCBGlxGetQueryObjectuivARBReply(c, XCBGlxGetQueryObjectuivARB(c, gc->currentContextTag, id, pname), NULL);
7779
 
        if (XCBGlxGetQueryObjectuivARBDataLength(reply) == 0)
7780
 
            (void)memcpy(params, &reply->datum, sizeof(reply->datum));
7781
 
        else
7782
 
        (void)memcpy(params, XCBGlxGetQueryObjectuivARBData(reply), XCBGlxGetQueryObjectuivARBDataLength(reply) * sizeof(GLuint));
7783
 
        free(reply);
7784
 
#else
7785
 
        GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
7786
 
        (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
7787
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7788
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7789
 
        UnlockDisplay(dpy); SyncHandle();
7790
 
#endif /* USE_XCB */
7791
 
    }
7792
 
    return;
7793
 
}
7794
 
 
7795
 
#define X_GLvop_GetVertexAttribdvNV 1301
7796
 
void
7797
 
__indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params)
7798
 
{
7799
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7800
 
    Display * const dpy = gc->currentDpy;
7801
 
    const GLuint cmdlen = 8;
7802
 
    if (__builtin_expect(dpy != NULL, 1)) {
7803
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribdvNV, cmdlen);
7804
 
        (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
7805
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7806
 
        (void) __glXReadReply(dpy, 8, params, GL_FALSE);
7807
 
        UnlockDisplay(dpy); SyncHandle();
7808
 
    }
7809
 
    return;
7810
 
}
7811
 
 
7812
 
#define X_GLvop_GetVertexAttribfvNV 1302
7813
 
void
7814
 
__indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
7815
 
{
7816
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7817
 
    Display * const dpy = gc->currentDpy;
7818
 
    const GLuint cmdlen = 8;
7819
 
    if (__builtin_expect(dpy != NULL, 1)) {
7820
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribfvNV, cmdlen);
7821
 
        (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
7822
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7823
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7824
 
        UnlockDisplay(dpy); SyncHandle();
7825
 
    }
7826
 
    return;
7827
 
}
7828
 
 
7829
 
#define X_GLvop_GetVertexAttribivNV 1303
7830
 
void
7831
 
__indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
7832
 
{
7833
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7834
 
    Display * const dpy = gc->currentDpy;
7835
 
    const GLuint cmdlen = 8;
7836
 
    if (__builtin_expect(dpy != NULL, 1)) {
7837
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribivNV, cmdlen);
7838
 
        (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
7839
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7840
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7841
 
        UnlockDisplay(dpy); SyncHandle();
7842
 
    }
7843
 
    return;
7844
 
}
7845
 
 
7846
 
#define X_GLrop_VertexAttrib1dvNV 4197
7847
 
void
7848
 
__indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
7849
 
{
7850
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7851
 
    const GLuint cmdlen = 16;
7852
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
7853
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7854
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
7855
 
    gc->pc += cmdlen;
7856
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7857
 
}
7858
 
 
7859
 
#define X_GLrop_VertexAttrib1dvNV 4197
7860
 
void
7861
 
__indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
7862
 
{
7863
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7864
 
    const GLuint cmdlen = 16;
7865
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
7866
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7867
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7868
 
    gc->pc += cmdlen;
7869
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7870
 
}
7871
 
 
7872
 
#define X_GLrop_VertexAttrib1fvNV 4193
7873
 
void
7874
 
__indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
7875
 
{
7876
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7877
 
    const GLuint cmdlen = 12;
7878
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
7879
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7880
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7881
 
    gc->pc += cmdlen;
7882
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7883
 
}
7884
 
 
7885
 
#define X_GLrop_VertexAttrib1fvNV 4193
7886
 
void
7887
 
__indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
7888
 
{
7889
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7890
 
    const GLuint cmdlen = 12;
7891
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
7892
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7893
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
7894
 
    gc->pc += cmdlen;
7895
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7896
 
}
7897
 
 
7898
 
#define X_GLrop_VertexAttrib1svNV 4189
7899
 
void
7900
 
__indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
7901
 
{
7902
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7903
 
    const GLuint cmdlen = 12;
7904
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
7905
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7906
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
7907
 
    gc->pc += cmdlen;
7908
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7909
 
}
7910
 
 
7911
 
#define X_GLrop_VertexAttrib1svNV 4189
7912
 
void
7913
 
__indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
7914
 
{
7915
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7916
 
    const GLuint cmdlen = 12;
7917
 
    emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
7918
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7919
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
7920
 
    gc->pc += cmdlen;
7921
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7922
 
}
7923
 
 
7924
 
#define X_GLrop_VertexAttrib2dvNV 4198
7925
 
void
7926
 
__indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
7927
 
{
7928
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7929
 
    const GLuint cmdlen = 24;
7930
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
7931
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7932
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
7933
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
7934
 
    gc->pc += cmdlen;
7935
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7936
 
}
7937
 
 
7938
 
#define X_GLrop_VertexAttrib2dvNV 4198
7939
 
void
7940
 
__indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
7941
 
{
7942
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7943
 
    const GLuint cmdlen = 24;
7944
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
7945
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7946
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7947
 
    gc->pc += cmdlen;
7948
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7949
 
}
7950
 
 
7951
 
#define X_GLrop_VertexAttrib2fvNV 4194
7952
 
void
7953
 
__indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
7954
 
{
7955
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7956
 
    const GLuint cmdlen = 16;
7957
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
7958
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7959
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7960
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
7961
 
    gc->pc += cmdlen;
7962
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7963
 
}
7964
 
 
7965
 
#define X_GLrop_VertexAttrib2fvNV 4194
7966
 
void
7967
 
__indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
7968
 
{
7969
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7970
 
    const GLuint cmdlen = 16;
7971
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
7972
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7973
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7974
 
    gc->pc += cmdlen;
7975
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7976
 
}
7977
 
 
7978
 
#define X_GLrop_VertexAttrib2svNV 4190
7979
 
void
7980
 
__indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
7981
 
{
7982
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7983
 
    const GLuint cmdlen = 12;
7984
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
7985
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7986
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
7987
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
7988
 
    gc->pc += cmdlen;
7989
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7990
 
}
7991
 
 
7992
 
#define X_GLrop_VertexAttrib2svNV 4190
7993
 
void
7994
 
__indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
7995
 
{
7996
 
    __GLXcontext * const gc = __glXGetCurrentContext();
7997
 
    const GLuint cmdlen = 12;
7998
 
    emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
7999
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8000
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
8001
 
    gc->pc += cmdlen;
8002
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8003
 
}
8004
 
 
8005
 
#define X_GLrop_VertexAttrib3dvNV 4199
8006
 
void
8007
 
__indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
8008
 
{
8009
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8010
 
    const GLuint cmdlen = 32;
8011
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
8012
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8013
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
8014
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
8015
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
8016
 
    gc->pc += cmdlen;
8017
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8018
 
}
8019
 
 
8020
 
#define X_GLrop_VertexAttrib3dvNV 4199
8021
 
void
8022
 
__indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
8023
 
{
8024
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8025
 
    const GLuint cmdlen = 32;
8026
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
8027
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8028
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 24);
8029
 
    gc->pc += cmdlen;
8030
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8031
 
}
8032
 
 
8033
 
#define X_GLrop_VertexAttrib3fvNV 4195
8034
 
void
8035
 
__indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
8036
 
{
8037
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8038
 
    const GLuint cmdlen = 20;
8039
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
8040
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8041
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
8042
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
8043
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
8044
 
    gc->pc += cmdlen;
8045
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8046
 
}
8047
 
 
8048
 
#define X_GLrop_VertexAttrib3fvNV 4195
8049
 
void
8050
 
__indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
8051
 
{
8052
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8053
 
    const GLuint cmdlen = 20;
8054
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
8055
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8056
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
8057
 
    gc->pc += cmdlen;
8058
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8059
 
}
8060
 
 
8061
 
#define X_GLrop_VertexAttrib3svNV 4191
8062
 
void
8063
 
__indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
8064
 
{
8065
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8066
 
    const GLuint cmdlen = 16;
8067
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
8068
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8069
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
8070
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
8071
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
8072
 
    gc->pc += cmdlen;
8073
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8074
 
}
8075
 
 
8076
 
#define X_GLrop_VertexAttrib3svNV 4191
8077
 
void
8078
 
__indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
8079
 
{
8080
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8081
 
    const GLuint cmdlen = 16;
8082
 
    emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
8083
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8084
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
8085
 
    gc->pc += cmdlen;
8086
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8087
 
}
8088
 
 
8089
 
#define X_GLrop_VertexAttrib4dvNV 4200
8090
 
void
8091
 
__indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
8092
 
{
8093
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8094
 
    const GLuint cmdlen = 40;
8095
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
8096
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8097
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
8098
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
8099
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
8100
 
    (void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8);
8101
 
    gc->pc += cmdlen;
8102
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8103
 
}
8104
 
 
8105
 
#define X_GLrop_VertexAttrib4dvNV 4200
8106
 
void
8107
 
__indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
8108
 
{
8109
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8110
 
    const GLuint cmdlen = 40;
8111
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
8112
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8113
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 32);
8114
 
    gc->pc += cmdlen;
8115
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8116
 
}
8117
 
 
8118
 
#define X_GLrop_VertexAttrib4fvNV 4196
8119
 
void
8120
 
__indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
8121
 
{
8122
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8123
 
    const GLuint cmdlen = 24;
8124
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
8125
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8126
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
8127
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
8128
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
8129
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
8130
 
    gc->pc += cmdlen;
8131
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8132
 
}
8133
 
 
8134
 
#define X_GLrop_VertexAttrib4fvNV 4196
8135
 
void
8136
 
__indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
8137
 
{
8138
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8139
 
    const GLuint cmdlen = 24;
8140
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
8141
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8142
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
8143
 
    gc->pc += cmdlen;
8144
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8145
 
}
8146
 
 
8147
 
#define X_GLrop_VertexAttrib4svNV 4192
8148
 
void
8149
 
__indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
8150
 
{
8151
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8152
 
    const GLuint cmdlen = 16;
8153
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
8154
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8155
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
8156
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
8157
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
8158
 
    (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
8159
 
    gc->pc += cmdlen;
8160
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8161
 
}
8162
 
 
8163
 
#define X_GLrop_VertexAttrib4svNV 4192
8164
 
void
8165
 
__indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
8166
 
{
8167
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8168
 
    const GLuint cmdlen = 16;
8169
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
8170
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8171
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
8172
 
    gc->pc += cmdlen;
8173
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8174
 
}
8175
 
 
8176
 
#define X_GLrop_VertexAttrib4ubvNV 4201
8177
 
void
8178
 
__indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
8179
 
{
8180
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8181
 
    const GLuint cmdlen = 12;
8182
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
8183
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8184
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
8185
 
    (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
8186
 
    (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
8187
 
    (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
8188
 
    gc->pc += cmdlen;
8189
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8190
 
}
8191
 
 
8192
 
#define X_GLrop_VertexAttrib4ubvNV 4201
8193
 
void
8194
 
__indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v)
8195
 
{
8196
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8197
 
    const GLuint cmdlen = 12;
8198
 
    emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
8199
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8200
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
8201
 
    gc->pc += cmdlen;
8202
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8203
 
}
8204
 
 
8205
 
#define X_GLvop_IsRenderbufferEXT 1422
8206
 
GLboolean
8207
 
__indirect_glIsRenderbufferEXT(GLuint renderbuffer)
8208
 
{
8209
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8210
 
    Display * const dpy = gc->currentDpy;
8211
 
    GLboolean retval = (GLboolean) 0;
8212
 
    const GLuint cmdlen = 4;
8213
 
    if (__builtin_expect(dpy != NULL, 1)) {
8214
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsRenderbufferEXT, cmdlen);
8215
 
        (void) memcpy((void *)(pc + 0), (void *)(&renderbuffer), 4);
8216
 
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8217
 
        UnlockDisplay(dpy); SyncHandle();
8218
 
    }
8219
 
    return retval;
 
9993
        UnlockDisplay(dpy);
 
9994
        SyncHandle();
 
9995
    }
 
9996
    return;
 
9997
}
 
9998
 
 
9999
#define X_GLrop_ProgramNamedParameter4dvNV 4219
 
10000
void
 
10001
__indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
 
10002
                                       const GLubyte * name, GLdouble x,
 
10003
                                       GLdouble y, GLdouble z, GLdouble w)
 
10004
{
 
10005
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10006
    const GLuint cmdlen = 44 + __GLX_PAD(len);
 
10007
    if (__builtin_expect(len >= 0, 1)) {
 
10008
        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
 
10009
        (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
 
10010
        (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
 
10011
        (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
 
10012
        (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
 
10013
        (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
 
10014
        (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
 
10015
        (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
 
10016
        gc->pc += cmdlen;
 
10017
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10018
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10019
        }
 
10020
    }
 
10021
}
 
10022
 
 
10023
#define X_GLrop_ProgramNamedParameter4dvNV 4219
 
10024
void
 
10025
__indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
 
10026
                                        const GLubyte * name,
 
10027
                                        const GLdouble * v)
 
10028
{
 
10029
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10030
    const GLuint cmdlen = 44 + __GLX_PAD(len);
 
10031
    if (__builtin_expect(len >= 0, 1)) {
 
10032
        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
 
10033
        (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
 
10034
        (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
 
10035
        (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
 
10036
        (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
 
10037
        gc->pc += cmdlen;
 
10038
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10039
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10040
        }
 
10041
    }
 
10042
}
 
10043
 
 
10044
#define X_GLrop_ProgramNamedParameter4fvNV 4218
 
10045
void
 
10046
__indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
 
10047
                                       const GLubyte * name, GLfloat x,
 
10048
                                       GLfloat y, GLfloat z, GLfloat w)
 
10049
{
 
10050
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10051
    const GLuint cmdlen = 28 + __GLX_PAD(len);
 
10052
    if (__builtin_expect(len >= 0, 1)) {
 
10053
        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
 
10054
        (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
 
10055
        (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
 
10056
        (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
 
10057
        (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
 
10058
        (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
 
10059
        (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
 
10060
        (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
 
10061
        gc->pc += cmdlen;
 
10062
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10063
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10064
        }
 
10065
    }
 
10066
}
 
10067
 
 
10068
#define X_GLrop_ProgramNamedParameter4fvNV 4218
 
10069
void
 
10070
__indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
 
10071
                                        const GLubyte * name,
 
10072
                                        const GLfloat * v)
 
10073
{
 
10074
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10075
    const GLuint cmdlen = 28 + __GLX_PAD(len);
 
10076
    if (__builtin_expect(len >= 0, 1)) {
 
10077
        emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
 
10078
        (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
 
10079
        (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
 
10080
        (void) memcpy((void *) (gc->pc + 12), (void *) (v), 16);
 
10081
        (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
 
10082
        gc->pc += cmdlen;
 
10083
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10084
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10085
        }
 
10086
    }
 
10087
}
 
10088
 
 
10089
#define X_GLrop_BlendEquationSeparateEXT 4228
 
10090
void
 
10091
__indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
 
10092
{
 
10093
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10094
    const GLuint cmdlen = 12;
 
10095
    emit_header(gc->pc, X_GLrop_BlendEquationSeparateEXT, cmdlen);
 
10096
    (void) memcpy((void *) (gc->pc + 4), (void *) (&modeRGB), 4);
 
10097
    (void) memcpy((void *) (gc->pc + 8), (void *) (&modeA), 4);
 
10098
    gc->pc += cmdlen;
 
10099
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10100
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10101
    }
 
10102
}
 
10103
 
 
10104
#define X_GLrop_BindFramebufferEXT 4319
 
10105
void
 
10106
__indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
 
10107
{
 
10108
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10109
    const GLuint cmdlen = 12;
 
10110
    emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
 
10111
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
10112
    (void) memcpy((void *) (gc->pc + 8), (void *) (&framebuffer), 4);
 
10113
    gc->pc += cmdlen;
 
10114
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10115
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10116
    }
8220
10117
}
8221
10118
 
8222
10119
#define X_GLrop_BindRenderbufferEXT 4316
8223
10120
void
8224
10121
__indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
8225
10122
{
8226
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
10123
    __GLXcontext *const gc = __glXGetCurrentContext();
8227
10124
    const GLuint cmdlen = 12;
8228
10125
    emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
8229
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8230
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4);
8231
 
    gc->pc += cmdlen;
8232
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8233
 
}
8234
 
 
8235
 
#define X_GLrop_DeleteRenderbuffersEXT 4317
8236
 
void
8237
 
__indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
8238
 
{
8239
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8240
 
    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8241
 
    if (__builtin_expect(n >= 0, 1)) {
8242
 
        emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
8243
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
8244
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(renderbuffers), (n * 4));
8245
 
        gc->pc += cmdlen;
8246
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8247
 
    }
8248
 
}
8249
 
 
8250
 
#define X_GLvop_GenRenderbuffersEXT 1423
8251
 
void
8252
 
__indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
8253
 
{
8254
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8255
 
    Display * const dpy = gc->currentDpy;
8256
 
    const GLuint cmdlen = 4;
8257
 
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8258
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenRenderbuffersEXT, cmdlen);
8259
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
8260
 
        (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
8261
 
        UnlockDisplay(dpy); SyncHandle();
8262
 
    }
8263
 
    return;
8264
 
}
8265
 
 
8266
 
#define X_GLrop_RenderbufferStorageEXT 4318
8267
 
void
8268
 
__indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
8269
 
{
8270
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8271
 
    const GLuint cmdlen = 20;
8272
 
    emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
8273
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8274
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
8275
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
8276
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
8277
 
    gc->pc += cmdlen;
8278
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8279
 
}
8280
 
 
8281
 
#define X_GLvop_GetRenderbufferParameterivEXT 1424
8282
 
void
8283
 
__indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params)
8284
 
{
8285
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8286
 
    Display * const dpy = gc->currentDpy;
8287
 
    const GLuint cmdlen = 8;
8288
 
    if (__builtin_expect(dpy != NULL, 1)) {
8289
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetRenderbufferParameterivEXT, cmdlen);
8290
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
8291
 
        (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
8292
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8293
 
        UnlockDisplay(dpy); SyncHandle();
8294
 
    }
8295
 
    return;
8296
 
}
8297
 
 
8298
 
#define X_GLvop_IsFramebufferEXT 1425
8299
 
GLboolean
8300
 
__indirect_glIsFramebufferEXT(GLuint framebuffer)
8301
 
{
8302
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8303
 
    Display * const dpy = gc->currentDpy;
8304
 
    GLboolean retval = (GLboolean) 0;
8305
 
    const GLuint cmdlen = 4;
8306
 
    if (__builtin_expect(dpy != NULL, 1)) {
8307
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsFramebufferEXT, cmdlen);
8308
 
        (void) memcpy((void *)(pc + 0), (void *)(&framebuffer), 4);
8309
 
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8310
 
        UnlockDisplay(dpy); SyncHandle();
8311
 
    }
8312
 
    return retval;
8313
 
}
8314
 
 
8315
 
#define X_GLrop_BindFramebufferEXT 4319
8316
 
void
8317
 
__indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
8318
 
{
8319
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8320
 
    const GLuint cmdlen = 12;
8321
 
    emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
8322
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8323
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4);
8324
 
    gc->pc += cmdlen;
8325
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8326
 
}
8327
 
 
8328
 
#define X_GLrop_DeleteFramebuffersEXT 4320
8329
 
void
8330
 
__indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
8331
 
{
8332
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8333
 
    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8334
 
    if (__builtin_expect(n >= 0, 1)) {
8335
 
        emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
8336
 
        (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
8337
 
        (void) memcpy((void *)(gc->pc + 8), (void *)(framebuffers), (n * 4));
8338
 
        gc->pc += cmdlen;
8339
 
        if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8340
 
    }
8341
 
}
8342
 
 
8343
 
#define X_GLvop_GenFramebuffersEXT 1426
8344
 
void
8345
 
__indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
8346
 
{
8347
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8348
 
    Display * const dpy = gc->currentDpy;
8349
 
    const GLuint cmdlen = 4;
8350
 
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8351
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenFramebuffersEXT, cmdlen);
8352
 
        (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
8353
 
        (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
8354
 
        UnlockDisplay(dpy); SyncHandle();
8355
 
    }
8356
 
    return;
 
10126
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
10127
    (void) memcpy((void *) (gc->pc + 8), (void *) (&renderbuffer), 4);
 
10128
    gc->pc += cmdlen;
 
10129
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10130
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10131
    }
8357
10132
}
8358
10133
 
8359
10134
#define X_GLvop_CheckFramebufferStatusEXT 1427
8360
10135
GLenum
8361
10136
__indirect_glCheckFramebufferStatusEXT(GLenum target)
8362
10137
{
8363
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8364
 
    Display * const dpy = gc->currentDpy;
 
10138
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10139
    Display *const dpy = gc->currentDpy;
8365
10140
    GLenum retval = (GLenum) 0;
8366
10141
    const GLuint cmdlen = 4;
8367
10142
    if (__builtin_expect(dpy != NULL, 1)) {
8368
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_CheckFramebufferStatusEXT, cmdlen);
8369
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
 
10143
        GLubyte const *pc =
 
10144
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
10145
                                    X_GLvop_CheckFramebufferStatusEXT,
 
10146
                                    cmdlen);
 
10147
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8370
10148
        retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8371
 
        UnlockDisplay(dpy); SyncHandle();
 
10149
        UnlockDisplay(dpy);
 
10150
        SyncHandle();
8372
10151
    }
8373
10152
    return retval;
8374
10153
}
8375
10154
 
 
10155
#define X_GLrop_DeleteFramebuffersEXT 4320
 
10156
void
 
10157
__indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
 
10158
{
 
10159
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10160
    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
 
10161
    if (__builtin_expect(n >= 0, 1)) {
 
10162
        emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
 
10163
        (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
 
10164
        (void) memcpy((void *) (gc->pc + 8), (void *) (framebuffers),
 
10165
                      (n * 4));
 
10166
        gc->pc += cmdlen;
 
10167
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10168
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10169
        }
 
10170
    }
 
10171
}
 
10172
 
 
10173
#define X_GLrop_DeleteRenderbuffersEXT 4317
 
10174
void
 
10175
__indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
 
10176
{
 
10177
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10178
    const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
 
10179
    if (__builtin_expect(n >= 0, 1)) {
 
10180
        emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
 
10181
        (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
 
10182
        (void) memcpy((void *) (gc->pc + 8), (void *) (renderbuffers),
 
10183
                      (n * 4));
 
10184
        gc->pc += cmdlen;
 
10185
        if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10186
            (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10187
        }
 
10188
    }
 
10189
}
 
10190
 
 
10191
#define X_GLrop_FramebufferRenderbufferEXT 4324
 
10192
void
 
10193
__indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
 
10194
                                        GLenum renderbuffertarget,
 
10195
                                        GLuint renderbuffer)
 
10196
{
 
10197
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10198
    const GLuint cmdlen = 20;
 
10199
    emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
 
10200
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
10201
    (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
 
10202
    (void) memcpy((void *) (gc->pc + 12), (void *) (&renderbuffertarget), 4);
 
10203
    (void) memcpy((void *) (gc->pc + 16), (void *) (&renderbuffer), 4);
 
10204
    gc->pc += cmdlen;
 
10205
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10206
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10207
    }
 
10208
}
 
10209
 
8376
10210
#define X_GLrop_FramebufferTexture1DEXT 4321
8377
10211
void
8378
 
__indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 
10212
__indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
 
10213
                                     GLenum textarget, GLuint texture,
 
10214
                                     GLint level)
8379
10215
{
8380
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
10216
    __GLXcontext *const gc = __glXGetCurrentContext();
8381
10217
    const GLuint cmdlen = 24;
8382
10218
    emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
8383
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8384
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
8385
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
8386
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
8387
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
 
10219
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
10220
    (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
 
10221
    (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
 
10222
    (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
 
10223
    (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
8388
10224
    gc->pc += cmdlen;
8389
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
10225
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10226
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10227
    }
8390
10228
}
8391
10229
 
8392
10230
#define X_GLrop_FramebufferTexture2DEXT 4322
8393
10231
void
8394
 
__indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 
10232
__indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
 
10233
                                     GLenum textarget, GLuint texture,
 
10234
                                     GLint level)
8395
10235
{
8396
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
10236
    __GLXcontext *const gc = __glXGetCurrentContext();
8397
10237
    const GLuint cmdlen = 24;
8398
10238
    emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
8399
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8400
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
8401
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
8402
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
8403
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
 
10239
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
10240
    (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
 
10241
    (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
 
10242
    (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
 
10243
    (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
8404
10244
    gc->pc += cmdlen;
8405
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
10245
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10246
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10247
    }
8406
10248
}
8407
10249
 
8408
10250
#define X_GLrop_FramebufferTexture3DEXT 4323
8409
10251
void
8410
 
__indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
 
10252
__indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
 
10253
                                     GLenum textarget, GLuint texture,
 
10254
                                     GLint level, GLint zoffset)
8411
10255
{
8412
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
10256
    __GLXcontext *const gc = __glXGetCurrentContext();
8413
10257
    const GLuint cmdlen = 28;
8414
10258
    emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
8415
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8416
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
8417
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
8418
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
8419
 
    (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
8420
 
    (void) memcpy((void *)(gc->pc + 24), (void *)(&zoffset), 4);
8421
 
    gc->pc += cmdlen;
8422
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8423
 
}
8424
 
 
8425
 
#define X_GLrop_FramebufferRenderbufferEXT 4324
8426
 
void
8427
 
__indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
8428
 
{
8429
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8430
 
    const GLuint cmdlen = 20;
8431
 
    emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
8432
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8433
 
    (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
8434
 
    (void) memcpy((void *)(gc->pc + 12), (void *)(&renderbuffertarget), 4);
8435
 
    (void) memcpy((void *)(gc->pc + 16), (void *)(&renderbuffer), 4);
8436
 
    gc->pc += cmdlen;
8437
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8438
 
}
8439
 
 
8440
 
#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
8441
 
void
8442
 
__indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params)
8443
 
{
8444
 
    __GLXcontext * const gc = __glXGetCurrentContext();
8445
 
    Display * const dpy = gc->currentDpy;
8446
 
    const GLuint cmdlen = 12;
8447
 
    if (__builtin_expect(dpy != NULL, 1)) {
8448
 
        GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetFramebufferAttachmentParameterivEXT, cmdlen);
8449
 
        (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
8450
 
        (void) memcpy((void *)(pc + 4), (void *)(&attachment), 4);
8451
 
        (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
8452
 
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8453
 
        UnlockDisplay(dpy); SyncHandle();
 
10259
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
10260
    (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
 
10261
    (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
 
10262
    (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
 
10263
    (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
 
10264
    (void) memcpy((void *) (gc->pc + 24), (void *) (&zoffset), 4);
 
10265
    gc->pc += cmdlen;
 
10266
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10267
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10268
    }
 
10269
}
 
10270
 
 
10271
#define X_GLvop_GenFramebuffersEXT 1426
 
10272
void
 
10273
__indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
 
10274
{
 
10275
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10276
    Display *const dpy = gc->currentDpy;
 
10277
    const GLuint cmdlen = 4;
 
10278
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
 
10279
        GLubyte const *pc =
 
10280
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
10281
                                    X_GLvop_GenFramebuffersEXT, cmdlen);
 
10282
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
10283
        (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
 
10284
        UnlockDisplay(dpy);
 
10285
        SyncHandle();
 
10286
    }
 
10287
    return;
 
10288
}
 
10289
 
 
10290
#define X_GLvop_GenRenderbuffersEXT 1423
 
10291
void
 
10292
__indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
 
10293
{
 
10294
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10295
    Display *const dpy = gc->currentDpy;
 
10296
    const GLuint cmdlen = 4;
 
10297
    if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
 
10298
        GLubyte const *pc =
 
10299
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
10300
                                    X_GLvop_GenRenderbuffersEXT, cmdlen);
 
10301
        (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
 
10302
        (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
 
10303
        UnlockDisplay(dpy);
 
10304
        SyncHandle();
8454
10305
    }
8455
10306
    return;
8456
10307
}
8459
10310
void
8460
10311
__indirect_glGenerateMipmapEXT(GLenum target)
8461
10312
{
8462
 
    __GLXcontext * const gc = __glXGetCurrentContext();
 
10313
    __GLXcontext *const gc = __glXGetCurrentContext();
8463
10314
    const GLuint cmdlen = 8;
8464
10315
    emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
8465
 
    (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8466
 
    gc->pc += cmdlen;
8467
 
    if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
 
10316
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
10317
    gc->pc += cmdlen;
 
10318
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10319
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10320
    }
 
10321
}
 
10322
 
 
10323
#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
 
10324
void
 
10325
__indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target,
 
10326
                                                    GLenum attachment,
 
10327
                                                    GLenum pname,
 
10328
                                                    GLint * params)
 
10329
{
 
10330
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10331
    Display *const dpy = gc->currentDpy;
 
10332
    const GLuint cmdlen = 12;
 
10333
    if (__builtin_expect(dpy != NULL, 1)) {
 
10334
        GLubyte const *pc =
 
10335
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
10336
                                    X_GLvop_GetFramebufferAttachmentParameterivEXT,
 
10337
                                    cmdlen);
 
10338
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
10339
        (void) memcpy((void *) (pc + 4), (void *) (&attachment), 4);
 
10340
        (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
 
10341
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
10342
        UnlockDisplay(dpy);
 
10343
        SyncHandle();
 
10344
    }
 
10345
    return;
 
10346
}
 
10347
 
 
10348
#define X_GLvop_GetRenderbufferParameterivEXT 1424
 
10349
void
 
10350
__indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname,
 
10351
                                           GLint * params)
 
10352
{
 
10353
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10354
    Display *const dpy = gc->currentDpy;
 
10355
    const GLuint cmdlen = 8;
 
10356
    if (__builtin_expect(dpy != NULL, 1)) {
 
10357
        GLubyte const *pc =
 
10358
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
10359
                                    X_GLvop_GetRenderbufferParameterivEXT,
 
10360
                                    cmdlen);
 
10361
        (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
 
10362
        (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
 
10363
        (void) __glXReadReply(dpy, 4, params, GL_FALSE);
 
10364
        UnlockDisplay(dpy);
 
10365
        SyncHandle();
 
10366
    }
 
10367
    return;
 
10368
}
 
10369
 
 
10370
#define X_GLvop_IsFramebufferEXT 1425
 
10371
GLboolean
 
10372
__indirect_glIsFramebufferEXT(GLuint framebuffer)
 
10373
{
 
10374
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10375
    Display *const dpy = gc->currentDpy;
 
10376
    GLboolean retval = (GLboolean) 0;
 
10377
    const GLuint cmdlen = 4;
 
10378
    if (__builtin_expect(dpy != NULL, 1)) {
 
10379
        GLubyte const *pc =
 
10380
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
10381
                                    X_GLvop_IsFramebufferEXT, cmdlen);
 
10382
        (void) memcpy((void *) (pc + 0), (void *) (&framebuffer), 4);
 
10383
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
 
10384
        UnlockDisplay(dpy);
 
10385
        SyncHandle();
 
10386
    }
 
10387
    return retval;
 
10388
}
 
10389
 
 
10390
#define X_GLvop_IsRenderbufferEXT 1422
 
10391
GLboolean
 
10392
__indirect_glIsRenderbufferEXT(GLuint renderbuffer)
 
10393
{
 
10394
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10395
    Display *const dpy = gc->currentDpy;
 
10396
    GLboolean retval = (GLboolean) 0;
 
10397
    const GLuint cmdlen = 4;
 
10398
    if (__builtin_expect(dpy != NULL, 1)) {
 
10399
        GLubyte const *pc =
 
10400
            __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
 
10401
                                    X_GLvop_IsRenderbufferEXT, cmdlen);
 
10402
        (void) memcpy((void *) (pc + 0), (void *) (&renderbuffer), 4);
 
10403
        retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
 
10404
        UnlockDisplay(dpy);
 
10405
        SyncHandle();
 
10406
    }
 
10407
    return retval;
 
10408
}
 
10409
 
 
10410
#define X_GLrop_RenderbufferStorageEXT 4318
 
10411
void
 
10412
__indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
 
10413
                                    GLsizei width, GLsizei height)
 
10414
{
 
10415
    __GLXcontext *const gc = __glXGetCurrentContext();
 
10416
    const GLuint cmdlen = 20;
 
10417
    emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
 
10418
    (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
 
10419
    (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
 
10420
    (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
 
10421
    (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
 
10422
    gc->pc += cmdlen;
 
10423
    if (__builtin_expect(gc->pc > gc->limit, 0)) {
 
10424
        (void) __glXFlushRenderBuffer(gc, gc->pc);
 
10425
    }
8468
10426
}
8469
10427
 
8470
10428