Updates for XCB. Bug 8560.
[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/Xlib-xcb.h>
36 #include <xcb/xcb.h>
37 #include <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,
67 GLboolean reply_is_always_array)
68 {
69 xGLXSingleReply reply;
70
71 (void) _XReply(dpy, (xReply *) & reply, 0, False);
72 if (size != 0) {
73 if ((reply.length > 0) || reply_is_always_array) {
74 const GLint bytes = (reply_is_always_array)
75 ? (4 * reply.length) : (reply.size * size);
76 const GLint extra = 4 - (bytes & 3);
77
78 _XRead(dpy, dest, bytes);
79 if (extra < 4) {
80 _XEatData(dpy, extra);
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,
93 GLenum type, 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)) {
106 height = 1;
107 }
108 if ((depth == 0) || (max_dim < 3)) {
109 depth = 1;
110 }
111 }
112
113 size = reply.length * 4;
114 if (size != 0) {
115 void *buf = Xmalloc(size);
116
117 if (buf == NULL) {
118 _XEatData(dpy, size);
119 __glXSetError(gc, GL_OUT_OF_MEMORY);
120 } else {
121 const GLint extra = 4 - (size & 3);
122
123 _XRead(dpy, buf, size);
124 if (extra < 4) {
125 _XEatData(dpy, extra);
126 }
127
128 __glEmptyImage(gc, 3, width, height, depth, format, type,
129 buf, dest);
130 Xfree(buf);
131 }
132 }
133 }
134
135 #define X_GLXSingle 0
136
137 NOINLINE FASTCALL GLubyte *
138 __glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
139 {
140 xGLXSingleReq *req;
141 Display *const dpy = gc->currentDpy;
142
143 (void) __glXFlushRenderBuffer(gc, gc->pc);
144 LockDisplay(dpy);
145 GetReqExtra(GLXSingle, cmdlen, req);
146 req->reqType = gc->majorOpcode;
147 req->contextTag = gc->currentContextTag;
148 req->glxCode = sop;
149 return (GLubyte *) (req) + sz_xGLXSingleReq;
150 }
151
152 NOINLINE FASTCALL GLubyte *
153 __glXSetupVendorRequest(__GLXcontext * gc, GLint code, GLint vop,
154 GLint cmdlen)
155 {
156 xGLXVendorPrivateReq *req;
157 Display *const dpy = gc->currentDpy;
158
159 (void) __glXFlushRenderBuffer(gc, gc->pc);
160 LockDisplay(dpy);
161 GetReqExtra(GLXVendorPrivate, cmdlen, req);
162 req->reqType = gc->majorOpcode;
163 req->glxCode = code;
164 req->vendorCode = vop;
165 req->contextTag = gc->currentContextTag;
166 return (GLubyte *) (req) + sz_xGLXVendorPrivateReq;
167 }
168
169 const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
170
171 #define zero (__glXDefaultPixelStore+0)
172 #define one (__glXDefaultPixelStore+8)
173 #define default_pixel_store_1D (__glXDefaultPixelStore+4)
174 #define default_pixel_store_1D_size 20
175 #define default_pixel_store_2D (__glXDefaultPixelStore+4)
176 #define default_pixel_store_2D_size 20
177 #define default_pixel_store_3D (__glXDefaultPixelStore+0)
178 #define default_pixel_store_3D_size 36
179 #define default_pixel_store_4D (__glXDefaultPixelStore+0)
180 #define default_pixel_store_4D_size 36
181
182 static FASTCALL NOINLINE void
183 generic_3_byte(GLint rop, const void *ptr)
184 {
185 __GLXcontext *const gc = __glXGetCurrentContext();
186 const GLuint cmdlen = 8;
187
188 emit_header(gc->pc, rop, cmdlen);
189 (void) memcpy((void *) (gc->pc + 4), ptr, 4);
190 gc->pc += cmdlen;
191 if (__builtin_expect(gc->pc > gc->limit, 0)) {
192 (void) __glXFlushRenderBuffer(gc, gc->pc);
193 }
194 }
195
196 static FASTCALL NOINLINE void
197 generic_4_byte(GLint rop, const void *ptr)
198 {
199 __GLXcontext *const gc = __glXGetCurrentContext();
200 const GLuint cmdlen = 8;
201
202 emit_header(gc->pc, rop, cmdlen);
203 (void) memcpy((void *) (gc->pc + 4), ptr, 4);
204 gc->pc += cmdlen;
205 if (__builtin_expect(gc->pc > gc->limit, 0)) {
206 (void) __glXFlushRenderBuffer(gc, gc->pc);
207 }
208 }
209
210 static FASTCALL NOINLINE void
211 generic_6_byte(GLint rop, const void *ptr)
212 {
213 __GLXcontext *const gc = __glXGetCurrentContext();
214 const GLuint cmdlen = 12;
215
216 emit_header(gc->pc, rop, cmdlen);
217 (void) memcpy((void *) (gc->pc + 4), ptr, 8);
218 gc->pc += cmdlen;
219 if (__builtin_expect(gc->pc > gc->limit, 0)) {
220 (void) __glXFlushRenderBuffer(gc, gc->pc);
221 }
222 }
223
224 static FASTCALL NOINLINE void
225 generic_8_byte(GLint rop, const void *ptr)
226 {
227 __GLXcontext *const gc = __glXGetCurrentContext();
228 const GLuint cmdlen = 12;
229
230 emit_header(gc->pc, rop, cmdlen);
231 (void) memcpy((void *) (gc->pc + 4), ptr, 8);
232 gc->pc += cmdlen;
233 if (__builtin_expect(gc->pc > gc->limit, 0)) {
234 (void) __glXFlushRenderBuffer(gc, gc->pc);
235 }
236 }
237
238 static FASTCALL NOINLINE void
239 generic_12_byte(GLint rop, const void *ptr)
240 {
241 __GLXcontext *const gc = __glXGetCurrentContext();
242 const GLuint cmdlen = 16;
243
244 emit_header(gc->pc, rop, cmdlen);
245 (void) memcpy((void *) (gc->pc + 4), ptr, 12);
246 gc->pc += cmdlen;
247 if (__builtin_expect(gc->pc > gc->limit, 0)) {
248 (void) __glXFlushRenderBuffer(gc, gc->pc);
249 }
250 }
251
252 static FASTCALL NOINLINE void
253 generic_16_byte(GLint rop, const void *ptr)
254 {
255 __GLXcontext *const gc = __glXGetCurrentContext();
256 const GLuint cmdlen = 20;
257
258 emit_header(gc->pc, rop, cmdlen);
259 (void) memcpy((void *) (gc->pc + 4), ptr, 16);
260 gc->pc += cmdlen;
261 if (__builtin_expect(gc->pc > gc->limit, 0)) {
262 (void) __glXFlushRenderBuffer(gc, gc->pc);
263 }
264 }
265
266 static FASTCALL NOINLINE void
267 generic_24_byte(GLint rop, const void *ptr)
268 {
269 __GLXcontext *const gc = __glXGetCurrentContext();
270 const GLuint cmdlen = 28;
271
272 emit_header(gc->pc, rop, cmdlen);
273 (void) memcpy((void *) (gc->pc + 4), ptr, 24);
274 gc->pc += cmdlen;
275 if (__builtin_expect(gc->pc > gc->limit, 0)) {
276 (void) __glXFlushRenderBuffer(gc, gc->pc);
277 }
278 }
279
280 static FASTCALL NOINLINE void
281 generic_32_byte(GLint rop, const void *ptr)
282 {
283 __GLXcontext *const gc = __glXGetCurrentContext();
284 const GLuint cmdlen = 36;
285
286 emit_header(gc->pc, rop, cmdlen);
287 (void) memcpy((void *) (gc->pc + 4), ptr, 32);
288 gc->pc += cmdlen;
289 if (__builtin_expect(gc->pc > gc->limit, 0)) {
290 (void) __glXFlushRenderBuffer(gc, gc->pc);
291 }
292 }
293
294 #define X_GLsop_NewList 101
295 void
296 __indirect_glNewList(GLuint list, GLenum mode)
297 {
298 __GLXcontext *const gc = __glXGetCurrentContext();
299 Display *const dpy = gc->currentDpy;
300 const GLuint cmdlen = 8;
301 if (__builtin_expect(dpy != NULL, 1)) {
302 #ifdef USE_XCB
303 xcb_connection_t *c = XGetXCBConnection(dpy);
304 (void) __glXFlushRenderBuffer(gc, gc->pc);
305 xcb_glx_new_list(c, gc->currentContextTag, list, mode);
306 #else
307 GLubyte const *pc =
308 __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
309 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
310 (void) memcpy((void *) (pc + 4), (void *) (&mode), 4);
311 UnlockDisplay(dpy);
312 SyncHandle();
313 #endif /* USE_XCB */
314 }
315 return;
316 }
317
318 #define X_GLsop_EndList 102
319 void
320 __indirect_glEndList(void)
321 {
322 __GLXcontext *const gc = __glXGetCurrentContext();
323 Display *const dpy = gc->currentDpy;
324 const GLuint cmdlen = 0;
325 if (__builtin_expect(dpy != NULL, 1)) {
326 #ifdef USE_XCB
327 xcb_connection_t *c = XGetXCBConnection(dpy);
328 (void) __glXFlushRenderBuffer(gc, gc->pc);
329 xcb_glx_end_list(c, gc->currentContextTag);
330 #else
331 (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
332 UnlockDisplay(dpy);
333 SyncHandle();
334 #endif /* USE_XCB */
335 }
336 return;
337 }
338
339 #define X_GLrop_CallList 1
340 void
341 __indirect_glCallList(GLuint list)
342 {
343 __GLXcontext *const gc = __glXGetCurrentContext();
344 const GLuint cmdlen = 8;
345 emit_header(gc->pc, X_GLrop_CallList, cmdlen);
346 (void) memcpy((void *) (gc->pc + 4), (void *) (&list), 4);
347 gc->pc += cmdlen;
348 if (__builtin_expect(gc->pc > gc->limit, 0)) {
349 (void) __glXFlushRenderBuffer(gc, gc->pc);
350 }
351 }
352
353 #define X_GLrop_CallLists 2
354 void
355 __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
356 {
357 __GLXcontext *const gc = __glXGetCurrentContext();
358 const GLuint compsize = __glCallLists_size(type);
359 const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
360 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
361 if (cmdlen <= gc->maxSmallRenderCommandSize) {
362 if ((gc->pc + cmdlen) > gc->bufEnd) {
363 (void) __glXFlushRenderBuffer(gc, gc->pc);
364 }
365 emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
366 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
367 (void) memcpy((void *) (gc->pc + 8), (void *) (&type), 4);
368 (void) memcpy((void *) (gc->pc + 12), (void *) (lists),
369 (compsize * n));
370 gc->pc += cmdlen;
371 if (__builtin_expect(gc->pc > gc->limit, 0)) {
372 (void) __glXFlushRenderBuffer(gc, gc->pc);
373 }
374 } else {
375 const GLint op = X_GLrop_CallLists;
376 const GLuint cmdlenLarge = cmdlen + 4;
377 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
378 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
379 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
380 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
381 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
382 __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
383 }
384 }
385 }
386
387 #define X_GLsop_DeleteLists 103
388 void
389 __indirect_glDeleteLists(GLuint list, GLsizei range)
390 {
391 __GLXcontext *const gc = __glXGetCurrentContext();
392 Display *const dpy = gc->currentDpy;
393 const GLuint cmdlen = 8;
394 if (__builtin_expect(dpy != NULL, 1)) {
395 #ifdef USE_XCB
396 xcb_connection_t *c = XGetXCBConnection(dpy);
397 (void) __glXFlushRenderBuffer(gc, gc->pc);
398 xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
399 #else
400 GLubyte const *pc =
401 __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
402 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
403 (void) memcpy((void *) (pc + 4), (void *) (&range), 4);
404 UnlockDisplay(dpy);
405 SyncHandle();
406 #endif /* USE_XCB */
407 }
408 return;
409 }
410
411 #define X_GLsop_GenLists 104
412 GLuint
413 __indirect_glGenLists(GLsizei range)
414 {
415 __GLXcontext *const gc = __glXGetCurrentContext();
416 Display *const dpy = gc->currentDpy;
417 GLuint retval = (GLuint) 0;
418 const GLuint cmdlen = 4;
419 if (__builtin_expect(dpy != NULL, 1)) {
420 #ifdef USE_XCB
421 xcb_connection_t *c = XGetXCBConnection(dpy);
422 (void) __glXFlushRenderBuffer(gc, gc->pc);
423 xcb_glx_gen_lists_reply_t *reply =
424 xcb_glx_gen_lists_reply(c,
425 xcb_glx_gen_lists(c,
426 gc->currentContextTag,
427 range), NULL);
428 retval = reply->ret_val;
429 free(reply);
430 #else
431 GLubyte const *pc =
432 __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
433 (void) memcpy((void *) (pc + 0), (void *) (&range), 4);
434 retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
435 UnlockDisplay(dpy);
436 SyncHandle();
437 #endif /* USE_XCB */
438 }
439 return retval;
440 }
441
442 #define X_GLrop_ListBase 3
443 void
444 __indirect_glListBase(GLuint base)
445 {
446 __GLXcontext *const gc = __glXGetCurrentContext();
447 const GLuint cmdlen = 8;
448 emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
449 (void) memcpy((void *) (gc->pc + 4), (void *) (&base), 4);
450 gc->pc += cmdlen;
451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
452 (void) __glXFlushRenderBuffer(gc, gc->pc);
453 }
454 }
455
456 #define X_GLrop_Begin 4
457 void
458 __indirect_glBegin(GLenum mode)
459 {
460 __GLXcontext *const gc = __glXGetCurrentContext();
461 const GLuint cmdlen = 8;
462 emit_header(gc->pc, X_GLrop_Begin, cmdlen);
463 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
464 gc->pc += cmdlen;
465 if (__builtin_expect(gc->pc > gc->limit, 0)) {
466 (void) __glXFlushRenderBuffer(gc, gc->pc);
467 }
468 }
469
470 #define X_GLrop_Bitmap 5
471 void
472 __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
473 GLfloat yorig, GLfloat xmove, GLfloat ymove,
474 const GLubyte * bitmap)
475 {
476 __GLXcontext *const gc = __glXGetCurrentContext();
477 const GLuint compsize =
478 (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX,
479 GL_BITMAP, 0) : 0;
480 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
481 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
482 if (cmdlen <= gc->maxSmallRenderCommandSize) {
483 if ((gc->pc + cmdlen) > gc->bufEnd) {
484 (void) __glXFlushRenderBuffer(gc, gc->pc);
485 }
486 emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
487 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
488 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
489 (void) memcpy((void *) (gc->pc + 32), (void *) (&xorig), 4);
490 (void) memcpy((void *) (gc->pc + 36), (void *) (&yorig), 4);
491 (void) memcpy((void *) (gc->pc + 40), (void *) (&xmove), 4);
492 (void) memcpy((void *) (gc->pc + 44), (void *) (&ymove), 4);
493 if (compsize > 0) {
494 (*gc->fillImage) (gc, 2, width, height, 1, GL_COLOR_INDEX,
495 GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
496 } else {
497 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
498 default_pixel_store_2D_size);
499 }
500 gc->pc += cmdlen;
501 if (gc->pc > gc->limit) {
502 (void) __glXFlushRenderBuffer(gc, gc->pc);
503 }
504 } else {
505 const GLint op = X_GLrop_Bitmap;
506 const GLuint cmdlenLarge = cmdlen + 4;
507 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
508 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
509 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
510 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
511 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
512 (void) memcpy((void *) (pc + 36), (void *) (&xorig), 4);
513 (void) memcpy((void *) (pc + 40), (void *) (&yorig), 4);
514 (void) memcpy((void *) (pc + 44), (void *) (&xmove), 4);
515 (void) memcpy((void *) (pc + 48), (void *) (&ymove), 4);
516 __glXSendLargeImage(gc, compsize, 2, width, height, 1,
517 GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52,
518 pc + 8);
519 }
520 }
521 }
522
523 #define X_GLrop_Color3bv 6
524 void
525 __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
526 {
527 __GLXcontext *const gc = __glXGetCurrentContext();
528 const GLuint cmdlen = 8;
529 emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
530 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
531 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
532 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
533 gc->pc += cmdlen;
534 if (__builtin_expect(gc->pc > gc->limit, 0)) {
535 (void) __glXFlushRenderBuffer(gc, gc->pc);
536 }
537 }
538
539 #define X_GLrop_Color3bv 6
540 void
541 __indirect_glColor3bv(const GLbyte * v)
542 {
543 generic_3_byte(X_GLrop_Color3bv, v);
544 }
545
546 #define X_GLrop_Color3dv 7
547 void
548 __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
549 {
550 __GLXcontext *const gc = __glXGetCurrentContext();
551 const GLuint cmdlen = 28;
552 emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
553 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
554 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
555 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
556 gc->pc += cmdlen;
557 if (__builtin_expect(gc->pc > gc->limit, 0)) {
558 (void) __glXFlushRenderBuffer(gc, gc->pc);
559 }
560 }
561
562 #define X_GLrop_Color3dv 7
563 void
564 __indirect_glColor3dv(const GLdouble * v)
565 {
566 generic_24_byte(X_GLrop_Color3dv, v);
567 }
568
569 #define X_GLrop_Color3fv 8
570 void
571 __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
572 {
573 __GLXcontext *const gc = __glXGetCurrentContext();
574 const GLuint cmdlen = 16;
575 emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
576 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
577 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
578 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
579 gc->pc += cmdlen;
580 if (__builtin_expect(gc->pc > gc->limit, 0)) {
581 (void) __glXFlushRenderBuffer(gc, gc->pc);
582 }
583 }
584
585 #define X_GLrop_Color3fv 8
586 void
587 __indirect_glColor3fv(const GLfloat * v)
588 {
589 generic_12_byte(X_GLrop_Color3fv, v);
590 }
591
592 #define X_GLrop_Color3iv 9
593 void
594 __indirect_glColor3i(GLint red, GLint green, GLint blue)
595 {
596 __GLXcontext *const gc = __glXGetCurrentContext();
597 const GLuint cmdlen = 16;
598 emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
599 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
600 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
601 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
602 gc->pc += cmdlen;
603 if (__builtin_expect(gc->pc > gc->limit, 0)) {
604 (void) __glXFlushRenderBuffer(gc, gc->pc);
605 }
606 }
607
608 #define X_GLrop_Color3iv 9
609 void
610 __indirect_glColor3iv(const GLint * v)
611 {
612 generic_12_byte(X_GLrop_Color3iv, v);
613 }
614
615 #define X_GLrop_Color3sv 10
616 void
617 __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
618 {
619 __GLXcontext *const gc = __glXGetCurrentContext();
620 const GLuint cmdlen = 12;
621 emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
622 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
623 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
624 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
625 gc->pc += cmdlen;
626 if (__builtin_expect(gc->pc > gc->limit, 0)) {
627 (void) __glXFlushRenderBuffer(gc, gc->pc);
628 }
629 }
630
631 #define X_GLrop_Color3sv 10
632 void
633 __indirect_glColor3sv(const GLshort * v)
634 {
635 generic_6_byte(X_GLrop_Color3sv, v);
636 }
637
638 #define X_GLrop_Color3ubv 11
639 void
640 __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
641 {
642 __GLXcontext *const gc = __glXGetCurrentContext();
643 const GLuint cmdlen = 8;
644 emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
645 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
646 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
647 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
648 gc->pc += cmdlen;
649 if (__builtin_expect(gc->pc > gc->limit, 0)) {
650 (void) __glXFlushRenderBuffer(gc, gc->pc);
651 }
652 }
653
654 #define X_GLrop_Color3ubv 11
655 void
656 __indirect_glColor3ubv(const GLubyte * v)
657 {
658 generic_3_byte(X_GLrop_Color3ubv, v);
659 }
660
661 #define X_GLrop_Color3uiv 12
662 void
663 __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
664 {
665 __GLXcontext *const gc = __glXGetCurrentContext();
666 const GLuint cmdlen = 16;
667 emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
668 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
669 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
670 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
671 gc->pc += cmdlen;
672 if (__builtin_expect(gc->pc > gc->limit, 0)) {
673 (void) __glXFlushRenderBuffer(gc, gc->pc);
674 }
675 }
676
677 #define X_GLrop_Color3uiv 12
678 void
679 __indirect_glColor3uiv(const GLuint * v)
680 {
681 generic_12_byte(X_GLrop_Color3uiv, v);
682 }
683
684 #define X_GLrop_Color3usv 13
685 void
686 __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
687 {
688 __GLXcontext *const gc = __glXGetCurrentContext();
689 const GLuint cmdlen = 12;
690 emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
691 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
692 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
693 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
694 gc->pc += cmdlen;
695 if (__builtin_expect(gc->pc > gc->limit, 0)) {
696 (void) __glXFlushRenderBuffer(gc, gc->pc);
697 }
698 }
699
700 #define X_GLrop_Color3usv 13
701 void
702 __indirect_glColor3usv(const GLushort * v)
703 {
704 generic_6_byte(X_GLrop_Color3usv, v);
705 }
706
707 #define X_GLrop_Color4bv 14
708 void
709 __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
710 {
711 __GLXcontext *const gc = __glXGetCurrentContext();
712 const GLuint cmdlen = 8;
713 emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
714 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
715 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
716 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
717 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
718 gc->pc += cmdlen;
719 if (__builtin_expect(gc->pc > gc->limit, 0)) {
720 (void) __glXFlushRenderBuffer(gc, gc->pc);
721 }
722 }
723
724 #define X_GLrop_Color4bv 14
725 void
726 __indirect_glColor4bv(const GLbyte * v)
727 {
728 generic_4_byte(X_GLrop_Color4bv, v);
729 }
730
731 #define X_GLrop_Color4dv 15
732 void
733 __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue,
734 GLdouble alpha)
735 {
736 __GLXcontext *const gc = __glXGetCurrentContext();
737 const GLuint cmdlen = 36;
738 emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
739 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
740 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
741 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
742 (void) memcpy((void *) (gc->pc + 28), (void *) (&alpha), 8);
743 gc->pc += cmdlen;
744 if (__builtin_expect(gc->pc > gc->limit, 0)) {
745 (void) __glXFlushRenderBuffer(gc, gc->pc);
746 }
747 }
748
749 #define X_GLrop_Color4dv 15
750 void
751 __indirect_glColor4dv(const GLdouble * v)
752 {
753 generic_32_byte(X_GLrop_Color4dv, v);
754 }
755
756 #define X_GLrop_Color4fv 16
757 void
758 __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
759 {
760 __GLXcontext *const gc = __glXGetCurrentContext();
761 const GLuint cmdlen = 20;
762 emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
763 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
764 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
765 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
766 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
767 gc->pc += cmdlen;
768 if (__builtin_expect(gc->pc > gc->limit, 0)) {
769 (void) __glXFlushRenderBuffer(gc, gc->pc);
770 }
771 }
772
773 #define X_GLrop_Color4fv 16
774 void
775 __indirect_glColor4fv(const GLfloat * v)
776 {
777 generic_16_byte(X_GLrop_Color4fv, v);
778 }
779
780 #define X_GLrop_Color4iv 17
781 void
782 __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
783 {
784 __GLXcontext *const gc = __glXGetCurrentContext();
785 const GLuint cmdlen = 20;
786 emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
787 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
788 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
789 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
790 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
791 gc->pc += cmdlen;
792 if (__builtin_expect(gc->pc > gc->limit, 0)) {
793 (void) __glXFlushRenderBuffer(gc, gc->pc);
794 }
795 }
796
797 #define X_GLrop_Color4iv 17
798 void
799 __indirect_glColor4iv(const GLint * v)
800 {
801 generic_16_byte(X_GLrop_Color4iv, v);
802 }
803
804 #define X_GLrop_Color4sv 18
805 void
806 __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
807 {
808 __GLXcontext *const gc = __glXGetCurrentContext();
809 const GLuint cmdlen = 12;
810 emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
811 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
812 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
813 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
814 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
815 gc->pc += cmdlen;
816 if (__builtin_expect(gc->pc > gc->limit, 0)) {
817 (void) __glXFlushRenderBuffer(gc, gc->pc);
818 }
819 }
820
821 #define X_GLrop_Color4sv 18
822 void
823 __indirect_glColor4sv(const GLshort * v)
824 {
825 generic_8_byte(X_GLrop_Color4sv, v);
826 }
827
828 #define X_GLrop_Color4ubv 19
829 void
830 __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
831 {
832 __GLXcontext *const gc = __glXGetCurrentContext();
833 const GLuint cmdlen = 8;
834 emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
835 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
836 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
837 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
838 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
839 gc->pc += cmdlen;
840 if (__builtin_expect(gc->pc > gc->limit, 0)) {
841 (void) __glXFlushRenderBuffer(gc, gc->pc);
842 }
843 }
844
845 #define X_GLrop_Color4ubv 19
846 void
847 __indirect_glColor4ubv(const GLubyte * v)
848 {
849 generic_4_byte(X_GLrop_Color4ubv, v);
850 }
851
852 #define X_GLrop_Color4uiv 20
853 void
854 __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
855 {
856 __GLXcontext *const gc = __glXGetCurrentContext();
857 const GLuint cmdlen = 20;
858 emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
859 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
860 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
861 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
862 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
863 gc->pc += cmdlen;
864 if (__builtin_expect(gc->pc > gc->limit, 0)) {
865 (void) __glXFlushRenderBuffer(gc, gc->pc);
866 }
867 }
868
869 #define X_GLrop_Color4uiv 20
870 void
871 __indirect_glColor4uiv(const GLuint * v)
872 {
873 generic_16_byte(X_GLrop_Color4uiv, v);
874 }
875
876 #define X_GLrop_Color4usv 21
877 void
878 __indirect_glColor4us(GLushort red, GLushort green, GLushort blue,
879 GLushort alpha)
880 {
881 __GLXcontext *const gc = __glXGetCurrentContext();
882 const GLuint cmdlen = 12;
883 emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
884 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
885 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
886 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
887 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
888 gc->pc += cmdlen;
889 if (__builtin_expect(gc->pc > gc->limit, 0)) {
890 (void) __glXFlushRenderBuffer(gc, gc->pc);
891 }
892 }
893
894 #define X_GLrop_Color4usv 21
895 void
896 __indirect_glColor4usv(const GLushort * v)
897 {
898 generic_8_byte(X_GLrop_Color4usv, v);
899 }
900
901 #define X_GLrop_EdgeFlagv 22
902 void
903 __indirect_glEdgeFlag(GLboolean flag)
904 {
905 __GLXcontext *const gc = __glXGetCurrentContext();
906 const GLuint cmdlen = 8;
907 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
908 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
909 gc->pc += cmdlen;
910 if (__builtin_expect(gc->pc > gc->limit, 0)) {
911 (void) __glXFlushRenderBuffer(gc, gc->pc);
912 }
913 }
914
915 #define X_GLrop_EdgeFlagv 22
916 void
917 __indirect_glEdgeFlagv(const GLboolean * flag)
918 {
919 __GLXcontext *const gc = __glXGetCurrentContext();
920 const GLuint cmdlen = 8;
921 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
922 (void) memcpy((void *) (gc->pc + 4), (void *) (flag), 1);
923 gc->pc += cmdlen;
924 if (__builtin_expect(gc->pc > gc->limit, 0)) {
925 (void) __glXFlushRenderBuffer(gc, gc->pc);
926 }
927 }
928
929 #define X_GLrop_End 23
930 void
931 __indirect_glEnd(void)
932 {
933 __GLXcontext *const gc = __glXGetCurrentContext();
934 const GLuint cmdlen = 4;
935 emit_header(gc->pc, X_GLrop_End, cmdlen);
936 gc->pc += cmdlen;
937 if (__builtin_expect(gc->pc > gc->limit, 0)) {
938 (void) __glXFlushRenderBuffer(gc, gc->pc);
939 }
940 }
941
942 #define X_GLrop_Indexdv 24
943 void
944 __indirect_glIndexd(GLdouble c)
945 {
946 __GLXcontext *const gc = __glXGetCurrentContext();
947 const GLuint cmdlen = 12;
948 emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
949 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 8);
950 gc->pc += cmdlen;
951 if (__builtin_expect(gc->pc > gc->limit, 0)) {
952 (void) __glXFlushRenderBuffer(gc, gc->pc);
953 }
954 }
955
956 #define X_GLrop_Indexdv 24
957 void
958 __indirect_glIndexdv(const GLdouble * c)
959 {
960 generic_8_byte(X_GLrop_Indexdv, c);
961 }
962
963 #define X_GLrop_Indexfv 25
964 void
965 __indirect_glIndexf(GLfloat c)
966 {
967 __GLXcontext *const gc = __glXGetCurrentContext();
968 const GLuint cmdlen = 8;
969 emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
970 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
971 gc->pc += cmdlen;
972 if (__builtin_expect(gc->pc > gc->limit, 0)) {
973 (void) __glXFlushRenderBuffer(gc, gc->pc);
974 }
975 }
976
977 #define X_GLrop_Indexfv 25
978 void
979 __indirect_glIndexfv(const GLfloat * c)
980 {
981 generic_4_byte(X_GLrop_Indexfv, c);
982 }
983
984 #define X_GLrop_Indexiv 26
985 void
986 __indirect_glIndexi(GLint c)
987 {
988 __GLXcontext *const gc = __glXGetCurrentContext();
989 const GLuint cmdlen = 8;
990 emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
991 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
992 gc->pc += cmdlen;
993 if (__builtin_expect(gc->pc > gc->limit, 0)) {
994 (void) __glXFlushRenderBuffer(gc, gc->pc);
995 }
996 }
997
998 #define X_GLrop_Indexiv 26
999 void
1000 __indirect_glIndexiv(const GLint * c)
1001 {
1002 generic_4_byte(X_GLrop_Indexiv, c);
1003 }
1004
1005 #define X_GLrop_Indexsv 27
1006 void
1007 __indirect_glIndexs(GLshort c)
1008 {
1009 __GLXcontext *const gc = __glXGetCurrentContext();
1010 const GLuint cmdlen = 8;
1011 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1012 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 2);
1013 gc->pc += cmdlen;
1014 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1015 (void) __glXFlushRenderBuffer(gc, gc->pc);
1016 }
1017 }
1018
1019 #define X_GLrop_Indexsv 27
1020 void
1021 __indirect_glIndexsv(const GLshort * c)
1022 {
1023 __GLXcontext *const gc = __glXGetCurrentContext();
1024 const GLuint cmdlen = 8;
1025 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1026 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 2);
1027 gc->pc += cmdlen;
1028 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1029 (void) __glXFlushRenderBuffer(gc, gc->pc);
1030 }
1031 }
1032
1033 #define X_GLrop_Normal3bv 28
1034 void
1035 __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
1036 {
1037 __GLXcontext *const gc = __glXGetCurrentContext();
1038 const GLuint cmdlen = 8;
1039 emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
1040 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 1);
1041 (void) memcpy((void *) (gc->pc + 5), (void *) (&ny), 1);
1042 (void) memcpy((void *) (gc->pc + 6), (void *) (&nz), 1);
1043 gc->pc += cmdlen;
1044 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1045 (void) __glXFlushRenderBuffer(gc, gc->pc);
1046 }
1047 }
1048
1049 #define X_GLrop_Normal3bv 28
1050 void
1051 __indirect_glNormal3bv(const GLbyte * v)
1052 {
1053 generic_3_byte(X_GLrop_Normal3bv, v);
1054 }
1055
1056 #define X_GLrop_Normal3dv 29
1057 void
1058 __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
1059 {
1060 __GLXcontext *const gc = __glXGetCurrentContext();
1061 const GLuint cmdlen = 28;
1062 emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
1063 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 8);
1064 (void) memcpy((void *) (gc->pc + 12), (void *) (&ny), 8);
1065 (void) memcpy((void *) (gc->pc + 20), (void *) (&nz), 8);
1066 gc->pc += cmdlen;
1067 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1068 (void) __glXFlushRenderBuffer(gc, gc->pc);
1069 }
1070 }
1071
1072 #define X_GLrop_Normal3dv 29
1073 void
1074 __indirect_glNormal3dv(const GLdouble * v)
1075 {
1076 generic_24_byte(X_GLrop_Normal3dv, v);
1077 }
1078
1079 #define X_GLrop_Normal3fv 30
1080 void
1081 __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1082 {
1083 __GLXcontext *const gc = __glXGetCurrentContext();
1084 const GLuint cmdlen = 16;
1085 emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
1086 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1087 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1088 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1089 gc->pc += cmdlen;
1090 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1091 (void) __glXFlushRenderBuffer(gc, gc->pc);
1092 }
1093 }
1094
1095 #define X_GLrop_Normal3fv 30
1096 void
1097 __indirect_glNormal3fv(const GLfloat * v)
1098 {
1099 generic_12_byte(X_GLrop_Normal3fv, v);
1100 }
1101
1102 #define X_GLrop_Normal3iv 31
1103 void
1104 __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
1105 {
1106 __GLXcontext *const gc = __glXGetCurrentContext();
1107 const GLuint cmdlen = 16;
1108 emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
1109 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1110 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1111 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1112 gc->pc += cmdlen;
1113 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1114 (void) __glXFlushRenderBuffer(gc, gc->pc);
1115 }
1116 }
1117
1118 #define X_GLrop_Normal3iv 31
1119 void
1120 __indirect_glNormal3iv(const GLint * v)
1121 {
1122 generic_12_byte(X_GLrop_Normal3iv, v);
1123 }
1124
1125 #define X_GLrop_Normal3sv 32
1126 void
1127 __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
1128 {
1129 __GLXcontext *const gc = __glXGetCurrentContext();
1130 const GLuint cmdlen = 12;
1131 emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
1132 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 2);
1133 (void) memcpy((void *) (gc->pc + 6), (void *) (&ny), 2);
1134 (void) memcpy((void *) (gc->pc + 8), (void *) (&nz), 2);
1135 gc->pc += cmdlen;
1136 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1137 (void) __glXFlushRenderBuffer(gc, gc->pc);
1138 }
1139 }
1140
1141 #define X_GLrop_Normal3sv 32
1142 void
1143 __indirect_glNormal3sv(const GLshort * v)
1144 {
1145 generic_6_byte(X_GLrop_Normal3sv, v);
1146 }
1147
1148 #define X_GLrop_RasterPos2dv 33
1149 void
1150 __indirect_glRasterPos2d(GLdouble x, GLdouble y)
1151 {
1152 __GLXcontext *const gc = __glXGetCurrentContext();
1153 const GLuint cmdlen = 20;
1154 emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
1155 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1156 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1157 gc->pc += cmdlen;
1158 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1159 (void) __glXFlushRenderBuffer(gc, gc->pc);
1160 }
1161 }
1162
1163 #define X_GLrop_RasterPos2dv 33
1164 void
1165 __indirect_glRasterPos2dv(const GLdouble * v)
1166 {
1167 generic_16_byte(X_GLrop_RasterPos2dv, v);
1168 }
1169
1170 #define X_GLrop_RasterPos2fv 34
1171 void
1172 __indirect_glRasterPos2f(GLfloat x, GLfloat y)
1173 {
1174 __GLXcontext *const gc = __glXGetCurrentContext();
1175 const GLuint cmdlen = 12;
1176 emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
1177 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1178 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1179 gc->pc += cmdlen;
1180 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1181 (void) __glXFlushRenderBuffer(gc, gc->pc);
1182 }
1183 }
1184
1185 #define X_GLrop_RasterPos2fv 34
1186 void
1187 __indirect_glRasterPos2fv(const GLfloat * v)
1188 {
1189 generic_8_byte(X_GLrop_RasterPos2fv, v);
1190 }
1191
1192 #define X_GLrop_RasterPos2iv 35
1193 void
1194 __indirect_glRasterPos2i(GLint x, GLint y)
1195 {
1196 __GLXcontext *const gc = __glXGetCurrentContext();
1197 const GLuint cmdlen = 12;
1198 emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
1199 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1200 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1201 gc->pc += cmdlen;
1202 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1203 (void) __glXFlushRenderBuffer(gc, gc->pc);
1204 }
1205 }
1206
1207 #define X_GLrop_RasterPos2iv 35
1208 void
1209 __indirect_glRasterPos2iv(const GLint * v)
1210 {
1211 generic_8_byte(X_GLrop_RasterPos2iv, v);
1212 }
1213
1214 #define X_GLrop_RasterPos2sv 36
1215 void
1216 __indirect_glRasterPos2s(GLshort x, GLshort y)
1217 {
1218 __GLXcontext *const gc = __glXGetCurrentContext();
1219 const GLuint cmdlen = 8;
1220 emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
1221 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1222 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1223 gc->pc += cmdlen;
1224 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1225 (void) __glXFlushRenderBuffer(gc, gc->pc);
1226 }
1227 }
1228
1229 #define X_GLrop_RasterPos2sv 36
1230 void
1231 __indirect_glRasterPos2sv(const GLshort * v)
1232 {
1233 generic_4_byte(X_GLrop_RasterPos2sv, v);
1234 }
1235
1236 #define X_GLrop_RasterPos3dv 37
1237 void
1238 __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
1239 {
1240 __GLXcontext *const gc = __glXGetCurrentContext();
1241 const GLuint cmdlen = 28;
1242 emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
1243 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1244 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1245 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1246 gc->pc += cmdlen;
1247 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1248 (void) __glXFlushRenderBuffer(gc, gc->pc);
1249 }
1250 }
1251
1252 #define X_GLrop_RasterPos3dv 37
1253 void
1254 __indirect_glRasterPos3dv(const GLdouble * v)
1255 {
1256 generic_24_byte(X_GLrop_RasterPos3dv, v);
1257 }
1258
1259 #define X_GLrop_RasterPos3fv 38
1260 void
1261 __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
1262 {
1263 __GLXcontext *const gc = __glXGetCurrentContext();
1264 const GLuint cmdlen = 16;
1265 emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
1266 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1267 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1268 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1269 gc->pc += cmdlen;
1270 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1271 (void) __glXFlushRenderBuffer(gc, gc->pc);
1272 }
1273 }
1274
1275 #define X_GLrop_RasterPos3fv 38
1276 void
1277 __indirect_glRasterPos3fv(const GLfloat * v)
1278 {
1279 generic_12_byte(X_GLrop_RasterPos3fv, v);
1280 }
1281
1282 #define X_GLrop_RasterPos3iv 39
1283 void
1284 __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
1285 {
1286 __GLXcontext *const gc = __glXGetCurrentContext();
1287 const GLuint cmdlen = 16;
1288 emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
1289 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1290 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1291 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1292 gc->pc += cmdlen;
1293 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1294 (void) __glXFlushRenderBuffer(gc, gc->pc);
1295 }
1296 }
1297
1298 #define X_GLrop_RasterPos3iv 39
1299 void
1300 __indirect_glRasterPos3iv(const GLint * v)
1301 {
1302 generic_12_byte(X_GLrop_RasterPos3iv, v);
1303 }
1304
1305 #define X_GLrop_RasterPos3sv 40
1306 void
1307 __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
1308 {
1309 __GLXcontext *const gc = __glXGetCurrentContext();
1310 const GLuint cmdlen = 12;
1311 emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
1312 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1313 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1314 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1315 gc->pc += cmdlen;
1316 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1317 (void) __glXFlushRenderBuffer(gc, gc->pc);
1318 }
1319 }
1320
1321 #define X_GLrop_RasterPos3sv 40
1322 void
1323 __indirect_glRasterPos3sv(const GLshort * v)
1324 {
1325 generic_6_byte(X_GLrop_RasterPos3sv, v);
1326 }
1327
1328 #define X_GLrop_RasterPos4dv 41
1329 void
1330 __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1331 {
1332 __GLXcontext *const gc = __glXGetCurrentContext();
1333 const GLuint cmdlen = 36;
1334 emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
1335 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1336 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1337 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1338 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
1339 gc->pc += cmdlen;
1340 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1341 (void) __glXFlushRenderBuffer(gc, gc->pc);
1342 }
1343 }
1344
1345 #define X_GLrop_RasterPos4dv 41
1346 void
1347 __indirect_glRasterPos4dv(const GLdouble * v)
1348 {
1349 generic_32_byte(X_GLrop_RasterPos4dv, v);
1350 }
1351
1352 #define X_GLrop_RasterPos4fv 42
1353 void
1354 __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1355 {
1356 __GLXcontext *const gc = __glXGetCurrentContext();
1357 const GLuint cmdlen = 20;
1358 emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
1359 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1360 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1361 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1362 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1363 gc->pc += cmdlen;
1364 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1365 (void) __glXFlushRenderBuffer(gc, gc->pc);
1366 }
1367 }
1368
1369 #define X_GLrop_RasterPos4fv 42
1370 void
1371 __indirect_glRasterPos4fv(const GLfloat * v)
1372 {
1373 generic_16_byte(X_GLrop_RasterPos4fv, v);
1374 }
1375
1376 #define X_GLrop_RasterPos4iv 43
1377 void
1378 __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
1379 {
1380 __GLXcontext *const gc = __glXGetCurrentContext();
1381 const GLuint cmdlen = 20;
1382 emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
1383 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1384 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1385 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1386 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1387 gc->pc += cmdlen;
1388 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1389 (void) __glXFlushRenderBuffer(gc, gc->pc);
1390 }
1391 }
1392
1393 #define X_GLrop_RasterPos4iv 43
1394 void
1395 __indirect_glRasterPos4iv(const GLint * v)
1396 {
1397 generic_16_byte(X_GLrop_RasterPos4iv, v);
1398 }
1399
1400 #define X_GLrop_RasterPos4sv 44
1401 void
1402 __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
1403 {
1404 __GLXcontext *const gc = __glXGetCurrentContext();
1405 const GLuint cmdlen = 12;
1406 emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
1407 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1408 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1409 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1410 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
1411 gc->pc += cmdlen;
1412 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1413 (void) __glXFlushRenderBuffer(gc, gc->pc);
1414 }
1415 }
1416
1417 #define X_GLrop_RasterPos4sv 44
1418 void
1419 __indirect_glRasterPos4sv(const GLshort * v)
1420 {
1421 generic_8_byte(X_GLrop_RasterPos4sv, v);
1422 }
1423
1424 #define X_GLrop_Rectdv 45
1425 void
1426 __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1427 {
1428 __GLXcontext *const gc = __glXGetCurrentContext();
1429 const GLuint cmdlen = 36;
1430 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1431 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 8);
1432 (void) memcpy((void *) (gc->pc + 12), (void *) (&y1), 8);
1433 (void) memcpy((void *) (gc->pc + 20), (void *) (&x2), 8);
1434 (void) memcpy((void *) (gc->pc + 28), (void *) (&y2), 8);
1435 gc->pc += cmdlen;
1436 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1437 (void) __glXFlushRenderBuffer(gc, gc->pc);
1438 }
1439 }
1440
1441 #define X_GLrop_Rectdv 45
1442 void
1443 __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
1444 {
1445 __GLXcontext *const gc = __glXGetCurrentContext();
1446 const GLuint cmdlen = 36;
1447 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1448 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 16);
1449 (void) memcpy((void *) (gc->pc + 20), (void *) (v2), 16);
1450 gc->pc += cmdlen;
1451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1452 (void) __glXFlushRenderBuffer(gc, gc->pc);
1453 }
1454 }
1455
1456 #define X_GLrop_Rectfv 46
1457 void
1458 __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
1459 {
1460 __GLXcontext *const gc = __glXGetCurrentContext();
1461 const GLuint cmdlen = 20;
1462 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1463 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1464 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1465 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1466 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1467 gc->pc += cmdlen;
1468 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1469 (void) __glXFlushRenderBuffer(gc, gc->pc);
1470 }
1471 }
1472
1473 #define X_GLrop_Rectfv 46
1474 void
1475 __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
1476 {
1477 __GLXcontext *const gc = __glXGetCurrentContext();
1478 const GLuint cmdlen = 20;
1479 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1480 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1481 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1482 gc->pc += cmdlen;
1483 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1484 (void) __glXFlushRenderBuffer(gc, gc->pc);
1485 }
1486 }
1487
1488 #define X_GLrop_Rectiv 47
1489 void
1490 __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
1491 {
1492 __GLXcontext *const gc = __glXGetCurrentContext();
1493 const GLuint cmdlen = 20;
1494 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1495 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1496 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1497 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1498 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1499 gc->pc += cmdlen;
1500 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1501 (void) __glXFlushRenderBuffer(gc, gc->pc);
1502 }
1503 }
1504
1505 #define X_GLrop_Rectiv 47
1506 void
1507 __indirect_glRectiv(const GLint * v1, const GLint * v2)
1508 {
1509 __GLXcontext *const gc = __glXGetCurrentContext();
1510 const GLuint cmdlen = 20;
1511 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1512 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1513 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1514 gc->pc += cmdlen;
1515 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1516 (void) __glXFlushRenderBuffer(gc, gc->pc);
1517 }
1518 }
1519
1520 #define X_GLrop_Rectsv 48
1521 void
1522 __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1523 {
1524 __GLXcontext *const gc = __glXGetCurrentContext();
1525 const GLuint cmdlen = 12;
1526 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1527 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 2);
1528 (void) memcpy((void *) (gc->pc + 6), (void *) (&y1), 2);
1529 (void) memcpy((void *) (gc->pc + 8), (void *) (&x2), 2);
1530 (void) memcpy((void *) (gc->pc + 10), (void *) (&y2), 2);
1531 gc->pc += cmdlen;
1532 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1533 (void) __glXFlushRenderBuffer(gc, gc->pc);
1534 }
1535 }
1536
1537 #define X_GLrop_Rectsv 48
1538 void
1539 __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
1540 {
1541 __GLXcontext *const gc = __glXGetCurrentContext();
1542 const GLuint cmdlen = 12;
1543 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1544 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 4);
1545 (void) memcpy((void *) (gc->pc + 8), (void *) (v2), 4);
1546 gc->pc += cmdlen;
1547 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1548 (void) __glXFlushRenderBuffer(gc, gc->pc);
1549 }
1550 }
1551
1552 #define X_GLrop_TexCoord1dv 49
1553 void
1554 __indirect_glTexCoord1d(GLdouble s)
1555 {
1556 __GLXcontext *const gc = __glXGetCurrentContext();
1557 const GLuint cmdlen = 12;
1558 emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
1559 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1560 gc->pc += cmdlen;
1561 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1562 (void) __glXFlushRenderBuffer(gc, gc->pc);
1563 }
1564 }
1565
1566 #define X_GLrop_TexCoord1dv 49
1567 void
1568 __indirect_glTexCoord1dv(const GLdouble * v)
1569 {
1570 generic_8_byte(X_GLrop_TexCoord1dv, v);
1571 }
1572
1573 #define X_GLrop_TexCoord1fv 50
1574 void
1575 __indirect_glTexCoord1f(GLfloat s)
1576 {
1577 __GLXcontext *const gc = __glXGetCurrentContext();
1578 const GLuint cmdlen = 8;
1579 emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
1580 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1581 gc->pc += cmdlen;
1582 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1583 (void) __glXFlushRenderBuffer(gc, gc->pc);
1584 }
1585 }
1586
1587 #define X_GLrop_TexCoord1fv 50
1588 void
1589 __indirect_glTexCoord1fv(const GLfloat * v)
1590 {
1591 generic_4_byte(X_GLrop_TexCoord1fv, v);
1592 }
1593
1594 #define X_GLrop_TexCoord1iv 51
1595 void
1596 __indirect_glTexCoord1i(GLint s)
1597 {
1598 __GLXcontext *const gc = __glXGetCurrentContext();
1599 const GLuint cmdlen = 8;
1600 emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
1601 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1602 gc->pc += cmdlen;
1603 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1604 (void) __glXFlushRenderBuffer(gc, gc->pc);
1605 }
1606 }
1607
1608 #define X_GLrop_TexCoord1iv 51
1609 void
1610 __indirect_glTexCoord1iv(const GLint * v)
1611 {
1612 generic_4_byte(X_GLrop_TexCoord1iv, v);
1613 }
1614
1615 #define X_GLrop_TexCoord1sv 52
1616 void
1617 __indirect_glTexCoord1s(GLshort s)
1618 {
1619 __GLXcontext *const gc = __glXGetCurrentContext();
1620 const GLuint cmdlen = 8;
1621 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1622 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1623 gc->pc += cmdlen;
1624 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1625 (void) __glXFlushRenderBuffer(gc, gc->pc);
1626 }
1627 }
1628
1629 #define X_GLrop_TexCoord1sv 52
1630 void
1631 __indirect_glTexCoord1sv(const GLshort * v)
1632 {
1633 __GLXcontext *const gc = __glXGetCurrentContext();
1634 const GLuint cmdlen = 8;
1635 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1636 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 2);
1637 gc->pc += cmdlen;
1638 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1639 (void) __glXFlushRenderBuffer(gc, gc->pc);
1640 }
1641 }
1642
1643 #define X_GLrop_TexCoord2dv 53
1644 void
1645 __indirect_glTexCoord2d(GLdouble s, GLdouble t)
1646 {
1647 __GLXcontext *const gc = __glXGetCurrentContext();
1648 const GLuint cmdlen = 20;
1649 emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
1650 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1651 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1652 gc->pc += cmdlen;
1653 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1654 (void) __glXFlushRenderBuffer(gc, gc->pc);
1655 }
1656 }
1657
1658 #define X_GLrop_TexCoord2dv 53
1659 void
1660 __indirect_glTexCoord2dv(const GLdouble * v)
1661 {
1662 generic_16_byte(X_GLrop_TexCoord2dv, v);
1663 }
1664
1665 #define X_GLrop_TexCoord2fv 54
1666 void
1667 __indirect_glTexCoord2f(GLfloat s, GLfloat t)
1668 {
1669 __GLXcontext *const gc = __glXGetCurrentContext();
1670 const GLuint cmdlen = 12;
1671 emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
1672 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1673 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1674 gc->pc += cmdlen;
1675 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1676 (void) __glXFlushRenderBuffer(gc, gc->pc);
1677 }
1678 }
1679
1680 #define X_GLrop_TexCoord2fv 54
1681 void
1682 __indirect_glTexCoord2fv(const GLfloat * v)
1683 {
1684 generic_8_byte(X_GLrop_TexCoord2fv, v);
1685 }
1686
1687 #define X_GLrop_TexCoord2iv 55
1688 void
1689 __indirect_glTexCoord2i(GLint s, GLint t)
1690 {
1691 __GLXcontext *const gc = __glXGetCurrentContext();
1692 const GLuint cmdlen = 12;
1693 emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
1694 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1695 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1696 gc->pc += cmdlen;
1697 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1698 (void) __glXFlushRenderBuffer(gc, gc->pc);
1699 }
1700 }
1701
1702 #define X_GLrop_TexCoord2iv 55
1703 void
1704 __indirect_glTexCoord2iv(const GLint * v)
1705 {
1706 generic_8_byte(X_GLrop_TexCoord2iv, v);
1707 }
1708
1709 #define X_GLrop_TexCoord2sv 56
1710 void
1711 __indirect_glTexCoord2s(GLshort s, GLshort t)
1712 {
1713 __GLXcontext *const gc = __glXGetCurrentContext();
1714 const GLuint cmdlen = 8;
1715 emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
1716 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1717 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1718 gc->pc += cmdlen;
1719 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1720 (void) __glXFlushRenderBuffer(gc, gc->pc);
1721 }
1722 }
1723
1724 #define X_GLrop_TexCoord2sv 56
1725 void
1726 __indirect_glTexCoord2sv(const GLshort * v)
1727 {
1728 generic_4_byte(X_GLrop_TexCoord2sv, v);
1729 }
1730
1731 #define X_GLrop_TexCoord3dv 57
1732 void
1733 __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
1734 {
1735 __GLXcontext *const gc = __glXGetCurrentContext();
1736 const GLuint cmdlen = 28;
1737 emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
1738 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1739 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1740 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1741 gc->pc += cmdlen;
1742 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1743 (void) __glXFlushRenderBuffer(gc, gc->pc);
1744 }
1745 }
1746
1747 #define X_GLrop_TexCoord3dv 57
1748 void
1749 __indirect_glTexCoord3dv(const GLdouble * v)
1750 {
1751 generic_24_byte(X_GLrop_TexCoord3dv, v);
1752 }
1753
1754 #define X_GLrop_TexCoord3fv 58
1755 void
1756 __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
1757 {
1758 __GLXcontext *const gc = __glXGetCurrentContext();
1759 const GLuint cmdlen = 16;
1760 emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
1761 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1762 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1763 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1764 gc->pc += cmdlen;
1765 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1766 (void) __glXFlushRenderBuffer(gc, gc->pc);
1767 }
1768 }
1769
1770 #define X_GLrop_TexCoord3fv 58
1771 void
1772 __indirect_glTexCoord3fv(const GLfloat * v)
1773 {
1774 generic_12_byte(X_GLrop_TexCoord3fv, v);
1775 }
1776
1777 #define X_GLrop_TexCoord3iv 59
1778 void
1779 __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
1780 {
1781 __GLXcontext *const gc = __glXGetCurrentContext();
1782 const GLuint cmdlen = 16;
1783 emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
1784 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1785 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1786 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1787 gc->pc += cmdlen;
1788 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1789 (void) __glXFlushRenderBuffer(gc, gc->pc);
1790 }
1791 }
1792
1793 #define X_GLrop_TexCoord3iv 59
1794 void
1795 __indirect_glTexCoord3iv(const GLint * v)
1796 {
1797 generic_12_byte(X_GLrop_TexCoord3iv, v);
1798 }
1799
1800 #define X_GLrop_TexCoord3sv 60
1801 void
1802 __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
1803 {
1804 __GLXcontext *const gc = __glXGetCurrentContext();
1805 const GLuint cmdlen = 12;
1806 emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
1807 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1808 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1809 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1810 gc->pc += cmdlen;
1811 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1812 (void) __glXFlushRenderBuffer(gc, gc->pc);
1813 }
1814 }
1815
1816 #define X_GLrop_TexCoord3sv 60
1817 void
1818 __indirect_glTexCoord3sv(const GLshort * v)
1819 {
1820 generic_6_byte(X_GLrop_TexCoord3sv, v);
1821 }
1822
1823 #define X_GLrop_TexCoord4dv 61
1824 void
1825 __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1826 {
1827 __GLXcontext *const gc = __glXGetCurrentContext();
1828 const GLuint cmdlen = 36;
1829 emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
1830 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1831 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1832 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1833 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
1834 gc->pc += cmdlen;
1835 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1836 (void) __glXFlushRenderBuffer(gc, gc->pc);
1837 }
1838 }
1839
1840 #define X_GLrop_TexCoord4dv 61
1841 void
1842 __indirect_glTexCoord4dv(const GLdouble * v)
1843 {
1844 generic_32_byte(X_GLrop_TexCoord4dv, v);
1845 }
1846
1847 #define X_GLrop_TexCoord4fv 62
1848 void
1849 __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1850 {
1851 __GLXcontext *const gc = __glXGetCurrentContext();
1852 const GLuint cmdlen = 20;
1853 emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
1854 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1855 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1856 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1857 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1858 gc->pc += cmdlen;
1859 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1860 (void) __glXFlushRenderBuffer(gc, gc->pc);
1861 }
1862 }
1863
1864 #define X_GLrop_TexCoord4fv 62
1865 void
1866 __indirect_glTexCoord4fv(const GLfloat * v)
1867 {
1868 generic_16_byte(X_GLrop_TexCoord4fv, v);
1869 }
1870
1871 #define X_GLrop_TexCoord4iv 63
1872 void
1873 __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
1874 {
1875 __GLXcontext *const gc = __glXGetCurrentContext();
1876 const GLuint cmdlen = 20;
1877 emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
1878 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1879 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1880 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1881 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1882 gc->pc += cmdlen;
1883 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1884 (void) __glXFlushRenderBuffer(gc, gc->pc);
1885 }
1886 }
1887
1888 #define X_GLrop_TexCoord4iv 63
1889 void
1890 __indirect_glTexCoord4iv(const GLint * v)
1891 {
1892 generic_16_byte(X_GLrop_TexCoord4iv, v);
1893 }
1894
1895 #define X_GLrop_TexCoord4sv 64
1896 void
1897 __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
1898 {
1899 __GLXcontext *const gc = __glXGetCurrentContext();
1900 const GLuint cmdlen = 12;
1901 emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
1902 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1903 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1904 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1905 (void) memcpy((void *) (gc->pc + 10), (void *) (&q), 2);
1906 gc->pc += cmdlen;
1907 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1908 (void) __glXFlushRenderBuffer(gc, gc->pc);
1909 }
1910 }
1911
1912 #define X_GLrop_TexCoord4sv 64
1913 void
1914 __indirect_glTexCoord4sv(const GLshort * v)
1915 {
1916 generic_8_byte(X_GLrop_TexCoord4sv, v);
1917 }
1918
1919 #define X_GLrop_Vertex2dv 65
1920 void
1921 __indirect_glVertex2d(GLdouble x, GLdouble y)
1922 {
1923 __GLXcontext *const gc = __glXGetCurrentContext();
1924 const GLuint cmdlen = 20;
1925 emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
1926 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1927 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1928 gc->pc += cmdlen;
1929 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1930 (void) __glXFlushRenderBuffer(gc, gc->pc);
1931 }
1932 }
1933
1934 #define X_GLrop_Vertex2dv 65
1935 void
1936 __indirect_glVertex2dv(const GLdouble * v)
1937 {
1938 generic_16_byte(X_GLrop_Vertex2dv, v);
1939 }
1940
1941 #define X_GLrop_Vertex2fv 66
1942 void
1943 __indirect_glVertex2f(GLfloat x, GLfloat y)
1944 {
1945 __GLXcontext *const gc = __glXGetCurrentContext();
1946 const GLuint cmdlen = 12;
1947 emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
1948 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1949 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1950 gc->pc += cmdlen;
1951 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1952 (void) __glXFlushRenderBuffer(gc, gc->pc);
1953 }
1954 }
1955
1956 #define X_GLrop_Vertex2fv 66
1957 void
1958 __indirect_glVertex2fv(const GLfloat * v)
1959 {
1960 generic_8_byte(X_GLrop_Vertex2fv, v);
1961 }
1962
1963 #define X_GLrop_Vertex2iv 67
1964 void
1965 __indirect_glVertex2i(GLint x, GLint y)
1966 {
1967 __GLXcontext *const gc = __glXGetCurrentContext();
1968 const GLuint cmdlen = 12;
1969 emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
1970 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1971 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1972 gc->pc += cmdlen;
1973 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1974 (void) __glXFlushRenderBuffer(gc, gc->pc);
1975 }
1976 }
1977
1978 #define X_GLrop_Vertex2iv 67
1979 void
1980 __indirect_glVertex2iv(const GLint * v)
1981 {
1982 generic_8_byte(X_GLrop_Vertex2iv, v);
1983 }
1984
1985 #define X_GLrop_Vertex2sv 68
1986 void
1987 __indirect_glVertex2s(GLshort x, GLshort y)
1988 {
1989 __GLXcontext *const gc = __glXGetCurrentContext();
1990 const GLuint cmdlen = 8;
1991 emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
1992 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1993 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1994 gc->pc += cmdlen;
1995 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1996 (void) __glXFlushRenderBuffer(gc, gc->pc);
1997 }
1998 }
1999
2000 #define X_GLrop_Vertex2sv 68
2001 void
2002 __indirect_glVertex2sv(const GLshort * v)
2003 {
2004 generic_4_byte(X_GLrop_Vertex2sv, v);
2005 }
2006
2007 #define X_GLrop_Vertex3dv 69
2008 void
2009 __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
2010 {
2011 __GLXcontext *const gc = __glXGetCurrentContext();
2012 const GLuint cmdlen = 28;
2013 emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
2014 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2015 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2016 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2017 gc->pc += cmdlen;
2018 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2019 (void) __glXFlushRenderBuffer(gc, gc->pc);
2020 }
2021 }
2022
2023 #define X_GLrop_Vertex3dv 69
2024 void
2025 __indirect_glVertex3dv(const GLdouble * v)
2026 {
2027 generic_24_byte(X_GLrop_Vertex3dv, v);
2028 }
2029
2030 #define X_GLrop_Vertex3fv 70
2031 void
2032 __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
2033 {
2034 __GLXcontext *const gc = __glXGetCurrentContext();
2035 const GLuint cmdlen = 16;
2036 emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
2037 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2038 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2039 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2040 gc->pc += cmdlen;
2041 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2042 (void) __glXFlushRenderBuffer(gc, gc->pc);
2043 }
2044 }
2045
2046 #define X_GLrop_Vertex3fv 70
2047 void
2048 __indirect_glVertex3fv(const GLfloat * v)
2049 {
2050 generic_12_byte(X_GLrop_Vertex3fv, v);
2051 }
2052
2053 #define X_GLrop_Vertex3iv 71
2054 void
2055 __indirect_glVertex3i(GLint x, GLint y, GLint z)
2056 {
2057 __GLXcontext *const gc = __glXGetCurrentContext();
2058 const GLuint cmdlen = 16;
2059 emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
2060 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2061 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2062 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2063 gc->pc += cmdlen;
2064 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2065 (void) __glXFlushRenderBuffer(gc, gc->pc);
2066 }
2067 }
2068
2069 #define X_GLrop_Vertex3iv 71
2070 void
2071 __indirect_glVertex3iv(const GLint * v)
2072 {
2073 generic_12_byte(X_GLrop_Vertex3iv, v);
2074 }
2075
2076 #define X_GLrop_Vertex3sv 72
2077 void
2078 __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
2079 {
2080 __GLXcontext *const gc = __glXGetCurrentContext();
2081 const GLuint cmdlen = 12;
2082 emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
2083 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2084 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2085 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2086 gc->pc += cmdlen;
2087 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2088 (void) __glXFlushRenderBuffer(gc, gc->pc);
2089 }
2090 }
2091
2092 #define X_GLrop_Vertex3sv 72
2093 void
2094 __indirect_glVertex3sv(const GLshort * v)
2095 {
2096 generic_6_byte(X_GLrop_Vertex3sv, v);
2097 }
2098
2099 #define X_GLrop_Vertex4dv 73
2100 void
2101 __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
2102 {
2103 __GLXcontext *const gc = __glXGetCurrentContext();
2104 const GLuint cmdlen = 36;
2105 emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
2106 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2107 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2108 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2109 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
2110 gc->pc += cmdlen;
2111 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2112 (void) __glXFlushRenderBuffer(gc, gc->pc);
2113 }
2114 }
2115
2116 #define X_GLrop_Vertex4dv 73
2117 void
2118 __indirect_glVertex4dv(const GLdouble * v)
2119 {
2120 generic_32_byte(X_GLrop_Vertex4dv, v);
2121 }
2122
2123 #define X_GLrop_Vertex4fv 74
2124 void
2125 __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2126 {
2127 __GLXcontext *const gc = __glXGetCurrentContext();
2128 const GLuint cmdlen = 20;
2129 emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
2130 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2131 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2132 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2133 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2134 gc->pc += cmdlen;
2135 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2136 (void) __glXFlushRenderBuffer(gc, gc->pc);
2137 }
2138 }
2139
2140 #define X_GLrop_Vertex4fv 74
2141 void
2142 __indirect_glVertex4fv(const GLfloat * v)
2143 {
2144 generic_16_byte(X_GLrop_Vertex4fv, v);
2145 }
2146
2147 #define X_GLrop_Vertex4iv 75
2148 void
2149 __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
2150 {
2151 __GLXcontext *const gc = __glXGetCurrentContext();
2152 const GLuint cmdlen = 20;
2153 emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
2154 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2155 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2156 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2157 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2158 gc->pc += cmdlen;
2159 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2160 (void) __glXFlushRenderBuffer(gc, gc->pc);
2161 }
2162 }
2163
2164 #define X_GLrop_Vertex4iv 75
2165 void
2166 __indirect_glVertex4iv(const GLint * v)
2167 {
2168 generic_16_byte(X_GLrop_Vertex4iv, v);
2169 }
2170
2171 #define X_GLrop_Vertex4sv 76
2172 void
2173 __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
2174 {
2175 __GLXcontext *const gc = __glXGetCurrentContext();
2176 const GLuint cmdlen = 12;
2177 emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
2178 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2179 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2180 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2181 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
2182 gc->pc += cmdlen;
2183 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2184 (void) __glXFlushRenderBuffer(gc, gc->pc);
2185 }
2186 }
2187
2188 #define X_GLrop_Vertex4sv 76
2189 void
2190 __indirect_glVertex4sv(const GLshort * v)
2191 {
2192 generic_8_byte(X_GLrop_Vertex4sv, v);
2193 }
2194
2195 #define X_GLrop_ClipPlane 77
2196 void
2197 __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
2198 {
2199 __GLXcontext *const gc = __glXGetCurrentContext();
2200 const GLuint cmdlen = 40;
2201 emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
2202 (void) memcpy((void *) (gc->pc + 4), (void *) (equation), 32);
2203 (void) memcpy((void *) (gc->pc + 36), (void *) (&plane), 4);
2204 gc->pc += cmdlen;
2205 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2206 (void) __glXFlushRenderBuffer(gc, gc->pc);
2207 }
2208 }
2209
2210 #define X_GLrop_ColorMaterial 78
2211 void
2212 __indirect_glColorMaterial(GLenum face, GLenum mode)
2213 {
2214 __GLXcontext *const gc = __glXGetCurrentContext();
2215 const GLuint cmdlen = 12;
2216 emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
2217 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2218 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2219 gc->pc += cmdlen;
2220 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2221 (void) __glXFlushRenderBuffer(gc, gc->pc);
2222 }
2223 }
2224
2225 #define X_GLrop_CullFace 79
2226 void
2227 __indirect_glCullFace(GLenum mode)
2228 {
2229 __GLXcontext *const gc = __glXGetCurrentContext();
2230 const GLuint cmdlen = 8;
2231 emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
2232 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2233 gc->pc += cmdlen;
2234 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2235 (void) __glXFlushRenderBuffer(gc, gc->pc);
2236 }
2237 }
2238
2239 #define X_GLrop_Fogf 80
2240 void
2241 __indirect_glFogf(GLenum pname, GLfloat param)
2242 {
2243 __GLXcontext *const gc = __glXGetCurrentContext();
2244 const GLuint cmdlen = 12;
2245 emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
2246 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2247 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2248 gc->pc += cmdlen;
2249 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2250 (void) __glXFlushRenderBuffer(gc, gc->pc);
2251 }
2252 }
2253
2254 #define X_GLrop_Fogfv 81
2255 void
2256 __indirect_glFogfv(GLenum pname, const GLfloat * params)
2257 {
2258 __GLXcontext *const gc = __glXGetCurrentContext();
2259 const GLuint compsize = __glFogfv_size(pname);
2260 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2261 emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
2262 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2263 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2264 gc->pc += cmdlen;
2265 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2266 (void) __glXFlushRenderBuffer(gc, gc->pc);
2267 }
2268 }
2269
2270 #define X_GLrop_Fogi 82
2271 void
2272 __indirect_glFogi(GLenum pname, GLint param)
2273 {
2274 __GLXcontext *const gc = __glXGetCurrentContext();
2275 const GLuint cmdlen = 12;
2276 emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
2277 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2278 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2279 gc->pc += cmdlen;
2280 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2281 (void) __glXFlushRenderBuffer(gc, gc->pc);
2282 }
2283 }
2284
2285 #define X_GLrop_Fogiv 83
2286 void
2287 __indirect_glFogiv(GLenum pname, const GLint * params)
2288 {
2289 __GLXcontext *const gc = __glXGetCurrentContext();
2290 const GLuint compsize = __glFogiv_size(pname);
2291 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2292 emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
2293 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2294 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2295 gc->pc += cmdlen;
2296 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2297 (void) __glXFlushRenderBuffer(gc, gc->pc);
2298 }
2299 }
2300
2301 #define X_GLrop_FrontFace 84
2302 void
2303 __indirect_glFrontFace(GLenum mode)
2304 {
2305 __GLXcontext *const gc = __glXGetCurrentContext();
2306 const GLuint cmdlen = 8;
2307 emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
2308 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2309 gc->pc += cmdlen;
2310 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2311 (void) __glXFlushRenderBuffer(gc, gc->pc);
2312 }
2313 }
2314
2315 #define X_GLrop_Hint 85
2316 void
2317 __indirect_glHint(GLenum target, GLenum mode)
2318 {
2319 __GLXcontext *const gc = __glXGetCurrentContext();
2320 const GLuint cmdlen = 12;
2321 emit_header(gc->pc, X_GLrop_Hint, cmdlen);
2322 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2323 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2324 gc->pc += cmdlen;
2325 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2326 (void) __glXFlushRenderBuffer(gc, gc->pc);
2327 }
2328 }
2329
2330 #define X_GLrop_Lightf 86
2331 void
2332 __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
2333 {
2334 __GLXcontext *const gc = __glXGetCurrentContext();
2335 const GLuint cmdlen = 16;
2336 emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
2337 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2338 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2339 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2340 gc->pc += cmdlen;
2341 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2342 (void) __glXFlushRenderBuffer(gc, gc->pc);
2343 }
2344 }
2345
2346 #define X_GLrop_Lightfv 87
2347 void
2348 __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
2349 {
2350 __GLXcontext *const gc = __glXGetCurrentContext();
2351 const GLuint compsize = __glLightfv_size(pname);
2352 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2353 emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
2354 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2355 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2356 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2357 gc->pc += cmdlen;
2358 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2359 (void) __glXFlushRenderBuffer(gc, gc->pc);
2360 }
2361 }
2362
2363 #define X_GLrop_Lighti 88
2364 void
2365 __indirect_glLighti(GLenum light, GLenum pname, GLint param)
2366 {
2367 __GLXcontext *const gc = __glXGetCurrentContext();
2368 const GLuint cmdlen = 16;
2369 emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
2370 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2371 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2372 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2373 gc->pc += cmdlen;
2374 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2375 (void) __glXFlushRenderBuffer(gc, gc->pc);
2376 }
2377 }
2378
2379 #define X_GLrop_Lightiv 89
2380 void
2381 __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
2382 {
2383 __GLXcontext *const gc = __glXGetCurrentContext();
2384 const GLuint compsize = __glLightiv_size(pname);
2385 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2386 emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
2387 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2388 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2389 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2390 gc->pc += cmdlen;
2391 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2392 (void) __glXFlushRenderBuffer(gc, gc->pc);
2393 }
2394 }
2395
2396 #define X_GLrop_LightModelf 90
2397 void
2398 __indirect_glLightModelf(GLenum pname, GLfloat param)
2399 {
2400 __GLXcontext *const gc = __glXGetCurrentContext();
2401 const GLuint cmdlen = 12;
2402 emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
2403 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2404 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2405 gc->pc += cmdlen;
2406 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2407 (void) __glXFlushRenderBuffer(gc, gc->pc);
2408 }
2409 }
2410
2411 #define X_GLrop_LightModelfv 91
2412 void
2413 __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
2414 {
2415 __GLXcontext *const gc = __glXGetCurrentContext();
2416 const GLuint compsize = __glLightModelfv_size(pname);
2417 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2418 emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
2419 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2420 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2421 gc->pc += cmdlen;
2422 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2423 (void) __glXFlushRenderBuffer(gc, gc->pc);
2424 }
2425 }
2426
2427 #define X_GLrop_LightModeli 92
2428 void
2429 __indirect_glLightModeli(GLenum pname, GLint param)
2430 {
2431 __GLXcontext *const gc = __glXGetCurrentContext();
2432 const GLuint cmdlen = 12;
2433 emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
2434 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2435 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2436 gc->pc += cmdlen;
2437 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2438 (void) __glXFlushRenderBuffer(gc, gc->pc);
2439 }
2440 }
2441
2442 #define X_GLrop_LightModeliv 93
2443 void
2444 __indirect_glLightModeliv(GLenum pname, const GLint * params)
2445 {
2446 __GLXcontext *const gc = __glXGetCurrentContext();
2447 const GLuint compsize = __glLightModeliv_size(pname);
2448 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2449 emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
2450 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2451 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2452 gc->pc += cmdlen;
2453 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2454 (void) __glXFlushRenderBuffer(gc, gc->pc);
2455 }
2456 }
2457
2458 #define X_GLrop_LineStipple 94
2459 void
2460 __indirect_glLineStipple(GLint factor, GLushort pattern)
2461 {
2462 __GLXcontext *const gc = __glXGetCurrentContext();
2463 const GLuint cmdlen = 12;
2464 emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
2465 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
2466 (void) memcpy((void *) (gc->pc + 8), (void *) (&pattern), 2);
2467 gc->pc += cmdlen;
2468 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2469 (void) __glXFlushRenderBuffer(gc, gc->pc);
2470 }
2471 }
2472
2473 #define X_GLrop_LineWidth 95
2474 void
2475 __indirect_glLineWidth(GLfloat width)
2476 {
2477 __GLXcontext *const gc = __glXGetCurrentContext();
2478 const GLuint cmdlen = 8;
2479 emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
2480 (void) memcpy((void *) (gc->pc + 4), (void *) (&width), 4);
2481 gc->pc += cmdlen;
2482 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2483 (void) __glXFlushRenderBuffer(gc, gc->pc);
2484 }
2485 }
2486
2487 #define X_GLrop_Materialf 96
2488 void
2489 __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
2490 {
2491 __GLXcontext *const gc = __glXGetCurrentContext();
2492 const GLuint cmdlen = 16;
2493 emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
2494 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2495 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2496 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2497 gc->pc += cmdlen;
2498 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2499 (void) __glXFlushRenderBuffer(gc, gc->pc);
2500 }
2501 }
2502
2503 #define X_GLrop_Materialfv 97
2504 void
2505 __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
2506 {
2507 __GLXcontext *const gc = __glXGetCurrentContext();
2508 const GLuint compsize = __glMaterialfv_size(pname);
2509 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2510 emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
2511 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2512 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2513 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2514 gc->pc += cmdlen;
2515 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2516 (void) __glXFlushRenderBuffer(gc, gc->pc);
2517 }
2518 }
2519
2520 #define X_GLrop_Materiali 98
2521 void
2522 __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
2523 {
2524 __GLXcontext *const gc = __glXGetCurrentContext();
2525 const GLuint cmdlen = 16;
2526 emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
2527 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2528 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2529 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2530 gc->pc += cmdlen;
2531 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2532 (void) __glXFlushRenderBuffer(gc, gc->pc);
2533 }
2534 }
2535
2536 #define X_GLrop_Materialiv 99
2537 void
2538 __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
2539 {
2540 __GLXcontext *const gc = __glXGetCurrentContext();
2541 const GLuint compsize = __glMaterialiv_size(pname);
2542 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2543 emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
2544 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2545 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2546 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2547 gc->pc += cmdlen;
2548 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2549 (void) __glXFlushRenderBuffer(gc, gc->pc);
2550 }
2551 }
2552
2553 #define X_GLrop_PointSize 100
2554 void
2555 __indirect_glPointSize(GLfloat size)
2556 {
2557 __GLXcontext *const gc = __glXGetCurrentContext();
2558 const GLuint cmdlen = 8;
2559 emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
2560 (void) memcpy((void *) (gc->pc + 4), (void *) (&size), 4);
2561 gc->pc += cmdlen;
2562 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2563 (void) __glXFlushRenderBuffer(gc, gc->pc);
2564 }
2565 }
2566
2567 #define X_GLrop_PolygonMode 101
2568 void
2569 __indirect_glPolygonMode(GLenum face, GLenum mode)
2570 {
2571 __GLXcontext *const gc = __glXGetCurrentContext();
2572 const GLuint cmdlen = 12;
2573 emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
2574 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2575 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2576 gc->pc += cmdlen;
2577 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2578 (void) __glXFlushRenderBuffer(gc, gc->pc);
2579 }
2580 }
2581
2582 #define X_GLrop_PolygonStipple 102
2583 void
2584 __indirect_glPolygonStipple(const GLubyte * mask)
2585 {
2586 __GLXcontext *const gc = __glXGetCurrentContext();
2587 const GLuint compsize =
2588 (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
2589 0) : 0;
2590 const GLuint cmdlen = 24 + __GLX_PAD(compsize);
2591 emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
2592 if (compsize > 0) {
2593 (*gc->fillImage) (gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask,
2594 gc->pc + 24, gc->pc + 4);
2595 } else {
2596 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2597 default_pixel_store_2D_size);
2598 }
2599 gc->pc += cmdlen;
2600 if (gc->pc > gc->limit) {
2601 (void) __glXFlushRenderBuffer(gc, gc->pc);
2602 }
2603 }
2604
2605 #define X_GLrop_Scissor 103
2606 void
2607 __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
2608 {
2609 __GLXcontext *const gc = __glXGetCurrentContext();
2610 const GLuint cmdlen = 20;
2611 emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
2612 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2613 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2614 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
2615 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
2616 gc->pc += cmdlen;
2617 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2618 (void) __glXFlushRenderBuffer(gc, gc->pc);
2619 }
2620 }
2621
2622 #define X_GLrop_ShadeModel 104
2623 void
2624 __indirect_glShadeModel(GLenum mode)
2625 {
2626 __GLXcontext *const gc = __glXGetCurrentContext();
2627 const GLuint cmdlen = 8;
2628 emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
2629 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2630 gc->pc += cmdlen;
2631 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2632 (void) __glXFlushRenderBuffer(gc, gc->pc);
2633 }
2634 }
2635
2636 #define X_GLrop_TexParameterf 105
2637 void
2638 __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
2639 {
2640 __GLXcontext *const gc = __glXGetCurrentContext();
2641 const GLuint cmdlen = 16;
2642 emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
2643 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2644 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2645 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2646 gc->pc += cmdlen;
2647 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2648 (void) __glXFlushRenderBuffer(gc, gc->pc);
2649 }
2650 }
2651
2652 #define X_GLrop_TexParameterfv 106
2653 void
2654 __indirect_glTexParameterfv(GLenum target, GLenum pname,
2655 const GLfloat * params)
2656 {
2657 __GLXcontext *const gc = __glXGetCurrentContext();
2658 const GLuint compsize = __glTexParameterfv_size(pname);
2659 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2660 emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
2661 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2662 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2663 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2664 gc->pc += cmdlen;
2665 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2666 (void) __glXFlushRenderBuffer(gc, gc->pc);
2667 }
2668 }
2669
2670 #define X_GLrop_TexParameteri 107
2671 void
2672 __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
2673 {
2674 __GLXcontext *const gc = __glXGetCurrentContext();
2675 const GLuint cmdlen = 16;
2676 emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
2677 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2678 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2679 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2680 gc->pc += cmdlen;
2681 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2682 (void) __glXFlushRenderBuffer(gc, gc->pc);
2683 }
2684 }
2685
2686 #define X_GLrop_TexParameteriv 108
2687 void
2688 __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
2689 {
2690 __GLXcontext *const gc = __glXGetCurrentContext();
2691 const GLuint compsize = __glTexParameteriv_size(pname);
2692 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2693 emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
2694 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2695 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2696 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2697 gc->pc += cmdlen;
2698 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2699 (void) __glXFlushRenderBuffer(gc, gc->pc);
2700 }
2701 }
2702
2703 static void
2704 __glx_TexImage_1D2D(unsigned opcode, unsigned dim, GLenum target, GLint level,
2705 GLint internalformat, GLsizei width, GLsizei height,
2706 GLint border, GLenum format, GLenum type,
2707 const GLvoid * pixels)
2708 {
2709 __GLXcontext *const gc = __glXGetCurrentContext();
2710 const GLuint compsize =
2711 __glImageSize(width, height, 1, format, type, target);
2712 const GLuint cmdlen = 56 + __GLX_PAD(compsize);
2713 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
2714 if (cmdlen <= gc->maxSmallRenderCommandSize) {
2715 if ((gc->pc + cmdlen) > gc->bufEnd) {
2716 (void) __glXFlushRenderBuffer(gc, gc->pc);
2717 }
2718 emit_header(gc->pc, opcode, cmdlen);
2719 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
2720 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
2721 (void) memcpy((void *) (gc->pc + 32), (void *) (&internalformat),
2722 4);
2723 (void) memcpy((void *) (gc->pc + 36), (void *) (&width), 4);
2724 (void) memcpy((void *) (gc->pc + 40), (void *) (&height), 4);
2725 (void) memcpy((void *) (gc->pc + 44), (void *) (&border), 4);
2726 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
2727 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
2728 if ((compsize > 0) && (pixels != NULL)) {
2729 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
2730 pixels, gc->pc + 56, gc->pc + 4);
2731 } else {
2732 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2733 default_pixel_store_2D_size);
2734 }
2735 gc->pc += cmdlen;
2736 if (gc->pc > gc->limit) {
2737 (void) __glXFlushRenderBuffer(gc, gc->pc);
2738 }
2739 } else {
2740 const GLint op = opcode;
2741 const GLuint cmdlenLarge = cmdlen + 4;
2742 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
2743 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
2744 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
2745 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
2746 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
2747 (void) memcpy((void *) (pc + 36), (void *) (&internalformat), 4);
2748 (void) memcpy((void *) (pc + 40), (void *) (&width), 4);
2749 (void) memcpy((void *) (pc + 44), (void *) (&height), 4);
2750 (void) memcpy((void *) (pc + 48), (void *) (&border), 4);
2751 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
2752 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
2753 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
2754 type, pixels, pc + 60, pc + 8);
2755 }
2756 }
2757 }
2758
2759 #define X_GLrop_TexImage1D 109
2760 void
2761 __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat,
2762 GLsizei width, GLint border, GLenum format,
2763 GLenum type, const GLvoid * pixels)
2764 {
2765 __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat,
2766 width, 1, border, format, type, pixels);
2767 }
2768
2769 #define X_GLrop_TexImage2D 110
2770 void
2771 __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat,
2772 GLsizei width, GLsizei height, GLint border,
2773 GLenum format, GLenum type, const GLvoid * pixels)
2774 {
2775 __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat,
2776 width, height, border, format, type, pixels);
2777 }
2778
2779 #define X_GLrop_TexEnvf 111
2780 void
2781 __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
2782 {
2783 __GLXcontext *const gc = __glXGetCurrentContext();
2784 const GLuint cmdlen = 16;
2785 emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
2786 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2787 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2788 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2789 gc->pc += cmdlen;
2790 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2791 (void) __glXFlushRenderBuffer(gc, gc->pc);
2792 }
2793 }
2794
2795 #define X_GLrop_TexEnvfv 112
2796 void
2797 __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
2798 {
2799 __GLXcontext *const gc = __glXGetCurrentContext();
2800 const GLuint compsize = __glTexEnvfv_size(pname);
2801 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2802 emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
2803 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2804 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2805 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2806 gc->pc += cmdlen;
2807 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2808 (void) __glXFlushRenderBuffer(gc, gc->pc);
2809 }
2810 }
2811
2812 #define X_GLrop_TexEnvi 113
2813 void
2814 __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
2815 {
2816 __GLXcontext *const gc = __glXGetCurrentContext();
2817 const GLuint cmdlen = 16;
2818 emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
2819 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2820 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2821 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2822 gc->pc += cmdlen;
2823 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2824 (void) __glXFlushRenderBuffer(gc, gc->pc);
2825 }
2826 }
2827
2828 #define X_GLrop_TexEnviv 114
2829 void
2830 __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
2831 {
2832 __GLXcontext *const gc = __glXGetCurrentContext();
2833 const GLuint compsize = __glTexEnviv_size(pname);
2834 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2835 emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
2836 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2837 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2838 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2839 gc->pc += cmdlen;
2840 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2841 (void) __glXFlushRenderBuffer(gc, gc->pc);
2842 }
2843 }
2844
2845 #define X_GLrop_TexGend 115
2846 void
2847 __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
2848 {
2849 __GLXcontext *const gc = __glXGetCurrentContext();
2850 const GLuint cmdlen = 20;
2851 emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
2852 (void) memcpy((void *) (gc->pc + 4), (void *) (&param), 8);
2853 (void) memcpy((void *) (gc->pc + 12), (void *) (&coord), 4);
2854 (void) memcpy((void *) (gc->pc + 16), (void *) (&pname), 4);
2855 gc->pc += cmdlen;
2856 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2857 (void) __glXFlushRenderBuffer(gc, gc->pc);
2858 }
2859 }
2860
2861 #define X_GLrop_TexGendv 116
2862 void
2863 __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
2864 {
2865 __GLXcontext *const gc = __glXGetCurrentContext();
2866 const GLuint compsize = __glTexGendv_size(pname);
2867 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
2868 emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
2869 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2870 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2871 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 8));
2872 gc->pc += cmdlen;
2873 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2874 (void) __glXFlushRenderBuffer(gc, gc->pc);
2875 }
2876 }
2877
2878 #define X_GLrop_TexGenf 117
2879 void
2880 __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
2881 {
2882 __GLXcontext *const gc = __glXGetCurrentContext();
2883 const GLuint cmdlen = 16;
2884 emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
2885 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2886 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2887 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2888 gc->pc += cmdlen;
2889 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2890 (void) __glXFlushRenderBuffer(gc, gc->pc);
2891 }
2892 }
2893
2894 #define X_GLrop_TexGenfv 118
2895 void
2896 __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
2897 {
2898 __GLXcontext *const gc = __glXGetCurrentContext();
2899 const GLuint compsize = __glTexGenfv_size(pname);
2900 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2901 emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
2902 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2903 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2904 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2905 gc->pc += cmdlen;
2906 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2907 (void) __glXFlushRenderBuffer(gc, gc->pc);
2908 }
2909 }
2910
2911 #define X_GLrop_TexGeni 119
2912 void
2913 __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
2914 {
2915 __GLXcontext *const gc = __glXGetCurrentContext();
2916 const GLuint cmdlen = 16;
2917 emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
2918 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2919 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2920 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2921 gc->pc += cmdlen;
2922 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2923 (void) __glXFlushRenderBuffer(gc, gc->pc);
2924 }
2925 }
2926
2927 #define X_GLrop_TexGeniv 120
2928 void
2929 __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
2930 {
2931 __GLXcontext *const gc = __glXGetCurrentContext();
2932 const GLuint compsize = __glTexGeniv_size(pname);
2933 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2934 emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
2935 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2936 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2937 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2938 gc->pc += cmdlen;
2939 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2940 (void) __glXFlushRenderBuffer(gc, gc->pc);
2941 }
2942 }
2943
2944 #define X_GLrop_InitNames 121
2945 void
2946 __indirect_glInitNames(void)
2947 {
2948 __GLXcontext *const gc = __glXGetCurrentContext();
2949 const GLuint cmdlen = 4;
2950 emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
2951 gc->pc += cmdlen;
2952 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2953 (void) __glXFlushRenderBuffer(gc, gc->pc);
2954 }
2955 }
2956
2957 #define X_GLrop_LoadName 122
2958 void
2959 __indirect_glLoadName(GLuint name)
2960 {
2961 __GLXcontext *const gc = __glXGetCurrentContext();
2962 const GLuint cmdlen = 8;
2963 emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
2964 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
2965 gc->pc += cmdlen;
2966 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2967 (void) __glXFlushRenderBuffer(gc, gc->pc);
2968 }
2969 }
2970
2971 #define X_GLrop_PassThrough 123
2972 void
2973 __indirect_glPassThrough(GLfloat token)
2974 {
2975 __GLXcontext *const gc = __glXGetCurrentContext();
2976 const GLuint cmdlen = 8;
2977 emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
2978 (void) memcpy((void *) (gc->pc + 4), (void *) (&token), 4);
2979 gc->pc += cmdlen;
2980 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2981 (void) __glXFlushRenderBuffer(gc, gc->pc);
2982 }
2983 }
2984
2985 #define X_GLrop_PopName 124
2986 void
2987 __indirect_glPopName(void)
2988 {
2989 __GLXcontext *const gc = __glXGetCurrentContext();
2990 const GLuint cmdlen = 4;
2991 emit_header(gc->pc, X_GLrop_PopName, cmdlen);
2992 gc->pc += cmdlen;
2993 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2994 (void) __glXFlushRenderBuffer(gc, gc->pc);
2995 }
2996 }
2997
2998 #define X_GLrop_PushName 125
2999 void
3000 __indirect_glPushName(GLuint name)
3001 {
3002 __GLXcontext *const gc = __glXGetCurrentContext();
3003 const GLuint cmdlen = 8;
3004 emit_header(gc->pc, X_GLrop_PushName, cmdlen);
3005 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
3006 gc->pc += cmdlen;
3007 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3008 (void) __glXFlushRenderBuffer(gc, gc->pc);
3009 }
3010 }
3011
3012 #define X_GLrop_DrawBuffer 126
3013 void
3014 __indirect_glDrawBuffer(GLenum mode)
3015 {
3016 __GLXcontext *const gc = __glXGetCurrentContext();
3017 const GLuint cmdlen = 8;
3018 emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
3019 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3020 gc->pc += cmdlen;
3021 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3022 (void) __glXFlushRenderBuffer(gc, gc->pc);
3023 }
3024 }
3025
3026 #define X_GLrop_Clear 127
3027 void
3028 __indirect_glClear(GLbitfield mask)
3029 {
3030 __GLXcontext *const gc = __glXGetCurrentContext();
3031 const GLuint cmdlen = 8;
3032 emit_header(gc->pc, X_GLrop_Clear, cmdlen);
3033 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3034 gc->pc += cmdlen;
3035 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3036 (void) __glXFlushRenderBuffer(gc, gc->pc);
3037 }
3038 }
3039
3040 #define X_GLrop_ClearAccum 128
3041 void
3042 __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue,
3043 GLfloat alpha)
3044 {
3045 __GLXcontext *const gc = __glXGetCurrentContext();
3046 const GLuint cmdlen = 20;
3047 emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
3048 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3049 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3050 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3051 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3052 gc->pc += cmdlen;
3053 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3054 (void) __glXFlushRenderBuffer(gc, gc->pc);
3055 }
3056 }
3057
3058 #define X_GLrop_ClearIndex 129
3059 void
3060 __indirect_glClearIndex(GLfloat c)
3061 {
3062 __GLXcontext *const gc = __glXGetCurrentContext();
3063 const GLuint cmdlen = 8;
3064 emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
3065 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
3066 gc->pc += cmdlen;
3067 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3068 (void) __glXFlushRenderBuffer(gc, gc->pc);
3069 }
3070 }
3071
3072 #define X_GLrop_ClearColor 130
3073 void
3074 __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue,
3075 GLclampf alpha)
3076 {
3077 __GLXcontext *const gc = __glXGetCurrentContext();
3078 const GLuint cmdlen = 20;
3079 emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
3080 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3081 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3082 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3083 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3084 gc->pc += cmdlen;
3085 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3086 (void) __glXFlushRenderBuffer(gc, gc->pc);
3087 }
3088 }
3089
3090 #define X_GLrop_ClearStencil 131
3091 void
3092 __indirect_glClearStencil(GLint s)
3093 {
3094 __GLXcontext *const gc = __glXGetCurrentContext();
3095 const GLuint cmdlen = 8;
3096 emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
3097 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
3098 gc->pc += cmdlen;
3099 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3100 (void) __glXFlushRenderBuffer(gc, gc->pc);
3101 }
3102 }
3103
3104 #define X_GLrop_ClearDepth 132
3105 void
3106 __indirect_glClearDepth(GLclampd depth)
3107 {
3108 __GLXcontext *const gc = __glXGetCurrentContext();
3109 const GLuint cmdlen = 12;
3110 emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
3111 (void) memcpy((void *) (gc->pc + 4), (void *) (&depth), 8);
3112 gc->pc += cmdlen;
3113 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3114 (void) __glXFlushRenderBuffer(gc, gc->pc);
3115 }
3116 }
3117
3118 #define X_GLrop_StencilMask 133
3119 void
3120 __indirect_glStencilMask(GLuint mask)
3121 {
3122 __GLXcontext *const gc = __glXGetCurrentContext();
3123 const GLuint cmdlen = 8;
3124 emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
3125 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3126 gc->pc += cmdlen;
3127 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3128 (void) __glXFlushRenderBuffer(gc, gc->pc);
3129 }
3130 }
3131
3132 #define X_GLrop_ColorMask 134
3133 void
3134 __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue,
3135 GLboolean alpha)
3136 {
3137 __GLXcontext *const gc = __glXGetCurrentContext();
3138 const GLuint cmdlen = 8;
3139 emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
3140 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
3141 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
3142 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
3143 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
3144 gc->pc += cmdlen;
3145 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3146 (void) __glXFlushRenderBuffer(gc, gc->pc);
3147 }
3148 }
3149
3150 #define X_GLrop_DepthMask 135
3151 void
3152 __indirect_glDepthMask(GLboolean flag)
3153 {
3154 __GLXcontext *const gc = __glXGetCurrentContext();
3155 const GLuint cmdlen = 8;
3156 emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
3157 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
3158 gc->pc += cmdlen;
3159 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3160 (void) __glXFlushRenderBuffer(gc, gc->pc);
3161 }
3162 }
3163
3164 #define X_GLrop_IndexMask 136
3165 void
3166 __indirect_glIndexMask(GLuint mask)
3167 {
3168 __GLXcontext *const gc = __glXGetCurrentContext();
3169 const GLuint cmdlen = 8;
3170 emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
3171 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3172 gc->pc += cmdlen;
3173 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3174 (void) __glXFlushRenderBuffer(gc, gc->pc);
3175 }
3176 }
3177
3178 #define X_GLrop_Accum 137
3179 void
3180 __indirect_glAccum(GLenum op, GLfloat value)
3181 {
3182 __GLXcontext *const gc = __glXGetCurrentContext();
3183 const GLuint cmdlen = 12;
3184 emit_header(gc->pc, X_GLrop_Accum, cmdlen);
3185 (void) memcpy((void *) (gc->pc + 4), (void *) (&op), 4);
3186 (void) memcpy((void *) (gc->pc + 8), (void *) (&value), 4);
3187 gc->pc += cmdlen;
3188 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3189 (void) __glXFlushRenderBuffer(gc, gc->pc);
3190 }
3191 }
3192
3193 #define X_GLrop_PopAttrib 141
3194 void
3195 __indirect_glPopAttrib(void)
3196 {
3197 __GLXcontext *const gc = __glXGetCurrentContext();
3198 const GLuint cmdlen = 4;
3199 emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
3200 gc->pc += cmdlen;
3201 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3202 (void) __glXFlushRenderBuffer(gc, gc->pc);
3203 }
3204 }
3205
3206 #define X_GLrop_PushAttrib 142
3207 void
3208 __indirect_glPushAttrib(GLbitfield mask)
3209 {
3210 __GLXcontext *const gc = __glXGetCurrentContext();
3211 const GLuint cmdlen = 8;
3212 emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
3213 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3214 gc->pc += cmdlen;
3215 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3216 (void) __glXFlushRenderBuffer(gc, gc->pc);
3217 }
3218 }
3219
3220 #define X_GLrop_MapGrid1d 147
3221 void
3222 __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
3223 {
3224 __GLXcontext *const gc = __glXGetCurrentContext();
3225 const GLuint cmdlen = 24;
3226 emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
3227 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3228 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3229 (void) memcpy((void *) (gc->pc + 20), (void *) (&un), 4);
3230 gc->pc += cmdlen;
3231 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3232 (void) __glXFlushRenderBuffer(gc, gc->pc);
3233 }
3234 }
3235
3236 #define X_GLrop_MapGrid1f 148
3237 void
3238 __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
3239 {
3240 __GLXcontext *const gc = __glXGetCurrentContext();
3241 const GLuint cmdlen = 16;
3242 emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
3243 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3244 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3245 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3246 gc->pc += cmdlen;
3247 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3248 (void) __glXFlushRenderBuffer(gc, gc->pc);
3249 }
3250 }
3251
3252 #define X_GLrop_MapGrid2d 149
3253 void
3254 __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn,
3255 GLdouble v1, GLdouble v2)
3256 {
3257 __GLXcontext *const gc = __glXGetCurrentContext();
3258 const GLuint cmdlen = 44;
3259 emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
3260 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3261 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3262 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 8);
3263 (void) memcpy((void *) (gc->pc + 28), (void *) (&v2), 8);
3264 (void) memcpy((void *) (gc->pc + 36), (void *) (&un), 4);
3265 (void) memcpy((void *) (gc->pc + 40), (void *) (&vn), 4);
3266 gc->pc += cmdlen;
3267 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3268 (void) __glXFlushRenderBuffer(gc, gc->pc);
3269 }
3270 }
3271
3272 #define X_GLrop_MapGrid2f 150
3273 void
3274 __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
3275 GLfloat v2)
3276 {
3277 __GLXcontext *const gc = __glXGetCurrentContext();
3278 const GLuint cmdlen = 28;
3279 emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
3280 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3281 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3282 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3283 (void) memcpy((void *) (gc->pc + 16), (void *) (&vn), 4);
3284 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 4);
3285 (void) memcpy((void *) (gc->pc + 24), (void *) (&v2), 4);
3286 gc->pc += cmdlen;
3287 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3288 (void) __glXFlushRenderBuffer(gc, gc->pc);
3289 }
3290 }
3291
3292 #define X_GLrop_EvalCoord1dv 151
3293 void
3294 __indirect_glEvalCoord1d(GLdouble u)
3295 {
3296 __GLXcontext *const gc = __glXGetCurrentContext();
3297 const GLuint cmdlen = 12;
3298 emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
3299 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3300 gc->pc += cmdlen;
3301 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3302 (void) __glXFlushRenderBuffer(gc, gc->pc);
3303 }
3304 }
3305
3306 #define X_GLrop_EvalCoord1dv 151
3307 void
3308 __indirect_glEvalCoord1dv(const GLdouble * u)
3309 {
3310 generic_8_byte(X_GLrop_EvalCoord1dv, u);
3311 }
3312
3313 #define X_GLrop_EvalCoord1fv 152
3314 void
3315 __indirect_glEvalCoord1f(GLfloat u)
3316 {
3317 __GLXcontext *const gc = __glXGetCurrentContext();
3318 const GLuint cmdlen = 8;
3319 emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
3320 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3321 gc->pc += cmdlen;
3322 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3323 (void) __glXFlushRenderBuffer(gc, gc->pc);
3324 }
3325 }
3326
3327 #define X_GLrop_EvalCoord1fv 152
3328 void
3329 __indirect_glEvalCoord1fv(const GLfloat * u)
3330 {
3331 generic_4_byte(X_GLrop_EvalCoord1fv, u);
3332 }
3333
3334 #define X_GLrop_EvalCoord2dv 153
3335 void
3336 __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
3337 {
3338 __GLXcontext *const gc = __glXGetCurrentContext();
3339 const GLuint cmdlen = 20;
3340 emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
3341 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3342 (void) memcpy((void *) (gc->pc + 12), (void *) (&v), 8);
3343 gc->pc += cmdlen;
3344 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3345 (void) __glXFlushRenderBuffer(gc, gc->pc);
3346 }
3347 }
3348
3349 #define X_GLrop_EvalCoord2dv 153
3350 void
3351 __indirect_glEvalCoord2dv(const GLdouble * u)
3352 {
3353 generic_16_byte(X_GLrop_EvalCoord2dv, u);
3354 }
3355
3356 #define X_GLrop_EvalCoord2fv 154
3357 void
3358 __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
3359 {
3360 __GLXcontext *const gc = __glXGetCurrentContext();
3361 const GLuint cmdlen = 12;
3362 emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
3363 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3364 (void) memcpy((void *) (gc->pc + 8), (void *) (&v), 4);
3365 gc->pc += cmdlen;
3366 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3367 (void) __glXFlushRenderBuffer(gc, gc->pc);
3368 }
3369 }
3370
3371 #define X_GLrop_EvalCoord2fv 154
3372 void
3373 __indirect_glEvalCoord2fv(const GLfloat * u)
3374 {
3375 generic_8_byte(X_GLrop_EvalCoord2fv, u);
3376 }
3377
3378 #define X_GLrop_EvalMesh1 155
3379 void
3380 __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
3381 {
3382 __GLXcontext *const gc = __glXGetCurrentContext();
3383 const GLuint cmdlen = 16;
3384 emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
3385 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3386 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3387 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3388 gc->pc += cmdlen;
3389 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3390 (void) __glXFlushRenderBuffer(gc, gc->pc);
3391 }
3392 }
3393
3394 #define X_GLrop_EvalPoint1 156
3395 void
3396 __indirect_glEvalPoint1(GLint i)
3397 {
3398 __GLXcontext *const gc = __glXGetCurrentContext();
3399 const GLuint cmdlen = 8;
3400 emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
3401 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3402 gc->pc += cmdlen;
3403 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3404 (void) __glXFlushRenderBuffer(gc, gc->pc);
3405 }
3406 }
3407
3408 #define X_GLrop_EvalMesh2 157
3409 void
3410 __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
3411 {
3412 __GLXcontext *const gc = __glXGetCurrentContext();
3413 const GLuint cmdlen = 24;
3414 emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
3415 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3416 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3417 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3418 (void) memcpy((void *) (gc->pc + 16), (void *) (&j1), 4);
3419 (void) memcpy((void *) (gc->pc + 20), (void *) (&j2), 4);
3420 gc->pc += cmdlen;
3421 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3422 (void) __glXFlushRenderBuffer(gc, gc->pc);
3423 }
3424 }
3425
3426 #define X_GLrop_EvalPoint2 158
3427 void
3428 __indirect_glEvalPoint2(GLint i, GLint j)
3429 {
3430 __GLXcontext *const gc = __glXGetCurrentContext();
3431 const GLuint cmdlen = 12;
3432 emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
3433 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3434 (void) memcpy((void *) (gc->pc + 8), (void *) (&j), 4);
3435 gc->pc += cmdlen;
3436 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3437 (void) __glXFlushRenderBuffer(gc, gc->pc);
3438 }
3439 }
3440
3441 #define X_GLrop_AlphaFunc 159
3442 void
3443 __indirect_glAlphaFunc(GLenum func, GLclampf ref)
3444 {
3445 __GLXcontext *const gc = __glXGetCurrentContext();
3446 const GLuint cmdlen = 12;
3447 emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
3448 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3449 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3450 gc->pc += cmdlen;
3451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3452 (void) __glXFlushRenderBuffer(gc, gc->pc);
3453 }
3454 }
3455
3456 #define X_GLrop_BlendFunc 160
3457 void
3458 __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
3459 {
3460 __GLXcontext *const gc = __glXGetCurrentContext();
3461 const GLuint cmdlen = 12;
3462 emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
3463 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactor), 4);
3464 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactor), 4);
3465 gc->pc += cmdlen;
3466 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3467 (void) __glXFlushRenderBuffer(gc, gc->pc);
3468 }
3469 }
3470
3471 #define X_GLrop_LogicOp 161
3472 void
3473 __indirect_glLogicOp(GLenum opcode)
3474 {
3475 __GLXcontext *const gc = __glXGetCurrentContext();
3476 const GLuint cmdlen = 8;
3477 emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
3478 (void) memcpy((void *) (gc->pc + 4), (void *) (&opcode), 4);
3479 gc->pc += cmdlen;
3480 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3481 (void) __glXFlushRenderBuffer(gc, gc->pc);
3482 }
3483 }
3484
3485 #define X_GLrop_StencilFunc 162
3486 void
3487 __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
3488 {
3489 __GLXcontext *const gc = __glXGetCurrentContext();
3490 const GLuint cmdlen = 16;
3491 emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
3492 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3493 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3494 (void) memcpy((void *) (gc->pc + 12), (void *) (&mask), 4);
3495 gc->pc += cmdlen;
3496 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3497 (void) __glXFlushRenderBuffer(gc, gc->pc);
3498 }
3499 }
3500
3501 #define X_GLrop_StencilOp 163
3502 void
3503 __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
3504 {
3505 __GLXcontext *const gc = __glXGetCurrentContext();
3506 const GLuint cmdlen = 16;
3507 emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
3508 (void) memcpy((void *) (gc->pc + 4), (void *) (&fail), 4);
3509 (void) memcpy((void *) (gc->pc + 8), (void *) (&zfail), 4);
3510 (void) memcpy((void *) (gc->pc + 12), (void *) (&zpass), 4);
3511 gc->pc += cmdlen;
3512 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3513 (void) __glXFlushRenderBuffer(gc, gc->pc);
3514 }
3515 }
3516
3517 #define X_GLrop_DepthFunc 164
3518 void
3519 __indirect_glDepthFunc(GLenum func)
3520 {
3521 __GLXcontext *const gc = __glXGetCurrentContext();
3522 const GLuint cmdlen = 8;
3523 emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
3524 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3525 gc->pc += cmdlen;
3526 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3527 (void) __glXFlushRenderBuffer(gc, gc->pc);
3528 }
3529 }
3530
3531 #define X_GLrop_PixelZoom 165
3532 void
3533 __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
3534 {
3535 __GLXcontext *const gc = __glXGetCurrentContext();
3536 const GLuint cmdlen = 12;
3537 emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
3538 (void) memcpy((void *) (gc->pc + 4), (void *) (&xfactor), 4);
3539 (void) memcpy((void *) (gc->pc + 8), (void *) (&yfactor), 4);
3540 gc->pc += cmdlen;
3541 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3542 (void) __glXFlushRenderBuffer(gc, gc->pc);
3543 }
3544 }
3545
3546 #define X_GLrop_PixelTransferf 166
3547 void
3548 __indirect_glPixelTransferf(GLenum pname, GLfloat param)
3549 {
3550 __GLXcontext *const gc = __glXGetCurrentContext();
3551 const GLuint cmdlen = 12;
3552 emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
3553 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3554 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3555 gc->pc += cmdlen;
3556 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3557 (void) __glXFlushRenderBuffer(gc, gc->pc);
3558 }
3559 }
3560
3561 #define X_GLrop_PixelTransferi 167
3562 void
3563 __indirect_glPixelTransferi(GLenum pname, GLint param)
3564 {
3565 __GLXcontext *const gc = __glXGetCurrentContext();
3566 const GLuint cmdlen = 12;
3567 emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
3568 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3569 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3570 gc->pc += cmdlen;
3571 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3572 (void) __glXFlushRenderBuffer(gc, gc->pc);
3573 }
3574 }
3575
3576 #define X_GLrop_PixelMapfv 168
3577 void
3578 __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
3579 {
3580 __GLXcontext *const gc = __glXGetCurrentContext();
3581 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3582 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3583 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3584 if ((gc->pc + cmdlen) > gc->bufEnd) {
3585 (void) __glXFlushRenderBuffer(gc, gc->pc);
3586 }
3587 emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
3588 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3589 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3590 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3591 (mapsize * 4));
3592 gc->pc += cmdlen;
3593 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3594 (void) __glXFlushRenderBuffer(gc, gc->pc);
3595 }
3596 } else {
3597 const GLint op = X_GLrop_PixelMapfv;
3598 const GLuint cmdlenLarge = cmdlen + 4;
3599 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3600 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3601 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3602 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3603 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3604 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3605 }
3606 }
3607 }
3608
3609 #define X_GLrop_PixelMapuiv 169
3610 void
3611 __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
3612 {
3613 __GLXcontext *const gc = __glXGetCurrentContext();
3614 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3615 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3616 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3617 if ((gc->pc + cmdlen) > gc->bufEnd) {
3618 (void) __glXFlushRenderBuffer(gc, gc->pc);
3619 }
3620 emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
3621 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3622 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3623 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3624 (mapsize * 4));
3625 gc->pc += cmdlen;
3626 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3627 (void) __glXFlushRenderBuffer(gc, gc->pc);
3628 }
3629 } else {
3630 const GLint op = X_GLrop_PixelMapuiv;
3631 const GLuint cmdlenLarge = cmdlen + 4;
3632 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3633 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3634 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3635 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3636 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3637 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3638 }
3639 }
3640 }
3641
3642 #define X_GLrop_PixelMapusv 170
3643 void
3644 __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
3645 {
3646 __GLXcontext *const gc = __glXGetCurrentContext();
3647 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
3648 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3649 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3650 if ((gc->pc + cmdlen) > gc->bufEnd) {
3651 (void) __glXFlushRenderBuffer(gc, gc->pc);
3652 }
3653 emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
3654 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3655 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3656 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3657 (mapsize * 2));
3658 gc->pc += cmdlen;
3659 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3660 (void) __glXFlushRenderBuffer(gc, gc->pc);
3661 }
3662 } else {
3663 const GLint op = X_GLrop_PixelMapusv;
3664 const GLuint cmdlenLarge = cmdlen + 4;
3665 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3666 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3667 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3668 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3669 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3670 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
3671 }
3672 }
3673 }
3674
3675 #define X_GLrop_ReadBuffer 171
3676 void
3677 __indirect_glReadBuffer(GLenum mode)
3678 {
3679 __GLXcontext *const gc = __glXGetCurrentContext();
3680 const GLuint cmdlen = 8;
3681 emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
3682 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3683 gc->pc += cmdlen;
3684 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3685 (void) __glXFlushRenderBuffer(gc, gc->pc);
3686 }
3687 }
3688
3689 #define X_GLrop_CopyPixels 172
3690 void
3691 __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3692 GLenum type)
3693 {
3694 __GLXcontext *const gc = __glXGetCurrentContext();
3695 const GLuint cmdlen = 24;
3696 emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
3697 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
3698 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
3699 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
3700 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
3701 (void) memcpy((void *) (gc->pc + 20), (void *) (&type), 4);
3702 gc->pc += cmdlen;
3703 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3704 (void) __glXFlushRenderBuffer(gc, gc->pc);
3705 }
3706 }
3707
3708 #define X_GLsop_ReadPixels 111
3709 void
3710 __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3711 GLenum format, GLenum type, GLvoid * pixels)
3712 {
3713 __GLXcontext *const gc = __glXGetCurrentContext();
3714 const __GLXattribute *const state = gc->client_state_private;
3715 Display *const dpy = gc->currentDpy;
3716 const GLuint cmdlen = 28;
3717 if (__builtin_expect(dpy != NULL, 1)) {
3718 #ifdef USE_XCB
3719 xcb_connection_t *c = XGetXCBConnection(dpy);
3720 (void) __glXFlushRenderBuffer(gc, gc->pc);
3721 xcb_glx_read_pixels_reply_t *reply =
3722 xcb_glx_read_pixels_reply(c,
3723 xcb_glx_read_pixels(c,
3724 gc->
3725 currentContextTag,
3726 x, y, width, height,
3727 format, type,
3728 state->storePack.
3729 swapEndian, 0),
3730 NULL);
3731 (void) memcpy(pixels, xcb_glx_read_pixels_data(reply),
3732 xcb_glx_read_pixels_data_length(reply) *
3733 sizeof(GLvoid));
3734 free(reply);
3735 #else
3736 GLubyte const *pc =
3737 __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
3738 (void) memcpy((void *) (pc + 0), (void *) (&x), 4);
3739 (void) memcpy((void *) (pc + 4), (void *) (&y), 4);
3740 (void) memcpy((void *) (pc + 8), (void *) (&width), 4);
3741 (void) memcpy((void *) (pc + 12), (void *) (&height), 4);
3742 (void) memcpy((void *) (pc + 16), (void *) (&format), 4);
3743 (void) memcpy((void *) (pc + 20), (void *) (&type), 4);
3744 *(int32_t *) (pc + 24) = 0;
3745 *(int8_t *) (pc + 24) = state->storePack.swapEndian;
3746 __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type,
3747 pixels, GL_FALSE);
3748 UnlockDisplay(dpy);
3749 SyncHandle();
3750 #endif /* USE_XCB */
3751 }
3752 return;
3753 }
3754
3755 #define X_GLrop_DrawPixels 173
3756 void
3757 __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format,
3758 GLenum type, const GLvoid * pixels)
3759 {
3760 __GLXcontext *const gc = __glXGetCurrentContext();
3761 const GLuint compsize =
3762 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
3763 0) : 0;
3764 const GLuint cmdlen = 40 + __GLX_PAD(compsize);
3765 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
3766 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3767 if ((gc->pc + cmdlen) > gc->bufEnd) {
3768 (void) __glXFlushRenderBuffer(gc, gc->pc);
3769 }
3770 emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
3771 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
3772 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
3773 (void) memcpy((void *) (gc->pc + 32), (void *) (&format), 4);
3774 (void) memcpy((void *) (gc->pc + 36), (void *) (&type), 4);
3775 if (compsize > 0) {
3776 (*gc->fillImage) (gc, 2, width, height, 1, format, type,
3777 pixels, gc->pc + 40, gc->pc + 4);
3778 } else {
3779 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
3780 default_pixel_store_2D_size);
3781 }
3782 gc->pc += cmdlen;
3783 if (gc->pc > gc->limit) {
3784 (void) __glXFlushRenderBuffer(gc, gc->pc);
3785 }
3786 } else {
3787 const GLint op = X_GLrop_DrawPixels;
3788 const GLuint cmdlenLarge = cmdlen + 4;
3789 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3790 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3791 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3792 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
3793 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
3794 (void) memcpy((void *) (pc + 36), (void *) (&format), 4);
3795 (void) memcpy((void *) (pc + 40), (void *) (&type), 4);
3796 __glXSendLargeImage(gc, compsize, 2, width, height, 1, format,
3797 type, pixels, pc + 44, pc + 8);
3798 }
3799 }
3800 }
3801
3802 #define X_GLsop_GetClipPlane 113
3803 void
3804 __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
3805 {
3806 __GLXcontext *const gc = __glXGetCurrentContext();
3807 Display *const dpy = gc->currentDpy;
3808 const GLuint cmdlen = 4;
3809 if (__builtin_expect(dpy != NULL, 1)) {
3810 #ifdef USE_XCB
3811 xcb_connection_t *c = XGetXCBConnection(dpy);
3812 (void) __glXFlushRenderBuffer(gc, gc->pc);
3813 xcb_glx_get_clip_plane_reply_t *reply =
3814 xcb_glx_get_clip_plane_reply(c,
3815 xcb_glx_get_clip_plane(c,
3816 gc->
3817 currentContextTag,
3818 plane), NULL);
3819 (void) memcpy(equation, xcb_glx_get_clip_plane_data(reply),
3820 xcb_glx_get_clip_plane_data_length(reply) *
3821 sizeof(GLdouble));
3822 free(reply);
3823 #else
3824 GLubyte const *pc =
3825 __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
3826 (void) memcpy((void *) (pc + 0), (void *) (&plane), 4);
3827 (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
3828 UnlockDisplay(dpy);
3829 SyncHandle();
3830 #endif /* USE_XCB */
3831 }
3832 return;
3833 }
3834
3835 #define X_GLsop_GetLightfv 118
3836 void
3837 __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
3838 {
3839 __GLXcontext *const gc = __glXGetCurrentContext();
3840 Display *const dpy = gc->currentDpy;
3841 const GLuint cmdlen = 8;
3842 if (__builtin_expect(dpy != NULL, 1)) {
3843 #ifdef USE_XCB
3844 xcb_connection_t *c = XGetXCBConnection(dpy);
3845 (void) __glXFlushRenderBuffer(gc, gc->pc);
3846 xcb_glx_get_lightfv_reply_t *reply =
3847 xcb_glx_get_lightfv_reply(c,
3848 xcb_glx_get_lightfv(c,
3849 gc->
3850 currentContextTag,
3851 light, pname),
3852 NULL);
3853 if (xcb_glx_get_lightfv_data_length(reply) == 0)
3854 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3855 else
3856 (void) memcpy(params, xcb_glx_get_lightfv_data(reply),
3857 xcb_glx_get_lightfv_data_length(reply) *
3858 sizeof(GLfloat));
3859 free(reply);
3860 #else
3861 GLubyte const *pc =
3862 __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
3863 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3864 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3865 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3866 UnlockDisplay(dpy);
3867 SyncHandle();
3868 #endif /* USE_XCB */
3869 }
3870 return;
3871 }
3872
3873 #define X_GLsop_GetLightiv 119
3874 void
3875 __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
3876 {
3877 __GLXcontext *const gc = __glXGetCurrentContext();
3878 Display *const dpy = gc->currentDpy;
3879 const GLuint cmdlen = 8;
3880 if (__builtin_expect(dpy != NULL, 1)) {
3881 #ifdef USE_XCB
3882 xcb_connection_t *c = XGetXCBConnection(dpy);
3883 (void) __glXFlushRenderBuffer(gc, gc->pc);
3884 xcb_glx_get_lightiv_reply_t *reply =
3885 xcb_glx_get_lightiv_reply(c,
3886 xcb_glx_get_lightiv(c,
3887 gc->
3888 currentContextTag,
3889 light, pname),
3890 NULL);
3891 if (xcb_glx_get_lightiv_data_length(reply) == 0)
3892 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3893 else
3894 (void) memcpy(params, xcb_glx_get_lightiv_data(reply),
3895 xcb_glx_get_lightiv_data_length(reply) *
3896 sizeof(GLint));
3897 free(reply);
3898 #else
3899 GLubyte const *pc =
3900 __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
3901 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3902 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3903 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3904 UnlockDisplay(dpy);
3905 SyncHandle();
3906 #endif /* USE_XCB */
3907 }
3908 return;
3909 }
3910
3911 #define X_GLsop_GetMapdv 120
3912 void
3913 __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
3914 {
3915 __GLXcontext *const gc = __glXGetCurrentContext();
3916 Display *const dpy = gc->currentDpy;
3917 const GLuint cmdlen = 8;
3918 if (__builtin_expect(dpy != NULL, 1)) {
3919 #ifdef USE_XCB
3920 xcb_connection_t *c = XGetXCBConnection(dpy);
3921 (void) __glXFlushRenderBuffer(gc, gc->pc);
3922 xcb_glx_get_mapdv_reply_t *reply =
3923 xcb_glx_get_mapdv_reply(c,
3924 xcb_glx_get_mapdv(c,
3925 gc->currentContextTag,
3926 target, query), NULL);
3927 if (xcb_glx_get_mapdv_data_length(reply) == 0)
3928 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3929 else
3930 (void) memcpy(v, xcb_glx_get_mapdv_data(reply),
3931 xcb_glx_get_mapdv_data_length(reply) *
3932 sizeof(GLdouble));
3933 free(reply);
3934 #else
3935 GLubyte const *pc =
3936 __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
3937 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
3938 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3939 (void) __glXReadReply(dpy, 8, v, GL_FALSE);
3940 UnlockDisplay(dpy);
3941 SyncHandle();
3942 #endif /* USE_XCB */
3943 }
3944 return;
3945 }
3946
3947 #define X_GLsop_GetMapfv 121
3948 void
3949 __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
3950 {
3951 __GLXcontext *const gc = __glXGetCurrentContext();
3952 Display *const dpy = gc->currentDpy;
3953 const GLuint cmdlen = 8;
3954 if (__builtin_expect(dpy != NULL, 1)) {
3955 #ifdef USE_XCB
3956 xcb_connection_t *c = XGetXCBConnection(dpy);
3957 (void) __glXFlushRenderBuffer(gc, gc->pc);
3958 xcb_glx_get_mapfv_reply_t *reply =
3959 xcb_glx_get_mapfv_reply(c,
3960 xcb_glx_get_mapfv(c,
3961 gc->currentContextTag,
3962 target, query), NULL);
3963 if (xcb_glx_get_mapfv_data_length(reply) == 0)
3964 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3965 else
3966 (void) memcpy(v, xcb_glx_get_mapfv_data(reply),
3967 xcb_glx_get_mapfv_data_length(reply) *
3968 sizeof(GLfloat));
3969 free(reply);
3970 #else
3971 GLubyte const *pc =
3972 __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
3973 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
3974 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3975 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
3976 UnlockDisplay(dpy);
3977 SyncHandle();
3978 #endif /* USE_XCB */
3979 }
3980 return;
3981 }
3982
3983 #define X_GLsop_GetMapiv 122
3984 void
3985 __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
3986 {
3987 __GLXcontext *const gc = __glXGetCurrentContext();
3988 Display *const dpy = gc->currentDpy;
3989 const GLuint cmdlen = 8;
3990 if (__builtin_expect(dpy != NULL, 1)) {
3991 #ifdef USE_XCB
3992 xcb_connection_t *c = XGetXCBConnection(dpy);
3993 (void) __glXFlushRenderBuffer(gc, gc->pc);
3994 xcb_glx_get_mapiv_reply_t *reply =
3995 xcb_glx_get_mapiv_reply(c,
3996 xcb_glx_get_mapiv(c,
3997 gc->currentContextTag,
3998 target, query), NULL);
3999 if (xcb_glx_get_mapiv_data_length(reply) == 0)
4000 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4001 else
4002 (void) memcpy(v, xcb_glx_get_mapiv_data(reply),
4003 xcb_glx_get_mapiv_data_length(reply) *
4004 sizeof(GLint));
4005 free(reply);
4006 #else
4007 GLubyte const *pc =
4008 __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
4009 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4010 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
4011 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
4012 UnlockDisplay(dpy);
4013 SyncHandle();
4014 #endif /* USE_XCB */
4015 }
4016 return;
4017 }
4018
4019 #define X_GLsop_GetMaterialfv 123
4020 void
4021 __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
4022 {
4023 __GLXcontext *const gc = __glXGetCurrentContext();
4024 Display *const dpy = gc->currentDpy;
4025 const GLuint cmdlen = 8;
4026 if (__builtin_expect(dpy != NULL, 1)) {
4027 #ifdef USE_XCB
4028 xcb_connection_t *c = XGetXCBConnection(dpy);
4029 (void) __glXFlushRenderBuffer(gc, gc->pc);
4030 xcb_glx_get_materialfv_reply_t *reply =
4031 xcb_glx_get_materialfv_reply(c,
4032 xcb_glx_get_materialfv(c,
4033 gc->
4034 currentContextTag,
4035 face, pname),
4036 NULL);
4037 if (xcb_glx_get_materialfv_data_length(reply) == 0)
4038 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4039 else
4040 (void) memcpy(params, xcb_glx_get_materialfv_data(reply),
4041 xcb_glx_get_materialfv_data_length(reply) *
4042 sizeof(GLfloat));
4043 free(reply);
4044 #else
4045 GLubyte const *pc =
4046 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
4047 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4048 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4049 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4050 UnlockDisplay(dpy);
4051 SyncHandle();
4052 #endif /* USE_XCB */
4053 }
4054 return;
4055 }
4056
4057 #define X_GLsop_GetMaterialiv 124
4058 void
4059 __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
4060 {
4061 __GLXcontext *const gc = __glXGetCurrentContext();
4062 Display *const dpy = gc->currentDpy;
4063 const GLuint cmdlen = 8;
4064 if (__builtin_expect(dpy != NULL, 1)) {
4065 #ifdef USE_XCB
4066 xcb_connection_t *c = XGetXCBConnection(dpy);
4067 (void) __glXFlushRenderBuffer(gc, gc->pc);
4068 xcb_glx_get_materialiv_reply_t *reply =
4069 xcb_glx_get_materialiv_reply(c,
4070 xcb_glx_get_materialiv(c,
4071 gc->
4072 currentContextTag,
4073 face, pname),
4074 NULL);
4075 if (xcb_glx_get_materialiv_data_length(reply) == 0)
4076 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4077 else
4078 (void) memcpy(params, xcb_glx_get_materialiv_data(reply),
4079 xcb_glx_get_materialiv_data_length(reply) *
4080 sizeof(GLint));
4081 free(reply);
4082 #else
4083 GLubyte const *pc =
4084 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
4085 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4086 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4087 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4088 UnlockDisplay(dpy);
4089 SyncHandle();
4090 #endif /* USE_XCB */
4091 }
4092 return;
4093 }
4094
4095 #define X_GLsop_GetPixelMapfv 125
4096 void
4097 __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
4098 {
4099 __GLXcontext *const gc = __glXGetCurrentContext();
4100 Display *const dpy = gc->currentDpy;
4101 const GLuint cmdlen = 4;
4102 if (__builtin_expect(dpy != NULL, 1)) {
4103 #ifdef USE_XCB
4104 xcb_connection_t *c = XGetXCBConnection(dpy);
4105 (void) __glXFlushRenderBuffer(gc, gc->pc);
4106 xcb_glx_get_pixel_mapfv_reply_t *reply =
4107 xcb_glx_get_pixel_mapfv_reply(c,
4108 xcb_glx_get_pixel_mapfv(c,
4109 gc->
4110 currentContextTag,
4111 map), NULL);
4112 if (xcb_glx_get_pixel_mapfv_data_length(reply) == 0)
4113 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4114 else
4115 (void) memcpy(values, xcb_glx_get_pixel_mapfv_data(reply),
4116 xcb_glx_get_pixel_mapfv_data_length(reply) *
4117 sizeof(GLfloat));
4118 free(reply);
4119 #else
4120 GLubyte const *pc =
4121 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
4122 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4123 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4124 UnlockDisplay(dpy);
4125 SyncHandle();
4126 #endif /* USE_XCB */
4127 }
4128 return;
4129 }
4130
4131 #define X_GLsop_GetPixelMapuiv 126
4132 void
4133 __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
4134 {
4135 __GLXcontext *const gc = __glXGetCurrentContext();
4136 Display *const dpy = gc->currentDpy;
4137 const GLuint cmdlen = 4;
4138 if (__builtin_expect(dpy != NULL, 1)) {
4139 #ifdef USE_XCB
4140 xcb_connection_t *c = XGetXCBConnection(dpy);
4141 (void) __glXFlushRenderBuffer(gc, gc->pc);
4142 xcb_glx_get_pixel_mapuiv_reply_t *reply =
4143 xcb_glx_get_pixel_mapuiv_reply(c,
4144 xcb_glx_get_pixel_mapuiv(c,
4145 gc->
4146 currentContextTag,
4147 map),
4148 NULL);
4149 if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 0)
4150 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4151 else
4152 (void) memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply),
4153 xcb_glx_get_pixel_mapuiv_data_length(reply) *
4154 sizeof(GLuint));
4155 free(reply);
4156 #else
4157 GLubyte const *pc =
4158 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
4159 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4160 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4161 UnlockDisplay(dpy);
4162 SyncHandle();
4163 #endif /* USE_XCB */
4164 }
4165 return;
4166 }
4167
4168 #define X_GLsop_GetPixelMapusv 127
4169 void
4170 __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
4171 {
4172 __GLXcontext *const gc = __glXGetCurrentContext();
4173 Display *const dpy = gc->currentDpy;
4174 const GLuint cmdlen = 4;
4175 if (__builtin_expect(dpy != NULL, 1)) {
4176 #ifdef USE_XCB
4177 xcb_connection_t *c = XGetXCBConnection(dpy);
4178 (void) __glXFlushRenderBuffer(gc, gc->pc);
4179 xcb_glx_get_pixel_mapusv_reply_t *reply =
4180 xcb_glx_get_pixel_mapusv_reply(c,
4181 xcb_glx_get_pixel_mapusv(c,
4182 gc->
4183 currentContextTag,
4184 map),
4185 NULL);
4186 if (xcb_glx_get_pixel_mapusv_data_length(reply) == 0)
4187 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4188 else
4189 (void) memcpy(values, xcb_glx_get_pixel_mapusv_data(reply),
4190 xcb_glx_get_pixel_mapusv_data_length(reply) *
4191 sizeof(GLushort));
4192 free(reply);
4193 #else
4194 GLubyte const *pc =
4195 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
4196 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4197 (void) __glXReadReply(dpy, 2, values, GL_FALSE);
4198 UnlockDisplay(dpy);
4199 SyncHandle();
4200 #endif /* USE_XCB */
4201 }
4202 return;
4203 }
4204
4205 #define X_GLsop_GetPolygonStipple 128
4206 void
4207 __indirect_glGetPolygonStipple(GLubyte * mask)
4208 {
4209 __GLXcontext *const gc = __glXGetCurrentContext();
4210 const __GLXattribute *const state = gc->client_state_private;
4211 Display *const dpy = gc->currentDpy;
4212 const GLuint cmdlen = 4;
4213 if (__builtin_expect(dpy != NULL, 1)) {
4214 #ifdef USE_XCB
4215 xcb_connection_t *c = XGetXCBConnection(dpy);
4216 (void) __glXFlushRenderBuffer(gc, gc->pc);
4217 xcb_glx_get_polygon_stipple_reply_t *reply =
4218 xcb_glx_get_polygon_stipple_reply(c,
4219 xcb_glx_get_polygon_stipple(c,
4220 gc->
4221 currentContextTag,
4222 0),
4223 NULL);
4224 (void) memcpy(mask, xcb_glx_get_polygon_stipple_data(reply),
4225 xcb_glx_get_polygon_stipple_data_length(reply) *
4226 sizeof(GLubyte));
4227 free(reply);
4228 #else
4229 GLubyte const *pc =
4230 __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
4231 *(int32_t *) (pc + 0) = 0;
4232 __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
4233 mask, GL_FALSE);
4234 UnlockDisplay(dpy);
4235 SyncHandle();
4236 #endif /* USE_XCB */
4237 }
4238 return;
4239 }
4240
4241 #define X_GLsop_GetTexEnvfv 130
4242 void
4243 __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
4244 {
4245 __GLXcontext *const gc = __glXGetCurrentContext();
4246 Display *const dpy = gc->currentDpy;
4247 const GLuint cmdlen = 8;
4248 if (__builtin_expect(dpy != NULL, 1)) {
4249 #ifdef USE_XCB
4250 xcb_connection_t *c = XGetXCBConnection(dpy);
4251 (void) __glXFlushRenderBuffer(gc, gc->pc);
4252 xcb_glx_get_tex_envfv_reply_t *reply =
4253 xcb_glx_get_tex_envfv_reply(c,
4254 xcb_glx_get_tex_envfv(c,
4255 gc->
4256 currentContextTag,
4257 target, pname),
4258 NULL);
4259 if (xcb_glx_get_tex_envfv_data_length(reply) == 0)
4260 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4261 else
4262 (void) memcpy(params, xcb_glx_get_tex_envfv_data(reply),
4263 xcb_glx_get_tex_envfv_data_length(reply) *
4264 sizeof(GLfloat));
4265 free(reply);
4266 #else
4267 GLubyte const *pc =
4268 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
4269 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4270 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4271 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4272 UnlockDisplay(dpy);
4273 SyncHandle();
4274 #endif /* USE_XCB */
4275 }
4276 return;
4277 }
4278
4279 #define X_GLsop_GetTexEnviv 131
4280 void
4281 __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
4282 {
4283 __GLXcontext *const gc = __glXGetCurrentContext();
4284 Display *const dpy = gc->currentDpy;
4285 const GLuint cmdlen = 8;
4286 if (__builtin_expect(dpy != NULL, 1)) {
4287 #ifdef USE_XCB
4288 xcb_connection_t *c = XGetXCBConnection(dpy);
4289 (void) __glXFlushRenderBuffer(gc, gc->pc);
4290 xcb_glx_get_tex_enviv_reply_t *reply =
4291 xcb_glx_get_tex_enviv_reply(c,
4292 xcb_glx_get_tex_enviv(c,
4293 gc->
4294 currentContextTag,
4295 target, pname),
4296 NULL);
4297 if (xcb_glx_get_tex_enviv_data_length(reply) == 0)
4298 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4299 else
4300 (void) memcpy(params, xcb_glx_get_tex_enviv_data(reply),
4301 xcb_glx_get_tex_enviv_data_length(reply) *
4302 sizeof(GLint));
4303 free(reply);
4304 #else
4305 GLubyte const *pc =
4306 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
4307 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4308 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4309 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4310 UnlockDisplay(dpy);
4311 SyncHandle();
4312 #endif /* USE_XCB */
4313 }
4314 return;
4315 }
4316
4317 #define X_GLsop_GetTexGendv 132
4318 void
4319 __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
4320 {
4321 __GLXcontext *const gc = __glXGetCurrentContext();
4322 Display *const dpy = gc->currentDpy;
4323 const GLuint cmdlen = 8;
4324 if (__builtin_expect(dpy != NULL, 1)) {
4325 #ifdef USE_XCB
4326 xcb_connection_t *c = XGetXCBConnection(dpy);
4327 (void) __glXFlushRenderBuffer(gc, gc->pc);
4328 xcb_glx_get_tex_gendv_reply_t *reply =
4329 xcb_glx_get_tex_gendv_reply(c,
4330 xcb_glx_get_tex_gendv(c,
4331 gc->
4332 currentContextTag,
4333 coord, pname),
4334 NULL);
4335 if (xcb_glx_get_tex_gendv_data_length(reply) == 0)
4336 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4337 else
4338 (void) memcpy(params, xcb_glx_get_tex_gendv_data(reply),
4339 xcb_glx_get_tex_gendv_data_length(reply) *
4340 sizeof(GLdouble));
4341 free(reply);
4342 #else
4343 GLubyte const *pc =
4344 __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
4345 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4346 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4347 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
4348 UnlockDisplay(dpy);
4349 SyncHandle();
4350 #endif /* USE_XCB */
4351 }
4352 return;
4353 }
4354
4355 #define X_GLsop_GetTexGenfv 133
4356 void
4357 __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
4358 {
4359 __GLXcontext *const gc = __glXGetCurrentContext();
4360 Display *const dpy = gc->currentDpy;
4361 const GLuint cmdlen = 8;
4362 if (__builtin_expect(dpy != NULL, 1)) {
4363 #ifdef USE_XCB
4364 xcb_connection_t *c = XGetXCBConnection(dpy);
4365 (void) __glXFlushRenderBuffer(gc, gc->pc);
4366 xcb_glx_get_tex_genfv_reply_t *reply =
4367 xcb_glx_get_tex_genfv_reply(c,
4368 xcb_glx_get_tex_genfv(c,
4369 gc->
4370 currentContextTag,
4371 coord, pname),
4372 NULL);
4373 if (xcb_glx_get_tex_genfv_data_length(reply) == 0)
4374 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4375 else
4376 (void) memcpy(params, xcb_glx_get_tex_genfv_data(reply),
4377 xcb_glx_get_tex_genfv_data_length(reply) *
4378 sizeof(GLfloat));
4379 free(reply);
4380 #else
4381 GLubyte const *pc =
4382 __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
4383 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4384 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4385 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4386 UnlockDisplay(dpy);
4387 SyncHandle();
4388 #endif /* USE_XCB */
4389 }
4390 return;
4391 }
4392
4393 #define X_GLsop_GetTexGeniv 134
4394 void
4395 __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
4396 {
4397 __GLXcontext *const gc = __glXGetCurrentContext();
4398 Display *const dpy = gc->currentDpy;
4399 const GLuint cmdlen = 8;
4400 if (__builtin_expect(dpy != NULL, 1)) {
4401 #ifdef USE_XCB
4402 xcb_connection_t *c = XGetXCBConnection(dpy);
4403 (void) __glXFlushRenderBuffer(gc, gc->pc);
4404 xcb_glx_get_tex_geniv_reply_t *reply =
4405 xcb_glx_get_tex_geniv_reply(c,
4406 xcb_glx_get_tex_geniv(c,
4407 gc->
4408 currentContextTag,
4409 coord, pname),
4410 NULL);
4411 if (xcb_glx_get_tex_geniv_data_length(reply) == 0)
4412 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4413 else
4414 (void) memcpy(params, xcb_glx_get_tex_geniv_data(reply),
4415 xcb_glx_get_tex_geniv_data_length(reply) *
4416 sizeof(GLint));
4417 free(reply);
4418 #else
4419 GLubyte const *pc =
4420 __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
4421 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4422 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4423 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4424 UnlockDisplay(dpy);
4425 SyncHandle();
4426 #endif /* USE_XCB */
4427 }
4428 return;
4429 }
4430
4431 #define X_GLsop_GetTexImage 135
4432 void
4433 __indirect_glGetTexImage(GLenum target, GLint level, GLenum format,
4434 GLenum type, GLvoid * pixels)
4435 {
4436 __GLXcontext *const gc = __glXGetCurrentContext();
4437 const __GLXattribute *const state = gc->client_state_private;
4438 Display *const dpy = gc->currentDpy;
4439 const GLuint cmdlen = 20;
4440 if (__builtin_expect(dpy != NULL, 1)) {
4441 #ifdef USE_XCB
4442 xcb_connection_t *c = XGetXCBConnection(dpy);
4443 (void) __glXFlushRenderBuffer(gc, gc->pc);
4444 xcb_glx_get_tex_image_reply_t *reply =
4445 xcb_glx_get_tex_image_reply(c,
4446 xcb_glx_get_tex_image(c,
4447 gc->
4448 currentContextTag,
4449 target, level,
4450 format, type,
4451 state->
4452 storePack.
4453 swapEndian),
4454 NULL);
4455 (void) memcpy(pixels, xcb_glx_get_tex_image_data(reply),
4456 xcb_glx_get_tex_image_data_length(reply) *
4457 sizeof(GLvoid));
4458 free(reply);
4459 #else
4460 GLubyte const *pc =
4461 __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
4462 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4463 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4464 (void) memcpy((void *) (pc + 8), (void *) (&format), 4);
4465 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
4466 *(int32_t *) (pc + 16) = 0;
4467 *(int8_t *) (pc + 16) = state->storePack.swapEndian;
4468 __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels,
4469 GL_TRUE);
4470 UnlockDisplay(dpy);
4471 SyncHandle();
4472 #endif /* USE_XCB */
4473 }
4474 return;
4475 }
4476
4477 #define X_GLsop_GetTexParameterfv 136
4478 void
4479 __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
4480 {
4481 __GLXcontext *const gc = __glXGetCurrentContext();
4482 Display *const dpy = gc->currentDpy;
4483 const GLuint cmdlen = 8;
4484 if (__builtin_expect(dpy != NULL, 1)) {
4485 #ifdef USE_XCB
4486 xcb_connection_t *c = XGetXCBConnection(dpy);
4487 (void) __glXFlushRenderBuffer(gc, gc->pc);
4488 xcb_glx_get_tex_parameterfv_reply_t *reply =
4489 xcb_glx_get_tex_parameterfv_reply(c,
4490 xcb_glx_get_tex_parameterfv(c,
4491 gc->
4492 currentContextTag,
4493 target,
4494 pname),
4495 NULL);
4496 if (xcb_glx_get_tex_parameterfv_data_length(reply) == 0)
4497 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4498 else
4499 (void) memcpy(params, xcb_glx_get_tex_parameterfv_data(reply),
4500 xcb_glx_get_tex_parameterfv_data_length(reply) *
4501 sizeof(GLfloat));
4502 free(reply);
4503 #else
4504 GLubyte const *pc =
4505 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
4506 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4507 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4508 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4509 UnlockDisplay(dpy);
4510 SyncHandle();
4511 #endif /* USE_XCB */
4512 }
4513 return;
4514 }
4515
4516 #define X_GLsop_GetTexParameteriv 137
4517 void
4518 __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
4519 {
4520 __GLXcontext *const gc = __glXGetCurrentContext();
4521 Display *const dpy = gc->currentDpy;
4522 const GLuint cmdlen = 8;
4523 if (__builtin_expect(dpy != NULL, 1)) {
4524 #ifdef USE_XCB
4525 xcb_connection_t *c = XGetXCBConnection(dpy);
4526 (void) __glXFlushRenderBuffer(gc, gc->pc);
4527 xcb_glx_get_tex_parameteriv_reply_t *reply =
4528 xcb_glx_get_tex_parameteriv_reply(c,
4529 xcb_glx_get_tex_parameteriv(c,
4530 gc->
4531 currentContextTag,
4532 target,
4533 pname),
4534 NULL);
4535 if (xcb_glx_get_tex_parameteriv_data_length(reply) == 0)
4536 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4537 else
4538 (void) memcpy(params, xcb_glx_get_tex_parameteriv_data(reply),
4539 xcb_glx_get_tex_parameteriv_data_length(reply) *
4540 sizeof(GLint));
4541 free(reply);
4542 #else
4543 GLubyte const *pc =
4544 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
4545 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4546 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4547 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4548 UnlockDisplay(dpy);
4549 SyncHandle();
4550 #endif /* USE_XCB */
4551 }
4552 return;
4553 }
4554
4555 #define X_GLsop_GetTexLevelParameterfv 138
4556 void
4557 __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
4558 GLfloat * params)
4559 {
4560 __GLXcontext *const gc = __glXGetCurrentContext();
4561 Display *const dpy = gc->currentDpy;
4562 const GLuint cmdlen = 12;
4563 if (__builtin_expect(dpy != NULL, 1)) {
4564 #ifdef USE_XCB
4565 xcb_connection_t *c = XGetXCBConnection(dpy);
4566 (void) __glXFlushRenderBuffer(gc, gc->pc);
4567 xcb_glx_get_tex_level_parameterfv_reply_t *reply =
4568 xcb_glx_get_tex_level_parameterfv_reply(c,
4569 xcb_glx_get_tex_level_parameterfv
4570 (c, gc->currentContextTag,
4571 target, level, pname),
4572 NULL);
4573 if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 0)
4574 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4575 else
4576 (void) memcpy(params,
4577 xcb_glx_get_tex_level_parameterfv_data(reply),
4578 xcb_glx_get_tex_level_parameterfv_data_length(reply)
4579 * sizeof(GLfloat));
4580 free(reply);
4581 #else
4582 GLubyte const *pc =
4583 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv,
4584 cmdlen);
4585 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4586 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4587 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4588 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4589 UnlockDisplay(dpy);
4590 SyncHandle();
4591 #endif /* USE_XCB */
4592 }
4593 return;
4594 }
4595
4596 #define X_GLsop_GetTexLevelParameteriv 139
4597 void
4598 __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
4599 GLint * params)
4600 {
4601 __GLXcontext *const gc = __glXGetCurrentContext();
4602 Display *const dpy = gc->currentDpy;
4603 const GLuint cmdlen = 12;
4604 if (__builtin_expect(dpy != NULL, 1)) {
4605 #ifdef USE_XCB
4606 xcb_connection_t *c = XGetXCBConnection(dpy);
4607 (void) __glXFlushRenderBuffer(gc, gc->pc);
4608 xcb_glx_get_tex_level_parameteriv_reply_t *reply =
4609 xcb_glx_get_tex_level_parameteriv_reply(c,
4610 xcb_glx_get_tex_level_parameteriv
4611 (c, gc->currentContextTag,
4612 target, level, pname),
4613 NULL);
4614 if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 0)
4615 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4616 else
4617 (void) memcpy(params,
4618 xcb_glx_get_tex_level_parameteriv_data(reply),
4619 xcb_glx_get_tex_level_parameteriv_data_length(reply)
4620 * sizeof(GLint));
4621 free(reply);
4622 #else
4623 GLubyte const *pc =
4624 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv,
4625 cmdlen);
4626 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4627 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4628 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4629 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4630 UnlockDisplay(dpy);
4631 SyncHandle();
4632 #endif /* USE_XCB */
4633 }
4634 return;
4635 }
4636
4637 #define X_GLsop_IsList 141
4638 GLboolean
4639 __indirect_glIsList(GLuint list)
4640 {
4641 __GLXcontext *const gc = __glXGetCurrentContext();
4642 Display *const dpy = gc->currentDpy;
4643 GLboolean retval = (GLboolean) 0;
4644 const GLuint cmdlen = 4;
4645 if (__builtin_expect(dpy != NULL, 1)) {
4646 #ifdef USE_XCB
4647 xcb_connection_t *c = XGetXCBConnection(dpy);
4648 (void) __glXFlushRenderBuffer(gc, gc->pc);
4649 xcb_glx_is_list_reply_t *reply =
4650 xcb_glx_is_list_reply(c,
4651 xcb_glx_is_list(c, gc->currentContextTag,
4652 list), NULL);
4653 retval = reply->ret_val;
4654 free(reply);
4655 #else
4656 GLubyte const *pc =
4657 __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
4658 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
4659 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4660 UnlockDisplay(dpy);
4661 SyncHandle();
4662 #endif /* USE_XCB */
4663 }
4664 return retval;
4665 }
4666
4667 #define X_GLrop_DepthRange 174
4668 void
4669 __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
4670 {
4671 __GLXcontext *const gc = __glXGetCurrentContext();
4672 const GLuint cmdlen = 20;
4673 emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
4674 (void) memcpy((void *) (gc->pc + 4), (void *) (&zNear), 8);
4675 (void) memcpy((void *) (gc->pc + 12), (void *) (&zFar), 8);
4676 gc->pc += cmdlen;
4677 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4678 (void) __glXFlushRenderBuffer(gc, gc->pc);
4679 }
4680 }
4681
4682 #define X_GLrop_Frustum 175
4683 void
4684 __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
4685 GLdouble top, GLdouble zNear, GLdouble zFar)
4686 {
4687 __GLXcontext *const gc = __glXGetCurrentContext();
4688 const GLuint cmdlen = 52;
4689 emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
4690 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4691 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4692 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4693 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4694 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4695 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4696 gc->pc += cmdlen;
4697 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4698 (void) __glXFlushRenderBuffer(gc, gc->pc);
4699 }
4700 }
4701
4702 #define X_GLrop_LoadIdentity 176
4703 void
4704 __indirect_glLoadIdentity(void)
4705 {
4706 __GLXcontext *const gc = __glXGetCurrentContext();
4707 const GLuint cmdlen = 4;
4708 emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
4709 gc->pc += cmdlen;
4710 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4711 (void) __glXFlushRenderBuffer(gc, gc->pc);
4712 }
4713 }
4714
4715 #define X_GLrop_LoadMatrixf 177
4716 void
4717 __indirect_glLoadMatrixf(const GLfloat * m)
4718 {
4719 __GLXcontext *const gc = __glXGetCurrentContext();
4720 const GLuint cmdlen = 68;
4721 emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
4722 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4723 gc->pc += cmdlen;
4724 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4725 (void) __glXFlushRenderBuffer(gc, gc->pc);
4726 }
4727 }
4728
4729 #define X_GLrop_LoadMatrixd 178
4730 void
4731 __indirect_glLoadMatrixd(const GLdouble * m)
4732 {
4733 __GLXcontext *const gc = __glXGetCurrentContext();
4734 const GLuint cmdlen = 132;
4735 emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
4736 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4737 gc->pc += cmdlen;
4738 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4739 (void) __glXFlushRenderBuffer(gc, gc->pc);
4740 }
4741 }
4742
4743 #define X_GLrop_MatrixMode 179
4744 void
4745 __indirect_glMatrixMode(GLenum mode)
4746 {
4747 __GLXcontext *const gc = __glXGetCurrentContext();
4748 const GLuint cmdlen = 8;
4749 emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
4750 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
4751 gc->pc += cmdlen;
4752 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4753 (void) __glXFlushRenderBuffer(gc, gc->pc);
4754 }
4755 }
4756
4757 #define X_GLrop_MultMatrixf 180
4758 void
4759 __indirect_glMultMatrixf(const GLfloat * m)
4760 {
4761 __GLXcontext *const gc = __glXGetCurrentContext();
4762 const GLuint cmdlen = 68;
4763 emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
4764 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4765 gc->pc += cmdlen;
4766 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4767 (void) __glXFlushRenderBuffer(gc, gc->pc);
4768 }
4769 }
4770
4771 #define X_GLrop_MultMatrixd 181
4772 void
4773 __indirect_glMultMatrixd(const GLdouble * m)
4774 {
4775 __GLXcontext *const gc = __glXGetCurrentContext();
4776 const GLuint cmdlen = 132;
4777 emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
4778 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4779 gc->pc += cmdlen;
4780 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4781 (void) __glXFlushRenderBuffer(gc, gc->pc);
4782 }
4783 }
4784
4785 #define X_GLrop_Ortho 182
4786 void
4787 __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
4788 GLdouble top, GLdouble zNear, GLdouble zFar)
4789 {
4790 __GLXcontext *const gc = __glXGetCurrentContext();
4791 const GLuint cmdlen = 52;
4792 emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
4793 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4794 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4795 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4796 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4797 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4798 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4799 gc->pc += cmdlen;
4800 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4801 (void) __glXFlushRenderBuffer(gc, gc->pc);
4802 }
4803 }
4804
4805 #define X_GLrop_PopMatrix 183
4806 void
4807 __indirect_glPopMatrix(void)
4808 {
4809 __GLXcontext *const gc = __glXGetCurrentContext();
4810 const GLuint cmdlen = 4;
4811 emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
4812 gc->pc += cmdlen;
4813 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4814 (void) __glXFlushRenderBuffer(gc, gc->pc);
4815 }
4816 }
4817
4818 #define X_GLrop_PushMatrix 184
4819 void
4820 __indirect_glPushMatrix(void)
4821 {
4822 __GLXcontext *const gc = __glXGetCurrentContext();
4823 const GLuint cmdlen = 4;
4824 emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
4825 gc->pc += cmdlen;
4826 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4827 (void) __glXFlushRenderBuffer(gc, gc->pc);
4828 }
4829 }
4830
4831 #define X_GLrop_Rotated 185
4832 void
4833 __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4834 {
4835 __GLXcontext *const gc = __glXGetCurrentContext();
4836 const GLuint cmdlen = 36;
4837 emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
4838 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 8);
4839 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
4840 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
4841 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
4842 gc->pc += cmdlen;
4843 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4844 (void) __glXFlushRenderBuffer(gc, gc->pc);
4845 }
4846 }
4847
4848 #define X_GLrop_Rotatef 186
4849 void
4850 __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
4851 {
4852 __GLXcontext *const gc = __glXGetCurrentContext();
4853 const GLuint cmdlen = 20;
4854 emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
4855 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 4);
4856 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
4857 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
4858 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
4859 gc->pc += cmdlen;
4860 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4861 (void) __glXFlushRenderBuffer(gc, gc->pc);
4862 }
4863 }
4864
4865 #define X_GLrop_Scaled 187
4866 void
4867 __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
4868 {
4869 __GLXcontext *const gc = __glXGetCurrentContext();
4870 const GLuint cmdlen = 28;
4871 emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
4872 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4873 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4874 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4875 gc->pc += cmdlen;
4876 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4877 (void) __glXFlushRenderBuffer(gc, gc->pc);
4878 }
4879 }
4880
4881 #define X_GLrop_Scalef 188
4882 void
4883 __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
4884 {
4885 __GLXcontext *const gc = __glXGetCurrentContext();
4886 const GLuint cmdlen = 16;
4887 emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
4888 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4889 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4890 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4891 gc->pc += cmdlen;
4892 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4893 (void) __glXFlushRenderBuffer(gc, gc->pc);
4894 }
4895 }
4896
4897 #define X_GLrop_Translated 189
4898 void
4899 __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
4900 {
4901 __GLXcontext *const gc = __glXGetCurrentContext();
4902 const GLuint cmdlen = 28;
4903 emit_header(gc->pc, X_GLrop_Translated, cmdlen);
4904 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4905 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4906 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4907 gc->pc += cmdlen;
4908 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4909 (void) __glXFlushRenderBuffer(gc, gc->pc);
4910 }
4911 }
4912
4913 #define X_GLrop_Translatef 190
4914 void
4915 __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
4916 {
4917 __GLXcontext *const gc = __glXGetCurrentContext();
4918 const GLuint cmdlen = 16;
4919 emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
4920 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4921 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4922 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4923 gc->pc += cmdlen;
4924 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4925 (void) __glXFlushRenderBuffer(gc, gc->pc);
4926 }
4927 }
4928
4929 #define X_GLrop_Viewport 191
4930 void
4931 __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
4932 {
4933 __GLXcontext *const gc = __glXGetCurrentContext();
4934 const GLuint cmdlen = 20;
4935 emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
4936 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4937 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4938 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
4939 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
4940 gc->pc += cmdlen;
4941 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4942 (void) __glXFlushRenderBuffer(gc, gc->pc);
4943 }
4944 }
4945
4946 #define X_GLrop_BindTexture 4117
4947 void
4948 __indirect_glBindTexture(GLenum target, GLuint texture)
4949 {
4950 __GLXcontext *const gc = __glXGetCurrentContext();
4951 const GLuint cmdlen = 12;
4952 emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
4953 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
4954 (void) memcpy((void *) (gc->pc + 8), (void *) (&texture), 4);
4955 gc->pc += cmdlen;
4956 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4957 (void) __glXFlushRenderBuffer(gc, gc->pc);
4958 }
4959 }
4960
4961 #define X_GLrop_Indexubv 194
4962 void
4963 __indirect_glIndexub(GLubyte c)
4964 {
4965 __GLXcontext *const gc = __glXGetCurrentContext();
4966 const GLuint cmdlen = 8;
4967 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4968 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 1);
4969 gc->pc += cmdlen;
4970 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4971 (void) __glXFlushRenderBuffer(gc, gc->pc);
4972 }
4973 }
4974
4975 #define X_GLrop_Indexubv 194
4976 void
4977 __indirect_glIndexubv(const GLubyte * c)
4978 {
4979 __GLXcontext *const gc = __glXGetCurrentContext();
4980 const GLuint cmdlen = 8;
4981 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4982 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 1);
4983 gc->pc += cmdlen;
4984 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4985 (void) __glXFlushRenderBuffer(gc, gc->pc);
4986 }
4987 }
4988
4989 #define X_GLrop_PolygonOffset 192
4990 void
4991 __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
4992 {
4993 __GLXcontext *const gc = __glXGetCurrentContext();
4994 const GLuint cmdlen = 12;
4995 emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
4996 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
4997 (void) memcpy((void *) (gc->pc + 8), (void *) (&units), 4);
4998 gc->pc += cmdlen;
4999 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5000 (void) __glXFlushRenderBuffer(gc, gc->pc);
5001 }
5002 }
5003
5004 #define X_GLsop_AreTexturesResident 143
5005 GLboolean
5006 __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures,
5007 GLboolean * residences)
5008 {
5009 __GLXcontext *const gc = __glXGetCurrentContext();
5010 Display *const dpy = gc->currentDpy;
5011 GLboolean retval = (GLboolean) 0;
5012 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5013 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5014 #ifdef USE_XCB
5015 xcb_connection_t *c = XGetXCBConnection(dpy);
5016 (void) __glXFlushRenderBuffer(gc, gc->pc);
5017 xcb_glx_are_textures_resident_reply_t *reply =
5018 xcb_glx_are_textures_resident_reply(c,
5019 xcb_glx_are_textures_resident
5020 (c, gc->currentContextTag, n,
5021 textures), NULL);
5022 (void) memcpy(residences, xcb_glx_are_textures_resident_data(reply),
5023 xcb_glx_are_textures_resident_data_length(reply) *
5024 sizeof(GLboolean));
5025 retval = reply->ret_val;
5026 free(reply);
5027 #else
5028 GLubyte const *pc =
5029 __glXSetupSingleRequest(gc, X_GLsop_AreTexturesResident, cmdlen);
5030 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5031 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5032 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
5033 UnlockDisplay(dpy);
5034 SyncHandle();
5035 #endif /* USE_XCB */
5036 }
5037 return retval;
5038 }
5039
5040 #define X_GLrop_CopyTexImage1D 4119
5041 void
5042 __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
5043 GLint x, GLint y, GLsizei width, GLint border)
5044 {
5045 __GLXcontext *const gc = __glXGetCurrentContext();
5046 const GLuint cmdlen = 32;
5047 emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
5048 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5049 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5050 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5051 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5052 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5053 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5054 (void) memcpy((void *) (gc->pc + 28), (void *) (&border), 4);
5055 gc->pc += cmdlen;
5056 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5057 (void) __glXFlushRenderBuffer(gc, gc->pc);
5058 }
5059 }
5060
5061 #define X_GLrop_CopyTexImage2D 4120
5062 void
5063 __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
5064 GLint x, GLint y, GLsizei width, GLsizei height,
5065 GLint border)
5066 {
5067 __GLXcontext *const gc = __glXGetCurrentContext();
5068 const GLuint cmdlen = 36;
5069 emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
5070 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5071 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5072 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5073 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5074 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5075 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5076 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
5077 (void) memcpy((void *) (gc->pc + 32), (void *) (&border), 4);
5078 gc->pc += cmdlen;
5079 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5080 (void) __glXFlushRenderBuffer(gc, gc->pc);
5081 }
5082 }
5083
5084 #define X_GLrop_CopyTexSubImage1D 4121
5085 void
5086 __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5087 GLint x, GLint y, GLsizei width)
5088 {
5089 __GLXcontext *const gc = __glXGetCurrentContext();
5090 const GLuint cmdlen = 28;
5091 emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
5092 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5093 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5094 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5095 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5096 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5097 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5098 gc->pc += cmdlen;
5099 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5100 (void) __glXFlushRenderBuffer(gc, gc->pc);
5101 }
5102 }
5103
5104 #define X_GLrop_CopyTexSubImage2D 4122
5105 void
5106 __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5107 GLint yoffset, GLint x, GLint y, GLsizei width,
5108 GLsizei height)
5109 {
5110 __GLXcontext *const gc = __glXGetCurrentContext();
5111 const GLuint cmdlen = 36;
5112 emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
5113 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5114 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5115 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5116 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
5117 (void) memcpy((void *) (gc->pc + 20), (void *) (&x), 4);
5118 (void) memcpy((void *) (gc->pc + 24), (void *) (&y), 4);
5119 (void) memcpy((void *) (gc->pc + 28), (void *) (&width), 4);
5120 (void) memcpy((void *) (gc->pc + 32), (void *) (&height), 4);
5121 gc->pc += cmdlen;
5122 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5123 (void) __glXFlushRenderBuffer(gc, gc->pc);
5124 }
5125 }
5126
5127 #define X_GLvop_DeleteTextures 12
5128 void
5129 __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
5130 {
5131 __GLXcontext *const gc = __glXGetCurrentContext();
5132 Display *const dpy = gc->currentDpy;
5133 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5134 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5135 GLubyte const *pc =
5136 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
5137 X_GLvop_DeleteTextures, cmdlen);
5138 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5139 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5140 UnlockDisplay(dpy);
5141 SyncHandle();
5142 }
5143 return;
5144 }
5145
5146 #define X_GLsop_GenTextures 145
5147 void
5148 __indirect_glGenTextures(GLsizei n, GLuint * textures)
5149 {
5150 __GLXcontext *const gc = __glXGetCurrentContext();
5151 Display *const dpy = gc->currentDpy;
5152 const GLuint cmdlen = 4;
5153 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5154 #ifdef USE_XCB
5155 xcb_connection_t *c = XGetXCBConnection(dpy);
5156 (void) __glXFlushRenderBuffer(gc, gc->pc);
5157 xcb_glx_gen_textures_reply_t *reply =
5158 xcb_glx_gen_textures_reply(c,
5159 xcb_glx_gen_textures(c,
5160 gc->
5161 currentContextTag,
5162 n), NULL);
5163 (void) memcpy(textures, xcb_glx_gen_textures_data(reply),
5164 xcb_glx_gen_textures_data_length(reply) *
5165 sizeof(GLuint));
5166 free(reply);
5167 #else
5168 GLubyte const *pc =
5169 __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
5170 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5171 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5172 UnlockDisplay(dpy);
5173 SyncHandle();
5174 #endif /* USE_XCB */
5175 }
5176 return;
5177 }
5178
5179 #define X_GLsop_IsTexture 146
5180 GLboolean
5181 __indirect_glIsTexture(GLuint texture)
5182 {
5183 __GLXcontext *const gc = __glXGetCurrentContext();
5184 Display *const dpy = gc->currentDpy;
5185 GLboolean retval = (GLboolean) 0;
5186 const GLuint cmdlen = 4;
5187 if (__builtin_expect(dpy != NULL, 1)) {
5188 #ifdef USE_XCB
5189 xcb_connection_t *c = XGetXCBConnection(dpy);
5190 (void) __glXFlushRenderBuffer(gc, gc->pc);
5191 xcb_glx_is_texture_reply_t *reply =
5192 xcb_glx_is_texture_reply(c,
5193 xcb_glx_is_texture(c,
5194 gc->currentContextTag,
5195 texture), NULL);
5196 retval = reply->ret_val;
5197 free(reply);
5198 #else
5199 GLubyte const *pc =
5200 __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
5201 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5202 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5203 UnlockDisplay(dpy);
5204 SyncHandle();
5205 #endif /* USE_XCB */
5206 }
5207 return retval;
5208 }
5209
5210 #define X_GLrop_PrioritizeTextures 4118
5211 void
5212 __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures,
5213 const GLclampf * priorities)
5214 {
5215 __GLXcontext *const gc = __glXGetCurrentContext();
5216 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
5217 if (__builtin_expect(n >= 0, 1)) {
5218 emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
5219 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
5220 (void) memcpy((void *) (gc->pc + 8), (void *) (textures), (n * 4));
5221 (void) memcpy((void *) (gc->pc + 8 + (n * 4)), (void *) (priorities),
5222 (n * 4));
5223 gc->pc += cmdlen;
5224 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5225 (void) __glXFlushRenderBuffer(gc, gc->pc);
5226 }
5227 }
5228 }
5229
5230 static void
5231 __glx_TexSubImage_1D2D(unsigned opcode, unsigned dim, GLenum target,
5232 GLint level, GLint xoffset, GLint yoffset,
5233 GLsizei width, GLsizei height, GLenum format,
5234 GLenum type, const GLvoid * pixels)
5235 {
5236 __GLXcontext *const gc = __glXGetCurrentContext();
5237 const GLuint compsize =
5238 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
5239 target) : 0;
5240 const GLuint cmdlen = 60 + __GLX_PAD(compsize);
5241 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5242 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5243 if ((gc->pc + cmdlen) > gc->bufEnd) {
5244 (void) __glXFlushRenderBuffer(gc, gc->pc);
5245 }
5246 emit_header(gc->pc, opcode, cmdlen);
5247 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5248 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
5249 (void) memcpy((void *) (gc->pc + 32), (void *) (&xoffset), 4);
5250 (void) memcpy((void *) (gc->pc + 36), (void *) (&yoffset), 4);
5251 (void) memcpy((void *) (gc->pc + 40), (void *) (&width), 4);
5252 (void) memcpy((void *) (gc->pc + 44), (void *) (&height), 4);
5253 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
5254 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
5255 (void) memcpy((void *) (gc->pc + 56),
5256 (void *) ((pixels == NULL) ? one : zero), 4);
5257 if (compsize > 0) {
5258 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5259 pixels, gc->pc + 60, gc->pc + 4);
5260 } else {
5261 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5262 default_pixel_store_2D_size);
5263 }
5264 gc->pc += cmdlen;
5265 if (gc->pc > gc->limit) {
5266 (void) __glXFlushRenderBuffer(gc, gc->pc);
5267 }
5268 } else {
5269 const GLint op = opcode;
5270 const GLuint cmdlenLarge = cmdlen + 4;
5271 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5272 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5273 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5274 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5275 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
5276 (void) memcpy((void *) (pc + 36), (void *) (&xoffset), 4);
5277 (void) memcpy((void *) (pc + 40), (void *) (&yoffset), 4);
5278 (void) memcpy((void *) (pc + 44), (void *) (&width), 4);
5279 (void) memcpy((void *) (pc + 48), (void *) (&height), 4);
5280 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
5281 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
5282 (void) memcpy((void *) (pc + 60), zero, 4);
5283 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5284 type, pixels, pc + 64, pc + 8);
5285 }
5286 }
5287 }
5288
5289 #define X_GLrop_TexSubImage1D 4099
5290 void
5291 __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5292 GLsizei width, GLenum format, GLenum type,
5293 const GLvoid * pixels)
5294 {
5295 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset,
5296 1, width, 1, format, type, pixels);
5297 }
5298
5299 #define X_GLrop_TexSubImage2D 4100
5300 void
5301 __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5302 GLint yoffset, GLsizei width, GLsizei height,
5303 GLenum format, GLenum type, const GLvoid * pixels)
5304 {
5305 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset,
5306 yoffset, width, height, format, type, pixels);
5307 }
5308
5309 #define X_GLrop_BlendColor 4096
5310 void
5311 __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue,
5312 GLclampf alpha)
5313 {
5314 __GLXcontext *const gc = __glXGetCurrentContext();
5315 const GLuint cmdlen = 20;
5316 emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
5317 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
5318 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
5319 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
5320 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
5321 gc->pc += cmdlen;
5322 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5323 (void) __glXFlushRenderBuffer(gc, gc->pc);
5324 }
5325 }
5326
5327 #define X_GLrop_BlendEquation 4097
5328 void
5329 __indirect_glBlendEquation(GLenum mode)
5330 {
5331 __GLXcontext *const gc = __glXGetCurrentContext();
5332 const GLuint cmdlen = 8;
5333 emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
5334 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
5335 gc->pc += cmdlen;
5336 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5337 (void) __glXFlushRenderBuffer(gc, gc->pc);
5338 }
5339 }
5340
5341 #define X_GLrop_ColorTable 2053
5342 void
5343 __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width,
5344 GLenum format, GLenum type, const GLvoid * table)
5345 {
5346 __GLXcontext *const gc = __glXGetCurrentContext();
5347 const GLuint compsize =
5348 (table != NULL) ? __glImageSize(width, 1, 1, format, type,
5349 target) : 0;
5350 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5351 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5352 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5353 if ((gc->pc + cmdlen) > gc->bufEnd) {
5354 (void) __glXFlushRenderBuffer(gc, gc->pc);
5355 }
5356 emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
5357 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5358 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5359 4);
5360 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5361 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5362 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5363 if (compsize > 0) {
5364 (*gc->fillImage) (gc, 1, width, 1, 1, format, type, table,
5365 gc->pc + 44, gc->pc + 4);
5366 } else {
5367 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5368 default_pixel_store_1D_size);
5369 }
5370 gc->pc += cmdlen;
5371 if (gc->pc > gc->limit) {
5372 (void) __glXFlushRenderBuffer(gc, gc->pc);
5373 }
5374 } else {
5375 const GLint op = X_GLrop_ColorTable;
5376 const GLuint cmdlenLarge = cmdlen + 4;
5377 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5378 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5379 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5380 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5381 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5382 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5383 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5384 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5385 __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type,
5386 table, pc + 48, pc + 8);
5387 }
5388 }
5389 }
5390
5391 #define X_GLrop_ColorTableParameterfv 2054
5392 void
5393 __indirect_glColorTableParameterfv(GLenum target, GLenum pname,
5394 const GLfloat * params)
5395 {
5396 __GLXcontext *const gc = __glXGetCurrentContext();
5397 const GLuint compsize = __glColorTableParameterfv_size(pname);
5398 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5399 emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
5400 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5401 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5402 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5403 gc->pc += cmdlen;
5404 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5405 (void) __glXFlushRenderBuffer(gc, gc->pc);
5406 }
5407 }
5408
5409 #define X_GLrop_ColorTableParameteriv 2055
5410 void
5411 __indirect_glColorTableParameteriv(GLenum target, GLenum pname,
5412 const GLint * params)
5413 {
5414 __GLXcontext *const gc = __glXGetCurrentContext();
5415 const GLuint compsize = __glColorTableParameteriv_size(pname);
5416 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5417 emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
5418 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5419 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5420 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5421 gc->pc += cmdlen;
5422 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5423 (void) __glXFlushRenderBuffer(gc, gc->pc);
5424 }
5425 }
5426
5427 #define X_GLrop_CopyColorTable 2056
5428 void
5429 __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x,
5430 GLint y, GLsizei width)
5431 {
5432 __GLXcontext *const gc = __glXGetCurrentContext();
5433 const GLuint cmdlen = 24;
5434 emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
5435 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5436 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
5437 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5438 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5439 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5440 gc->pc += cmdlen;
5441 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5442 (void) __glXFlushRenderBuffer(gc, gc->pc);
5443 }
5444 }
5445
5446 #define X_GLsop_GetColorTable 147
5447 void
5448 __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
5449 GLvoid * table)
5450 {
5451 __GLXcontext *const gc = __glXGetCurrentContext();
5452 const __GLXattribute *const state = gc->client_state_private;
5453 Display *const dpy = gc->currentDpy;
5454 const GLuint cmdlen = 16;
5455 if (__builtin_expect(dpy != NULL, 1)) {
5456 #ifdef USE_XCB
5457 xcb_connection_t *c = XGetXCBConnection(dpy);
5458 (void) __glXFlushRenderBuffer(gc, gc->pc);
5459 xcb_glx_get_color_table_reply_t *reply =
5460 xcb_glx_get_color_table_reply(c,
5461 xcb_glx_get_color_table(c,
5462 gc->
5463 currentContextTag,
5464 target,
5465 format,
5466 type,
5467 state->
5468 storePack.
5469 swapEndian),
5470 NULL);
5471 (void) memcpy(table, xcb_glx_get_color_table_data(reply),
5472 xcb_glx_get_color_table_data_length(reply) *
5473 sizeof(GLvoid));
5474 free(reply);
5475 #else
5476 GLubyte const *pc =
5477 __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
5478 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5479 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5480 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5481 *(int32_t *) (pc + 12) = 0;
5482 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5483 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5484 GL_TRUE);
5485 UnlockDisplay(dpy);
5486 SyncHandle();
5487 #endif /* USE_XCB */
5488 }
5489 return;
5490 }
5491
5492 #define X_GLsop_GetColorTableParameterfv 148
5493 void
5494 __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
5495 GLfloat * params)
5496 {
5497 __GLXcontext *const gc = __glXGetCurrentContext();
5498 Display *const dpy = gc->currentDpy;
5499 const GLuint cmdlen = 8;
5500 if (__builtin_expect(dpy != NULL, 1)) {
5501 #ifdef USE_XCB
5502 xcb_connection_t *c = XGetXCBConnection(dpy);
5503 (void) __glXFlushRenderBuffer(gc, gc->pc);
5504 xcb_glx_get_color_table_parameterfv_reply_t *reply =
5505 xcb_glx_get_color_table_parameterfv_reply(c,
5506 xcb_glx_get_color_table_parameterfv
5507 (c,
5508 gc->currentContextTag,
5509 target, pname), NULL);
5510 if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 0)
5511 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5512 else
5513 (void) memcpy(params,
5514 xcb_glx_get_color_table_parameterfv_data(reply),
5515 xcb_glx_get_color_table_parameterfv_data_length
5516 (reply) * sizeof(GLfloat));
5517 free(reply);
5518 #else
5519 GLubyte const *pc =
5520 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv,
5521 cmdlen);
5522 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5523 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5524 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5525 UnlockDisplay(dpy);
5526 SyncHandle();
5527 #endif /* USE_XCB */
5528 }
5529 return;
5530 }
5531
5532 #define X_GLsop_GetColorTableParameteriv 149
5533 void
5534 __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
5535 GLint * params)
5536 {
5537 __GLXcontext *const gc = __glXGetCurrentContext();
5538 Display *const dpy = gc->currentDpy;
5539 const GLuint cmdlen = 8;
5540 if (__builtin_expect(dpy != NULL, 1)) {
5541 #ifdef USE_XCB
5542 xcb_connection_t *c = XGetXCBConnection(dpy);
5543 (void) __glXFlushRenderBuffer(gc, gc->pc);
5544 xcb_glx_get_color_table_parameteriv_reply_t *reply =
5545 xcb_glx_get_color_table_parameteriv_reply(c,
5546 xcb_glx_get_color_table_parameteriv
5547 (c,
5548 gc->currentContextTag,
5549 target, pname), NULL);
5550 if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 0)
5551 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5552 else
5553 (void) memcpy(params,
5554 xcb_glx_get_color_table_parameteriv_data(reply),
5555 xcb_glx_get_color_table_parameteriv_data_length
5556 (reply) * sizeof(GLint));
5557 free(reply);
5558 #else
5559 GLubyte const *pc =
5560 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv,
5561 cmdlen);
5562 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5563 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5564 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5565 UnlockDisplay(dpy);
5566 SyncHandle();
5567 #endif /* USE_XCB */
5568 }
5569 return;
5570 }
5571
5572 #define X_GLrop_ColorSubTable 195
5573 void
5574 __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count,
5575 GLenum format, GLenum type, const GLvoid * data)
5576 {
5577 __GLXcontext *const gc = __glXGetCurrentContext();
5578 const GLuint compsize =
5579 (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
5580 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5581 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5582 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5583 if ((gc->pc + cmdlen) > gc->bufEnd) {
5584 (void) __glXFlushRenderBuffer(gc, gc->pc);
5585 }
5586 emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
5587 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5588 (void) memcpy((void *) (gc->pc + 28), (void *) (&start), 4);
5589 (void) memcpy((void *) (gc->pc + 32), (void *) (&count), 4);
5590 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5591 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5592 if (compsize > 0) {
5593 (*gc->fillImage) (gc, 1, count, 1, 1, format, type, data,
5594 gc->pc + 44, gc->pc + 4);
5595 } else {
5596 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5597 default_pixel_store_1D_size);
5598 }
5599 gc->pc += cmdlen;
5600 if (gc->pc > gc->limit) {
5601 (void) __glXFlushRenderBuffer(gc, gc->pc);
5602 }
5603 } else {
5604 const GLint op = X_GLrop_ColorSubTable;
5605 const GLuint cmdlenLarge = cmdlen + 4;
5606 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5607 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5608 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5609 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5610 (void) memcpy((void *) (pc + 32), (void *) (&start), 4);
5611 (void) memcpy((void *) (pc + 36), (void *) (&count), 4);
5612 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5613 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5614 __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type,
5615 data, pc + 48, pc + 8);
5616 }
5617 }
5618 }
5619
5620 #define X_GLrop_CopyColorSubTable 196
5621 void
5622 __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y,
5623 GLsizei width)
5624 {
5625 __GLXcontext *const gc = __glXGetCurrentContext();
5626 const GLuint cmdlen = 24;
5627 emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
5628 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5629 (void) memcpy((void *) (gc->pc + 8), (void *) (&start), 4);
5630 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5631 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5632 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5633 gc->pc += cmdlen;
5634 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5635 (void) __glXFlushRenderBuffer(gc, gc->pc);
5636 }
5637 }
5638
5639 static void
5640 __glx_ConvolutionFilter_1D2D(unsigned opcode, unsigned dim, GLenum target,
5641 GLenum internalformat, GLsizei width,
5642 GLsizei height, GLenum format, GLenum type,
5643 const GLvoid * image)
5644 {
5645 __GLXcontext *const gc = __glXGetCurrentContext();
5646 const GLuint compsize =
5647 (image != NULL) ? __glImageSize(width, height, 1, format, type,
5648 target) : 0;
5649 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
5650 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5651 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5652 if ((gc->pc + cmdlen) > gc->bufEnd) {
5653 (void) __glXFlushRenderBuffer(gc, gc->pc);
5654 }
5655 emit_header(gc->pc, opcode, cmdlen);
5656 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5657 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5658 4);
5659 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5660 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
5661 (void) memcpy((void *) (gc->pc + 40), (void *) (&format), 4);
5662 (void) memcpy((void *) (gc->pc + 44), (void *) (&type), 4);
5663 if (compsize > 0) {
5664 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5665 image, gc->pc + 48, gc->pc + 4);
5666 } else {
5667 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5668 default_pixel_store_2D_size);
5669 }
5670 gc->pc += cmdlen;
5671 if (gc->pc > gc->limit) {
5672 (void) __glXFlushRenderBuffer(gc, gc->pc);
5673 }
5674 } else {
5675 const GLint op = opcode;
5676 const GLuint cmdlenLarge = cmdlen + 4;
5677 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5678 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5679 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5680 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5681 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5682 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5683 (void) memcpy((void *) (pc + 40), (void *) (&height), 4);
5684 (void) memcpy((void *) (pc + 44), (void *) (&format), 4);
5685 (void) memcpy((void *) (pc + 48), (void *) (&type), 4);
5686 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5687 type, image, pc + 52, pc + 8);
5688 }
5689 }
5690 }
5691
5692 #define X_GLrop_ConvolutionFilter1D 4101
5693 void
5694 __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat,
5695 GLsizei width, GLenum format, GLenum type,
5696 const GLvoid * image)
5697 {
5698 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target,
5699 internalformat, width, 1, format, type,
5700 image);
5701 }
5702
5703 #define X_GLrop_ConvolutionFilter2D 4102
5704 void
5705 __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat,
5706 GLsizei width, GLsizei height, GLenum format,
5707 GLenum type, const GLvoid * image)
5708 {
5709 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target,
5710 internalformat, width, height, format, type,
5711 image);
5712 }
5713
5714 #define X_GLrop_ConvolutionParameterf 4103
5715 void
5716 __indirect_glConvolutionParameterf(GLenum target, GLenum pname,
5717 GLfloat params)
5718 {
5719 __GLXcontext *const gc = __glXGetCurrentContext();
5720 const GLuint cmdlen = 16;
5721 emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
5722 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5723 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5724 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
5725 gc->pc += cmdlen;
5726 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5727 (void) __glXFlushRenderBuffer(gc, gc->pc);
5728 }
5729 }
5730
5731 #define X_GLrop_ConvolutionParameterfv 4104
5732 void
5733 __indirect_glConvolutionParameterfv(GLenum target, GLenum pname,
5734 const GLfloat * params)
5735 {
5736 __GLXcontext *const gc = __glXGetCurrentContext();
5737 const GLuint compsize = __glConvolutionParameterfv_size(pname);
5738 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5739 emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
5740 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5741 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5742 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5743 gc->pc += cmdlen;
5744 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5745 (void) __glXFlushRenderBuffer(gc, gc->pc);
5746 }
5747 }
5748
5749 #define X_GLrop_ConvolutionParameteri 4105
5750 void
5751 __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
5752 {
5753 __GLXcontext *const gc = __glXGetCurrentContext();
5754 const GLuint cmdlen = 16;
5755 emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
5756 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5757 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5758 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
5759 gc->pc += cmdlen;
5760 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5761 (void) __glXFlushRenderBuffer(gc, gc->pc);
5762 }
5763 }
5764
5765 #define X_GLrop_ConvolutionParameteriv 4106
5766 void
5767 __indirect_glConvolutionParameteriv(GLenum target, GLenum pname,
5768 const GLint * params)
5769 {
5770 __GLXcontext *const gc = __glXGetCurrentContext();
5771 const GLuint compsize = __glConvolutionParameteriv_size(pname);
5772 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5773 emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
5774 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5775 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5776 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5777 gc->pc += cmdlen;
5778 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5779 (void) __glXFlushRenderBuffer(gc, gc->pc);
5780 }
5781 }
5782
5783 #define X_GLrop_CopyConvolutionFilter1D 4107
5784 void
5785 __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat,
5786 GLint x, GLint y, GLsizei width)
5787 {
5788 __GLXcontext *const gc = __glXGetCurrentContext();
5789 const GLuint cmdlen = 24;
5790 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
5791 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5792 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
5793 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5794 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5795 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5796 gc->pc += cmdlen;
5797 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5798 (void) __glXFlushRenderBuffer(gc, gc->pc);
5799 }
5800 }
5801
5802 #define X_GLrop_CopyConvolutionFilter2D 4108
5803 void
5804 __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat,
5805 GLint x, GLint y, GLsizei width,
5806 GLsizei height)
5807 {
5808 __GLXcontext *const gc = __glXGetCurrentContext();
5809 const GLuint cmdlen = 28;
5810 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
5811 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5812 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
5813 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5814 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5815 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5816 (void) memcpy((void *) (gc->pc + 24), (void *) (&height), 4);
5817 gc->pc += cmdlen;
5818 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5819 (void) __glXFlushRenderBuffer(gc, gc->pc);
5820 }
5821 }
5822
5823 #define X_GLsop_GetConvolutionFilter 150
5824 void
5825 __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type,
5826 GLvoid * image)
5827 {
5828 __GLXcontext *const gc = __glXGetCurrentContext();
5829 const __GLXattribute *const state = gc->client_state_private;
5830 Display *const dpy = gc->currentDpy;
5831 const GLuint cmdlen = 16;
5832 if (__builtin_expect(dpy != NULL, 1)) {
5833 #ifdef USE_XCB
5834 xcb_connection_t *c = XGetXCBConnection(dpy);
5835 (void) __glXFlushRenderBuffer(gc, gc->pc);
5836 xcb_glx_get_convolution_filter_reply_t *reply =
5837 xcb_glx_get_convolution_filter_reply(c,
5838 xcb_glx_get_convolution_filter
5839 (c, gc->currentContextTag,
5840 target, format, type,
5841 state->storePack.
5842 swapEndian), NULL);
5843 (void) memcpy(image, xcb_glx_get_convolution_filter_data(reply),
5844 xcb_glx_get_convolution_filter_data_length(reply) *
5845 sizeof(GLvoid));
5846 free(reply);
5847 #else
5848 GLubyte const *pc =
5849 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
5850 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5851 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5852 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5853 *(int32_t *) (pc + 12) = 0;
5854 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5855 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
5856 GL_TRUE);
5857 UnlockDisplay(dpy);
5858 SyncHandle();
5859 #endif /* USE_XCB */
5860 }
5861 return;
5862 }
5863
5864 #define X_GLsop_GetConvolutionParameterfv 151
5865 void
5866 __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
5867 GLfloat * params)
5868 {
5869 __GLXcontext *const gc = __glXGetCurrentContext();
5870 Display *const dpy = gc->currentDpy;
5871 const GLuint cmdlen = 8;
5872 if (__builtin_expect(dpy != NULL, 1)) {
5873 #ifdef USE_XCB
5874 xcb_connection_t *c = XGetXCBConnection(dpy);
5875 (void) __glXFlushRenderBuffer(gc, gc->pc);
5876 xcb_glx_get_convolution_parameterfv_reply_t *reply =
5877 xcb_glx_get_convolution_parameterfv_reply(c,
5878 xcb_glx_get_convolution_parameterfv
5879 (c,
5880 gc->currentContextTag,
5881 target, pname), NULL);
5882 if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 0)
5883 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5884 else
5885 (void) memcpy(params,
5886 xcb_glx_get_convolution_parameterfv_data(reply),
5887 xcb_glx_get_convolution_parameterfv_data_length
5888 (reply) * sizeof(GLfloat));
5889 free(reply);
5890 #else
5891 GLubyte const *pc =
5892 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv,
5893 cmdlen);
5894 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5895 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5896 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5897 UnlockDisplay(dpy);
5898 SyncHandle();
5899 #endif /* USE_XCB */
5900 }
5901 return;
5902 }
5903
5904 #define X_GLsop_GetConvolutionParameteriv 152
5905 void
5906 __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
5907 GLint * params)
5908 {
5909 __GLXcontext *const gc = __glXGetCurrentContext();
5910 Display *const dpy = gc->currentDpy;
5911 const GLuint cmdlen = 8;
5912 if (__builtin_expect(dpy != NULL, 1)) {
5913 #ifdef USE_XCB
5914 xcb_connection_t *c = XGetXCBConnection(dpy);
5915 (void) __glXFlushRenderBuffer(gc, gc->pc);
5916 xcb_glx_get_convolution_parameteriv_reply_t *reply =
5917 xcb_glx_get_convolution_parameteriv_reply(c,
5918 xcb_glx_get_convolution_parameteriv
5919 (c,
5920 gc->currentContextTag,
5921 target, pname), NULL);
5922 if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 0)
5923 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5924 else
5925 (void) memcpy(params,
5926 xcb_glx_get_convolution_parameteriv_data(reply),
5927 xcb_glx_get_convolution_parameteriv_data_length
5928 (reply) * sizeof(GLint));
5929 free(reply);
5930 #else
5931 GLubyte const *pc =
5932 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv,
5933 cmdlen);
5934 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5935 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5936 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5937 UnlockDisplay(dpy);
5938 SyncHandle();
5939 #endif /* USE_XCB */
5940 }
5941 return;
5942 }
5943
5944 #define X_GLsop_GetHistogram 154
5945 void
5946 __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
5947 GLenum type, GLvoid * values)
5948 {
5949 __GLXcontext *const gc = __glXGetCurrentContext();
5950 const __GLXattribute *const state = gc->client_state_private;
5951 Display *const dpy = gc->currentDpy;
5952 const GLuint cmdlen = 16;
5953 if (__builtin_expect(dpy != NULL, 1)) {
5954 #ifdef USE_XCB
5955 xcb_connection_t *c = XGetXCBConnection(dpy);
5956 (void) __glXFlushRenderBuffer(gc, gc->pc);
5957 xcb_glx_get_histogram_reply_t *reply =
5958 xcb_glx_get_histogram_reply(c,
5959 xcb_glx_get_histogram(c,
5960 gc->
5961 currentContextTag,
5962 target, reset,
5963 format, type,
5964 state->
5965 storePack.
5966 swapEndian),
5967 NULL);
5968 (void) memcpy(values, xcb_glx_get_histogram_data(reply),
5969 xcb_glx_get_histogram_data_length(reply) *
5970 sizeof(GLvoid));
5971 free(reply);
5972 #else
5973 GLubyte const *pc =
5974 __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
5975 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5976 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5977 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5978 *(int32_t *) (pc + 12) = 0;
5979 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5980 *(int8_t *) (pc + 13) = reset;
5981 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
5982 GL_TRUE);
5983 UnlockDisplay(dpy);
5984 SyncHandle();
5985 #endif /* USE_XCB */
5986 }
5987 return;
5988 }
5989
5990 #define X_GLsop_GetHistogramParameterfv 155
5991 void
5992 __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
5993 GLfloat * params)
5994 {
5995 __GLXcontext *const gc = __glXGetCurrentContext();
5996 Display *const dpy = gc->currentDpy;
5997 const GLuint cmdlen = 8;
5998 if (__builtin_expect(dpy != NULL, 1)) {
5999 #ifdef USE_XCB
6000 xcb_connection_t *c = XGetXCBConnection(dpy);
6001 (void) __glXFlushRenderBuffer(gc, gc->pc);
6002 xcb_glx_get_histogram_parameterfv_reply_t *reply =
6003 xcb_glx_get_histogram_parameterfv_reply(c,
6004 xcb_glx_get_histogram_parameterfv
6005 (c, gc->currentContextTag,
6006 target, pname), NULL);
6007 if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 0)
6008 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6009 else
6010 (void) memcpy(params,
6011 xcb_glx_get_histogram_parameterfv_data(reply),
6012 xcb_glx_get_histogram_parameterfv_data_length(reply)
6013 * sizeof(GLfloat));
6014 free(reply);
6015 #else
6016 GLubyte const *pc =
6017 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv,
6018 cmdlen);
6019 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6020 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6021 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6022 UnlockDisplay(dpy);
6023 SyncHandle();
6024 #endif /* USE_XCB */
6025 }
6026 return;
6027 }
6028
6029 #define X_GLsop_GetHistogramParameteriv 156
6030 void
6031 __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
6032 GLint * params)
6033 {
6034 __GLXcontext *const gc = __glXGetCurrentContext();
6035 Display *const dpy = gc->currentDpy;
6036 const GLuint cmdlen = 8;
6037 if (__builtin_expect(dpy != NULL, 1)) {
6038 #ifdef USE_XCB
6039 xcb_connection_t *c = XGetXCBConnection(dpy);
6040 (void) __glXFlushRenderBuffer(gc, gc->pc);
6041 xcb_glx_get_histogram_parameteriv_reply_t *reply =
6042 xcb_glx_get_histogram_parameteriv_reply(c,
6043 xcb_glx_get_histogram_parameteriv
6044 (c, gc->currentContextTag,
6045 target, pname), NULL);
6046 if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 0)
6047 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6048 else
6049 (void) memcpy(params,
6050 xcb_glx_get_histogram_parameteriv_data(reply),
6051 xcb_glx_get_histogram_parameteriv_data_length(reply)
6052 * sizeof(GLint));
6053 free(reply);
6054 #else
6055 GLubyte const *pc =
6056 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv,
6057 cmdlen);
6058 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6059 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6060 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6061 UnlockDisplay(dpy);
6062 SyncHandle();
6063 #endif /* USE_XCB */
6064 }
6065 return;
6066 }
6067
6068 #define X_GLsop_GetMinmax 157
6069 void
6070 __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
6071 GLenum type, GLvoid * values)
6072 {
6073 __GLXcontext *const gc = __glXGetCurrentContext();
6074 const __GLXattribute *const state = gc->client_state_private;
6075 Display *const dpy = gc->currentDpy;
6076 const GLuint cmdlen = 16;
6077 if (__builtin_expect(dpy != NULL, 1)) {
6078 #ifdef USE_XCB
6079 xcb_connection_t *c = XGetXCBConnection(dpy);
6080 (void) __glXFlushRenderBuffer(gc, gc->pc);
6081 xcb_glx_get_minmax_reply_t *reply =
6082 xcb_glx_get_minmax_reply(c,
6083 xcb_glx_get_minmax(c,
6084 gc->currentContextTag,
6085 target, reset, format,
6086 type,
6087 state->storePack.
6088 swapEndian), NULL);
6089 (void) memcpy(values, xcb_glx_get_minmax_data(reply),
6090 xcb_glx_get_minmax_data_length(reply) * sizeof(GLvoid));
6091 free(reply);
6092 #else
6093 GLubyte const *pc =
6094 __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
6095 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6096 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6097 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6098 *(int32_t *) (pc + 12) = 0;
6099 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6100 *(int8_t *) (pc + 13) = reset;
6101 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6102 GL_FALSE);
6103 UnlockDisplay(dpy);
6104 SyncHandle();
6105 #endif /* USE_XCB */
6106 }
6107 return;
6108 }
6109
6110 #define X_GLsop_GetMinmaxParameterfv 158
6111 void
6112 __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
6113 GLfloat * params)
6114 {
6115 __GLXcontext *const gc = __glXGetCurrentContext();
6116 Display *const dpy = gc->currentDpy;
6117 const GLuint cmdlen = 8;
6118 if (__builtin_expect(dpy != NULL, 1)) {
6119 #ifdef USE_XCB
6120 xcb_connection_t *c = XGetXCBConnection(dpy);
6121 (void) __glXFlushRenderBuffer(gc, gc->pc);
6122 xcb_glx_get_minmax_parameterfv_reply_t *reply =
6123 xcb_glx_get_minmax_parameterfv_reply(c,
6124 xcb_glx_get_minmax_parameterfv
6125 (c, gc->currentContextTag,
6126 target, pname), NULL);
6127 if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 0)
6128 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6129 else
6130 (void) memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply),
6131 xcb_glx_get_minmax_parameterfv_data_length(reply) *
6132 sizeof(GLfloat));
6133 free(reply);
6134 #else
6135 GLubyte const *pc =
6136 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
6137 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6138 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6139 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6140 UnlockDisplay(dpy);
6141 SyncHandle();
6142 #endif /* USE_XCB */
6143 }
6144 return;
6145 }
6146
6147 #define X_GLsop_GetMinmaxParameteriv 159
6148 void
6149 __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
6150 {
6151 __GLXcontext *const gc = __glXGetCurrentContext();
6152 Display *const dpy = gc->currentDpy;
6153 const GLuint cmdlen = 8;
6154 if (__builtin_expect(dpy != NULL, 1)) {
6155 #ifdef USE_XCB
6156 xcb_connection_t *c = XGetXCBConnection(dpy);
6157 (void) __glXFlushRenderBuffer(gc, gc->pc);
6158 xcb_glx_get_minmax_parameteriv_reply_t *reply =
6159 xcb_glx_get_minmax_parameteriv_reply(c,
6160 xcb_glx_get_minmax_parameteriv
6161 (c, gc->currentContextTag,
6162 target, pname), NULL);
6163 if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 0)
6164 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6165 else
6166 (void) memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply),
6167 xcb_glx_get_minmax_parameteriv_data_length(reply) *
6168 sizeof(GLint));
6169 free(reply);
6170 #else
6171 GLubyte const *pc =
6172 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
6173 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6174 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6175 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6176 UnlockDisplay(dpy);
6177 SyncHandle();
6178 #endif /* USE_XCB */
6179 }
6180 return;
6181 }
6182
6183 #define X_GLrop_Histogram 4110
6184 void
6185 __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
6186 GLboolean sink)
6187 {
6188 __GLXcontext *const gc = __glXGetCurrentContext();
6189 const GLuint cmdlen = 20;
6190 emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
6191 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6192 (void) memcpy((void *) (gc->pc + 8), (void *) (&width), 4);
6193 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
6194 (void) memcpy((void *) (gc->pc + 16), (void *) (&sink), 1);
6195 gc->pc += cmdlen;
6196 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6197 (void) __glXFlushRenderBuffer(gc, gc->pc);
6198 }
6199 }
6200
6201 #define X_GLrop_Minmax 4111
6202 void
6203 __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
6204 {
6205 __GLXcontext *const gc = __glXGetCurrentContext();
6206 const GLuint cmdlen = 16;
6207 emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
6208 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6209 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6210 (void) memcpy((void *) (gc->pc + 12), (void *) (&sink), 1);
6211 gc->pc += cmdlen;
6212 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6213 (void) __glXFlushRenderBuffer(gc, gc->pc);
6214 }
6215 }
6216
6217 #define X_GLrop_ResetHistogram 4112
6218 void
6219 __indirect_glResetHistogram(GLenum target)
6220 {
6221 __GLXcontext *const gc = __glXGetCurrentContext();
6222 const GLuint cmdlen = 8;
6223 emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
6224 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6225 gc->pc += cmdlen;
6226 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6227 (void) __glXFlushRenderBuffer(gc, gc->pc);
6228 }
6229 }
6230
6231 #define X_GLrop_ResetMinmax 4113
6232 void
6233 __indirect_glResetMinmax(GLenum target)
6234 {
6235 __GLXcontext *const gc = __glXGetCurrentContext();
6236 const GLuint cmdlen = 8;
6237 emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
6238 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6239 gc->pc += cmdlen;
6240 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6241 (void) __glXFlushRenderBuffer(gc, gc->pc);
6242 }
6243 }
6244
6245 static void
6246 __glx_TexImage_3D4D(unsigned opcode, unsigned dim, GLenum target, GLint level,
6247 GLint internalformat, GLsizei width, GLsizei height,
6248 GLsizei depth, GLsizei extent, GLint border,
6249 GLenum format, GLenum type, const GLvoid * pixels)
6250 {
6251 __GLXcontext *const gc = __glXGetCurrentContext();
6252 const GLuint compsize =
6253 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6254 target) : 0;
6255 const GLuint cmdlen = 84 + __GLX_PAD(compsize);
6256 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6257 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6258 if ((gc->pc + cmdlen) > gc->bufEnd) {
6259 (void) __glXFlushRenderBuffer(gc, gc->pc);
6260 }
6261 emit_header(gc->pc, opcode, cmdlen);
6262 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6263 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6264 (void) memcpy((void *) (gc->pc + 48), (void *) (&internalformat),
6265 4);
6266 (void) memcpy((void *) (gc->pc + 52), (void *) (&width), 4);
6267 (void) memcpy((void *) (gc->pc + 56), (void *) (&height), 4);
6268 (void) memcpy((void *) (gc->pc + 60), (void *) (&depth), 4);
6269 (void) memcpy((void *) (gc->pc + 64), (void *) (&extent), 4);
6270 (void) memcpy((void *) (gc->pc + 68), (void *) (&border), 4);
6271 (void) memcpy((void *) (gc->pc + 72), (void *) (&format), 4);
6272 (void) memcpy((void *) (gc->pc + 76), (void *) (&type), 4);
6273 (void) memcpy((void *) (gc->pc + 80),
6274 (void *) ((pixels == NULL) ? one : zero), 4);
6275 if (compsize > 0) {
6276 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6277 pixels, gc->pc + 84, gc->pc + 4);
6278 } else {
6279 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6280 default_pixel_store_4D_size);
6281 }
6282 gc->pc += cmdlen;
6283 if (gc->pc > gc->limit) {
6284 (void) __glXFlushRenderBuffer(gc, gc->pc);
6285 }
6286 } else {
6287 const GLint op = opcode;
6288 const GLuint cmdlenLarge = cmdlen + 4;
6289 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6290 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6291 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6292 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6293 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6294 (void) memcpy((void *) (pc + 52), (void *) (&internalformat), 4);
6295 (void) memcpy((void *) (pc + 56), (void *) (&width), 4);
6296 (void) memcpy((void *) (pc + 60), (void *) (&height), 4);
6297 (void) memcpy((void *) (pc + 64), (void *) (&depth), 4);
6298 (void) memcpy((void *) (pc + 68), (void *) (&extent), 4);
6299 (void) memcpy((void *) (pc + 72), (void *) (&border), 4);
6300 (void) memcpy((void *) (pc + 76), (void *) (&format), 4);
6301 (void) memcpy((void *) (pc + 80), (void *) (&type), 4);
6302 (void) memcpy((void *) (pc + 84), zero, 4);
6303 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6304 format, type, pixels, pc + 88, pc + 8);
6305 }
6306 }
6307 }
6308
6309 #define X_GLrop_TexImage3D 4114
6310 void
6311 __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat,
6312 GLsizei width, GLsizei height, GLsizei depth,
6313 GLint border, GLenum format, GLenum type,
6314 const GLvoid * pixels)
6315 {
6316 __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat,
6317 width, height, depth, 1, border, format, type,
6318 pixels);
6319 }
6320
6321 static void
6322 __glx_TexSubImage_3D4D(unsigned opcode, unsigned dim, GLenum target,
6323 GLint level, GLint xoffset, GLint yoffset,
6324 GLint zoffset, GLint woffset, GLsizei width,
6325 GLsizei height, GLsizei depth, GLsizei extent,
6326 GLenum format, GLenum type, const GLvoid * pixels)
6327 {
6328 __GLXcontext *const gc = __glXGetCurrentContext();
6329 const GLuint compsize =
6330 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6331 target) : 0;
6332 const GLuint cmdlen = 92 + __GLX_PAD(compsize);
6333 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6334 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6335 if ((gc->pc + cmdlen) > gc->bufEnd) {
6336 (void) __glXFlushRenderBuffer(gc, gc->pc);
6337 }
6338 emit_header(gc->pc, opcode, cmdlen);
6339 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6340 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6341 (void) memcpy((void *) (gc->pc + 48), (void *) (&xoffset), 4);
6342 (void) memcpy((void *) (gc->pc + 52), (void *) (&yoffset), 4);
6343 (void) memcpy((void *) (gc->pc + 56), (void *) (&zoffset), 4);
6344 (void) memcpy((void *) (gc->pc + 60), (void *) (&woffset), 4);
6345 (void) memcpy((void *) (gc->pc + 64), (void *) (&width), 4);
6346 (void) memcpy((void *) (gc->pc + 68), (void *) (&height), 4);
6347 (void) memcpy((void *) (gc->pc + 72), (void *) (&depth), 4);
6348 (void) memcpy((void *) (gc->pc + 76), (void *) (&extent), 4);
6349 (void) memcpy((void *) (gc->pc + 80), (void *) (&format), 4);
6350 (void) memcpy((void *) (gc->pc + 84), (void *) (&type), 4);
6351 (void) memcpy((void *) (gc->pc + 88),
6352 (void *) ((pixels == NULL) ? one : zero), 4);
6353 if (compsize > 0) {
6354 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6355 pixels, gc->pc + 92, gc->pc + 4);
6356 } else {
6357 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6358 default_pixel_store_4D_size);
6359 }
6360 gc->pc += cmdlen;
6361 if (gc->pc > gc->limit) {
6362 (void) __glXFlushRenderBuffer(gc, gc->pc);
6363 }
6364 } else {
6365 const GLint op = opcode;
6366 const GLuint cmdlenLarge = cmdlen + 4;
6367 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6368 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6369 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6370 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6371 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6372 (void) memcpy((void *) (pc + 52), (void *) (&xoffset), 4);
6373 (void) memcpy((void *) (pc + 56), (void *) (&yoffset), 4);
6374 (void) memcpy((void *) (pc + 60), (void *) (&zoffset), 4);
6375 (void) memcpy((void *) (pc + 64), (void *) (&woffset), 4);
6376 (void) memcpy((void *) (pc + 68), (void *) (&width), 4);
6377 (void) memcpy((void *) (pc + 72), (void *) (&height), 4);
6378 (void) memcpy((void *) (pc + 76), (void *) (&depth), 4);
6379 (void) memcpy((void *) (pc + 80), (void *) (&extent), 4);
6380 (void) memcpy((void *) (pc + 84), (void *) (&format), 4);
6381 (void) memcpy((void *) (pc + 88), (void *) (&type), 4);
6382 (void) memcpy((void *) (pc + 92), zero, 4);
6383 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6384 format, type, pixels, pc + 96, pc + 8);
6385 }
6386 }
6387 }
6388
6389 #define X_GLrop_TexSubImage3D 4115
6390 void
6391 __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6392 GLint yoffset, GLint zoffset, GLsizei width,
6393 GLsizei height, GLsizei depth, GLenum format,
6394 GLenum type, const GLvoid * pixels)
6395 {
6396 __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset,
6397 yoffset, zoffset, 1, width, height, depth, 1,
6398 format, type, pixels);
6399 }
6400
6401 #define X_GLrop_CopyTexSubImage3D 4123
6402 void
6403 __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6404 GLint yoffset, GLint zoffset, GLint x, GLint y,
6405 GLsizei width, GLsizei height)
6406 {
6407 __GLXcontext *const gc = __glXGetCurrentContext();
6408 const GLuint cmdlen = 40;
6409 emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
6410 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6411 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
6412 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
6413 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
6414 (void) memcpy((void *) (gc->pc + 20), (void *) (&zoffset), 4);
6415 (void) memcpy((void *) (gc->pc + 24), (void *) (&x), 4);
6416 (void) memcpy((void *) (gc->pc + 28), (void *) (&y), 4);
6417 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
6418 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
6419 gc->pc += cmdlen;
6420 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6421 (void) __glXFlushRenderBuffer(gc, gc->pc);
6422 }
6423 }
6424
6425 #define X_GLrop_ActiveTextureARB 197
6426 void
6427 __indirect_glActiveTextureARB(GLenum texture)
6428 {
6429 __GLXcontext *const gc = __glXGetCurrentContext();
6430 const GLuint cmdlen = 8;
6431 emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
6432 (void) memcpy((void *) (gc->pc + 4), (void *) (&texture), 4);
6433 gc->pc += cmdlen;
6434 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6435 (void) __glXFlushRenderBuffer(gc, gc->pc);
6436 }
6437 }
6438
6439 #define X_GLrop_MultiTexCoord1dvARB 198
6440 void
6441 __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
6442 {
6443 __GLXcontext *const gc = __glXGetCurrentContext();
6444 const GLuint cmdlen = 16;
6445 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
6446 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
6447 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
6448 gc->pc += cmdlen;
6449 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6450 (void) __glXFlushRenderBuffer(gc, gc->pc);
6451 }
6452 }
6453
6454 #define X_GLrop_MultiTexCoord1dvARB 198
6455 void
6456 __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
6457 {
6458 __GLXcontext *const gc = __glXGetCurrentContext();
6459 const GLuint cmdlen = 16;
6460 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
6461 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 8);
6462 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
6463 gc->pc += cmdlen;
6464 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6465 (void) __glXFlushRenderBuffer(gc, gc->pc);
6466 }
6467 }
6468
6469 #define X_GLrop_MultiTexCoord1fvARB 199
6470 void
6471 __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
6472 {
6473 __GLXcontext *const gc = __glXGetCurrentContext();
6474 const GLuint cmdlen = 12;
6475 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
6476 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6477 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6478 gc->pc += cmdlen;
6479 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6480 (void) __glXFlushRenderBuffer(gc, gc->pc);
6481 }
6482 }
6483
6484 #define X_GLrop_MultiTexCoord1fvARB 199
6485 void
6486 __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
6487 {
6488 __GLXcontext *const gc = __glXGetCurrentContext();
6489 const GLuint cmdlen = 12;
6490 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
6491 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6492 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
6493 gc->pc += cmdlen;
6494 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6495 (void) __glXFlushRenderBuffer(gc, gc->pc);
6496 }
6497 }
6498
6499 #define X_GLrop_MultiTexCoord1ivARB 200
6500 void
6501 __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
6502 {
6503 __GLXcontext *const gc = __glXGetCurrentContext();
6504 const GLuint cmdlen = 12;
6505 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
6506 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6507 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6508 gc->pc += cmdlen;
6509 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6510 (void) __glXFlushRenderBuffer(gc, gc->pc);
6511 }
6512 }
6513
6514 #define X_GLrop_MultiTexCoord1ivARB 200
6515 void
6516 __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
6517 {
6518 __GLXcontext *const gc = __glXGetCurrentContext();
6519 const GLuint cmdlen = 12;
6520 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
6521 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6522 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
6523 gc->pc += cmdlen;
6524 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6525 (void) __glXFlushRenderBuffer(gc, gc->pc);
6526 }
6527 }
6528
6529 #define X_GLrop_MultiTexCoord1svARB 201
6530 void
6531 __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
6532 {
6533 __GLXcontext *const gc = __glXGetCurrentContext();
6534 const GLuint cmdlen = 12;
6535 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
6536 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6537 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
6538 gc->pc += cmdlen;
6539 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6540 (void) __glXFlushRenderBuffer(gc, gc->pc);
6541 }
6542 }
6543
6544 #define X_GLrop_MultiTexCoord1svARB 201
6545 void
6546 __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
6547 {
6548 __GLXcontext *const gc = __glXGetCurrentContext();
6549 const GLuint cmdlen = 12;
6550 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
6551 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6552 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
6553 gc->pc += cmdlen;
6554 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6555 (void) __glXFlushRenderBuffer(gc, gc->pc);
6556 }
6557 }
6558
6559 #define X_GLrop_MultiTexCoord2dvARB 202
6560 void
6561 __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
6562 {
6563 __GLXcontext *const gc = __glXGetCurrentContext();
6564 const GLuint cmdlen = 24;
6565 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
6566 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
6567 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
6568 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
6569 gc->pc += cmdlen;
6570 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6571 (void) __glXFlushRenderBuffer(gc, gc->pc);
6572 }
6573 }
6574
6575 #define X_GLrop_MultiTexCoord2dvARB 202
6576 void
6577 __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
6578 {
6579 __GLXcontext *const gc = __glXGetCurrentContext();
6580 const GLuint cmdlen = 24;
6581 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
6582 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 16);
6583 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
6584 gc->pc += cmdlen;
6585 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6586 (void) __glXFlushRenderBuffer(gc, gc->pc);
6587 }
6588 }
6589
6590 #define X_GLrop_MultiTexCoord2fvARB 203
6591 void
6592 __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
6593 {
6594 __GLXcontext *const gc = __glXGetCurrentContext();
6595 const GLuint cmdlen = 16;
6596 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
6597 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6598 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6599 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
6600 gc->pc += cmdlen;
6601 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6602 (void) __glXFlushRenderBuffer(gc, gc->pc);
6603 }
6604 }
6605
6606 #define X_GLrop_MultiTexCoord2fvARB 203
6607 void
6608 __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
6609 {
6610 __GLXcontext *const gc = __glXGetCurrentContext();
6611 const GLuint cmdlen = 16;
6612 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
6613 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6614 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
6615 gc->pc += cmdlen;
6616 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6617 (void) __glXFlushRenderBuffer(gc, gc->pc);
6618 }
6619 }
6620
6621 #define X_GLrop_MultiTexCoord2ivARB 204
6622 void
6623 __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
6624 {
6625 __GLXcontext *const gc = __glXGetCurrentContext();
6626 const GLuint cmdlen = 16;
6627 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
6628 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6629 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6630 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
6631 gc->pc += cmdlen;
6632 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6633 (void) __glXFlushRenderBuffer(gc, gc->pc);
6634 }
6635 }
6636
6637 #define X_GLrop_MultiTexCoord2ivARB 204
6638 void
6639 __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
6640 {
6641 __GLXcontext *const gc = __glXGetCurrentContext();
6642 const GLuint cmdlen = 16;
6643 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
6644 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6645 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
6646 gc->pc += cmdlen;
6647 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6648 (void) __glXFlushRenderBuffer(gc, gc->pc);
6649 }
6650 }
6651
6652 #define X_GLrop_MultiTexCoord2svARB 205
6653 void
6654 __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
6655 {
6656 __GLXcontext *const gc = __glXGetCurrentContext();
6657 const GLuint cmdlen = 12;
6658 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
6659 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6660 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
6661 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
6662 gc->pc += cmdlen;
6663 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6664 (void) __glXFlushRenderBuffer(gc, gc->pc);
6665 }
6666 }
6667
6668 #define X_GLrop_MultiTexCoord2svARB 205
6669 void
6670 __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
6671 {
6672 __GLXcontext *const gc = __glXGetCurrentContext();
6673 const GLuint cmdlen = 12;
6674 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
6675 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6676 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
6677 gc->pc += cmdlen;
6678 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6679 (void) __glXFlushRenderBuffer(gc, gc->pc);
6680 }
6681 }
6682
6683 #define X_GLrop_MultiTexCoord3dvARB 206
6684 void
6685 __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t,
6686 GLdouble r)
6687 {
6688 __GLXcontext *const gc = __glXGetCurrentContext();
6689 const GLuint cmdlen = 32;
6690 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
6691 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
6692 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
6693 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
6694 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
6695 gc->pc += cmdlen;
6696 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6697 (void) __glXFlushRenderBuffer(gc, gc->pc);
6698 }
6699 }
6700
6701 #define X_GLrop_MultiTexCoord3dvARB 206
6702 void
6703 __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
6704 {
6705 __GLXcontext *const gc = __glXGetCurrentContext();
6706 const GLuint cmdlen = 32;
6707 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
6708 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 24);
6709 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
6710 gc->pc += cmdlen;
6711 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6712 (void) __glXFlushRenderBuffer(gc, gc->pc);
6713 }
6714 }
6715
6716 #define X_GLrop_MultiTexCoord3fvARB 207
6717 void
6718 __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t,
6719 GLfloat r)
6720 {
6721 __GLXcontext *const gc = __glXGetCurrentContext();
6722 const GLuint cmdlen = 20;
6723 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
6724 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6725 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6726 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
6727 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
6728 gc->pc += cmdlen;
6729 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6730 (void) __glXFlushRenderBuffer(gc, gc->pc);
6731 }
6732 }
6733
6734 #define X_GLrop_MultiTexCoord3fvARB 207
6735 void
6736 __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
6737 {
6738 __GLXcontext *const gc = __glXGetCurrentContext();
6739 const GLuint cmdlen = 20;
6740 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
6741 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6742 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
6743 gc->pc += cmdlen;
6744 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6745 (void) __glXFlushRenderBuffer(gc, gc->pc);
6746 }
6747 }
6748
6749 #define X_GLrop_MultiTexCoord3ivARB 208
6750 void
6751 __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
6752 {
6753 __GLXcontext *const gc = __glXGetCurrentContext();
6754 const GLuint cmdlen = 20;
6755 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
6756 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6757 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6758 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
6759 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
6760 gc->pc += cmdlen;
6761 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6762 (void) __glXFlushRenderBuffer(gc, gc->pc);
6763 }
6764 }
6765
6766 #define X_GLrop_MultiTexCoord3ivARB 208
6767 void
6768 __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
6769 {
6770 __GLXcontext *const gc = __glXGetCurrentContext();
6771 const GLuint cmdlen = 20;
6772 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
6773 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6774 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
6775 gc->pc += cmdlen;
6776 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6777 (void) __glXFlushRenderBuffer(gc, gc->pc);
6778 }
6779 }
6780
6781 #define X_GLrop_MultiTexCoord3svARB 209
6782 void
6783 __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t,
6784 GLshort r)
6785 {
6786 __GLXcontext *const gc = __glXGetCurrentContext();
6787 const GLuint cmdlen = 16;
6788 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
6789 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6790 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
6791 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
6792 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
6793 gc->pc += cmdlen;
6794 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6795 (void) __glXFlushRenderBuffer(gc, gc->pc);
6796 }
6797 }
6798
6799 #define X_GLrop_MultiTexCoord3svARB 209
6800 void
6801 __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
6802 {
6803 __GLXcontext *const gc = __glXGetCurrentContext();
6804 const GLuint cmdlen = 16;
6805 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
6806 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6807 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
6808 gc->pc += cmdlen;
6809 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6810 (void) __glXFlushRenderBuffer(gc, gc->pc);
6811 }
6812 }
6813
6814 #define X_GLrop_MultiTexCoord4dvARB 210
6815 void
6816 __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t,
6817 GLdouble r, GLdouble q)
6818 {
6819 __GLXcontext *const gc = __glXGetCurrentContext();
6820 const GLuint cmdlen = 40;
6821 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
6822 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
6823 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
6824 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
6825 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
6826 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
6827 gc->pc += cmdlen;
6828 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6829 (void) __glXFlushRenderBuffer(gc, gc->pc);
6830 }
6831 }
6832
6833 #define X_GLrop_MultiTexCoord4dvARB 210
6834 void
6835 __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
6836 {
6837 __GLXcontext *const gc = __glXGetCurrentContext();
6838 const GLuint cmdlen = 40;
6839 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
6840 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
6841 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
6842 gc->pc += cmdlen;
6843 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6844 (void) __glXFlushRenderBuffer(gc, gc->pc);
6845 }
6846 }
6847
6848 #define X_GLrop_MultiTexCoord4fvARB 211
6849 void
6850 __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t,
6851 GLfloat r, GLfloat q)
6852 {
6853 __GLXcontext *const gc = __glXGetCurrentContext();
6854 const GLuint cmdlen = 24;
6855 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
6856 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6857 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6858 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
6859 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
6860 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
6861 gc->pc += cmdlen;
6862 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6863 (void) __glXFlushRenderBuffer(gc, gc->pc);
6864 }
6865 }
6866
6867 #define X_GLrop_MultiTexCoord4fvARB 211
6868 void
6869 __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
6870 {
6871 __GLXcontext *const gc = __glXGetCurrentContext();
6872 const GLuint cmdlen = 24;
6873 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
6874 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6875 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
6876 gc->pc += cmdlen;
6877 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6878 (void) __glXFlushRenderBuffer(gc, gc->pc);
6879 }
6880 }
6881
6882 #define X_GLrop_MultiTexCoord4ivARB 212
6883 void
6884 __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r,
6885 GLint q)
6886 {
6887 __GLXcontext *const gc = __glXGetCurrentContext();
6888 const GLuint cmdlen = 24;
6889 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
6890 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6891 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6892 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
6893 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
6894 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
6895 gc->pc += cmdlen;
6896 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6897 (void) __glXFlushRenderBuffer(gc, gc->pc);
6898 }
6899 }
6900
6901 #define X_GLrop_MultiTexCoord4ivARB 212
6902 void
6903 __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
6904 {
6905 __GLXcontext *const gc = __glXGetCurrentContext();
6906 const GLuint cmdlen = 24;
6907 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
6908 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6909 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
6910 gc->pc += cmdlen;
6911 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6912 (void) __glXFlushRenderBuffer(gc, gc->pc);
6913 }
6914 }
6915
6916 #define X_GLrop_MultiTexCoord4svARB 213
6917 void
6918 __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t,
6919 GLshort r, GLshort q)
6920 {
6921 __GLXcontext *const gc = __glXGetCurrentContext();
6922 const GLuint cmdlen = 16;
6923 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
6924 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6925 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
6926 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
6927 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
6928 (void) memcpy((void *) (gc->pc + 14), (void *) (&q), 2);
6929 gc->pc += cmdlen;
6930 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6931 (void) __glXFlushRenderBuffer(gc, gc->pc);
6932 }
6933 }
6934
6935 #define X_GLrop_MultiTexCoord4svARB 213
6936 void
6937 __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
6938 {
6939 __GLXcontext *const gc = __glXGetCurrentContext();
6940 const GLuint cmdlen = 16;
6941 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
6942 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6943 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
6944 gc->pc += cmdlen;
6945 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6946 (void) __glXFlushRenderBuffer(gc, gc->pc);
6947 }
6948 }
6949
6950 #define X_GLrop_SampleCoverageARB 229
6951 void
6952 __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
6953 {
6954 __GLXcontext *const gc = __glXGetCurrentContext();
6955 const GLuint cmdlen = 12;
6956 emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen);
6957 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
6958 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
6959 gc->pc += cmdlen;
6960 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6961 (void) __glXFlushRenderBuffer(gc, gc->pc);
6962 }
6963 }
6964
6965 #define X_GLvop_GetProgramStringARB 1308
6966 void
6967 __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
6968 {
6969 __GLXcontext *const gc = __glXGetCurrentContext();
6970 Display *const dpy = gc->currentDpy;
6971 const GLuint cmdlen = 8;
6972 if (__builtin_expect(dpy != NULL, 1)) {
6973 GLubyte const *pc =
6974 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6975 X_GLvop_GetProgramStringARB, cmdlen);
6976 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6977 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6978 (void) __glXReadReply(dpy, 1, string, GL_TRUE);
6979 UnlockDisplay(dpy);
6980 SyncHandle();
6981 }
6982 return;
6983 }
6984
6985 #define X_GLvop_GetProgramivARB 1307
6986 void
6987 __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
6988 {
6989 __GLXcontext *const gc = __glXGetCurrentContext();
6990 Display *const dpy = gc->currentDpy;
6991 const GLuint cmdlen = 8;
6992 if (__builtin_expect(dpy != NULL, 1)) {
6993 GLubyte const *pc =
6994 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6995 X_GLvop_GetProgramivARB, cmdlen);
6996 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6997 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6998 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6999 UnlockDisplay(dpy);
7000 SyncHandle();
7001 }
7002 return;
7003 }
7004
7005 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7006 void
7007 __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x,
7008 GLdouble y, GLdouble z, GLdouble w)
7009 {
7010 __GLXcontext *const gc = __glXGetCurrentContext();
7011 const GLuint cmdlen = 44;
7012 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7013 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7014 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7015 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7016 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7017 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7018 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7019 gc->pc += cmdlen;
7020 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7021 (void) __glXFlushRenderBuffer(gc, gc->pc);
7022 }
7023 }
7024
7025 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7026 void
7027 __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index,
7028 const GLdouble * params)
7029 {
7030 __GLXcontext *const gc = __glXGetCurrentContext();
7031 const GLuint cmdlen = 44;
7032 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7033 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7034 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7035 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7036 gc->pc += cmdlen;
7037 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7038 (void) __glXFlushRenderBuffer(gc, gc->pc);
7039 }
7040 }
7041
7042 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7043 void
7044 __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x,
7045 GLfloat y, GLfloat z, GLfloat w)
7046 {
7047 __GLXcontext *const gc = __glXGetCurrentContext();
7048 const GLuint cmdlen = 28;
7049 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7050 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7051 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7052 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7053 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7054 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7055 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7056 gc->pc += cmdlen;
7057 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7058 (void) __glXFlushRenderBuffer(gc, gc->pc);
7059 }
7060 }
7061
7062 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7063 void
7064 __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index,
7065 const GLfloat * params)
7066 {
7067 __GLXcontext *const gc = __glXGetCurrentContext();
7068 const GLuint cmdlen = 28;
7069 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7070 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7071 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7072 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7073 gc->pc += cmdlen;
7074 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7075 (void) __glXFlushRenderBuffer(gc, gc->pc);
7076 }
7077 }
7078
7079 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7080 void
7081 __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index,
7082 GLdouble x, GLdouble y, GLdouble z,
7083 GLdouble w)
7084 {
7085 __GLXcontext *const gc = __glXGetCurrentContext();
7086 const GLuint cmdlen = 44;
7087 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7088 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7089 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7090 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7091 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7092 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7093 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7094 gc->pc += cmdlen;
7095 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7096 (void) __glXFlushRenderBuffer(gc, gc->pc);
7097 }
7098 }
7099
7100 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7101 void
7102 __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index,
7103 const GLdouble * params)
7104 {
7105 __GLXcontext *const gc = __glXGetCurrentContext();
7106 const GLuint cmdlen = 44;
7107 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7108 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7109 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7110 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7111 gc->pc += cmdlen;
7112 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7113 (void) __glXFlushRenderBuffer(gc, gc->pc);
7114 }
7115 }
7116
7117 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7118 void
7119 __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index,
7120 GLfloat x, GLfloat y, GLfloat z,
7121 GLfloat w)
7122 {
7123 __GLXcontext *const gc = __glXGetCurrentContext();
7124 const GLuint cmdlen = 28;
7125 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7126 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7127 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7128 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7129 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7130 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7131 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7132 gc->pc += cmdlen;
7133 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7134 (void) __glXFlushRenderBuffer(gc, gc->pc);
7135 }
7136 }
7137
7138 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7139 void
7140 __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index,
7141 const GLfloat * params)
7142 {
7143 __GLXcontext *const gc = __glXGetCurrentContext();
7144 const GLuint cmdlen = 28;
7145 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7146 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7147 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7148 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7149 gc->pc += cmdlen;
7150 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7151 (void) __glXFlushRenderBuffer(gc, gc->pc);
7152 }
7153 }
7154
7155 #define X_GLrop_ProgramStringARB 4217
7156 void
7157 __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len,
7158 const GLvoid * string)
7159 {
7160 __GLXcontext *const gc = __glXGetCurrentContext();
7161 const GLuint cmdlen = 16 + __GLX_PAD(len);
7162 if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
7163 if (cmdlen <= gc->maxSmallRenderCommandSize) {
7164 if ((gc->pc + cmdlen) > gc->bufEnd) {
7165 (void) __glXFlushRenderBuffer(gc, gc->pc);
7166 }
7167 emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
7168 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7169 (void) memcpy((void *) (gc->pc + 8), (void *) (&format), 4);
7170 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
7171 (void) memcpy((void *) (gc->pc + 16), (void *) (string), len);
7172 gc->pc += cmdlen;
7173 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7174 (void) __glXFlushRenderBuffer(gc, gc->pc);
7175 }
7176 } else {
7177 const GLint op = X_GLrop_ProgramStringARB;
7178 const GLuint cmdlenLarge = cmdlen + 4;
7179 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
7180 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
7181 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
7182 (void) memcpy((void *) (pc + 8), (void *) (&target), 4);
7183 (void) memcpy((void *) (pc + 12), (void *) (&format), 4);
7184 (void) memcpy((void *) (pc + 16), (void *) (&len), 4);
7185 __glXSendLargeCommand(gc, pc, 20, string, len);
7186 }
7187 }
7188 }
7189
7190 #define X_GLrop_VertexAttrib1dvARB 4197
7191 void
7192 __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
7193 {
7194 __GLXcontext *const gc = __glXGetCurrentContext();
7195 const GLuint cmdlen = 16;
7196 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7197 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7198 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7199 gc->pc += cmdlen;
7200 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7201 (void) __glXFlushRenderBuffer(gc, gc->pc);
7202 }
7203 }
7204
7205 #define X_GLrop_VertexAttrib1dvARB 4197
7206 void
7207 __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
7208 {
7209 __GLXcontext *const gc = __glXGetCurrentContext();
7210 const GLuint cmdlen = 16;
7211 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7212 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7213 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7214 gc->pc += cmdlen;
7215 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7216 (void) __glXFlushRenderBuffer(gc, gc->pc);
7217 }
7218 }
7219
7220 #define X_GLrop_VertexAttrib1fvARB 4193
7221 void
7222 __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
7223 {
7224 __GLXcontext *const gc = __glXGetCurrentContext();
7225 const GLuint cmdlen = 12;
7226 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7227 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7228 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7229 gc->pc += cmdlen;
7230 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7231 (void) __glXFlushRenderBuffer(gc, gc->pc);
7232 }
7233 }
7234
7235 #define X_GLrop_VertexAttrib1fvARB 4193
7236 void
7237 __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
7238 {
7239 __GLXcontext *const gc = __glXGetCurrentContext();
7240 const GLuint cmdlen = 12;
7241 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7242 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7243 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7244 gc->pc += cmdlen;
7245 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7246 (void) __glXFlushRenderBuffer(gc, gc->pc);
7247 }
7248 }
7249
7250 #define X_GLrop_VertexAttrib1svARB 4189
7251 void
7252 __indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
7253 {
7254 __GLXcontext *const gc = __glXGetCurrentContext();
7255 const GLuint cmdlen = 12;
7256 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7257 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7258 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7259 gc->pc += cmdlen;
7260 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7261 (void) __glXFlushRenderBuffer(gc, gc->pc);
7262 }
7263 }
7264
7265 #define X_GLrop_VertexAttrib1svARB 4189
7266 void
7267 __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
7268 {
7269 __GLXcontext *const gc = __glXGetCurrentContext();
7270 const GLuint cmdlen = 12;
7271 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7272 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7273 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7274 gc->pc += cmdlen;
7275 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7276 (void) __glXFlushRenderBuffer(gc, gc->pc);
7277 }
7278 }
7279
7280 #define X_GLrop_VertexAttrib2dvARB 4198
7281 void
7282 __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
7283 {
7284 __GLXcontext *const gc = __glXGetCurrentContext();
7285 const GLuint cmdlen = 24;
7286 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7287 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7288 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7289 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7290 gc->pc += cmdlen;
7291 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7292 (void) __glXFlushRenderBuffer(gc, gc->pc);
7293 }
7294 }
7295
7296 #define X_GLrop_VertexAttrib2dvARB 4198
7297 void
7298 __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
7299 {
7300 __GLXcontext *const gc = __glXGetCurrentContext();
7301 const GLuint cmdlen = 24;
7302 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7303 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7304 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7305 gc->pc += cmdlen;
7306 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7307 (void) __glXFlushRenderBuffer(gc, gc->pc);
7308 }
7309 }
7310
7311 #define X_GLrop_VertexAttrib2fvARB 4194
7312 void
7313 __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
7314 {
7315 __GLXcontext *const gc = __glXGetCurrentContext();
7316 const GLuint cmdlen = 16;
7317 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7318 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7319 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7320 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7321 gc->pc += cmdlen;
7322 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7323 (void) __glXFlushRenderBuffer(gc, gc->pc);
7324 }
7325 }
7326
7327 #define X_GLrop_VertexAttrib2fvARB 4194
7328 void
7329 __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
7330 {
7331 __GLXcontext *const gc = __glXGetCurrentContext();
7332 const GLuint cmdlen = 16;
7333 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7334 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7335 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7336 gc->pc += cmdlen;
7337 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7338 (void) __glXFlushRenderBuffer(gc, gc->pc);
7339 }
7340 }
7341
7342 #define X_GLrop_VertexAttrib2svARB 4190
7343 void
7344 __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
7345 {
7346 __GLXcontext *const gc = __glXGetCurrentContext();
7347 const GLuint cmdlen = 12;
7348 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7349 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7350 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7351 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
7352 gc->pc += cmdlen;
7353 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7354 (void) __glXFlushRenderBuffer(gc, gc->pc);
7355 }
7356 }
7357
7358 #define X_GLrop_VertexAttrib2svARB 4190
7359 void
7360 __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
7361 {
7362 __GLXcontext *const gc = __glXGetCurrentContext();
7363 const GLuint cmdlen = 12;
7364 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7365 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7366 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7367 gc->pc += cmdlen;
7368 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7369 (void) __glXFlushRenderBuffer(gc, gc->pc);
7370 }
7371 }
7372
7373 #define X_GLrop_VertexAttrib3dvARB 4199
7374 void
7375 __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y,
7376 GLdouble z)
7377 {
7378 __GLXcontext *const gc = __glXGetCurrentContext();
7379 const GLuint cmdlen = 32;
7380 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7381 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7382 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7383 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7384 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
7385 gc->pc += cmdlen;
7386 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7387 (void) __glXFlushRenderBuffer(gc, gc->pc);
7388 }
7389 }
7390
7391 #define X_GLrop_VertexAttrib3dvARB 4199
7392 void
7393 __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
7394 {
7395 __GLXcontext *const gc = __glXGetCurrentContext();
7396 const GLuint cmdlen = 32;
7397 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7398 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7399 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
7400 gc->pc += cmdlen;
7401 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7402 (void) __glXFlushRenderBuffer(gc, gc->pc);
7403 }
7404 }
7405
7406 #define X_GLrop_VertexAttrib3fvARB 4195
7407 void
7408 __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
7409 {
7410 __GLXcontext *const gc = __glXGetCurrentContext();
7411 const GLuint cmdlen = 20;
7412 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7413 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7414 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7415 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7416 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
7417 gc->pc += cmdlen;
7418 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7419 (void) __glXFlushRenderBuffer(gc, gc->pc);
7420 }
7421 }
7422
7423 #define X_GLrop_VertexAttrib3fvARB 4195
7424 void
7425 __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
7426 {
7427 __GLXcontext *const gc = __glXGetCurrentContext();
7428 const GLuint cmdlen = 20;
7429 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7430 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7431 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7432 gc->pc += cmdlen;
7433 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7434 (void) __glXFlushRenderBuffer(gc, gc->pc);
7435 }
7436 }
7437
7438 #define X_GLrop_VertexAttrib3svARB 4191
7439 void
7440 __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
7441 {
7442 __GLXcontext *const gc = __glXGetCurrentContext();
7443 const GLuint cmdlen = 16;
7444 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
7445 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7446 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7447 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
7448 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
7449 gc->pc += cmdlen;
7450 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7451 (void) __glXFlushRenderBuffer(gc, gc->pc);
7452 }
7453 }
7454
7455 #define X_GLrop_VertexAttrib3svARB 4191
7456 void
7457 __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
7458 {
7459 __GLXcontext *const gc = __glXGetCurrentContext();
7460 const GLuint cmdlen = 16;
7461 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
7462 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7463 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
7464 gc->pc += cmdlen;
7465 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7466 (void) __glXFlushRenderBuffer(gc, gc->pc);
7467 }
7468 }
7469
7470 #define X_GLrop_VertexAttrib4NbvARB 4235
7471 void
7472 __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v)
7473 {
7474 __GLXcontext *const gc = __glXGetCurrentContext();
7475 const GLuint cmdlen = 12;
7476 emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
7477 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7478 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7479 gc->pc += cmdlen;
7480 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7481 (void) __glXFlushRenderBuffer(gc, gc->pc);
7482 }
7483 }
7484
7485 #define X_GLrop_VertexAttrib4NivARB 4237
7486 void
7487 __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
7488 {
7489 __GLXcontext *const gc = __glXGetCurrentContext();
7490 const GLuint cmdlen = 24;
7491 emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
7492 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7493 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7494 gc->pc += cmdlen;
7495 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7496 (void) __glXFlushRenderBuffer(gc, gc->pc);
7497 }
7498 }
7499
7500 #define X_GLrop_VertexAttrib4NsvARB 4236
7501 void
7502 __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
7503 {
7504 __GLXcontext *const gc = __glXGetCurrentContext();
7505 const GLuint cmdlen = 16;
7506 emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
7507 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7508 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7509 gc->pc += cmdlen;
7510 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7511 (void) __glXFlushRenderBuffer(gc, gc->pc);
7512 }
7513 }
7514
7515 #define X_GLrop_VertexAttrib4NubvARB 4201
7516 void
7517 __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
7518 GLubyte z, GLubyte w)
7519 {
7520 __GLXcontext *const gc = __glXGetCurrentContext();
7521 const GLuint cmdlen = 12;
7522 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
7523 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7524 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
7525 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
7526 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
7527 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
7528 gc->pc += cmdlen;
7529 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7530 (void) __glXFlushRenderBuffer(gc, gc->pc);
7531 }
7532 }
7533
7534 #define X_GLrop_VertexAttrib4NubvARB 4201
7535 void
7536 __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v)
7537 {
7538 __GLXcontext *const gc = __glXGetCurrentContext();
7539 const GLuint cmdlen = 12;
7540 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
7541 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7542 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7543 gc->pc += cmdlen;
7544 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7545 (void) __glXFlushRenderBuffer(gc, gc->pc);
7546 }
7547 }
7548
7549 #define X_GLrop_VertexAttrib4NuivARB 4239
7550 void
7551 __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
7552 {
7553 __GLXcontext *const gc = __glXGetCurrentContext();
7554 const GLuint cmdlen = 24;
7555 emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
7556 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7557 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7558 gc->pc += cmdlen;
7559 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7560 (void) __glXFlushRenderBuffer(gc, gc->pc);
7561 }
7562 }
7563
7564 #define X_GLrop_VertexAttrib4NusvARB 4238
7565 void
7566 __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
7567 {
7568 __GLXcontext *const gc = __glXGetCurrentContext();
7569 const GLuint cmdlen = 16;
7570 emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
7571 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7572 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7573 gc->pc += cmdlen;
7574 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7575 (void) __glXFlushRenderBuffer(gc, gc->pc);
7576 }
7577 }
7578
7579 #define X_GLrop_VertexAttrib4bvARB 4230
7580 void
7581 __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v)
7582 {
7583 __GLXcontext *const gc = __glXGetCurrentContext();
7584 const GLuint cmdlen = 12;
7585 emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
7586 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7587 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7588 gc->pc += cmdlen;
7589 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7590 (void) __glXFlushRenderBuffer(gc, gc->pc);
7591 }
7592 }
7593
7594 #define X_GLrop_VertexAttrib4dvARB 4200
7595 void
7596 __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y,
7597 GLdouble z, GLdouble w)
7598 {
7599 __GLXcontext *const gc = __glXGetCurrentContext();
7600 const GLuint cmdlen = 40;
7601 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
7602 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7603 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7604 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7605 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
7606 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
7607 gc->pc += cmdlen;
7608 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7609 (void) __glXFlushRenderBuffer(gc, gc->pc);
7610 }
7611 }
7612
7613 #define X_GLrop_VertexAttrib4dvARB 4200
7614 void
7615 __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
7616 {
7617 __GLXcontext *const gc = __glXGetCurrentContext();
7618 const GLuint cmdlen = 40;
7619 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
7620 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7621 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
7622 gc->pc += cmdlen;
7623 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7624 (void) __glXFlushRenderBuffer(gc, gc->pc);
7625 }
7626 }
7627
7628 #define X_GLrop_VertexAttrib4fvARB 4196
7629 void
7630 __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
7631 GLfloat w)
7632 {
7633 __GLXcontext *const gc = __glXGetCurrentContext();
7634 const GLuint cmdlen = 24;
7635 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
7636 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7637 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7638 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7639 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
7640 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
7641 gc->pc += cmdlen;
7642 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7643 (void) __glXFlushRenderBuffer(gc, gc->pc);
7644 }
7645 }
7646
7647 #define X_GLrop_VertexAttrib4fvARB 4196
7648 void
7649 __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
7650 {
7651 __GLXcontext *const gc = __glXGetCurrentContext();
7652 const GLuint cmdlen = 24;
7653 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
7654 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7655 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7656 gc->pc += cmdlen;
7657 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7658 (void) __glXFlushRenderBuffer(gc, gc->pc);
7659 }
7660 }
7661
7662 #define X_GLrop_VertexAttrib4ivARB 4231
7663 void
7664 __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
7665 {
7666 __GLXcontext *const gc = __glXGetCurrentContext();
7667 const GLuint cmdlen = 24;
7668 emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
7669 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7670 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7671 gc->pc += cmdlen;
7672 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7673 (void) __glXFlushRenderBuffer(gc, gc->pc);
7674 }
7675 }
7676
7677 #define X_GLrop_VertexAttrib4svARB 4192
7678 void
7679 __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z,
7680 GLshort w)
7681 {
7682 __GLXcontext *const gc = __glXGetCurrentContext();
7683 const GLuint cmdlen = 16;
7684 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
7685 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7686 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7687 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
7688 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
7689 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
7690 gc->pc += cmdlen;
7691 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7692 (void) __glXFlushRenderBuffer(gc, gc->pc);
7693 }
7694 }
7695
7696 #define X_GLrop_VertexAttrib4svARB 4192
7697 void
7698 __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
7699 {
7700 __GLXcontext *const gc = __glXGetCurrentContext();
7701 const GLuint cmdlen = 16;
7702 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
7703 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7704 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7705 gc->pc += cmdlen;
7706 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7707 (void) __glXFlushRenderBuffer(gc, gc->pc);
7708 }
7709 }
7710
7711 #define X_GLrop_VertexAttrib4ubvARB 4232
7712 void
7713 __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v)
7714 {
7715 __GLXcontext *const gc = __glXGetCurrentContext();
7716 const GLuint cmdlen = 12;
7717 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
7718 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7719 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7720 gc->pc += cmdlen;
7721 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7722 (void) __glXFlushRenderBuffer(gc, gc->pc);
7723 }
7724 }
7725
7726 #define X_GLrop_VertexAttrib4uivARB 4234
7727 void
7728 __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
7729 {
7730 __GLXcontext *const gc = __glXGetCurrentContext();
7731 const GLuint cmdlen = 24;
7732 emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
7733 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7734 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7735 gc->pc += cmdlen;
7736 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7737 (void) __glXFlushRenderBuffer(gc, gc->pc);
7738 }
7739 }
7740
7741 #define X_GLrop_VertexAttrib4usvARB 4233
7742 void
7743 __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
7744 {
7745 __GLXcontext *const gc = __glXGetCurrentContext();
7746 const GLuint cmdlen = 16;
7747 emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
7748 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7749 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7750 gc->pc += cmdlen;
7751 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7752 (void) __glXFlushRenderBuffer(gc, gc->pc);
7753 }
7754 }
7755
7756 #define X_GLrop_BeginQueryARB 231
7757 void
7758 __indirect_glBeginQueryARB(GLenum target, GLuint id)
7759 {
7760 __GLXcontext *const gc = __glXGetCurrentContext();
7761 const GLuint cmdlen = 12;
7762 emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
7763 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7764 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
7765 gc->pc += cmdlen;
7766 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7767 (void) __glXFlushRenderBuffer(gc, gc->pc);
7768 }
7769 }
7770
7771 #define X_GLsop_DeleteQueriesARB 161
7772 void
7773 __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
7774 {
7775 __GLXcontext *const gc = __glXGetCurrentContext();
7776 Display *const dpy = gc->currentDpy;
7777 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
7778 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7779 #ifdef USE_XCB
7780 xcb_connection_t *c = XGetXCBConnection(dpy);
7781 (void) __glXFlushRenderBuffer(gc, gc->pc);
7782 xcb_glx_delete_queries_arb(c, gc->currentContextTag, n, ids);
7783 #else
7784 GLubyte const *pc =
7785 __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
7786 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
7787 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
7788 UnlockDisplay(dpy);
7789 SyncHandle();
7790 #endif /* USE_XCB */
7791 }
7792 return;
7793 }
7794
7795 #define X_GLrop_EndQueryARB 232
7796 void
7797 __indirect_glEndQueryARB(GLenum target)
7798 {
7799 __GLXcontext *const gc = __glXGetCurrentContext();
7800 const GLuint cmdlen = 8;
7801 emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
7802 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7803 gc->pc += cmdlen;
7804 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7805 (void) __glXFlushRenderBuffer(gc, gc->pc);
7806 }
7807 }
7808
7809 #define X_GLsop_GenQueriesARB 162
7810 void
7811 __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
7812 {
7813 __GLXcontext *const gc = __glXGetCurrentContext();
7814 Display *const dpy = gc->currentDpy;
7815 const GLuint cmdlen = 4;
7816 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
7817 #ifdef USE_XCB
7818 xcb_connection_t *c = XGetXCBConnection(dpy);
7819 (void) __glXFlushRenderBuffer(gc, gc->pc);
7820 xcb_glx_gen_queries_arb_reply_t *reply =
7821 xcb_glx_gen_queries_arb_reply(c,
7822 xcb_glx_gen_queries_arb(c,
7823 gc->
7824 currentContextTag,
7825 n), NULL);
7826 (void) memcpy(ids, xcb_glx_gen_queries_arb_data(reply),
7827 xcb_glx_gen_queries_arb_data_length(reply) *
7828 sizeof(GLuint));
7829 free(reply);
7830 #else
7831 GLubyte const *pc =
7832 __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
7833 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
7834 (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
7835 UnlockDisplay(dpy);
7836 SyncHandle();
7837 #endif /* USE_XCB */
7838 }
7839 return;
7840 }
7841
7842 #define X_GLsop_GetQueryObjectivARB 165
7843 void
7844 __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
7845 {
7846 __GLXcontext *const gc = __glXGetCurrentContext();
7847 Display *const dpy = gc->currentDpy;
7848 const GLuint cmdlen = 8;
7849 if (__builtin_expect(dpy != NULL, 1)) {
7850 #ifdef USE_XCB
7851 xcb_connection_t *c = XGetXCBConnection(dpy);
7852 (void) __glXFlushRenderBuffer(gc, gc->pc);
7853 xcb_glx_get_query_objectiv_arb_reply_t *reply =
7854 xcb_glx_get_query_objectiv_arb_reply(c,
7855 xcb_glx_get_query_objectiv_arb
7856 (c, gc->currentContextTag,
7857 id, pname), NULL);
7858 if (xcb_glx_get_query_objectiv_arb_data_length(reply) == 0)
7859 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
7860 else
7861 (void) memcpy(params, xcb_glx_get_query_objectiv_arb_data(reply),
7862 xcb_glx_get_query_objectiv_arb_data_length(reply) *
7863 sizeof(GLint));
7864 free(reply);
7865 #else
7866 GLubyte const *pc =
7867 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
7868 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
7869 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7870 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7871 UnlockDisplay(dpy);
7872 SyncHandle();
7873 #endif /* USE_XCB */
7874 }
7875 return;
7876 }
7877
7878 #define X_GLsop_GetQueryObjectuivARB 166
7879 void
7880 __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
7881 {
7882 __GLXcontext *const gc = __glXGetCurrentContext();
7883 Display *const dpy = gc->currentDpy;
7884 const GLuint cmdlen = 8;
7885 if (__builtin_expect(dpy != NULL, 1)) {
7886 #ifdef USE_XCB
7887 xcb_connection_t *c = XGetXCBConnection(dpy);
7888 (void) __glXFlushRenderBuffer(gc, gc->pc);
7889 xcb_glx_get_query_objectuiv_arb_reply_t *reply =
7890 xcb_glx_get_query_objectuiv_arb_reply(c,
7891 xcb_glx_get_query_objectuiv_arb
7892 (c, gc->currentContextTag,
7893 id, pname), NULL);
7894 if (xcb_glx_get_query_objectuiv_arb_data_length(reply) == 0)
7895 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
7896 else
7897 (void) memcpy(params, xcb_glx_get_query_objectuiv_arb_data(reply),
7898 xcb_glx_get_query_objectuiv_arb_data_length(reply) *
7899 sizeof(GLuint));
7900 free(reply);
7901 #else
7902 GLubyte const *pc =
7903 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
7904 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
7905 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7906 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7907 UnlockDisplay(dpy);
7908 SyncHandle();
7909 #endif /* USE_XCB */
7910 }
7911 return;
7912 }
7913
7914 #define X_GLsop_GetQueryivARB 164
7915 void
7916 __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
7917 {
7918 __GLXcontext *const gc = __glXGetCurrentContext();
7919 Display *const dpy = gc->currentDpy;
7920 const GLuint cmdlen = 8;
7921 if (__builtin_expect(dpy != NULL, 1)) {
7922 #ifdef USE_XCB
7923 xcb_connection_t *c = XGetXCBConnection(dpy);
7924 (void) __glXFlushRenderBuffer(gc, gc->pc);
7925 xcb_glx_get_queryiv_arb_reply_t *reply =
7926 xcb_glx_get_queryiv_arb_reply(c,
7927 xcb_glx_get_queryiv_arb(c,
7928 gc->
7929 currentContextTag,
7930 target,
7931 pname),
7932 NULL);
7933 if (xcb_glx_get_queryiv_arb_data_length(reply) == 0)
7934 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
7935 else
7936 (void) memcpy(params, xcb_glx_get_queryiv_arb_data(reply),
7937 xcb_glx_get_queryiv_arb_data_length(reply) *
7938 sizeof(GLint));
7939 free(reply);
7940 #else
7941 GLubyte const *pc =
7942 __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
7943 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7944 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7945 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7946 UnlockDisplay(dpy);
7947 SyncHandle();
7948 #endif /* USE_XCB */
7949 }
7950 return;
7951 }
7952
7953 #define X_GLsop_IsQueryARB 163
7954 GLboolean
7955 __indirect_glIsQueryARB(GLuint id)
7956 {
7957 __GLXcontext *const gc = __glXGetCurrentContext();
7958 Display *const dpy = gc->currentDpy;
7959 GLboolean retval = (GLboolean) 0;
7960 const GLuint cmdlen = 4;
7961 if (__builtin_expect(dpy != NULL, 1)) {
7962 #ifdef USE_XCB
7963 xcb_connection_t *c = XGetXCBConnection(dpy);
7964 (void) __glXFlushRenderBuffer(gc, gc->pc);
7965 xcb_glx_is_query_arb_reply_t *reply =
7966 xcb_glx_is_query_arb_reply(c,
7967 xcb_glx_is_query_arb(c,
7968 gc->
7969 currentContextTag,
7970 id), NULL);
7971 retval = reply->ret_val;
7972 free(reply);
7973 #else
7974 GLubyte const *pc =
7975 __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
7976 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
7977 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
7978 UnlockDisplay(dpy);
7979 SyncHandle();
7980 #endif /* USE_XCB */
7981 }
7982 return retval;
7983 }
7984
7985 #define X_GLrop_DrawBuffersARB 233
7986 void
7987 __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
7988 {
7989 __GLXcontext *const gc = __glXGetCurrentContext();
7990 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
7991 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
7992 if (cmdlen <= gc->maxSmallRenderCommandSize) {
7993 if ((gc->pc + cmdlen) > gc->bufEnd) {
7994 (void) __glXFlushRenderBuffer(gc, gc->pc);
7995 }
7996 emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
7997 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
7998 (void) memcpy((void *) (gc->pc + 8), (void *) (bufs), (n * 4));
7999 gc->pc += cmdlen;
8000 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8001 (void) __glXFlushRenderBuffer(gc, gc->pc);
8002 }
8003 } else {
8004 const GLint op = X_GLrop_DrawBuffersARB;
8005 const GLuint cmdlenLarge = cmdlen + 4;
8006 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
8007 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
8008 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
8009 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
8010 __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
8011 }
8012 }
8013 }
8014
8015 #define X_GLvop_GetColorTableParameterfvSGI 4099
8016 void
8017 __indirect_glGetColorTableParameterfvSGI(GLenum target, GLenum pname,
8018 GLfloat * params)
8019 {
8020 __GLXcontext *const gc = __glXGetCurrentContext();
8021 Display *const dpy = gc->currentDpy;
8022 const GLuint cmdlen = 8;
8023 if (__builtin_expect(dpy != NULL, 1)) {
8024 GLubyte const *pc =
8025 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8026 X_GLvop_GetColorTableParameterfvSGI,
8027 cmdlen);
8028 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8029 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8030 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8031 UnlockDisplay(dpy);
8032 SyncHandle();
8033 }
8034 return;
8035 }
8036
8037 #define X_GLvop_GetColorTableParameterivSGI 4100
8038 void
8039 __indirect_glGetColorTableParameterivSGI(GLenum target, GLenum pname,
8040 GLint * params)
8041 {
8042 __GLXcontext *const gc = __glXGetCurrentContext();
8043 Display *const dpy = gc->currentDpy;
8044 const GLuint cmdlen = 8;
8045 if (__builtin_expect(dpy != NULL, 1)) {
8046 GLubyte const *pc =
8047 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8048 X_GLvop_GetColorTableParameterivSGI,
8049 cmdlen);
8050 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8051 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8052 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8053 UnlockDisplay(dpy);
8054 SyncHandle();
8055 }
8056 return;
8057 }
8058
8059 #define X_GLvop_GetColorTableSGI 4098
8060 void
8061 __indirect_glGetColorTableSGI(GLenum target, GLenum format, GLenum type,
8062 GLvoid * table)
8063 {
8064 __GLXcontext *const gc = __glXGetCurrentContext();
8065 const __GLXattribute *const state = gc->client_state_private;
8066 Display *const dpy = gc->currentDpy;
8067 const GLuint cmdlen = 16;
8068 if (__builtin_expect(dpy != NULL, 1)) {
8069 GLubyte const *pc =
8070 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8071 X_GLvop_GetColorTableSGI, cmdlen);
8072 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8073 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
8074 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
8075 *(int32_t *) (pc + 12) = 0;
8076 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
8077 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
8078 GL_TRUE);
8079 UnlockDisplay(dpy);
8080 SyncHandle();
8081 }
8082 return;
8083 }
8084
8085 #define X_GLvop_AreTexturesResidentEXT 11
8086 GLboolean
8087 __indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures,
8088 GLboolean * residences)
8089 {
8090 __GLXcontext *const gc = __glXGetCurrentContext();
8091 Display *const dpy = gc->currentDpy;
8092 GLboolean retval = (GLboolean) 0;
8093 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8094 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8095 GLubyte const *pc =
8096 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8097 X_GLvop_AreTexturesResidentEXT, cmdlen);
8098 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8099 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
8100 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
8101 UnlockDisplay(dpy);
8102 SyncHandle();
8103 }
8104 return retval;
8105 }
8106
8107 #define X_GLvop_GenTexturesEXT 13
8108 void
8109 __indirect_glGenTexturesEXT(GLsizei n, GLuint * textures)
8110 {
8111 __GLXcontext *const gc = __glXGetCurrentContext();
8112 Display *const dpy = gc->currentDpy;
8113 const GLuint cmdlen = 4;
8114 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8115 GLubyte const *pc =
8116 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8117 X_GLvop_GenTexturesEXT, cmdlen);
8118 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8119 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
8120 UnlockDisplay(dpy);
8121 SyncHandle();
8122 }
8123 return;
8124 }
8125
8126 #define X_GLvop_IsTextureEXT 14
8127 GLboolean
8128 __indirect_glIsTextureEXT(GLuint texture)
8129 {
8130 __GLXcontext *const gc = __glXGetCurrentContext();
8131 Display *const dpy = gc->currentDpy;
8132 GLboolean retval = (GLboolean) 0;
8133 const GLuint cmdlen = 4;
8134 if (__builtin_expect(dpy != NULL, 1)) {
8135 GLubyte const *pc =
8136 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8137 X_GLvop_IsTextureEXT, cmdlen);
8138 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
8139 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8140 UnlockDisplay(dpy);
8141 SyncHandle();
8142 }
8143 return retval;
8144 }
8145
8146 #define X_GLrop_SampleMaskSGIS 2048
8147 void
8148 __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
8149 {
8150 __GLXcontext *const gc = __glXGetCurrentContext();
8151 const GLuint cmdlen = 12;
8152 emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
8153 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
8154 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
8155 gc->pc += cmdlen;
8156 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8157 (void) __glXFlushRenderBuffer(gc, gc->pc);
8158 }
8159 }
8160
8161 #define X_GLrop_SamplePatternSGIS 2049
8162 void
8163 __indirect_glSamplePatternSGIS(GLenum pattern)
8164 {
8165 __GLXcontext *const gc = __glXGetCurrentContext();
8166 const GLuint cmdlen = 8;
8167 emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
8168 (void) memcpy((void *) (gc->pc + 4), (void *) (&pattern), 4);
8169 gc->pc += cmdlen;
8170 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8171 (void) __glXFlushRenderBuffer(gc, gc->pc);
8172 }
8173 }
8174
8175 #define X_GLrop_PointParameterfEXT 2065
8176 void
8177 __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
8178 {
8179 __GLXcontext *const gc = __glXGetCurrentContext();
8180 const GLuint cmdlen = 12;
8181 emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
8182 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8183 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
8184 gc->pc += cmdlen;
8185 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8186 (void) __glXFlushRenderBuffer(gc, gc->pc);
8187 }
8188 }
8189
8190 #define X_GLrop_PointParameterfvEXT 2066
8191 void
8192 __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
8193 {
8194 __GLXcontext *const gc = __glXGetCurrentContext();
8195 const GLuint compsize = __glPointParameterfvEXT_size(pname);
8196 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
8197 emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
8198 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8199 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
8200 gc->pc += cmdlen;
8201 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8202 (void) __glXFlushRenderBuffer(gc, gc->pc);
8203 }
8204 }
8205
8206 #define X_GLrop_SecondaryColor3bvEXT 4126
8207 void
8208 __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
8209 {
8210 __GLXcontext *const gc = __glXGetCurrentContext();
8211 const GLuint cmdlen = 8;
8212 emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
8213 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8214 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8215 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8216 gc->pc += cmdlen;
8217 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8218 (void) __glXFlushRenderBuffer(gc, gc->pc);
8219 }
8220 }
8221
8222 #define X_GLrop_SecondaryColor3bvEXT 4126
8223 void
8224 __indirect_glSecondaryColor3bvEXT(const GLbyte * v)
8225 {
8226 generic_3_byte(X_GLrop_SecondaryColor3bvEXT, v);
8227 }
8228
8229 #define X_GLrop_SecondaryColor3dvEXT 4130
8230 void
8231 __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
8232 {
8233 __GLXcontext *const gc = __glXGetCurrentContext();
8234 const GLuint cmdlen = 28;
8235 emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
8236 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
8237 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
8238 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
8239 gc->pc += cmdlen;
8240 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8241 (void) __glXFlushRenderBuffer(gc, gc->pc);
8242 }
8243 }
8244
8245 #define X_GLrop_SecondaryColor3dvEXT 4130
8246 void
8247 __indirect_glSecondaryColor3dvEXT(const GLdouble * v)
8248 {
8249 generic_24_byte(X_GLrop_SecondaryColor3dvEXT, v);
8250 }
8251
8252 #define X_GLrop_SecondaryColor3fvEXT 4129
8253 void
8254 __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
8255 {
8256 __GLXcontext *const gc = __glXGetCurrentContext();
8257 const GLuint cmdlen = 16;
8258 emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
8259 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8260 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8261 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8262 gc->pc += cmdlen;
8263 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8264 (void) __glXFlushRenderBuffer(gc, gc->pc);
8265 }
8266 }
8267
8268 #define X_GLrop_SecondaryColor3fvEXT 4129
8269 void
8270 __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
8271 {
8272 generic_12_byte(X_GLrop_SecondaryColor3fvEXT, v);
8273 }
8274
8275 #define X_GLrop_SecondaryColor3ivEXT 4128
8276 void
8277 __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
8278 {
8279 __GLXcontext *const gc = __glXGetCurrentContext();
8280 const GLuint cmdlen = 16;
8281 emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
8282 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8283 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8284 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8285 gc->pc += cmdlen;
8286 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8287 (void) __glXFlushRenderBuffer(gc, gc->pc);
8288 }
8289 }
8290
8291 #define X_GLrop_SecondaryColor3ivEXT 4128
8292 void
8293 __indirect_glSecondaryColor3ivEXT(const GLint * v)
8294 {
8295 generic_12_byte(X_GLrop_SecondaryColor3ivEXT, v);
8296 }
8297
8298 #define X_GLrop_SecondaryColor3svEXT 4127
8299 void
8300 __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
8301 {
8302 __GLXcontext *const gc = __glXGetCurrentContext();
8303 const GLuint cmdlen = 12;
8304 emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
8305 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8306 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8307 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8308 gc->pc += cmdlen;
8309 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8310 (void) __glXFlushRenderBuffer(gc, gc->pc);
8311 }
8312 }
8313
8314 #define X_GLrop_SecondaryColor3svEXT 4127
8315 void
8316 __indirect_glSecondaryColor3svEXT(const GLshort * v)
8317 {
8318 generic_6_byte(X_GLrop_SecondaryColor3svEXT, v);
8319 }
8320
8321 #define X_GLrop_SecondaryColor3ubvEXT 4131
8322 void
8323 __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
8324 {
8325 __GLXcontext *const gc = __glXGetCurrentContext();
8326 const GLuint cmdlen = 8;
8327 emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
8328 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8329 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8330 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8331 gc->pc += cmdlen;
8332 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8333 (void) __glXFlushRenderBuffer(gc, gc->pc);
8334 }
8335 }
8336
8337 #define X_GLrop_SecondaryColor3ubvEXT 4131
8338 void
8339 __indirect_glSecondaryColor3ubvEXT(const GLubyte * v)
8340 {
8341 generic_3_byte(X_GLrop_SecondaryColor3ubvEXT, v);
8342 }
8343
8344 #define X_GLrop_SecondaryColor3uivEXT 4133
8345 void
8346 __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
8347 {
8348 __GLXcontext *const gc = __glXGetCurrentContext();
8349 const GLuint cmdlen = 16;
8350 emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
8351 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8352 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8353 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8354 gc->pc += cmdlen;
8355 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8356 (void) __glXFlushRenderBuffer(gc, gc->pc);
8357 }
8358 }
8359
8360 #define X_GLrop_SecondaryColor3uivEXT 4133
8361 void
8362 __indirect_glSecondaryColor3uivEXT(const GLuint * v)
8363 {
8364 generic_12_byte(X_GLrop_SecondaryColor3uivEXT, v);
8365 }
8366
8367 #define X_GLrop_SecondaryColor3usvEXT 4132
8368 void
8369 __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
8370 {
8371 __GLXcontext *const gc = __glXGetCurrentContext();
8372 const GLuint cmdlen = 12;
8373 emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
8374 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8375 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8376 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8377 gc->pc += cmdlen;
8378 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8379 (void) __glXFlushRenderBuffer(gc, gc->pc);
8380 }
8381 }
8382
8383 #define X_GLrop_SecondaryColor3usvEXT 4132
8384 void
8385 __indirect_glSecondaryColor3usvEXT(const GLushort * v)
8386 {
8387 generic_6_byte(X_GLrop_SecondaryColor3usvEXT, v);
8388 }
8389
8390 #define X_GLrop_FogCoorddvEXT 4125
8391 void
8392 __indirect_glFogCoorddEXT(GLdouble coord)
8393 {
8394 __GLXcontext *const gc = __glXGetCurrentContext();
8395 const GLuint cmdlen = 12;
8396 emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
8397 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 8);
8398 gc->pc += cmdlen;
8399 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8400 (void) __glXFlushRenderBuffer(gc, gc->pc);
8401 }
8402 }
8403
8404 #define X_GLrop_FogCoorddvEXT 4125
8405 void
8406 __indirect_glFogCoorddvEXT(const GLdouble * coord)
8407 {
8408 generic_8_byte(X_GLrop_FogCoorddvEXT, coord);
8409 }
8410
8411 #define X_GLrop_FogCoordfvEXT 4124
8412 void
8413 __indirect_glFogCoordfEXT(GLfloat coord)
8414 {
8415 __GLXcontext *const gc = __glXGetCurrentContext();
8416 const GLuint cmdlen = 8;
8417 emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
8418 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
8419 gc->pc += cmdlen;
8420 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8421 (void) __glXFlushRenderBuffer(gc, gc->pc);
8422 }
8423 }
8424
8425 #define X_GLrop_FogCoordfvEXT 4124
8426 void
8427 __indirect_glFogCoordfvEXT(const GLfloat * coord)
8428 {
8429 generic_4_byte(X_GLrop_FogCoordfvEXT, coord);
8430 }
8431
8432 #define X_GLrop_BlendFuncSeparateEXT 4134
8433 void
8434 __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
8435 GLenum sfactorAlpha, GLenum dfactorAlpha)
8436 {
8437 __GLXcontext *const gc = __glXGetCurrentContext();
8438 const GLuint cmdlen = 20;
8439 emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
8440 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactorRGB), 4);
8441 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactorRGB), 4);
8442 (void) memcpy((void *) (gc->pc + 12), (void *) (&sfactorAlpha), 4);
8443 (void) memcpy((void *) (gc->pc + 16), (void *) (&dfactorAlpha), 4);
8444 gc->pc += cmdlen;
8445 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8446 (void) __glXFlushRenderBuffer(gc, gc->pc);
8447 }
8448 }
8449
8450 #define X_GLrop_WindowPos3fvMESA 230
8451 void
8452 __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
8453 {
8454 __GLXcontext *const gc = __glXGetCurrentContext();
8455 const GLuint cmdlen = 16;
8456 emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
8457 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
8458 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
8459 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
8460 gc->pc += cmdlen;
8461 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8462 (void) __glXFlushRenderBuffer(gc, gc->pc);
8463 }
8464 }
8465
8466 #define X_GLrop_WindowPos3fvMESA 230
8467 void
8468 __indirect_glWindowPos3fvMESA(const GLfloat * v)
8469 {
8470 generic_12_byte(X_GLrop_WindowPos3fvMESA, v);
8471 }
8472
8473 #define X_GLvop_AreProgramsResidentNV 1293
8474 GLboolean
8475 __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids,
8476 GLboolean * residences)
8477 {
8478 __GLXcontext *const gc = __glXGetCurrentContext();
8479 Display *const dpy = gc->currentDpy;
8480 GLboolean retval = (GLboolean) 0;
8481 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8482 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8483 GLubyte const *pc =
8484 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8485 X_GLvop_AreProgramsResidentNV, cmdlen);
8486 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8487 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8488 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
8489 UnlockDisplay(dpy);
8490 SyncHandle();
8491 }
8492 return retval;
8493 }
8494
8495 #define X_GLrop_BindProgramNV 4180
8496 void
8497 __indirect_glBindProgramNV(GLenum target, GLuint program)
8498 {
8499 __GLXcontext *const gc = __glXGetCurrentContext();
8500 const GLuint cmdlen = 12;
8501 emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
8502 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8503 (void) memcpy((void *) (gc->pc + 8), (void *) (&program), 4);
8504 gc->pc += cmdlen;
8505 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8506 (void) __glXFlushRenderBuffer(gc, gc->pc);
8507 }
8508 }
8509
8510 #define X_GLvop_DeleteProgramsNV 1294
8511 void
8512 __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
8513 {
8514 __GLXcontext *const gc = __glXGetCurrentContext();
8515 Display *const dpy = gc->currentDpy;
8516 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8517 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8518 GLubyte const *pc =
8519 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
8520 X_GLvop_DeleteProgramsNV, cmdlen);
8521 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8522 (void) memcpy((void *) (pc + 4), (void *) (programs), (n * 4));
8523 UnlockDisplay(dpy);
8524 SyncHandle();
8525 }
8526 return;
8527 }
8528
8529 #define X_GLrop_ExecuteProgramNV 4181
8530 void
8531 __indirect_glExecuteProgramNV(GLenum target, GLuint id,
8532 const GLfloat * params)
8533 {
8534 __GLXcontext *const gc = __glXGetCurrentContext();
8535 const GLuint cmdlen = 28;
8536 emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
8537 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8538 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
8539 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
8540 gc->pc += cmdlen;
8541 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8542 (void) __glXFlushRenderBuffer(gc, gc->pc);
8543 }
8544 }
8545
8546 #define X_GLvop_GenProgramsNV 1295
8547 void
8548 __indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
8549 {
8550 __GLXcontext *const gc = __glXGetCurrentContext();
8551 Display *const dpy = gc->currentDpy;
8552 const GLuint cmdlen = 4;
8553 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8554 GLubyte const *pc =
8555 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8556 X_GLvop_GenProgramsNV, cmdlen);
8557 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8558 (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
8559 UnlockDisplay(dpy);
8560 SyncHandle();
8561 }
8562 return;
8563 }
8564
8565 #define X_GLvop_GetProgramParameterdvNV 1297
8566 void
8567 __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index,
8568 GLenum pname, GLdouble * params)
8569 {
8570 __GLXcontext *const gc = __glXGetCurrentContext();
8571 Display *const dpy = gc->currentDpy;
8572 const GLuint cmdlen = 12;
8573 if (__builtin_expect(dpy != NULL, 1)) {
8574 GLubyte const *pc =
8575 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8576 X_GLvop_GetProgramParameterdvNV, cmdlen);
8577 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8578 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
8579 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
8580 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
8581 UnlockDisplay(dpy);
8582 SyncHandle();
8583 }
8584 return;
8585 }
8586
8587 #define X_GLvop_GetProgramParameterfvNV 1296
8588 void
8589 __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
8590 GLenum pname, GLfloat * params)
8591 {
8592 __GLXcontext *const gc = __glXGetCurrentContext();
8593 Display *const dpy = gc->currentDpy;
8594 const GLuint cmdlen = 12;
8595 if (__builtin_expect(dpy != NULL, 1)) {
8596 GLubyte const *pc =
8597 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8598 X_GLvop_GetProgramParameterfvNV, cmdlen);
8599 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8600 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
8601 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
8602 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8603 UnlockDisplay(dpy);
8604 SyncHandle();
8605 }
8606 return;
8607 }
8608
8609 #define X_GLvop_GetProgramStringNV 1299
8610 void
8611 __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program)
8612 {
8613 __GLXcontext *const gc = __glXGetCurrentContext();
8614 Display *const dpy = gc->currentDpy;
8615 const GLuint cmdlen = 8;
8616 if (__builtin_expect(dpy != NULL, 1)) {
8617 GLubyte const *pc =
8618 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8619 X_GLvop_GetProgramStringNV, cmdlen);
8620 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8621 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8622 (void) __glXReadReply(dpy, 1, program, GL_TRUE);
8623 UnlockDisplay(dpy);
8624 SyncHandle();
8625 }
8626 return;
8627 }
8628
8629 #define X_GLvop_GetProgramivNV 1298
8630 void
8631 __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
8632 {
8633 __GLXcontext *const gc = __glXGetCurrentContext();
8634 Display *const dpy = gc->currentDpy;
8635 const GLuint cmdlen = 8;
8636 if (__builtin_expect(dpy != NULL, 1)) {
8637 GLubyte const *pc =
8638 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8639 X_GLvop_GetProgramivNV, cmdlen);
8640 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8641 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8642 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8643 UnlockDisplay(dpy);
8644 SyncHandle();
8645 }
8646 return;
8647 }
8648
8649 #define X_GLvop_GetTrackMatrixivNV 1300
8650 void
8651 __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname,
8652 GLint * params)
8653 {
8654 __GLXcontext *const gc = __glXGetCurrentContext();
8655 Display *const dpy = gc->currentDpy;
8656 const GLuint cmdlen = 12;
8657 if (__builtin_expect(dpy != NULL, 1)) {
8658 GLubyte const *pc =
8659 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8660 X_GLvop_GetTrackMatrixivNV, cmdlen);
8661 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8662 (void) memcpy((void *) (pc + 4), (void *) (&address), 4);
8663 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
8664 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8665 UnlockDisplay(dpy);
8666 SyncHandle();
8667 }
8668 return;
8669 }
8670
8671 #define X_GLvop_GetVertexAttribdvNV 1301
8672 void
8673 __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname,
8674 GLdouble * params)
8675 {
8676 __GLXcontext *const gc = __glXGetCurrentContext();
8677 Display *const dpy = gc->currentDpy;
8678 const GLuint cmdlen = 8;
8679 if (__builtin_expect(dpy != NULL, 1)) {
8680 GLubyte const *pc =
8681 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8682 X_GLvop_GetVertexAttribdvNV, cmdlen);
8683 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
8684 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8685 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
8686 UnlockDisplay(dpy);
8687 SyncHandle();
8688 }
8689 return;
8690 }
8691
8692 #define X_GLvop_GetVertexAttribfvNV 1302
8693 void
8694 __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
8695 {
8696 __GLXcontext *const gc = __glXGetCurrentContext();
8697 Display *const dpy = gc->currentDpy;
8698 const GLuint cmdlen = 8;
8699 if (__builtin_expect(dpy != NULL, 1)) {
8700 GLubyte const *pc =
8701 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8702 X_GLvop_GetVertexAttribfvNV, cmdlen);
8703 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
8704 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8705 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8706 UnlockDisplay(dpy);
8707 SyncHandle();
8708 }
8709 return;
8710 }
8711
8712 #define X_GLvop_GetVertexAttribivNV 1303
8713 void
8714 __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
8715 {
8716 __GLXcontext *const gc = __glXGetCurrentContext();
8717 Display *const dpy = gc->currentDpy;
8718 const GLuint cmdlen = 8;
8719 if (__builtin_expect(dpy != NULL, 1)) {
8720 GLubyte const *pc =
8721 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8722 X_GLvop_GetVertexAttribivNV, cmdlen);
8723 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
8724 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8725 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8726 UnlockDisplay(dpy);
8727 SyncHandle();
8728 }
8729 return;
8730 }
8731
8732 #define X_GLvop_IsProgramNV 1304
8733 GLboolean
8734 __indirect_glIsProgramNV(GLuint program)
8735 {
8736 __GLXcontext *const gc = __glXGetCurrentContext();
8737 Display *const dpy = gc->currentDpy;
8738 GLboolean retval = (GLboolean) 0;
8739 const GLuint cmdlen = 4;
8740 if (__builtin_expect(dpy != NULL, 1)) {
8741 GLubyte const *pc =
8742 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8743 X_GLvop_IsProgramNV, cmdlen);
8744 (void) memcpy((void *) (pc + 0), (void *) (&program), 4);
8745 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8746 UnlockDisplay(dpy);
8747 SyncHandle();
8748 }
8749 return retval;
8750 }
8751
8752 #define X_GLrop_LoadProgramNV 4183
8753 void
8754 __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len,
8755 const GLubyte * program)
8756 {
8757 __GLXcontext *const gc = __glXGetCurrentContext();
8758 const GLuint cmdlen = 16 + __GLX_PAD(len);
8759 if (__builtin_expect(len >= 0, 1)) {
8760 emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
8761 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8762 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
8763 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
8764 (void) memcpy((void *) (gc->pc + 16), (void *) (program), len);
8765 gc->pc += cmdlen;
8766 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8767 (void) __glXFlushRenderBuffer(gc, gc->pc);
8768 }
8769 }
8770 }
8771
8772 #define X_GLrop_ProgramParameter4dvNV 4185
8773 void
8774 __indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x,
8775 GLdouble y, GLdouble z, GLdouble w)
8776 {
8777 __GLXcontext *const gc = __glXGetCurrentContext();
8778 const GLuint cmdlen = 44;
8779 emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
8780 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8781 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
8782 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
8783 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
8784 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
8785 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
8786 gc->pc += cmdlen;
8787 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8788 (void) __glXFlushRenderBuffer(gc, gc->pc);
8789 }
8790 }
8791
8792 #define X_GLrop_ProgramParameter4dvNV 4185
8793 void
8794 __indirect_glProgramParameter4dvNV(GLenum target, GLuint index,
8795 const GLdouble * params)
8796 {
8797 __GLXcontext *const gc = __glXGetCurrentContext();
8798 const GLuint cmdlen = 44;
8799 emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
8800 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8801 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
8802 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
8803 gc->pc += cmdlen;
8804 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8805 (void) __glXFlushRenderBuffer(gc, gc->pc);
8806 }
8807 }
8808
8809 #define X_GLrop_ProgramParameter4fvNV 4184
8810 void
8811 __indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x,
8812 GLfloat y, GLfloat z, GLfloat w)
8813 {
8814 __GLXcontext *const gc = __glXGetCurrentContext();
8815 const GLuint cmdlen = 28;
8816 emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
8817 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8818 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
8819 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
8820 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
8821 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
8822 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
8823 gc->pc += cmdlen;
8824 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8825 (void) __glXFlushRenderBuffer(gc, gc->pc);
8826 }
8827 }
8828
8829 #define X_GLrop_ProgramParameter4fvNV 4184
8830 void
8831 __indirect_glProgramParameter4fvNV(GLenum target, GLuint index,
8832 const GLfloat * params)
8833 {
8834 __GLXcontext *const gc = __glXGetCurrentContext();
8835 const GLuint cmdlen = 28;
8836 emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, cmdlen);
8837 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8838 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
8839 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
8840 gc->pc += cmdlen;
8841 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8842 (void) __glXFlushRenderBuffer(gc, gc->pc);
8843 }
8844 }
8845
8846 #define X_GLrop_ProgramParameters4dvNV 4187
8847 void
8848 __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num,
8849 const GLdouble * params)
8850 {
8851 __GLXcontext *const gc = __glXGetCurrentContext();
8852 const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
8853 if (__builtin_expect(num >= 0, 1)) {
8854 emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
8855 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8856 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
8857 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
8858 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 32));
8859 gc->pc += cmdlen;
8860 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8861 (void) __glXFlushRenderBuffer(gc, gc->pc);
8862 }
8863 }
8864 }
8865
8866 #define X_GLrop_ProgramParameters4fvNV 4186
8867 void
8868 __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num,
8869 const GLfloat * params)
8870 {
8871 __GLXcontext *const gc = __glXGetCurrentContext();
8872 const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
8873 if (__builtin_expect(num >= 0, 1)) {
8874 emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
8875 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8876 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
8877 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
8878 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 16));
8879 gc->pc += cmdlen;
8880 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8881 (void) __glXFlushRenderBuffer(gc, gc->pc);
8882 }
8883 }
8884 }
8885
8886 #define X_GLrop_RequestResidentProgramsNV 4182
8887 void
8888 __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
8889 {
8890 __GLXcontext *const gc = __glXGetCurrentContext();
8891 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8892 if (__builtin_expect(n >= 0, 1)) {
8893 emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
8894 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
8895 (void) memcpy((void *) (gc->pc + 8), (void *) (ids), (n * 4));
8896 gc->pc += cmdlen;
8897 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8898 (void) __glXFlushRenderBuffer(gc, gc->pc);
8899 }
8900 }
8901 }
8902
8903 #define X_GLrop_TrackMatrixNV 4188
8904 void
8905 __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix,
8906 GLenum transform)
8907 {
8908 __GLXcontext *const gc = __glXGetCurrentContext();
8909 const GLuint cmdlen = 20;
8910 emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
8911 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8912 (void) memcpy((void *) (gc->pc + 8), (void *) (&address), 4);
8913 (void) memcpy((void *) (gc->pc + 12), (void *) (&matrix), 4);
8914 (void) memcpy((void *) (gc->pc + 16), (void *) (&transform), 4);
8915 gc->pc += cmdlen;
8916 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8917 (void) __glXFlushRenderBuffer(gc, gc->pc);
8918 }
8919 }
8920
8921 #define X_GLrop_VertexAttrib1dvNV 4273
8922 void
8923 __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
8924 {
8925 __GLXcontext *const gc = __glXGetCurrentContext();
8926 const GLuint cmdlen = 16;
8927 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
8928 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8929 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
8930 gc->pc += cmdlen;
8931 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8932 (void) __glXFlushRenderBuffer(gc, gc->pc);
8933 }
8934 }
8935
8936 #define X_GLrop_VertexAttrib1dvNV 4273
8937 void
8938 __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
8939 {
8940 __GLXcontext *const gc = __glXGetCurrentContext();
8941 const GLuint cmdlen = 16;
8942 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
8943 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8944 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8945 gc->pc += cmdlen;
8946 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8947 (void) __glXFlushRenderBuffer(gc, gc->pc);
8948 }
8949 }
8950
8951 #define X_GLrop_VertexAttrib1fvNV 4269
8952 void
8953 __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
8954 {
8955 __GLXcontext *const gc = __glXGetCurrentContext();
8956 const GLuint cmdlen = 12;
8957 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
8958 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8959 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
8960 gc->pc += cmdlen;
8961 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8962 (void) __glXFlushRenderBuffer(gc, gc->pc);
8963 }
8964 }
8965
8966 #define X_GLrop_VertexAttrib1fvNV 4269
8967 void
8968 __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
8969 {
8970 __GLXcontext *const gc = __glXGetCurrentContext();
8971 const GLuint cmdlen = 12;
8972 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
8973 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8974 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8975 gc->pc += cmdlen;
8976 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8977 (void) __glXFlushRenderBuffer(gc, gc->pc);
8978 }
8979 }
8980
8981 #define X_GLrop_VertexAttrib1svNV 4265
8982 void
8983 __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
8984 {
8985 __GLXcontext *const gc = __glXGetCurrentContext();
8986 const GLuint cmdlen = 12;
8987 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
8988 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8989 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
8990 gc->pc += cmdlen;
8991 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8992 (void) __glXFlushRenderBuffer(gc, gc->pc);
8993 }
8994 }
8995
8996 #define X_GLrop_VertexAttrib1svNV 4265
8997 void
8998 __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
8999 {
9000 __GLXcontext *const gc = __glXGetCurrentContext();
9001 const GLuint cmdlen = 12;
9002 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9003 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9004 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
9005 gc->pc += cmdlen;
9006 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9007 (void) __glXFlushRenderBuffer(gc, gc->pc);
9008 }
9009 }
9010
9011 #define X_GLrop_VertexAttrib2dvNV 4274
9012 void
9013 __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
9014 {
9015 __GLXcontext *const gc = __glXGetCurrentContext();
9016 const GLuint cmdlen = 24;
9017 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9018 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9019 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9020 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9021 gc->pc += cmdlen;
9022 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9023 (void) __glXFlushRenderBuffer(gc, gc->pc);
9024 }
9025 }
9026
9027 #define X_GLrop_VertexAttrib2dvNV 4274
9028 void
9029 __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
9030 {
9031 __GLXcontext *const gc = __glXGetCurrentContext();
9032 const GLuint cmdlen = 24;
9033 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9034 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9035 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9036 gc->pc += cmdlen;
9037 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9038 (void) __glXFlushRenderBuffer(gc, gc->pc);
9039 }
9040 }
9041
9042 #define X_GLrop_VertexAttrib2fvNV 4270
9043 void
9044 __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
9045 {
9046 __GLXcontext *const gc = __glXGetCurrentContext();
9047 const GLuint cmdlen = 16;
9048 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9049 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9050 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9051 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9052 gc->pc += cmdlen;
9053 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9054 (void) __glXFlushRenderBuffer(gc, gc->pc);
9055 }
9056 }
9057
9058 #define X_GLrop_VertexAttrib2fvNV 4270
9059 void
9060 __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
9061 {
9062 __GLXcontext *const gc = __glXGetCurrentContext();
9063 const GLuint cmdlen = 16;
9064 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9065 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9066 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9067 gc->pc += cmdlen;
9068 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9069 (void) __glXFlushRenderBuffer(gc, gc->pc);
9070 }
9071 }
9072
9073 #define X_GLrop_VertexAttrib2svNV 4266
9074 void
9075 __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
9076 {
9077 __GLXcontext *const gc = __glXGetCurrentContext();
9078 const GLuint cmdlen = 12;
9079 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9080 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9081 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9082 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9083 gc->pc += cmdlen;
9084 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9085 (void) __glXFlushRenderBuffer(gc, gc->pc);
9086 }
9087 }
9088
9089 #define X_GLrop_VertexAttrib2svNV 4266
9090 void
9091 __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
9092 {
9093 __GLXcontext *const gc = __glXGetCurrentContext();
9094 const GLuint cmdlen = 12;
9095 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9096 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9097 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9098 gc->pc += cmdlen;
9099 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9100 (void) __glXFlushRenderBuffer(gc, gc->pc);
9101 }
9102 }
9103
9104 #define X_GLrop_VertexAttrib3dvNV 4275
9105 void
9106 __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y,
9107 GLdouble z)
9108 {
9109 __GLXcontext *const gc = __glXGetCurrentContext();
9110 const GLuint cmdlen = 32;
9111 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9112 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9113 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9114 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9115 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9116 gc->pc += cmdlen;
9117 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9118 (void) __glXFlushRenderBuffer(gc, gc->pc);
9119 }
9120 }
9121
9122 #define X_GLrop_VertexAttrib3dvNV 4275
9123 void
9124 __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
9125 {
9126 __GLXcontext *const gc = __glXGetCurrentContext();
9127 const GLuint cmdlen = 32;
9128 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9129 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9130 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
9131 gc->pc += cmdlen;
9132 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9133 (void) __glXFlushRenderBuffer(gc, gc->pc);
9134 }
9135 }
9136
9137 #define X_GLrop_VertexAttrib3fvNV 4271
9138 void
9139 __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
9140 {
9141 __GLXcontext *const gc = __glXGetCurrentContext();
9142 const GLuint cmdlen = 20;
9143 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9144 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9145 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9146 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9147 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9148 gc->pc += cmdlen;
9149 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9150 (void) __glXFlushRenderBuffer(gc, gc->pc);
9151 }
9152 }
9153
9154 #define X_GLrop_VertexAttrib3fvNV 4271
9155 void
9156 __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
9157 {
9158 __GLXcontext *const gc = __glXGetCurrentContext();
9159 const GLuint cmdlen = 20;
9160 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9161 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9162 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
9163 gc->pc += cmdlen;
9164 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9165 (void) __glXFlushRenderBuffer(gc, gc->pc);
9166 }
9167 }
9168
9169 #define X_GLrop_VertexAttrib3svNV 4267
9170 void
9171 __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
9172 {
9173 __GLXcontext *const gc = __glXGetCurrentContext();
9174 const GLuint cmdlen = 16;
9175 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9176 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9177 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9178 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9179 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9180 gc->pc += cmdlen;
9181 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9182 (void) __glXFlushRenderBuffer(gc, gc->pc);
9183 }
9184 }
9185
9186 #define X_GLrop_VertexAttrib3svNV 4267
9187 void
9188 __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
9189 {
9190 __GLXcontext *const gc = __glXGetCurrentContext();
9191 const GLuint cmdlen = 16;
9192 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9193 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9194 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
9195 gc->pc += cmdlen;
9196 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9197 (void) __glXFlushRenderBuffer(gc, gc->pc);
9198 }
9199 }
9200
9201 #define X_GLrop_VertexAttrib4dvNV 4276
9202 void
9203 __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y,
9204 GLdouble z, GLdouble w)
9205 {
9206 __GLXcontext *const gc = __glXGetCurrentContext();
9207 const GLuint cmdlen = 40;
9208 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9209 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9210 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9211 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9212 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9213 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
9214 gc->pc += cmdlen;
9215 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9216 (void) __glXFlushRenderBuffer(gc, gc->pc);
9217 }
9218 }
9219
9220 #define X_GLrop_VertexAttrib4dvNV 4276
9221 void
9222 __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
9223 {
9224 __GLXcontext *const gc = __glXGetCurrentContext();
9225 const GLuint cmdlen = 40;
9226 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9227 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9228 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
9229 gc->pc += cmdlen;
9230 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9231 (void) __glXFlushRenderBuffer(gc, gc->pc);
9232 }
9233 }
9234
9235 #define X_GLrop_VertexAttrib4fvNV 4272
9236 void
9237 __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z,
9238 GLfloat w)
9239 {
9240 __GLXcontext *const gc = __glXGetCurrentContext();
9241 const GLuint cmdlen = 24;
9242 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9243 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9244 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9245 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9246 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9247 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
9248 gc->pc += cmdlen;
9249 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9250 (void) __glXFlushRenderBuffer(gc, gc->pc);
9251 }
9252 }
9253
9254 #define X_GLrop_VertexAttrib4fvNV 4272
9255 void
9256 __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
9257 {
9258 __GLXcontext *const gc = __glXGetCurrentContext();
9259 const GLuint cmdlen = 24;
9260 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9261 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9262 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9263 gc->pc += cmdlen;
9264 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9265 (void) __glXFlushRenderBuffer(gc, gc->pc);
9266 }
9267 }
9268
9269 #define X_GLrop_VertexAttrib4svNV 4268
9270 void
9271 __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z,
9272 GLshort w)
9273 {
9274 __GLXcontext *const gc = __glXGetCurrentContext();
9275 const GLuint cmdlen = 16;
9276 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9277 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9278 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9279 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9280 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9281 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
9282 gc->pc += cmdlen;
9283 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9284 (void) __glXFlushRenderBuffer(gc, gc->pc);
9285 }
9286 }
9287
9288 #define X_GLrop_VertexAttrib4svNV 4268
9289 void
9290 __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
9291 {
9292 __GLXcontext *const gc = __glXGetCurrentContext();
9293 const GLuint cmdlen = 16;
9294 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9295 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9296 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9297 gc->pc += cmdlen;
9298 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9299 (void) __glXFlushRenderBuffer(gc, gc->pc);
9300 }
9301 }
9302
9303 #define X_GLrop_VertexAttrib4ubvNV 4277
9304 void
9305 __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
9306 GLubyte w)
9307 {
9308 __GLXcontext *const gc = __glXGetCurrentContext();
9309 const GLuint cmdlen = 12;
9310 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9311 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9312 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
9313 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
9314 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
9315 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
9316 gc->pc += cmdlen;
9317 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9318 (void) __glXFlushRenderBuffer(gc, gc->pc);
9319 }
9320 }
9321
9322 #define X_GLrop_VertexAttrib4ubvNV 4277
9323 void
9324 __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v)
9325 {
9326 __GLXcontext *const gc = __glXGetCurrentContext();
9327 const GLuint cmdlen = 12;
9328 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9329 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9330 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9331 gc->pc += cmdlen;
9332 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9333 (void) __glXFlushRenderBuffer(gc, gc->pc);
9334 }
9335 }
9336
9337 #define X_GLrop_VertexAttribs1dvNV 4210
9338 void
9339 __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
9340 {
9341 __GLXcontext *const gc = __glXGetCurrentContext();
9342 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9343 if (__builtin_expect(n >= 0, 1)) {
9344 emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
9345 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9346 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9347 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9348 gc->pc += cmdlen;
9349 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9350 (void) __glXFlushRenderBuffer(gc, gc->pc);
9351 }
9352 }
9353 }
9354
9355 #define X_GLrop_VertexAttribs1fvNV 4206
9356 void
9357 __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
9358 {
9359 __GLXcontext *const gc = __glXGetCurrentContext();
9360 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9361 if (__builtin_expect(n >= 0, 1)) {
9362 emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
9363 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9364 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9365 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9366 gc->pc += cmdlen;
9367 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9368 (void) __glXFlushRenderBuffer(gc, gc->pc);
9369 }
9370 }
9371 }
9372
9373 #define X_GLrop_VertexAttribs1svNV 4202
9374 void
9375 __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
9376 {
9377 __GLXcontext *const gc = __glXGetCurrentContext();
9378 const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
9379 if (__builtin_expect(n >= 0, 1)) {
9380 emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
9381 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9382 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9383 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 2));
9384 gc->pc += cmdlen;
9385 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9386 (void) __glXFlushRenderBuffer(gc, gc->pc);
9387 }
9388 }
9389 }
9390
9391 #define X_GLrop_VertexAttribs2dvNV 4211
9392 void
9393 __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
9394 {
9395 __GLXcontext *const gc = __glXGetCurrentContext();
9396 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9397 if (__builtin_expect(n >= 0, 1)) {
9398 emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
9399 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9400 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9401 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
9402 gc->pc += cmdlen;
9403 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9404 (void) __glXFlushRenderBuffer(gc, gc->pc);
9405 }
9406 }
9407 }
9408
9409 #define X_GLrop_VertexAttribs2fvNV 4207
9410 void
9411 __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
9412 {
9413 __GLXcontext *const gc = __glXGetCurrentContext();
9414 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9415 if (__builtin_expect(n >= 0, 1)) {
9416 emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
9417 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9418 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9419 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9420 gc->pc += cmdlen;
9421 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9422 (void) __glXFlushRenderBuffer(gc, gc->pc);
9423 }
9424 }
9425 }
9426
9427 #define X_GLrop_VertexAttribs2svNV 4203
9428 void
9429 __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
9430 {
9431 __GLXcontext *const gc = __glXGetCurrentContext();
9432 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9433 if (__builtin_expect(n >= 0, 1)) {
9434 emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
9435 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9436 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9437 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9438 gc->pc += cmdlen;
9439 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9440 (void) __glXFlushRenderBuffer(gc, gc->pc);
9441 }
9442 }
9443 }
9444
9445 #define X_GLrop_VertexAttribs3dvNV 4212
9446 void
9447 __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
9448 {
9449 __GLXcontext *const gc = __glXGetCurrentContext();
9450 const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
9451 if (__builtin_expect(n >= 0, 1)) {
9452 emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
9453 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9454 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9455 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 24));
9456 gc->pc += cmdlen;
9457 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9458 (void) __glXFlushRenderBuffer(gc, gc->pc);
9459 }
9460 }
9461 }
9462
9463 #define X_GLrop_VertexAttribs3fvNV 4208
9464 void
9465 __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
9466 {
9467 __GLXcontext *const gc = __glXGetCurrentContext();
9468 const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
9469 if (__builtin_expect(n >= 0, 1)) {
9470 emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
9471 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9472 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9473 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 12));
9474 gc->pc += cmdlen;
9475 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9476 (void) __glXFlushRenderBuffer(gc, gc->pc);
9477 }
9478 }
9479 }
9480
9481 #define X_GLrop_VertexAttribs3svNV 4204
9482 void
9483 __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
9484 {
9485 __GLXcontext *const gc = __glXGetCurrentContext();
9486 const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
9487 if (__builtin_expect(n >= 0, 1)) {
9488 emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
9489 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9490 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9491 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 6));
9492 gc->pc += cmdlen;
9493 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9494 (void) __glXFlushRenderBuffer(gc, gc->pc);
9495 }
9496 }
9497 }
9498
9499 #define X_GLrop_VertexAttribs4dvNV 4213
9500 void
9501 __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
9502 {
9503 __GLXcontext *const gc = __glXGetCurrentContext();
9504 const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
9505 if (__builtin_expect(n >= 0, 1)) {
9506 emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
9507 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9508 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9509 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 32));
9510 gc->pc += cmdlen;
9511 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9512 (void) __glXFlushRenderBuffer(gc, gc->pc);
9513 }
9514 }
9515 }
9516
9517 #define X_GLrop_VertexAttribs4fvNV 4209
9518 void
9519 __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
9520 {
9521 __GLXcontext *const gc = __glXGetCurrentContext();
9522 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9523 if (__builtin_expect(n >= 0, 1)) {
9524 emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
9525 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9526 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9527 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
9528 gc->pc += cmdlen;
9529 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9530 (void) __glXFlushRenderBuffer(gc, gc->pc);
9531 }
9532 }
9533 }
9534
9535 #define X_GLrop_VertexAttribs4svNV 4205
9536 void
9537 __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
9538 {
9539 __GLXcontext *const gc = __glXGetCurrentContext();
9540 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9541 if (__builtin_expect(n >= 0, 1)) {
9542 emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
9543 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9544 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9545 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9546 gc->pc += cmdlen;
9547 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9548 (void) __glXFlushRenderBuffer(gc, gc->pc);
9549 }
9550 }
9551 }
9552
9553 #define X_GLrop_VertexAttribs4ubvNV 4214
9554 void
9555 __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
9556 {
9557 __GLXcontext *const gc = __glXGetCurrentContext();
9558 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9559 if (__builtin_expect(n >= 0, 1)) {
9560 emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
9561 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9562 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9563 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9564 gc->pc += cmdlen;
9565 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9566 (void) __glXFlushRenderBuffer(gc, gc->pc);
9567 }
9568 }
9569 }
9570
9571 #define X_GLrop_PointParameteriNV 4221
9572 void
9573 __indirect_glPointParameteriNV(GLenum pname, GLint param)
9574 {
9575 __GLXcontext *const gc = __glXGetCurrentContext();
9576 const GLuint cmdlen = 12;
9577 emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
9578 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
9579 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
9580 gc->pc += cmdlen;
9581 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9582 (void) __glXFlushRenderBuffer(gc, gc->pc);
9583 }
9584 }
9585
9586 #define X_GLrop_PointParameterivNV 4222
9587 void
9588 __indirect_glPointParameterivNV(GLenum pname, const GLint * params)
9589 {
9590 __GLXcontext *const gc = __glXGetCurrentContext();
9591 const GLuint compsize = __glPointParameterivNV_size(pname);
9592 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
9593 emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
9594 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
9595 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
9596 gc->pc += cmdlen;
9597 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9598 (void) __glXFlushRenderBuffer(gc, gc->pc);
9599 }
9600 }
9601
9602 #define X_GLrop_ActiveStencilFaceEXT 4220
9603 void
9604 __indirect_glActiveStencilFaceEXT(GLenum face)
9605 {
9606 __GLXcontext *const gc = __glXGetCurrentContext();
9607 const GLuint cmdlen = 8;
9608 emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
9609 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
9610 gc->pc += cmdlen;
9611 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9612 (void) __glXFlushRenderBuffer(gc, gc->pc);
9613 }
9614 }
9615
9616 #define X_GLvop_GetProgramNamedParameterdvNV 1311
9617 void
9618 __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
9619 const GLubyte * name,
9620 GLdouble * params)
9621 {
9622 __GLXcontext *const gc = __glXGetCurrentContext();
9623 Display *const dpy = gc->currentDpy;
9624 const GLuint cmdlen = 8 + __GLX_PAD(len);
9625 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
9626 GLubyte const *pc =
9627 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9628 X_GLvop_GetProgramNamedParameterdvNV,
9629 cmdlen);
9630 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9631 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
9632 (void) memcpy((void *) (pc + 8), (void *) (name), len);
9633 (void) __glXReadReply(dpy, 8, params, GL_TRUE);
9634 UnlockDisplay(dpy);
9635 SyncHandle();
9636 }
9637 return;
9638 }
9639
9640 #define X_GLvop_GetProgramNamedParameterfvNV 1310
9641 void
9642 __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
9643 const GLubyte * name,
9644 GLfloat * params)
9645 {
9646 __GLXcontext *const gc = __glXGetCurrentContext();
9647 Display *const dpy = gc->currentDpy;
9648 const GLuint cmdlen = 8 + __GLX_PAD(len);
9649 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
9650 GLubyte const *pc =
9651 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9652 X_GLvop_GetProgramNamedParameterfvNV,
9653 cmdlen);
9654 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9655 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
9656 (void) memcpy((void *) (pc + 8), (void *) (name), len);
9657 (void) __glXReadReply(dpy, 4, params, GL_TRUE);
9658 UnlockDisplay(dpy);
9659 SyncHandle();
9660 }
9661 return;
9662 }
9663
9664 #define X_GLrop_ProgramNamedParameter4dvNV 4219
9665 void
9666 __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
9667 const GLubyte * name, GLdouble x,
9668 GLdouble y, GLdouble z, GLdouble w)
9669 {
9670 __GLXcontext *const gc = __glXGetCurrentContext();
9671 const GLuint cmdlen = 44 + __GLX_PAD(len);
9672 if (__builtin_expect(len >= 0, 1)) {
9673 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
9674 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
9675 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
9676 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
9677 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
9678 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
9679 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
9680 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
9681 gc->pc += cmdlen;
9682 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9683 (void) __glXFlushRenderBuffer(gc, gc->pc);
9684 }
9685 }
9686 }
9687
9688 #define X_GLrop_ProgramNamedParameter4dvNV 4219
9689 void
9690 __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
9691 const GLubyte * name,
9692 const GLdouble * v)
9693 {
9694 __GLXcontext *const gc = __glXGetCurrentContext();
9695 const GLuint cmdlen = 44 + __GLX_PAD(len);
9696 if (__builtin_expect(len >= 0, 1)) {
9697 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
9698 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
9699 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
9700 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
9701 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
9702 gc->pc += cmdlen;
9703 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9704 (void) __glXFlushRenderBuffer(gc, gc->pc);
9705 }
9706 }
9707 }
9708
9709 #define X_GLrop_ProgramNamedParameter4fvNV 4218
9710 void
9711 __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
9712 const GLubyte * name, GLfloat x,
9713 GLfloat y, GLfloat z, GLfloat w)
9714 {
9715 __GLXcontext *const gc = __glXGetCurrentContext();
9716 const GLuint cmdlen = 28 + __GLX_PAD(len);
9717 if (__builtin_expect(len >= 0, 1)) {
9718 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
9719 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
9720 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
9721 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
9722 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
9723 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
9724 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
9725 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
9726 gc->pc += cmdlen;
9727 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9728 (void) __glXFlushRenderBuffer(gc, gc->pc);
9729 }
9730 }
9731 }
9732
9733 #define X_GLrop_ProgramNamedParameter4fvNV 4218
9734 void
9735 __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
9736 const GLubyte * name,
9737 const GLfloat * v)
9738 {
9739 __GLXcontext *const gc = __glXGetCurrentContext();
9740 const GLuint cmdlen = 28 + __GLX_PAD(len);
9741 if (__builtin_expect(len >= 0, 1)) {
9742 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
9743 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
9744 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
9745 (void) memcpy((void *) (gc->pc + 12), (void *) (v), 16);
9746 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
9747 gc->pc += cmdlen;
9748 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9749 (void) __glXFlushRenderBuffer(gc, gc->pc);
9750 }
9751 }
9752 }
9753
9754 #define X_GLrop_BlendEquationSeparateEXT 4228
9755 void
9756 __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
9757 {
9758 __GLXcontext *const gc = __glXGetCurrentContext();
9759 const GLuint cmdlen = 12;
9760 emit_header(gc->pc, X_GLrop_BlendEquationSeparateEXT, cmdlen);
9761 (void) memcpy((void *) (gc->pc + 4), (void *) (&modeRGB), 4);
9762 (void) memcpy((void *) (gc->pc + 8), (void *) (&modeA), 4);
9763 gc->pc += cmdlen;
9764 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9765 (void) __glXFlushRenderBuffer(gc, gc->pc);
9766 }
9767 }
9768
9769 #define X_GLrop_BindFramebufferEXT 4319
9770 void
9771 __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
9772 {
9773 __GLXcontext *const gc = __glXGetCurrentContext();
9774 const GLuint cmdlen = 12;
9775 emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
9776 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9777 (void) memcpy((void *) (gc->pc + 8), (void *) (&framebuffer), 4);
9778 gc->pc += cmdlen;
9779 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9780 (void) __glXFlushRenderBuffer(gc, gc->pc);
9781 }
9782 }
9783
9784 #define X_GLrop_BindRenderbufferEXT 4316
9785 void
9786 __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
9787 {
9788 __GLXcontext *const gc = __glXGetCurrentContext();
9789 const GLuint cmdlen = 12;
9790 emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
9791 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9792 (void) memcpy((void *) (gc->pc + 8), (void *) (&renderbuffer), 4);
9793 gc->pc += cmdlen;
9794 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9795 (void) __glXFlushRenderBuffer(gc, gc->pc);
9796 }
9797 }
9798
9799 #define X_GLvop_CheckFramebufferStatusEXT 1427
9800 GLenum
9801 __indirect_glCheckFramebufferStatusEXT(GLenum target)
9802 {
9803 __GLXcontext *const gc = __glXGetCurrentContext();
9804 Display *const dpy = gc->currentDpy;
9805 GLenum retval = (GLenum) 0;
9806 const GLuint cmdlen = 4;
9807 if (__builtin_expect(dpy != NULL, 1)) {
9808 GLubyte const *pc =
9809 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9810 X_GLvop_CheckFramebufferStatusEXT,
9811 cmdlen);
9812 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9813 retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
9814 UnlockDisplay(dpy);
9815 SyncHandle();
9816 }
9817 return retval;
9818 }
9819
9820 #define X_GLrop_DeleteFramebuffersEXT 4320
9821 void
9822 __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
9823 {
9824 __GLXcontext *const gc = __glXGetCurrentContext();
9825 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
9826 if (__builtin_expect(n >= 0, 1)) {
9827 emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
9828 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
9829 (void) memcpy((void *) (gc->pc + 8), (void *) (framebuffers),
9830 (n * 4));
9831 gc->pc += cmdlen;
9832 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9833 (void) __glXFlushRenderBuffer(gc, gc->pc);
9834 }
9835 }
9836 }
9837
9838 #define X_GLrop_DeleteRenderbuffersEXT 4317
9839 void
9840 __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
9841 {
9842 __GLXcontext *const gc = __glXGetCurrentContext();
9843 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
9844 if (__builtin_expect(n >= 0, 1)) {
9845 emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
9846 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
9847 (void) memcpy((void *) (gc->pc + 8), (void *) (renderbuffers),
9848 (n * 4));
9849 gc->pc += cmdlen;
9850 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9851 (void) __glXFlushRenderBuffer(gc, gc->pc);
9852 }
9853 }
9854 }
9855
9856 #define X_GLrop_FramebufferRenderbufferEXT 4324
9857 void
9858 __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
9859 GLenum renderbuffertarget,
9860 GLuint renderbuffer)
9861 {
9862 __GLXcontext *const gc = __glXGetCurrentContext();
9863 const GLuint cmdlen = 20;
9864 emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
9865 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9866 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
9867 (void) memcpy((void *) (gc->pc + 12), (void *) (&renderbuffertarget), 4);
9868 (void) memcpy((void *) (gc->pc + 16), (void *) (&renderbuffer), 4);
9869 gc->pc += cmdlen;
9870 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9871 (void) __glXFlushRenderBuffer(gc, gc->pc);
9872 }
9873 }
9874
9875 #define X_GLrop_FramebufferTexture1DEXT 4321
9876 void
9877 __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
9878 GLenum textarget, GLuint texture,
9879 GLint level)
9880 {
9881 __GLXcontext *const gc = __glXGetCurrentContext();
9882 const GLuint cmdlen = 24;
9883 emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
9884 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9885 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
9886 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
9887 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
9888 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
9889 gc->pc += cmdlen;
9890 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9891 (void) __glXFlushRenderBuffer(gc, gc->pc);
9892 }
9893 }
9894
9895 #define X_GLrop_FramebufferTexture2DEXT 4322
9896 void
9897 __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
9898 GLenum textarget, GLuint texture,
9899 GLint level)
9900 {
9901 __GLXcontext *const gc = __glXGetCurrentContext();
9902 const GLuint cmdlen = 24;
9903 emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
9904 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9905 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
9906 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
9907 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
9908 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
9909 gc->pc += cmdlen;
9910 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9911 (void) __glXFlushRenderBuffer(gc, gc->pc);
9912 }
9913 }
9914
9915 #define X_GLrop_FramebufferTexture3DEXT 4323
9916 void
9917 __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
9918 GLenum textarget, GLuint texture,
9919 GLint level, GLint zoffset)
9920 {
9921 __GLXcontext *const gc = __glXGetCurrentContext();
9922 const GLuint cmdlen = 28;
9923 emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
9924 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9925 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
9926 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
9927 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
9928 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
9929 (void) memcpy((void *) (gc->pc + 24), (void *) (&zoffset), 4);
9930 gc->pc += cmdlen;
9931 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9932 (void) __glXFlushRenderBuffer(gc, gc->pc);
9933 }
9934 }
9935
9936 #define X_GLvop_GenFramebuffersEXT 1426
9937 void
9938 __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
9939 {
9940 __GLXcontext *const gc = __glXGetCurrentContext();
9941 Display *const dpy = gc->currentDpy;
9942 const GLuint cmdlen = 4;
9943 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
9944 GLubyte const *pc =
9945 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9946 X_GLvop_GenFramebuffersEXT, cmdlen);
9947 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
9948 (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
9949 UnlockDisplay(dpy);
9950 SyncHandle();
9951 }
9952 return;
9953 }
9954
9955 #define X_GLvop_GenRenderbuffersEXT 1423
9956 void
9957 __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
9958 {
9959 __GLXcontext *const gc = __glXGetCurrentContext();
9960 Display *const dpy = gc->currentDpy;
9961 const GLuint cmdlen = 4;
9962 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
9963 GLubyte const *pc =
9964 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9965 X_GLvop_GenRenderbuffersEXT, cmdlen);
9966 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
9967 (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
9968 UnlockDisplay(dpy);
9969 SyncHandle();
9970 }
9971 return;
9972 }
9973
9974 #define X_GLrop_GenerateMipmapEXT 4325
9975 void
9976 __indirect_glGenerateMipmapEXT(GLenum target)
9977 {
9978 __GLXcontext *const gc = __glXGetCurrentContext();
9979 const GLuint cmdlen = 8;
9980 emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
9981 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9982 gc->pc += cmdlen;
9983 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9984 (void) __glXFlushRenderBuffer(gc, gc->pc);
9985 }
9986 }
9987
9988 #define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
9989 void
9990 __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target,
9991 GLenum attachment,
9992 GLenum pname,
9993 GLint * params)
9994 {
9995 __GLXcontext *const gc = __glXGetCurrentContext();
9996 Display *const dpy = gc->currentDpy;
9997 const GLuint cmdlen = 12;
9998 if (__builtin_expect(dpy != NULL, 1)) {
9999 GLubyte const *pc =
10000 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10001 X_GLvop_GetFramebufferAttachmentParameterivEXT,
10002 cmdlen);
10003 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10004 (void) memcpy((void *) (pc + 4), (void *) (&attachment), 4);
10005 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
10006 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10007 UnlockDisplay(dpy);
10008 SyncHandle();
10009 }
10010 return;
10011 }
10012
10013 #define X_GLvop_GetRenderbufferParameterivEXT 1424
10014 void
10015 __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname,
10016 GLint * params)
10017 {
10018 __GLXcontext *const gc = __glXGetCurrentContext();
10019 Display *const dpy = gc->currentDpy;
10020 const GLuint cmdlen = 8;
10021 if (__builtin_expect(dpy != NULL, 1)) {
10022 GLubyte const *pc =
10023 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10024 X_GLvop_GetRenderbufferParameterivEXT,
10025 cmdlen);
10026 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10027 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
10028 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10029 UnlockDisplay(dpy);
10030 SyncHandle();
10031 }
10032 return;
10033 }
10034
10035 #define X_GLvop_IsFramebufferEXT 1425
10036 GLboolean
10037 __indirect_glIsFramebufferEXT(GLuint framebuffer)
10038 {
10039 __GLXcontext *const gc = __glXGetCurrentContext();
10040 Display *const dpy = gc->currentDpy;
10041 GLboolean retval = (GLboolean) 0;
10042 const GLuint cmdlen = 4;
10043 if (__builtin_expect(dpy != NULL, 1)) {
10044 GLubyte const *pc =
10045 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10046 X_GLvop_IsFramebufferEXT, cmdlen);
10047 (void) memcpy((void *) (pc + 0), (void *) (&framebuffer), 4);
10048 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10049 UnlockDisplay(dpy);
10050 SyncHandle();
10051 }
10052 return retval;
10053 }
10054
10055 #define X_GLvop_IsRenderbufferEXT 1422
10056 GLboolean
10057 __indirect_glIsRenderbufferEXT(GLuint renderbuffer)
10058 {
10059 __GLXcontext *const gc = __glXGetCurrentContext();
10060 Display *const dpy = gc->currentDpy;
10061 GLboolean retval = (GLboolean) 0;
10062 const GLuint cmdlen = 4;
10063 if (__builtin_expect(dpy != NULL, 1)) {
10064 GLubyte const *pc =
10065 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10066 X_GLvop_IsRenderbufferEXT, cmdlen);
10067 (void) memcpy((void *) (pc + 0), (void *) (&renderbuffer), 4);
10068 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10069 UnlockDisplay(dpy);
10070 SyncHandle();
10071 }
10072 return retval;
10073 }
10074
10075 #define X_GLrop_RenderbufferStorageEXT 4318
10076 void
10077 __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
10078 GLsizei width, GLsizei height)
10079 {
10080 __GLXcontext *const gc = __glXGetCurrentContext();
10081 const GLuint cmdlen = 20;
10082 emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
10083 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10084 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
10085 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
10086 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
10087 gc->pc += cmdlen;
10088 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10089 (void) __glXFlushRenderBuffer(gc, gc->pc);
10090 }
10091 }
10092
10093
10094 # undef FASTCALL
10095 # undef NOINLINE