GL_EXT_paletted_texture functions should alias GL_SGI_color_table functions.
[mesa.git] / src / glx / x11 / indirect.c
1 /* DO NOT EDIT - This file generated automatically by glX_proto_send.py (from Mesa) script */
2
3 /*
4 * (C) Copyright IBM Corporation 2004, 2005
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sub license,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the next
15 * paragraph) shall be included in all copies or substantial portions of the
16 * Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21 * IBM,
22 * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 */
27
28
29 #include <GL/gl.h>
30 #include "indirect.h"
31 #include "glxclient.h"
32 #include "indirect_size.h"
33 #include <GL/glxproto.h>
34 #ifdef USE_XCB
35 #include <X11/xcl.h>
36 #include <X11/XCB/xcb.h>
37 #include <X11/XCB/glx.h>
38 #endif /* USE_XCB */
39
40 #define __GLX_PAD(n) (((n) + 3) & ~3)
41
42 # if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
43 # define FASTCALL __attribute__((fastcall))
44 # else
45 # define FASTCALL
46 # endif
47 # if defined(__GNUC__)
48 # define NOINLINE __attribute__((noinline))
49 # else
50 # define NOINLINE
51 # endif
52
53 #if !defined __GNUC__ || __GNUC__ < 3
54 # define __builtin_expect(x, y) x
55 #endif
56
57 /* If the size and opcode values are known at compile-time, this will, on
58 * x86 at least, emit them with a single instruction.
59 */
60 #define emit_header(dest, op, size) \
61 do { union { short s[2]; int i; } temp; \
62 temp.s[0] = (size); temp.s[1] = (op); \
63 *((int *)(dest)) = temp.i; } while(0)
64
65 NOINLINE CARD32
66 __glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_array )
67 {
68 xGLXSingleReply reply;
69
70 (void) _XReply(dpy, (xReply *) & reply, 0, False);
71 if (size != 0) {
72 if ((reply.length > 0) || reply_is_always_array) {
73 const GLint bytes = (reply_is_always_array)
74 ? (4 * reply.length) : (reply.size * size);
75 const GLint extra = 4 - (bytes & 3);
76
77 _XRead(dpy, dest, bytes);
78 if ( extra < 4 ) {
79 _XEatData(dpy, extra);
80 }
81 }
82 else {
83 (void) memcpy( dest, &(reply.pad3), size);
84 }
85 }
86
87 return reply.retval;
88 }
89
90 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 {
95 xGLXSingleReply reply;
96 GLint size;
97
98 (void) _XReply(dpy, (xReply *) & reply, 0, False);
99
100 if ( dimensions_in_reply ) {
101 width = reply.pad3;
102 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; }
107 }
108
109 size = reply.length * 4;
110 if (size != 0) {
111 void * buf = Xmalloc( size );
112
113 if ( buf == NULL ) {
114 _XEatData(dpy, size);
115 __glXSetError(gc, GL_OUT_OF_MEMORY);
116 }
117 else {
118 const GLint extra = 4 - (size & 3);
119
120 _XRead(dpy, buf, size);
121 if ( extra < 4 ) {
122 _XEatData(dpy, extra);
123 }
124
125 __glEmptyImage(gc, 3, width, height, depth, format, type,
126 buf, dest);
127 Xfree(buf);
128 }
129 }
130 }
131
132 #define X_GLXSingle 0
133
134 NOINLINE FASTCALL GLubyte *
135 __glXSetupSingleRequest( __GLXcontext * gc, GLint sop, GLint cmdlen )
136 {
137 xGLXSingleReq * req;
138 Display * const dpy = gc->currentDpy;
139
140 (void) __glXFlushRenderBuffer(gc, gc->pc);
141 LockDisplay(dpy);
142 GetReqExtra(GLXSingle, cmdlen, req);
143 req->reqType = gc->majorOpcode;
144 req->contextTag = gc->currentContextTag;
145 req->glxCode = sop;
146 return (GLubyte *)(req) + sz_xGLXSingleReq;
147 }
148
149 NOINLINE FASTCALL GLubyte *
150 __glXSetupVendorRequest( __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen )
151 {
152 xGLXVendorPrivateReq * req;
153 Display * const dpy = gc->currentDpy;
154
155 (void) __glXFlushRenderBuffer(gc, gc->pc);
156 LockDisplay(dpy);
157 GetReqExtra(GLXVendorPrivate, cmdlen, req);
158 req->reqType = gc->majorOpcode;
159 req->glxCode = code;
160 req->vendorCode = vop;
161 req->contextTag = gc->currentContextTag;
162 return (GLubyte *)(req) + sz_xGLXVendorPrivateReq;
163 }
164
165 const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
166
167 #define zero (__glXDefaultPixelStore+0)
168 #define one (__glXDefaultPixelStore+8)
169 #define default_pixel_store_1D (__glXDefaultPixelStore+4)
170 #define default_pixel_store_1D_size 20
171 #define default_pixel_store_2D (__glXDefaultPixelStore+4)
172 #define default_pixel_store_2D_size 20
173 #define default_pixel_store_3D (__glXDefaultPixelStore+0)
174 #define default_pixel_store_3D_size 36
175 #define default_pixel_store_4D (__glXDefaultPixelStore+0)
176 #define default_pixel_store_4D_size 36
177
178 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();
230 const GLuint cmdlen = 16;
231
232 emit_header(gc->pc, rop, cmdlen);
233 (void) memcpy((void *)(gc->pc + 4), ptr, 12);
234 gc->pc += cmdlen;
235 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
236 }
237
238 static FASTCALL NOINLINE void
239 generic_16_byte( GLint rop, const void * ptr )
240 {
241 __GLXcontext * const gc = __glXGetCurrentContext();
242 const GLuint cmdlen = 20;
243
244 emit_header(gc->pc, rop, cmdlen);
245 (void) memcpy((void *)(gc->pc + 4), ptr, 16);
246 gc->pc += cmdlen;
247 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
248 }
249
250 static FASTCALL NOINLINE void
251 generic_24_byte( GLint rop, const void * ptr )
252 {
253 __GLXcontext * const gc = __glXGetCurrentContext();
254 const GLuint cmdlen = 28;
255
256 emit_header(gc->pc, rop, cmdlen);
257 (void) memcpy((void *)(gc->pc + 4), ptr, 24);
258 gc->pc += cmdlen;
259 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
260 }
261
262 static FASTCALL NOINLINE void
263 generic_32_byte( GLint rop, const void * ptr )
264 {
265 __GLXcontext * const gc = __glXGetCurrentContext();
266 const GLuint cmdlen = 36;
267
268 emit_header(gc->pc, rop, cmdlen);
269 (void) memcpy((void *)(gc->pc + 4), ptr, 32);
270 gc->pc += cmdlen;
271 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
272 }
273
274 #define X_GLsop_NewList 101
275 void
276 __indirect_glNewList(GLuint list, GLenum mode)
277 {
278 __GLXcontext * const gc = __glXGetCurrentContext();
279 Display * const dpy = gc->currentDpy;
280 const GLuint cmdlen = 8;
281 if (__builtin_expect(dpy != NULL, 1)) {
282 #ifdef USE_XCB
283 XCBConnection *c = XCBConnectionOfDisplay(dpy);
284 (void) __glXFlushRenderBuffer(gc, gc->pc);
285 XCBGlxNewList(c, gc->currentContextTag, list, mode);
286 #else
287 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
288 (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
289 (void) memcpy((void *)(pc + 4), (void *)(&mode), 4);
290 UnlockDisplay(dpy); SyncHandle();
291 #endif /* USE_XCB */
292 }
293 return;
294 }
295
296 #define X_GLsop_EndList 102
297 void
298 __indirect_glEndList(void)
299 {
300 __GLXcontext * const gc = __glXGetCurrentContext();
301 Display * const dpy = gc->currentDpy;
302 const GLuint cmdlen = 0;
303 if (__builtin_expect(dpy != NULL, 1)) {
304 #ifdef USE_XCB
305 XCBConnection *c = XCBConnectionOfDisplay(dpy);
306 (void) __glXFlushRenderBuffer(gc, gc->pc);
307 XCBGlxEndList(c, gc->currentContextTag);
308 #else
309 (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
310 UnlockDisplay(dpy); SyncHandle();
311 #endif /* USE_XCB */
312 }
313 return;
314 }
315
316 #define X_GLrop_CallList 1
317 void
318 __indirect_glCallList(GLuint list)
319 {
320 __GLXcontext * const gc = __glXGetCurrentContext();
321 const GLuint cmdlen = 8;
322 emit_header(gc->pc, X_GLrop_CallList, cmdlen);
323 (void) memcpy((void *)(gc->pc + 4), (void *)(&list), 4);
324 gc->pc += cmdlen;
325 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
326 }
327
328 #define X_GLrop_CallLists 2
329 void
330 __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
331 {
332 __GLXcontext * const gc = __glXGetCurrentContext();
333 const GLuint compsize = __glCallLists_size(type);
334 const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
335 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
336 if (cmdlen <= gc->maxSmallRenderCommandSize) {
337 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
338 (void) __glXFlushRenderBuffer(gc, gc->pc);
339 }
340 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));
344 gc->pc += cmdlen;
345 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
346 }
347 else {
348 const GLint op = X_GLrop_CallLists;
349 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);
355 __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
356 }
357 }
358 }
359
360 #define X_GLsop_DeleteLists 103
361 void
362 __indirect_glDeleteLists(GLuint list, GLsizei range)
363 {
364 __GLXcontext * const gc = __glXGetCurrentContext();
365 Display * const dpy = gc->currentDpy;
366 const GLuint cmdlen = 8;
367 if (__builtin_expect(dpy != NULL, 1)) {
368 #ifdef USE_XCB
369 XCBConnection *c = XCBConnectionOfDisplay(dpy);
370 (void) __glXFlushRenderBuffer(gc, gc->pc);
371 XCBGlxDeleteLists(c, gc->currentContextTag, list, range);
372 #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();
377 #endif /* USE_XCB */
378 }
379 return;
380 }
381
382 #define X_GLsop_GenLists 104
383 GLuint
384 __indirect_glGenLists(GLsizei range)
385 {
386 __GLXcontext * const gc = __glXGetCurrentContext();
387 Display * const dpy = gc->currentDpy;
388 GLuint retval = (GLuint) 0;
389 const GLuint cmdlen = 4;
390 if (__builtin_expect(dpy != NULL, 1)) {
391 #ifdef USE_XCB
392 XCBConnection *c = XCBConnectionOfDisplay(dpy);
393 (void) __glXFlushRenderBuffer(gc, gc->pc);
394 XCBGlxGenListsRep *reply = XCBGlxGenListsReply(c, XCBGlxGenLists(c, gc->currentContextTag, range), NULL);
395 retval = reply->ret_val;
396 free(reply);
397 #else
398 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
399 (void) memcpy((void *)(pc + 0), (void *)(&range), 4);
400 retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
401 UnlockDisplay(dpy); SyncHandle();
402 #endif /* USE_XCB */
403 }
404 return retval;
405 }
406
407 #define X_GLrop_ListBase 3
408 void
409 __indirect_glListBase(GLuint base)
410 {
411 __GLXcontext * const gc = __glXGetCurrentContext();
412 const GLuint cmdlen = 8;
413 emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
414 (void) memcpy((void *)(gc->pc + 4), (void *)(&base), 4);
415 gc->pc += cmdlen;
416 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
417 }
418
419 #define X_GLrop_Begin 4
420 void
421 __indirect_glBegin(GLenum mode)
422 {
423 __GLXcontext * const gc = __glXGetCurrentContext();
424 const GLuint cmdlen = 8;
425 emit_header(gc->pc, X_GLrop_Begin, cmdlen);
426 (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
427 gc->pc += cmdlen;
428 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
429 }
430
431 #define X_GLrop_Bitmap 5
432 void
433 __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap)
434 {
435 __GLXcontext * const gc = __glXGetCurrentContext();
436 const GLuint compsize = (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
437 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
438 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
439 if (cmdlen <= gc->maxSmallRenderCommandSize) {
440 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
441 (void) __glXFlushRenderBuffer(gc, gc->pc);
442 }
443 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);
450 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 );
455 }
456 gc->pc += cmdlen;
457 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
458 }
459 else {
460 const GLint op = X_GLrop_Bitmap;
461 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);
472 }
473 }
474 }
475
476 #define X_GLrop_Color3bv 6
477 void
478 __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
479 {
480 __GLXcontext * const gc = __glXGetCurrentContext();
481 const GLuint cmdlen = 8;
482 emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
483 (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
484 (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
485 (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
486 gc->pc += cmdlen;
487 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
488 }
489
490 #define X_GLrop_Color3bv 6
491 void
492 __indirect_glColor3bv(const GLbyte * v)
493 {
494 generic_3_byte( X_GLrop_Color3bv, v );
495 }
496
497 #define X_GLrop_Color3dv 7
498 void
499 __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
500 {
501 __GLXcontext * const gc = __glXGetCurrentContext();
502 const GLuint cmdlen = 28;
503 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);
507 gc->pc += cmdlen;
508 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
509 }
510
511 #define X_GLrop_Color3dv 7
512 void
513 __indirect_glColor3dv(const GLdouble * v)
514 {
515 generic_24_byte( X_GLrop_Color3dv, v );
516 }
517
518 #define X_GLrop_Color3fv 8
519 void
520 __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
521 {
522 __GLXcontext * const gc = __glXGetCurrentContext();
523 const GLuint cmdlen = 16;
524 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);
528 gc->pc += cmdlen;
529 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
530 }
531
532 #define X_GLrop_Color3fv 8
533 void
534 __indirect_glColor3fv(const GLfloat * v)
535 {
536 generic_12_byte( X_GLrop_Color3fv, v );
537 }
538
539 #define X_GLrop_Color3iv 9
540 void
541 __indirect_glColor3i(GLint red, GLint green, GLint blue)
542 {
543 __GLXcontext * const gc = __glXGetCurrentContext();
544 const GLuint cmdlen = 16;
545 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);
549 gc->pc += cmdlen;
550 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
551 }
552
553 #define X_GLrop_Color3iv 9
554 void
555 __indirect_glColor3iv(const GLint * v)
556 {
557 generic_12_byte( X_GLrop_Color3iv, v );
558 }
559
560 #define X_GLrop_Color3sv 10
561 void
562 __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
563 {
564 __GLXcontext * const gc = __glXGetCurrentContext();
565 const GLuint cmdlen = 12;
566 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);
570 gc->pc += cmdlen;
571 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
572 }
573
574 #define X_GLrop_Color3sv 10
575 void
576 __indirect_glColor3sv(const GLshort * v)
577 {
578 generic_6_byte( X_GLrop_Color3sv, v );
579 }
580
581 #define X_GLrop_Color3ubv 11
582 void
583 __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
584 {
585 __GLXcontext * const gc = __glXGetCurrentContext();
586 const GLuint cmdlen = 8;
587 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);
591 gc->pc += cmdlen;
592 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
593 }
594
595 #define X_GLrop_Color3ubv 11
596 void
597 __indirect_glColor3ubv(const GLubyte * v)
598 {
599 generic_3_byte( X_GLrop_Color3ubv, v );
600 }
601
602 #define X_GLrop_Color3uiv 12
603 void
604 __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
605 {
606 __GLXcontext * const gc = __glXGetCurrentContext();
607 const GLuint cmdlen = 16;
608 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);
612 gc->pc += cmdlen;
613 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
614 }
615
616 #define X_GLrop_Color3uiv 12
617 void
618 __indirect_glColor3uiv(const GLuint * v)
619 {
620 generic_12_byte( X_GLrop_Color3uiv, v );
621 }
622
623 #define X_GLrop_Color3usv 13
624 void
625 __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
626 {
627 __GLXcontext * const gc = __glXGetCurrentContext();
628 const GLuint cmdlen = 12;
629 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);
633 gc->pc += cmdlen;
634 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
635 }
636
637 #define X_GLrop_Color3usv 13
638 void
639 __indirect_glColor3usv(const GLushort * v)
640 {
641 generic_6_byte( X_GLrop_Color3usv, v );
642 }
643
644 #define X_GLrop_Color4bv 14
645 void
646 __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
647 {
648 __GLXcontext * const gc = __glXGetCurrentContext();
649 const GLuint cmdlen = 8;
650 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);
655 gc->pc += cmdlen;
656 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
657 }
658
659 #define X_GLrop_Color4bv 14
660 void
661 __indirect_glColor4bv(const GLbyte * v)
662 {
663 generic_4_byte( X_GLrop_Color4bv, v );
664 }
665
666 #define X_GLrop_Color4dv 15
667 void
668 __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
669 {
670 __GLXcontext * const gc = __glXGetCurrentContext();
671 const GLuint cmdlen = 36;
672 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);
677 gc->pc += cmdlen;
678 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
679 }
680
681 #define X_GLrop_Color4dv 15
682 void
683 __indirect_glColor4dv(const GLdouble * v)
684 {
685 generic_32_byte( X_GLrop_Color4dv, v );
686 }
687
688 #define X_GLrop_Color4fv 16
689 void
690 __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
691 {
692 __GLXcontext * const gc = __glXGetCurrentContext();
693 const GLuint cmdlen = 20;
694 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);
699 gc->pc += cmdlen;
700 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
701 }
702
703 #define X_GLrop_Color4fv 16
704 void
705 __indirect_glColor4fv(const GLfloat * v)
706 {
707 generic_16_byte( X_GLrop_Color4fv, v );
708 }
709
710 #define X_GLrop_Color4iv 17
711 void
712 __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
713 {
714 __GLXcontext * const gc = __glXGetCurrentContext();
715 const GLuint cmdlen = 20;
716 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);
721 gc->pc += cmdlen;
722 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
723 }
724
725 #define X_GLrop_Color4iv 17
726 void
727 __indirect_glColor4iv(const GLint * v)
728 {
729 generic_16_byte( X_GLrop_Color4iv, v );
730 }
731
732 #define X_GLrop_Color4sv 18
733 void
734 __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
735 {
736 __GLXcontext * const gc = __glXGetCurrentContext();
737 const GLuint cmdlen = 12;
738 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);
743 gc->pc += cmdlen;
744 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
745 }
746
747 #define X_GLrop_Color4sv 18
748 void
749 __indirect_glColor4sv(const GLshort * v)
750 {
751 generic_8_byte( X_GLrop_Color4sv, v );
752 }
753
754 #define X_GLrop_Color4ubv 19
755 void
756 __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
757 {
758 __GLXcontext * const gc = __glXGetCurrentContext();
759 const GLuint cmdlen = 8;
760 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);
765 gc->pc += cmdlen;
766 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
767 }
768
769 #define X_GLrop_Color4ubv 19
770 void
771 __indirect_glColor4ubv(const GLubyte * v)
772 {
773 generic_4_byte( X_GLrop_Color4ubv, v );
774 }
775
776 #define X_GLrop_Color4uiv 20
777 void
778 __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
779 {
780 __GLXcontext * const gc = __glXGetCurrentContext();
781 const GLuint cmdlen = 20;
782 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);
787 gc->pc += cmdlen;
788 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
789 }
790
791 #define X_GLrop_Color4uiv 20
792 void
793 __indirect_glColor4uiv(const GLuint * v)
794 {
795 generic_16_byte( X_GLrop_Color4uiv, v );
796 }
797
798 #define X_GLrop_Color4usv 21
799 void
800 __indirect_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
801 {
802 __GLXcontext * const gc = __glXGetCurrentContext();
803 const GLuint cmdlen = 12;
804 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);
809 gc->pc += cmdlen;
810 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
811 }
812
813 #define X_GLrop_Color4usv 21
814 void
815 __indirect_glColor4usv(const GLushort * v)
816 {
817 generic_8_byte( X_GLrop_Color4usv, v );
818 }
819
820 #define X_GLrop_EdgeFlagv 22
821 void
822 __indirect_glEdgeFlag(GLboolean flag)
823 {
824 __GLXcontext * const gc = __glXGetCurrentContext();
825 const GLuint cmdlen = 8;
826 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
827 (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
828 gc->pc += cmdlen;
829 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
830 }
831
832 #define X_GLrop_EdgeFlagv 22
833 void
834 __indirect_glEdgeFlagv(const GLboolean * flag)
835 {
836 __GLXcontext * const gc = __glXGetCurrentContext();
837 const GLuint cmdlen = 8;
838 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
839 (void) memcpy((void *)(gc->pc + 4), (void *)(flag), 1);
840 gc->pc += cmdlen;
841 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
842 }
843
844 #define X_GLrop_End 23
845 void
846 __indirect_glEnd(void)
847 {
848 __GLXcontext * const gc = __glXGetCurrentContext();
849 const GLuint cmdlen = 4;
850 emit_header(gc->pc, X_GLrop_End, cmdlen);
851 gc->pc += cmdlen;
852 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
853 }
854
855 #define X_GLrop_Indexdv 24
856 void
857 __indirect_glIndexd(GLdouble c)
858 {
859 __GLXcontext * const gc = __glXGetCurrentContext();
860 const GLuint cmdlen = 12;
861 emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
862 (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 8);
863 gc->pc += cmdlen;
864 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
865 }
866
867 #define X_GLrop_Indexdv 24
868 void
869 __indirect_glIndexdv(const GLdouble * c)
870 {
871 generic_8_byte( X_GLrop_Indexdv, c );
872 }
873
874 #define X_GLrop_Indexfv 25
875 void
876 __indirect_glIndexf(GLfloat c)
877 {
878 __GLXcontext * const gc = __glXGetCurrentContext();
879 const GLuint cmdlen = 8;
880 emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
881 (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
882 gc->pc += cmdlen;
883 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
884 }
885
886 #define X_GLrop_Indexfv 25
887 void
888 __indirect_glIndexfv(const GLfloat * c)
889 {
890 generic_4_byte( X_GLrop_Indexfv, c );
891 }
892
893 #define X_GLrop_Indexiv 26
894 void
895 __indirect_glIndexi(GLint c)
896 {
897 __GLXcontext * const gc = __glXGetCurrentContext();
898 const GLuint cmdlen = 8;
899 emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
900 (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
901 gc->pc += cmdlen;
902 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
903 }
904
905 #define X_GLrop_Indexiv 26
906 void
907 __indirect_glIndexiv(const GLint * c)
908 {
909 generic_4_byte( X_GLrop_Indexiv, c );
910 }
911
912 #define X_GLrop_Indexsv 27
913 void
914 __indirect_glIndexs(GLshort c)
915 {
916 __GLXcontext * const gc = __glXGetCurrentContext();
917 const GLuint cmdlen = 8;
918 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
919 (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 2);
920 gc->pc += cmdlen;
921 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
922 }
923
924 #define X_GLrop_Indexsv 27
925 void
926 __indirect_glIndexsv(const GLshort * c)
927 {
928 __GLXcontext * const gc = __glXGetCurrentContext();
929 const GLuint cmdlen = 8;
930 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
931 (void) memcpy((void *)(gc->pc + 4), (void *)(c), 2);
932 gc->pc += cmdlen;
933 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
934 }
935
936 #define X_GLrop_Normal3bv 28
937 void
938 __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
939 {
940 __GLXcontext * const gc = __glXGetCurrentContext();
941 const GLuint cmdlen = 8;
942 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);
946 gc->pc += cmdlen;
947 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
948 }
949
950 #define X_GLrop_Normal3bv 28
951 void
952 __indirect_glNormal3bv(const GLbyte * v)
953 {
954 generic_3_byte( X_GLrop_Normal3bv, v );
955 }
956
957 #define X_GLrop_Normal3dv 29
958 void
959 __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
960 {
961 __GLXcontext * const gc = __glXGetCurrentContext();
962 const GLuint cmdlen = 28;
963 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);
967 gc->pc += cmdlen;
968 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
969 }
970
971 #define X_GLrop_Normal3dv 29
972 void
973 __indirect_glNormal3dv(const GLdouble * v)
974 {
975 generic_24_byte( X_GLrop_Normal3dv, v );
976 }
977
978 #define X_GLrop_Normal3fv 30
979 void
980 __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
981 {
982 __GLXcontext * const gc = __glXGetCurrentContext();
983 const GLuint cmdlen = 16;
984 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);
988 gc->pc += cmdlen;
989 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
990 }
991
992 #define X_GLrop_Normal3fv 30
993 void
994 __indirect_glNormal3fv(const GLfloat * v)
995 {
996 generic_12_byte( X_GLrop_Normal3fv, v );
997 }
998
999 #define X_GLrop_Normal3iv 31
1000 void
1001 __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
1002 {
1003 __GLXcontext * const gc = __glXGetCurrentContext();
1004 const GLuint cmdlen = 16;
1005 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);
1009 gc->pc += cmdlen;
1010 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1011 }
1012
1013 #define X_GLrop_Normal3iv 31
1014 void
1015 __indirect_glNormal3iv(const GLint * v)
1016 {
1017 generic_12_byte( X_GLrop_Normal3iv, v );
1018 }
1019
1020 #define X_GLrop_Normal3sv 32
1021 void
1022 __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
1023 {
1024 __GLXcontext * const gc = __glXGetCurrentContext();
1025 const GLuint cmdlen = 12;
1026 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);
1030 gc->pc += cmdlen;
1031 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1032 }
1033
1034 #define X_GLrop_Normal3sv 32
1035 void
1036 __indirect_glNormal3sv(const GLshort * v)
1037 {
1038 generic_6_byte( X_GLrop_Normal3sv, v );
1039 }
1040
1041 #define X_GLrop_RasterPos2dv 33
1042 void
1043 __indirect_glRasterPos2d(GLdouble x, GLdouble y)
1044 {
1045 __GLXcontext * const gc = __glXGetCurrentContext();
1046 const GLuint cmdlen = 20;
1047 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);
1050 gc->pc += cmdlen;
1051 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1052 }
1053
1054 #define X_GLrop_RasterPos2dv 33
1055 void
1056 __indirect_glRasterPos2dv(const GLdouble * v)
1057 {
1058 generic_16_byte( X_GLrop_RasterPos2dv, v );
1059 }
1060
1061 #define X_GLrop_RasterPos2fv 34
1062 void
1063 __indirect_glRasterPos2f(GLfloat x, GLfloat y)
1064 {
1065 __GLXcontext * const gc = __glXGetCurrentContext();
1066 const GLuint cmdlen = 12;
1067 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);
1070 gc->pc += cmdlen;
1071 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1072 }
1073
1074 #define X_GLrop_RasterPos2fv 34
1075 void
1076 __indirect_glRasterPos2fv(const GLfloat * v)
1077 {
1078 generic_8_byte( X_GLrop_RasterPos2fv, v );
1079 }
1080
1081 #define X_GLrop_RasterPos2iv 35
1082 void
1083 __indirect_glRasterPos2i(GLint x, GLint y)
1084 {
1085 __GLXcontext * const gc = __glXGetCurrentContext();
1086 const GLuint cmdlen = 12;
1087 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);
1090 gc->pc += cmdlen;
1091 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1092 }
1093
1094 #define X_GLrop_RasterPos2iv 35
1095 void
1096 __indirect_glRasterPos2iv(const GLint * v)
1097 {
1098 generic_8_byte( X_GLrop_RasterPos2iv, v );
1099 }
1100
1101 #define X_GLrop_RasterPos2sv 36
1102 void
1103 __indirect_glRasterPos2s(GLshort x, GLshort y)
1104 {
1105 __GLXcontext * const gc = __glXGetCurrentContext();
1106 const GLuint cmdlen = 8;
1107 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);
1110 gc->pc += cmdlen;
1111 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1112 }
1113
1114 #define X_GLrop_RasterPos2sv 36
1115 void
1116 __indirect_glRasterPos2sv(const GLshort * v)
1117 {
1118 generic_4_byte( X_GLrop_RasterPos2sv, v );
1119 }
1120
1121 #define X_GLrop_RasterPos3dv 37
1122 void
1123 __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
1124 {
1125 __GLXcontext * const gc = __glXGetCurrentContext();
1126 const GLuint cmdlen = 28;
1127 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);
1131 gc->pc += cmdlen;
1132 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1133 }
1134
1135 #define X_GLrop_RasterPos3dv 37
1136 void
1137 __indirect_glRasterPos3dv(const GLdouble * v)
1138 {
1139 generic_24_byte( X_GLrop_RasterPos3dv, v );
1140 }
1141
1142 #define X_GLrop_RasterPos3fv 38
1143 void
1144 __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
1145 {
1146 __GLXcontext * const gc = __glXGetCurrentContext();
1147 const GLuint cmdlen = 16;
1148 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);
1152 gc->pc += cmdlen;
1153 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1154 }
1155
1156 #define X_GLrop_RasterPos3fv 38
1157 void
1158 __indirect_glRasterPos3fv(const GLfloat * v)
1159 {
1160 generic_12_byte( X_GLrop_RasterPos3fv, v );
1161 }
1162
1163 #define X_GLrop_RasterPos3iv 39
1164 void
1165 __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
1166 {
1167 __GLXcontext * const gc = __glXGetCurrentContext();
1168 const GLuint cmdlen = 16;
1169 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);
1173 gc->pc += cmdlen;
1174 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1175 }
1176
1177 #define X_GLrop_RasterPos3iv 39
1178 void
1179 __indirect_glRasterPos3iv(const GLint * v)
1180 {
1181 generic_12_byte( X_GLrop_RasterPos3iv, v );
1182 }
1183
1184 #define X_GLrop_RasterPos3sv 40
1185 void
1186 __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
1187 {
1188 __GLXcontext * const gc = __glXGetCurrentContext();
1189 const GLuint cmdlen = 12;
1190 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);
1194 gc->pc += cmdlen;
1195 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1196 }
1197
1198 #define X_GLrop_RasterPos3sv 40
1199 void
1200 __indirect_glRasterPos3sv(const GLshort * v)
1201 {
1202 generic_6_byte( X_GLrop_RasterPos3sv, v );
1203 }
1204
1205 #define X_GLrop_RasterPos4dv 41
1206 void
1207 __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1208 {
1209 __GLXcontext * const gc = __glXGetCurrentContext();
1210 const GLuint cmdlen = 36;
1211 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);
1216 gc->pc += cmdlen;
1217 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1218 }
1219
1220 #define X_GLrop_RasterPos4dv 41
1221 void
1222 __indirect_glRasterPos4dv(const GLdouble * v)
1223 {
1224 generic_32_byte( X_GLrop_RasterPos4dv, v );
1225 }
1226
1227 #define X_GLrop_RasterPos4fv 42
1228 void
1229 __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1230 {
1231 __GLXcontext * const gc = __glXGetCurrentContext();
1232 const GLuint cmdlen = 20;
1233 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);
1238 gc->pc += cmdlen;
1239 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1240 }
1241
1242 #define X_GLrop_RasterPos4fv 42
1243 void
1244 __indirect_glRasterPos4fv(const GLfloat * v)
1245 {
1246 generic_16_byte( X_GLrop_RasterPos4fv, v );
1247 }
1248
1249 #define X_GLrop_RasterPos4iv 43
1250 void
1251 __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
1252 {
1253 __GLXcontext * const gc = __glXGetCurrentContext();
1254 const GLuint cmdlen = 20;
1255 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);
1260 gc->pc += cmdlen;
1261 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1262 }
1263
1264 #define X_GLrop_RasterPos4iv 43
1265 void
1266 __indirect_glRasterPos4iv(const GLint * v)
1267 {
1268 generic_16_byte( X_GLrop_RasterPos4iv, v );
1269 }
1270
1271 #define X_GLrop_RasterPos4sv 44
1272 void
1273 __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
1274 {
1275 __GLXcontext * const gc = __glXGetCurrentContext();
1276 const GLuint cmdlen = 12;
1277 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);
1282 gc->pc += cmdlen;
1283 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1284 }
1285
1286 #define X_GLrop_RasterPos4sv 44
1287 void
1288 __indirect_glRasterPos4sv(const GLshort * v)
1289 {
1290 generic_8_byte( X_GLrop_RasterPos4sv, v );
1291 }
1292
1293 #define X_GLrop_Rectdv 45
1294 void
1295 __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1296 {
1297 __GLXcontext * const gc = __glXGetCurrentContext();
1298 const GLuint cmdlen = 36;
1299 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);
1304 gc->pc += cmdlen;
1305 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1306 }
1307
1308 #define X_GLrop_Rectdv 45
1309 void
1310 __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
1311 {
1312 __GLXcontext * const gc = __glXGetCurrentContext();
1313 const GLuint cmdlen = 36;
1314 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);
1317 gc->pc += cmdlen;
1318 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1319 }
1320
1321 #define X_GLrop_Rectfv 46
1322 void
1323 __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
1324 {
1325 __GLXcontext * const gc = __glXGetCurrentContext();
1326 const GLuint cmdlen = 20;
1327 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);
1332 gc->pc += cmdlen;
1333 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1334 }
1335
1336 #define X_GLrop_Rectfv 46
1337 void
1338 __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
1339 {
1340 __GLXcontext * const gc = __glXGetCurrentContext();
1341 const GLuint cmdlen = 20;
1342 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);
1345 gc->pc += cmdlen;
1346 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1347 }
1348
1349 #define X_GLrop_Rectiv 47
1350 void
1351 __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
1352 {
1353 __GLXcontext * const gc = __glXGetCurrentContext();
1354 const GLuint cmdlen = 20;
1355 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);
1360 gc->pc += cmdlen;
1361 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1362 }
1363
1364 #define X_GLrop_Rectiv 47
1365 void
1366 __indirect_glRectiv(const GLint * v1, const GLint * v2)
1367 {
1368 __GLXcontext * const gc = __glXGetCurrentContext();
1369 const GLuint cmdlen = 20;
1370 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);
1373 gc->pc += cmdlen;
1374 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1375 }
1376
1377 #define X_GLrop_Rectsv 48
1378 void
1379 __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1380 {
1381 __GLXcontext * const gc = __glXGetCurrentContext();
1382 const GLuint cmdlen = 12;
1383 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);
1388 gc->pc += cmdlen;
1389 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1390 }
1391
1392 #define X_GLrop_Rectsv 48
1393 void
1394 __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
1395 {
1396 __GLXcontext * const gc = __glXGetCurrentContext();
1397 const GLuint cmdlen = 12;
1398 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);
1401 gc->pc += cmdlen;
1402 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1403 }
1404
1405 #define X_GLrop_TexCoord1dv 49
1406 void
1407 __indirect_glTexCoord1d(GLdouble s)
1408 {
1409 __GLXcontext * const gc = __glXGetCurrentContext();
1410 const GLuint cmdlen = 12;
1411 emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
1412 (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8);
1413 gc->pc += cmdlen;
1414 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1415 }
1416
1417 #define X_GLrop_TexCoord1dv 49
1418 void
1419 __indirect_glTexCoord1dv(const GLdouble * v)
1420 {
1421 generic_8_byte( X_GLrop_TexCoord1dv, v );
1422 }
1423
1424 #define X_GLrop_TexCoord1fv 50
1425 void
1426 __indirect_glTexCoord1f(GLfloat s)
1427 {
1428 __GLXcontext * const gc = __glXGetCurrentContext();
1429 const GLuint cmdlen = 8;
1430 emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
1431 (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1432 gc->pc += cmdlen;
1433 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1434 }
1435
1436 #define X_GLrop_TexCoord1fv 50
1437 void
1438 __indirect_glTexCoord1fv(const GLfloat * v)
1439 {
1440 generic_4_byte( X_GLrop_TexCoord1fv, v );
1441 }
1442
1443 #define X_GLrop_TexCoord1iv 51
1444 void
1445 __indirect_glTexCoord1i(GLint s)
1446 {
1447 __GLXcontext * const gc = __glXGetCurrentContext();
1448 const GLuint cmdlen = 8;
1449 emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
1450 (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
1451 gc->pc += cmdlen;
1452 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1453 }
1454
1455 #define X_GLrop_TexCoord1iv 51
1456 void
1457 __indirect_glTexCoord1iv(const GLint * v)
1458 {
1459 generic_4_byte( X_GLrop_TexCoord1iv, v );
1460 }
1461
1462 #define X_GLrop_TexCoord1sv 52
1463 void
1464 __indirect_glTexCoord1s(GLshort s)
1465 {
1466 __GLXcontext * const gc = __glXGetCurrentContext();
1467 const GLuint cmdlen = 8;
1468 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1469 (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2);
1470 gc->pc += cmdlen;
1471 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1472 }
1473
1474 #define X_GLrop_TexCoord1sv 52
1475 void
1476 __indirect_glTexCoord1sv(const GLshort * v)
1477 {
1478 __GLXcontext * const gc = __glXGetCurrentContext();
1479 const GLuint cmdlen = 8;
1480 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1481 (void) memcpy((void *)(gc->pc + 4), (void *)(v), 2);
1482 gc->pc += cmdlen;
1483 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1484 }
1485
1486 #define X_GLrop_TexCoord2dv 53
1487 void
1488 __indirect_glTexCoord2d(GLdouble s, GLdouble t)
1489 {
1490 __GLXcontext * const gc = __glXGetCurrentContext();
1491 const GLuint cmdlen = 20;
1492 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);
1495 gc->pc += cmdlen;
1496 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1497 }
1498
1499 #define X_GLrop_TexCoord2dv 53
1500 void
1501 __indirect_glTexCoord2dv(const GLdouble * v)
1502 {
1503 generic_16_byte( X_GLrop_TexCoord2dv, v );
1504 }
1505
1506 #define X_GLrop_TexCoord2fv 54
1507 void
1508 __indirect_glTexCoord2f(GLfloat s, GLfloat t)
1509 {
1510 __GLXcontext * const gc = __glXGetCurrentContext();
1511 const GLuint cmdlen = 12;
1512 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);
1515 gc->pc += cmdlen;
1516 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1517 }
1518
1519 #define X_GLrop_TexCoord2fv 54
1520 void
1521 __indirect_glTexCoord2fv(const GLfloat * v)
1522 {
1523 generic_8_byte( X_GLrop_TexCoord2fv, v );
1524 }
1525
1526 #define X_GLrop_TexCoord2iv 55
1527 void
1528 __indirect_glTexCoord2i(GLint s, GLint t)
1529 {
1530 __GLXcontext * const gc = __glXGetCurrentContext();
1531 const GLuint cmdlen = 12;
1532 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);
1535 gc->pc += cmdlen;
1536 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1537 }
1538
1539 #define X_GLrop_TexCoord2iv 55
1540 void
1541 __indirect_glTexCoord2iv(const GLint * v)
1542 {
1543 generic_8_byte( X_GLrop_TexCoord2iv, v );
1544 }
1545
1546 #define X_GLrop_TexCoord2sv 56
1547 void
1548 __indirect_glTexCoord2s(GLshort s, GLshort t)
1549 {
1550 __GLXcontext * const gc = __glXGetCurrentContext();
1551 const GLuint cmdlen = 8;
1552 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);
1555 gc->pc += cmdlen;
1556 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1557 }
1558
1559 #define X_GLrop_TexCoord2sv 56
1560 void
1561 __indirect_glTexCoord2sv(const GLshort * v)
1562 {
1563 generic_4_byte( X_GLrop_TexCoord2sv, v );
1564 }
1565
1566 #define X_GLrop_TexCoord3dv 57
1567 void
1568 __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
1569 {
1570 __GLXcontext * const gc = __glXGetCurrentContext();
1571 const GLuint cmdlen = 28;
1572 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);
1576 gc->pc += cmdlen;
1577 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1578 }
1579
1580 #define X_GLrop_TexCoord3dv 57
1581 void
1582 __indirect_glTexCoord3dv(const GLdouble * v)
1583 {
1584 generic_24_byte( X_GLrop_TexCoord3dv, v );
1585 }
1586
1587 #define X_GLrop_TexCoord3fv 58
1588 void
1589 __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
1590 {
1591 __GLXcontext * const gc = __glXGetCurrentContext();
1592 const GLuint cmdlen = 16;
1593 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);
1597 gc->pc += cmdlen;
1598 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1599 }
1600
1601 #define X_GLrop_TexCoord3fv 58
1602 void
1603 __indirect_glTexCoord3fv(const GLfloat * v)
1604 {
1605 generic_12_byte( X_GLrop_TexCoord3fv, v );
1606 }
1607
1608 #define X_GLrop_TexCoord3iv 59
1609 void
1610 __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
1611 {
1612 __GLXcontext * const gc = __glXGetCurrentContext();
1613 const GLuint cmdlen = 16;
1614 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);
1618 gc->pc += cmdlen;
1619 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1620 }
1621
1622 #define X_GLrop_TexCoord3iv 59
1623 void
1624 __indirect_glTexCoord3iv(const GLint * v)
1625 {
1626 generic_12_byte( X_GLrop_TexCoord3iv, v );
1627 }
1628
1629 #define X_GLrop_TexCoord3sv 60
1630 void
1631 __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
1632 {
1633 __GLXcontext * const gc = __glXGetCurrentContext();
1634 const GLuint cmdlen = 12;
1635 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);
1639 gc->pc += cmdlen;
1640 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1641 }
1642
1643 #define X_GLrop_TexCoord3sv 60
1644 void
1645 __indirect_glTexCoord3sv(const GLshort * v)
1646 {
1647 generic_6_byte( X_GLrop_TexCoord3sv, v );
1648 }
1649
1650 #define X_GLrop_TexCoord4dv 61
1651 void
1652 __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1653 {
1654 __GLXcontext * const gc = __glXGetCurrentContext();
1655 const GLuint cmdlen = 36;
1656 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);
1661 gc->pc += cmdlen;
1662 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1663 }
1664
1665 #define X_GLrop_TexCoord4dv 61
1666 void
1667 __indirect_glTexCoord4dv(const GLdouble * v)
1668 {
1669 generic_32_byte( X_GLrop_TexCoord4dv, v );
1670 }
1671
1672 #define X_GLrop_TexCoord4fv 62
1673 void
1674 __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1675 {
1676 __GLXcontext * const gc = __glXGetCurrentContext();
1677 const GLuint cmdlen = 20;
1678 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);
1683 gc->pc += cmdlen;
1684 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1685 }
1686
1687 #define X_GLrop_TexCoord4fv 62
1688 void
1689 __indirect_glTexCoord4fv(const GLfloat * v)
1690 {
1691 generic_16_byte( X_GLrop_TexCoord4fv, v );
1692 }
1693
1694 #define X_GLrop_TexCoord4iv 63
1695 void
1696 __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
1697 {
1698 __GLXcontext * const gc = __glXGetCurrentContext();
1699 const GLuint cmdlen = 20;
1700 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);
1705 gc->pc += cmdlen;
1706 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1707 }
1708
1709 #define X_GLrop_TexCoord4iv 63
1710 void
1711 __indirect_glTexCoord4iv(const GLint * v)
1712 {
1713 generic_16_byte( X_GLrop_TexCoord4iv, v );
1714 }
1715
1716 #define X_GLrop_TexCoord4sv 64
1717 void
1718 __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
1719 {
1720 __GLXcontext * const gc = __glXGetCurrentContext();
1721 const GLuint cmdlen = 12;
1722 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);
1727 gc->pc += cmdlen;
1728 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1729 }
1730
1731 #define X_GLrop_TexCoord4sv 64
1732 void
1733 __indirect_glTexCoord4sv(const GLshort * v)
1734 {
1735 generic_8_byte( X_GLrop_TexCoord4sv, v );
1736 }
1737
1738 #define X_GLrop_Vertex2dv 65
1739 void
1740 __indirect_glVertex2d(GLdouble x, GLdouble y)
1741 {
1742 __GLXcontext * const gc = __glXGetCurrentContext();
1743 const GLuint cmdlen = 20;
1744 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);
1747 gc->pc += cmdlen;
1748 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1749 }
1750
1751 #define X_GLrop_Vertex2dv 65
1752 void
1753 __indirect_glVertex2dv(const GLdouble * v)
1754 {
1755 generic_16_byte( X_GLrop_Vertex2dv, v );
1756 }
1757
1758 #define X_GLrop_Vertex2fv 66
1759 void
1760 __indirect_glVertex2f(GLfloat x, GLfloat y)
1761 {
1762 __GLXcontext * const gc = __glXGetCurrentContext();
1763 const GLuint cmdlen = 12;
1764 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);
1767 gc->pc += cmdlen;
1768 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1769 }
1770
1771 #define X_GLrop_Vertex2fv 66
1772 void
1773 __indirect_glVertex2fv(const GLfloat * v)
1774 {
1775 generic_8_byte( X_GLrop_Vertex2fv, v );
1776 }
1777
1778 #define X_GLrop_Vertex2iv 67
1779 void
1780 __indirect_glVertex2i(GLint x, GLint y)
1781 {
1782 __GLXcontext * const gc = __glXGetCurrentContext();
1783 const GLuint cmdlen = 12;
1784 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);
1787 gc->pc += cmdlen;
1788 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1789 }
1790
1791 #define X_GLrop_Vertex2iv 67
1792 void
1793 __indirect_glVertex2iv(const GLint * v)
1794 {
1795 generic_8_byte( X_GLrop_Vertex2iv, v );
1796 }
1797
1798 #define X_GLrop_Vertex2sv 68
1799 void
1800 __indirect_glVertex2s(GLshort x, GLshort y)
1801 {
1802 __GLXcontext * const gc = __glXGetCurrentContext();
1803 const GLuint cmdlen = 8;
1804 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);
1807 gc->pc += cmdlen;
1808 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1809 }
1810
1811 #define X_GLrop_Vertex2sv 68
1812 void
1813 __indirect_glVertex2sv(const GLshort * v)
1814 {
1815 generic_4_byte( X_GLrop_Vertex2sv, v );
1816 }
1817
1818 #define X_GLrop_Vertex3dv 69
1819 void
1820 __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
1821 {
1822 __GLXcontext * const gc = __glXGetCurrentContext();
1823 const GLuint cmdlen = 28;
1824 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);
1828 gc->pc += cmdlen;
1829 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1830 }
1831
1832 #define X_GLrop_Vertex3dv 69
1833 void
1834 __indirect_glVertex3dv(const GLdouble * v)
1835 {
1836 generic_24_byte( X_GLrop_Vertex3dv, v );
1837 }
1838
1839 #define X_GLrop_Vertex3fv 70
1840 void
1841 __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
1842 {
1843 __GLXcontext * const gc = __glXGetCurrentContext();
1844 const GLuint cmdlen = 16;
1845 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);
1849 gc->pc += cmdlen;
1850 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1851 }
1852
1853 #define X_GLrop_Vertex3fv 70
1854 void
1855 __indirect_glVertex3fv(const GLfloat * v)
1856 {
1857 generic_12_byte( X_GLrop_Vertex3fv, v );
1858 }
1859
1860 #define X_GLrop_Vertex3iv 71
1861 void
1862 __indirect_glVertex3i(GLint x, GLint y, GLint z)
1863 {
1864 __GLXcontext * const gc = __glXGetCurrentContext();
1865 const GLuint cmdlen = 16;
1866 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);
1870 gc->pc += cmdlen;
1871 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1872 }
1873
1874 #define X_GLrop_Vertex3iv 71
1875 void
1876 __indirect_glVertex3iv(const GLint * v)
1877 {
1878 generic_12_byte( X_GLrop_Vertex3iv, v );
1879 }
1880
1881 #define X_GLrop_Vertex3sv 72
1882 void
1883 __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
1884 {
1885 __GLXcontext * const gc = __glXGetCurrentContext();
1886 const GLuint cmdlen = 12;
1887 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);
1891 gc->pc += cmdlen;
1892 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1893 }
1894
1895 #define X_GLrop_Vertex3sv 72
1896 void
1897 __indirect_glVertex3sv(const GLshort * v)
1898 {
1899 generic_6_byte( X_GLrop_Vertex3sv, v );
1900 }
1901
1902 #define X_GLrop_Vertex4dv 73
1903 void
1904 __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1905 {
1906 __GLXcontext * const gc = __glXGetCurrentContext();
1907 const GLuint cmdlen = 36;
1908 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);
1913 gc->pc += cmdlen;
1914 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1915 }
1916
1917 #define X_GLrop_Vertex4dv 73
1918 void
1919 __indirect_glVertex4dv(const GLdouble * v)
1920 {
1921 generic_32_byte( X_GLrop_Vertex4dv, v );
1922 }
1923
1924 #define X_GLrop_Vertex4fv 74
1925 void
1926 __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1927 {
1928 __GLXcontext * const gc = __glXGetCurrentContext();
1929 const GLuint cmdlen = 20;
1930 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);
1935 gc->pc += cmdlen;
1936 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1937 }
1938
1939 #define X_GLrop_Vertex4fv 74
1940 void
1941 __indirect_glVertex4fv(const GLfloat * v)
1942 {
1943 generic_16_byte( X_GLrop_Vertex4fv, v );
1944 }
1945
1946 #define X_GLrop_Vertex4iv 75
1947 void
1948 __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
1949 {
1950 __GLXcontext * const gc = __glXGetCurrentContext();
1951 const GLuint cmdlen = 20;
1952 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);
1957 gc->pc += cmdlen;
1958 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1959 }
1960
1961 #define X_GLrop_Vertex4iv 75
1962 void
1963 __indirect_glVertex4iv(const GLint * v)
1964 {
1965 generic_16_byte( X_GLrop_Vertex4iv, v );
1966 }
1967
1968 #define X_GLrop_Vertex4sv 76
1969 void
1970 __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
1971 {
1972 __GLXcontext * const gc = __glXGetCurrentContext();
1973 const GLuint cmdlen = 12;
1974 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);
1979 gc->pc += cmdlen;
1980 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
1981 }
1982
1983 #define X_GLrop_Vertex4sv 76
1984 void
1985 __indirect_glVertex4sv(const GLshort * v)
1986 {
1987 generic_8_byte( X_GLrop_Vertex4sv, v );
1988 }
1989
1990 #define X_GLrop_ClipPlane 77
1991 void
1992 __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
1993 {
1994 __GLXcontext * const gc = __glXGetCurrentContext();
1995 const GLuint cmdlen = 40;
1996 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);
1999 gc->pc += cmdlen;
2000 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2001 }
2002
2003 #define X_GLrop_ColorMaterial 78
2004 void
2005 __indirect_glColorMaterial(GLenum face, GLenum mode)
2006 {
2007 __GLXcontext * const gc = __glXGetCurrentContext();
2008 const GLuint cmdlen = 12;
2009 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);
2012 gc->pc += cmdlen;
2013 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2014 }
2015
2016 #define X_GLrop_CullFace 79
2017 void
2018 __indirect_glCullFace(GLenum mode)
2019 {
2020 __GLXcontext * const gc = __glXGetCurrentContext();
2021 const GLuint cmdlen = 8;
2022 emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
2023 (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
2024 gc->pc += cmdlen;
2025 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2026 }
2027
2028 #define X_GLrop_Fogf 80
2029 void
2030 __indirect_glFogf(GLenum pname, GLfloat param)
2031 {
2032 __GLXcontext * const gc = __glXGetCurrentContext();
2033 const GLuint cmdlen = 12;
2034 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);
2037 gc->pc += cmdlen;
2038 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2039 }
2040
2041 #define X_GLrop_Fogfv 81
2042 void
2043 __indirect_glFogfv(GLenum pname, const GLfloat * params)
2044 {
2045 __GLXcontext * const gc = __glXGetCurrentContext();
2046 const GLuint compsize = __glFogfv_size(pname);
2047 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2048 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));
2051 gc->pc += cmdlen;
2052 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2053 }
2054
2055 #define X_GLrop_Fogi 82
2056 void
2057 __indirect_glFogi(GLenum pname, GLint param)
2058 {
2059 __GLXcontext * const gc = __glXGetCurrentContext();
2060 const GLuint cmdlen = 12;
2061 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);
2064 gc->pc += cmdlen;
2065 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2066 }
2067
2068 #define X_GLrop_Fogiv 83
2069 void
2070 __indirect_glFogiv(GLenum pname, const GLint * params)
2071 {
2072 __GLXcontext * const gc = __glXGetCurrentContext();
2073 const GLuint compsize = __glFogiv_size(pname);
2074 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2075 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));
2078 gc->pc += cmdlen;
2079 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2080 }
2081
2082 #define X_GLrop_FrontFace 84
2083 void
2084 __indirect_glFrontFace(GLenum mode)
2085 {
2086 __GLXcontext * const gc = __glXGetCurrentContext();
2087 const GLuint cmdlen = 8;
2088 emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
2089 (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
2090 gc->pc += cmdlen;
2091 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2092 }
2093
2094 #define X_GLrop_Hint 85
2095 void
2096 __indirect_glHint(GLenum target, GLenum mode)
2097 {
2098 __GLXcontext * const gc = __glXGetCurrentContext();
2099 const GLuint cmdlen = 12;
2100 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);
2103 gc->pc += cmdlen;
2104 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2105 }
2106
2107 #define X_GLrop_Lightf 86
2108 void
2109 __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
2110 {
2111 __GLXcontext * const gc = __glXGetCurrentContext();
2112 const GLuint cmdlen = 16;
2113 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);
2117 gc->pc += cmdlen;
2118 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2119 }
2120
2121 #define X_GLrop_Lightfv 87
2122 void
2123 __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
2124 {
2125 __GLXcontext * const gc = __glXGetCurrentContext();
2126 const GLuint compsize = __glLightfv_size(pname);
2127 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2128 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));
2132 gc->pc += cmdlen;
2133 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2134 }
2135
2136 #define X_GLrop_Lighti 88
2137 void
2138 __indirect_glLighti(GLenum light, GLenum pname, GLint param)
2139 {
2140 __GLXcontext * const gc = __glXGetCurrentContext();
2141 const GLuint cmdlen = 16;
2142 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);
2146 gc->pc += cmdlen;
2147 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2148 }
2149
2150 #define X_GLrop_Lightiv 89
2151 void
2152 __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
2153 {
2154 __GLXcontext * const gc = __glXGetCurrentContext();
2155 const GLuint compsize = __glLightiv_size(pname);
2156 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2157 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));
2161 gc->pc += cmdlen;
2162 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2163 }
2164
2165 #define X_GLrop_LightModelf 90
2166 void
2167 __indirect_glLightModelf(GLenum pname, GLfloat param)
2168 {
2169 __GLXcontext * const gc = __glXGetCurrentContext();
2170 const GLuint cmdlen = 12;
2171 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);
2174 gc->pc += cmdlen;
2175 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2176 }
2177
2178 #define X_GLrop_LightModelfv 91
2179 void
2180 __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
2181 {
2182 __GLXcontext * const gc = __glXGetCurrentContext();
2183 const GLuint compsize = __glLightModelfv_size(pname);
2184 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2185 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));
2188 gc->pc += cmdlen;
2189 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2190 }
2191
2192 #define X_GLrop_LightModeli 92
2193 void
2194 __indirect_glLightModeli(GLenum pname, GLint param)
2195 {
2196 __GLXcontext * const gc = __glXGetCurrentContext();
2197 const GLuint cmdlen = 12;
2198 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);
2201 gc->pc += cmdlen;
2202 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2203 }
2204
2205 #define X_GLrop_LightModeliv 93
2206 void
2207 __indirect_glLightModeliv(GLenum pname, const GLint * params)
2208 {
2209 __GLXcontext * const gc = __glXGetCurrentContext();
2210 const GLuint compsize = __glLightModeliv_size(pname);
2211 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2212 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));
2215 gc->pc += cmdlen;
2216 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2217 }
2218
2219 #define X_GLrop_LineStipple 94
2220 void
2221 __indirect_glLineStipple(GLint factor, GLushort pattern)
2222 {
2223 __GLXcontext * const gc = __glXGetCurrentContext();
2224 const GLuint cmdlen = 12;
2225 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);
2228 gc->pc += cmdlen;
2229 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2230 }
2231
2232 #define X_GLrop_LineWidth 95
2233 void
2234 __indirect_glLineWidth(GLfloat width)
2235 {
2236 __GLXcontext * const gc = __glXGetCurrentContext();
2237 const GLuint cmdlen = 8;
2238 emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
2239 (void) memcpy((void *)(gc->pc + 4), (void *)(&width), 4);
2240 gc->pc += cmdlen;
2241 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2242 }
2243
2244 #define X_GLrop_Materialf 96
2245 void
2246 __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
2247 {
2248 __GLXcontext * const gc = __glXGetCurrentContext();
2249 const GLuint cmdlen = 16;
2250 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);
2254 gc->pc += cmdlen;
2255 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2256 }
2257
2258 #define X_GLrop_Materialfv 97
2259 void
2260 __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
2261 {
2262 __GLXcontext * const gc = __glXGetCurrentContext();
2263 const GLuint compsize = __glMaterialfv_size(pname);
2264 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2265 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));
2269 gc->pc += cmdlen;
2270 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2271 }
2272
2273 #define X_GLrop_Materiali 98
2274 void
2275 __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
2276 {
2277 __GLXcontext * const gc = __glXGetCurrentContext();
2278 const GLuint cmdlen = 16;
2279 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);
2283 gc->pc += cmdlen;
2284 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2285 }
2286
2287 #define X_GLrop_Materialiv 99
2288 void
2289 __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
2290 {
2291 __GLXcontext * const gc = __glXGetCurrentContext();
2292 const GLuint compsize = __glMaterialiv_size(pname);
2293 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2294 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));
2298 gc->pc += cmdlen;
2299 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2300 }
2301
2302 #define X_GLrop_PointSize 100
2303 void
2304 __indirect_glPointSize(GLfloat size)
2305 {
2306 __GLXcontext * const gc = __glXGetCurrentContext();
2307 const GLuint cmdlen = 8;
2308 emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
2309 (void) memcpy((void *)(gc->pc + 4), (void *)(&size), 4);
2310 gc->pc += cmdlen;
2311 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2312 }
2313
2314 #define X_GLrop_PolygonMode 101
2315 void
2316 __indirect_glPolygonMode(GLenum face, GLenum mode)
2317 {
2318 __GLXcontext * const gc = __glXGetCurrentContext();
2319 const GLuint cmdlen = 12;
2320 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);
2323 gc->pc += cmdlen;
2324 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2325 }
2326
2327 #define X_GLrop_PolygonStipple 102
2328 void
2329 __indirect_glPolygonStipple(const GLubyte * mask)
2330 {
2331 __GLXcontext * const gc = __glXGetCurrentContext();
2332 const GLuint compsize = (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0;
2333 const GLuint cmdlen = 24 + __GLX_PAD(compsize);
2334 emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
2335 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 );
2340 }
2341 gc->pc += cmdlen;
2342 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2343 }
2344
2345 #define X_GLrop_Scissor 103
2346 void
2347 __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
2348 {
2349 __GLXcontext * const gc = __glXGetCurrentContext();
2350 const GLuint cmdlen = 20;
2351 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);
2356 gc->pc += cmdlen;
2357 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2358 }
2359
2360 #define X_GLrop_ShadeModel 104
2361 void
2362 __indirect_glShadeModel(GLenum mode)
2363 {
2364 __GLXcontext * const gc = __glXGetCurrentContext();
2365 const GLuint cmdlen = 8;
2366 emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
2367 (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
2368 gc->pc += cmdlen;
2369 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2370 }
2371
2372 #define X_GLrop_TexParameterf 105
2373 void
2374 __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
2375 {
2376 __GLXcontext * const gc = __glXGetCurrentContext();
2377 const GLuint cmdlen = 16;
2378 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);
2382 gc->pc += cmdlen;
2383 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2384 }
2385
2386 #define X_GLrop_TexParameterfv 106
2387 void
2388 __indirect_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params)
2389 {
2390 __GLXcontext * const gc = __glXGetCurrentContext();
2391 const GLuint compsize = __glTexParameterfv_size(pname);
2392 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2393 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));
2397 gc->pc += cmdlen;
2398 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2399 }
2400
2401 #define X_GLrop_TexParameteri 107
2402 void
2403 __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
2404 {
2405 __GLXcontext * const gc = __glXGetCurrentContext();
2406 const GLuint cmdlen = 16;
2407 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);
2411 gc->pc += cmdlen;
2412 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2413 }
2414
2415 #define X_GLrop_TexParameteriv 108
2416 void
2417 __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
2418 {
2419 __GLXcontext * const gc = __glXGetCurrentContext();
2420 const GLuint compsize = __glTexParameteriv_size(pname);
2421 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2422 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));
2426 gc->pc += cmdlen;
2427 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2428 }
2429
2430 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 )
2432 {
2433 __GLXcontext * const gc = __glXGetCurrentContext();
2434 const GLuint compsize = __glImageSize(width, height, 1, format, type, target);
2435 const GLuint cmdlen = 56 + __GLX_PAD(compsize);
2436 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
2437 if (cmdlen <= gc->maxSmallRenderCommandSize) {
2438 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
2439 (void) __glXFlushRenderBuffer(gc, gc->pc);
2440 }
2441 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);
2450 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 );
2455 }
2456 gc->pc += cmdlen;
2457 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2458 }
2459 else {
2460 const GLint op = opcode;
2461 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);
2474 }
2475 }
2476 }
2477
2478 #define X_GLrop_TexImage1D 109
2479 void
2480 __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
2481 {
2482 __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat, width, 1, border, format, type, pixels );
2483 }
2484
2485 #define X_GLrop_TexImage2D 110
2486 void
2487 __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
2488 {
2489 __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat, width, height, border, format, type, pixels );
2490 }
2491
2492 #define X_GLrop_TexEnvf 111
2493 void
2494 __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
2495 {
2496 __GLXcontext * const gc = __glXGetCurrentContext();
2497 const GLuint cmdlen = 16;
2498 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);
2502 gc->pc += cmdlen;
2503 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2504 }
2505
2506 #define X_GLrop_TexEnvfv 112
2507 void
2508 __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
2509 {
2510 __GLXcontext * const gc = __glXGetCurrentContext();
2511 const GLuint compsize = __glTexEnvfv_size(pname);
2512 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2513 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));
2517 gc->pc += cmdlen;
2518 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2519 }
2520
2521 #define X_GLrop_TexEnvi 113
2522 void
2523 __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
2524 {
2525 __GLXcontext * const gc = __glXGetCurrentContext();
2526 const GLuint cmdlen = 16;
2527 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);
2531 gc->pc += cmdlen;
2532 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2533 }
2534
2535 #define X_GLrop_TexEnviv 114
2536 void
2537 __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
2538 {
2539 __GLXcontext * const gc = __glXGetCurrentContext();
2540 const GLuint compsize = __glTexEnviv_size(pname);
2541 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2542 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));
2546 gc->pc += cmdlen;
2547 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2548 }
2549
2550 #define X_GLrop_TexGend 115
2551 void
2552 __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
2553 {
2554 __GLXcontext * const gc = __glXGetCurrentContext();
2555 const GLuint cmdlen = 20;
2556 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);
2560 gc->pc += cmdlen;
2561 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2562 }
2563
2564 #define X_GLrop_TexGendv 116
2565 void
2566 __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
2567 {
2568 __GLXcontext * const gc = __glXGetCurrentContext();
2569 const GLuint compsize = __glTexGendv_size(pname);
2570 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
2571 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));
2575 gc->pc += cmdlen;
2576 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2577 }
2578
2579 #define X_GLrop_TexGenf 117
2580 void
2581 __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
2582 {
2583 __GLXcontext * const gc = __glXGetCurrentContext();
2584 const GLuint cmdlen = 16;
2585 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);
2589 gc->pc += cmdlen;
2590 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2591 }
2592
2593 #define X_GLrop_TexGenfv 118
2594 void
2595 __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
2596 {
2597 __GLXcontext * const gc = __glXGetCurrentContext();
2598 const GLuint compsize = __glTexGenfv_size(pname);
2599 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2600 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));
2604 gc->pc += cmdlen;
2605 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2606 }
2607
2608 #define X_GLrop_TexGeni 119
2609 void
2610 __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
2611 {
2612 __GLXcontext * const gc = __glXGetCurrentContext();
2613 const GLuint cmdlen = 16;
2614 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);
2618 gc->pc += cmdlen;
2619 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2620 }
2621
2622 #define X_GLrop_TexGeniv 120
2623 void
2624 __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
2625 {
2626 __GLXcontext * const gc = __glXGetCurrentContext();
2627 const GLuint compsize = __glTexGeniv_size(pname);
2628 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2629 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));
2633 gc->pc += cmdlen;
2634 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2635 }
2636
2637 #define X_GLrop_InitNames 121
2638 void
2639 __indirect_glInitNames(void)
2640 {
2641 __GLXcontext * const gc = __glXGetCurrentContext();
2642 const GLuint cmdlen = 4;
2643 emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
2644 gc->pc += cmdlen;
2645 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2646 }
2647
2648 #define X_GLrop_LoadName 122
2649 void
2650 __indirect_glLoadName(GLuint name)
2651 {
2652 __GLXcontext * const gc = __glXGetCurrentContext();
2653 const GLuint cmdlen = 8;
2654 emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
2655 (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
2656 gc->pc += cmdlen;
2657 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2658 }
2659
2660 #define X_GLrop_PassThrough 123
2661 void
2662 __indirect_glPassThrough(GLfloat token)
2663 {
2664 __GLXcontext * const gc = __glXGetCurrentContext();
2665 const GLuint cmdlen = 8;
2666 emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
2667 (void) memcpy((void *)(gc->pc + 4), (void *)(&token), 4);
2668 gc->pc += cmdlen;
2669 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2670 }
2671
2672 #define X_GLrop_PopName 124
2673 void
2674 __indirect_glPopName(void)
2675 {
2676 __GLXcontext * const gc = __glXGetCurrentContext();
2677 const GLuint cmdlen = 4;
2678 emit_header(gc->pc, X_GLrop_PopName, cmdlen);
2679 gc->pc += cmdlen;
2680 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2681 }
2682
2683 #define X_GLrop_PushName 125
2684 void
2685 __indirect_glPushName(GLuint name)
2686 {
2687 __GLXcontext * const gc = __glXGetCurrentContext();
2688 const GLuint cmdlen = 8;
2689 emit_header(gc->pc, X_GLrop_PushName, cmdlen);
2690 (void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4);
2691 gc->pc += cmdlen;
2692 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2693 }
2694
2695 #define X_GLrop_DrawBuffer 126
2696 void
2697 __indirect_glDrawBuffer(GLenum mode)
2698 {
2699 __GLXcontext * const gc = __glXGetCurrentContext();
2700 const GLuint cmdlen = 8;
2701 emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
2702 (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
2703 gc->pc += cmdlen;
2704 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2705 }
2706
2707 #define X_GLrop_Clear 127
2708 void
2709 __indirect_glClear(GLbitfield mask)
2710 {
2711 __GLXcontext * const gc = __glXGetCurrentContext();
2712 const GLuint cmdlen = 8;
2713 emit_header(gc->pc, X_GLrop_Clear, cmdlen);
2714 (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
2715 gc->pc += cmdlen;
2716 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2717 }
2718
2719 #define X_GLrop_ClearAccum 128
2720 void
2721 __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
2722 {
2723 __GLXcontext * const gc = __glXGetCurrentContext();
2724 const GLuint cmdlen = 20;
2725 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);
2730 gc->pc += cmdlen;
2731 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2732 }
2733
2734 #define X_GLrop_ClearIndex 129
2735 void
2736 __indirect_glClearIndex(GLfloat c)
2737 {
2738 __GLXcontext * const gc = __glXGetCurrentContext();
2739 const GLuint cmdlen = 8;
2740 emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
2741 (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4);
2742 gc->pc += cmdlen;
2743 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2744 }
2745
2746 #define X_GLrop_ClearColor 130
2747 void
2748 __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
2749 {
2750 __GLXcontext * const gc = __glXGetCurrentContext();
2751 const GLuint cmdlen = 20;
2752 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);
2757 gc->pc += cmdlen;
2758 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2759 }
2760
2761 #define X_GLrop_ClearStencil 131
2762 void
2763 __indirect_glClearStencil(GLint s)
2764 {
2765 __GLXcontext * const gc = __glXGetCurrentContext();
2766 const GLuint cmdlen = 8;
2767 emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
2768 (void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4);
2769 gc->pc += cmdlen;
2770 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2771 }
2772
2773 #define X_GLrop_ClearDepth 132
2774 void
2775 __indirect_glClearDepth(GLclampd depth)
2776 {
2777 __GLXcontext * const gc = __glXGetCurrentContext();
2778 const GLuint cmdlen = 12;
2779 emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
2780 (void) memcpy((void *)(gc->pc + 4), (void *)(&depth), 8);
2781 gc->pc += cmdlen;
2782 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2783 }
2784
2785 #define X_GLrop_StencilMask 133
2786 void
2787 __indirect_glStencilMask(GLuint mask)
2788 {
2789 __GLXcontext * const gc = __glXGetCurrentContext();
2790 const GLuint cmdlen = 8;
2791 emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
2792 (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
2793 gc->pc += cmdlen;
2794 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2795 }
2796
2797 #define X_GLrop_ColorMask 134
2798 void
2799 __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
2800 {
2801 __GLXcontext * const gc = __glXGetCurrentContext();
2802 const GLuint cmdlen = 8;
2803 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);
2808 gc->pc += cmdlen;
2809 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2810 }
2811
2812 #define X_GLrop_DepthMask 135
2813 void
2814 __indirect_glDepthMask(GLboolean flag)
2815 {
2816 __GLXcontext * const gc = __glXGetCurrentContext();
2817 const GLuint cmdlen = 8;
2818 emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
2819 (void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1);
2820 gc->pc += cmdlen;
2821 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2822 }
2823
2824 #define X_GLrop_IndexMask 136
2825 void
2826 __indirect_glIndexMask(GLuint mask)
2827 {
2828 __GLXcontext * const gc = __glXGetCurrentContext();
2829 const GLuint cmdlen = 8;
2830 emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
2831 (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
2832 gc->pc += cmdlen;
2833 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2834 }
2835
2836 #define X_GLrop_Accum 137
2837 void
2838 __indirect_glAccum(GLenum op, GLfloat value)
2839 {
2840 __GLXcontext * const gc = __glXGetCurrentContext();
2841 const GLuint cmdlen = 12;
2842 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);
2845 gc->pc += cmdlen;
2846 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2847 }
2848
2849 #define X_GLrop_PopAttrib 141
2850 void
2851 __indirect_glPopAttrib(void)
2852 {
2853 __GLXcontext * const gc = __glXGetCurrentContext();
2854 const GLuint cmdlen = 4;
2855 emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
2856 gc->pc += cmdlen;
2857 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2858 }
2859
2860 #define X_GLrop_PushAttrib 142
2861 void
2862 __indirect_glPushAttrib(GLbitfield mask)
2863 {
2864 __GLXcontext * const gc = __glXGetCurrentContext();
2865 const GLuint cmdlen = 8;
2866 emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
2867 (void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4);
2868 gc->pc += cmdlen;
2869 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2870 }
2871
2872 #define X_GLrop_MapGrid1d 147
2873 void
2874 __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
2875 {
2876 __GLXcontext * const gc = __glXGetCurrentContext();
2877 const GLuint cmdlen = 24;
2878 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);
2882 gc->pc += cmdlen;
2883 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2884 }
2885
2886 #define X_GLrop_MapGrid1f 148
2887 void
2888 __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
2889 {
2890 __GLXcontext * const gc = __glXGetCurrentContext();
2891 const GLuint cmdlen = 16;
2892 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);
2896 gc->pc += cmdlen;
2897 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2898 }
2899
2900 #define X_GLrop_MapGrid2d 149
2901 void
2902 __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
2903 {
2904 __GLXcontext * const gc = __glXGetCurrentContext();
2905 const GLuint cmdlen = 44;
2906 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);
2913 gc->pc += cmdlen;
2914 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2915 }
2916
2917 #define X_GLrop_MapGrid2f 150
2918 void
2919 __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
2920 {
2921 __GLXcontext * const gc = __glXGetCurrentContext();
2922 const GLuint cmdlen = 28;
2923 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);
2930 gc->pc += cmdlen;
2931 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2932 }
2933
2934 #define X_GLrop_EvalCoord1dv 151
2935 void
2936 __indirect_glEvalCoord1d(GLdouble u)
2937 {
2938 __GLXcontext * const gc = __glXGetCurrentContext();
2939 const GLuint cmdlen = 12;
2940 emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
2941 (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8);
2942 gc->pc += cmdlen;
2943 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2944 }
2945
2946 #define X_GLrop_EvalCoord1dv 151
2947 void
2948 __indirect_glEvalCoord1dv(const GLdouble * u)
2949 {
2950 generic_8_byte( X_GLrop_EvalCoord1dv, u );
2951 }
2952
2953 #define X_GLrop_EvalCoord1fv 152
2954 void
2955 __indirect_glEvalCoord1f(GLfloat u)
2956 {
2957 __GLXcontext * const gc = __glXGetCurrentContext();
2958 const GLuint cmdlen = 8;
2959 emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
2960 (void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4);
2961 gc->pc += cmdlen;
2962 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2963 }
2964
2965 #define X_GLrop_EvalCoord1fv 152
2966 void
2967 __indirect_glEvalCoord1fv(const GLfloat * u)
2968 {
2969 generic_4_byte( X_GLrop_EvalCoord1fv, u );
2970 }
2971
2972 #define X_GLrop_EvalCoord2dv 153
2973 void
2974 __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
2975 {
2976 __GLXcontext * const gc = __glXGetCurrentContext();
2977 const GLuint cmdlen = 20;
2978 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);
2981 gc->pc += cmdlen;
2982 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
2983 }
2984
2985 #define X_GLrop_EvalCoord2dv 153
2986 void
2987 __indirect_glEvalCoord2dv(const GLdouble * u)
2988 {
2989 generic_16_byte( X_GLrop_EvalCoord2dv, u );
2990 }
2991
2992 #define X_GLrop_EvalCoord2fv 154
2993 void
2994 __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
2995 {
2996 __GLXcontext * const gc = __glXGetCurrentContext();
2997 const GLuint cmdlen = 12;
2998 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);
3001 gc->pc += cmdlen;
3002 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3003 }
3004
3005 #define X_GLrop_EvalCoord2fv 154
3006 void
3007 __indirect_glEvalCoord2fv(const GLfloat * u)
3008 {
3009 generic_8_byte( X_GLrop_EvalCoord2fv, u );
3010 }
3011
3012 #define X_GLrop_EvalMesh1 155
3013 void
3014 __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
3015 {
3016 __GLXcontext * const gc = __glXGetCurrentContext();
3017 const GLuint cmdlen = 16;
3018 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);
3022 gc->pc += cmdlen;
3023 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3024 }
3025
3026 #define X_GLrop_EvalPoint1 156
3027 void
3028 __indirect_glEvalPoint1(GLint i)
3029 {
3030 __GLXcontext * const gc = __glXGetCurrentContext();
3031 const GLuint cmdlen = 8;
3032 emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
3033 (void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4);
3034 gc->pc += cmdlen;
3035 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3036 }
3037
3038 #define X_GLrop_EvalMesh2 157
3039 void
3040 __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
3041 {
3042 __GLXcontext * const gc = __glXGetCurrentContext();
3043 const GLuint cmdlen = 24;
3044 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);
3050 gc->pc += cmdlen;
3051 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3052 }
3053
3054 #define X_GLrop_EvalPoint2 158
3055 void
3056 __indirect_glEvalPoint2(GLint i, GLint j)
3057 {
3058 __GLXcontext * const gc = __glXGetCurrentContext();
3059 const GLuint cmdlen = 12;
3060 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);
3063 gc->pc += cmdlen;
3064 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3065 }
3066
3067 #define X_GLrop_AlphaFunc 159
3068 void
3069 __indirect_glAlphaFunc(GLenum func, GLclampf ref)
3070 {
3071 __GLXcontext * const gc = __glXGetCurrentContext();
3072 const GLuint cmdlen = 12;
3073 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);
3076 gc->pc += cmdlen;
3077 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3078 }
3079
3080 #define X_GLrop_BlendFunc 160
3081 void
3082 __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
3083 {
3084 __GLXcontext * const gc = __glXGetCurrentContext();
3085 const GLuint cmdlen = 12;
3086 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);
3089 gc->pc += cmdlen;
3090 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3091 }
3092
3093 #define X_GLrop_LogicOp 161
3094 void
3095 __indirect_glLogicOp(GLenum opcode)
3096 {
3097 __GLXcontext * const gc = __glXGetCurrentContext();
3098 const GLuint cmdlen = 8;
3099 emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
3100 (void) memcpy((void *)(gc->pc + 4), (void *)(&opcode), 4);
3101 gc->pc += cmdlen;
3102 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3103 }
3104
3105 #define X_GLrop_StencilFunc 162
3106 void
3107 __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
3108 {
3109 __GLXcontext * const gc = __glXGetCurrentContext();
3110 const GLuint cmdlen = 16;
3111 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);
3115 gc->pc += cmdlen;
3116 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3117 }
3118
3119 #define X_GLrop_StencilOp 163
3120 void
3121 __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
3122 {
3123 __GLXcontext * const gc = __glXGetCurrentContext();
3124 const GLuint cmdlen = 16;
3125 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);
3129 gc->pc += cmdlen;
3130 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3131 }
3132
3133 #define X_GLrop_DepthFunc 164
3134 void
3135 __indirect_glDepthFunc(GLenum func)
3136 {
3137 __GLXcontext * const gc = __glXGetCurrentContext();
3138 const GLuint cmdlen = 8;
3139 emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
3140 (void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4);
3141 gc->pc += cmdlen;
3142 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3143 }
3144
3145 #define X_GLrop_PixelZoom 165
3146 void
3147 __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
3148 {
3149 __GLXcontext * const gc = __glXGetCurrentContext();
3150 const GLuint cmdlen = 12;
3151 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);
3154 gc->pc += cmdlen;
3155 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3156 }
3157
3158 #define X_GLrop_PixelTransferf 166
3159 void
3160 __indirect_glPixelTransferf(GLenum pname, GLfloat param)
3161 {
3162 __GLXcontext * const gc = __glXGetCurrentContext();
3163 const GLuint cmdlen = 12;
3164 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);
3167 gc->pc += cmdlen;
3168 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3169 }
3170
3171 #define X_GLrop_PixelTransferi 167
3172 void
3173 __indirect_glPixelTransferi(GLenum pname, GLint param)
3174 {
3175 __GLXcontext * const gc = __glXGetCurrentContext();
3176 const GLuint cmdlen = 12;
3177 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);
3180 gc->pc += cmdlen;
3181 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3182 }
3183
3184 #define X_GLrop_PixelMapfv 168
3185 void
3186 __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
3187 {
3188 __GLXcontext * const gc = __glXGetCurrentContext();
3189 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3190 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3191 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3192 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
3193 (void) __glXFlushRenderBuffer(gc, gc->pc);
3194 }
3195 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));
3199 gc->pc += cmdlen;
3200 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3201 }
3202 else {
3203 const GLint op = X_GLrop_PixelMapfv;
3204 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);
3210 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3211 }
3212 }
3213 }
3214
3215 #define X_GLrop_PixelMapuiv 169
3216 void
3217 __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
3218 {
3219 __GLXcontext * const gc = __glXGetCurrentContext();
3220 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3221 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3222 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3223 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
3224 (void) __glXFlushRenderBuffer(gc, gc->pc);
3225 }
3226 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));
3230 gc->pc += cmdlen;
3231 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3232 }
3233 else {
3234 const GLint op = X_GLrop_PixelMapuiv;
3235 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);
3241 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3242 }
3243 }
3244 }
3245
3246 #define X_GLrop_PixelMapusv 170
3247 void
3248 __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
3249 {
3250 __GLXcontext * const gc = __glXGetCurrentContext();
3251 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
3252 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3253 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3254 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
3255 (void) __glXFlushRenderBuffer(gc, gc->pc);
3256 }
3257 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));
3261 gc->pc += cmdlen;
3262 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3263 }
3264 else {
3265 const GLint op = X_GLrop_PixelMapusv;
3266 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);
3272 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
3273 }
3274 }
3275 }
3276
3277 #define X_GLrop_ReadBuffer 171
3278 void
3279 __indirect_glReadBuffer(GLenum mode)
3280 {
3281 __GLXcontext * const gc = __glXGetCurrentContext();
3282 const GLuint cmdlen = 8;
3283 emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
3284 (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
3285 gc->pc += cmdlen;
3286 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3287 }
3288
3289 #define X_GLrop_CopyPixels 172
3290 void
3291 __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
3292 {
3293 __GLXcontext * const gc = __glXGetCurrentContext();
3294 const GLuint cmdlen = 24;
3295 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);
3301 gc->pc += cmdlen;
3302 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3303 }
3304
3305 #define X_GLsop_ReadPixels 111
3306 void
3307 __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels)
3308 {
3309 __GLXcontext * const gc = __glXGetCurrentContext();
3310 const __GLXattribute * const state = gc->client_state_private;
3311 Display * const dpy = gc->currentDpy;
3312 const GLuint cmdlen = 28;
3313 if (__builtin_expect(dpy != NULL, 1)) {
3314 #ifdef USE_XCB
3315 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3316 (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));
3319 free(reply);
3320 #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();
3332 #endif /* USE_XCB */
3333 }
3334 return;
3335 }
3336
3337 #define X_GLrop_DrawPixels 173
3338 void
3339 __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
3340 {
3341 __GLXcontext * const gc = __glXGetCurrentContext();
3342 const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, 0) : 0;
3343 const GLuint cmdlen = 40 + __GLX_PAD(compsize);
3344 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
3345 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3346 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
3347 (void) __glXFlushRenderBuffer(gc, gc->pc);
3348 }
3349 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);
3354 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 );
3359 }
3360 gc->pc += cmdlen;
3361 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
3362 }
3363 else {
3364 const GLint op = X_GLrop_DrawPixels;
3365 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);
3374 }
3375 }
3376 }
3377
3378 #define X_GLsop_GetClipPlane 113
3379 void
3380 __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
3381 {
3382 __GLXcontext * const gc = __glXGetCurrentContext();
3383 Display * const dpy = gc->currentDpy;
3384 const GLuint cmdlen = 4;
3385 if (__builtin_expect(dpy != NULL, 1)) {
3386 #ifdef USE_XCB
3387 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3388 (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));
3391 free(reply);
3392 #else
3393 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
3394 (void) memcpy((void *)(pc + 0), (void *)(&plane), 4);
3395 (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
3396 UnlockDisplay(dpy); SyncHandle();
3397 #endif /* USE_XCB */
3398 }
3399 return;
3400 }
3401
3402 #define X_GLsop_GetLightfv 118
3403 void
3404 __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
3405 {
3406 __GLXcontext * const gc = __glXGetCurrentContext();
3407 Display * const dpy = gc->currentDpy;
3408 const GLuint cmdlen = 8;
3409 if (__builtin_expect(dpy != NULL, 1)) {
3410 #ifdef USE_XCB
3411 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3412 (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));
3416 else
3417 (void)memcpy(params, XCBGlxGetLightfvData(reply), XCBGlxGetLightfvDataLength(reply) * sizeof(GLfloat));
3418 free(reply);
3419 #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);
3423 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3424 UnlockDisplay(dpy); SyncHandle();
3425 #endif /* USE_XCB */
3426 }
3427 return;
3428 }
3429
3430 #define X_GLsop_GetLightiv 119
3431 void
3432 __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
3433 {
3434 __GLXcontext * const gc = __glXGetCurrentContext();
3435 Display * const dpy = gc->currentDpy;
3436 const GLuint cmdlen = 8;
3437 if (__builtin_expect(dpy != NULL, 1)) {
3438 #ifdef USE_XCB
3439 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3440 (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));
3444 else
3445 (void)memcpy(params, XCBGlxGetLightivData(reply), XCBGlxGetLightivDataLength(reply) * sizeof(GLint));
3446 free(reply);
3447 #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);
3451 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3452 UnlockDisplay(dpy); SyncHandle();
3453 #endif /* USE_XCB */
3454 }
3455 return;
3456 }
3457
3458 #define X_GLsop_GetMapdv 120
3459 void
3460 __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
3461 {
3462 __GLXcontext * const gc = __glXGetCurrentContext();
3463 Display * const dpy = gc->currentDpy;
3464 const GLuint cmdlen = 8;
3465 if (__builtin_expect(dpy != NULL, 1)) {
3466 #ifdef USE_XCB
3467 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3468 (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));
3472 else
3473 (void)memcpy(v, XCBGlxGetMapdvData(reply), XCBGlxGetMapdvDataLength(reply) * sizeof(GLdouble));
3474 free(reply);
3475 #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);
3479 (void) __glXReadReply(dpy, 8, v, GL_FALSE);
3480 UnlockDisplay(dpy); SyncHandle();
3481 #endif /* USE_XCB */
3482 }
3483 return;
3484 }
3485
3486 #define X_GLsop_GetMapfv 121
3487 void
3488 __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
3489 {
3490 __GLXcontext * const gc = __glXGetCurrentContext();
3491 Display * const dpy = gc->currentDpy;
3492 const GLuint cmdlen = 8;
3493 if (__builtin_expect(dpy != NULL, 1)) {
3494 #ifdef USE_XCB
3495 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3496 (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));
3500 else
3501 (void)memcpy(v, XCBGlxGetMapfvData(reply), XCBGlxGetMapfvDataLength(reply) * sizeof(GLfloat));
3502 free(reply);
3503 #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);
3507 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
3508 UnlockDisplay(dpy); SyncHandle();
3509 #endif /* USE_XCB */
3510 }
3511 return;
3512 }
3513
3514 #define X_GLsop_GetMapiv 122
3515 void
3516 __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
3517 {
3518 __GLXcontext * const gc = __glXGetCurrentContext();
3519 Display * const dpy = gc->currentDpy;
3520 const GLuint cmdlen = 8;
3521 if (__builtin_expect(dpy != NULL, 1)) {
3522 #ifdef USE_XCB
3523 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3524 (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));
3528 else
3529 (void)memcpy(v, XCBGlxGetMapivData(reply), XCBGlxGetMapivDataLength(reply) * sizeof(GLint));
3530 free(reply);
3531 #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);
3535 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
3536 UnlockDisplay(dpy); SyncHandle();
3537 #endif /* USE_XCB */
3538 }
3539 return;
3540 }
3541
3542 #define X_GLsop_GetMaterialfv 123
3543 void
3544 __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
3545 {
3546 __GLXcontext * const gc = __glXGetCurrentContext();
3547 Display * const dpy = gc->currentDpy;
3548 const GLuint cmdlen = 8;
3549 if (__builtin_expect(dpy != NULL, 1)) {
3550 #ifdef USE_XCB
3551 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3552 (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));
3556 else
3557 (void)memcpy(params, XCBGlxGetMaterialfvData(reply), XCBGlxGetMaterialfvDataLength(reply) * sizeof(GLfloat));
3558 free(reply);
3559 #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);
3563 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3564 UnlockDisplay(dpy); SyncHandle();
3565 #endif /* USE_XCB */
3566 }
3567 return;
3568 }
3569
3570 #define X_GLsop_GetMaterialiv 124
3571 void
3572 __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
3573 {
3574 __GLXcontext * const gc = __glXGetCurrentContext();
3575 Display * const dpy = gc->currentDpy;
3576 const GLuint cmdlen = 8;
3577 if (__builtin_expect(dpy != NULL, 1)) {
3578 #ifdef USE_XCB
3579 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3580 (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));
3584 else
3585 (void)memcpy(params, XCBGlxGetMaterialivData(reply), XCBGlxGetMaterialivDataLength(reply) * sizeof(GLint));
3586 free(reply);
3587 #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);
3591 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3592 UnlockDisplay(dpy); SyncHandle();
3593 #endif /* USE_XCB */
3594 }
3595 return;
3596 }
3597
3598 #define X_GLsop_GetPixelMapfv 125
3599 void
3600 __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
3601 {
3602 __GLXcontext * const gc = __glXGetCurrentContext();
3603 Display * const dpy = gc->currentDpy;
3604 const GLuint cmdlen = 4;
3605 if (__builtin_expect(dpy != NULL, 1)) {
3606 #ifdef USE_XCB
3607 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3608 (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));
3612 else
3613 (void)memcpy(values, XCBGlxGetPixelMapfvData(reply), XCBGlxGetPixelMapfvDataLength(reply) * sizeof(GLfloat));
3614 free(reply);
3615 #else
3616 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
3617 (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
3618 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
3619 UnlockDisplay(dpy); SyncHandle();
3620 #endif /* USE_XCB */
3621 }
3622 return;
3623 }
3624
3625 #define X_GLsop_GetPixelMapuiv 126
3626 void
3627 __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
3628 {
3629 __GLXcontext * const gc = __glXGetCurrentContext();
3630 Display * const dpy = gc->currentDpy;
3631 const GLuint cmdlen = 4;
3632 if (__builtin_expect(dpy != NULL, 1)) {
3633 #ifdef USE_XCB
3634 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3635 (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));
3639 else
3640 (void)memcpy(values, XCBGlxGetPixelMapuivData(reply), XCBGlxGetPixelMapuivDataLength(reply) * sizeof(GLuint));
3641 free(reply);
3642 #else
3643 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
3644 (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
3645 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
3646 UnlockDisplay(dpy); SyncHandle();
3647 #endif /* USE_XCB */
3648 }
3649 return;
3650 }
3651
3652 #define X_GLsop_GetPixelMapusv 127
3653 void
3654 __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
3655 {
3656 __GLXcontext * const gc = __glXGetCurrentContext();
3657 Display * const dpy = gc->currentDpy;
3658 const GLuint cmdlen = 4;
3659 if (__builtin_expect(dpy != NULL, 1)) {
3660 #ifdef USE_XCB
3661 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3662 (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));
3666 else
3667 (void)memcpy(values, XCBGlxGetPixelMapusvData(reply), XCBGlxGetPixelMapusvDataLength(reply) * sizeof(GLushort));
3668 free(reply);
3669 #else
3670 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
3671 (void) memcpy((void *)(pc + 0), (void *)(&map), 4);
3672 (void) __glXReadReply(dpy, 2, values, GL_FALSE);
3673 UnlockDisplay(dpy); SyncHandle();
3674 #endif /* USE_XCB */
3675 }
3676 return;
3677 }
3678
3679 #define X_GLsop_GetPolygonStipple 128
3680 void
3681 __indirect_glGetPolygonStipple(GLubyte * mask)
3682 {
3683 __GLXcontext * const gc = __glXGetCurrentContext();
3684 const __GLXattribute * const state = gc->client_state_private;
3685 Display * const dpy = gc->currentDpy;
3686 const GLuint cmdlen = 4;
3687 if (__builtin_expect(dpy != NULL, 1)) {
3688 #ifdef USE_XCB
3689 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3690 (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));
3693 free(reply);
3694 #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();
3699 #endif /* USE_XCB */
3700 }
3701 return;
3702 }
3703
3704 #define X_GLsop_GetTexEnvfv 130
3705 void
3706 __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
3707 {
3708 __GLXcontext * const gc = __glXGetCurrentContext();
3709 Display * const dpy = gc->currentDpy;
3710 const GLuint cmdlen = 8;
3711 if (__builtin_expect(dpy != NULL, 1)) {
3712 #ifdef USE_XCB
3713 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3714 (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));
3718 else
3719 (void)memcpy(params, XCBGlxGetTexEnvfvData(reply), XCBGlxGetTexEnvfvDataLength(reply) * sizeof(GLfloat));
3720 free(reply);
3721 #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);
3725 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3726 UnlockDisplay(dpy); SyncHandle();
3727 #endif /* USE_XCB */
3728 }
3729 return;
3730 }
3731
3732 #define X_GLsop_GetTexEnviv 131
3733 void
3734 __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
3735 {
3736 __GLXcontext * const gc = __glXGetCurrentContext();
3737 Display * const dpy = gc->currentDpy;
3738 const GLuint cmdlen = 8;
3739 if (__builtin_expect(dpy != NULL, 1)) {
3740 #ifdef USE_XCB
3741 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3742 (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));
3746 else
3747 (void)memcpy(params, XCBGlxGetTexEnvivData(reply), XCBGlxGetTexEnvivDataLength(reply) * sizeof(GLint));
3748 free(reply);
3749 #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);
3753 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3754 UnlockDisplay(dpy); SyncHandle();
3755 #endif /* USE_XCB */
3756 }
3757 return;
3758 }
3759
3760 #define X_GLsop_GetTexGendv 132
3761 void
3762 __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
3763 {
3764 __GLXcontext * const gc = __glXGetCurrentContext();
3765 Display * const dpy = gc->currentDpy;
3766 const GLuint cmdlen = 8;
3767 if (__builtin_expect(dpy != NULL, 1)) {
3768 #ifdef USE_XCB
3769 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3770 (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));
3774 else
3775 (void)memcpy(params, XCBGlxGetTexGendvData(reply), XCBGlxGetTexGendvDataLength(reply) * sizeof(GLdouble));
3776 free(reply);
3777 #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);
3781 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
3782 UnlockDisplay(dpy); SyncHandle();
3783 #endif /* USE_XCB */
3784 }
3785 return;
3786 }
3787
3788 #define X_GLsop_GetTexGenfv 133
3789 void
3790 __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
3791 {
3792 __GLXcontext * const gc = __glXGetCurrentContext();
3793 Display * const dpy = gc->currentDpy;
3794 const GLuint cmdlen = 8;
3795 if (__builtin_expect(dpy != NULL, 1)) {
3796 #ifdef USE_XCB
3797 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3798 (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));
3802 else
3803 (void)memcpy(params, XCBGlxGetTexGenfvData(reply), XCBGlxGetTexGenfvDataLength(reply) * sizeof(GLfloat));
3804 free(reply);
3805 #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);
3809 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3810 UnlockDisplay(dpy); SyncHandle();
3811 #endif /* USE_XCB */
3812 }
3813 return;
3814 }
3815
3816 #define X_GLsop_GetTexGeniv 134
3817 void
3818 __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
3819 {
3820 __GLXcontext * const gc = __glXGetCurrentContext();
3821 Display * const dpy = gc->currentDpy;
3822 const GLuint cmdlen = 8;
3823 if (__builtin_expect(dpy != NULL, 1)) {
3824 #ifdef USE_XCB
3825 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3826 (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));
3830 else
3831 (void)memcpy(params, XCBGlxGetTexGenivData(reply), XCBGlxGetTexGenivDataLength(reply) * sizeof(GLint));
3832 free(reply);
3833 #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);
3837 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3838 UnlockDisplay(dpy); SyncHandle();
3839 #endif /* USE_XCB */
3840 }
3841 return;
3842 }
3843
3844 #define X_GLsop_GetTexImage 135
3845 void
3846 __indirect_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels)
3847 {
3848 __GLXcontext * const gc = __glXGetCurrentContext();
3849 const __GLXattribute * const state = gc->client_state_private;
3850 Display * const dpy = gc->currentDpy;
3851 const GLuint cmdlen = 20;
3852 if (__builtin_expect(dpy != NULL, 1)) {
3853 #ifdef USE_XCB
3854 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3855 (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));
3858 free(reply);
3859 #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();
3869 #endif /* USE_XCB */
3870 }
3871 return;
3872 }
3873
3874 #define X_GLsop_GetTexParameterfv 136
3875 void
3876 __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
3877 {
3878 __GLXcontext * const gc = __glXGetCurrentContext();
3879 Display * const dpy = gc->currentDpy;
3880 const GLuint cmdlen = 8;
3881 if (__builtin_expect(dpy != NULL, 1)) {
3882 #ifdef USE_XCB
3883 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3884 (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));
3888 else
3889 (void)memcpy(params, XCBGlxGetTexParameterfvData(reply), XCBGlxGetTexParameterfvDataLength(reply) * sizeof(GLfloat));
3890 free(reply);
3891 #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);
3895 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3896 UnlockDisplay(dpy); SyncHandle();
3897 #endif /* USE_XCB */
3898 }
3899 return;
3900 }
3901
3902 #define X_GLsop_GetTexParameteriv 137
3903 void
3904 __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
3905 {
3906 __GLXcontext * const gc = __glXGetCurrentContext();
3907 Display * const dpy = gc->currentDpy;
3908 const GLuint cmdlen = 8;
3909 if (__builtin_expect(dpy != NULL, 1)) {
3910 #ifdef USE_XCB
3911 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3912 (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));
3916 else
3917 (void)memcpy(params, XCBGlxGetTexParameterivData(reply), XCBGlxGetTexParameterivDataLength(reply) * sizeof(GLint));
3918 free(reply);
3919 #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);
3923 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3924 UnlockDisplay(dpy); SyncHandle();
3925 #endif /* USE_XCB */
3926 }
3927 return;
3928 }
3929
3930 #define X_GLsop_GetTexLevelParameterfv 138
3931 void
3932 __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params)
3933 {
3934 __GLXcontext * const gc = __glXGetCurrentContext();
3935 Display * const dpy = gc->currentDpy;
3936 const GLuint cmdlen = 12;
3937 if (__builtin_expect(dpy != NULL, 1)) {
3938 #ifdef USE_XCB
3939 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3940 (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));
3944 else
3945 (void)memcpy(params, XCBGlxGetTexLevelParameterfvData(reply), XCBGlxGetTexLevelParameterfvDataLength(reply) * sizeof(GLfloat));
3946 free(reply);
3947 #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);
3952 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3953 UnlockDisplay(dpy); SyncHandle();
3954 #endif /* USE_XCB */
3955 }
3956 return;
3957 }
3958
3959 #define X_GLsop_GetTexLevelParameteriv 139
3960 void
3961 __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params)
3962 {
3963 __GLXcontext * const gc = __glXGetCurrentContext();
3964 Display * const dpy = gc->currentDpy;
3965 const GLuint cmdlen = 12;
3966 if (__builtin_expect(dpy != NULL, 1)) {
3967 #ifdef USE_XCB
3968 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3969 (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));
3973 else
3974 (void)memcpy(params, XCBGlxGetTexLevelParameterivData(reply), XCBGlxGetTexLevelParameterivDataLength(reply) * sizeof(GLint));
3975 free(reply);
3976 #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);
3981 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3982 UnlockDisplay(dpy); SyncHandle();
3983 #endif /* USE_XCB */
3984 }
3985 return;
3986 }
3987
3988 #define X_GLsop_IsList 141
3989 GLboolean
3990 __indirect_glIsList(GLuint list)
3991 {
3992 __GLXcontext * const gc = __glXGetCurrentContext();
3993 Display * const dpy = gc->currentDpy;
3994 GLboolean retval = (GLboolean) 0;
3995 const GLuint cmdlen = 4;
3996 if (__builtin_expect(dpy != NULL, 1)) {
3997 #ifdef USE_XCB
3998 XCBConnection *c = XCBConnectionOfDisplay(dpy);
3999 (void) __glXFlushRenderBuffer(gc, gc->pc);
4000 XCBGlxIsListRep *reply = XCBGlxIsListReply(c, XCBGlxIsList(c, gc->currentContextTag, list), NULL);
4001 retval = reply->ret_val;
4002 free(reply);
4003 #else
4004 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
4005 (void) memcpy((void *)(pc + 0), (void *)(&list), 4);
4006 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4007 UnlockDisplay(dpy); SyncHandle();
4008 #endif /* USE_XCB */
4009 }
4010 return retval;
4011 }
4012
4013 #define X_GLrop_DepthRange 174
4014 void
4015 __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
4016 {
4017 __GLXcontext * const gc = __glXGetCurrentContext();
4018 const GLuint cmdlen = 20;
4019 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);
4022 gc->pc += cmdlen;
4023 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4024 }
4025
4026 #define X_GLrop_Frustum 175
4027 void
4028 __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
4029 {
4030 __GLXcontext * const gc = __glXGetCurrentContext();
4031 const GLuint cmdlen = 52;
4032 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);
4039 gc->pc += cmdlen;
4040 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4041 }
4042
4043 #define X_GLrop_LoadIdentity 176
4044 void
4045 __indirect_glLoadIdentity(void)
4046 {
4047 __GLXcontext * const gc = __glXGetCurrentContext();
4048 const GLuint cmdlen = 4;
4049 emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
4050 gc->pc += cmdlen;
4051 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4052 }
4053
4054 #define X_GLrop_LoadMatrixf 177
4055 void
4056 __indirect_glLoadMatrixf(const GLfloat * m)
4057 {
4058 __GLXcontext * const gc = __glXGetCurrentContext();
4059 const GLuint cmdlen = 68;
4060 emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
4061 (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
4062 gc->pc += cmdlen;
4063 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4064 }
4065
4066 #define X_GLrop_LoadMatrixd 178
4067 void
4068 __indirect_glLoadMatrixd(const GLdouble * m)
4069 {
4070 __GLXcontext * const gc = __glXGetCurrentContext();
4071 const GLuint cmdlen = 132;
4072 emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
4073 (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
4074 gc->pc += cmdlen;
4075 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4076 }
4077
4078 #define X_GLrop_MatrixMode 179
4079 void
4080 __indirect_glMatrixMode(GLenum mode)
4081 {
4082 __GLXcontext * const gc = __glXGetCurrentContext();
4083 const GLuint cmdlen = 8;
4084 emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
4085 (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
4086 gc->pc += cmdlen;
4087 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4088 }
4089
4090 #define X_GLrop_MultMatrixf 180
4091 void
4092 __indirect_glMultMatrixf(const GLfloat * m)
4093 {
4094 __GLXcontext * const gc = __glXGetCurrentContext();
4095 const GLuint cmdlen = 68;
4096 emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
4097 (void) memcpy((void *)(gc->pc + 4), (void *)(m), 64);
4098 gc->pc += cmdlen;
4099 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4100 }
4101
4102 #define X_GLrop_MultMatrixd 181
4103 void
4104 __indirect_glMultMatrixd(const GLdouble * m)
4105 {
4106 __GLXcontext * const gc = __glXGetCurrentContext();
4107 const GLuint cmdlen = 132;
4108 emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
4109 (void) memcpy((void *)(gc->pc + 4), (void *)(m), 128);
4110 gc->pc += cmdlen;
4111 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4112 }
4113
4114 #define X_GLrop_Ortho 182
4115 void
4116 __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
4117 {
4118 __GLXcontext * const gc = __glXGetCurrentContext();
4119 const GLuint cmdlen = 52;
4120 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);
4127 gc->pc += cmdlen;
4128 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4129 }
4130
4131 #define X_GLrop_PopMatrix 183
4132 void
4133 __indirect_glPopMatrix(void)
4134 {
4135 __GLXcontext * const gc = __glXGetCurrentContext();
4136 const GLuint cmdlen = 4;
4137 emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
4138 gc->pc += cmdlen;
4139 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4140 }
4141
4142 #define X_GLrop_PushMatrix 184
4143 void
4144 __indirect_glPushMatrix(void)
4145 {
4146 __GLXcontext * const gc = __glXGetCurrentContext();
4147 const GLuint cmdlen = 4;
4148 emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
4149 gc->pc += cmdlen;
4150 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4151 }
4152
4153 #define X_GLrop_Rotated 185
4154 void
4155 __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4156 {
4157 __GLXcontext * const gc = __glXGetCurrentContext();
4158 const GLuint cmdlen = 36;
4159 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);
4164 gc->pc += cmdlen;
4165 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4166 }
4167
4168 #define X_GLrop_Rotatef 186
4169 void
4170 __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
4171 {
4172 __GLXcontext * const gc = __glXGetCurrentContext();
4173 const GLuint cmdlen = 20;
4174 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);
4179 gc->pc += cmdlen;
4180 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4181 }
4182
4183 #define X_GLrop_Scaled 187
4184 void
4185 __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
4186 {
4187 __GLXcontext * const gc = __glXGetCurrentContext();
4188 const GLuint cmdlen = 28;
4189 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);
4193 gc->pc += cmdlen;
4194 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4195 }
4196
4197 #define X_GLrop_Scalef 188
4198 void
4199 __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
4200 {
4201 __GLXcontext * const gc = __glXGetCurrentContext();
4202 const GLuint cmdlen = 16;
4203 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);
4207 gc->pc += cmdlen;
4208 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4209 }
4210
4211 #define X_GLrop_Translated 189
4212 void
4213 __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
4214 {
4215 __GLXcontext * const gc = __glXGetCurrentContext();
4216 const GLuint cmdlen = 28;
4217 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);
4221 gc->pc += cmdlen;
4222 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4223 }
4224
4225 #define X_GLrop_Translatef 190
4226 void
4227 __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
4228 {
4229 __GLXcontext * const gc = __glXGetCurrentContext();
4230 const GLuint cmdlen = 16;
4231 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);
4235 gc->pc += cmdlen;
4236 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4237 }
4238
4239 #define X_GLrop_Viewport 191
4240 void
4241 __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
4242 {
4243 __GLXcontext * const gc = __glXGetCurrentContext();
4244 const GLuint cmdlen = 20;
4245 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);
4250 gc->pc += cmdlen;
4251 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4252 }
4253
4254 #define X_GLrop_BindTexture 4117
4255 void
4256 __indirect_glBindTexture(GLenum target, GLuint texture)
4257 {
4258 __GLXcontext * const gc = __glXGetCurrentContext();
4259 const GLuint cmdlen = 12;
4260 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);
4263 gc->pc += cmdlen;
4264 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4265 }
4266
4267 #define X_GLrop_Indexubv 194
4268 void
4269 __indirect_glIndexub(GLubyte c)
4270 {
4271 __GLXcontext * const gc = __glXGetCurrentContext();
4272 const GLuint cmdlen = 8;
4273 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4274 (void) memcpy((void *)(gc->pc + 4), (void *)(&c), 1);
4275 gc->pc += cmdlen;
4276 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4277 }
4278
4279 #define X_GLrop_Indexubv 194
4280 void
4281 __indirect_glIndexubv(const GLubyte * c)
4282 {
4283 __GLXcontext * const gc = __glXGetCurrentContext();
4284 const GLuint cmdlen = 8;
4285 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4286 (void) memcpy((void *)(gc->pc + 4), (void *)(c), 1);
4287 gc->pc += cmdlen;
4288 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4289 }
4290
4291 #define X_GLrop_PolygonOffset 192
4292 void
4293 __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
4294 {
4295 __GLXcontext * const gc = __glXGetCurrentContext();
4296 const GLuint cmdlen = 12;
4297 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);
4300 gc->pc += cmdlen;
4301 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4302 }
4303
4304 #define X_GLsop_AreTexturesResident 143
4305 GLboolean
4306 __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures, GLboolean * residences)
4307 {
4308 __GLXcontext * const gc = __glXGetCurrentContext();
4309 Display * const dpy = gc->currentDpy;
4310 GLboolean retval = (GLboolean) 0;
4311 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
4312 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
4313 #ifdef USE_XCB
4314 XCBConnection *c = XCBConnectionOfDisplay(dpy);
4315 (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));
4318 retval = reply->ret_val;
4319 free(reply);
4320 #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));
4324 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
4325 UnlockDisplay(dpy); SyncHandle();
4326 #endif /* USE_XCB */
4327 }
4328 return retval;
4329 }
4330
4331 #define X_GLrop_CopyTexImage1D 4119
4332 void
4333 __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
4334 {
4335 __GLXcontext * const gc = __glXGetCurrentContext();
4336 const GLuint cmdlen = 32;
4337 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);
4345 gc->pc += cmdlen;
4346 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4347 }
4348
4349 #define X_GLrop_CopyTexImage2D 4120
4350 void
4351 __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
4352 {
4353 __GLXcontext * const gc = __glXGetCurrentContext();
4354 const GLuint cmdlen = 36;
4355 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);
4364 gc->pc += cmdlen;
4365 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4366 }
4367
4368 #define X_GLrop_CopyTexSubImage1D 4121
4369 void
4370 __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
4371 {
4372 __GLXcontext * const gc = __glXGetCurrentContext();
4373 const GLuint cmdlen = 28;
4374 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);
4381 gc->pc += cmdlen;
4382 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4383 }
4384
4385 #define X_GLrop_CopyTexSubImage2D 4122
4386 void
4387 __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
4388 {
4389 __GLXcontext * const gc = __glXGetCurrentContext();
4390 const GLuint cmdlen = 36;
4391 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);
4400 gc->pc += cmdlen;
4401 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4402 }
4403
4404 #define X_GLvop_DeleteTextures 12
4405 void
4406 __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
4407 {
4408 __GLXcontext * const gc = __glXGetCurrentContext();
4409 Display * const dpy = gc->currentDpy;
4410 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
4411 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();
4416 }
4417 return;
4418 }
4419
4420 #define X_GLsop_GenTextures 145
4421 void
4422 __indirect_glGenTextures(GLsizei n, GLuint * textures)
4423 {
4424 __GLXcontext * const gc = __glXGetCurrentContext();
4425 Display * const dpy = gc->currentDpy;
4426 const GLuint cmdlen = 4;
4427 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
4428 #ifdef USE_XCB
4429 XCBConnection *c = XCBConnectionOfDisplay(dpy);
4430 (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));
4433 free(reply);
4434 #else
4435 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
4436 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
4437 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
4438 UnlockDisplay(dpy); SyncHandle();
4439 #endif /* USE_XCB */
4440 }
4441 return;
4442 }
4443
4444 #define X_GLsop_IsTexture 146
4445 GLboolean
4446 __indirect_glIsTexture(GLuint texture)
4447 {
4448 __GLXcontext * const gc = __glXGetCurrentContext();
4449 Display * const dpy = gc->currentDpy;
4450 GLboolean retval = (GLboolean) 0;
4451 const GLuint cmdlen = 4;
4452 if (__builtin_expect(dpy != NULL, 1)) {
4453 #ifdef USE_XCB
4454 XCBConnection *c = XCBConnectionOfDisplay(dpy);
4455 (void) __glXFlushRenderBuffer(gc, gc->pc);
4456 XCBGlxIsTextureRep *reply = XCBGlxIsTextureReply(c, XCBGlxIsTexture(c, gc->currentContextTag, texture), NULL);
4457 retval = reply->ret_val;
4458 free(reply);
4459 #else
4460 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
4461 (void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
4462 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4463 UnlockDisplay(dpy); SyncHandle();
4464 #endif /* USE_XCB */
4465 }
4466 return retval;
4467 }
4468
4469 #define X_GLrop_PrioritizeTextures 4118
4470 void
4471 __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclampf * priorities)
4472 {
4473 __GLXcontext * const gc = __glXGetCurrentContext();
4474 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
4475 if (__builtin_expect(n >= 0, 1)) {
4476 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));
4480 gc->pc += cmdlen;
4481 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4482 }
4483 }
4484
4485 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 )
4487 {
4488 __GLXcontext * const gc = __glXGetCurrentContext();
4489 const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
4490 const GLuint cmdlen = 60 + __GLX_PAD(compsize);
4491 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4492 if (cmdlen <= gc->maxSmallRenderCommandSize) {
4493 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
4494 (void) __glXFlushRenderBuffer(gc, gc->pc);
4495 }
4496 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);
4506 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 );
4511 }
4512 gc->pc += cmdlen;
4513 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4514 }
4515 else {
4516 const GLint op = opcode;
4517 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);
4531 }
4532 }
4533 }
4534
4535 #define X_GLrop_TexSubImage1D 4099
4536 void
4537 __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
4538 {
4539 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset, 1, width, 1, format, type, pixels );
4540 }
4541
4542 #define X_GLrop_TexSubImage2D 4100
4543 void
4544 __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
4545 {
4546 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset, yoffset, width, height, format, type, pixels );
4547 }
4548
4549 #define X_GLrop_BlendColor 4096
4550 void
4551 __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
4552 {
4553 __GLXcontext * const gc = __glXGetCurrentContext();
4554 const GLuint cmdlen = 20;
4555 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);
4560 gc->pc += cmdlen;
4561 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4562 }
4563
4564 #define X_GLrop_BlendEquation 4097
4565 void
4566 __indirect_glBlendEquation(GLenum mode)
4567 {
4568 __GLXcontext * const gc = __glXGetCurrentContext();
4569 const GLuint cmdlen = 8;
4570 emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
4571 (void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4);
4572 gc->pc += cmdlen;
4573 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4574 }
4575
4576 #define X_GLrop_ColorTable 2053
4577 void
4578 __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
4579 {
4580 __GLXcontext * const gc = __glXGetCurrentContext();
4581 const GLuint compsize = (table != NULL) ? __glImageSize(width, 1, 1, format, type, target) : 0;
4582 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
4583 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4584 if (cmdlen <= gc->maxSmallRenderCommandSize) {
4585 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
4586 (void) __glXFlushRenderBuffer(gc, gc->pc);
4587 }
4588 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);
4594 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 );
4599 }
4600 gc->pc += cmdlen;
4601 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4602 }
4603 else {
4604 const GLint op = X_GLrop_ColorTable;
4605 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);
4615 }
4616 }
4617 }
4618
4619 #define X_GLrop_ColorTableParameterfv 2054
4620 void
4621 __indirect_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params)
4622 {
4623 __GLXcontext * const gc = __glXGetCurrentContext();
4624 const GLuint compsize = __glColorTableParameterfv_size(pname);
4625 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
4626 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));
4630 gc->pc += cmdlen;
4631 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4632 }
4633
4634 #define X_GLrop_ColorTableParameteriv 2055
4635 void
4636 __indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params)
4637 {
4638 __GLXcontext * const gc = __glXGetCurrentContext();
4639 const GLuint compsize = __glColorTableParameteriv_size(pname);
4640 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
4641 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));
4645 gc->pc += cmdlen;
4646 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4647 }
4648
4649 #define X_GLrop_CopyColorTable 2056
4650 void
4651 __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
4652 {
4653 __GLXcontext * const gc = __glXGetCurrentContext();
4654 const GLuint cmdlen = 24;
4655 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);
4661 gc->pc += cmdlen;
4662 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4663 }
4664
4665 #define X_GLsop_GetColorTable 147
4666 void
4667 __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table)
4668 {
4669 __GLXcontext * const gc = __glXGetCurrentContext();
4670 const __GLXattribute * const state = gc->client_state_private;
4671 Display * const dpy = gc->currentDpy;
4672 const GLuint cmdlen = 16;
4673 if (__builtin_expect(dpy != NULL, 1)) {
4674 #ifdef USE_XCB
4675 XCBConnection *c = XCBConnectionOfDisplay(dpy);
4676 (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));
4679 free(reply);
4680 #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();
4689 #endif /* USE_XCB */
4690 }
4691 return;
4692 }
4693
4694 #define X_GLsop_GetColorTableParameterfv 148
4695 void
4696 __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params)
4697 {
4698 __GLXcontext * const gc = __glXGetCurrentContext();
4699 Display * const dpy = gc->currentDpy;
4700 const GLuint cmdlen = 8;
4701 if (__builtin_expect(dpy != NULL, 1)) {
4702 #ifdef USE_XCB
4703 XCBConnection *c = XCBConnectionOfDisplay(dpy);
4704 (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));
4708 else
4709 (void)memcpy(params, XCBGlxGetColorTableParameterfvData(reply), XCBGlxGetColorTableParameterfvDataLength(reply) * sizeof(GLfloat));
4710 free(reply);
4711 #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);
4715 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4716 UnlockDisplay(dpy); SyncHandle();
4717 #endif /* USE_XCB */
4718 }
4719 return;
4720 }
4721
4722 #define X_GLsop_GetColorTableParameteriv 149
4723 void
4724 __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * params)
4725 {
4726 __GLXcontext * const gc = __glXGetCurrentContext();
4727 Display * const dpy = gc->currentDpy;
4728 const GLuint cmdlen = 8;
4729 if (__builtin_expect(dpy != NULL, 1)) {
4730 #ifdef USE_XCB
4731 XCBConnection *c = XCBConnectionOfDisplay(dpy);
4732 (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));
4736 else
4737 (void)memcpy(params, XCBGlxGetColorTableParameterivData(reply), XCBGlxGetColorTableParameterivDataLength(reply) * sizeof(GLint));
4738 free(reply);
4739 #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);
4743 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4744 UnlockDisplay(dpy); SyncHandle();
4745 #endif /* USE_XCB */
4746 }
4747 return;
4748 }
4749
4750 #define X_GLrop_ColorSubTable 195
4751 void
4752 __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data)
4753 {
4754 __GLXcontext * const gc = __glXGetCurrentContext();
4755 const GLuint compsize = (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
4756 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
4757 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4758 if (cmdlen <= gc->maxSmallRenderCommandSize) {
4759 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
4760 (void) __glXFlushRenderBuffer(gc, gc->pc);
4761 }
4762 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);
4768 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 );
4773 }
4774 gc->pc += cmdlen;
4775 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4776 }
4777 else {
4778 const GLint op = X_GLrop_ColorSubTable;
4779 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);
4789 }
4790 }
4791 }
4792
4793 #define X_GLrop_CopyColorSubTable 196
4794 void
4795 __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
4796 {
4797 __GLXcontext * const gc = __glXGetCurrentContext();
4798 const GLuint cmdlen = 24;
4799 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);
4805 gc->pc += cmdlen;
4806 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4807 }
4808
4809 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 )
4811 {
4812 __GLXcontext * const gc = __glXGetCurrentContext();
4813 const GLuint compsize = (image != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0;
4814 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
4815 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
4816 if (cmdlen <= gc->maxSmallRenderCommandSize) {
4817 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
4818 (void) __glXFlushRenderBuffer(gc, gc->pc);
4819 }
4820 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);
4827 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 );
4832 }
4833 gc->pc += cmdlen;
4834 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4835 }
4836 else {
4837 const GLint op = opcode;
4838 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);
4849 }
4850 }
4851 }
4852
4853 #define X_GLrop_ConvolutionFilter1D 4101
4854 void
4855 __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image)
4856 {
4857 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target, internalformat, width, 1, format, type, image );
4858 }
4859
4860 #define X_GLrop_ConvolutionFilter2D 4102
4861 void
4862 __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image)
4863 {
4864 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target, internalformat, width, height, format, type, image );
4865 }
4866
4867 #define X_GLrop_ConvolutionParameterf 4103
4868 void
4869 __indirect_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
4870 {
4871 __GLXcontext * const gc = __glXGetCurrentContext();
4872 const GLuint cmdlen = 16;
4873 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);
4877 gc->pc += cmdlen;
4878 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4879 }
4880
4881 #define X_GLrop_ConvolutionParameterfv 4104
4882 void
4883 __indirect_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params)
4884 {
4885 __GLXcontext * const gc = __glXGetCurrentContext();
4886 const GLuint compsize = __glConvolutionParameterfv_size(pname);
4887 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
4888 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));
4892 gc->pc += cmdlen;
4893 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4894 }
4895
4896 #define X_GLrop_ConvolutionParameteri 4105
4897 void
4898 __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
4899 {
4900 __GLXcontext * const gc = __glXGetCurrentContext();
4901 const GLuint cmdlen = 16;
4902 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);
4906 gc->pc += cmdlen;
4907 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4908 }
4909
4910 #define X_GLrop_ConvolutionParameteriv 4106
4911 void
4912 __indirect_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params)
4913 {
4914 __GLXcontext * const gc = __glXGetCurrentContext();
4915 const GLuint compsize = __glConvolutionParameteriv_size(pname);
4916 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
4917 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));
4921 gc->pc += cmdlen;
4922 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4923 }
4924
4925 #define X_GLrop_CopyConvolutionFilter1D 4107
4926 void
4927 __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
4928 {
4929 __GLXcontext * const gc = __glXGetCurrentContext();
4930 const GLuint cmdlen = 24;
4931 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);
4937 gc->pc += cmdlen;
4938 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4939 }
4940
4941 #define X_GLrop_CopyConvolutionFilter2D 4108
4942 void
4943 __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
4944 {
4945 __GLXcontext * const gc = __glXGetCurrentContext();
4946 const GLuint cmdlen = 28;
4947 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);
4954 gc->pc += cmdlen;
4955 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
4956 }
4957
4958 #define X_GLsop_GetConvolutionFilter 150
4959 void
4960 __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image)
4961 {
4962 __GLXcontext * const gc = __glXGetCurrentContext();
4963 const __GLXattribute * const state = gc->client_state_private;
4964 Display * const dpy = gc->currentDpy;
4965 const GLuint cmdlen = 16;
4966 if (__builtin_expect(dpy != NULL, 1)) {
4967 #ifdef USE_XCB
4968 XCBConnection *c = XCBConnectionOfDisplay(dpy);
4969 (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));
4972 free(reply);
4973 #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();
4982 #endif /* USE_XCB */
4983 }
4984 return;
4985 }
4986
4987 #define X_GLsop_GetConvolutionParameterfv 151
4988 void
4989 __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params)
4990 {
4991 __GLXcontext * const gc = __glXGetCurrentContext();
4992 Display * const dpy = gc->currentDpy;
4993 const GLuint cmdlen = 8;
4994 if (__builtin_expect(dpy != NULL, 1)) {
4995 #ifdef USE_XCB
4996 XCBConnection *c = XCBConnectionOfDisplay(dpy);
4997 (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));
5001 else
5002 (void)memcpy(params, XCBGlxGetConvolutionParameterfvData(reply), XCBGlxGetConvolutionParameterfvDataLength(reply) * sizeof(GLfloat));
5003 free(reply);
5004 #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);
5008 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5009 UnlockDisplay(dpy); SyncHandle();
5010 #endif /* USE_XCB */
5011 }
5012 return;
5013 }
5014
5015 #define X_GLsop_GetConvolutionParameteriv 152
5016 void
5017 __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params)
5018 {
5019 __GLXcontext * const gc = __glXGetCurrentContext();
5020 Display * const dpy = gc->currentDpy;
5021 const GLuint cmdlen = 8;
5022 if (__builtin_expect(dpy != NULL, 1)) {
5023 #ifdef USE_XCB
5024 XCBConnection *c = XCBConnectionOfDisplay(dpy);
5025 (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));
5029 else
5030 (void)memcpy(params, XCBGlxGetConvolutionParameterivData(reply), XCBGlxGetConvolutionParameterivDataLength(reply) * sizeof(GLint));
5031 free(reply);
5032 #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);
5036 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5037 UnlockDisplay(dpy); SyncHandle();
5038 #endif /* USE_XCB */
5039 }
5040 return;
5041 }
5042
5043 #define X_GLsop_GetHistogram 154
5044 void
5045 __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
5046 {
5047 __GLXcontext * const gc = __glXGetCurrentContext();
5048 const __GLXattribute * const state = gc->client_state_private;
5049 Display * const dpy = gc->currentDpy;
5050 const GLuint cmdlen = 16;
5051 if (__builtin_expect(dpy != NULL, 1)) {
5052 #ifdef USE_XCB
5053 XCBConnection *c = XCBConnectionOfDisplay(dpy);
5054 (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));
5057 free(reply);
5058 #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();
5068 #endif /* USE_XCB */
5069 }
5070 return;
5071 }
5072
5073 #define X_GLsop_GetHistogramParameterfv 155
5074 void
5075 __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params)
5076 {
5077 __GLXcontext * const gc = __glXGetCurrentContext();
5078 Display * const dpy = gc->currentDpy;
5079 const GLuint cmdlen = 8;
5080 if (__builtin_expect(dpy != NULL, 1)) {
5081 #ifdef USE_XCB
5082 XCBConnection *c = XCBConnectionOfDisplay(dpy);
5083 (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));
5087 else
5088 (void)memcpy(params, XCBGlxGetHistogramParameterfvData(reply), XCBGlxGetHistogramParameterfvDataLength(reply) * sizeof(GLfloat));
5089 free(reply);
5090 #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);
5094 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5095 UnlockDisplay(dpy); SyncHandle();
5096 #endif /* USE_XCB */
5097 }
5098 return;
5099 }
5100
5101 #define X_GLsop_GetHistogramParameteriv 156
5102 void
5103 __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params)
5104 {
5105 __GLXcontext * const gc = __glXGetCurrentContext();
5106 Display * const dpy = gc->currentDpy;
5107 const GLuint cmdlen = 8;
5108 if (__builtin_expect(dpy != NULL, 1)) {
5109 #ifdef USE_XCB
5110 XCBConnection *c = XCBConnectionOfDisplay(dpy);
5111 (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));
5115 else
5116 (void)memcpy(params, XCBGlxGetHistogramParameterivData(reply), XCBGlxGetHistogramParameterivDataLength(reply) * sizeof(GLint));
5117 free(reply);
5118 #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);
5122 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5123 UnlockDisplay(dpy); SyncHandle();
5124 #endif /* USE_XCB */
5125 }
5126 return;
5127 }
5128
5129 #define X_GLsop_GetMinmax 157
5130 void
5131 __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
5132 {
5133 __GLXcontext * const gc = __glXGetCurrentContext();
5134 const __GLXattribute * const state = gc->client_state_private;
5135 Display * const dpy = gc->currentDpy;
5136 const GLuint cmdlen = 16;
5137 if (__builtin_expect(dpy != NULL, 1)) {
5138 #ifdef USE_XCB
5139 XCBConnection *c = XCBConnectionOfDisplay(dpy);
5140 (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));
5143 free(reply);
5144 #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();
5154 #endif /* USE_XCB */
5155 }
5156 return;
5157 }
5158
5159 #define X_GLsop_GetMinmaxParameterfv 158
5160 void
5161 __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params)
5162 {
5163 __GLXcontext * const gc = __glXGetCurrentContext();
5164 Display * const dpy = gc->currentDpy;
5165 const GLuint cmdlen = 8;
5166 if (__builtin_expect(dpy != NULL, 1)) {
5167 #ifdef USE_XCB
5168 XCBConnection *c = XCBConnectionOfDisplay(dpy);
5169 (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));
5173 else
5174 (void)memcpy(params, XCBGlxGetMinmaxParameterfvData(reply), XCBGlxGetMinmaxParameterfvDataLength(reply) * sizeof(GLfloat));
5175 free(reply);
5176 #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);
5180 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5181 UnlockDisplay(dpy); SyncHandle();
5182 #endif /* USE_XCB */
5183 }
5184 return;
5185 }
5186
5187 #define X_GLsop_GetMinmaxParameteriv 159
5188 void
5189 __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
5190 {
5191 __GLXcontext * const gc = __glXGetCurrentContext();
5192 Display * const dpy = gc->currentDpy;
5193 const GLuint cmdlen = 8;
5194 if (__builtin_expect(dpy != NULL, 1)) {
5195 #ifdef USE_XCB
5196 XCBConnection *c = XCBConnectionOfDisplay(dpy);
5197 (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));
5201 else
5202 (void)memcpy(params, XCBGlxGetMinmaxParameterivData(reply), XCBGlxGetMinmaxParameterivDataLength(reply) * sizeof(GLint));
5203 free(reply);
5204 #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);
5208 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5209 UnlockDisplay(dpy); SyncHandle();
5210 #endif /* USE_XCB */
5211 }
5212 return;
5213 }
5214
5215 #define X_GLrop_Histogram 4110
5216 void
5217 __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
5218 {
5219 __GLXcontext * const gc = __glXGetCurrentContext();
5220 const GLuint cmdlen = 20;
5221 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);
5226 gc->pc += cmdlen;
5227 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5228 }
5229
5230 #define X_GLrop_Minmax 4111
5231 void
5232 __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
5233 {
5234 __GLXcontext * const gc = __glXGetCurrentContext();
5235 const GLuint cmdlen = 16;
5236 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);
5240 gc->pc += cmdlen;
5241 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5242 }
5243
5244 #define X_GLrop_ResetHistogram 4112
5245 void
5246 __indirect_glResetHistogram(GLenum target)
5247 {
5248 __GLXcontext * const gc = __glXGetCurrentContext();
5249 const GLuint cmdlen = 8;
5250 emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
5251 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5252 gc->pc += cmdlen;
5253 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5254 }
5255
5256 #define X_GLrop_ResetMinmax 4113
5257 void
5258 __indirect_glResetMinmax(GLenum target)
5259 {
5260 __GLXcontext * const gc = __glXGetCurrentContext();
5261 const GLuint cmdlen = 8;
5262 emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
5263 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5264 gc->pc += cmdlen;
5265 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5266 }
5267
5268 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 )
5270 {
5271 __GLXcontext * const gc = __glXGetCurrentContext();
5272 const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
5273 const GLuint cmdlen = 84 + __GLX_PAD(compsize);
5274 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5275 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5276 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
5277 (void) __glXFlushRenderBuffer(gc, gc->pc);
5278 }
5279 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);
5291 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 );
5296 }
5297 gc->pc += cmdlen;
5298 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5299 }
5300 else {
5301 const GLint op = opcode;
5302 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);
5318 }
5319 }
5320 }
5321
5322 #define X_GLrop_TexImage3D 4114
5323 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)
5325 {
5326 __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat, width, height, depth, 1, border, format, type, pixels );
5327 }
5328
5329 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 )
5331 {
5332 __GLXcontext * const gc = __glXGetCurrentContext();
5333 const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0;
5334 const GLuint cmdlen = 92 + __GLX_PAD(compsize);
5335 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5336 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5337 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
5338 (void) __glXFlushRenderBuffer(gc, gc->pc);
5339 }
5340 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);
5354 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 );
5359 }
5360 gc->pc += cmdlen;
5361 if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5362 }
5363 else {
5364 const GLint op = opcode;
5365 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);
5383 }
5384 }
5385 }
5386
5387 #define X_GLrop_TexSubImage3D 4115
5388 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)
5390 {
5391 __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset, yoffset, zoffset, 1, width, height, depth, 1, format, type, pixels );
5392 }
5393
5394 #define X_GLrop_CopyTexSubImage3D 4123
5395 void
5396 __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
5397 {
5398 __GLXcontext * const gc = __glXGetCurrentContext();
5399 const GLuint cmdlen = 40;
5400 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);
5410 gc->pc += cmdlen;
5411 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5412 }
5413
5414 #define X_GLrop_ActiveTextureARB 197
5415 void
5416 __indirect_glActiveTextureARB(GLenum texture)
5417 {
5418 __GLXcontext * const gc = __glXGetCurrentContext();
5419 const GLuint cmdlen = 8;
5420 emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
5421 (void) memcpy((void *)(gc->pc + 4), (void *)(&texture), 4);
5422 gc->pc += cmdlen;
5423 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5424 }
5425
5426 #define X_GLrop_MultiTexCoord1dvARB 198
5427 void
5428 __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
5429 {
5430 __GLXcontext * const gc = __glXGetCurrentContext();
5431 const GLuint cmdlen = 16;
5432 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);
5435 gc->pc += cmdlen;
5436 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5437 }
5438
5439 #define X_GLrop_MultiTexCoord1dvARB 198
5440 void
5441 __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
5442 {
5443 __GLXcontext * const gc = __glXGetCurrentContext();
5444 const GLuint cmdlen = 16;
5445 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);
5448 gc->pc += cmdlen;
5449 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5450 }
5451
5452 #define X_GLrop_MultiTexCoord1fvARB 199
5453 void
5454 __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
5455 {
5456 __GLXcontext * const gc = __glXGetCurrentContext();
5457 const GLuint cmdlen = 12;
5458 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);
5461 gc->pc += cmdlen;
5462 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5463 }
5464
5465 #define X_GLrop_MultiTexCoord1fvARB 199
5466 void
5467 __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
5468 {
5469 __GLXcontext * const gc = __glXGetCurrentContext();
5470 const GLuint cmdlen = 12;
5471 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);
5474 gc->pc += cmdlen;
5475 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5476 }
5477
5478 #define X_GLrop_MultiTexCoord1ivARB 200
5479 void
5480 __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
5481 {
5482 __GLXcontext * const gc = __glXGetCurrentContext();
5483 const GLuint cmdlen = 12;
5484 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);
5487 gc->pc += cmdlen;
5488 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5489 }
5490
5491 #define X_GLrop_MultiTexCoord1ivARB 200
5492 void
5493 __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
5494 {
5495 __GLXcontext * const gc = __glXGetCurrentContext();
5496 const GLuint cmdlen = 12;
5497 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);
5500 gc->pc += cmdlen;
5501 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5502 }
5503
5504 #define X_GLrop_MultiTexCoord1svARB 201
5505 void
5506 __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
5507 {
5508 __GLXcontext * const gc = __glXGetCurrentContext();
5509 const GLuint cmdlen = 12;
5510 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);
5513 gc->pc += cmdlen;
5514 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5515 }
5516
5517 #define X_GLrop_MultiTexCoord1svARB 201
5518 void
5519 __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
5520 {
5521 __GLXcontext * const gc = __glXGetCurrentContext();
5522 const GLuint cmdlen = 12;
5523 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);
5526 gc->pc += cmdlen;
5527 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5528 }
5529
5530 #define X_GLrop_MultiTexCoord2dvARB 202
5531 void
5532 __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
5533 {
5534 __GLXcontext * const gc = __glXGetCurrentContext();
5535 const GLuint cmdlen = 24;
5536 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);
5540 gc->pc += cmdlen;
5541 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5542 }
5543
5544 #define X_GLrop_MultiTexCoord2dvARB 202
5545 void
5546 __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
5547 {
5548 __GLXcontext * const gc = __glXGetCurrentContext();
5549 const GLuint cmdlen = 24;
5550 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);
5553 gc->pc += cmdlen;
5554 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5555 }
5556
5557 #define X_GLrop_MultiTexCoord2fvARB 203
5558 void
5559 __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
5560 {
5561 __GLXcontext * const gc = __glXGetCurrentContext();
5562 const GLuint cmdlen = 16;
5563 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);
5567 gc->pc += cmdlen;
5568 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5569 }
5570
5571 #define X_GLrop_MultiTexCoord2fvARB 203
5572 void
5573 __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
5574 {
5575 __GLXcontext * const gc = __glXGetCurrentContext();
5576 const GLuint cmdlen = 16;
5577 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);
5580 gc->pc += cmdlen;
5581 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5582 }
5583
5584 #define X_GLrop_MultiTexCoord2ivARB 204
5585 void
5586 __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
5587 {
5588 __GLXcontext * const gc = __glXGetCurrentContext();
5589 const GLuint cmdlen = 16;
5590 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);
5594 gc->pc += cmdlen;
5595 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5596 }
5597
5598 #define X_GLrop_MultiTexCoord2ivARB 204
5599 void
5600 __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
5601 {
5602 __GLXcontext * const gc = __glXGetCurrentContext();
5603 const GLuint cmdlen = 16;
5604 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);
5607 gc->pc += cmdlen;
5608 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5609 }
5610
5611 #define X_GLrop_MultiTexCoord2svARB 205
5612 void
5613 __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
5614 {
5615 __GLXcontext * const gc = __glXGetCurrentContext();
5616 const GLuint cmdlen = 12;
5617 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);
5621 gc->pc += cmdlen;
5622 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5623 }
5624
5625 #define X_GLrop_MultiTexCoord2svARB 205
5626 void
5627 __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
5628 {
5629 __GLXcontext * const gc = __glXGetCurrentContext();
5630 const GLuint cmdlen = 12;
5631 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);
5634 gc->pc += cmdlen;
5635 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5636 }
5637
5638 #define X_GLrop_MultiTexCoord3dvARB 206
5639 void
5640 __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
5641 {
5642 __GLXcontext * const gc = __glXGetCurrentContext();
5643 const GLuint cmdlen = 32;
5644 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);
5649 gc->pc += cmdlen;
5650 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5651 }
5652
5653 #define X_GLrop_MultiTexCoord3dvARB 206
5654 void
5655 __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
5656 {
5657 __GLXcontext * const gc = __glXGetCurrentContext();
5658 const GLuint cmdlen = 32;
5659 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);
5662 gc->pc += cmdlen;
5663 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5664 }
5665
5666 #define X_GLrop_MultiTexCoord3fvARB 207
5667 void
5668 __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r)
5669 {
5670 __GLXcontext * const gc = __glXGetCurrentContext();
5671 const GLuint cmdlen = 20;
5672 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);
5677 gc->pc += cmdlen;
5678 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5679 }
5680
5681 #define X_GLrop_MultiTexCoord3fvARB 207
5682 void
5683 __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
5684 {
5685 __GLXcontext * const gc = __glXGetCurrentContext();
5686 const GLuint cmdlen = 20;
5687 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);
5690 gc->pc += cmdlen;
5691 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5692 }
5693
5694 #define X_GLrop_MultiTexCoord3ivARB 208
5695 void
5696 __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
5697 {
5698 __GLXcontext * const gc = __glXGetCurrentContext();
5699 const GLuint cmdlen = 20;
5700 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);
5705 gc->pc += cmdlen;
5706 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5707 }
5708
5709 #define X_GLrop_MultiTexCoord3ivARB 208
5710 void
5711 __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
5712 {
5713 __GLXcontext * const gc = __glXGetCurrentContext();
5714 const GLuint cmdlen = 20;
5715 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);
5718 gc->pc += cmdlen;
5719 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5720 }
5721
5722 #define X_GLrop_MultiTexCoord3svARB 209
5723 void
5724 __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
5725 {
5726 __GLXcontext * const gc = __glXGetCurrentContext();
5727 const GLuint cmdlen = 16;
5728 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);
5733 gc->pc += cmdlen;
5734 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5735 }
5736
5737 #define X_GLrop_MultiTexCoord3svARB 209
5738 void
5739 __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
5740 {
5741 __GLXcontext * const gc = __glXGetCurrentContext();
5742 const GLuint cmdlen = 16;
5743 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);
5746 gc->pc += cmdlen;
5747 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5748 }
5749
5750 #define X_GLrop_MultiTexCoord4dvARB 210
5751 void
5752 __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
5753 {
5754 __GLXcontext * const gc = __glXGetCurrentContext();
5755 const GLuint cmdlen = 40;
5756 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);
5762 gc->pc += cmdlen;
5763 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5764 }
5765
5766 #define X_GLrop_MultiTexCoord4dvARB 210
5767 void
5768 __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
5769 {
5770 __GLXcontext * const gc = __glXGetCurrentContext();
5771 const GLuint cmdlen = 40;
5772 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);
5775 gc->pc += cmdlen;
5776 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5777 }
5778
5779 #define X_GLrop_MultiTexCoord4fvARB 211
5780 void
5781 __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
5782 {
5783 __GLXcontext * const gc = __glXGetCurrentContext();
5784 const GLuint cmdlen = 24;
5785 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);
5791 gc->pc += cmdlen;
5792 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5793 }
5794
5795 #define X_GLrop_MultiTexCoord4fvARB 211
5796 void
5797 __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
5798 {
5799 __GLXcontext * const gc = __glXGetCurrentContext();
5800 const GLuint cmdlen = 24;
5801 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);
5804 gc->pc += cmdlen;
5805 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5806 }
5807
5808 #define X_GLrop_MultiTexCoord4ivARB 212
5809 void
5810 __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
5811 {
5812 __GLXcontext * const gc = __glXGetCurrentContext();
5813 const GLuint cmdlen = 24;
5814 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);
5820 gc->pc += cmdlen;
5821 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5822 }
5823
5824 #define X_GLrop_MultiTexCoord4ivARB 212
5825 void
5826 __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
5827 {
5828 __GLXcontext * const gc = __glXGetCurrentContext();
5829 const GLuint cmdlen = 24;
5830 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);
5833 gc->pc += cmdlen;
5834 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5835 }
5836
5837 #define X_GLrop_MultiTexCoord4svARB 213
5838 void
5839 __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
5840 {
5841 __GLXcontext * const gc = __glXGetCurrentContext();
5842 const GLuint cmdlen = 16;
5843 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);
5849 gc->pc += cmdlen;
5850 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5851 }
5852
5853 #define X_GLrop_MultiTexCoord4svARB 213
5854 void
5855 __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
5856 {
5857 __GLXcontext * const gc = __glXGetCurrentContext();
5858 const GLuint cmdlen = 16;
5859 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);
5862 gc->pc += cmdlen;
5863 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5864 }
5865
5866 #define X_GLrop_SampleCoverageARB 229
5867 void
5868 __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
5869 {
5870 __GLXcontext * const gc = __glXGetCurrentContext();
5871 const GLuint cmdlen = 12;
5872 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); }
5877 }
5878
5879 #define X_GLvop_GetProgramStringARB 1308
5880 void
5881 __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
5882 {
5883 __GLXcontext * const gc = __glXGetCurrentContext();
5884 Display * const dpy = gc->currentDpy;
5885 const GLuint cmdlen = 8;
5886 if (__builtin_expect(dpy != NULL, 1)) {
5887 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringARB, cmdlen);
5888 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5889 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5890 (void) __glXReadReply(dpy, 1, string, GL_TRUE);
5891 UnlockDisplay(dpy); SyncHandle();
5892 }
5893 return;
5894 }
5895
5896 #define X_GLvop_GetProgramivARB 1307
5897 void
5898 __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
5899 {
5900 __GLXcontext * const gc = __glXGetCurrentContext();
5901 Display * const dpy = gc->currentDpy;
5902 const GLuint cmdlen = 8;
5903 if (__builtin_expect(dpy != NULL, 1)) {
5904 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivARB, cmdlen);
5905 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
5906 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
5907 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5908 UnlockDisplay(dpy); SyncHandle();
5909 }
5910 return;
5911 }
5912
5913 #define X_GLrop_ProgramEnvParameter4dvARB 4185
5914 void
5915 __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
5916 {
5917 __GLXcontext * const gc = __glXGetCurrentContext();
5918 const GLuint cmdlen = 44;
5919 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
5920 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5921 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
5922 (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
5923 (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
5924 (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
5925 (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
5926 gc->pc += cmdlen;
5927 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5928 }
5929
5930 #define X_GLrop_ProgramEnvParameter4dvARB 4185
5931 void
5932 __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
5933 {
5934 __GLXcontext * const gc = __glXGetCurrentContext();
5935 const GLuint cmdlen = 44;
5936 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
5937 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5938 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
5939 (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
5940 gc->pc += cmdlen;
5941 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5942 }
5943
5944 #define X_GLrop_ProgramEnvParameter4fvARB 4184
5945 void
5946 __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
5947 {
5948 __GLXcontext * const gc = __glXGetCurrentContext();
5949 const GLuint cmdlen = 28;
5950 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
5951 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5952 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
5953 (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
5954 (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
5955 (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
5956 (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
5957 gc->pc += cmdlen;
5958 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5959 }
5960
5961 #define X_GLrop_ProgramEnvParameter4fvARB 4184
5962 void
5963 __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
5964 {
5965 __GLXcontext * const gc = __glXGetCurrentContext();
5966 const GLuint cmdlen = 28;
5967 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
5968 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5969 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
5970 (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
5971 gc->pc += cmdlen;
5972 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5973 }
5974
5975 #define X_GLrop_ProgramLocalParameter4dvARB 4216
5976 void
5977 __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
5978 {
5979 __GLXcontext * const gc = __glXGetCurrentContext();
5980 const GLuint cmdlen = 44;
5981 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
5982 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
5983 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
5984 (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
5985 (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
5986 (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
5987 (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
5988 gc->pc += cmdlen;
5989 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
5990 }
5991
5992 #define X_GLrop_ProgramLocalParameter4dvARB 4216
5993 void
5994 __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params)
5995 {
5996 __GLXcontext * const gc = __glXGetCurrentContext();
5997 const GLuint cmdlen = 44;
5998 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
5999 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6000 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
6001 (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
6002 gc->pc += cmdlen;
6003 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6004 }
6005
6006 #define X_GLrop_ProgramLocalParameter4fvARB 4215
6007 void
6008 __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
6009 {
6010 __GLXcontext * const gc = __glXGetCurrentContext();
6011 const GLuint cmdlen = 28;
6012 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
6013 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6014 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
6015 (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
6016 (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
6017 (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
6018 (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
6019 gc->pc += cmdlen;
6020 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6021 }
6022
6023 #define X_GLrop_ProgramLocalParameter4fvARB 4215
6024 void
6025 __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params)
6026 {
6027 __GLXcontext * const gc = __glXGetCurrentContext();
6028 const GLuint cmdlen = 28;
6029 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
6030 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6031 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
6032 (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
6033 gc->pc += cmdlen;
6034 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6035 }
6036
6037 #define X_GLrop_ProgramStringARB 4217
6038 void
6039 __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string)
6040 {
6041 __GLXcontext * const gc = __glXGetCurrentContext();
6042 const GLuint cmdlen = 16 + __GLX_PAD(len);
6043 if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
6044 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6045 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
6046 (void) __glXFlushRenderBuffer(gc, gc->pc);
6047 }
6048 emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
6049 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6050 (void) memcpy((void *)(gc->pc + 8), (void *)(&format), 4);
6051 (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
6052 (void) memcpy((void *)(gc->pc + 16), (void *)(string), len);
6053 gc->pc += cmdlen;
6054 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6055 }
6056 else {
6057 const GLint op = X_GLrop_ProgramStringARB;
6058 const GLuint cmdlenLarge = cmdlen + 4;
6059 GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
6060 (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
6061 (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
6062 (void) memcpy((void *)(pc + 8), (void *)(&target), 4);
6063 (void) memcpy((void *)(pc + 12), (void *)(&format), 4);
6064 (void) memcpy((void *)(pc + 16), (void *)(&len), 4);
6065 __glXSendLargeCommand(gc, pc, 20, string, len);
6066 }
6067 }
6068 }
6069
6070 #define X_GLrop_VertexAttrib1dvARB 4197
6071 void
6072 __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
6073 {
6074 __GLXcontext * const gc = __glXGetCurrentContext();
6075 const GLuint cmdlen = 16;
6076 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
6077 (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
6078 (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
6079 gc->pc += cmdlen;
6080 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6081 }
6082
6083 #define X_GLrop_VertexAttrib1dvARB 4197
6084 void
6085 __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
6086 {
6087 __GLXcontext * const gc = __glXGetCurrentContext();
6088 const GLuint cmdlen = 16;
6089 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
6090 (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
6091 (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
6092 gc->pc += cmdlen;
6093 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6094 }
6095
6096 #define X_GLrop_VertexAttrib1fvARB 4193
6097 void
6098 __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
6099 {
6100 __GLXcontext * const gc = __glXGetCurrentContext();
6101 const GLuint cmdlen = 12;
6102 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
6103 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6104 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
6105 gc->pc += cmdlen;
6106 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6107 }
6108
6109 #define X_GLrop_VertexAttrib1fvARB 4193
6110 void
6111 __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
6112 {
6113 __GLXcontext * const gc = __glXGetCurrentContext();
6114 const GLuint cmdlen = 12;
6115 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
6116 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6117 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6118 gc->pc += cmdlen;
6119 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6120 }
6121
6122 #define X_GLrop_VertexAttrib1svARB 4189
6123 void
6124 __indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
6125 {
6126 __GLXcontext * const gc = __glXGetCurrentContext();
6127 const GLuint cmdlen = 12;
6128 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
6129 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6130 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6131 gc->pc += cmdlen;
6132 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6133 }
6134
6135 #define X_GLrop_VertexAttrib1svARB 4189
6136 void
6137 __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
6138 {
6139 __GLXcontext * const gc = __glXGetCurrentContext();
6140 const GLuint cmdlen = 12;
6141 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
6142 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6143 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
6144 gc->pc += cmdlen;
6145 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6146 }
6147
6148 #define X_GLrop_VertexAttrib2dvARB 4198
6149 void
6150 __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
6151 {
6152 __GLXcontext * const gc = __glXGetCurrentContext();
6153 const GLuint cmdlen = 24;
6154 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
6155 (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
6156 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
6157 (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4);
6158 gc->pc += cmdlen;
6159 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6160 }
6161
6162 #define X_GLrop_VertexAttrib2dvARB 4198
6163 void
6164 __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
6165 {
6166 __GLXcontext * const gc = __glXGetCurrentContext();
6167 const GLuint cmdlen = 24;
6168 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
6169 (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16);
6170 (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4);
6171 gc->pc += cmdlen;
6172 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6173 }
6174
6175 #define X_GLrop_VertexAttrib2fvARB 4194
6176 void
6177 __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
6178 {
6179 __GLXcontext * const gc = __glXGetCurrentContext();
6180 const GLuint cmdlen = 16;
6181 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
6182 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6183 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
6184 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
6185 gc->pc += cmdlen;
6186 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6187 }
6188
6189 #define X_GLrop_VertexAttrib2fvARB 4194
6190 void
6191 __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
6192 {
6193 __GLXcontext * const gc = __glXGetCurrentContext();
6194 const GLuint cmdlen = 16;
6195 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
6196 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6197 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6198 gc->pc += cmdlen;
6199 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6200 }
6201
6202 #define X_GLrop_VertexAttrib2svARB 4190
6203 void
6204 __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
6205 {
6206 __GLXcontext * const gc = __glXGetCurrentContext();
6207 const GLuint cmdlen = 12;
6208 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
6209 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6210 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6211 (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
6212 gc->pc += cmdlen;
6213 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6214 }
6215
6216 #define X_GLrop_VertexAttrib2svARB 4190
6217 void
6218 __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
6219 {
6220 __GLXcontext * const gc = __glXGetCurrentContext();
6221 const GLuint cmdlen = 12;
6222 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
6223 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6224 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6225 gc->pc += cmdlen;
6226 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6227 }
6228
6229 #define X_GLrop_VertexAttrib3dvARB 4199
6230 void
6231 __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z)
6232 {
6233 __GLXcontext * const gc = __glXGetCurrentContext();
6234 const GLuint cmdlen = 32;
6235 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
6236 (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
6237 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
6238 (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
6239 (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4);
6240 gc->pc += cmdlen;
6241 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6242 }
6243
6244 #define X_GLrop_VertexAttrib3dvARB 4199
6245 void
6246 __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
6247 {
6248 __GLXcontext * const gc = __glXGetCurrentContext();
6249 const GLuint cmdlen = 32;
6250 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
6251 (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24);
6252 (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4);
6253 gc->pc += cmdlen;
6254 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6255 }
6256
6257 #define X_GLrop_VertexAttrib3fvARB 4195
6258 void
6259 __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
6260 {
6261 __GLXcontext * const gc = __glXGetCurrentContext();
6262 const GLuint cmdlen = 20;
6263 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
6264 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6265 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
6266 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
6267 (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
6268 gc->pc += cmdlen;
6269 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6270 }
6271
6272 #define X_GLrop_VertexAttrib3fvARB 4195
6273 void
6274 __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
6275 {
6276 __GLXcontext * const gc = __glXGetCurrentContext();
6277 const GLuint cmdlen = 20;
6278 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
6279 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6280 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
6281 gc->pc += cmdlen;
6282 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6283 }
6284
6285 #define X_GLrop_VertexAttrib3svARB 4191
6286 void
6287 __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
6288 {
6289 __GLXcontext * const gc = __glXGetCurrentContext();
6290 const GLuint cmdlen = 16;
6291 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
6292 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6293 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6294 (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
6295 (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
6296 gc->pc += cmdlen;
6297 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6298 }
6299
6300 #define X_GLrop_VertexAttrib3svARB 4191
6301 void
6302 __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
6303 {
6304 __GLXcontext * const gc = __glXGetCurrentContext();
6305 const GLuint cmdlen = 16;
6306 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
6307 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6308 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
6309 gc->pc += cmdlen;
6310 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6311 }
6312
6313 #define X_GLrop_VertexAttrib4NbvARB 4235
6314 void
6315 __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v)
6316 {
6317 __GLXcontext * const gc = __glXGetCurrentContext();
6318 const GLuint cmdlen = 12;
6319 emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
6320 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6321 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6322 gc->pc += cmdlen;
6323 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6324 }
6325
6326 #define X_GLrop_VertexAttrib4NivARB 4237
6327 void
6328 __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
6329 {
6330 __GLXcontext * const gc = __glXGetCurrentContext();
6331 const GLuint cmdlen = 24;
6332 emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
6333 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6334 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6335 gc->pc += cmdlen;
6336 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6337 }
6338
6339 #define X_GLrop_VertexAttrib4NsvARB 4236
6340 void
6341 __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
6342 {
6343 __GLXcontext * const gc = __glXGetCurrentContext();
6344 const GLuint cmdlen = 16;
6345 emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
6346 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6347 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6348 gc->pc += cmdlen;
6349 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6350 }
6351
6352 #define X_GLrop_VertexAttrib4NubvARB 4201
6353 void
6354 __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
6355 {
6356 __GLXcontext * const gc = __glXGetCurrentContext();
6357 const GLuint cmdlen = 12;
6358 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
6359 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6360 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
6361 (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
6362 (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
6363 (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
6364 gc->pc += cmdlen;
6365 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6366 }
6367
6368 #define X_GLrop_VertexAttrib4NubvARB 4201
6369 void
6370 __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v)
6371 {
6372 __GLXcontext * const gc = __glXGetCurrentContext();
6373 const GLuint cmdlen = 12;
6374 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
6375 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6376 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6377 gc->pc += cmdlen;
6378 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6379 }
6380
6381 #define X_GLrop_VertexAttrib4NuivARB 4239
6382 void
6383 __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
6384 {
6385 __GLXcontext * const gc = __glXGetCurrentContext();
6386 const GLuint cmdlen = 24;
6387 emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
6388 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6389 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6390 gc->pc += cmdlen;
6391 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6392 }
6393
6394 #define X_GLrop_VertexAttrib4NusvARB 4238
6395 void
6396 __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
6397 {
6398 __GLXcontext * const gc = __glXGetCurrentContext();
6399 const GLuint cmdlen = 16;
6400 emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
6401 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6402 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6403 gc->pc += cmdlen;
6404 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6405 }
6406
6407 #define X_GLrop_VertexAttrib4bvARB 4230
6408 void
6409 __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v)
6410 {
6411 __GLXcontext * const gc = __glXGetCurrentContext();
6412 const GLuint cmdlen = 12;
6413 emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
6414 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6415 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6416 gc->pc += cmdlen;
6417 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6418 }
6419
6420 #define X_GLrop_VertexAttrib4dvARB 4200
6421 void
6422 __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
6423 {
6424 __GLXcontext * const gc = __glXGetCurrentContext();
6425 const GLuint cmdlen = 40;
6426 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
6427 (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
6428 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
6429 (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
6430 (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
6431 (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4);
6432 gc->pc += cmdlen;
6433 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6434 }
6435
6436 #define X_GLrop_VertexAttrib4dvARB 4200
6437 void
6438 __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
6439 {
6440 __GLXcontext * const gc = __glXGetCurrentContext();
6441 const GLuint cmdlen = 40;
6442 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
6443 (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
6444 (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4);
6445 gc->pc += cmdlen;
6446 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6447 }
6448
6449 #define X_GLrop_VertexAttrib4fvARB 4196
6450 void
6451 __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
6452 {
6453 __GLXcontext * const gc = __glXGetCurrentContext();
6454 const GLuint cmdlen = 24;
6455 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
6456 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6457 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
6458 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
6459 (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
6460 (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
6461 gc->pc += cmdlen;
6462 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6463 }
6464
6465 #define X_GLrop_VertexAttrib4fvARB 4196
6466 void
6467 __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
6468 {
6469 __GLXcontext * const gc = __glXGetCurrentContext();
6470 const GLuint cmdlen = 24;
6471 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
6472 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6473 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6474 gc->pc += cmdlen;
6475 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6476 }
6477
6478 #define X_GLrop_VertexAttrib4ivARB 4231
6479 void
6480 __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
6481 {
6482 __GLXcontext * const gc = __glXGetCurrentContext();
6483 const GLuint cmdlen = 24;
6484 emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
6485 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6486 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6487 gc->pc += cmdlen;
6488 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6489 }
6490
6491 #define X_GLrop_VertexAttrib4svARB 4192
6492 void
6493 __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
6494 {
6495 __GLXcontext * const gc = __glXGetCurrentContext();
6496 const GLuint cmdlen = 16;
6497 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
6498 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6499 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
6500 (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
6501 (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
6502 (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
6503 gc->pc += cmdlen;
6504 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6505 }
6506
6507 #define X_GLrop_VertexAttrib4svARB 4192
6508 void
6509 __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
6510 {
6511 __GLXcontext * const gc = __glXGetCurrentContext();
6512 const GLuint cmdlen = 16;
6513 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
6514 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6515 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6516 gc->pc += cmdlen;
6517 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6518 }
6519
6520 #define X_GLrop_VertexAttrib4ubvARB 4232
6521 void
6522 __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v)
6523 {
6524 __GLXcontext * const gc = __glXGetCurrentContext();
6525 const GLuint cmdlen = 12;
6526 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
6527 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6528 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
6529 gc->pc += cmdlen;
6530 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6531 }
6532
6533 #define X_GLrop_VertexAttrib4uivARB 4234
6534 void
6535 __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
6536 {
6537 __GLXcontext * const gc = __glXGetCurrentContext();
6538 const GLuint cmdlen = 24;
6539 emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
6540 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6541 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
6542 gc->pc += cmdlen;
6543 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6544 }
6545
6546 #define X_GLrop_VertexAttrib4usvARB 4233
6547 void
6548 __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
6549 {
6550 __GLXcontext * const gc = __glXGetCurrentContext();
6551 const GLuint cmdlen = 16;
6552 emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
6553 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
6554 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
6555 gc->pc += cmdlen;
6556 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6557 }
6558
6559 #define X_GLrop_BeginQueryARB 231
6560 void
6561 __indirect_glBeginQueryARB(GLenum target, GLuint id)
6562 {
6563 __GLXcontext * const gc = __glXGetCurrentContext();
6564 const GLuint cmdlen = 12;
6565 emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
6566 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6567 (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
6568 gc->pc += cmdlen;
6569 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6570 }
6571
6572 #define X_GLsop_DeleteQueriesARB 161
6573 void
6574 __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
6575 {
6576 __GLXcontext * const gc = __glXGetCurrentContext();
6577 Display * const dpy = gc->currentDpy;
6578 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
6579 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
6580 #ifdef USE_XCB
6581 XCBConnection *c = XCBConnectionOfDisplay(dpy);
6582 (void) __glXFlushRenderBuffer(gc, gc->pc);
6583 XCBGlxDeleteQueriesARB(c, gc->currentContextTag, n, ids);
6584 #else
6585 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
6586 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
6587 (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4));
6588 UnlockDisplay(dpy); SyncHandle();
6589 #endif /* USE_XCB */
6590 }
6591 return;
6592 }
6593
6594 #define X_GLrop_EndQueryARB 232
6595 void
6596 __indirect_glEndQueryARB(GLenum target)
6597 {
6598 __GLXcontext * const gc = __glXGetCurrentContext();
6599 const GLuint cmdlen = 8;
6600 emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
6601 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
6602 gc->pc += cmdlen;
6603 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6604 }
6605
6606 #define X_GLsop_GenQueriesARB 162
6607 void
6608 __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
6609 {
6610 __GLXcontext * const gc = __glXGetCurrentContext();
6611 Display * const dpy = gc->currentDpy;
6612 const GLuint cmdlen = 4;
6613 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
6614 #ifdef USE_XCB
6615 XCBConnection *c = XCBConnectionOfDisplay(dpy);
6616 (void) __glXFlushRenderBuffer(gc, gc->pc);
6617 XCBGlxGenQueriesARBRep *reply = XCBGlxGenQueriesARBReply(c, XCBGlxGenQueriesARB(c, gc->currentContextTag, n), NULL);
6618 (void)memcpy(ids, XCBGlxGenQueriesARBData(reply), XCBGlxGenQueriesARBDataLength(reply) * sizeof(GLuint));
6619 free(reply);
6620 #else
6621 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
6622 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
6623 (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
6624 UnlockDisplay(dpy); SyncHandle();
6625 #endif /* USE_XCB */
6626 }
6627 return;
6628 }
6629
6630 #define X_GLsop_GetQueryObjectivARB 165
6631 void
6632 __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
6633 {
6634 __GLXcontext * const gc = __glXGetCurrentContext();
6635 Display * const dpy = gc->currentDpy;
6636 const GLuint cmdlen = 8;
6637 if (__builtin_expect(dpy != NULL, 1)) {
6638 #ifdef USE_XCB
6639 XCBConnection *c = XCBConnectionOfDisplay(dpy);
6640 (void) __glXFlushRenderBuffer(gc, gc->pc);
6641 XCBGlxGetQueryObjectivARBRep *reply = XCBGlxGetQueryObjectivARBReply(c, XCBGlxGetQueryObjectivARB(c, gc->currentContextTag, id, pname), NULL);
6642 if (XCBGlxGetQueryObjectivARBDataLength(reply) == 0)
6643 (void)memcpy(params, &reply->datum, sizeof(reply->datum));
6644 else
6645 (void)memcpy(params, XCBGlxGetQueryObjectivARBData(reply), XCBGlxGetQueryObjectivARBDataLength(reply) * sizeof(GLint));
6646 free(reply);
6647 #else
6648 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
6649 (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
6650 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
6651 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6652 UnlockDisplay(dpy); SyncHandle();
6653 #endif /* USE_XCB */
6654 }
6655 return;
6656 }
6657
6658 #define X_GLsop_GetQueryObjectuivARB 166
6659 void
6660 __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
6661 {
6662 __GLXcontext * const gc = __glXGetCurrentContext();
6663 Display * const dpy = gc->currentDpy;
6664 const GLuint cmdlen = 8;
6665 if (__builtin_expect(dpy != NULL, 1)) {
6666 #ifdef USE_XCB
6667 XCBConnection *c = XCBConnectionOfDisplay(dpy);
6668 (void) __glXFlushRenderBuffer(gc, gc->pc);
6669 XCBGlxGetQueryObjectuivARBRep *reply = XCBGlxGetQueryObjectuivARBReply(c, XCBGlxGetQueryObjectuivARB(c, gc->currentContextTag, id, pname), NULL);
6670 if (XCBGlxGetQueryObjectuivARBDataLength(reply) == 0)
6671 (void)memcpy(params, &reply->datum, sizeof(reply->datum));
6672 else
6673 (void)memcpy(params, XCBGlxGetQueryObjectuivARBData(reply), XCBGlxGetQueryObjectuivARBDataLength(reply) * sizeof(GLuint));
6674 free(reply);
6675 #else
6676 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
6677 (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
6678 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
6679 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6680 UnlockDisplay(dpy); SyncHandle();
6681 #endif /* USE_XCB */
6682 }
6683 return;
6684 }
6685
6686 #define X_GLsop_GetQueryivARB 164
6687 void
6688 __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
6689 {
6690 __GLXcontext * const gc = __glXGetCurrentContext();
6691 Display * const dpy = gc->currentDpy;
6692 const GLuint cmdlen = 8;
6693 if (__builtin_expect(dpy != NULL, 1)) {
6694 #ifdef USE_XCB
6695 XCBConnection *c = XCBConnectionOfDisplay(dpy);
6696 (void) __glXFlushRenderBuffer(gc, gc->pc);
6697 XCBGlxGetQueryivARBRep *reply = XCBGlxGetQueryivARBReply(c, XCBGlxGetQueryivARB(c, gc->currentContextTag, target, pname), NULL);
6698 if (XCBGlxGetQueryivARBDataLength(reply) == 0)
6699 (void)memcpy(params, &reply->datum, sizeof(reply->datum));
6700 else
6701 (void)memcpy(params, XCBGlxGetQueryivARBData(reply), XCBGlxGetQueryivARBDataLength(reply) * sizeof(GLint));
6702 free(reply);
6703 #else
6704 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
6705 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
6706 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
6707 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6708 UnlockDisplay(dpy); SyncHandle();
6709 #endif /* USE_XCB */
6710 }
6711 return;
6712 }
6713
6714 #define X_GLsop_IsQueryARB 163
6715 GLboolean
6716 __indirect_glIsQueryARB(GLuint id)
6717 {
6718 __GLXcontext * const gc = __glXGetCurrentContext();
6719 Display * const dpy = gc->currentDpy;
6720 GLboolean retval = (GLboolean) 0;
6721 const GLuint cmdlen = 4;
6722 if (__builtin_expect(dpy != NULL, 1)) {
6723 #ifdef USE_XCB
6724 XCBConnection *c = XCBConnectionOfDisplay(dpy);
6725 (void) __glXFlushRenderBuffer(gc, gc->pc);
6726 XCBGlxIsQueryARBRep *reply = XCBGlxIsQueryARBReply(c, XCBGlxIsQueryARB(c, gc->currentContextTag, id), NULL);
6727 retval = reply->ret_val;
6728 free(reply);
6729 #else
6730 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
6731 (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
6732 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
6733 UnlockDisplay(dpy); SyncHandle();
6734 #endif /* USE_XCB */
6735 }
6736 return retval;
6737 }
6738
6739 #define X_GLrop_DrawBuffersARB 233
6740 void
6741 __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
6742 {
6743 __GLXcontext * const gc = __glXGetCurrentContext();
6744 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
6745 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
6746 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6747 if ( (gc->pc + cmdlen) > gc->bufEnd ) {
6748 (void) __glXFlushRenderBuffer(gc, gc->pc);
6749 }
6750 emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
6751 (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
6752 (void) memcpy((void *)(gc->pc + 8), (void *)(bufs), (n * 4));
6753 gc->pc += cmdlen;
6754 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6755 }
6756 else {
6757 const GLint op = X_GLrop_DrawBuffersARB;
6758 const GLuint cmdlenLarge = cmdlen + 4;
6759 GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
6760 (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
6761 (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
6762 (void) memcpy((void *)(pc + 8), (void *)(&n), 4);
6763 __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
6764 }
6765 }
6766 }
6767
6768 #define X_GLvop_GetColorTableParameterfvSGI 4099
6769 void
6770 __indirect_glGetColorTableParameterfvSGI(GLenum target, GLenum pname, GLfloat * params)
6771 {
6772 __GLXcontext * const gc = __glXGetCurrentContext();
6773 Display * const dpy = gc->currentDpy;
6774 const GLuint cmdlen = 8;
6775 if (__builtin_expect(dpy != NULL, 1)) {
6776 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterfvSGI, cmdlen);
6777 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
6778 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
6779 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6780 UnlockDisplay(dpy); SyncHandle();
6781 }
6782 return;
6783 }
6784
6785 #define X_GLvop_GetColorTableParameterivSGI 4100
6786 void
6787 __indirect_glGetColorTableParameterivSGI(GLenum target, GLenum pname, GLint * params)
6788 {
6789 __GLXcontext * const gc = __glXGetCurrentContext();
6790 Display * const dpy = gc->currentDpy;
6791 const GLuint cmdlen = 8;
6792 if (__builtin_expect(dpy != NULL, 1)) {
6793 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterivSGI, cmdlen);
6794 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
6795 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
6796 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6797 UnlockDisplay(dpy); SyncHandle();
6798 }
6799 return;
6800 }
6801
6802 #define X_GLvop_GetColorTableSGI 4098
6803 void
6804 __indirect_glGetColorTableSGI(GLenum target, GLenum format, GLenum type, GLvoid * table)
6805 {
6806 __GLXcontext * const gc = __glXGetCurrentContext();
6807 const __GLXattribute * const state = gc->client_state_private;
6808 Display * const dpy = gc->currentDpy;
6809 const GLuint cmdlen = 16;
6810 if (__builtin_expect(dpy != NULL, 1)) {
6811 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableSGI, cmdlen);
6812 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
6813 (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
6814 (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
6815 *(int32_t *)(pc + 12) = 0;
6816 * (int8_t *)(pc + 12) = state->storePack.swapEndian;
6817 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE);
6818 UnlockDisplay(dpy); SyncHandle();
6819 }
6820 return;
6821 }
6822
6823 #define X_GLvop_AreTexturesResidentEXT 11
6824 GLboolean
6825 __indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences)
6826 {
6827 __GLXcontext * const gc = __glXGetCurrentContext();
6828 Display * const dpy = gc->currentDpy;
6829 GLboolean retval = (GLboolean) 0;
6830 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
6831 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
6832 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreTexturesResidentEXT, cmdlen);
6833 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
6834 (void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
6835 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
6836 UnlockDisplay(dpy); SyncHandle();
6837 }
6838 return retval;
6839 }
6840
6841 #define X_GLvop_GenTexturesEXT 13
6842 void
6843 __indirect_glGenTexturesEXT(GLsizei n, GLuint * textures)
6844 {
6845 __GLXcontext * const gc = __glXGetCurrentContext();
6846 Display * const dpy = gc->currentDpy;
6847 const GLuint cmdlen = 4;
6848 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
6849 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen);
6850 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
6851 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
6852 UnlockDisplay(dpy); SyncHandle();
6853 }
6854 return;
6855 }
6856
6857 #define X_GLvop_IsTextureEXT 14
6858 GLboolean
6859 __indirect_glIsTextureEXT(GLuint texture)
6860 {
6861 __GLXcontext * const gc = __glXGetCurrentContext();
6862 Display * const dpy = gc->currentDpy;
6863 GLboolean retval = (GLboolean) 0;
6864 const GLuint cmdlen = 4;
6865 if (__builtin_expect(dpy != NULL, 1)) {
6866 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsTextureEXT, cmdlen);
6867 (void) memcpy((void *)(pc + 0), (void *)(&texture), 4);
6868 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
6869 UnlockDisplay(dpy); SyncHandle();
6870 }
6871 return retval;
6872 }
6873
6874 #define X_GLrop_SampleMaskSGIS 2048
6875 void
6876 __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
6877 {
6878 __GLXcontext * const gc = __glXGetCurrentContext();
6879 const GLuint cmdlen = 12;
6880 emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
6881 (void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4);
6882 (void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1);
6883 gc->pc += cmdlen;
6884 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6885 }
6886
6887 #define X_GLrop_SamplePatternSGIS 2049
6888 void
6889 __indirect_glSamplePatternSGIS(GLenum pattern)
6890 {
6891 __GLXcontext * const gc = __glXGetCurrentContext();
6892 const GLuint cmdlen = 8;
6893 emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
6894 (void) memcpy((void *)(gc->pc + 4), (void *)(&pattern), 4);
6895 gc->pc += cmdlen;
6896 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6897 }
6898
6899 #define X_GLrop_PointParameterfEXT 2065
6900 void
6901 __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
6902 {
6903 __GLXcontext * const gc = __glXGetCurrentContext();
6904 const GLuint cmdlen = 12;
6905 emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
6906 (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
6907 (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
6908 gc->pc += cmdlen;
6909 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6910 }
6911
6912 #define X_GLrop_PointParameterfvEXT 2066
6913 void
6914 __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
6915 {
6916 __GLXcontext * const gc = __glXGetCurrentContext();
6917 const GLuint compsize = __glPointParameterfvEXT_size(pname);
6918 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
6919 emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
6920 (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
6921 (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
6922 gc->pc += cmdlen;
6923 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6924 }
6925
6926 #define X_GLrop_SecondaryColor3bvEXT 4126
6927 void
6928 __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
6929 {
6930 __GLXcontext * const gc = __glXGetCurrentContext();
6931 const GLuint cmdlen = 8;
6932 emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
6933 (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
6934 (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
6935 (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
6936 gc->pc += cmdlen;
6937 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6938 }
6939
6940 #define X_GLrop_SecondaryColor3bvEXT 4126
6941 void
6942 __indirect_glSecondaryColor3bvEXT(const GLbyte * v)
6943 {
6944 generic_3_byte( X_GLrop_SecondaryColor3bvEXT, v );
6945 }
6946
6947 #define X_GLrop_SecondaryColor3dvEXT 4130
6948 void
6949 __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
6950 {
6951 __GLXcontext * const gc = __glXGetCurrentContext();
6952 const GLuint cmdlen = 28;
6953 emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
6954 (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8);
6955 (void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8);
6956 (void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8);
6957 gc->pc += cmdlen;
6958 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6959 }
6960
6961 #define X_GLrop_SecondaryColor3dvEXT 4130
6962 void
6963 __indirect_glSecondaryColor3dvEXT(const GLdouble * v)
6964 {
6965 generic_24_byte( X_GLrop_SecondaryColor3dvEXT, v );
6966 }
6967
6968 #define X_GLrop_SecondaryColor3fvEXT 4129
6969 void
6970 __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
6971 {
6972 __GLXcontext * const gc = __glXGetCurrentContext();
6973 const GLuint cmdlen = 16;
6974 emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
6975 (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
6976 (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
6977 (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
6978 gc->pc += cmdlen;
6979 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
6980 }
6981
6982 #define X_GLrop_SecondaryColor3fvEXT 4129
6983 void
6984 __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
6985 {
6986 generic_12_byte( X_GLrop_SecondaryColor3fvEXT, v );
6987 }
6988
6989 #define X_GLrop_SecondaryColor3ivEXT 4128
6990 void
6991 __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
6992 {
6993 __GLXcontext * const gc = __glXGetCurrentContext();
6994 const GLuint cmdlen = 16;
6995 emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
6996 (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
6997 (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
6998 (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
6999 gc->pc += cmdlen;
7000 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7001 }
7002
7003 #define X_GLrop_SecondaryColor3ivEXT 4128
7004 void
7005 __indirect_glSecondaryColor3ivEXT(const GLint * v)
7006 {
7007 generic_12_byte( X_GLrop_SecondaryColor3ivEXT, v );
7008 }
7009
7010 #define X_GLrop_SecondaryColor3svEXT 4127
7011 void
7012 __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
7013 {
7014 __GLXcontext * const gc = __glXGetCurrentContext();
7015 const GLuint cmdlen = 12;
7016 emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
7017 (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
7018 (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
7019 (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
7020 gc->pc += cmdlen;
7021 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7022 }
7023
7024 #define X_GLrop_SecondaryColor3svEXT 4127
7025 void
7026 __indirect_glSecondaryColor3svEXT(const GLshort * v)
7027 {
7028 generic_6_byte( X_GLrop_SecondaryColor3svEXT, v );
7029 }
7030
7031 #define X_GLrop_SecondaryColor3ubvEXT 4131
7032 void
7033 __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
7034 {
7035 __GLXcontext * const gc = __glXGetCurrentContext();
7036 const GLuint cmdlen = 8;
7037 emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
7038 (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1);
7039 (void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1);
7040 (void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1);
7041 gc->pc += cmdlen;
7042 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7043 }
7044
7045 #define X_GLrop_SecondaryColor3ubvEXT 4131
7046 void
7047 __indirect_glSecondaryColor3ubvEXT(const GLubyte * v)
7048 {
7049 generic_3_byte( X_GLrop_SecondaryColor3ubvEXT, v );
7050 }
7051
7052 #define X_GLrop_SecondaryColor3uivEXT 4133
7053 void
7054 __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
7055 {
7056 __GLXcontext * const gc = __glXGetCurrentContext();
7057 const GLuint cmdlen = 16;
7058 emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
7059 (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4);
7060 (void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4);
7061 (void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4);
7062 gc->pc += cmdlen;
7063 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7064 }
7065
7066 #define X_GLrop_SecondaryColor3uivEXT 4133
7067 void
7068 __indirect_glSecondaryColor3uivEXT(const GLuint * v)
7069 {
7070 generic_12_byte( X_GLrop_SecondaryColor3uivEXT, v );
7071 }
7072
7073 #define X_GLrop_SecondaryColor3usvEXT 4132
7074 void
7075 __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
7076 {
7077 __GLXcontext * const gc = __glXGetCurrentContext();
7078 const GLuint cmdlen = 12;
7079 emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
7080 (void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2);
7081 (void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2);
7082 (void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2);
7083 gc->pc += cmdlen;
7084 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7085 }
7086
7087 #define X_GLrop_SecondaryColor3usvEXT 4132
7088 void
7089 __indirect_glSecondaryColor3usvEXT(const GLushort * v)
7090 {
7091 generic_6_byte( X_GLrop_SecondaryColor3usvEXT, v );
7092 }
7093
7094 #define X_GLrop_FogCoorddvEXT 4125
7095 void
7096 __indirect_glFogCoorddEXT(GLdouble coord)
7097 {
7098 __GLXcontext * const gc = __glXGetCurrentContext();
7099 const GLuint cmdlen = 12;
7100 emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
7101 (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 8);
7102 gc->pc += cmdlen;
7103 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7104 }
7105
7106 #define X_GLrop_FogCoorddvEXT 4125
7107 void
7108 __indirect_glFogCoorddvEXT(const GLdouble * coord)
7109 {
7110 generic_8_byte( X_GLrop_FogCoorddvEXT, coord );
7111 }
7112
7113 #define X_GLrop_FogCoordfvEXT 4124
7114 void
7115 __indirect_glFogCoordfEXT(GLfloat coord)
7116 {
7117 __GLXcontext * const gc = __glXGetCurrentContext();
7118 const GLuint cmdlen = 8;
7119 emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
7120 (void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4);
7121 gc->pc += cmdlen;
7122 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7123 }
7124
7125 #define X_GLrop_FogCoordfvEXT 4124
7126 void
7127 __indirect_glFogCoordfvEXT(const GLfloat * coord)
7128 {
7129 generic_4_byte( X_GLrop_FogCoordfvEXT, coord );
7130 }
7131
7132 #define X_GLrop_BlendFuncSeparateEXT 4134
7133 void
7134 __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
7135 {
7136 __GLXcontext * const gc = __glXGetCurrentContext();
7137 const GLuint cmdlen = 20;
7138 emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
7139 (void) memcpy((void *)(gc->pc + 4), (void *)(&sfactorRGB), 4);
7140 (void) memcpy((void *)(gc->pc + 8), (void *)(&dfactorRGB), 4);
7141 (void) memcpy((void *)(gc->pc + 12), (void *)(&sfactorAlpha), 4);
7142 (void) memcpy((void *)(gc->pc + 16), (void *)(&dfactorAlpha), 4);
7143 gc->pc += cmdlen;
7144 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7145 }
7146
7147 #define X_GLrop_WindowPos3fvMESA 230
7148 void
7149 __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
7150 {
7151 __GLXcontext * const gc = __glXGetCurrentContext();
7152 const GLuint cmdlen = 16;
7153 emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
7154 (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4);
7155 (void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4);
7156 (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4);
7157 gc->pc += cmdlen;
7158 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7159 }
7160
7161 #define X_GLrop_WindowPos3fvMESA 230
7162 void
7163 __indirect_glWindowPos3fvMESA(const GLfloat * v)
7164 {
7165 generic_12_byte( X_GLrop_WindowPos3fvMESA, v );
7166 }
7167
7168 #define X_GLvop_AreProgramsResidentNV 1293
7169 GLboolean
7170 __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences)
7171 {
7172 __GLXcontext * const gc = __glXGetCurrentContext();
7173 Display * const dpy = gc->currentDpy;
7174 GLboolean retval = (GLboolean) 0;
7175 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
7176 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7177 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreProgramsResidentNV, cmdlen);
7178 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7179 (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4));
7180 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
7181 UnlockDisplay(dpy); SyncHandle();
7182 }
7183 return retval;
7184 }
7185
7186 #define X_GLrop_BindProgramNV 4180
7187 void
7188 __indirect_glBindProgramNV(GLenum target, GLuint program)
7189 {
7190 __GLXcontext * const gc = __glXGetCurrentContext();
7191 const GLuint cmdlen = 12;
7192 emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
7193 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7194 (void) memcpy((void *)(gc->pc + 8), (void *)(&program), 4);
7195 gc->pc += cmdlen;
7196 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7197 }
7198
7199 #define X_GLvop_DeleteProgramsNV 1294
7200 void
7201 __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
7202 {
7203 __GLXcontext * const gc = __glXGetCurrentContext();
7204 Display * const dpy = gc->currentDpy;
7205 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
7206 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7207 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteProgramsNV, cmdlen);
7208 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7209 (void) memcpy((void *)(pc + 4), (void *)(programs), (n * 4));
7210 UnlockDisplay(dpy); SyncHandle();
7211 }
7212 return;
7213 }
7214
7215 #define X_GLrop_ExecuteProgramNV 4181
7216 void
7217 __indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params)
7218 {
7219 __GLXcontext * const gc = __glXGetCurrentContext();
7220 const GLuint cmdlen = 28;
7221 emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
7222 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7223 (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
7224 (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
7225 gc->pc += cmdlen;
7226 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7227 }
7228
7229 #define X_GLvop_GenProgramsNV 1295
7230 void
7231 __indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
7232 {
7233 __GLXcontext * const gc = __glXGetCurrentContext();
7234 Display * const dpy = gc->currentDpy;
7235 const GLuint cmdlen = 4;
7236 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7237 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenProgramsNV, cmdlen);
7238 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
7239 (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
7240 UnlockDisplay(dpy); SyncHandle();
7241 }
7242 return;
7243 }
7244
7245 #define X_GLvop_GetProgramParameterdvNV 1297
7246 void
7247 __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params)
7248 {
7249 __GLXcontext * const gc = __glXGetCurrentContext();
7250 Display * const dpy = gc->currentDpy;
7251 const GLuint cmdlen = 12;
7252 if (__builtin_expect(dpy != NULL, 1)) {
7253 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterdvNV, cmdlen);
7254 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7255 (void) memcpy((void *)(pc + 4), (void *)(&index), 4);
7256 (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
7257 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
7258 UnlockDisplay(dpy); SyncHandle();
7259 }
7260 return;
7261 }
7262
7263 #define X_GLvop_GetProgramParameterfvNV 1296
7264 void
7265 __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params)
7266 {
7267 __GLXcontext * const gc = __glXGetCurrentContext();
7268 Display * const dpy = gc->currentDpy;
7269 const GLuint cmdlen = 12;
7270 if (__builtin_expect(dpy != NULL, 1)) {
7271 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterfvNV, cmdlen);
7272 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7273 (void) memcpy((void *)(pc + 4), (void *)(&index), 4);
7274 (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
7275 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7276 UnlockDisplay(dpy); SyncHandle();
7277 }
7278 return;
7279 }
7280
7281 #define X_GLvop_GetProgramStringNV 1299
7282 void
7283 __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program)
7284 {
7285 __GLXcontext * const gc = __glXGetCurrentContext();
7286 Display * const dpy = gc->currentDpy;
7287 const GLuint cmdlen = 8;
7288 if (__builtin_expect(dpy != NULL, 1)) {
7289 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringNV, cmdlen);
7290 (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
7291 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7292 (void) __glXReadReply(dpy, 1, program, GL_TRUE);
7293 UnlockDisplay(dpy); SyncHandle();
7294 }
7295 return;
7296 }
7297
7298 #define X_GLvop_GetProgramivNV 1298
7299 void
7300 __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
7301 {
7302 __GLXcontext * const gc = __glXGetCurrentContext();
7303 Display * const dpy = gc->currentDpy;
7304 const GLuint cmdlen = 8;
7305 if (__builtin_expect(dpy != NULL, 1)) {
7306 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivNV, cmdlen);
7307 (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
7308 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7309 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7310 UnlockDisplay(dpy); SyncHandle();
7311 }
7312 return;
7313 }
7314
7315 #define X_GLvop_GetTrackMatrixivNV 1300
7316 void
7317 __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params)
7318 {
7319 __GLXcontext * const gc = __glXGetCurrentContext();
7320 Display * const dpy = gc->currentDpy;
7321 const GLuint cmdlen = 12;
7322 if (__builtin_expect(dpy != NULL, 1)) {
7323 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetTrackMatrixivNV, cmdlen);
7324 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
7325 (void) memcpy((void *)(pc + 4), (void *)(&address), 4);
7326 (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
7327 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7328 UnlockDisplay(dpy); SyncHandle();
7329 }
7330 return;
7331 }
7332
7333 #define X_GLvop_GetVertexAttribdvNV 1301
7334 void
7335 __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params)
7336 {
7337 __GLXcontext * const gc = __glXGetCurrentContext();
7338 Display * const dpy = gc->currentDpy;
7339 const GLuint cmdlen = 8;
7340 if (__builtin_expect(dpy != NULL, 1)) {
7341 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribdvNV, cmdlen);
7342 (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
7343 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7344 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
7345 UnlockDisplay(dpy); SyncHandle();
7346 }
7347 return;
7348 }
7349
7350 #define X_GLvop_GetVertexAttribfvNV 1302
7351 void
7352 __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
7353 {
7354 __GLXcontext * const gc = __glXGetCurrentContext();
7355 Display * const dpy = gc->currentDpy;
7356 const GLuint cmdlen = 8;
7357 if (__builtin_expect(dpy != NULL, 1)) {
7358 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribfvNV, cmdlen);
7359 (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
7360 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7361 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7362 UnlockDisplay(dpy); SyncHandle();
7363 }
7364 return;
7365 }
7366
7367 #define X_GLvop_GetVertexAttribivNV 1303
7368 void
7369 __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
7370 {
7371 __GLXcontext * const gc = __glXGetCurrentContext();
7372 Display * const dpy = gc->currentDpy;
7373 const GLuint cmdlen = 8;
7374 if (__builtin_expect(dpy != NULL, 1)) {
7375 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribivNV, cmdlen);
7376 (void) memcpy((void *)(pc + 0), (void *)(&index), 4);
7377 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
7378 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7379 UnlockDisplay(dpy); SyncHandle();
7380 }
7381 return;
7382 }
7383
7384 #define X_GLvop_IsProgramNV 1304
7385 GLboolean
7386 __indirect_glIsProgramNV(GLuint program)
7387 {
7388 __GLXcontext * const gc = __glXGetCurrentContext();
7389 Display * const dpy = gc->currentDpy;
7390 GLboolean retval = (GLboolean) 0;
7391 const GLuint cmdlen = 4;
7392 if (__builtin_expect(dpy != NULL, 1)) {
7393 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsProgramNV, cmdlen);
7394 (void) memcpy((void *)(pc + 0), (void *)(&program), 4);
7395 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
7396 UnlockDisplay(dpy); SyncHandle();
7397 }
7398 return retval;
7399 }
7400
7401 #define X_GLrop_LoadProgramNV 4183
7402 void
7403 __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program)
7404 {
7405 __GLXcontext * const gc = __glXGetCurrentContext();
7406 const GLuint cmdlen = 16 + __GLX_PAD(len);
7407 if (__builtin_expect(len >= 0, 1)) {
7408 emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
7409 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7410 (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
7411 (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
7412 (void) memcpy((void *)(gc->pc + 16), (void *)(program), len);
7413 gc->pc += cmdlen;
7414 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7415 }
7416 }
7417
7418 #define X_GLrop_ProgramParameter4dvNV 4185
7419 void
7420 __indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
7421 {
7422 __GLXcontext * const gc = __glXGetCurrentContext();
7423 const GLuint cmdlen = 44;
7424 emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
7425 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7426 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7427 (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
7428 (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
7429 (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
7430 (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
7431 gc->pc += cmdlen;
7432 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7433 }
7434
7435 #define X_GLrop_ProgramParameter4dvNV 4185
7436 void
7437 __indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params)
7438 {
7439 __GLXcontext * const gc = __glXGetCurrentContext();
7440 const GLuint cmdlen = 44;
7441 emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
7442 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7443 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7444 (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
7445 gc->pc += cmdlen;
7446 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7447 }
7448
7449 #define X_GLrop_ProgramParameter4fvNV 4184
7450 void
7451 __indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
7452 {
7453 __GLXcontext * const gc = __glXGetCurrentContext();
7454 const GLuint cmdlen = 28;
7455 emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
7456 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7457 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7458 (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
7459 (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
7460 (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
7461 (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
7462 gc->pc += cmdlen;
7463 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7464 }
7465
7466 #define X_GLrop_ProgramParameter4fvNV 4184
7467 void
7468 __indirect_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * params)
7469 {
7470 __GLXcontext * const gc = __glXGetCurrentContext();
7471 const GLuint cmdlen = 28;
7472 emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
7473 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7474 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7475 (void) memcpy((void *)(gc->pc + 12), (void *)(params), 16);
7476 gc->pc += cmdlen;
7477 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7478 }
7479
7480 #define X_GLrop_ProgramParameters4dvNV 4187
7481 void
7482 __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params)
7483 {
7484 __GLXcontext * const gc = __glXGetCurrentContext();
7485 const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
7486 if (__builtin_expect(num >= 0, 1)) {
7487 emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
7488 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7489 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7490 (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
7491 (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 32));
7492 gc->pc += cmdlen;
7493 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7494 }
7495 }
7496
7497 #define X_GLrop_ProgramParameters4fvNV 4186
7498 void
7499 __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params)
7500 {
7501 __GLXcontext * const gc = __glXGetCurrentContext();
7502 const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
7503 if (__builtin_expect(num >= 0, 1)) {
7504 emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
7505 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7506 (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
7507 (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
7508 (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 16));
7509 gc->pc += cmdlen;
7510 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7511 }
7512 }
7513
7514 #define X_GLrop_RequestResidentProgramsNV 4182
7515 void
7516 __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
7517 {
7518 __GLXcontext * const gc = __glXGetCurrentContext();
7519 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
7520 if (__builtin_expect(n >= 0, 1)) {
7521 emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
7522 (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
7523 (void) memcpy((void *)(gc->pc + 8), (void *)(ids), (n * 4));
7524 gc->pc += cmdlen;
7525 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7526 }
7527 }
7528
7529 #define X_GLrop_TrackMatrixNV 4188
7530 void
7531 __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform)
7532 {
7533 __GLXcontext * const gc = __glXGetCurrentContext();
7534 const GLuint cmdlen = 20;
7535 emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
7536 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
7537 (void) memcpy((void *)(gc->pc + 8), (void *)(&address), 4);
7538 (void) memcpy((void *)(gc->pc + 12), (void *)(&matrix), 4);
7539 (void) memcpy((void *)(gc->pc + 16), (void *)(&transform), 4);
7540 gc->pc += cmdlen;
7541 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7542 }
7543
7544 #define X_GLrop_VertexAttrib1dvNV 4197
7545 void
7546 __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
7547 {
7548 __GLXcontext * const gc = __glXGetCurrentContext();
7549 const GLuint cmdlen = 16;
7550 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
7551 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7552 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
7553 gc->pc += cmdlen;
7554 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7555 }
7556
7557 #define X_GLrop_VertexAttrib1dvNV 4197
7558 void
7559 __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
7560 {
7561 __GLXcontext * const gc = __glXGetCurrentContext();
7562 const GLuint cmdlen = 16;
7563 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
7564 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7565 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7566 gc->pc += cmdlen;
7567 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7568 }
7569
7570 #define X_GLrop_VertexAttrib1fvNV 4193
7571 void
7572 __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
7573 {
7574 __GLXcontext * const gc = __glXGetCurrentContext();
7575 const GLuint cmdlen = 12;
7576 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
7577 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7578 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7579 gc->pc += cmdlen;
7580 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7581 }
7582
7583 #define X_GLrop_VertexAttrib1fvNV 4193
7584 void
7585 __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
7586 {
7587 __GLXcontext * const gc = __glXGetCurrentContext();
7588 const GLuint cmdlen = 12;
7589 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
7590 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7591 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
7592 gc->pc += cmdlen;
7593 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7594 }
7595
7596 #define X_GLrop_VertexAttrib1svNV 4189
7597 void
7598 __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
7599 {
7600 __GLXcontext * const gc = __glXGetCurrentContext();
7601 const GLuint cmdlen = 12;
7602 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
7603 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7604 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
7605 gc->pc += cmdlen;
7606 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7607 }
7608
7609 #define X_GLrop_VertexAttrib1svNV 4189
7610 void
7611 __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
7612 {
7613 __GLXcontext * const gc = __glXGetCurrentContext();
7614 const GLuint cmdlen = 12;
7615 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
7616 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7617 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2);
7618 gc->pc += cmdlen;
7619 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7620 }
7621
7622 #define X_GLrop_VertexAttrib2dvNV 4198
7623 void
7624 __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
7625 {
7626 __GLXcontext * const gc = __glXGetCurrentContext();
7627 const GLuint cmdlen = 24;
7628 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
7629 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7630 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
7631 (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
7632 gc->pc += cmdlen;
7633 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7634 }
7635
7636 #define X_GLrop_VertexAttrib2dvNV 4198
7637 void
7638 __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
7639 {
7640 __GLXcontext * const gc = __glXGetCurrentContext();
7641 const GLuint cmdlen = 24;
7642 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
7643 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7644 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7645 gc->pc += cmdlen;
7646 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7647 }
7648
7649 #define X_GLrop_VertexAttrib2fvNV 4194
7650 void
7651 __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
7652 {
7653 __GLXcontext * const gc = __glXGetCurrentContext();
7654 const GLuint cmdlen = 16;
7655 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
7656 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7657 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7658 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
7659 gc->pc += cmdlen;
7660 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7661 }
7662
7663 #define X_GLrop_VertexAttrib2fvNV 4194
7664 void
7665 __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
7666 {
7667 __GLXcontext * const gc = __glXGetCurrentContext();
7668 const GLuint cmdlen = 16;
7669 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
7670 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7671 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7672 gc->pc += cmdlen;
7673 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7674 }
7675
7676 #define X_GLrop_VertexAttrib2svNV 4190
7677 void
7678 __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
7679 {
7680 __GLXcontext * const gc = __glXGetCurrentContext();
7681 const GLuint cmdlen = 12;
7682 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
7683 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7684 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
7685 (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
7686 gc->pc += cmdlen;
7687 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7688 }
7689
7690 #define X_GLrop_VertexAttrib2svNV 4190
7691 void
7692 __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
7693 {
7694 __GLXcontext * const gc = __glXGetCurrentContext();
7695 const GLuint cmdlen = 12;
7696 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
7697 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7698 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
7699 gc->pc += cmdlen;
7700 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7701 }
7702
7703 #define X_GLrop_VertexAttrib3dvNV 4199
7704 void
7705 __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
7706 {
7707 __GLXcontext * const gc = __glXGetCurrentContext();
7708 const GLuint cmdlen = 32;
7709 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
7710 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7711 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
7712 (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
7713 (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
7714 gc->pc += cmdlen;
7715 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7716 }
7717
7718 #define X_GLrop_VertexAttrib3dvNV 4199
7719 void
7720 __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
7721 {
7722 __GLXcontext * const gc = __glXGetCurrentContext();
7723 const GLuint cmdlen = 32;
7724 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
7725 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7726 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 24);
7727 gc->pc += cmdlen;
7728 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7729 }
7730
7731 #define X_GLrop_VertexAttrib3fvNV 4195
7732 void
7733 __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
7734 {
7735 __GLXcontext * const gc = __glXGetCurrentContext();
7736 const GLuint cmdlen = 20;
7737 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
7738 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7739 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7740 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
7741 (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
7742 gc->pc += cmdlen;
7743 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7744 }
7745
7746 #define X_GLrop_VertexAttrib3fvNV 4195
7747 void
7748 __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
7749 {
7750 __GLXcontext * const gc = __glXGetCurrentContext();
7751 const GLuint cmdlen = 20;
7752 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
7753 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7754 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12);
7755 gc->pc += cmdlen;
7756 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7757 }
7758
7759 #define X_GLrop_VertexAttrib3svNV 4191
7760 void
7761 __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
7762 {
7763 __GLXcontext * const gc = __glXGetCurrentContext();
7764 const GLuint cmdlen = 16;
7765 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
7766 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7767 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
7768 (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
7769 (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
7770 gc->pc += cmdlen;
7771 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7772 }
7773
7774 #define X_GLrop_VertexAttrib3svNV 4191
7775 void
7776 __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
7777 {
7778 __GLXcontext * const gc = __glXGetCurrentContext();
7779 const GLuint cmdlen = 16;
7780 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
7781 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7782 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6);
7783 gc->pc += cmdlen;
7784 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7785 }
7786
7787 #define X_GLrop_VertexAttrib4dvNV 4200
7788 void
7789 __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
7790 {
7791 __GLXcontext * const gc = __glXGetCurrentContext();
7792 const GLuint cmdlen = 40;
7793 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
7794 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7795 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
7796 (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
7797 (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
7798 (void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8);
7799 gc->pc += cmdlen;
7800 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7801 }
7802
7803 #define X_GLrop_VertexAttrib4dvNV 4200
7804 void
7805 __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
7806 {
7807 __GLXcontext * const gc = __glXGetCurrentContext();
7808 const GLuint cmdlen = 40;
7809 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
7810 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7811 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 32);
7812 gc->pc += cmdlen;
7813 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7814 }
7815
7816 #define X_GLrop_VertexAttrib4fvNV 4196
7817 void
7818 __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
7819 {
7820 __GLXcontext * const gc = __glXGetCurrentContext();
7821 const GLuint cmdlen = 24;
7822 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
7823 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7824 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4);
7825 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4);
7826 (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4);
7827 (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4);
7828 gc->pc += cmdlen;
7829 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7830 }
7831
7832 #define X_GLrop_VertexAttrib4fvNV 4196
7833 void
7834 __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
7835 {
7836 __GLXcontext * const gc = __glXGetCurrentContext();
7837 const GLuint cmdlen = 24;
7838 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
7839 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7840 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
7841 gc->pc += cmdlen;
7842 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7843 }
7844
7845 #define X_GLrop_VertexAttrib4svNV 4192
7846 void
7847 __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
7848 {
7849 __GLXcontext * const gc = __glXGetCurrentContext();
7850 const GLuint cmdlen = 16;
7851 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
7852 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7853 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2);
7854 (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2);
7855 (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2);
7856 (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2);
7857 gc->pc += cmdlen;
7858 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7859 }
7860
7861 #define X_GLrop_VertexAttrib4svNV 4192
7862 void
7863 __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
7864 {
7865 __GLXcontext * const gc = __glXGetCurrentContext();
7866 const GLuint cmdlen = 16;
7867 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
7868 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7869 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
7870 gc->pc += cmdlen;
7871 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7872 }
7873
7874 #define X_GLrop_VertexAttrib4ubvNV 4201
7875 void
7876 __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
7877 {
7878 __GLXcontext * const gc = __glXGetCurrentContext();
7879 const GLuint cmdlen = 12;
7880 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
7881 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7882 (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1);
7883 (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1);
7884 (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1);
7885 (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1);
7886 gc->pc += cmdlen;
7887 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7888 }
7889
7890 #define X_GLrop_VertexAttrib4ubvNV 4201
7891 void
7892 __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v)
7893 {
7894 __GLXcontext * const gc = __glXGetCurrentContext();
7895 const GLuint cmdlen = 12;
7896 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
7897 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7898 (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4);
7899 gc->pc += cmdlen;
7900 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7901 }
7902
7903 #define X_GLrop_VertexAttribs1dvNV 4210
7904 void
7905 __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
7906 {
7907 __GLXcontext * const gc = __glXGetCurrentContext();
7908 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
7909 if (__builtin_expect(n >= 0, 1)) {
7910 emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
7911 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7912 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7913 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
7914 gc->pc += cmdlen;
7915 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7916 }
7917 }
7918
7919 #define X_GLrop_VertexAttribs1fvNV 4206
7920 void
7921 __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
7922 {
7923 __GLXcontext * const gc = __glXGetCurrentContext();
7924 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
7925 if (__builtin_expect(n >= 0, 1)) {
7926 emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
7927 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7928 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7929 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
7930 gc->pc += cmdlen;
7931 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7932 }
7933 }
7934
7935 #define X_GLrop_VertexAttribs1svNV 4202
7936 void
7937 __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
7938 {
7939 __GLXcontext * const gc = __glXGetCurrentContext();
7940 const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
7941 if (__builtin_expect(n >= 0, 1)) {
7942 emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
7943 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7944 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7945 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 2));
7946 gc->pc += cmdlen;
7947 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7948 }
7949 }
7950
7951 #define X_GLrop_VertexAttribs2dvNV 4211
7952 void
7953 __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
7954 {
7955 __GLXcontext * const gc = __glXGetCurrentContext();
7956 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
7957 if (__builtin_expect(n >= 0, 1)) {
7958 emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
7959 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7960 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7961 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
7962 gc->pc += cmdlen;
7963 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7964 }
7965 }
7966
7967 #define X_GLrop_VertexAttribs2fvNV 4207
7968 void
7969 __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
7970 {
7971 __GLXcontext * const gc = __glXGetCurrentContext();
7972 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
7973 if (__builtin_expect(n >= 0, 1)) {
7974 emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
7975 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7976 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7977 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
7978 gc->pc += cmdlen;
7979 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7980 }
7981 }
7982
7983 #define X_GLrop_VertexAttribs2svNV 4203
7984 void
7985 __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
7986 {
7987 __GLXcontext * const gc = __glXGetCurrentContext();
7988 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
7989 if (__builtin_expect(n >= 0, 1)) {
7990 emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
7991 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
7992 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
7993 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
7994 gc->pc += cmdlen;
7995 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
7996 }
7997 }
7998
7999 #define X_GLrop_VertexAttribs3dvNV 4212
8000 void
8001 __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
8002 {
8003 __GLXcontext * const gc = __glXGetCurrentContext();
8004 const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
8005 if (__builtin_expect(n >= 0, 1)) {
8006 emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
8007 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8008 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8009 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 24));
8010 gc->pc += cmdlen;
8011 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8012 }
8013 }
8014
8015 #define X_GLrop_VertexAttribs3fvNV 4208
8016 void
8017 __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
8018 {
8019 __GLXcontext * const gc = __glXGetCurrentContext();
8020 const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
8021 if (__builtin_expect(n >= 0, 1)) {
8022 emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
8023 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8024 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8025 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 12));
8026 gc->pc += cmdlen;
8027 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8028 }
8029 }
8030
8031 #define X_GLrop_VertexAttribs3svNV 4204
8032 void
8033 __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
8034 {
8035 __GLXcontext * const gc = __glXGetCurrentContext();
8036 const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
8037 if (__builtin_expect(n >= 0, 1)) {
8038 emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
8039 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8040 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8041 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 6));
8042 gc->pc += cmdlen;
8043 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8044 }
8045 }
8046
8047 #define X_GLrop_VertexAttribs4dvNV 4213
8048 void
8049 __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
8050 {
8051 __GLXcontext * const gc = __glXGetCurrentContext();
8052 const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
8053 if (__builtin_expect(n >= 0, 1)) {
8054 emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
8055 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8056 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8057 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 32));
8058 gc->pc += cmdlen;
8059 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8060 }
8061 }
8062
8063 #define X_GLrop_VertexAttribs4fvNV 4209
8064 void
8065 __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
8066 {
8067 __GLXcontext * const gc = __glXGetCurrentContext();
8068 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
8069 if (__builtin_expect(n >= 0, 1)) {
8070 emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
8071 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8072 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8073 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
8074 gc->pc += cmdlen;
8075 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8076 }
8077 }
8078
8079 #define X_GLrop_VertexAttribs4svNV 4205
8080 void
8081 __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
8082 {
8083 __GLXcontext * const gc = __glXGetCurrentContext();
8084 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
8085 if (__builtin_expect(n >= 0, 1)) {
8086 emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
8087 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8088 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8089 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
8090 gc->pc += cmdlen;
8091 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8092 }
8093 }
8094
8095 #define X_GLrop_VertexAttribs4ubvNV 4214
8096 void
8097 __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
8098 {
8099 __GLXcontext * const gc = __glXGetCurrentContext();
8100 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
8101 if (__builtin_expect(n >= 0, 1)) {
8102 emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
8103 (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
8104 (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
8105 (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
8106 gc->pc += cmdlen;
8107 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8108 }
8109 }
8110
8111 #define X_GLrop_PointParameteriNV 4221
8112 void
8113 __indirect_glPointParameteriNV(GLenum pname, GLint param)
8114 {
8115 __GLXcontext * const gc = __glXGetCurrentContext();
8116 const GLuint cmdlen = 12;
8117 emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
8118 (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
8119 (void) memcpy((void *)(gc->pc + 8), (void *)(&param), 4);
8120 gc->pc += cmdlen;
8121 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8122 }
8123
8124 #define X_GLrop_PointParameterivNV 4222
8125 void
8126 __indirect_glPointParameterivNV(GLenum pname, const GLint * params)
8127 {
8128 __GLXcontext * const gc = __glXGetCurrentContext();
8129 const GLuint compsize = __glPointParameterivNV_size(pname);
8130 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
8131 emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
8132 (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4);
8133 (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4));
8134 gc->pc += cmdlen;
8135 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8136 }
8137
8138 #define X_GLrop_ActiveStencilFaceEXT 4220
8139 void
8140 __indirect_glActiveStencilFaceEXT(GLenum face)
8141 {
8142 __GLXcontext * const gc = __glXGetCurrentContext();
8143 const GLuint cmdlen = 8;
8144 emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
8145 (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4);
8146 gc->pc += cmdlen;
8147 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8148 }
8149
8150 #define X_GLvop_GetProgramNamedParameterdvNV 1311
8151 void
8152 __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params)
8153 {
8154 __GLXcontext * const gc = __glXGetCurrentContext();
8155 Display * const dpy = gc->currentDpy;
8156 const GLuint cmdlen = 8 + __GLX_PAD(len);
8157 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
8158 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterdvNV, cmdlen);
8159 (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
8160 (void) memcpy((void *)(pc + 4), (void *)(&len), 4);
8161 (void) memcpy((void *)(pc + 8), (void *)(name), len);
8162 (void) __glXReadReply(dpy, 8, params, GL_TRUE);
8163 UnlockDisplay(dpy); SyncHandle();
8164 }
8165 return;
8166 }
8167
8168 #define X_GLvop_GetProgramNamedParameterfvNV 1310
8169 void
8170 __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params)
8171 {
8172 __GLXcontext * const gc = __glXGetCurrentContext();
8173 Display * const dpy = gc->currentDpy;
8174 const GLuint cmdlen = 8 + __GLX_PAD(len);
8175 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
8176 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterfvNV, cmdlen);
8177 (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
8178 (void) memcpy((void *)(pc + 4), (void *)(&len), 4);
8179 (void) memcpy((void *)(pc + 8), (void *)(name), len);
8180 (void) __glXReadReply(dpy, 4, params, GL_TRUE);
8181 UnlockDisplay(dpy); SyncHandle();
8182 }
8183 return;
8184 }
8185
8186 #define X_GLrop_ProgramNamedParameter4dvNV 4219
8187 void
8188 __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
8189 {
8190 __GLXcontext * const gc = __glXGetCurrentContext();
8191 const GLuint cmdlen = 44 + __GLX_PAD(len);
8192 if (__builtin_expect(len >= 0, 1)) {
8193 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
8194 (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
8195 (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
8196 (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
8197 (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
8198 (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
8199 (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
8200 (void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
8201 gc->pc += cmdlen;
8202 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8203 }
8204 }
8205
8206 #define X_GLrop_ProgramNamedParameter4dvNV 4219
8207 void
8208 __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v)
8209 {
8210 __GLXcontext * const gc = __glXGetCurrentContext();
8211 const GLuint cmdlen = 44 + __GLX_PAD(len);
8212 if (__builtin_expect(len >= 0, 1)) {
8213 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
8214 (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
8215 (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
8216 (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
8217 (void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
8218 gc->pc += cmdlen;
8219 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8220 }
8221 }
8222
8223 #define X_GLrop_ProgramNamedParameter4fvNV 4218
8224 void
8225 __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
8226 {
8227 __GLXcontext * const gc = __glXGetCurrentContext();
8228 const GLuint cmdlen = 28 + __GLX_PAD(len);
8229 if (__builtin_expect(len >= 0, 1)) {
8230 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
8231 (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
8232 (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
8233 (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4);
8234 (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
8235 (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
8236 (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
8237 (void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
8238 gc->pc += cmdlen;
8239 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8240 }
8241 }
8242
8243 #define X_GLrop_ProgramNamedParameter4fvNV 4218
8244 void
8245 __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v)
8246 {
8247 __GLXcontext * const gc = __glXGetCurrentContext();
8248 const GLuint cmdlen = 28 + __GLX_PAD(len);
8249 if (__builtin_expect(len >= 0, 1)) {
8250 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
8251 (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
8252 (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
8253 (void) memcpy((void *)(gc->pc + 12), (void *)(v), 16);
8254 (void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
8255 gc->pc += cmdlen;
8256 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8257 }
8258 }
8259
8260 #define X_GLrop_BindFramebufferEXT 4319
8261 void
8262 __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
8263 {
8264 __GLXcontext * const gc = __glXGetCurrentContext();
8265 const GLuint cmdlen = 12;
8266 emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
8267 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8268 (void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4);
8269 gc->pc += cmdlen;
8270 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8271 }
8272
8273 #define X_GLrop_BindRenderbufferEXT 4316
8274 void
8275 __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
8276 {
8277 __GLXcontext * const gc = __glXGetCurrentContext();
8278 const GLuint cmdlen = 12;
8279 emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
8280 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8281 (void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4);
8282 gc->pc += cmdlen;
8283 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8284 }
8285
8286 #define X_GLvop_CheckFramebufferStatusEXT 1427
8287 GLenum
8288 __indirect_glCheckFramebufferStatusEXT(GLenum target)
8289 {
8290 __GLXcontext * const gc = __glXGetCurrentContext();
8291 Display * const dpy = gc->currentDpy;
8292 GLenum retval = (GLenum) 0;
8293 const GLuint cmdlen = 4;
8294 if (__builtin_expect(dpy != NULL, 1)) {
8295 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_CheckFramebufferStatusEXT, cmdlen);
8296 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
8297 retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8298 UnlockDisplay(dpy); SyncHandle();
8299 }
8300 return retval;
8301 }
8302
8303 #define X_GLrop_DeleteFramebuffersEXT 4320
8304 void
8305 __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
8306 {
8307 __GLXcontext * const gc = __glXGetCurrentContext();
8308 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8309 if (__builtin_expect(n >= 0, 1)) {
8310 emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
8311 (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
8312 (void) memcpy((void *)(gc->pc + 8), (void *)(framebuffers), (n * 4));
8313 gc->pc += cmdlen;
8314 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8315 }
8316 }
8317
8318 #define X_GLrop_DeleteRenderbuffersEXT 4317
8319 void
8320 __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
8321 {
8322 __GLXcontext * const gc = __glXGetCurrentContext();
8323 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8324 if (__builtin_expect(n >= 0, 1)) {
8325 emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
8326 (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
8327 (void) memcpy((void *)(gc->pc + 8), (void *)(renderbuffers), (n * 4));
8328 gc->pc += cmdlen;
8329 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8330 }
8331 }
8332
8333 #define X_GLrop_FramebufferRenderbufferEXT 4324
8334 void
8335 __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
8336 {
8337 __GLXcontext * const gc = __glXGetCurrentContext();
8338 const GLuint cmdlen = 20;
8339 emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
8340 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8341 (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
8342 (void) memcpy((void *)(gc->pc + 12), (void *)(&renderbuffertarget), 4);
8343 (void) memcpy((void *)(gc->pc + 16), (void *)(&renderbuffer), 4);
8344 gc->pc += cmdlen;
8345 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8346 }
8347
8348 #define X_GLrop_FramebufferTexture1DEXT 4321
8349 void
8350 __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
8351 {
8352 __GLXcontext * const gc = __glXGetCurrentContext();
8353 const GLuint cmdlen = 24;
8354 emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
8355 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8356 (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
8357 (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
8358 (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
8359 (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
8360 gc->pc += cmdlen;
8361 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8362 }
8363
8364 #define X_GLrop_FramebufferTexture2DEXT 4322
8365 void
8366 __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
8367 {
8368 __GLXcontext * const gc = __glXGetCurrentContext();
8369 const GLuint cmdlen = 24;
8370 emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
8371 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8372 (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
8373 (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
8374 (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
8375 (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
8376 gc->pc += cmdlen;
8377 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8378 }
8379
8380 #define X_GLrop_FramebufferTexture3DEXT 4323
8381 void
8382 __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
8383 {
8384 __GLXcontext * const gc = __glXGetCurrentContext();
8385 const GLuint cmdlen = 28;
8386 emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
8387 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8388 (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
8389 (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
8390 (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
8391 (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
8392 (void) memcpy((void *)(gc->pc + 24), (void *)(&zoffset), 4);
8393 gc->pc += cmdlen;
8394 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8395 }
8396
8397 #define X_GLvop_GenFramebuffersEXT 1426
8398 void
8399 __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
8400 {
8401 __GLXcontext * const gc = __glXGetCurrentContext();
8402 Display * const dpy = gc->currentDpy;
8403 const GLuint cmdlen = 4;
8404 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8405 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenFramebuffersEXT, cmdlen);
8406 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
8407 (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
8408 UnlockDisplay(dpy); SyncHandle();
8409 }
8410 return;
8411 }
8412
8413 #define X_GLvop_GenRenderbuffersEXT 1423
8414 void
8415 __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
8416 {
8417 __GLXcontext * const gc = __glXGetCurrentContext();
8418 Display * const dpy = gc->currentDpy;
8419 const GLuint cmdlen = 4;
8420 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8421 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenRenderbuffersEXT, cmdlen);
8422 (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
8423 (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
8424 UnlockDisplay(dpy); SyncHandle();
8425 }
8426 return;
8427 }
8428
8429 #define X_GLrop_GenerateMipmapEXT 4325
8430 void
8431 __indirect_glGenerateMipmapEXT(GLenum target)
8432 {
8433 __GLXcontext * const gc = __glXGetCurrentContext();
8434 const GLuint cmdlen = 8;
8435 emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
8436 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8437 gc->pc += cmdlen;
8438 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8439 }
8440
8441 #define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
8442 void
8443 __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params)
8444 {
8445 __GLXcontext * const gc = __glXGetCurrentContext();
8446 Display * const dpy = gc->currentDpy;
8447 const GLuint cmdlen = 12;
8448 if (__builtin_expect(dpy != NULL, 1)) {
8449 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetFramebufferAttachmentParameterivEXT, cmdlen);
8450 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
8451 (void) memcpy((void *)(pc + 4), (void *)(&attachment), 4);
8452 (void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
8453 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8454 UnlockDisplay(dpy); SyncHandle();
8455 }
8456 return;
8457 }
8458
8459 #define X_GLvop_GetRenderbufferParameterivEXT 1424
8460 void
8461 __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params)
8462 {
8463 __GLXcontext * const gc = __glXGetCurrentContext();
8464 Display * const dpy = gc->currentDpy;
8465 const GLuint cmdlen = 8;
8466 if (__builtin_expect(dpy != NULL, 1)) {
8467 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetRenderbufferParameterivEXT, cmdlen);
8468 (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
8469 (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
8470 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8471 UnlockDisplay(dpy); SyncHandle();
8472 }
8473 return;
8474 }
8475
8476 #define X_GLvop_IsFramebufferEXT 1425
8477 GLboolean
8478 __indirect_glIsFramebufferEXT(GLuint framebuffer)
8479 {
8480 __GLXcontext * const gc = __glXGetCurrentContext();
8481 Display * const dpy = gc->currentDpy;
8482 GLboolean retval = (GLboolean) 0;
8483 const GLuint cmdlen = 4;
8484 if (__builtin_expect(dpy != NULL, 1)) {
8485 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsFramebufferEXT, cmdlen);
8486 (void) memcpy((void *)(pc + 0), (void *)(&framebuffer), 4);
8487 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8488 UnlockDisplay(dpy); SyncHandle();
8489 }
8490 return retval;
8491 }
8492
8493 #define X_GLvop_IsRenderbufferEXT 1422
8494 GLboolean
8495 __indirect_glIsRenderbufferEXT(GLuint renderbuffer)
8496 {
8497 __GLXcontext * const gc = __glXGetCurrentContext();
8498 Display * const dpy = gc->currentDpy;
8499 GLboolean retval = (GLboolean) 0;
8500 const GLuint cmdlen = 4;
8501 if (__builtin_expect(dpy != NULL, 1)) {
8502 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsRenderbufferEXT, cmdlen);
8503 (void) memcpy((void *)(pc + 0), (void *)(&renderbuffer), 4);
8504 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8505 UnlockDisplay(dpy); SyncHandle();
8506 }
8507 return retval;
8508 }
8509
8510 #define X_GLrop_RenderbufferStorageEXT 4318
8511 void
8512 __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
8513 {
8514 __GLXcontext * const gc = __glXGetCurrentContext();
8515 const GLuint cmdlen = 20;
8516 emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
8517 (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
8518 (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
8519 (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
8520 (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
8521 gc->pc += cmdlen;
8522 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
8523 }
8524
8525
8526 # undef FASTCALL
8527 # undef NOINLINE