egl_dri2: Fix initialization with EGL_DEFAULT_DISPLAY
[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 "glapitable.h"
34 #include "glapidispatch.h"
35 #include "glapi.h"
36 #include "glthread.h"
37 #include <GL/glxproto.h>
38 #ifdef USE_XCB
39 #include <X11/Xlib-xcb.h>
40 #include <xcb/xcb.h>
41 #include <xcb/glx.h>
42 #endif /* USE_XCB */
43
44 #define __GLX_PAD(n) (((n) + 3) & ~3)
45
46 # if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
47 # define FASTCALL __attribute__((fastcall))
48 # else
49 # define FASTCALL
50 # endif
51 # if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
52 # define NOINLINE __attribute__((noinline))
53 # else
54 # define NOINLINE
55 # endif
56
57 #if !defined __GNUC__ || __GNUC__ < 3
58 # define __builtin_expect(x, y) x
59 #endif
60
61 /* If the size and opcode values are known at compile-time, this will, on
62 * x86 at least, emit them with a single instruction.
63 */
64 #define emit_header(dest, op, size) \
65 do { union { short s[2]; int i; } temp; \
66 temp.s[0] = (size); temp.s[1] = (op); \
67 *((int *)(dest)) = temp.i; } while(0)
68
69 NOINLINE CARD32
70 __glXReadReply(Display * dpy, size_t size, void *dest,
71 GLboolean reply_is_always_array)
72 {
73 xGLXSingleReply reply;
74
75 (void) _XReply(dpy, (xReply *) & reply, 0, False);
76 if (size != 0) {
77 if ((reply.length > 0) || reply_is_always_array) {
78 const GLint bytes = (reply_is_always_array)
79 ? (4 * reply.length) : (reply.size * size);
80 const GLint extra = 4 - (bytes & 3);
81
82 _XRead(dpy, dest, bytes);
83 if (extra < 4) {
84 _XEatData(dpy, extra);
85 }
86 } else {
87 (void) memcpy(dest, &(reply.pad3), size);
88 }
89 }
90
91 return reply.retval;
92 }
93
94 NOINLINE void
95 __glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim,
96 GLint width, GLint height, GLint depth, GLenum format,
97 GLenum type, void *dest, GLboolean dimensions_in_reply)
98 {
99 xGLXSingleReply reply;
100 GLint size;
101
102 (void) _XReply(dpy, (xReply *) & reply, 0, False);
103
104 if (dimensions_in_reply) {
105 width = reply.pad3;
106 height = reply.pad4;
107 depth = reply.pad5;
108
109 if ((height == 0) || (max_dim < 2)) {
110 height = 1;
111 }
112 if ((depth == 0) || (max_dim < 3)) {
113 depth = 1;
114 }
115 }
116
117 size = reply.length * 4;
118 if (size != 0) {
119 void *buf = Xmalloc(size);
120
121 if (buf == NULL) {
122 _XEatData(dpy, size);
123 __glXSetError(gc, GL_OUT_OF_MEMORY);
124 } else {
125 const GLint extra = 4 - (size & 3);
126
127 _XRead(dpy, buf, size);
128 if (extra < 4) {
129 _XEatData(dpy, extra);
130 }
131
132 __glEmptyImage(gc, 3, width, height, depth, format, type,
133 buf, dest);
134 Xfree(buf);
135 }
136 }
137 }
138
139 #define X_GLXSingle 0
140
141 NOINLINE FASTCALL GLubyte *
142 __glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
143 {
144 xGLXSingleReq *req;
145 Display *const dpy = gc->currentDpy;
146
147 (void) __glXFlushRenderBuffer(gc, gc->pc);
148 LockDisplay(dpy);
149 GetReqExtra(GLXSingle, cmdlen, req);
150 req->reqType = gc->majorOpcode;
151 req->contextTag = gc->currentContextTag;
152 req->glxCode = sop;
153 return (GLubyte *) (req) + sz_xGLXSingleReq;
154 }
155
156 NOINLINE FASTCALL GLubyte *
157 __glXSetupVendorRequest(__GLXcontext * gc, GLint code, GLint vop,
158 GLint cmdlen)
159 {
160 xGLXVendorPrivateReq *req;
161 Display *const dpy = gc->currentDpy;
162
163 (void) __glXFlushRenderBuffer(gc, gc->pc);
164 LockDisplay(dpy);
165 GetReqExtra(GLXVendorPrivate, cmdlen, req);
166 req->reqType = gc->majorOpcode;
167 req->glxCode = code;
168 req->vendorCode = vop;
169 req->contextTag = gc->currentContextTag;
170 return (GLubyte *) (req) + sz_xGLXVendorPrivateReq;
171 }
172
173 const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
174
175 #define zero (__glXDefaultPixelStore+0)
176 #define one (__glXDefaultPixelStore+8)
177 #define default_pixel_store_1D (__glXDefaultPixelStore+4)
178 #define default_pixel_store_1D_size 20
179 #define default_pixel_store_2D (__glXDefaultPixelStore+4)
180 #define default_pixel_store_2D_size 20
181 #define default_pixel_store_3D (__glXDefaultPixelStore+0)
182 #define default_pixel_store_3D_size 36
183 #define default_pixel_store_4D (__glXDefaultPixelStore+0)
184 #define default_pixel_store_4D_size 36
185
186 static FASTCALL NOINLINE void
187 generic_3_byte(GLint rop, const void *ptr)
188 {
189 __GLXcontext *const gc = __glXGetCurrentContext();
190 const GLuint cmdlen = 8;
191
192 emit_header(gc->pc, rop, cmdlen);
193 (void) memcpy((void *) (gc->pc + 4), ptr, 4);
194 gc->pc += cmdlen;
195 if (__builtin_expect(gc->pc > gc->limit, 0)) {
196 (void) __glXFlushRenderBuffer(gc, gc->pc);
197 }
198 }
199
200 static FASTCALL NOINLINE void
201 generic_4_byte(GLint rop, const void *ptr)
202 {
203 __GLXcontext *const gc = __glXGetCurrentContext();
204 const GLuint cmdlen = 8;
205
206 emit_header(gc->pc, rop, cmdlen);
207 (void) memcpy((void *) (gc->pc + 4), ptr, 4);
208 gc->pc += cmdlen;
209 if (__builtin_expect(gc->pc > gc->limit, 0)) {
210 (void) __glXFlushRenderBuffer(gc, gc->pc);
211 }
212 }
213
214 static FASTCALL NOINLINE void
215 generic_6_byte(GLint rop, const void *ptr)
216 {
217 __GLXcontext *const gc = __glXGetCurrentContext();
218 const GLuint cmdlen = 12;
219
220 emit_header(gc->pc, rop, cmdlen);
221 (void) memcpy((void *) (gc->pc + 4), ptr, 8);
222 gc->pc += cmdlen;
223 if (__builtin_expect(gc->pc > gc->limit, 0)) {
224 (void) __glXFlushRenderBuffer(gc, gc->pc);
225 }
226 }
227
228 static FASTCALL NOINLINE void
229 generic_8_byte(GLint rop, const void *ptr)
230 {
231 __GLXcontext *const gc = __glXGetCurrentContext();
232 const GLuint cmdlen = 12;
233
234 emit_header(gc->pc, rop, cmdlen);
235 (void) memcpy((void *) (gc->pc + 4), ptr, 8);
236 gc->pc += cmdlen;
237 if (__builtin_expect(gc->pc > gc->limit, 0)) {
238 (void) __glXFlushRenderBuffer(gc, gc->pc);
239 }
240 }
241
242 static FASTCALL NOINLINE void
243 generic_12_byte(GLint rop, const void *ptr)
244 {
245 __GLXcontext *const gc = __glXGetCurrentContext();
246 const GLuint cmdlen = 16;
247
248 emit_header(gc->pc, rop, cmdlen);
249 (void) memcpy((void *) (gc->pc + 4), ptr, 12);
250 gc->pc += cmdlen;
251 if (__builtin_expect(gc->pc > gc->limit, 0)) {
252 (void) __glXFlushRenderBuffer(gc, gc->pc);
253 }
254 }
255
256 static FASTCALL NOINLINE void
257 generic_16_byte(GLint rop, const void *ptr)
258 {
259 __GLXcontext *const gc = __glXGetCurrentContext();
260 const GLuint cmdlen = 20;
261
262 emit_header(gc->pc, rop, cmdlen);
263 (void) memcpy((void *) (gc->pc + 4), ptr, 16);
264 gc->pc += cmdlen;
265 if (__builtin_expect(gc->pc > gc->limit, 0)) {
266 (void) __glXFlushRenderBuffer(gc, gc->pc);
267 }
268 }
269
270 static FASTCALL NOINLINE void
271 generic_24_byte(GLint rop, const void *ptr)
272 {
273 __GLXcontext *const gc = __glXGetCurrentContext();
274 const GLuint cmdlen = 28;
275
276 emit_header(gc->pc, rop, cmdlen);
277 (void) memcpy((void *) (gc->pc + 4), ptr, 24);
278 gc->pc += cmdlen;
279 if (__builtin_expect(gc->pc > gc->limit, 0)) {
280 (void) __glXFlushRenderBuffer(gc, gc->pc);
281 }
282 }
283
284 static FASTCALL NOINLINE void
285 generic_32_byte(GLint rop, const void *ptr)
286 {
287 __GLXcontext *const gc = __glXGetCurrentContext();
288 const GLuint cmdlen = 36;
289
290 emit_header(gc->pc, rop, cmdlen);
291 (void) memcpy((void *) (gc->pc + 4), ptr, 32);
292 gc->pc += cmdlen;
293 if (__builtin_expect(gc->pc > gc->limit, 0)) {
294 (void) __glXFlushRenderBuffer(gc, gc->pc);
295 }
296 }
297
298 #define X_GLsop_NewList 101
299 void
300 __indirect_glNewList(GLuint list, GLenum mode)
301 {
302 __GLXcontext *const gc = __glXGetCurrentContext();
303 Display *const dpy = gc->currentDpy;
304 #ifndef USE_XCB
305 const GLuint cmdlen = 8;
306 #endif
307 if (__builtin_expect(dpy != NULL, 1)) {
308 #ifdef USE_XCB
309 xcb_connection_t *c = XGetXCBConnection(dpy);
310 (void) __glXFlushRenderBuffer(gc, gc->pc);
311 xcb_glx_new_list(c, gc->currentContextTag, list, mode);
312 #else
313 GLubyte const *pc =
314 __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
315 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
316 (void) memcpy((void *) (pc + 4), (void *) (&mode), 4);
317 UnlockDisplay(dpy);
318 SyncHandle();
319 #endif /* USE_XCB */
320 }
321 return;
322 }
323
324 #define X_GLsop_EndList 102
325 void
326 __indirect_glEndList(void)
327 {
328 __GLXcontext *const gc = __glXGetCurrentContext();
329 Display *const dpy = gc->currentDpy;
330 #ifndef USE_XCB
331 const GLuint cmdlen = 0;
332 #endif
333 if (__builtin_expect(dpy != NULL, 1)) {
334 #ifdef USE_XCB
335 xcb_connection_t *c = XGetXCBConnection(dpy);
336 (void) __glXFlushRenderBuffer(gc, gc->pc);
337 xcb_glx_end_list(c, gc->currentContextTag);
338 #else
339 (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
340 UnlockDisplay(dpy);
341 SyncHandle();
342 #endif /* USE_XCB */
343 }
344 return;
345 }
346
347 #define X_GLrop_CallList 1
348 void
349 __indirect_glCallList(GLuint list)
350 {
351 __GLXcontext *const gc = __glXGetCurrentContext();
352 const GLuint cmdlen = 8;
353 emit_header(gc->pc, X_GLrop_CallList, cmdlen);
354 (void) memcpy((void *) (gc->pc + 4), (void *) (&list), 4);
355 gc->pc += cmdlen;
356 if (__builtin_expect(gc->pc > gc->limit, 0)) {
357 (void) __glXFlushRenderBuffer(gc, gc->pc);
358 }
359 }
360
361 #define X_GLrop_CallLists 2
362 void
363 __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
364 {
365 __GLXcontext *const gc = __glXGetCurrentContext();
366 const GLuint compsize = __glCallLists_size(type);
367 const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
368 if (n < 0) {
369 __glXSetError(gc, GL_INVALID_VALUE);
370 return;
371 }
372 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
373 if (cmdlen <= gc->maxSmallRenderCommandSize) {
374 if ((gc->pc + cmdlen) > gc->bufEnd) {
375 (void) __glXFlushRenderBuffer(gc, gc->pc);
376 }
377 emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
378 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
379 (void) memcpy((void *) (gc->pc + 8), (void *) (&type), 4);
380 (void) memcpy((void *) (gc->pc + 12), (void *) (lists),
381 (compsize * n));
382 gc->pc += cmdlen;
383 if (__builtin_expect(gc->pc > gc->limit, 0)) {
384 (void) __glXFlushRenderBuffer(gc, gc->pc);
385 }
386 } else {
387 const GLint op = X_GLrop_CallLists;
388 const GLuint cmdlenLarge = cmdlen + 4;
389 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
390 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
391 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
392 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
393 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
394 __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
395 }
396 }
397 }
398
399 #define X_GLsop_DeleteLists 103
400 void
401 __indirect_glDeleteLists(GLuint list, GLsizei range)
402 {
403 __GLXcontext *const gc = __glXGetCurrentContext();
404 Display *const dpy = gc->currentDpy;
405 #ifndef USE_XCB
406 const GLuint cmdlen = 8;
407 #endif
408 if (__builtin_expect(dpy != NULL, 1)) {
409 #ifdef USE_XCB
410 xcb_connection_t *c = XGetXCBConnection(dpy);
411 (void) __glXFlushRenderBuffer(gc, gc->pc);
412 xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
413 #else
414 GLubyte const *pc =
415 __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
416 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
417 (void) memcpy((void *) (pc + 4), (void *) (&range), 4);
418 UnlockDisplay(dpy);
419 SyncHandle();
420 #endif /* USE_XCB */
421 }
422 return;
423 }
424
425 #define X_GLsop_GenLists 104
426 GLuint
427 __indirect_glGenLists(GLsizei range)
428 {
429 __GLXcontext *const gc = __glXGetCurrentContext();
430 Display *const dpy = gc->currentDpy;
431 GLuint retval = (GLuint) 0;
432 #ifndef USE_XCB
433 const GLuint cmdlen = 4;
434 #endif
435 if (__builtin_expect(dpy != NULL, 1)) {
436 #ifdef USE_XCB
437 xcb_connection_t *c = XGetXCBConnection(dpy);
438 (void) __glXFlushRenderBuffer(gc, gc->pc);
439 xcb_glx_gen_lists_reply_t *reply =
440 xcb_glx_gen_lists_reply(c,
441 xcb_glx_gen_lists(c,
442 gc->currentContextTag,
443 range), NULL);
444 retval = reply->ret_val;
445 free(reply);
446 #else
447 GLubyte const *pc =
448 __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
449 (void) memcpy((void *) (pc + 0), (void *) (&range), 4);
450 retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
451 UnlockDisplay(dpy);
452 SyncHandle();
453 #endif /* USE_XCB */
454 }
455 return retval;
456 }
457
458 #define X_GLrop_ListBase 3
459 void
460 __indirect_glListBase(GLuint base)
461 {
462 __GLXcontext *const gc = __glXGetCurrentContext();
463 const GLuint cmdlen = 8;
464 emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
465 (void) memcpy((void *) (gc->pc + 4), (void *) (&base), 4);
466 gc->pc += cmdlen;
467 if (__builtin_expect(gc->pc > gc->limit, 0)) {
468 (void) __glXFlushRenderBuffer(gc, gc->pc);
469 }
470 }
471
472 #define X_GLrop_Begin 4
473 void
474 __indirect_glBegin(GLenum mode)
475 {
476 __GLXcontext *const gc = __glXGetCurrentContext();
477 const GLuint cmdlen = 8;
478 emit_header(gc->pc, X_GLrop_Begin, cmdlen);
479 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
480 gc->pc += cmdlen;
481 if (__builtin_expect(gc->pc > gc->limit, 0)) {
482 (void) __glXFlushRenderBuffer(gc, gc->pc);
483 }
484 }
485
486 #define X_GLrop_Bitmap 5
487 void
488 __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
489 GLfloat yorig, GLfloat xmove, GLfloat ymove,
490 const GLubyte *bitmap)
491 {
492 __GLXcontext *const gc = __glXGetCurrentContext();
493 const GLuint compsize =
494 (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX,
495 GL_BITMAP, 0) : 0;
496 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
497 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
498 if (cmdlen <= gc->maxSmallRenderCommandSize) {
499 if ((gc->pc + cmdlen) > gc->bufEnd) {
500 (void) __glXFlushRenderBuffer(gc, gc->pc);
501 }
502 emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
503 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
504 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
505 (void) memcpy((void *) (gc->pc + 32), (void *) (&xorig), 4);
506 (void) memcpy((void *) (gc->pc + 36), (void *) (&yorig), 4);
507 (void) memcpy((void *) (gc->pc + 40), (void *) (&xmove), 4);
508 (void) memcpy((void *) (gc->pc + 44), (void *) (&ymove), 4);
509 if (compsize > 0) {
510 (*gc->fillImage) (gc, 2, width, height, 1, GL_COLOR_INDEX,
511 GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
512 } else {
513 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
514 default_pixel_store_2D_size);
515 }
516 gc->pc += cmdlen;
517 if (gc->pc > gc->limit) {
518 (void) __glXFlushRenderBuffer(gc, gc->pc);
519 }
520 } else {
521 const GLint op = X_GLrop_Bitmap;
522 const GLuint cmdlenLarge = cmdlen + 4;
523 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
524 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
525 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
526 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
527 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
528 (void) memcpy((void *) (pc + 36), (void *) (&xorig), 4);
529 (void) memcpy((void *) (pc + 40), (void *) (&yorig), 4);
530 (void) memcpy((void *) (pc + 44), (void *) (&xmove), 4);
531 (void) memcpy((void *) (pc + 48), (void *) (&ymove), 4);
532 __glXSendLargeImage(gc, compsize, 2, width, height, 1,
533 GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52,
534 pc + 8);
535 }
536 }
537 }
538
539 #define X_GLrop_Color3bv 6
540 void
541 __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
542 {
543 __GLXcontext *const gc = __glXGetCurrentContext();
544 const GLuint cmdlen = 8;
545 emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
546 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
547 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
548 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
549 gc->pc += cmdlen;
550 if (__builtin_expect(gc->pc > gc->limit, 0)) {
551 (void) __glXFlushRenderBuffer(gc, gc->pc);
552 }
553 }
554
555 #define X_GLrop_Color3bv 6
556 void
557 __indirect_glColor3bv(const GLbyte *v)
558 {
559 generic_3_byte(X_GLrop_Color3bv, v);
560 }
561
562 #define X_GLrop_Color3dv 7
563 void
564 __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
565 {
566 __GLXcontext *const gc = __glXGetCurrentContext();
567 const GLuint cmdlen = 28;
568 emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
569 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
570 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
571 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
572 gc->pc += cmdlen;
573 if (__builtin_expect(gc->pc > gc->limit, 0)) {
574 (void) __glXFlushRenderBuffer(gc, gc->pc);
575 }
576 }
577
578 #define X_GLrop_Color3dv 7
579 void
580 __indirect_glColor3dv(const GLdouble * v)
581 {
582 generic_24_byte(X_GLrop_Color3dv, v);
583 }
584
585 #define X_GLrop_Color3fv 8
586 void
587 __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
588 {
589 __GLXcontext *const gc = __glXGetCurrentContext();
590 const GLuint cmdlen = 16;
591 emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
592 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
593 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
594 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
595 gc->pc += cmdlen;
596 if (__builtin_expect(gc->pc > gc->limit, 0)) {
597 (void) __glXFlushRenderBuffer(gc, gc->pc);
598 }
599 }
600
601 #define X_GLrop_Color3fv 8
602 void
603 __indirect_glColor3fv(const GLfloat * v)
604 {
605 generic_12_byte(X_GLrop_Color3fv, v);
606 }
607
608 #define X_GLrop_Color3iv 9
609 void
610 __indirect_glColor3i(GLint red, GLint green, GLint blue)
611 {
612 __GLXcontext *const gc = __glXGetCurrentContext();
613 const GLuint cmdlen = 16;
614 emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
615 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
616 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
617 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
618 gc->pc += cmdlen;
619 if (__builtin_expect(gc->pc > gc->limit, 0)) {
620 (void) __glXFlushRenderBuffer(gc, gc->pc);
621 }
622 }
623
624 #define X_GLrop_Color3iv 9
625 void
626 __indirect_glColor3iv(const GLint * v)
627 {
628 generic_12_byte(X_GLrop_Color3iv, v);
629 }
630
631 #define X_GLrop_Color3sv 10
632 void
633 __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
634 {
635 __GLXcontext *const gc = __glXGetCurrentContext();
636 const GLuint cmdlen = 12;
637 emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
638 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
639 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
640 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
641 gc->pc += cmdlen;
642 if (__builtin_expect(gc->pc > gc->limit, 0)) {
643 (void) __glXFlushRenderBuffer(gc, gc->pc);
644 }
645 }
646
647 #define X_GLrop_Color3sv 10
648 void
649 __indirect_glColor3sv(const GLshort * v)
650 {
651 generic_6_byte(X_GLrop_Color3sv, v);
652 }
653
654 #define X_GLrop_Color3ubv 11
655 void
656 __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
657 {
658 __GLXcontext *const gc = __glXGetCurrentContext();
659 const GLuint cmdlen = 8;
660 emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
661 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
662 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
663 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
664 gc->pc += cmdlen;
665 if (__builtin_expect(gc->pc > gc->limit, 0)) {
666 (void) __glXFlushRenderBuffer(gc, gc->pc);
667 }
668 }
669
670 #define X_GLrop_Color3ubv 11
671 void
672 __indirect_glColor3ubv(const GLubyte *v)
673 {
674 generic_3_byte(X_GLrop_Color3ubv, v);
675 }
676
677 #define X_GLrop_Color3uiv 12
678 void
679 __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
680 {
681 __GLXcontext *const gc = __glXGetCurrentContext();
682 const GLuint cmdlen = 16;
683 emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
684 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
685 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
686 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
687 gc->pc += cmdlen;
688 if (__builtin_expect(gc->pc > gc->limit, 0)) {
689 (void) __glXFlushRenderBuffer(gc, gc->pc);
690 }
691 }
692
693 #define X_GLrop_Color3uiv 12
694 void
695 __indirect_glColor3uiv(const GLuint * v)
696 {
697 generic_12_byte(X_GLrop_Color3uiv, v);
698 }
699
700 #define X_GLrop_Color3usv 13
701 void
702 __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
703 {
704 __GLXcontext *const gc = __glXGetCurrentContext();
705 const GLuint cmdlen = 12;
706 emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
707 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
708 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
709 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
710 gc->pc += cmdlen;
711 if (__builtin_expect(gc->pc > gc->limit, 0)) {
712 (void) __glXFlushRenderBuffer(gc, gc->pc);
713 }
714 }
715
716 #define X_GLrop_Color3usv 13
717 void
718 __indirect_glColor3usv(const GLushort * v)
719 {
720 generic_6_byte(X_GLrop_Color3usv, v);
721 }
722
723 #define X_GLrop_Color4bv 14
724 void
725 __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
726 {
727 __GLXcontext *const gc = __glXGetCurrentContext();
728 const GLuint cmdlen = 8;
729 emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
730 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
731 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
732 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
733 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
734 gc->pc += cmdlen;
735 if (__builtin_expect(gc->pc > gc->limit, 0)) {
736 (void) __glXFlushRenderBuffer(gc, gc->pc);
737 }
738 }
739
740 #define X_GLrop_Color4bv 14
741 void
742 __indirect_glColor4bv(const GLbyte *v)
743 {
744 generic_4_byte(X_GLrop_Color4bv, v);
745 }
746
747 #define X_GLrop_Color4dv 15
748 void
749 __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue,
750 GLdouble alpha)
751 {
752 __GLXcontext *const gc = __glXGetCurrentContext();
753 const GLuint cmdlen = 36;
754 emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
755 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
756 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
757 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
758 (void) memcpy((void *) (gc->pc + 28), (void *) (&alpha), 8);
759 gc->pc += cmdlen;
760 if (__builtin_expect(gc->pc > gc->limit, 0)) {
761 (void) __glXFlushRenderBuffer(gc, gc->pc);
762 }
763 }
764
765 #define X_GLrop_Color4dv 15
766 void
767 __indirect_glColor4dv(const GLdouble * v)
768 {
769 generic_32_byte(X_GLrop_Color4dv, v);
770 }
771
772 #define X_GLrop_Color4fv 16
773 void
774 __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
775 {
776 __GLXcontext *const gc = __glXGetCurrentContext();
777 const GLuint cmdlen = 20;
778 emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
779 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
780 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
781 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
782 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
783 gc->pc += cmdlen;
784 if (__builtin_expect(gc->pc > gc->limit, 0)) {
785 (void) __glXFlushRenderBuffer(gc, gc->pc);
786 }
787 }
788
789 #define X_GLrop_Color4fv 16
790 void
791 __indirect_glColor4fv(const GLfloat * v)
792 {
793 generic_16_byte(X_GLrop_Color4fv, v);
794 }
795
796 #define X_GLrop_Color4iv 17
797 void
798 __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
799 {
800 __GLXcontext *const gc = __glXGetCurrentContext();
801 const GLuint cmdlen = 20;
802 emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
803 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
804 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
805 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
806 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
807 gc->pc += cmdlen;
808 if (__builtin_expect(gc->pc > gc->limit, 0)) {
809 (void) __glXFlushRenderBuffer(gc, gc->pc);
810 }
811 }
812
813 #define X_GLrop_Color4iv 17
814 void
815 __indirect_glColor4iv(const GLint * v)
816 {
817 generic_16_byte(X_GLrop_Color4iv, v);
818 }
819
820 #define X_GLrop_Color4sv 18
821 void
822 __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
823 {
824 __GLXcontext *const gc = __glXGetCurrentContext();
825 const GLuint cmdlen = 12;
826 emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
827 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
828 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
829 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
830 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
831 gc->pc += cmdlen;
832 if (__builtin_expect(gc->pc > gc->limit, 0)) {
833 (void) __glXFlushRenderBuffer(gc, gc->pc);
834 }
835 }
836
837 #define X_GLrop_Color4sv 18
838 void
839 __indirect_glColor4sv(const GLshort * v)
840 {
841 generic_8_byte(X_GLrop_Color4sv, v);
842 }
843
844 #define X_GLrop_Color4ubv 19
845 void
846 __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
847 {
848 __GLXcontext *const gc = __glXGetCurrentContext();
849 const GLuint cmdlen = 8;
850 emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
851 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
852 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
853 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
854 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
855 gc->pc += cmdlen;
856 if (__builtin_expect(gc->pc > gc->limit, 0)) {
857 (void) __glXFlushRenderBuffer(gc, gc->pc);
858 }
859 }
860
861 #define X_GLrop_Color4ubv 19
862 void
863 __indirect_glColor4ubv(const GLubyte *v)
864 {
865 generic_4_byte(X_GLrop_Color4ubv, v);
866 }
867
868 #define X_GLrop_Color4uiv 20
869 void
870 __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
871 {
872 __GLXcontext *const gc = __glXGetCurrentContext();
873 const GLuint cmdlen = 20;
874 emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
875 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
876 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
877 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
878 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
879 gc->pc += cmdlen;
880 if (__builtin_expect(gc->pc > gc->limit, 0)) {
881 (void) __glXFlushRenderBuffer(gc, gc->pc);
882 }
883 }
884
885 #define X_GLrop_Color4uiv 20
886 void
887 __indirect_glColor4uiv(const GLuint * v)
888 {
889 generic_16_byte(X_GLrop_Color4uiv, v);
890 }
891
892 #define X_GLrop_Color4usv 21
893 void
894 __indirect_glColor4us(GLushort red, GLushort green, GLushort blue,
895 GLushort alpha)
896 {
897 __GLXcontext *const gc = __glXGetCurrentContext();
898 const GLuint cmdlen = 12;
899 emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
900 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
901 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
902 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
903 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
904 gc->pc += cmdlen;
905 if (__builtin_expect(gc->pc > gc->limit, 0)) {
906 (void) __glXFlushRenderBuffer(gc, gc->pc);
907 }
908 }
909
910 #define X_GLrop_Color4usv 21
911 void
912 __indirect_glColor4usv(const GLushort * v)
913 {
914 generic_8_byte(X_GLrop_Color4usv, v);
915 }
916
917 #define X_GLrop_EdgeFlagv 22
918 void
919 __indirect_glEdgeFlag(GLboolean flag)
920 {
921 __GLXcontext *const gc = __glXGetCurrentContext();
922 const GLuint cmdlen = 8;
923 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
924 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
925 gc->pc += cmdlen;
926 if (__builtin_expect(gc->pc > gc->limit, 0)) {
927 (void) __glXFlushRenderBuffer(gc, gc->pc);
928 }
929 }
930
931 #define X_GLrop_EdgeFlagv 22
932 void
933 __indirect_glEdgeFlagv(const GLboolean * flag)
934 {
935 __GLXcontext *const gc = __glXGetCurrentContext();
936 const GLuint cmdlen = 8;
937 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
938 (void) memcpy((void *) (gc->pc + 4), (void *) (flag), 1);
939 gc->pc += cmdlen;
940 if (__builtin_expect(gc->pc > gc->limit, 0)) {
941 (void) __glXFlushRenderBuffer(gc, gc->pc);
942 }
943 }
944
945 #define X_GLrop_End 23
946 void
947 __indirect_glEnd(void)
948 {
949 __GLXcontext *const gc = __glXGetCurrentContext();
950 const GLuint cmdlen = 4;
951 emit_header(gc->pc, X_GLrop_End, cmdlen);
952 gc->pc += cmdlen;
953 if (__builtin_expect(gc->pc > gc->limit, 0)) {
954 (void) __glXFlushRenderBuffer(gc, gc->pc);
955 }
956 }
957
958 #define X_GLrop_Indexdv 24
959 void
960 __indirect_glIndexd(GLdouble c)
961 {
962 __GLXcontext *const gc = __glXGetCurrentContext();
963 const GLuint cmdlen = 12;
964 emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
965 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 8);
966 gc->pc += cmdlen;
967 if (__builtin_expect(gc->pc > gc->limit, 0)) {
968 (void) __glXFlushRenderBuffer(gc, gc->pc);
969 }
970 }
971
972 #define X_GLrop_Indexdv 24
973 void
974 __indirect_glIndexdv(const GLdouble * c)
975 {
976 generic_8_byte(X_GLrop_Indexdv, c);
977 }
978
979 #define X_GLrop_Indexfv 25
980 void
981 __indirect_glIndexf(GLfloat c)
982 {
983 __GLXcontext *const gc = __glXGetCurrentContext();
984 const GLuint cmdlen = 8;
985 emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
986 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
987 gc->pc += cmdlen;
988 if (__builtin_expect(gc->pc > gc->limit, 0)) {
989 (void) __glXFlushRenderBuffer(gc, gc->pc);
990 }
991 }
992
993 #define X_GLrop_Indexfv 25
994 void
995 __indirect_glIndexfv(const GLfloat * c)
996 {
997 generic_4_byte(X_GLrop_Indexfv, c);
998 }
999
1000 #define X_GLrop_Indexiv 26
1001 void
1002 __indirect_glIndexi(GLint c)
1003 {
1004 __GLXcontext *const gc = __glXGetCurrentContext();
1005 const GLuint cmdlen = 8;
1006 emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
1007 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
1008 gc->pc += cmdlen;
1009 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1010 (void) __glXFlushRenderBuffer(gc, gc->pc);
1011 }
1012 }
1013
1014 #define X_GLrop_Indexiv 26
1015 void
1016 __indirect_glIndexiv(const GLint * c)
1017 {
1018 generic_4_byte(X_GLrop_Indexiv, c);
1019 }
1020
1021 #define X_GLrop_Indexsv 27
1022 void
1023 __indirect_glIndexs(GLshort c)
1024 {
1025 __GLXcontext *const gc = __glXGetCurrentContext();
1026 const GLuint cmdlen = 8;
1027 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1028 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 2);
1029 gc->pc += cmdlen;
1030 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1031 (void) __glXFlushRenderBuffer(gc, gc->pc);
1032 }
1033 }
1034
1035 #define X_GLrop_Indexsv 27
1036 void
1037 __indirect_glIndexsv(const GLshort * c)
1038 {
1039 __GLXcontext *const gc = __glXGetCurrentContext();
1040 const GLuint cmdlen = 8;
1041 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1042 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 2);
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_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
1052 {
1053 __GLXcontext *const gc = __glXGetCurrentContext();
1054 const GLuint cmdlen = 8;
1055 emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
1056 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 1);
1057 (void) memcpy((void *) (gc->pc + 5), (void *) (&ny), 1);
1058 (void) memcpy((void *) (gc->pc + 6), (void *) (&nz), 1);
1059 gc->pc += cmdlen;
1060 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1061 (void) __glXFlushRenderBuffer(gc, gc->pc);
1062 }
1063 }
1064
1065 #define X_GLrop_Normal3bv 28
1066 void
1067 __indirect_glNormal3bv(const GLbyte *v)
1068 {
1069 generic_3_byte(X_GLrop_Normal3bv, v);
1070 }
1071
1072 #define X_GLrop_Normal3dv 29
1073 void
1074 __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
1075 {
1076 __GLXcontext *const gc = __glXGetCurrentContext();
1077 const GLuint cmdlen = 28;
1078 emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
1079 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 8);
1080 (void) memcpy((void *) (gc->pc + 12), (void *) (&ny), 8);
1081 (void) memcpy((void *) (gc->pc + 20), (void *) (&nz), 8);
1082 gc->pc += cmdlen;
1083 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1084 (void) __glXFlushRenderBuffer(gc, gc->pc);
1085 }
1086 }
1087
1088 #define X_GLrop_Normal3dv 29
1089 void
1090 __indirect_glNormal3dv(const GLdouble * v)
1091 {
1092 generic_24_byte(X_GLrop_Normal3dv, v);
1093 }
1094
1095 #define X_GLrop_Normal3fv 30
1096 void
1097 __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1098 {
1099 __GLXcontext *const gc = __glXGetCurrentContext();
1100 const GLuint cmdlen = 16;
1101 emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
1102 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1103 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1104 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1105 gc->pc += cmdlen;
1106 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1107 (void) __glXFlushRenderBuffer(gc, gc->pc);
1108 }
1109 }
1110
1111 #define X_GLrop_Normal3fv 30
1112 void
1113 __indirect_glNormal3fv(const GLfloat * v)
1114 {
1115 generic_12_byte(X_GLrop_Normal3fv, v);
1116 }
1117
1118 #define X_GLrop_Normal3iv 31
1119 void
1120 __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
1121 {
1122 __GLXcontext *const gc = __glXGetCurrentContext();
1123 const GLuint cmdlen = 16;
1124 emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
1125 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1126 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1127 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1128 gc->pc += cmdlen;
1129 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1130 (void) __glXFlushRenderBuffer(gc, gc->pc);
1131 }
1132 }
1133
1134 #define X_GLrop_Normal3iv 31
1135 void
1136 __indirect_glNormal3iv(const GLint * v)
1137 {
1138 generic_12_byte(X_GLrop_Normal3iv, v);
1139 }
1140
1141 #define X_GLrop_Normal3sv 32
1142 void
1143 __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
1144 {
1145 __GLXcontext *const gc = __glXGetCurrentContext();
1146 const GLuint cmdlen = 12;
1147 emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
1148 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 2);
1149 (void) memcpy((void *) (gc->pc + 6), (void *) (&ny), 2);
1150 (void) memcpy((void *) (gc->pc + 8), (void *) (&nz), 2);
1151 gc->pc += cmdlen;
1152 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1153 (void) __glXFlushRenderBuffer(gc, gc->pc);
1154 }
1155 }
1156
1157 #define X_GLrop_Normal3sv 32
1158 void
1159 __indirect_glNormal3sv(const GLshort * v)
1160 {
1161 generic_6_byte(X_GLrop_Normal3sv, v);
1162 }
1163
1164 #define X_GLrop_RasterPos2dv 33
1165 void
1166 __indirect_glRasterPos2d(GLdouble x, GLdouble y)
1167 {
1168 __GLXcontext *const gc = __glXGetCurrentContext();
1169 const GLuint cmdlen = 20;
1170 emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
1171 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1172 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1173 gc->pc += cmdlen;
1174 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1175 (void) __glXFlushRenderBuffer(gc, gc->pc);
1176 }
1177 }
1178
1179 #define X_GLrop_RasterPos2dv 33
1180 void
1181 __indirect_glRasterPos2dv(const GLdouble * v)
1182 {
1183 generic_16_byte(X_GLrop_RasterPos2dv, v);
1184 }
1185
1186 #define X_GLrop_RasterPos2fv 34
1187 void
1188 __indirect_glRasterPos2f(GLfloat x, GLfloat y)
1189 {
1190 __GLXcontext *const gc = __glXGetCurrentContext();
1191 const GLuint cmdlen = 12;
1192 emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
1193 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1194 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1195 gc->pc += cmdlen;
1196 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1197 (void) __glXFlushRenderBuffer(gc, gc->pc);
1198 }
1199 }
1200
1201 #define X_GLrop_RasterPos2fv 34
1202 void
1203 __indirect_glRasterPos2fv(const GLfloat * v)
1204 {
1205 generic_8_byte(X_GLrop_RasterPos2fv, v);
1206 }
1207
1208 #define X_GLrop_RasterPos2iv 35
1209 void
1210 __indirect_glRasterPos2i(GLint x, GLint y)
1211 {
1212 __GLXcontext *const gc = __glXGetCurrentContext();
1213 const GLuint cmdlen = 12;
1214 emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
1215 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1216 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1217 gc->pc += cmdlen;
1218 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1219 (void) __glXFlushRenderBuffer(gc, gc->pc);
1220 }
1221 }
1222
1223 #define X_GLrop_RasterPos2iv 35
1224 void
1225 __indirect_glRasterPos2iv(const GLint * v)
1226 {
1227 generic_8_byte(X_GLrop_RasterPos2iv, v);
1228 }
1229
1230 #define X_GLrop_RasterPos2sv 36
1231 void
1232 __indirect_glRasterPos2s(GLshort x, GLshort y)
1233 {
1234 __GLXcontext *const gc = __glXGetCurrentContext();
1235 const GLuint cmdlen = 8;
1236 emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
1237 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1238 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1239 gc->pc += cmdlen;
1240 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1241 (void) __glXFlushRenderBuffer(gc, gc->pc);
1242 }
1243 }
1244
1245 #define X_GLrop_RasterPos2sv 36
1246 void
1247 __indirect_glRasterPos2sv(const GLshort * v)
1248 {
1249 generic_4_byte(X_GLrop_RasterPos2sv, v);
1250 }
1251
1252 #define X_GLrop_RasterPos3dv 37
1253 void
1254 __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
1255 {
1256 __GLXcontext *const gc = __glXGetCurrentContext();
1257 const GLuint cmdlen = 28;
1258 emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
1259 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1260 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1261 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1262 gc->pc += cmdlen;
1263 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1264 (void) __glXFlushRenderBuffer(gc, gc->pc);
1265 }
1266 }
1267
1268 #define X_GLrop_RasterPos3dv 37
1269 void
1270 __indirect_glRasterPos3dv(const GLdouble * v)
1271 {
1272 generic_24_byte(X_GLrop_RasterPos3dv, v);
1273 }
1274
1275 #define X_GLrop_RasterPos3fv 38
1276 void
1277 __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
1278 {
1279 __GLXcontext *const gc = __glXGetCurrentContext();
1280 const GLuint cmdlen = 16;
1281 emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
1282 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1283 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1284 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1285 gc->pc += cmdlen;
1286 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1287 (void) __glXFlushRenderBuffer(gc, gc->pc);
1288 }
1289 }
1290
1291 #define X_GLrop_RasterPos3fv 38
1292 void
1293 __indirect_glRasterPos3fv(const GLfloat * v)
1294 {
1295 generic_12_byte(X_GLrop_RasterPos3fv, v);
1296 }
1297
1298 #define X_GLrop_RasterPos3iv 39
1299 void
1300 __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
1301 {
1302 __GLXcontext *const gc = __glXGetCurrentContext();
1303 const GLuint cmdlen = 16;
1304 emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
1305 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1306 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1307 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1308 gc->pc += cmdlen;
1309 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1310 (void) __glXFlushRenderBuffer(gc, gc->pc);
1311 }
1312 }
1313
1314 #define X_GLrop_RasterPos3iv 39
1315 void
1316 __indirect_glRasterPos3iv(const GLint * v)
1317 {
1318 generic_12_byte(X_GLrop_RasterPos3iv, v);
1319 }
1320
1321 #define X_GLrop_RasterPos3sv 40
1322 void
1323 __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
1324 {
1325 __GLXcontext *const gc = __glXGetCurrentContext();
1326 const GLuint cmdlen = 12;
1327 emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
1328 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1329 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1330 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1331 gc->pc += cmdlen;
1332 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1333 (void) __glXFlushRenderBuffer(gc, gc->pc);
1334 }
1335 }
1336
1337 #define X_GLrop_RasterPos3sv 40
1338 void
1339 __indirect_glRasterPos3sv(const GLshort * v)
1340 {
1341 generic_6_byte(X_GLrop_RasterPos3sv, v);
1342 }
1343
1344 #define X_GLrop_RasterPos4dv 41
1345 void
1346 __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1347 {
1348 __GLXcontext *const gc = __glXGetCurrentContext();
1349 const GLuint cmdlen = 36;
1350 emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
1351 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1352 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1353 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1354 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
1355 gc->pc += cmdlen;
1356 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1357 (void) __glXFlushRenderBuffer(gc, gc->pc);
1358 }
1359 }
1360
1361 #define X_GLrop_RasterPos4dv 41
1362 void
1363 __indirect_glRasterPos4dv(const GLdouble * v)
1364 {
1365 generic_32_byte(X_GLrop_RasterPos4dv, v);
1366 }
1367
1368 #define X_GLrop_RasterPos4fv 42
1369 void
1370 __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1371 {
1372 __GLXcontext *const gc = __glXGetCurrentContext();
1373 const GLuint cmdlen = 20;
1374 emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
1375 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1376 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1377 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1378 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1379 gc->pc += cmdlen;
1380 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1381 (void) __glXFlushRenderBuffer(gc, gc->pc);
1382 }
1383 }
1384
1385 #define X_GLrop_RasterPos4fv 42
1386 void
1387 __indirect_glRasterPos4fv(const GLfloat * v)
1388 {
1389 generic_16_byte(X_GLrop_RasterPos4fv, v);
1390 }
1391
1392 #define X_GLrop_RasterPos4iv 43
1393 void
1394 __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
1395 {
1396 __GLXcontext *const gc = __glXGetCurrentContext();
1397 const GLuint cmdlen = 20;
1398 emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
1399 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1400 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1401 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1402 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1403 gc->pc += cmdlen;
1404 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1405 (void) __glXFlushRenderBuffer(gc, gc->pc);
1406 }
1407 }
1408
1409 #define X_GLrop_RasterPos4iv 43
1410 void
1411 __indirect_glRasterPos4iv(const GLint * v)
1412 {
1413 generic_16_byte(X_GLrop_RasterPos4iv, v);
1414 }
1415
1416 #define X_GLrop_RasterPos4sv 44
1417 void
1418 __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
1419 {
1420 __GLXcontext *const gc = __glXGetCurrentContext();
1421 const GLuint cmdlen = 12;
1422 emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
1423 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1424 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1425 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1426 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
1427 gc->pc += cmdlen;
1428 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1429 (void) __glXFlushRenderBuffer(gc, gc->pc);
1430 }
1431 }
1432
1433 #define X_GLrop_RasterPos4sv 44
1434 void
1435 __indirect_glRasterPos4sv(const GLshort * v)
1436 {
1437 generic_8_byte(X_GLrop_RasterPos4sv, v);
1438 }
1439
1440 #define X_GLrop_Rectdv 45
1441 void
1442 __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1443 {
1444 __GLXcontext *const gc = __glXGetCurrentContext();
1445 const GLuint cmdlen = 36;
1446 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1447 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 8);
1448 (void) memcpy((void *) (gc->pc + 12), (void *) (&y1), 8);
1449 (void) memcpy((void *) (gc->pc + 20), (void *) (&x2), 8);
1450 (void) memcpy((void *) (gc->pc + 28), (void *) (&y2), 8);
1451 gc->pc += cmdlen;
1452 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1453 (void) __glXFlushRenderBuffer(gc, gc->pc);
1454 }
1455 }
1456
1457 #define X_GLrop_Rectdv 45
1458 void
1459 __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
1460 {
1461 __GLXcontext *const gc = __glXGetCurrentContext();
1462 const GLuint cmdlen = 36;
1463 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1464 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 16);
1465 (void) memcpy((void *) (gc->pc + 20), (void *) (v2), 16);
1466 gc->pc += cmdlen;
1467 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1468 (void) __glXFlushRenderBuffer(gc, gc->pc);
1469 }
1470 }
1471
1472 #define X_GLrop_Rectfv 46
1473 void
1474 __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
1475 {
1476 __GLXcontext *const gc = __glXGetCurrentContext();
1477 const GLuint cmdlen = 20;
1478 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1479 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1480 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1481 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1482 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1483 gc->pc += cmdlen;
1484 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1485 (void) __glXFlushRenderBuffer(gc, gc->pc);
1486 }
1487 }
1488
1489 #define X_GLrop_Rectfv 46
1490 void
1491 __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
1492 {
1493 __GLXcontext *const gc = __glXGetCurrentContext();
1494 const GLuint cmdlen = 20;
1495 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1496 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1497 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1498 gc->pc += cmdlen;
1499 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1500 (void) __glXFlushRenderBuffer(gc, gc->pc);
1501 }
1502 }
1503
1504 #define X_GLrop_Rectiv 47
1505 void
1506 __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
1507 {
1508 __GLXcontext *const gc = __glXGetCurrentContext();
1509 const GLuint cmdlen = 20;
1510 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1511 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1512 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1513 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1514 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1515 gc->pc += cmdlen;
1516 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1517 (void) __glXFlushRenderBuffer(gc, gc->pc);
1518 }
1519 }
1520
1521 #define X_GLrop_Rectiv 47
1522 void
1523 __indirect_glRectiv(const GLint * v1, const GLint * v2)
1524 {
1525 __GLXcontext *const gc = __glXGetCurrentContext();
1526 const GLuint cmdlen = 20;
1527 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1528 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1529 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1530 gc->pc += cmdlen;
1531 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1532 (void) __glXFlushRenderBuffer(gc, gc->pc);
1533 }
1534 }
1535
1536 #define X_GLrop_Rectsv 48
1537 void
1538 __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1539 {
1540 __GLXcontext *const gc = __glXGetCurrentContext();
1541 const GLuint cmdlen = 12;
1542 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1543 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 2);
1544 (void) memcpy((void *) (gc->pc + 6), (void *) (&y1), 2);
1545 (void) memcpy((void *) (gc->pc + 8), (void *) (&x2), 2);
1546 (void) memcpy((void *) (gc->pc + 10), (void *) (&y2), 2);
1547 gc->pc += cmdlen;
1548 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1549 (void) __glXFlushRenderBuffer(gc, gc->pc);
1550 }
1551 }
1552
1553 #define X_GLrop_Rectsv 48
1554 void
1555 __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
1556 {
1557 __GLXcontext *const gc = __glXGetCurrentContext();
1558 const GLuint cmdlen = 12;
1559 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1560 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 4);
1561 (void) memcpy((void *) (gc->pc + 8), (void *) (v2), 4);
1562 gc->pc += cmdlen;
1563 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1564 (void) __glXFlushRenderBuffer(gc, gc->pc);
1565 }
1566 }
1567
1568 #define X_GLrop_TexCoord1dv 49
1569 void
1570 __indirect_glTexCoord1d(GLdouble s)
1571 {
1572 __GLXcontext *const gc = __glXGetCurrentContext();
1573 const GLuint cmdlen = 12;
1574 emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
1575 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1576 gc->pc += cmdlen;
1577 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1578 (void) __glXFlushRenderBuffer(gc, gc->pc);
1579 }
1580 }
1581
1582 #define X_GLrop_TexCoord1dv 49
1583 void
1584 __indirect_glTexCoord1dv(const GLdouble * v)
1585 {
1586 generic_8_byte(X_GLrop_TexCoord1dv, v);
1587 }
1588
1589 #define X_GLrop_TexCoord1fv 50
1590 void
1591 __indirect_glTexCoord1f(GLfloat s)
1592 {
1593 __GLXcontext *const gc = __glXGetCurrentContext();
1594 const GLuint cmdlen = 8;
1595 emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
1596 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1597 gc->pc += cmdlen;
1598 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1599 (void) __glXFlushRenderBuffer(gc, gc->pc);
1600 }
1601 }
1602
1603 #define X_GLrop_TexCoord1fv 50
1604 void
1605 __indirect_glTexCoord1fv(const GLfloat * v)
1606 {
1607 generic_4_byte(X_GLrop_TexCoord1fv, v);
1608 }
1609
1610 #define X_GLrop_TexCoord1iv 51
1611 void
1612 __indirect_glTexCoord1i(GLint s)
1613 {
1614 __GLXcontext *const gc = __glXGetCurrentContext();
1615 const GLuint cmdlen = 8;
1616 emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
1617 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1618 gc->pc += cmdlen;
1619 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1620 (void) __glXFlushRenderBuffer(gc, gc->pc);
1621 }
1622 }
1623
1624 #define X_GLrop_TexCoord1iv 51
1625 void
1626 __indirect_glTexCoord1iv(const GLint * v)
1627 {
1628 generic_4_byte(X_GLrop_TexCoord1iv, v);
1629 }
1630
1631 #define X_GLrop_TexCoord1sv 52
1632 void
1633 __indirect_glTexCoord1s(GLshort s)
1634 {
1635 __GLXcontext *const gc = __glXGetCurrentContext();
1636 const GLuint cmdlen = 8;
1637 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1638 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1639 gc->pc += cmdlen;
1640 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1641 (void) __glXFlushRenderBuffer(gc, gc->pc);
1642 }
1643 }
1644
1645 #define X_GLrop_TexCoord1sv 52
1646 void
1647 __indirect_glTexCoord1sv(const GLshort * v)
1648 {
1649 __GLXcontext *const gc = __glXGetCurrentContext();
1650 const GLuint cmdlen = 8;
1651 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1652 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 2);
1653 gc->pc += cmdlen;
1654 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1655 (void) __glXFlushRenderBuffer(gc, gc->pc);
1656 }
1657 }
1658
1659 #define X_GLrop_TexCoord2dv 53
1660 void
1661 __indirect_glTexCoord2d(GLdouble s, GLdouble t)
1662 {
1663 __GLXcontext *const gc = __glXGetCurrentContext();
1664 const GLuint cmdlen = 20;
1665 emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
1666 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1667 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1668 gc->pc += cmdlen;
1669 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1670 (void) __glXFlushRenderBuffer(gc, gc->pc);
1671 }
1672 }
1673
1674 #define X_GLrop_TexCoord2dv 53
1675 void
1676 __indirect_glTexCoord2dv(const GLdouble * v)
1677 {
1678 generic_16_byte(X_GLrop_TexCoord2dv, v);
1679 }
1680
1681 #define X_GLrop_TexCoord2fv 54
1682 void
1683 __indirect_glTexCoord2f(GLfloat s, GLfloat t)
1684 {
1685 __GLXcontext *const gc = __glXGetCurrentContext();
1686 const GLuint cmdlen = 12;
1687 emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
1688 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1689 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1690 gc->pc += cmdlen;
1691 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1692 (void) __glXFlushRenderBuffer(gc, gc->pc);
1693 }
1694 }
1695
1696 #define X_GLrop_TexCoord2fv 54
1697 void
1698 __indirect_glTexCoord2fv(const GLfloat * v)
1699 {
1700 generic_8_byte(X_GLrop_TexCoord2fv, v);
1701 }
1702
1703 #define X_GLrop_TexCoord2iv 55
1704 void
1705 __indirect_glTexCoord2i(GLint s, GLint t)
1706 {
1707 __GLXcontext *const gc = __glXGetCurrentContext();
1708 const GLuint cmdlen = 12;
1709 emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
1710 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1711 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1712 gc->pc += cmdlen;
1713 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1714 (void) __glXFlushRenderBuffer(gc, gc->pc);
1715 }
1716 }
1717
1718 #define X_GLrop_TexCoord2iv 55
1719 void
1720 __indirect_glTexCoord2iv(const GLint * v)
1721 {
1722 generic_8_byte(X_GLrop_TexCoord2iv, v);
1723 }
1724
1725 #define X_GLrop_TexCoord2sv 56
1726 void
1727 __indirect_glTexCoord2s(GLshort s, GLshort t)
1728 {
1729 __GLXcontext *const gc = __glXGetCurrentContext();
1730 const GLuint cmdlen = 8;
1731 emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
1732 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1733 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1734 gc->pc += cmdlen;
1735 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1736 (void) __glXFlushRenderBuffer(gc, gc->pc);
1737 }
1738 }
1739
1740 #define X_GLrop_TexCoord2sv 56
1741 void
1742 __indirect_glTexCoord2sv(const GLshort * v)
1743 {
1744 generic_4_byte(X_GLrop_TexCoord2sv, v);
1745 }
1746
1747 #define X_GLrop_TexCoord3dv 57
1748 void
1749 __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
1750 {
1751 __GLXcontext *const gc = __glXGetCurrentContext();
1752 const GLuint cmdlen = 28;
1753 emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
1754 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1755 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1756 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1757 gc->pc += cmdlen;
1758 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1759 (void) __glXFlushRenderBuffer(gc, gc->pc);
1760 }
1761 }
1762
1763 #define X_GLrop_TexCoord3dv 57
1764 void
1765 __indirect_glTexCoord3dv(const GLdouble * v)
1766 {
1767 generic_24_byte(X_GLrop_TexCoord3dv, v);
1768 }
1769
1770 #define X_GLrop_TexCoord3fv 58
1771 void
1772 __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
1773 {
1774 __GLXcontext *const gc = __glXGetCurrentContext();
1775 const GLuint cmdlen = 16;
1776 emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
1777 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1778 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1779 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1780 gc->pc += cmdlen;
1781 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1782 (void) __glXFlushRenderBuffer(gc, gc->pc);
1783 }
1784 }
1785
1786 #define X_GLrop_TexCoord3fv 58
1787 void
1788 __indirect_glTexCoord3fv(const GLfloat * v)
1789 {
1790 generic_12_byte(X_GLrop_TexCoord3fv, v);
1791 }
1792
1793 #define X_GLrop_TexCoord3iv 59
1794 void
1795 __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
1796 {
1797 __GLXcontext *const gc = __glXGetCurrentContext();
1798 const GLuint cmdlen = 16;
1799 emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
1800 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1801 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1802 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1803 gc->pc += cmdlen;
1804 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1805 (void) __glXFlushRenderBuffer(gc, gc->pc);
1806 }
1807 }
1808
1809 #define X_GLrop_TexCoord3iv 59
1810 void
1811 __indirect_glTexCoord3iv(const GLint * v)
1812 {
1813 generic_12_byte(X_GLrop_TexCoord3iv, v);
1814 }
1815
1816 #define X_GLrop_TexCoord3sv 60
1817 void
1818 __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
1819 {
1820 __GLXcontext *const gc = __glXGetCurrentContext();
1821 const GLuint cmdlen = 12;
1822 emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
1823 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1824 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1825 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1826 gc->pc += cmdlen;
1827 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1828 (void) __glXFlushRenderBuffer(gc, gc->pc);
1829 }
1830 }
1831
1832 #define X_GLrop_TexCoord3sv 60
1833 void
1834 __indirect_glTexCoord3sv(const GLshort * v)
1835 {
1836 generic_6_byte(X_GLrop_TexCoord3sv, v);
1837 }
1838
1839 #define X_GLrop_TexCoord4dv 61
1840 void
1841 __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1842 {
1843 __GLXcontext *const gc = __glXGetCurrentContext();
1844 const GLuint cmdlen = 36;
1845 emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
1846 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1847 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1848 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1849 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
1850 gc->pc += cmdlen;
1851 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1852 (void) __glXFlushRenderBuffer(gc, gc->pc);
1853 }
1854 }
1855
1856 #define X_GLrop_TexCoord4dv 61
1857 void
1858 __indirect_glTexCoord4dv(const GLdouble * v)
1859 {
1860 generic_32_byte(X_GLrop_TexCoord4dv, v);
1861 }
1862
1863 #define X_GLrop_TexCoord4fv 62
1864 void
1865 __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1866 {
1867 __GLXcontext *const gc = __glXGetCurrentContext();
1868 const GLuint cmdlen = 20;
1869 emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
1870 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1871 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1872 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1873 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1874 gc->pc += cmdlen;
1875 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1876 (void) __glXFlushRenderBuffer(gc, gc->pc);
1877 }
1878 }
1879
1880 #define X_GLrop_TexCoord4fv 62
1881 void
1882 __indirect_glTexCoord4fv(const GLfloat * v)
1883 {
1884 generic_16_byte(X_GLrop_TexCoord4fv, v);
1885 }
1886
1887 #define X_GLrop_TexCoord4iv 63
1888 void
1889 __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
1890 {
1891 __GLXcontext *const gc = __glXGetCurrentContext();
1892 const GLuint cmdlen = 20;
1893 emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
1894 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1895 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1896 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1897 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1898 gc->pc += cmdlen;
1899 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1900 (void) __glXFlushRenderBuffer(gc, gc->pc);
1901 }
1902 }
1903
1904 #define X_GLrop_TexCoord4iv 63
1905 void
1906 __indirect_glTexCoord4iv(const GLint * v)
1907 {
1908 generic_16_byte(X_GLrop_TexCoord4iv, v);
1909 }
1910
1911 #define X_GLrop_TexCoord4sv 64
1912 void
1913 __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
1914 {
1915 __GLXcontext *const gc = __glXGetCurrentContext();
1916 const GLuint cmdlen = 12;
1917 emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
1918 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1919 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1920 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1921 (void) memcpy((void *) (gc->pc + 10), (void *) (&q), 2);
1922 gc->pc += cmdlen;
1923 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1924 (void) __glXFlushRenderBuffer(gc, gc->pc);
1925 }
1926 }
1927
1928 #define X_GLrop_TexCoord4sv 64
1929 void
1930 __indirect_glTexCoord4sv(const GLshort * v)
1931 {
1932 generic_8_byte(X_GLrop_TexCoord4sv, v);
1933 }
1934
1935 #define X_GLrop_Vertex2dv 65
1936 void
1937 __indirect_glVertex2d(GLdouble x, GLdouble y)
1938 {
1939 __GLXcontext *const gc = __glXGetCurrentContext();
1940 const GLuint cmdlen = 20;
1941 emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
1942 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1943 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1944 gc->pc += cmdlen;
1945 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1946 (void) __glXFlushRenderBuffer(gc, gc->pc);
1947 }
1948 }
1949
1950 #define X_GLrop_Vertex2dv 65
1951 void
1952 __indirect_glVertex2dv(const GLdouble * v)
1953 {
1954 generic_16_byte(X_GLrop_Vertex2dv, v);
1955 }
1956
1957 #define X_GLrop_Vertex2fv 66
1958 void
1959 __indirect_glVertex2f(GLfloat x, GLfloat y)
1960 {
1961 __GLXcontext *const gc = __glXGetCurrentContext();
1962 const GLuint cmdlen = 12;
1963 emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
1964 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1965 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1966 gc->pc += cmdlen;
1967 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1968 (void) __glXFlushRenderBuffer(gc, gc->pc);
1969 }
1970 }
1971
1972 #define X_GLrop_Vertex2fv 66
1973 void
1974 __indirect_glVertex2fv(const GLfloat * v)
1975 {
1976 generic_8_byte(X_GLrop_Vertex2fv, v);
1977 }
1978
1979 #define X_GLrop_Vertex2iv 67
1980 void
1981 __indirect_glVertex2i(GLint x, GLint y)
1982 {
1983 __GLXcontext *const gc = __glXGetCurrentContext();
1984 const GLuint cmdlen = 12;
1985 emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
1986 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1987 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1988 gc->pc += cmdlen;
1989 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1990 (void) __glXFlushRenderBuffer(gc, gc->pc);
1991 }
1992 }
1993
1994 #define X_GLrop_Vertex2iv 67
1995 void
1996 __indirect_glVertex2iv(const GLint * v)
1997 {
1998 generic_8_byte(X_GLrop_Vertex2iv, v);
1999 }
2000
2001 #define X_GLrop_Vertex2sv 68
2002 void
2003 __indirect_glVertex2s(GLshort x, GLshort y)
2004 {
2005 __GLXcontext *const gc = __glXGetCurrentContext();
2006 const GLuint cmdlen = 8;
2007 emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
2008 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2009 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2010 gc->pc += cmdlen;
2011 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2012 (void) __glXFlushRenderBuffer(gc, gc->pc);
2013 }
2014 }
2015
2016 #define X_GLrop_Vertex2sv 68
2017 void
2018 __indirect_glVertex2sv(const GLshort * v)
2019 {
2020 generic_4_byte(X_GLrop_Vertex2sv, v);
2021 }
2022
2023 #define X_GLrop_Vertex3dv 69
2024 void
2025 __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
2026 {
2027 __GLXcontext *const gc = __glXGetCurrentContext();
2028 const GLuint cmdlen = 28;
2029 emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
2030 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2031 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2032 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2033 gc->pc += cmdlen;
2034 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2035 (void) __glXFlushRenderBuffer(gc, gc->pc);
2036 }
2037 }
2038
2039 #define X_GLrop_Vertex3dv 69
2040 void
2041 __indirect_glVertex3dv(const GLdouble * v)
2042 {
2043 generic_24_byte(X_GLrop_Vertex3dv, v);
2044 }
2045
2046 #define X_GLrop_Vertex3fv 70
2047 void
2048 __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
2049 {
2050 __GLXcontext *const gc = __glXGetCurrentContext();
2051 const GLuint cmdlen = 16;
2052 emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
2053 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2054 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2055 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2056 gc->pc += cmdlen;
2057 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2058 (void) __glXFlushRenderBuffer(gc, gc->pc);
2059 }
2060 }
2061
2062 #define X_GLrop_Vertex3fv 70
2063 void
2064 __indirect_glVertex3fv(const GLfloat * v)
2065 {
2066 generic_12_byte(X_GLrop_Vertex3fv, v);
2067 }
2068
2069 #define X_GLrop_Vertex3iv 71
2070 void
2071 __indirect_glVertex3i(GLint x, GLint y, GLint z)
2072 {
2073 __GLXcontext *const gc = __glXGetCurrentContext();
2074 const GLuint cmdlen = 16;
2075 emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
2076 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2077 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2078 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2079 gc->pc += cmdlen;
2080 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2081 (void) __glXFlushRenderBuffer(gc, gc->pc);
2082 }
2083 }
2084
2085 #define X_GLrop_Vertex3iv 71
2086 void
2087 __indirect_glVertex3iv(const GLint * v)
2088 {
2089 generic_12_byte(X_GLrop_Vertex3iv, v);
2090 }
2091
2092 #define X_GLrop_Vertex3sv 72
2093 void
2094 __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
2095 {
2096 __GLXcontext *const gc = __glXGetCurrentContext();
2097 const GLuint cmdlen = 12;
2098 emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
2099 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2100 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2101 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2102 gc->pc += cmdlen;
2103 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2104 (void) __glXFlushRenderBuffer(gc, gc->pc);
2105 }
2106 }
2107
2108 #define X_GLrop_Vertex3sv 72
2109 void
2110 __indirect_glVertex3sv(const GLshort * v)
2111 {
2112 generic_6_byte(X_GLrop_Vertex3sv, v);
2113 }
2114
2115 #define X_GLrop_Vertex4dv 73
2116 void
2117 __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
2118 {
2119 __GLXcontext *const gc = __glXGetCurrentContext();
2120 const GLuint cmdlen = 36;
2121 emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
2122 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2123 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2124 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2125 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
2126 gc->pc += cmdlen;
2127 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2128 (void) __glXFlushRenderBuffer(gc, gc->pc);
2129 }
2130 }
2131
2132 #define X_GLrop_Vertex4dv 73
2133 void
2134 __indirect_glVertex4dv(const GLdouble * v)
2135 {
2136 generic_32_byte(X_GLrop_Vertex4dv, v);
2137 }
2138
2139 #define X_GLrop_Vertex4fv 74
2140 void
2141 __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2142 {
2143 __GLXcontext *const gc = __glXGetCurrentContext();
2144 const GLuint cmdlen = 20;
2145 emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
2146 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2147 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2148 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2149 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2150 gc->pc += cmdlen;
2151 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2152 (void) __glXFlushRenderBuffer(gc, gc->pc);
2153 }
2154 }
2155
2156 #define X_GLrop_Vertex4fv 74
2157 void
2158 __indirect_glVertex4fv(const GLfloat * v)
2159 {
2160 generic_16_byte(X_GLrop_Vertex4fv, v);
2161 }
2162
2163 #define X_GLrop_Vertex4iv 75
2164 void
2165 __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
2166 {
2167 __GLXcontext *const gc = __glXGetCurrentContext();
2168 const GLuint cmdlen = 20;
2169 emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
2170 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2171 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2172 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2173 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2174 gc->pc += cmdlen;
2175 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2176 (void) __glXFlushRenderBuffer(gc, gc->pc);
2177 }
2178 }
2179
2180 #define X_GLrop_Vertex4iv 75
2181 void
2182 __indirect_glVertex4iv(const GLint * v)
2183 {
2184 generic_16_byte(X_GLrop_Vertex4iv, v);
2185 }
2186
2187 #define X_GLrop_Vertex4sv 76
2188 void
2189 __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
2190 {
2191 __GLXcontext *const gc = __glXGetCurrentContext();
2192 const GLuint cmdlen = 12;
2193 emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
2194 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2195 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2196 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2197 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
2198 gc->pc += cmdlen;
2199 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2200 (void) __glXFlushRenderBuffer(gc, gc->pc);
2201 }
2202 }
2203
2204 #define X_GLrop_Vertex4sv 76
2205 void
2206 __indirect_glVertex4sv(const GLshort * v)
2207 {
2208 generic_8_byte(X_GLrop_Vertex4sv, v);
2209 }
2210
2211 #define X_GLrop_ClipPlane 77
2212 void
2213 __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
2214 {
2215 __GLXcontext *const gc = __glXGetCurrentContext();
2216 const GLuint cmdlen = 40;
2217 emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
2218 (void) memcpy((void *) (gc->pc + 4), (void *) (equation), 32);
2219 (void) memcpy((void *) (gc->pc + 36), (void *) (&plane), 4);
2220 gc->pc += cmdlen;
2221 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2222 (void) __glXFlushRenderBuffer(gc, gc->pc);
2223 }
2224 }
2225
2226 #define X_GLrop_ColorMaterial 78
2227 void
2228 __indirect_glColorMaterial(GLenum face, GLenum mode)
2229 {
2230 __GLXcontext *const gc = __glXGetCurrentContext();
2231 const GLuint cmdlen = 12;
2232 emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
2233 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2234 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2235 gc->pc += cmdlen;
2236 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2237 (void) __glXFlushRenderBuffer(gc, gc->pc);
2238 }
2239 }
2240
2241 #define X_GLrop_CullFace 79
2242 void
2243 __indirect_glCullFace(GLenum mode)
2244 {
2245 __GLXcontext *const gc = __glXGetCurrentContext();
2246 const GLuint cmdlen = 8;
2247 emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
2248 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2249 gc->pc += cmdlen;
2250 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2251 (void) __glXFlushRenderBuffer(gc, gc->pc);
2252 }
2253 }
2254
2255 #define X_GLrop_Fogf 80
2256 void
2257 __indirect_glFogf(GLenum pname, GLfloat param)
2258 {
2259 __GLXcontext *const gc = __glXGetCurrentContext();
2260 const GLuint cmdlen = 12;
2261 emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
2262 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2263 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 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_Fogfv 81
2271 void
2272 __indirect_glFogfv(GLenum pname, const GLfloat * params)
2273 {
2274 __GLXcontext *const gc = __glXGetCurrentContext();
2275 const GLuint compsize = __glFogfv_size(pname);
2276 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2277 emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
2278 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2279 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2280 gc->pc += cmdlen;
2281 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2282 (void) __glXFlushRenderBuffer(gc, gc->pc);
2283 }
2284 }
2285
2286 #define X_GLrop_Fogi 82
2287 void
2288 __indirect_glFogi(GLenum pname, GLint param)
2289 {
2290 __GLXcontext *const gc = __glXGetCurrentContext();
2291 const GLuint cmdlen = 12;
2292 emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
2293 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2294 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 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_Fogiv 83
2302 void
2303 __indirect_glFogiv(GLenum pname, const GLint * params)
2304 {
2305 __GLXcontext *const gc = __glXGetCurrentContext();
2306 const GLuint compsize = __glFogiv_size(pname);
2307 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2308 emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
2309 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2310 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2311 gc->pc += cmdlen;
2312 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2313 (void) __glXFlushRenderBuffer(gc, gc->pc);
2314 }
2315 }
2316
2317 #define X_GLrop_FrontFace 84
2318 void
2319 __indirect_glFrontFace(GLenum mode)
2320 {
2321 __GLXcontext *const gc = __glXGetCurrentContext();
2322 const GLuint cmdlen = 8;
2323 emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
2324 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2325 gc->pc += cmdlen;
2326 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2327 (void) __glXFlushRenderBuffer(gc, gc->pc);
2328 }
2329 }
2330
2331 #define X_GLrop_Hint 85
2332 void
2333 __indirect_glHint(GLenum target, GLenum mode)
2334 {
2335 __GLXcontext *const gc = __glXGetCurrentContext();
2336 const GLuint cmdlen = 12;
2337 emit_header(gc->pc, X_GLrop_Hint, cmdlen);
2338 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2339 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 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_Lightf 86
2347 void
2348 __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
2349 {
2350 __GLXcontext *const gc = __glXGetCurrentContext();
2351 const GLuint cmdlen = 16;
2352 emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
2353 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2354 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2355 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2356 gc->pc += cmdlen;
2357 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2358 (void) __glXFlushRenderBuffer(gc, gc->pc);
2359 }
2360 }
2361
2362 #define X_GLrop_Lightfv 87
2363 void
2364 __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
2365 {
2366 __GLXcontext *const gc = __glXGetCurrentContext();
2367 const GLuint compsize = __glLightfv_size(pname);
2368 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2369 emit_header(gc->pc, X_GLrop_Lightfv, 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 *) (params), (compsize * 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_Lighti 88
2380 void
2381 __indirect_glLighti(GLenum light, GLenum pname, GLint param)
2382 {
2383 __GLXcontext *const gc = __glXGetCurrentContext();
2384 const GLuint cmdlen = 16;
2385 emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
2386 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2387 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2388 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2389 gc->pc += cmdlen;
2390 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2391 (void) __glXFlushRenderBuffer(gc, gc->pc);
2392 }
2393 }
2394
2395 #define X_GLrop_Lightiv 89
2396 void
2397 __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
2398 {
2399 __GLXcontext *const gc = __glXGetCurrentContext();
2400 const GLuint compsize = __glLightiv_size(pname);
2401 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2402 emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
2403 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2404 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2405 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2406 gc->pc += cmdlen;
2407 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2408 (void) __glXFlushRenderBuffer(gc, gc->pc);
2409 }
2410 }
2411
2412 #define X_GLrop_LightModelf 90
2413 void
2414 __indirect_glLightModelf(GLenum pname, GLfloat param)
2415 {
2416 __GLXcontext *const gc = __glXGetCurrentContext();
2417 const GLuint cmdlen = 12;
2418 emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
2419 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2420 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 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_LightModelfv 91
2428 void
2429 __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
2430 {
2431 __GLXcontext *const gc = __glXGetCurrentContext();
2432 const GLuint compsize = __glLightModelfv_size(pname);
2433 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2434 emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
2435 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2436 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2437 gc->pc += cmdlen;
2438 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2439 (void) __glXFlushRenderBuffer(gc, gc->pc);
2440 }
2441 }
2442
2443 #define X_GLrop_LightModeli 92
2444 void
2445 __indirect_glLightModeli(GLenum pname, GLint param)
2446 {
2447 __GLXcontext *const gc = __glXGetCurrentContext();
2448 const GLuint cmdlen = 12;
2449 emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
2450 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2451 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 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_LightModeliv 93
2459 void
2460 __indirect_glLightModeliv(GLenum pname, const GLint * params)
2461 {
2462 __GLXcontext *const gc = __glXGetCurrentContext();
2463 const GLuint compsize = __glLightModeliv_size(pname);
2464 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2465 emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
2466 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2467 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2468 gc->pc += cmdlen;
2469 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2470 (void) __glXFlushRenderBuffer(gc, gc->pc);
2471 }
2472 }
2473
2474 #define X_GLrop_LineStipple 94
2475 void
2476 __indirect_glLineStipple(GLint factor, GLushort pattern)
2477 {
2478 __GLXcontext *const gc = __glXGetCurrentContext();
2479 const GLuint cmdlen = 12;
2480 emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
2481 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
2482 (void) memcpy((void *) (gc->pc + 8), (void *) (&pattern), 2);
2483 gc->pc += cmdlen;
2484 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2485 (void) __glXFlushRenderBuffer(gc, gc->pc);
2486 }
2487 }
2488
2489 #define X_GLrop_LineWidth 95
2490 void
2491 __indirect_glLineWidth(GLfloat width)
2492 {
2493 __GLXcontext *const gc = __glXGetCurrentContext();
2494 const GLuint cmdlen = 8;
2495 emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
2496 (void) memcpy((void *) (gc->pc + 4), (void *) (&width), 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_Materialf 96
2504 void
2505 __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
2506 {
2507 __GLXcontext *const gc = __glXGetCurrentContext();
2508 const GLuint cmdlen = 16;
2509 emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
2510 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2511 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2512 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2513 gc->pc += cmdlen;
2514 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2515 (void) __glXFlushRenderBuffer(gc, gc->pc);
2516 }
2517 }
2518
2519 #define X_GLrop_Materialfv 97
2520 void
2521 __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
2522 {
2523 __GLXcontext *const gc = __glXGetCurrentContext();
2524 const GLuint compsize = __glMaterialfv_size(pname);
2525 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2526 emit_header(gc->pc, X_GLrop_Materialfv, 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 *) (params), (compsize * 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_Materiali 98
2537 void
2538 __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
2539 {
2540 __GLXcontext *const gc = __glXGetCurrentContext();
2541 const GLuint cmdlen = 16;
2542 emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
2543 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2544 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2545 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2546 gc->pc += cmdlen;
2547 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2548 (void) __glXFlushRenderBuffer(gc, gc->pc);
2549 }
2550 }
2551
2552 #define X_GLrop_Materialiv 99
2553 void
2554 __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
2555 {
2556 __GLXcontext *const gc = __glXGetCurrentContext();
2557 const GLuint compsize = __glMaterialiv_size(pname);
2558 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2559 emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
2560 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2561 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2562 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2563 gc->pc += cmdlen;
2564 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2565 (void) __glXFlushRenderBuffer(gc, gc->pc);
2566 }
2567 }
2568
2569 #define X_GLrop_PointSize 100
2570 void
2571 __indirect_glPointSize(GLfloat size)
2572 {
2573 __GLXcontext *const gc = __glXGetCurrentContext();
2574 const GLuint cmdlen = 8;
2575 emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
2576 (void) memcpy((void *) (gc->pc + 4), (void *) (&size), 4);
2577 gc->pc += cmdlen;
2578 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2579 (void) __glXFlushRenderBuffer(gc, gc->pc);
2580 }
2581 }
2582
2583 #define X_GLrop_PolygonMode 101
2584 void
2585 __indirect_glPolygonMode(GLenum face, GLenum mode)
2586 {
2587 __GLXcontext *const gc = __glXGetCurrentContext();
2588 const GLuint cmdlen = 12;
2589 emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
2590 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2591 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2592 gc->pc += cmdlen;
2593 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2594 (void) __glXFlushRenderBuffer(gc, gc->pc);
2595 }
2596 }
2597
2598 #define X_GLrop_PolygonStipple 102
2599 void
2600 __indirect_glPolygonStipple(const GLubyte *mask)
2601 {
2602 __GLXcontext *const gc = __glXGetCurrentContext();
2603 const GLuint compsize =
2604 (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
2605 0) : 0;
2606 const GLuint cmdlen = 24 + __GLX_PAD(compsize);
2607 emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
2608 if (compsize > 0) {
2609 (*gc->fillImage) (gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask,
2610 gc->pc + 24, gc->pc + 4);
2611 } else {
2612 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2613 default_pixel_store_2D_size);
2614 }
2615 gc->pc += cmdlen;
2616 if (gc->pc > gc->limit) {
2617 (void) __glXFlushRenderBuffer(gc, gc->pc);
2618 }
2619 }
2620
2621 #define X_GLrop_Scissor 103
2622 void
2623 __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
2624 {
2625 __GLXcontext *const gc = __glXGetCurrentContext();
2626 const GLuint cmdlen = 20;
2627 emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
2628 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2629 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2630 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
2631 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
2632 gc->pc += cmdlen;
2633 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2634 (void) __glXFlushRenderBuffer(gc, gc->pc);
2635 }
2636 }
2637
2638 #define X_GLrop_ShadeModel 104
2639 void
2640 __indirect_glShadeModel(GLenum mode)
2641 {
2642 __GLXcontext *const gc = __glXGetCurrentContext();
2643 const GLuint cmdlen = 8;
2644 emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
2645 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 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_TexParameterf 105
2653 void
2654 __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
2655 {
2656 __GLXcontext *const gc = __glXGetCurrentContext();
2657 const GLuint cmdlen = 16;
2658 emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
2659 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2660 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2661 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2662 gc->pc += cmdlen;
2663 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2664 (void) __glXFlushRenderBuffer(gc, gc->pc);
2665 }
2666 }
2667
2668 #define X_GLrop_TexParameterfv 106
2669 void
2670 __indirect_glTexParameterfv(GLenum target, GLenum pname,
2671 const GLfloat * params)
2672 {
2673 __GLXcontext *const gc = __glXGetCurrentContext();
2674 const GLuint compsize = __glTexParameterfv_size(pname);
2675 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2676 emit_header(gc->pc, X_GLrop_TexParameterfv, 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 *) (params), (compsize * 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_TexParameteri 107
2687 void
2688 __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
2689 {
2690 __GLXcontext *const gc = __glXGetCurrentContext();
2691 const GLuint cmdlen = 16;
2692 emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
2693 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2694 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2695 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2696 gc->pc += cmdlen;
2697 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2698 (void) __glXFlushRenderBuffer(gc, gc->pc);
2699 }
2700 }
2701
2702 #define X_GLrop_TexParameteriv 108
2703 void
2704 __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
2705 {
2706 __GLXcontext *const gc = __glXGetCurrentContext();
2707 const GLuint compsize = __glTexParameteriv_size(pname);
2708 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2709 emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
2710 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2711 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2712 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2713 gc->pc += cmdlen;
2714 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2715 (void) __glXFlushRenderBuffer(gc, gc->pc);
2716 }
2717 }
2718
2719 static void
2720 __glx_TexImage_1D2D(unsigned opcode, unsigned dim, GLenum target, GLint level,
2721 GLint internalformat, GLsizei width, GLsizei height,
2722 GLint border, GLenum format, GLenum type,
2723 const GLvoid * pixels)
2724 {
2725 __GLXcontext *const gc = __glXGetCurrentContext();
2726 const GLuint compsize =
2727 __glImageSize(width, height, 1, format, type, target);
2728 const GLuint cmdlen = 56 + __GLX_PAD(compsize);
2729 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
2730 if (cmdlen <= gc->maxSmallRenderCommandSize) {
2731 if ((gc->pc + cmdlen) > gc->bufEnd) {
2732 (void) __glXFlushRenderBuffer(gc, gc->pc);
2733 }
2734 emit_header(gc->pc, opcode, cmdlen);
2735 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
2736 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
2737 (void) memcpy((void *) (gc->pc + 32), (void *) (&internalformat),
2738 4);
2739 (void) memcpy((void *) (gc->pc + 36), (void *) (&width), 4);
2740 (void) memcpy((void *) (gc->pc + 40), (void *) (&height), 4);
2741 (void) memcpy((void *) (gc->pc + 44), (void *) (&border), 4);
2742 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
2743 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
2744 if ((compsize > 0) && (pixels != NULL)) {
2745 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
2746 pixels, gc->pc + 56, gc->pc + 4);
2747 } else {
2748 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2749 default_pixel_store_2D_size);
2750 }
2751 gc->pc += cmdlen;
2752 if (gc->pc > gc->limit) {
2753 (void) __glXFlushRenderBuffer(gc, gc->pc);
2754 }
2755 } else {
2756 const GLint op = opcode;
2757 const GLuint cmdlenLarge = cmdlen + 4;
2758 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
2759 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
2760 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
2761 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
2762 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
2763 (void) memcpy((void *) (pc + 36), (void *) (&internalformat), 4);
2764 (void) memcpy((void *) (pc + 40), (void *) (&width), 4);
2765 (void) memcpy((void *) (pc + 44), (void *) (&height), 4);
2766 (void) memcpy((void *) (pc + 48), (void *) (&border), 4);
2767 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
2768 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
2769 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
2770 type, pixels, pc + 60, pc + 8);
2771 }
2772 }
2773 }
2774
2775 #define X_GLrop_TexImage1D 109
2776 void
2777 __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat,
2778 GLsizei width, GLint border, GLenum format,
2779 GLenum type, const GLvoid * pixels)
2780 {
2781 __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat,
2782 width, 1, border, format, type, pixels);
2783 }
2784
2785 #define X_GLrop_TexImage2D 110
2786 void
2787 __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat,
2788 GLsizei width, GLsizei height, GLint border,
2789 GLenum format, GLenum type, const GLvoid * pixels)
2790 {
2791 __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat,
2792 width, height, border, format, type, pixels);
2793 }
2794
2795 #define X_GLrop_TexEnvf 111
2796 void
2797 __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
2798 {
2799 __GLXcontext *const gc = __glXGetCurrentContext();
2800 const GLuint cmdlen = 16;
2801 emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
2802 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2803 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2804 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2805 gc->pc += cmdlen;
2806 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2807 (void) __glXFlushRenderBuffer(gc, gc->pc);
2808 }
2809 }
2810
2811 #define X_GLrop_TexEnvfv 112
2812 void
2813 __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
2814 {
2815 __GLXcontext *const gc = __glXGetCurrentContext();
2816 const GLuint compsize = __glTexEnvfv_size(pname);
2817 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2818 emit_header(gc->pc, X_GLrop_TexEnvfv, 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 *) (params), (compsize * 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_TexEnvi 113
2829 void
2830 __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
2831 {
2832 __GLXcontext *const gc = __glXGetCurrentContext();
2833 const GLuint cmdlen = 16;
2834 emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
2835 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2836 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2837 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2838 gc->pc += cmdlen;
2839 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2840 (void) __glXFlushRenderBuffer(gc, gc->pc);
2841 }
2842 }
2843
2844 #define X_GLrop_TexEnviv 114
2845 void
2846 __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
2847 {
2848 __GLXcontext *const gc = __glXGetCurrentContext();
2849 const GLuint compsize = __glTexEnviv_size(pname);
2850 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2851 emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
2852 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2853 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2854 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 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_TexGend 115
2862 void
2863 __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
2864 {
2865 __GLXcontext *const gc = __glXGetCurrentContext();
2866 const GLuint cmdlen = 20;
2867 emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
2868 (void) memcpy((void *) (gc->pc + 4), (void *) (&param), 8);
2869 (void) memcpy((void *) (gc->pc + 12), (void *) (&coord), 4);
2870 (void) memcpy((void *) (gc->pc + 16), (void *) (&pname), 4);
2871 gc->pc += cmdlen;
2872 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2873 (void) __glXFlushRenderBuffer(gc, gc->pc);
2874 }
2875 }
2876
2877 #define X_GLrop_TexGendv 116
2878 void
2879 __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
2880 {
2881 __GLXcontext *const gc = __glXGetCurrentContext();
2882 const GLuint compsize = __glTexGendv_size(pname);
2883 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
2884 emit_header(gc->pc, X_GLrop_TexGendv, 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 *) (params), (compsize * 8));
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_TexGenf 117
2895 void
2896 __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
2897 {
2898 __GLXcontext *const gc = __glXGetCurrentContext();
2899 const GLuint cmdlen = 16;
2900 emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
2901 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2902 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2903 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2904 gc->pc += cmdlen;
2905 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2906 (void) __glXFlushRenderBuffer(gc, gc->pc);
2907 }
2908 }
2909
2910 #define X_GLrop_TexGenfv 118
2911 void
2912 __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
2913 {
2914 __GLXcontext *const gc = __glXGetCurrentContext();
2915 const GLuint compsize = __glTexGenfv_size(pname);
2916 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2917 emit_header(gc->pc, X_GLrop_TexGenfv, 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 *) (params), (compsize * 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_TexGeni 119
2928 void
2929 __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
2930 {
2931 __GLXcontext *const gc = __glXGetCurrentContext();
2932 const GLuint cmdlen = 16;
2933 emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
2934 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2935 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2936 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2937 gc->pc += cmdlen;
2938 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2939 (void) __glXFlushRenderBuffer(gc, gc->pc);
2940 }
2941 }
2942
2943 #define X_GLrop_TexGeniv 120
2944 void
2945 __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
2946 {
2947 __GLXcontext *const gc = __glXGetCurrentContext();
2948 const GLuint compsize = __glTexGeniv_size(pname);
2949 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2950 emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
2951 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2952 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2953 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2954 gc->pc += cmdlen;
2955 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2956 (void) __glXFlushRenderBuffer(gc, gc->pc);
2957 }
2958 }
2959
2960 #define X_GLrop_InitNames 121
2961 void
2962 __indirect_glInitNames(void)
2963 {
2964 __GLXcontext *const gc = __glXGetCurrentContext();
2965 const GLuint cmdlen = 4;
2966 emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
2967 gc->pc += cmdlen;
2968 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2969 (void) __glXFlushRenderBuffer(gc, gc->pc);
2970 }
2971 }
2972
2973 #define X_GLrop_LoadName 122
2974 void
2975 __indirect_glLoadName(GLuint name)
2976 {
2977 __GLXcontext *const gc = __glXGetCurrentContext();
2978 const GLuint cmdlen = 8;
2979 emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
2980 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
2981 gc->pc += cmdlen;
2982 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2983 (void) __glXFlushRenderBuffer(gc, gc->pc);
2984 }
2985 }
2986
2987 #define X_GLrop_PassThrough 123
2988 void
2989 __indirect_glPassThrough(GLfloat token)
2990 {
2991 __GLXcontext *const gc = __glXGetCurrentContext();
2992 const GLuint cmdlen = 8;
2993 emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
2994 (void) memcpy((void *) (gc->pc + 4), (void *) (&token), 4);
2995 gc->pc += cmdlen;
2996 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2997 (void) __glXFlushRenderBuffer(gc, gc->pc);
2998 }
2999 }
3000
3001 #define X_GLrop_PopName 124
3002 void
3003 __indirect_glPopName(void)
3004 {
3005 __GLXcontext *const gc = __glXGetCurrentContext();
3006 const GLuint cmdlen = 4;
3007 emit_header(gc->pc, X_GLrop_PopName, cmdlen);
3008 gc->pc += cmdlen;
3009 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3010 (void) __glXFlushRenderBuffer(gc, gc->pc);
3011 }
3012 }
3013
3014 #define X_GLrop_PushName 125
3015 void
3016 __indirect_glPushName(GLuint name)
3017 {
3018 __GLXcontext *const gc = __glXGetCurrentContext();
3019 const GLuint cmdlen = 8;
3020 emit_header(gc->pc, X_GLrop_PushName, cmdlen);
3021 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
3022 gc->pc += cmdlen;
3023 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3024 (void) __glXFlushRenderBuffer(gc, gc->pc);
3025 }
3026 }
3027
3028 #define X_GLrop_DrawBuffer 126
3029 void
3030 __indirect_glDrawBuffer(GLenum mode)
3031 {
3032 __GLXcontext *const gc = __glXGetCurrentContext();
3033 const GLuint cmdlen = 8;
3034 emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
3035 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3036 gc->pc += cmdlen;
3037 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3038 (void) __glXFlushRenderBuffer(gc, gc->pc);
3039 }
3040 }
3041
3042 #define X_GLrop_Clear 127
3043 void
3044 __indirect_glClear(GLbitfield mask)
3045 {
3046 __GLXcontext *const gc = __glXGetCurrentContext();
3047 const GLuint cmdlen = 8;
3048 emit_header(gc->pc, X_GLrop_Clear, cmdlen);
3049 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3050 gc->pc += cmdlen;
3051 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3052 (void) __glXFlushRenderBuffer(gc, gc->pc);
3053 }
3054 }
3055
3056 #define X_GLrop_ClearAccum 128
3057 void
3058 __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue,
3059 GLfloat alpha)
3060 {
3061 __GLXcontext *const gc = __glXGetCurrentContext();
3062 const GLuint cmdlen = 20;
3063 emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
3064 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3065 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3066 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3067 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3068 gc->pc += cmdlen;
3069 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3070 (void) __glXFlushRenderBuffer(gc, gc->pc);
3071 }
3072 }
3073
3074 #define X_GLrop_ClearIndex 129
3075 void
3076 __indirect_glClearIndex(GLfloat c)
3077 {
3078 __GLXcontext *const gc = __glXGetCurrentContext();
3079 const GLuint cmdlen = 8;
3080 emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
3081 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
3082 gc->pc += cmdlen;
3083 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3084 (void) __glXFlushRenderBuffer(gc, gc->pc);
3085 }
3086 }
3087
3088 #define X_GLrop_ClearColor 130
3089 void
3090 __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue,
3091 GLclampf alpha)
3092 {
3093 __GLXcontext *const gc = __glXGetCurrentContext();
3094 const GLuint cmdlen = 20;
3095 emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
3096 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3097 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3098 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3099 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3100 gc->pc += cmdlen;
3101 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3102 (void) __glXFlushRenderBuffer(gc, gc->pc);
3103 }
3104 }
3105
3106 #define X_GLrop_ClearStencil 131
3107 void
3108 __indirect_glClearStencil(GLint s)
3109 {
3110 __GLXcontext *const gc = __glXGetCurrentContext();
3111 const GLuint cmdlen = 8;
3112 emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
3113 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
3114 gc->pc += cmdlen;
3115 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3116 (void) __glXFlushRenderBuffer(gc, gc->pc);
3117 }
3118 }
3119
3120 #define X_GLrop_ClearDepth 132
3121 void
3122 __indirect_glClearDepth(GLclampd depth)
3123 {
3124 __GLXcontext *const gc = __glXGetCurrentContext();
3125 const GLuint cmdlen = 12;
3126 emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
3127 (void) memcpy((void *) (gc->pc + 4), (void *) (&depth), 8);
3128 gc->pc += cmdlen;
3129 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3130 (void) __glXFlushRenderBuffer(gc, gc->pc);
3131 }
3132 }
3133
3134 #define X_GLrop_StencilMask 133
3135 void
3136 __indirect_glStencilMask(GLuint mask)
3137 {
3138 __GLXcontext *const gc = __glXGetCurrentContext();
3139 const GLuint cmdlen = 8;
3140 emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
3141 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3142 gc->pc += cmdlen;
3143 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3144 (void) __glXFlushRenderBuffer(gc, gc->pc);
3145 }
3146 }
3147
3148 #define X_GLrop_ColorMask 134
3149 void
3150 __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue,
3151 GLboolean alpha)
3152 {
3153 __GLXcontext *const gc = __glXGetCurrentContext();
3154 const GLuint cmdlen = 8;
3155 emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
3156 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
3157 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
3158 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
3159 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
3160 gc->pc += cmdlen;
3161 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3162 (void) __glXFlushRenderBuffer(gc, gc->pc);
3163 }
3164 }
3165
3166 #define X_GLrop_DepthMask 135
3167 void
3168 __indirect_glDepthMask(GLboolean flag)
3169 {
3170 __GLXcontext *const gc = __glXGetCurrentContext();
3171 const GLuint cmdlen = 8;
3172 emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
3173 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
3174 gc->pc += cmdlen;
3175 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3176 (void) __glXFlushRenderBuffer(gc, gc->pc);
3177 }
3178 }
3179
3180 #define X_GLrop_IndexMask 136
3181 void
3182 __indirect_glIndexMask(GLuint mask)
3183 {
3184 __GLXcontext *const gc = __glXGetCurrentContext();
3185 const GLuint cmdlen = 8;
3186 emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
3187 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3188 gc->pc += cmdlen;
3189 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3190 (void) __glXFlushRenderBuffer(gc, gc->pc);
3191 }
3192 }
3193
3194 #define X_GLrop_Accum 137
3195 void
3196 __indirect_glAccum(GLenum op, GLfloat value)
3197 {
3198 __GLXcontext *const gc = __glXGetCurrentContext();
3199 const GLuint cmdlen = 12;
3200 emit_header(gc->pc, X_GLrop_Accum, cmdlen);
3201 (void) memcpy((void *) (gc->pc + 4), (void *) (&op), 4);
3202 (void) memcpy((void *) (gc->pc + 8), (void *) (&value), 4);
3203 gc->pc += cmdlen;
3204 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3205 (void) __glXFlushRenderBuffer(gc, gc->pc);
3206 }
3207 }
3208
3209 #define X_GLrop_PopAttrib 141
3210 void
3211 __indirect_glPopAttrib(void)
3212 {
3213 __GLXcontext *const gc = __glXGetCurrentContext();
3214 const GLuint cmdlen = 4;
3215 emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
3216 gc->pc += cmdlen;
3217 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3218 (void) __glXFlushRenderBuffer(gc, gc->pc);
3219 }
3220 }
3221
3222 #define X_GLrop_PushAttrib 142
3223 void
3224 __indirect_glPushAttrib(GLbitfield mask)
3225 {
3226 __GLXcontext *const gc = __glXGetCurrentContext();
3227 const GLuint cmdlen = 8;
3228 emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
3229 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 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_MapGrid1d 147
3237 void
3238 __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
3239 {
3240 __GLXcontext *const gc = __glXGetCurrentContext();
3241 const GLuint cmdlen = 24;
3242 emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
3243 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3244 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3245 (void) memcpy((void *) (gc->pc + 20), (void *) (&un), 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_MapGrid1f 148
3253 void
3254 __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
3255 {
3256 __GLXcontext *const gc = __glXGetCurrentContext();
3257 const GLuint cmdlen = 16;
3258 emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
3259 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3260 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3261 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3262 gc->pc += cmdlen;
3263 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3264 (void) __glXFlushRenderBuffer(gc, gc->pc);
3265 }
3266 }
3267
3268 #define X_GLrop_MapGrid2d 149
3269 void
3270 __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn,
3271 GLdouble v1, GLdouble v2)
3272 {
3273 __GLXcontext *const gc = __glXGetCurrentContext();
3274 const GLuint cmdlen = 44;
3275 emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
3276 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3277 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3278 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 8);
3279 (void) memcpy((void *) (gc->pc + 28), (void *) (&v2), 8);
3280 (void) memcpy((void *) (gc->pc + 36), (void *) (&un), 4);
3281 (void) memcpy((void *) (gc->pc + 40), (void *) (&vn), 4);
3282 gc->pc += cmdlen;
3283 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3284 (void) __glXFlushRenderBuffer(gc, gc->pc);
3285 }
3286 }
3287
3288 #define X_GLrop_MapGrid2f 150
3289 void
3290 __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
3291 GLfloat v2)
3292 {
3293 __GLXcontext *const gc = __glXGetCurrentContext();
3294 const GLuint cmdlen = 28;
3295 emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
3296 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3297 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3298 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3299 (void) memcpy((void *) (gc->pc + 16), (void *) (&vn), 4);
3300 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 4);
3301 (void) memcpy((void *) (gc->pc + 24), (void *) (&v2), 4);
3302 gc->pc += cmdlen;
3303 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3304 (void) __glXFlushRenderBuffer(gc, gc->pc);
3305 }
3306 }
3307
3308 #define X_GLrop_EvalCoord1dv 151
3309 void
3310 __indirect_glEvalCoord1d(GLdouble u)
3311 {
3312 __GLXcontext *const gc = __glXGetCurrentContext();
3313 const GLuint cmdlen = 12;
3314 emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
3315 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3316 gc->pc += cmdlen;
3317 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3318 (void) __glXFlushRenderBuffer(gc, gc->pc);
3319 }
3320 }
3321
3322 #define X_GLrop_EvalCoord1dv 151
3323 void
3324 __indirect_glEvalCoord1dv(const GLdouble * u)
3325 {
3326 generic_8_byte(X_GLrop_EvalCoord1dv, u);
3327 }
3328
3329 #define X_GLrop_EvalCoord1fv 152
3330 void
3331 __indirect_glEvalCoord1f(GLfloat u)
3332 {
3333 __GLXcontext *const gc = __glXGetCurrentContext();
3334 const GLuint cmdlen = 8;
3335 emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
3336 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3337 gc->pc += cmdlen;
3338 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3339 (void) __glXFlushRenderBuffer(gc, gc->pc);
3340 }
3341 }
3342
3343 #define X_GLrop_EvalCoord1fv 152
3344 void
3345 __indirect_glEvalCoord1fv(const GLfloat * u)
3346 {
3347 generic_4_byte(X_GLrop_EvalCoord1fv, u);
3348 }
3349
3350 #define X_GLrop_EvalCoord2dv 153
3351 void
3352 __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
3353 {
3354 __GLXcontext *const gc = __glXGetCurrentContext();
3355 const GLuint cmdlen = 20;
3356 emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
3357 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3358 (void) memcpy((void *) (gc->pc + 12), (void *) (&v), 8);
3359 gc->pc += cmdlen;
3360 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3361 (void) __glXFlushRenderBuffer(gc, gc->pc);
3362 }
3363 }
3364
3365 #define X_GLrop_EvalCoord2dv 153
3366 void
3367 __indirect_glEvalCoord2dv(const GLdouble * u)
3368 {
3369 generic_16_byte(X_GLrop_EvalCoord2dv, u);
3370 }
3371
3372 #define X_GLrop_EvalCoord2fv 154
3373 void
3374 __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
3375 {
3376 __GLXcontext *const gc = __glXGetCurrentContext();
3377 const GLuint cmdlen = 12;
3378 emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
3379 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3380 (void) memcpy((void *) (gc->pc + 8), (void *) (&v), 4);
3381 gc->pc += cmdlen;
3382 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3383 (void) __glXFlushRenderBuffer(gc, gc->pc);
3384 }
3385 }
3386
3387 #define X_GLrop_EvalCoord2fv 154
3388 void
3389 __indirect_glEvalCoord2fv(const GLfloat * u)
3390 {
3391 generic_8_byte(X_GLrop_EvalCoord2fv, u);
3392 }
3393
3394 #define X_GLrop_EvalMesh1 155
3395 void
3396 __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
3397 {
3398 __GLXcontext *const gc = __glXGetCurrentContext();
3399 const GLuint cmdlen = 16;
3400 emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
3401 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3402 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3403 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3404 gc->pc += cmdlen;
3405 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3406 (void) __glXFlushRenderBuffer(gc, gc->pc);
3407 }
3408 }
3409
3410 #define X_GLrop_EvalPoint1 156
3411 void
3412 __indirect_glEvalPoint1(GLint i)
3413 {
3414 __GLXcontext *const gc = __glXGetCurrentContext();
3415 const GLuint cmdlen = 8;
3416 emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
3417 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3418 gc->pc += cmdlen;
3419 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3420 (void) __glXFlushRenderBuffer(gc, gc->pc);
3421 }
3422 }
3423
3424 #define X_GLrop_EvalMesh2 157
3425 void
3426 __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
3427 {
3428 __GLXcontext *const gc = __glXGetCurrentContext();
3429 const GLuint cmdlen = 24;
3430 emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
3431 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3432 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3433 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3434 (void) memcpy((void *) (gc->pc + 16), (void *) (&j1), 4);
3435 (void) memcpy((void *) (gc->pc + 20), (void *) (&j2), 4);
3436 gc->pc += cmdlen;
3437 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3438 (void) __glXFlushRenderBuffer(gc, gc->pc);
3439 }
3440 }
3441
3442 #define X_GLrop_EvalPoint2 158
3443 void
3444 __indirect_glEvalPoint2(GLint i, GLint j)
3445 {
3446 __GLXcontext *const gc = __glXGetCurrentContext();
3447 const GLuint cmdlen = 12;
3448 emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
3449 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3450 (void) memcpy((void *) (gc->pc + 8), (void *) (&j), 4);
3451 gc->pc += cmdlen;
3452 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3453 (void) __glXFlushRenderBuffer(gc, gc->pc);
3454 }
3455 }
3456
3457 #define X_GLrop_AlphaFunc 159
3458 void
3459 __indirect_glAlphaFunc(GLenum func, GLclampf ref)
3460 {
3461 __GLXcontext *const gc = __glXGetCurrentContext();
3462 const GLuint cmdlen = 12;
3463 emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
3464 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3465 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3466 gc->pc += cmdlen;
3467 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3468 (void) __glXFlushRenderBuffer(gc, gc->pc);
3469 }
3470 }
3471
3472 #define X_GLrop_BlendFunc 160
3473 void
3474 __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
3475 {
3476 __GLXcontext *const gc = __glXGetCurrentContext();
3477 const GLuint cmdlen = 12;
3478 emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
3479 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactor), 4);
3480 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactor), 4);
3481 gc->pc += cmdlen;
3482 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3483 (void) __glXFlushRenderBuffer(gc, gc->pc);
3484 }
3485 }
3486
3487 #define X_GLrop_LogicOp 161
3488 void
3489 __indirect_glLogicOp(GLenum opcode)
3490 {
3491 __GLXcontext *const gc = __glXGetCurrentContext();
3492 const GLuint cmdlen = 8;
3493 emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
3494 (void) memcpy((void *) (gc->pc + 4), (void *) (&opcode), 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_StencilFunc 162
3502 void
3503 __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
3504 {
3505 __GLXcontext *const gc = __glXGetCurrentContext();
3506 const GLuint cmdlen = 16;
3507 emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
3508 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3509 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3510 (void) memcpy((void *) (gc->pc + 12), (void *) (&mask), 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_StencilOp 163
3518 void
3519 __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
3520 {
3521 __GLXcontext *const gc = __glXGetCurrentContext();
3522 const GLuint cmdlen = 16;
3523 emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
3524 (void) memcpy((void *) (gc->pc + 4), (void *) (&fail), 4);
3525 (void) memcpy((void *) (gc->pc + 8), (void *) (&zfail), 4);
3526 (void) memcpy((void *) (gc->pc + 12), (void *) (&zpass), 4);
3527 gc->pc += cmdlen;
3528 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3529 (void) __glXFlushRenderBuffer(gc, gc->pc);
3530 }
3531 }
3532
3533 #define X_GLrop_DepthFunc 164
3534 void
3535 __indirect_glDepthFunc(GLenum func)
3536 {
3537 __GLXcontext *const gc = __glXGetCurrentContext();
3538 const GLuint cmdlen = 8;
3539 emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
3540 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3541 gc->pc += cmdlen;
3542 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3543 (void) __glXFlushRenderBuffer(gc, gc->pc);
3544 }
3545 }
3546
3547 #define X_GLrop_PixelZoom 165
3548 void
3549 __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
3550 {
3551 __GLXcontext *const gc = __glXGetCurrentContext();
3552 const GLuint cmdlen = 12;
3553 emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
3554 (void) memcpy((void *) (gc->pc + 4), (void *) (&xfactor), 4);
3555 (void) memcpy((void *) (gc->pc + 8), (void *) (&yfactor), 4);
3556 gc->pc += cmdlen;
3557 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3558 (void) __glXFlushRenderBuffer(gc, gc->pc);
3559 }
3560 }
3561
3562 #define X_GLrop_PixelTransferf 166
3563 void
3564 __indirect_glPixelTransferf(GLenum pname, GLfloat param)
3565 {
3566 __GLXcontext *const gc = __glXGetCurrentContext();
3567 const GLuint cmdlen = 12;
3568 emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
3569 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3570 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3571 gc->pc += cmdlen;
3572 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3573 (void) __glXFlushRenderBuffer(gc, gc->pc);
3574 }
3575 }
3576
3577 #define X_GLrop_PixelTransferi 167
3578 void
3579 __indirect_glPixelTransferi(GLenum pname, GLint param)
3580 {
3581 __GLXcontext *const gc = __glXGetCurrentContext();
3582 const GLuint cmdlen = 12;
3583 emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
3584 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3585 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3586 gc->pc += cmdlen;
3587 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3588 (void) __glXFlushRenderBuffer(gc, gc->pc);
3589 }
3590 }
3591
3592 #define X_GLrop_PixelMapfv 168
3593 void
3594 __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
3595 {
3596 __GLXcontext *const gc = __glXGetCurrentContext();
3597 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3598 if (mapsize < 0) {
3599 __glXSetError(gc, GL_INVALID_VALUE);
3600 return;
3601 }
3602 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3603 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3604 if ((gc->pc + cmdlen) > gc->bufEnd) {
3605 (void) __glXFlushRenderBuffer(gc, gc->pc);
3606 }
3607 emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
3608 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3609 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3610 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3611 (mapsize * 4));
3612 gc->pc += cmdlen;
3613 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3614 (void) __glXFlushRenderBuffer(gc, gc->pc);
3615 }
3616 } else {
3617 const GLint op = X_GLrop_PixelMapfv;
3618 const GLuint cmdlenLarge = cmdlen + 4;
3619 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3620 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3621 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3622 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3623 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3624 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3625 }
3626 }
3627 }
3628
3629 #define X_GLrop_PixelMapuiv 169
3630 void
3631 __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
3632 {
3633 __GLXcontext *const gc = __glXGetCurrentContext();
3634 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3635 if (mapsize < 0) {
3636 __glXSetError(gc, GL_INVALID_VALUE);
3637 return;
3638 }
3639 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3640 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3641 if ((gc->pc + cmdlen) > gc->bufEnd) {
3642 (void) __glXFlushRenderBuffer(gc, gc->pc);
3643 }
3644 emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
3645 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3646 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3647 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3648 (mapsize * 4));
3649 gc->pc += cmdlen;
3650 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3651 (void) __glXFlushRenderBuffer(gc, gc->pc);
3652 }
3653 } else {
3654 const GLint op = X_GLrop_PixelMapuiv;
3655 const GLuint cmdlenLarge = cmdlen + 4;
3656 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3657 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3658 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3659 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3660 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3661 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3662 }
3663 }
3664 }
3665
3666 #define X_GLrop_PixelMapusv 170
3667 void
3668 __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
3669 {
3670 __GLXcontext *const gc = __glXGetCurrentContext();
3671 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
3672 if (mapsize < 0) {
3673 __glXSetError(gc, GL_INVALID_VALUE);
3674 return;
3675 }
3676 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3677 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3678 if ((gc->pc + cmdlen) > gc->bufEnd) {
3679 (void) __glXFlushRenderBuffer(gc, gc->pc);
3680 }
3681 emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
3682 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3683 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3684 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3685 (mapsize * 2));
3686 gc->pc += cmdlen;
3687 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3688 (void) __glXFlushRenderBuffer(gc, gc->pc);
3689 }
3690 } else {
3691 const GLint op = X_GLrop_PixelMapusv;
3692 const GLuint cmdlenLarge = cmdlen + 4;
3693 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3694 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3695 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3696 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3697 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3698 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
3699 }
3700 }
3701 }
3702
3703 #define X_GLrop_ReadBuffer 171
3704 void
3705 __indirect_glReadBuffer(GLenum mode)
3706 {
3707 __GLXcontext *const gc = __glXGetCurrentContext();
3708 const GLuint cmdlen = 8;
3709 emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
3710 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3711 gc->pc += cmdlen;
3712 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3713 (void) __glXFlushRenderBuffer(gc, gc->pc);
3714 }
3715 }
3716
3717 #define X_GLrop_CopyPixels 172
3718 void
3719 __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3720 GLenum type)
3721 {
3722 __GLXcontext *const gc = __glXGetCurrentContext();
3723 const GLuint cmdlen = 24;
3724 emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
3725 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
3726 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
3727 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
3728 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
3729 (void) memcpy((void *) (gc->pc + 20), (void *) (&type), 4);
3730 gc->pc += cmdlen;
3731 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3732 (void) __glXFlushRenderBuffer(gc, gc->pc);
3733 }
3734 }
3735
3736 #define X_GLsop_ReadPixels 111
3737 void
3738 __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3739 GLenum format, GLenum type, GLvoid * pixels)
3740 {
3741 __GLXcontext *const gc = __glXGetCurrentContext();
3742 const __GLXattribute *const state = gc->client_state_private;
3743 Display *const dpy = gc->currentDpy;
3744 #ifndef USE_XCB
3745 const GLuint cmdlen = 28;
3746 #endif
3747 if (__builtin_expect(dpy != NULL, 1)) {
3748 #ifdef USE_XCB
3749 xcb_connection_t *c = XGetXCBConnection(dpy);
3750 (void) __glXFlushRenderBuffer(gc, gc->pc);
3751 xcb_glx_read_pixels_reply_t *reply =
3752 xcb_glx_read_pixels_reply(c,
3753 xcb_glx_read_pixels(c,
3754 gc->
3755 currentContextTag,
3756 x, y, width, height,
3757 format, type,
3758 state->storePack.
3759 swapEndian, 0),
3760 NULL);
3761 (void) memcpy(pixels, xcb_glx_read_pixels_data(reply),
3762 xcb_glx_read_pixels_data_length(reply) *
3763 sizeof(GLvoid));
3764 free(reply);
3765 #else
3766 GLubyte const *pc =
3767 __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
3768 (void) memcpy((void *) (pc + 0), (void *) (&x), 4);
3769 (void) memcpy((void *) (pc + 4), (void *) (&y), 4);
3770 (void) memcpy((void *) (pc + 8), (void *) (&width), 4);
3771 (void) memcpy((void *) (pc + 12), (void *) (&height), 4);
3772 (void) memcpy((void *) (pc + 16), (void *) (&format), 4);
3773 (void) memcpy((void *) (pc + 20), (void *) (&type), 4);
3774 *(int32_t *) (pc + 24) = 0;
3775 *(int8_t *) (pc + 24) = state->storePack.swapEndian;
3776 __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type,
3777 pixels, GL_FALSE);
3778 UnlockDisplay(dpy);
3779 SyncHandle();
3780 #endif /* USE_XCB */
3781 }
3782 return;
3783 }
3784
3785 #define X_GLrop_DrawPixels 173
3786 void
3787 __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format,
3788 GLenum type, const GLvoid * pixels)
3789 {
3790 __GLXcontext *const gc = __glXGetCurrentContext();
3791 const GLuint compsize =
3792 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
3793 0) : 0;
3794 const GLuint cmdlen = 40 + __GLX_PAD(compsize);
3795 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
3796 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3797 if ((gc->pc + cmdlen) > gc->bufEnd) {
3798 (void) __glXFlushRenderBuffer(gc, gc->pc);
3799 }
3800 emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
3801 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
3802 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
3803 (void) memcpy((void *) (gc->pc + 32), (void *) (&format), 4);
3804 (void) memcpy((void *) (gc->pc + 36), (void *) (&type), 4);
3805 if (compsize > 0) {
3806 (*gc->fillImage) (gc, 2, width, height, 1, format, type,
3807 pixels, gc->pc + 40, gc->pc + 4);
3808 } else {
3809 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
3810 default_pixel_store_2D_size);
3811 }
3812 gc->pc += cmdlen;
3813 if (gc->pc > gc->limit) {
3814 (void) __glXFlushRenderBuffer(gc, gc->pc);
3815 }
3816 } else {
3817 const GLint op = X_GLrop_DrawPixels;
3818 const GLuint cmdlenLarge = cmdlen + 4;
3819 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3820 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3821 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3822 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
3823 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
3824 (void) memcpy((void *) (pc + 36), (void *) (&format), 4);
3825 (void) memcpy((void *) (pc + 40), (void *) (&type), 4);
3826 __glXSendLargeImage(gc, compsize, 2, width, height, 1, format,
3827 type, pixels, pc + 44, pc + 8);
3828 }
3829 }
3830 }
3831
3832 #define X_GLsop_GetClipPlane 113
3833 void
3834 __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
3835 {
3836 __GLXcontext *const gc = __glXGetCurrentContext();
3837 Display *const dpy = gc->currentDpy;
3838 #ifndef USE_XCB
3839 const GLuint cmdlen = 4;
3840 #endif
3841 if (__builtin_expect(dpy != NULL, 1)) {
3842 #ifdef USE_XCB
3843 xcb_connection_t *c = XGetXCBConnection(dpy);
3844 (void) __glXFlushRenderBuffer(gc, gc->pc);
3845 xcb_glx_get_clip_plane_reply_t *reply =
3846 xcb_glx_get_clip_plane_reply(c,
3847 xcb_glx_get_clip_plane(c,
3848 gc->
3849 currentContextTag,
3850 plane), NULL);
3851 (void) memcpy(equation, xcb_glx_get_clip_plane_data(reply),
3852 xcb_glx_get_clip_plane_data_length(reply) *
3853 sizeof(GLdouble));
3854 free(reply);
3855 #else
3856 GLubyte const *pc =
3857 __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
3858 (void) memcpy((void *) (pc + 0), (void *) (&plane), 4);
3859 (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
3860 UnlockDisplay(dpy);
3861 SyncHandle();
3862 #endif /* USE_XCB */
3863 }
3864 return;
3865 }
3866
3867 #define X_GLsop_GetLightfv 118
3868 void
3869 __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
3870 {
3871 __GLXcontext *const gc = __glXGetCurrentContext();
3872 Display *const dpy = gc->currentDpy;
3873 #ifndef USE_XCB
3874 const GLuint cmdlen = 8;
3875 #endif
3876 if (__builtin_expect(dpy != NULL, 1)) {
3877 #ifdef USE_XCB
3878 xcb_connection_t *c = XGetXCBConnection(dpy);
3879 (void) __glXFlushRenderBuffer(gc, gc->pc);
3880 xcb_glx_get_lightfv_reply_t *reply =
3881 xcb_glx_get_lightfv_reply(c,
3882 xcb_glx_get_lightfv(c,
3883 gc->
3884 currentContextTag,
3885 light, pname),
3886 NULL);
3887 if (xcb_glx_get_lightfv_data_length(reply) == 0)
3888 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3889 else
3890 (void) memcpy(params, xcb_glx_get_lightfv_data(reply),
3891 xcb_glx_get_lightfv_data_length(reply) *
3892 sizeof(GLfloat));
3893 free(reply);
3894 #else
3895 GLubyte const *pc =
3896 __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
3897 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3898 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3899 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3900 UnlockDisplay(dpy);
3901 SyncHandle();
3902 #endif /* USE_XCB */
3903 }
3904 return;
3905 }
3906
3907 #define X_GLsop_GetLightiv 119
3908 void
3909 __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
3910 {
3911 __GLXcontext *const gc = __glXGetCurrentContext();
3912 Display *const dpy = gc->currentDpy;
3913 #ifndef USE_XCB
3914 const GLuint cmdlen = 8;
3915 #endif
3916 if (__builtin_expect(dpy != NULL, 1)) {
3917 #ifdef USE_XCB
3918 xcb_connection_t *c = XGetXCBConnection(dpy);
3919 (void) __glXFlushRenderBuffer(gc, gc->pc);
3920 xcb_glx_get_lightiv_reply_t *reply =
3921 xcb_glx_get_lightiv_reply(c,
3922 xcb_glx_get_lightiv(c,
3923 gc->
3924 currentContextTag,
3925 light, pname),
3926 NULL);
3927 if (xcb_glx_get_lightiv_data_length(reply) == 0)
3928 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3929 else
3930 (void) memcpy(params, xcb_glx_get_lightiv_data(reply),
3931 xcb_glx_get_lightiv_data_length(reply) *
3932 sizeof(GLint));
3933 free(reply);
3934 #else
3935 GLubyte const *pc =
3936 __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
3937 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3938 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3939 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3940 UnlockDisplay(dpy);
3941 SyncHandle();
3942 #endif /* USE_XCB */
3943 }
3944 return;
3945 }
3946
3947 #define X_GLsop_GetMapdv 120
3948 void
3949 __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
3950 {
3951 __GLXcontext *const gc = __glXGetCurrentContext();
3952 Display *const dpy = gc->currentDpy;
3953 #ifndef USE_XCB
3954 const GLuint cmdlen = 8;
3955 #endif
3956 if (__builtin_expect(dpy != NULL, 1)) {
3957 #ifdef USE_XCB
3958 xcb_connection_t *c = XGetXCBConnection(dpy);
3959 (void) __glXFlushRenderBuffer(gc, gc->pc);
3960 xcb_glx_get_mapdv_reply_t *reply =
3961 xcb_glx_get_mapdv_reply(c,
3962 xcb_glx_get_mapdv(c,
3963 gc->currentContextTag,
3964 target, query), NULL);
3965 if (xcb_glx_get_mapdv_data_length(reply) == 0)
3966 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3967 else
3968 (void) memcpy(v, xcb_glx_get_mapdv_data(reply),
3969 xcb_glx_get_mapdv_data_length(reply) *
3970 sizeof(GLdouble));
3971 free(reply);
3972 #else
3973 GLubyte const *pc =
3974 __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
3975 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
3976 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3977 (void) __glXReadReply(dpy, 8, v, GL_FALSE);
3978 UnlockDisplay(dpy);
3979 SyncHandle();
3980 #endif /* USE_XCB */
3981 }
3982 return;
3983 }
3984
3985 #define X_GLsop_GetMapfv 121
3986 void
3987 __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
3988 {
3989 __GLXcontext *const gc = __glXGetCurrentContext();
3990 Display *const dpy = gc->currentDpy;
3991 #ifndef USE_XCB
3992 const GLuint cmdlen = 8;
3993 #endif
3994 if (__builtin_expect(dpy != NULL, 1)) {
3995 #ifdef USE_XCB
3996 xcb_connection_t *c = XGetXCBConnection(dpy);
3997 (void) __glXFlushRenderBuffer(gc, gc->pc);
3998 xcb_glx_get_mapfv_reply_t *reply =
3999 xcb_glx_get_mapfv_reply(c,
4000 xcb_glx_get_mapfv(c,
4001 gc->currentContextTag,
4002 target, query), NULL);
4003 if (xcb_glx_get_mapfv_data_length(reply) == 0)
4004 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4005 else
4006 (void) memcpy(v, xcb_glx_get_mapfv_data(reply),
4007 xcb_glx_get_mapfv_data_length(reply) *
4008 sizeof(GLfloat));
4009 free(reply);
4010 #else
4011 GLubyte const *pc =
4012 __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
4013 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4014 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
4015 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
4016 UnlockDisplay(dpy);
4017 SyncHandle();
4018 #endif /* USE_XCB */
4019 }
4020 return;
4021 }
4022
4023 #define X_GLsop_GetMapiv 122
4024 void
4025 __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
4026 {
4027 __GLXcontext *const gc = __glXGetCurrentContext();
4028 Display *const dpy = gc->currentDpy;
4029 #ifndef USE_XCB
4030 const GLuint cmdlen = 8;
4031 #endif
4032 if (__builtin_expect(dpy != NULL, 1)) {
4033 #ifdef USE_XCB
4034 xcb_connection_t *c = XGetXCBConnection(dpy);
4035 (void) __glXFlushRenderBuffer(gc, gc->pc);
4036 xcb_glx_get_mapiv_reply_t *reply =
4037 xcb_glx_get_mapiv_reply(c,
4038 xcb_glx_get_mapiv(c,
4039 gc->currentContextTag,
4040 target, query), NULL);
4041 if (xcb_glx_get_mapiv_data_length(reply) == 0)
4042 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4043 else
4044 (void) memcpy(v, xcb_glx_get_mapiv_data(reply),
4045 xcb_glx_get_mapiv_data_length(reply) *
4046 sizeof(GLint));
4047 free(reply);
4048 #else
4049 GLubyte const *pc =
4050 __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
4051 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4052 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
4053 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
4054 UnlockDisplay(dpy);
4055 SyncHandle();
4056 #endif /* USE_XCB */
4057 }
4058 return;
4059 }
4060
4061 #define X_GLsop_GetMaterialfv 123
4062 void
4063 __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
4064 {
4065 __GLXcontext *const gc = __glXGetCurrentContext();
4066 Display *const dpy = gc->currentDpy;
4067 #ifndef USE_XCB
4068 const GLuint cmdlen = 8;
4069 #endif
4070 if (__builtin_expect(dpy != NULL, 1)) {
4071 #ifdef USE_XCB
4072 xcb_connection_t *c = XGetXCBConnection(dpy);
4073 (void) __glXFlushRenderBuffer(gc, gc->pc);
4074 xcb_glx_get_materialfv_reply_t *reply =
4075 xcb_glx_get_materialfv_reply(c,
4076 xcb_glx_get_materialfv(c,
4077 gc->
4078 currentContextTag,
4079 face, pname),
4080 NULL);
4081 if (xcb_glx_get_materialfv_data_length(reply) == 0)
4082 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4083 else
4084 (void) memcpy(params, xcb_glx_get_materialfv_data(reply),
4085 xcb_glx_get_materialfv_data_length(reply) *
4086 sizeof(GLfloat));
4087 free(reply);
4088 #else
4089 GLubyte const *pc =
4090 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
4091 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4092 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4093 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4094 UnlockDisplay(dpy);
4095 SyncHandle();
4096 #endif /* USE_XCB */
4097 }
4098 return;
4099 }
4100
4101 #define X_GLsop_GetMaterialiv 124
4102 void
4103 __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
4104 {
4105 __GLXcontext *const gc = __glXGetCurrentContext();
4106 Display *const dpy = gc->currentDpy;
4107 #ifndef USE_XCB
4108 const GLuint cmdlen = 8;
4109 #endif
4110 if (__builtin_expect(dpy != NULL, 1)) {
4111 #ifdef USE_XCB
4112 xcb_connection_t *c = XGetXCBConnection(dpy);
4113 (void) __glXFlushRenderBuffer(gc, gc->pc);
4114 xcb_glx_get_materialiv_reply_t *reply =
4115 xcb_glx_get_materialiv_reply(c,
4116 xcb_glx_get_materialiv(c,
4117 gc->
4118 currentContextTag,
4119 face, pname),
4120 NULL);
4121 if (xcb_glx_get_materialiv_data_length(reply) == 0)
4122 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4123 else
4124 (void) memcpy(params, xcb_glx_get_materialiv_data(reply),
4125 xcb_glx_get_materialiv_data_length(reply) *
4126 sizeof(GLint));
4127 free(reply);
4128 #else
4129 GLubyte const *pc =
4130 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
4131 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4132 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4133 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4134 UnlockDisplay(dpy);
4135 SyncHandle();
4136 #endif /* USE_XCB */
4137 }
4138 return;
4139 }
4140
4141 #define X_GLsop_GetPixelMapfv 125
4142 void
4143 __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
4144 {
4145 __GLXcontext *const gc = __glXGetCurrentContext();
4146 Display *const dpy = gc->currentDpy;
4147 #ifndef USE_XCB
4148 const GLuint cmdlen = 4;
4149 #endif
4150 if (__builtin_expect(dpy != NULL, 1)) {
4151 #ifdef USE_XCB
4152 xcb_connection_t *c = XGetXCBConnection(dpy);
4153 (void) __glXFlushRenderBuffer(gc, gc->pc);
4154 xcb_glx_get_pixel_mapfv_reply_t *reply =
4155 xcb_glx_get_pixel_mapfv_reply(c,
4156 xcb_glx_get_pixel_mapfv(c,
4157 gc->
4158 currentContextTag,
4159 map), NULL);
4160 if (xcb_glx_get_pixel_mapfv_data_length(reply) == 0)
4161 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4162 else
4163 (void) memcpy(values, xcb_glx_get_pixel_mapfv_data(reply),
4164 xcb_glx_get_pixel_mapfv_data_length(reply) *
4165 sizeof(GLfloat));
4166 free(reply);
4167 #else
4168 GLubyte const *pc =
4169 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
4170 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4171 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4172 UnlockDisplay(dpy);
4173 SyncHandle();
4174 #endif /* USE_XCB */
4175 }
4176 return;
4177 }
4178
4179 #define X_GLsop_GetPixelMapuiv 126
4180 void
4181 __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
4182 {
4183 __GLXcontext *const gc = __glXGetCurrentContext();
4184 Display *const dpy = gc->currentDpy;
4185 #ifndef USE_XCB
4186 const GLuint cmdlen = 4;
4187 #endif
4188 if (__builtin_expect(dpy != NULL, 1)) {
4189 #ifdef USE_XCB
4190 xcb_connection_t *c = XGetXCBConnection(dpy);
4191 (void) __glXFlushRenderBuffer(gc, gc->pc);
4192 xcb_glx_get_pixel_mapuiv_reply_t *reply =
4193 xcb_glx_get_pixel_mapuiv_reply(c,
4194 xcb_glx_get_pixel_mapuiv(c,
4195 gc->
4196 currentContextTag,
4197 map),
4198 NULL);
4199 if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 0)
4200 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4201 else
4202 (void) memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply),
4203 xcb_glx_get_pixel_mapuiv_data_length(reply) *
4204 sizeof(GLuint));
4205 free(reply);
4206 #else
4207 GLubyte const *pc =
4208 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
4209 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4210 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4211 UnlockDisplay(dpy);
4212 SyncHandle();
4213 #endif /* USE_XCB */
4214 }
4215 return;
4216 }
4217
4218 #define X_GLsop_GetPixelMapusv 127
4219 void
4220 __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
4221 {
4222 __GLXcontext *const gc = __glXGetCurrentContext();
4223 Display *const dpy = gc->currentDpy;
4224 #ifndef USE_XCB
4225 const GLuint cmdlen = 4;
4226 #endif
4227 if (__builtin_expect(dpy != NULL, 1)) {
4228 #ifdef USE_XCB
4229 xcb_connection_t *c = XGetXCBConnection(dpy);
4230 (void) __glXFlushRenderBuffer(gc, gc->pc);
4231 xcb_glx_get_pixel_mapusv_reply_t *reply =
4232 xcb_glx_get_pixel_mapusv_reply(c,
4233 xcb_glx_get_pixel_mapusv(c,
4234 gc->
4235 currentContextTag,
4236 map),
4237 NULL);
4238 if (xcb_glx_get_pixel_mapusv_data_length(reply) == 0)
4239 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4240 else
4241 (void) memcpy(values, xcb_glx_get_pixel_mapusv_data(reply),
4242 xcb_glx_get_pixel_mapusv_data_length(reply) *
4243 sizeof(GLushort));
4244 free(reply);
4245 #else
4246 GLubyte const *pc =
4247 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
4248 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4249 (void) __glXReadReply(dpy, 2, values, GL_FALSE);
4250 UnlockDisplay(dpy);
4251 SyncHandle();
4252 #endif /* USE_XCB */
4253 }
4254 return;
4255 }
4256
4257 #define X_GLsop_GetPolygonStipple 128
4258 void
4259 __indirect_glGetPolygonStipple(GLubyte *mask)
4260 {
4261 __GLXcontext *const gc = __glXGetCurrentContext();
4262 Display *const dpy = gc->currentDpy;
4263 #ifndef USE_XCB
4264 const GLuint cmdlen = 4;
4265 #endif
4266 if (__builtin_expect(dpy != NULL, 1)) {
4267 #ifdef USE_XCB
4268 xcb_connection_t *c = XGetXCBConnection(dpy);
4269 (void) __glXFlushRenderBuffer(gc, gc->pc);
4270 xcb_glx_get_polygon_stipple_reply_t *reply =
4271 xcb_glx_get_polygon_stipple_reply(c,
4272 xcb_glx_get_polygon_stipple(c,
4273 gc->
4274 currentContextTag,
4275 0),
4276 NULL);
4277 (void) memcpy(mask, xcb_glx_get_polygon_stipple_data(reply),
4278 xcb_glx_get_polygon_stipple_data_length(reply) *
4279 sizeof(GLubyte));
4280 free(reply);
4281 #else
4282 GLubyte const *pc =
4283 __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
4284 *(int32_t *) (pc + 0) = 0;
4285 __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
4286 mask, GL_FALSE);
4287 UnlockDisplay(dpy);
4288 SyncHandle();
4289 #endif /* USE_XCB */
4290 }
4291 return;
4292 }
4293
4294 #define X_GLsop_GetTexEnvfv 130
4295 void
4296 __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
4297 {
4298 __GLXcontext *const gc = __glXGetCurrentContext();
4299 Display *const dpy = gc->currentDpy;
4300 #ifndef USE_XCB
4301 const GLuint cmdlen = 8;
4302 #endif
4303 if (__builtin_expect(dpy != NULL, 1)) {
4304 #ifdef USE_XCB
4305 xcb_connection_t *c = XGetXCBConnection(dpy);
4306 (void) __glXFlushRenderBuffer(gc, gc->pc);
4307 xcb_glx_get_tex_envfv_reply_t *reply =
4308 xcb_glx_get_tex_envfv_reply(c,
4309 xcb_glx_get_tex_envfv(c,
4310 gc->
4311 currentContextTag,
4312 target, pname),
4313 NULL);
4314 if (xcb_glx_get_tex_envfv_data_length(reply) == 0)
4315 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4316 else
4317 (void) memcpy(params, xcb_glx_get_tex_envfv_data(reply),
4318 xcb_glx_get_tex_envfv_data_length(reply) *
4319 sizeof(GLfloat));
4320 free(reply);
4321 #else
4322 GLubyte const *pc =
4323 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
4324 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4325 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4326 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4327 UnlockDisplay(dpy);
4328 SyncHandle();
4329 #endif /* USE_XCB */
4330 }
4331 return;
4332 }
4333
4334 #define X_GLsop_GetTexEnviv 131
4335 void
4336 __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
4337 {
4338 __GLXcontext *const gc = __glXGetCurrentContext();
4339 Display *const dpy = gc->currentDpy;
4340 #ifndef USE_XCB
4341 const GLuint cmdlen = 8;
4342 #endif
4343 if (__builtin_expect(dpy != NULL, 1)) {
4344 #ifdef USE_XCB
4345 xcb_connection_t *c = XGetXCBConnection(dpy);
4346 (void) __glXFlushRenderBuffer(gc, gc->pc);
4347 xcb_glx_get_tex_enviv_reply_t *reply =
4348 xcb_glx_get_tex_enviv_reply(c,
4349 xcb_glx_get_tex_enviv(c,
4350 gc->
4351 currentContextTag,
4352 target, pname),
4353 NULL);
4354 if (xcb_glx_get_tex_enviv_data_length(reply) == 0)
4355 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4356 else
4357 (void) memcpy(params, xcb_glx_get_tex_enviv_data(reply),
4358 xcb_glx_get_tex_enviv_data_length(reply) *
4359 sizeof(GLint));
4360 free(reply);
4361 #else
4362 GLubyte const *pc =
4363 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
4364 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4365 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4366 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4367 UnlockDisplay(dpy);
4368 SyncHandle();
4369 #endif /* USE_XCB */
4370 }
4371 return;
4372 }
4373
4374 #define X_GLsop_GetTexGendv 132
4375 void
4376 __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
4377 {
4378 __GLXcontext *const gc = __glXGetCurrentContext();
4379 Display *const dpy = gc->currentDpy;
4380 #ifndef USE_XCB
4381 const GLuint cmdlen = 8;
4382 #endif
4383 if (__builtin_expect(dpy != NULL, 1)) {
4384 #ifdef USE_XCB
4385 xcb_connection_t *c = XGetXCBConnection(dpy);
4386 (void) __glXFlushRenderBuffer(gc, gc->pc);
4387 xcb_glx_get_tex_gendv_reply_t *reply =
4388 xcb_glx_get_tex_gendv_reply(c,
4389 xcb_glx_get_tex_gendv(c,
4390 gc->
4391 currentContextTag,
4392 coord, pname),
4393 NULL);
4394 if (xcb_glx_get_tex_gendv_data_length(reply) == 0)
4395 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4396 else
4397 (void) memcpy(params, xcb_glx_get_tex_gendv_data(reply),
4398 xcb_glx_get_tex_gendv_data_length(reply) *
4399 sizeof(GLdouble));
4400 free(reply);
4401 #else
4402 GLubyte const *pc =
4403 __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
4404 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4405 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4406 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
4407 UnlockDisplay(dpy);
4408 SyncHandle();
4409 #endif /* USE_XCB */
4410 }
4411 return;
4412 }
4413
4414 #define X_GLsop_GetTexGenfv 133
4415 void
4416 __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
4417 {
4418 __GLXcontext *const gc = __glXGetCurrentContext();
4419 Display *const dpy = gc->currentDpy;
4420 #ifndef USE_XCB
4421 const GLuint cmdlen = 8;
4422 #endif
4423 if (__builtin_expect(dpy != NULL, 1)) {
4424 #ifdef USE_XCB
4425 xcb_connection_t *c = XGetXCBConnection(dpy);
4426 (void) __glXFlushRenderBuffer(gc, gc->pc);
4427 xcb_glx_get_tex_genfv_reply_t *reply =
4428 xcb_glx_get_tex_genfv_reply(c,
4429 xcb_glx_get_tex_genfv(c,
4430 gc->
4431 currentContextTag,
4432 coord, pname),
4433 NULL);
4434 if (xcb_glx_get_tex_genfv_data_length(reply) == 0)
4435 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4436 else
4437 (void) memcpy(params, xcb_glx_get_tex_genfv_data(reply),
4438 xcb_glx_get_tex_genfv_data_length(reply) *
4439 sizeof(GLfloat));
4440 free(reply);
4441 #else
4442 GLubyte const *pc =
4443 __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
4444 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4445 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4446 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4447 UnlockDisplay(dpy);
4448 SyncHandle();
4449 #endif /* USE_XCB */
4450 }
4451 return;
4452 }
4453
4454 #define X_GLsop_GetTexGeniv 134
4455 void
4456 __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
4457 {
4458 __GLXcontext *const gc = __glXGetCurrentContext();
4459 Display *const dpy = gc->currentDpy;
4460 #ifndef USE_XCB
4461 const GLuint cmdlen = 8;
4462 #endif
4463 if (__builtin_expect(dpy != NULL, 1)) {
4464 #ifdef USE_XCB
4465 xcb_connection_t *c = XGetXCBConnection(dpy);
4466 (void) __glXFlushRenderBuffer(gc, gc->pc);
4467 xcb_glx_get_tex_geniv_reply_t *reply =
4468 xcb_glx_get_tex_geniv_reply(c,
4469 xcb_glx_get_tex_geniv(c,
4470 gc->
4471 currentContextTag,
4472 coord, pname),
4473 NULL);
4474 if (xcb_glx_get_tex_geniv_data_length(reply) == 0)
4475 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4476 else
4477 (void) memcpy(params, xcb_glx_get_tex_geniv_data(reply),
4478 xcb_glx_get_tex_geniv_data_length(reply) *
4479 sizeof(GLint));
4480 free(reply);
4481 #else
4482 GLubyte const *pc =
4483 __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
4484 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4485 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4486 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4487 UnlockDisplay(dpy);
4488 SyncHandle();
4489 #endif /* USE_XCB */
4490 }
4491 return;
4492 }
4493
4494 #define X_GLsop_GetTexImage 135
4495 void
4496 __indirect_glGetTexImage(GLenum target, GLint level, GLenum format,
4497 GLenum type, GLvoid * pixels)
4498 {
4499 __GLXcontext *const gc = __glXGetCurrentContext();
4500 const __GLXattribute *const state = gc->client_state_private;
4501 Display *const dpy = gc->currentDpy;
4502 #ifndef USE_XCB
4503 const GLuint cmdlen = 20;
4504 #endif
4505 if (__builtin_expect(dpy != NULL, 1)) {
4506 #ifdef USE_XCB
4507 xcb_connection_t *c = XGetXCBConnection(dpy);
4508 (void) __glXFlushRenderBuffer(gc, gc->pc);
4509 xcb_glx_get_tex_image_reply_t *reply =
4510 xcb_glx_get_tex_image_reply(c,
4511 xcb_glx_get_tex_image(c,
4512 gc->
4513 currentContextTag,
4514 target, level,
4515 format, type,
4516 state->
4517 storePack.
4518 swapEndian),
4519 NULL);
4520 (void) memcpy(pixels, xcb_glx_get_tex_image_data(reply),
4521 xcb_glx_get_tex_image_data_length(reply) *
4522 sizeof(GLvoid));
4523 free(reply);
4524 #else
4525 GLubyte const *pc =
4526 __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
4527 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4528 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4529 (void) memcpy((void *) (pc + 8), (void *) (&format), 4);
4530 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
4531 *(int32_t *) (pc + 16) = 0;
4532 *(int8_t *) (pc + 16) = state->storePack.swapEndian;
4533 __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels,
4534 GL_TRUE);
4535 UnlockDisplay(dpy);
4536 SyncHandle();
4537 #endif /* USE_XCB */
4538 }
4539 return;
4540 }
4541
4542 #define X_GLsop_GetTexParameterfv 136
4543 void
4544 __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
4545 {
4546 __GLXcontext *const gc = __glXGetCurrentContext();
4547 Display *const dpy = gc->currentDpy;
4548 #ifndef USE_XCB
4549 const GLuint cmdlen = 8;
4550 #endif
4551 if (__builtin_expect(dpy != NULL, 1)) {
4552 #ifdef USE_XCB
4553 xcb_connection_t *c = XGetXCBConnection(dpy);
4554 (void) __glXFlushRenderBuffer(gc, gc->pc);
4555 xcb_glx_get_tex_parameterfv_reply_t *reply =
4556 xcb_glx_get_tex_parameterfv_reply(c,
4557 xcb_glx_get_tex_parameterfv(c,
4558 gc->
4559 currentContextTag,
4560 target,
4561 pname),
4562 NULL);
4563 if (xcb_glx_get_tex_parameterfv_data_length(reply) == 0)
4564 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4565 else
4566 (void) memcpy(params, xcb_glx_get_tex_parameterfv_data(reply),
4567 xcb_glx_get_tex_parameterfv_data_length(reply) *
4568 sizeof(GLfloat));
4569 free(reply);
4570 #else
4571 GLubyte const *pc =
4572 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
4573 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4574 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4575 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4576 UnlockDisplay(dpy);
4577 SyncHandle();
4578 #endif /* USE_XCB */
4579 }
4580 return;
4581 }
4582
4583 #define X_GLsop_GetTexParameteriv 137
4584 void
4585 __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
4586 {
4587 __GLXcontext *const gc = __glXGetCurrentContext();
4588 Display *const dpy = gc->currentDpy;
4589 #ifndef USE_XCB
4590 const GLuint cmdlen = 8;
4591 #endif
4592 if (__builtin_expect(dpy != NULL, 1)) {
4593 #ifdef USE_XCB
4594 xcb_connection_t *c = XGetXCBConnection(dpy);
4595 (void) __glXFlushRenderBuffer(gc, gc->pc);
4596 xcb_glx_get_tex_parameteriv_reply_t *reply =
4597 xcb_glx_get_tex_parameteriv_reply(c,
4598 xcb_glx_get_tex_parameteriv(c,
4599 gc->
4600 currentContextTag,
4601 target,
4602 pname),
4603 NULL);
4604 if (xcb_glx_get_tex_parameteriv_data_length(reply) == 0)
4605 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4606 else
4607 (void) memcpy(params, xcb_glx_get_tex_parameteriv_data(reply),
4608 xcb_glx_get_tex_parameteriv_data_length(reply) *
4609 sizeof(GLint));
4610 free(reply);
4611 #else
4612 GLubyte const *pc =
4613 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
4614 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4615 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4616 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4617 UnlockDisplay(dpy);
4618 SyncHandle();
4619 #endif /* USE_XCB */
4620 }
4621 return;
4622 }
4623
4624 #define X_GLsop_GetTexLevelParameterfv 138
4625 void
4626 __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
4627 GLfloat * params)
4628 {
4629 __GLXcontext *const gc = __glXGetCurrentContext();
4630 Display *const dpy = gc->currentDpy;
4631 #ifndef USE_XCB
4632 const GLuint cmdlen = 12;
4633 #endif
4634 if (__builtin_expect(dpy != NULL, 1)) {
4635 #ifdef USE_XCB
4636 xcb_connection_t *c = XGetXCBConnection(dpy);
4637 (void) __glXFlushRenderBuffer(gc, gc->pc);
4638 xcb_glx_get_tex_level_parameterfv_reply_t *reply =
4639 xcb_glx_get_tex_level_parameterfv_reply(c,
4640 xcb_glx_get_tex_level_parameterfv
4641 (c, gc->currentContextTag,
4642 target, level, pname),
4643 NULL);
4644 if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 0)
4645 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4646 else
4647 (void) memcpy(params,
4648 xcb_glx_get_tex_level_parameterfv_data(reply),
4649 xcb_glx_get_tex_level_parameterfv_data_length(reply)
4650 * sizeof(GLfloat));
4651 free(reply);
4652 #else
4653 GLubyte const *pc =
4654 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv,
4655 cmdlen);
4656 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4657 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4658 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4659 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4660 UnlockDisplay(dpy);
4661 SyncHandle();
4662 #endif /* USE_XCB */
4663 }
4664 return;
4665 }
4666
4667 #define X_GLsop_GetTexLevelParameteriv 139
4668 void
4669 __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
4670 GLint * params)
4671 {
4672 __GLXcontext *const gc = __glXGetCurrentContext();
4673 Display *const dpy = gc->currentDpy;
4674 #ifndef USE_XCB
4675 const GLuint cmdlen = 12;
4676 #endif
4677 if (__builtin_expect(dpy != NULL, 1)) {
4678 #ifdef USE_XCB
4679 xcb_connection_t *c = XGetXCBConnection(dpy);
4680 (void) __glXFlushRenderBuffer(gc, gc->pc);
4681 xcb_glx_get_tex_level_parameteriv_reply_t *reply =
4682 xcb_glx_get_tex_level_parameteriv_reply(c,
4683 xcb_glx_get_tex_level_parameteriv
4684 (c, gc->currentContextTag,
4685 target, level, pname),
4686 NULL);
4687 if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 0)
4688 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4689 else
4690 (void) memcpy(params,
4691 xcb_glx_get_tex_level_parameteriv_data(reply),
4692 xcb_glx_get_tex_level_parameteriv_data_length(reply)
4693 * sizeof(GLint));
4694 free(reply);
4695 #else
4696 GLubyte const *pc =
4697 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv,
4698 cmdlen);
4699 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4700 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4701 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4702 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4703 UnlockDisplay(dpy);
4704 SyncHandle();
4705 #endif /* USE_XCB */
4706 }
4707 return;
4708 }
4709
4710 #define X_GLsop_IsList 141
4711 GLboolean
4712 __indirect_glIsList(GLuint list)
4713 {
4714 __GLXcontext *const gc = __glXGetCurrentContext();
4715 Display *const dpy = gc->currentDpy;
4716 GLboolean retval = (GLboolean) 0;
4717 #ifndef USE_XCB
4718 const GLuint cmdlen = 4;
4719 #endif
4720 if (__builtin_expect(dpy != NULL, 1)) {
4721 #ifdef USE_XCB
4722 xcb_connection_t *c = XGetXCBConnection(dpy);
4723 (void) __glXFlushRenderBuffer(gc, gc->pc);
4724 xcb_glx_is_list_reply_t *reply =
4725 xcb_glx_is_list_reply(c,
4726 xcb_glx_is_list(c, gc->currentContextTag,
4727 list), NULL);
4728 retval = reply->ret_val;
4729 free(reply);
4730 #else
4731 GLubyte const *pc =
4732 __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
4733 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
4734 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4735 UnlockDisplay(dpy);
4736 SyncHandle();
4737 #endif /* USE_XCB */
4738 }
4739 return retval;
4740 }
4741
4742 #define X_GLrop_DepthRange 174
4743 void
4744 __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
4745 {
4746 __GLXcontext *const gc = __glXGetCurrentContext();
4747 const GLuint cmdlen = 20;
4748 emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
4749 (void) memcpy((void *) (gc->pc + 4), (void *) (&zNear), 8);
4750 (void) memcpy((void *) (gc->pc + 12), (void *) (&zFar), 8);
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_Frustum 175
4758 void
4759 __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
4760 GLdouble top, GLdouble zNear, GLdouble zFar)
4761 {
4762 __GLXcontext *const gc = __glXGetCurrentContext();
4763 const GLuint cmdlen = 52;
4764 emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
4765 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4766 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4767 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4768 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4769 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4770 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4771 gc->pc += cmdlen;
4772 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4773 (void) __glXFlushRenderBuffer(gc, gc->pc);
4774 }
4775 }
4776
4777 #define X_GLrop_LoadIdentity 176
4778 void
4779 __indirect_glLoadIdentity(void)
4780 {
4781 __GLXcontext *const gc = __glXGetCurrentContext();
4782 const GLuint cmdlen = 4;
4783 emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
4784 gc->pc += cmdlen;
4785 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4786 (void) __glXFlushRenderBuffer(gc, gc->pc);
4787 }
4788 }
4789
4790 #define X_GLrop_LoadMatrixf 177
4791 void
4792 __indirect_glLoadMatrixf(const GLfloat * m)
4793 {
4794 __GLXcontext *const gc = __glXGetCurrentContext();
4795 const GLuint cmdlen = 68;
4796 emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
4797 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4798 gc->pc += cmdlen;
4799 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4800 (void) __glXFlushRenderBuffer(gc, gc->pc);
4801 }
4802 }
4803
4804 #define X_GLrop_LoadMatrixd 178
4805 void
4806 __indirect_glLoadMatrixd(const GLdouble * m)
4807 {
4808 __GLXcontext *const gc = __glXGetCurrentContext();
4809 const GLuint cmdlen = 132;
4810 emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
4811 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
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_MatrixMode 179
4819 void
4820 __indirect_glMatrixMode(GLenum mode)
4821 {
4822 __GLXcontext *const gc = __glXGetCurrentContext();
4823 const GLuint cmdlen = 8;
4824 emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
4825 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
4826 gc->pc += cmdlen;
4827 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4828 (void) __glXFlushRenderBuffer(gc, gc->pc);
4829 }
4830 }
4831
4832 #define X_GLrop_MultMatrixf 180
4833 void
4834 __indirect_glMultMatrixf(const GLfloat * m)
4835 {
4836 __GLXcontext *const gc = __glXGetCurrentContext();
4837 const GLuint cmdlen = 68;
4838 emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
4839 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4840 gc->pc += cmdlen;
4841 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4842 (void) __glXFlushRenderBuffer(gc, gc->pc);
4843 }
4844 }
4845
4846 #define X_GLrop_MultMatrixd 181
4847 void
4848 __indirect_glMultMatrixd(const GLdouble * m)
4849 {
4850 __GLXcontext *const gc = __glXGetCurrentContext();
4851 const GLuint cmdlen = 132;
4852 emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
4853 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4854 gc->pc += cmdlen;
4855 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4856 (void) __glXFlushRenderBuffer(gc, gc->pc);
4857 }
4858 }
4859
4860 #define X_GLrop_Ortho 182
4861 void
4862 __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
4863 GLdouble top, GLdouble zNear, GLdouble zFar)
4864 {
4865 __GLXcontext *const gc = __glXGetCurrentContext();
4866 const GLuint cmdlen = 52;
4867 emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
4868 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4869 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4870 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4871 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4872 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4873 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4874 gc->pc += cmdlen;
4875 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4876 (void) __glXFlushRenderBuffer(gc, gc->pc);
4877 }
4878 }
4879
4880 #define X_GLrop_PopMatrix 183
4881 void
4882 __indirect_glPopMatrix(void)
4883 {
4884 __GLXcontext *const gc = __glXGetCurrentContext();
4885 const GLuint cmdlen = 4;
4886 emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
4887 gc->pc += cmdlen;
4888 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4889 (void) __glXFlushRenderBuffer(gc, gc->pc);
4890 }
4891 }
4892
4893 #define X_GLrop_PushMatrix 184
4894 void
4895 __indirect_glPushMatrix(void)
4896 {
4897 __GLXcontext *const gc = __glXGetCurrentContext();
4898 const GLuint cmdlen = 4;
4899 emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
4900 gc->pc += cmdlen;
4901 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4902 (void) __glXFlushRenderBuffer(gc, gc->pc);
4903 }
4904 }
4905
4906 #define X_GLrop_Rotated 185
4907 void
4908 __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4909 {
4910 __GLXcontext *const gc = __glXGetCurrentContext();
4911 const GLuint cmdlen = 36;
4912 emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
4913 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 8);
4914 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
4915 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
4916 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
4917 gc->pc += cmdlen;
4918 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4919 (void) __glXFlushRenderBuffer(gc, gc->pc);
4920 }
4921 }
4922
4923 #define X_GLrop_Rotatef 186
4924 void
4925 __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
4926 {
4927 __GLXcontext *const gc = __glXGetCurrentContext();
4928 const GLuint cmdlen = 20;
4929 emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
4930 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 4);
4931 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
4932 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
4933 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
4934 gc->pc += cmdlen;
4935 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4936 (void) __glXFlushRenderBuffer(gc, gc->pc);
4937 }
4938 }
4939
4940 #define X_GLrop_Scaled 187
4941 void
4942 __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
4943 {
4944 __GLXcontext *const gc = __glXGetCurrentContext();
4945 const GLuint cmdlen = 28;
4946 emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
4947 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4948 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4949 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4950 gc->pc += cmdlen;
4951 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4952 (void) __glXFlushRenderBuffer(gc, gc->pc);
4953 }
4954 }
4955
4956 #define X_GLrop_Scalef 188
4957 void
4958 __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
4959 {
4960 __GLXcontext *const gc = __glXGetCurrentContext();
4961 const GLuint cmdlen = 16;
4962 emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
4963 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4964 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4965 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4966 gc->pc += cmdlen;
4967 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4968 (void) __glXFlushRenderBuffer(gc, gc->pc);
4969 }
4970 }
4971
4972 #define X_GLrop_Translated 189
4973 void
4974 __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
4975 {
4976 __GLXcontext *const gc = __glXGetCurrentContext();
4977 const GLuint cmdlen = 28;
4978 emit_header(gc->pc, X_GLrop_Translated, cmdlen);
4979 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4980 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4981 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4982 gc->pc += cmdlen;
4983 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4984 (void) __glXFlushRenderBuffer(gc, gc->pc);
4985 }
4986 }
4987
4988 #define X_GLrop_Translatef 190
4989 void
4990 __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
4991 {
4992 __GLXcontext *const gc = __glXGetCurrentContext();
4993 const GLuint cmdlen = 16;
4994 emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
4995 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4996 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4997 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 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_GLrop_Viewport 191
5005 void
5006 __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
5007 {
5008 __GLXcontext *const gc = __glXGetCurrentContext();
5009 const GLuint cmdlen = 20;
5010 emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
5011 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
5012 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
5013 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
5014 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
5015 gc->pc += cmdlen;
5016 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5017 (void) __glXFlushRenderBuffer(gc, gc->pc);
5018 }
5019 }
5020
5021 #define X_GLrop_BindTexture 4117
5022 void
5023 __indirect_glBindTexture(GLenum target, GLuint texture)
5024 {
5025 __GLXcontext *const gc = __glXGetCurrentContext();
5026 const GLuint cmdlen = 12;
5027 emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
5028 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5029 (void) memcpy((void *) (gc->pc + 8), (void *) (&texture), 4);
5030 gc->pc += cmdlen;
5031 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5032 (void) __glXFlushRenderBuffer(gc, gc->pc);
5033 }
5034 }
5035
5036 #define X_GLrop_Indexubv 194
5037 void
5038 __indirect_glIndexub(GLubyte c)
5039 {
5040 __GLXcontext *const gc = __glXGetCurrentContext();
5041 const GLuint cmdlen = 8;
5042 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
5043 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 1);
5044 gc->pc += cmdlen;
5045 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5046 (void) __glXFlushRenderBuffer(gc, gc->pc);
5047 }
5048 }
5049
5050 #define X_GLrop_Indexubv 194
5051 void
5052 __indirect_glIndexubv(const GLubyte *c)
5053 {
5054 __GLXcontext *const gc = __glXGetCurrentContext();
5055 const GLuint cmdlen = 8;
5056 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
5057 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 1);
5058 gc->pc += cmdlen;
5059 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5060 (void) __glXFlushRenderBuffer(gc, gc->pc);
5061 }
5062 }
5063
5064 #define X_GLrop_PolygonOffset 192
5065 void
5066 __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
5067 {
5068 __GLXcontext *const gc = __glXGetCurrentContext();
5069 const GLuint cmdlen = 12;
5070 emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
5071 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
5072 (void) memcpy((void *) (gc->pc + 8), (void *) (&units), 4);
5073 gc->pc += cmdlen;
5074 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5075 (void) __glXFlushRenderBuffer(gc, gc->pc);
5076 }
5077 }
5078
5079 #define X_GLrop_CopyTexImage1D 4119
5080 void
5081 __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
5082 GLint x, GLint y, GLsizei width, GLint border)
5083 {
5084 __GLXcontext *const gc = __glXGetCurrentContext();
5085 const GLuint cmdlen = 32;
5086 emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
5087 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5088 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5089 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5090 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5091 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5092 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5093 (void) memcpy((void *) (gc->pc + 28), (void *) (&border), 4);
5094 gc->pc += cmdlen;
5095 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5096 (void) __glXFlushRenderBuffer(gc, gc->pc);
5097 }
5098 }
5099
5100 #define X_GLrop_CopyTexImage2D 4120
5101 void
5102 __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
5103 GLint x, GLint y, GLsizei width, GLsizei height,
5104 GLint border)
5105 {
5106 __GLXcontext *const gc = __glXGetCurrentContext();
5107 const GLuint cmdlen = 36;
5108 emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
5109 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5110 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5111 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5112 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5113 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5114 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5115 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
5116 (void) memcpy((void *) (gc->pc + 32), (void *) (&border), 4);
5117 gc->pc += cmdlen;
5118 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5119 (void) __glXFlushRenderBuffer(gc, gc->pc);
5120 }
5121 }
5122
5123 #define X_GLrop_CopyTexSubImage1D 4121
5124 void
5125 __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5126 GLint x, GLint y, GLsizei width)
5127 {
5128 __GLXcontext *const gc = __glXGetCurrentContext();
5129 const GLuint cmdlen = 28;
5130 emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
5131 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5132 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5133 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5134 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5135 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5136 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5137 gc->pc += cmdlen;
5138 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5139 (void) __glXFlushRenderBuffer(gc, gc->pc);
5140 }
5141 }
5142
5143 #define X_GLrop_CopyTexSubImage2D 4122
5144 void
5145 __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5146 GLint yoffset, GLint x, GLint y, GLsizei width,
5147 GLsizei height)
5148 {
5149 __GLXcontext *const gc = __glXGetCurrentContext();
5150 const GLuint cmdlen = 36;
5151 emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
5152 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5153 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5154 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5155 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
5156 (void) memcpy((void *) (gc->pc + 20), (void *) (&x), 4);
5157 (void) memcpy((void *) (gc->pc + 24), (void *) (&y), 4);
5158 (void) memcpy((void *) (gc->pc + 28), (void *) (&width), 4);
5159 (void) memcpy((void *) (gc->pc + 32), (void *) (&height), 4);
5160 gc->pc += cmdlen;
5161 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5162 (void) __glXFlushRenderBuffer(gc, gc->pc);
5163 }
5164 }
5165
5166 #define X_GLsop_DeleteTextures 144
5167 void
5168 __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
5169 {
5170 __GLXcontext *const gc = __glXGetCurrentContext();
5171 Display *const dpy = gc->currentDpy;
5172 #ifndef USE_XCB
5173 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5174 #endif
5175 if (n < 0) {
5176 __glXSetError(gc, GL_INVALID_VALUE);
5177 return;
5178 }
5179 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5180 #ifdef USE_XCB
5181 xcb_connection_t *c = XGetXCBConnection(dpy);
5182 (void) __glXFlushRenderBuffer(gc, gc->pc);
5183 xcb_glx_delete_textures(c, gc->currentContextTag, n, textures);
5184 #else
5185 GLubyte const *pc =
5186 __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
5187 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5188 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5189 UnlockDisplay(dpy);
5190 SyncHandle();
5191 #endif /* USE_XCB */
5192 }
5193 return;
5194 }
5195
5196 #define X_GLvop_DeleteTexturesEXT 12
5197 void
5198 glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
5199 {
5200 __GLXcontext *const gc = __glXGetCurrentContext();
5201
5202 #ifdef GLX_DIRECT_RENDERING
5203 if (gc->driContext) {
5204 CALL_DeleteTextures(GET_DISPATCH(), (n, textures));
5205 } else
5206 #endif
5207 {
5208 __GLXcontext *const gc = __glXGetCurrentContext();
5209 Display *const dpy = gc->currentDpy;
5210 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5211 if (n < 0) {
5212 __glXSetError(gc, GL_INVALID_VALUE);
5213 return;
5214 }
5215 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5216 GLubyte const *pc =
5217 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
5218 X_GLvop_DeleteTexturesEXT, cmdlen);
5219 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5220 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5221 UnlockDisplay(dpy);
5222 SyncHandle();
5223 }
5224 return;
5225 }
5226 }
5227
5228 #define X_GLsop_GenTextures 145
5229 void
5230 __indirect_glGenTextures(GLsizei n, GLuint * textures)
5231 {
5232 __GLXcontext *const gc = __glXGetCurrentContext();
5233 Display *const dpy = gc->currentDpy;
5234 #ifndef USE_XCB
5235 const GLuint cmdlen = 4;
5236 #endif
5237 if (n < 0) {
5238 __glXSetError(gc, GL_INVALID_VALUE);
5239 return;
5240 }
5241 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5242 #ifdef USE_XCB
5243 xcb_connection_t *c = XGetXCBConnection(dpy);
5244 (void) __glXFlushRenderBuffer(gc, gc->pc);
5245 xcb_glx_gen_textures_reply_t *reply =
5246 xcb_glx_gen_textures_reply(c,
5247 xcb_glx_gen_textures(c,
5248 gc->
5249 currentContextTag,
5250 n), NULL);
5251 (void) memcpy(textures, xcb_glx_gen_textures_data(reply),
5252 xcb_glx_gen_textures_data_length(reply) *
5253 sizeof(GLuint));
5254 free(reply);
5255 #else
5256 GLubyte const *pc =
5257 __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
5258 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5259 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5260 UnlockDisplay(dpy);
5261 SyncHandle();
5262 #endif /* USE_XCB */
5263 }
5264 return;
5265 }
5266
5267 #define X_GLvop_GenTexturesEXT 13
5268 void
5269 glGenTexturesEXT(GLsizei n, GLuint * textures)
5270 {
5271 __GLXcontext *const gc = __glXGetCurrentContext();
5272
5273 #ifdef GLX_DIRECT_RENDERING
5274 if (gc->driContext) {
5275 CALL_GenTextures(GET_DISPATCH(), (n, textures));
5276 } else
5277 #endif
5278 {
5279 __GLXcontext *const gc = __glXGetCurrentContext();
5280 Display *const dpy = gc->currentDpy;
5281 const GLuint cmdlen = 4;
5282 if (n < 0) {
5283 __glXSetError(gc, GL_INVALID_VALUE);
5284 return;
5285 }
5286 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5287 GLubyte const *pc =
5288 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5289 X_GLvop_GenTexturesEXT, cmdlen);
5290 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5291 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5292 UnlockDisplay(dpy);
5293 SyncHandle();
5294 }
5295 return;
5296 }
5297 }
5298
5299 #define X_GLsop_IsTexture 146
5300 GLboolean
5301 __indirect_glIsTexture(GLuint texture)
5302 {
5303 __GLXcontext *const gc = __glXGetCurrentContext();
5304 Display *const dpy = gc->currentDpy;
5305 GLboolean retval = (GLboolean) 0;
5306 #ifndef USE_XCB
5307 const GLuint cmdlen = 4;
5308 #endif
5309 if (__builtin_expect(dpy != NULL, 1)) {
5310 #ifdef USE_XCB
5311 xcb_connection_t *c = XGetXCBConnection(dpy);
5312 (void) __glXFlushRenderBuffer(gc, gc->pc);
5313 xcb_glx_is_texture_reply_t *reply =
5314 xcb_glx_is_texture_reply(c,
5315 xcb_glx_is_texture(c,
5316 gc->currentContextTag,
5317 texture), NULL);
5318 retval = reply->ret_val;
5319 free(reply);
5320 #else
5321 GLubyte const *pc =
5322 __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
5323 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5324 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5325 UnlockDisplay(dpy);
5326 SyncHandle();
5327 #endif /* USE_XCB */
5328 }
5329 return retval;
5330 }
5331
5332 #define X_GLvop_IsTextureEXT 14
5333 GLboolean
5334 glIsTextureEXT(GLuint texture)
5335 {
5336 __GLXcontext *const gc = __glXGetCurrentContext();
5337
5338 #ifdef GLX_DIRECT_RENDERING
5339 if (gc->driContext) {
5340 return CALL_IsTexture(GET_DISPATCH(), (texture));
5341 } else
5342 #endif
5343 {
5344 __GLXcontext *const gc = __glXGetCurrentContext();
5345 Display *const dpy = gc->currentDpy;
5346 GLboolean retval = (GLboolean) 0;
5347 const GLuint cmdlen = 4;
5348 if (__builtin_expect(dpy != NULL, 1)) {
5349 GLubyte const *pc =
5350 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5351 X_GLvop_IsTextureEXT, cmdlen);
5352 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5353 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5354 UnlockDisplay(dpy);
5355 SyncHandle();
5356 }
5357 return retval;
5358 }
5359 }
5360
5361 #define X_GLrop_PrioritizeTextures 4118
5362 void
5363 __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures,
5364 const GLclampf * priorities)
5365 {
5366 __GLXcontext *const gc = __glXGetCurrentContext();
5367 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
5368 if (n < 0) {
5369 __glXSetError(gc, GL_INVALID_VALUE);
5370 return;
5371 }
5372 if (__builtin_expect(n >= 0, 1)) {
5373 emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
5374 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
5375 (void) memcpy((void *) (gc->pc + 8), (void *) (textures), (n * 4));
5376 (void) memcpy((void *) (gc->pc + 8 + (n * 4)), (void *) (priorities),
5377 (n * 4));
5378 gc->pc += cmdlen;
5379 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5380 (void) __glXFlushRenderBuffer(gc, gc->pc);
5381 }
5382 }
5383 }
5384
5385 static void
5386 __glx_TexSubImage_1D2D(unsigned opcode, unsigned dim, GLenum target,
5387 GLint level, GLint xoffset, GLint yoffset,
5388 GLsizei width, GLsizei height, GLenum format,
5389 GLenum type, const GLvoid * pixels)
5390 {
5391 __GLXcontext *const gc = __glXGetCurrentContext();
5392 const GLuint compsize =
5393 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
5394 target) : 0;
5395 const GLuint cmdlen = 60 + __GLX_PAD(compsize);
5396 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5397 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5398 if ((gc->pc + cmdlen) > gc->bufEnd) {
5399 (void) __glXFlushRenderBuffer(gc, gc->pc);
5400 }
5401 emit_header(gc->pc, opcode, cmdlen);
5402 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5403 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
5404 (void) memcpy((void *) (gc->pc + 32), (void *) (&xoffset), 4);
5405 (void) memcpy((void *) (gc->pc + 36), (void *) (&yoffset), 4);
5406 (void) memcpy((void *) (gc->pc + 40), (void *) (&width), 4);
5407 (void) memcpy((void *) (gc->pc + 44), (void *) (&height), 4);
5408 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
5409 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
5410 (void) memset((void *) (gc->pc + 56), 0, 4);
5411 if (compsize > 0) {
5412 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5413 pixels, gc->pc + 60, gc->pc + 4);
5414 } else {
5415 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5416 default_pixel_store_2D_size);
5417 }
5418 gc->pc += cmdlen;
5419 if (gc->pc > gc->limit) {
5420 (void) __glXFlushRenderBuffer(gc, gc->pc);
5421 }
5422 } else {
5423 const GLint op = opcode;
5424 const GLuint cmdlenLarge = cmdlen + 4;
5425 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5426 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5427 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5428 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5429 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
5430 (void) memcpy((void *) (pc + 36), (void *) (&xoffset), 4);
5431 (void) memcpy((void *) (pc + 40), (void *) (&yoffset), 4);
5432 (void) memcpy((void *) (pc + 44), (void *) (&width), 4);
5433 (void) memcpy((void *) (pc + 48), (void *) (&height), 4);
5434 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
5435 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
5436 (void) memset((void *) (pc + 60), 0, 4);
5437 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5438 type, pixels, pc + 64, pc + 8);
5439 }
5440 }
5441 }
5442
5443 #define X_GLrop_TexSubImage1D 4099
5444 void
5445 __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5446 GLsizei width, GLenum format, GLenum type,
5447 const GLvoid * pixels)
5448 {
5449 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset,
5450 1, width, 1, format, type, pixels);
5451 }
5452
5453 #define X_GLrop_TexSubImage2D 4100
5454 void
5455 __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5456 GLint yoffset, GLsizei width, GLsizei height,
5457 GLenum format, GLenum type, const GLvoid * pixels)
5458 {
5459 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset,
5460 yoffset, width, height, format, type, pixels);
5461 }
5462
5463 #define X_GLrop_BlendColor 4096
5464 void
5465 __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue,
5466 GLclampf alpha)
5467 {
5468 __GLXcontext *const gc = __glXGetCurrentContext();
5469 const GLuint cmdlen = 20;
5470 emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
5471 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
5472 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
5473 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
5474 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
5475 gc->pc += cmdlen;
5476 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5477 (void) __glXFlushRenderBuffer(gc, gc->pc);
5478 }
5479 }
5480
5481 #define X_GLrop_BlendEquation 4097
5482 void
5483 __indirect_glBlendEquation(GLenum mode)
5484 {
5485 __GLXcontext *const gc = __glXGetCurrentContext();
5486 const GLuint cmdlen = 8;
5487 emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
5488 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
5489 gc->pc += cmdlen;
5490 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5491 (void) __glXFlushRenderBuffer(gc, gc->pc);
5492 }
5493 }
5494
5495 #define X_GLrop_ColorTable 2053
5496 void
5497 __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width,
5498 GLenum format, GLenum type, const GLvoid * table)
5499 {
5500 __GLXcontext *const gc = __glXGetCurrentContext();
5501 const GLuint compsize =
5502 (table != NULL) ? __glImageSize(width, 1, 1, format, type,
5503 target) : 0;
5504 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5505 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5506 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5507 if ((gc->pc + cmdlen) > gc->bufEnd) {
5508 (void) __glXFlushRenderBuffer(gc, gc->pc);
5509 }
5510 emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
5511 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5512 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5513 4);
5514 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5515 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5516 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5517 if (compsize > 0) {
5518 (*gc->fillImage) (gc, 1, width, 1, 1, format, type, table,
5519 gc->pc + 44, gc->pc + 4);
5520 } else {
5521 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5522 default_pixel_store_1D_size);
5523 }
5524 gc->pc += cmdlen;
5525 if (gc->pc > gc->limit) {
5526 (void) __glXFlushRenderBuffer(gc, gc->pc);
5527 }
5528 } else {
5529 const GLint op = X_GLrop_ColorTable;
5530 const GLuint cmdlenLarge = cmdlen + 4;
5531 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5532 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5533 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5534 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5535 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5536 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5537 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5538 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5539 __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type,
5540 table, pc + 48, pc + 8);
5541 }
5542 }
5543 }
5544
5545 #define X_GLrop_ColorTableParameterfv 2054
5546 void
5547 __indirect_glColorTableParameterfv(GLenum target, GLenum pname,
5548 const GLfloat * params)
5549 {
5550 __GLXcontext *const gc = __glXGetCurrentContext();
5551 const GLuint compsize = __glColorTableParameterfv_size(pname);
5552 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5553 emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
5554 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5555 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5556 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5557 gc->pc += cmdlen;
5558 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5559 (void) __glXFlushRenderBuffer(gc, gc->pc);
5560 }
5561 }
5562
5563 #define X_GLrop_ColorTableParameteriv 2055
5564 void
5565 __indirect_glColorTableParameteriv(GLenum target, GLenum pname,
5566 const GLint * params)
5567 {
5568 __GLXcontext *const gc = __glXGetCurrentContext();
5569 const GLuint compsize = __glColorTableParameteriv_size(pname);
5570 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5571 emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
5572 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5573 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5574 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5575 gc->pc += cmdlen;
5576 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5577 (void) __glXFlushRenderBuffer(gc, gc->pc);
5578 }
5579 }
5580
5581 #define X_GLrop_CopyColorTable 2056
5582 void
5583 __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x,
5584 GLint y, GLsizei width)
5585 {
5586 __GLXcontext *const gc = __glXGetCurrentContext();
5587 const GLuint cmdlen = 24;
5588 emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
5589 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5590 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
5591 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5592 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5593 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5594 gc->pc += cmdlen;
5595 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5596 (void) __glXFlushRenderBuffer(gc, gc->pc);
5597 }
5598 }
5599
5600 #define X_GLsop_GetColorTable 147
5601 void
5602 __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
5603 GLvoid * table)
5604 {
5605 __GLXcontext *const gc = __glXGetCurrentContext();
5606 const __GLXattribute *const state = gc->client_state_private;
5607 Display *const dpy = gc->currentDpy;
5608 #ifndef USE_XCB
5609 const GLuint cmdlen = 16;
5610 #endif
5611 if (__builtin_expect(dpy != NULL, 1)) {
5612 #ifdef USE_XCB
5613 xcb_connection_t *c = XGetXCBConnection(dpy);
5614 (void) __glXFlushRenderBuffer(gc, gc->pc);
5615 xcb_glx_get_color_table_reply_t *reply =
5616 xcb_glx_get_color_table_reply(c,
5617 xcb_glx_get_color_table(c,
5618 gc->
5619 currentContextTag,
5620 target,
5621 format,
5622 type,
5623 state->
5624 storePack.
5625 swapEndian),
5626 NULL);
5627 (void) memcpy(table, xcb_glx_get_color_table_data(reply),
5628 xcb_glx_get_color_table_data_length(reply) *
5629 sizeof(GLvoid));
5630 free(reply);
5631 #else
5632 GLubyte const *pc =
5633 __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
5634 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5635 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5636 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5637 *(int32_t *) (pc + 12) = 0;
5638 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5639 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5640 GL_TRUE);
5641 UnlockDisplay(dpy);
5642 SyncHandle();
5643 #endif /* USE_XCB */
5644 }
5645 return;
5646 }
5647
5648 #define X_GLvop_GetColorTableSGI 4098
5649 void
5650 glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
5651 {
5652 __GLXcontext *const gc = __glXGetCurrentContext();
5653
5654 #ifdef GLX_DIRECT_RENDERING
5655 if (gc->driContext) {
5656 CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table));
5657 } else
5658 #endif
5659 {
5660 __GLXcontext *const gc = __glXGetCurrentContext();
5661 const __GLXattribute *const state = gc->client_state_private;
5662 Display *const dpy = gc->currentDpy;
5663 const GLuint cmdlen = 16;
5664 if (__builtin_expect(dpy != NULL, 1)) {
5665 GLubyte const *pc =
5666 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5667 X_GLvop_GetColorTableSGI, cmdlen);
5668 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5669 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5670 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5671 *(int32_t *) (pc + 12) = 0;
5672 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5673 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5674 GL_TRUE);
5675 UnlockDisplay(dpy);
5676 SyncHandle();
5677 }
5678 return;
5679 }
5680 }
5681
5682 #define X_GLsop_GetColorTableParameterfv 148
5683 void
5684 __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
5685 GLfloat * params)
5686 {
5687 __GLXcontext *const gc = __glXGetCurrentContext();
5688 Display *const dpy = gc->currentDpy;
5689 #ifndef USE_XCB
5690 const GLuint cmdlen = 8;
5691 #endif
5692 if (__builtin_expect(dpy != NULL, 1)) {
5693 #ifdef USE_XCB
5694 xcb_connection_t *c = XGetXCBConnection(dpy);
5695 (void) __glXFlushRenderBuffer(gc, gc->pc);
5696 xcb_glx_get_color_table_parameterfv_reply_t *reply =
5697 xcb_glx_get_color_table_parameterfv_reply(c,
5698 xcb_glx_get_color_table_parameterfv
5699 (c,
5700 gc->currentContextTag,
5701 target, pname), NULL);
5702 if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 0)
5703 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5704 else
5705 (void) memcpy(params,
5706 xcb_glx_get_color_table_parameterfv_data(reply),
5707 xcb_glx_get_color_table_parameterfv_data_length
5708 (reply) * sizeof(GLfloat));
5709 free(reply);
5710 #else
5711 GLubyte const *pc =
5712 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv,
5713 cmdlen);
5714 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5715 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5716 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5717 UnlockDisplay(dpy);
5718 SyncHandle();
5719 #endif /* USE_XCB */
5720 }
5721 return;
5722 }
5723
5724 #define X_GLvop_GetColorTableParameterfvSGI 4099
5725 void
5726 glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
5727 {
5728 __GLXcontext *const gc = __glXGetCurrentContext();
5729
5730 #ifdef GLX_DIRECT_RENDERING
5731 if (gc->driContext) {
5732 CALL_GetColorTableParameterfv(GET_DISPATCH(),
5733 (target, pname, params));
5734 } else
5735 #endif
5736 {
5737 __GLXcontext *const gc = __glXGetCurrentContext();
5738 Display *const dpy = gc->currentDpy;
5739 const GLuint cmdlen = 8;
5740 if (__builtin_expect(dpy != NULL, 1)) {
5741 GLubyte const *pc =
5742 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5743 X_GLvop_GetColorTableParameterfvSGI,
5744 cmdlen);
5745 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5746 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5747 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5748 UnlockDisplay(dpy);
5749 SyncHandle();
5750 }
5751 return;
5752 }
5753 }
5754
5755 #define X_GLsop_GetColorTableParameteriv 149
5756 void
5757 __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
5758 GLint * params)
5759 {
5760 __GLXcontext *const gc = __glXGetCurrentContext();
5761 Display *const dpy = gc->currentDpy;
5762 #ifndef USE_XCB
5763 const GLuint cmdlen = 8;
5764 #endif
5765 if (__builtin_expect(dpy != NULL, 1)) {
5766 #ifdef USE_XCB
5767 xcb_connection_t *c = XGetXCBConnection(dpy);
5768 (void) __glXFlushRenderBuffer(gc, gc->pc);
5769 xcb_glx_get_color_table_parameteriv_reply_t *reply =
5770 xcb_glx_get_color_table_parameteriv_reply(c,
5771 xcb_glx_get_color_table_parameteriv
5772 (c,
5773 gc->currentContextTag,
5774 target, pname), NULL);
5775 if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 0)
5776 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5777 else
5778 (void) memcpy(params,
5779 xcb_glx_get_color_table_parameteriv_data(reply),
5780 xcb_glx_get_color_table_parameteriv_data_length
5781 (reply) * sizeof(GLint));
5782 free(reply);
5783 #else
5784 GLubyte const *pc =
5785 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv,
5786 cmdlen);
5787 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5788 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5789 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5790 UnlockDisplay(dpy);
5791 SyncHandle();
5792 #endif /* USE_XCB */
5793 }
5794 return;
5795 }
5796
5797 #define X_GLvop_GetColorTableParameterivSGI 4100
5798 void
5799 glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
5800 {
5801 __GLXcontext *const gc = __glXGetCurrentContext();
5802
5803 #ifdef GLX_DIRECT_RENDERING
5804 if (gc->driContext) {
5805 CALL_GetColorTableParameteriv(GET_DISPATCH(),
5806 (target, pname, params));
5807 } else
5808 #endif
5809 {
5810 __GLXcontext *const gc = __glXGetCurrentContext();
5811 Display *const dpy = gc->currentDpy;
5812 const GLuint cmdlen = 8;
5813 if (__builtin_expect(dpy != NULL, 1)) {
5814 GLubyte const *pc =
5815 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5816 X_GLvop_GetColorTableParameterivSGI,
5817 cmdlen);
5818 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5819 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5820 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5821 UnlockDisplay(dpy);
5822 SyncHandle();
5823 }
5824 return;
5825 }
5826 }
5827
5828 #define X_GLrop_ColorSubTable 195
5829 void
5830 __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count,
5831 GLenum format, GLenum type, const GLvoid * data)
5832 {
5833 __GLXcontext *const gc = __glXGetCurrentContext();
5834 const GLuint compsize =
5835 (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
5836 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5837 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5838 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5839 if ((gc->pc + cmdlen) > gc->bufEnd) {
5840 (void) __glXFlushRenderBuffer(gc, gc->pc);
5841 }
5842 emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
5843 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5844 (void) memcpy((void *) (gc->pc + 28), (void *) (&start), 4);
5845 (void) memcpy((void *) (gc->pc + 32), (void *) (&count), 4);
5846 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5847 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5848 if (compsize > 0) {
5849 (*gc->fillImage) (gc, 1, count, 1, 1, format, type, data,
5850 gc->pc + 44, gc->pc + 4);
5851 } else {
5852 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5853 default_pixel_store_1D_size);
5854 }
5855 gc->pc += cmdlen;
5856 if (gc->pc > gc->limit) {
5857 (void) __glXFlushRenderBuffer(gc, gc->pc);
5858 }
5859 } else {
5860 const GLint op = X_GLrop_ColorSubTable;
5861 const GLuint cmdlenLarge = cmdlen + 4;
5862 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5863 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5864 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5865 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5866 (void) memcpy((void *) (pc + 32), (void *) (&start), 4);
5867 (void) memcpy((void *) (pc + 36), (void *) (&count), 4);
5868 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5869 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5870 __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type,
5871 data, pc + 48, pc + 8);
5872 }
5873 }
5874 }
5875
5876 #define X_GLrop_CopyColorSubTable 196
5877 void
5878 __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y,
5879 GLsizei width)
5880 {
5881 __GLXcontext *const gc = __glXGetCurrentContext();
5882 const GLuint cmdlen = 24;
5883 emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
5884 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5885 (void) memcpy((void *) (gc->pc + 8), (void *) (&start), 4);
5886 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5887 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5888 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5889 gc->pc += cmdlen;
5890 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5891 (void) __glXFlushRenderBuffer(gc, gc->pc);
5892 }
5893 }
5894
5895 static void
5896 __glx_ConvolutionFilter_1D2D(unsigned opcode, unsigned dim, GLenum target,
5897 GLenum internalformat, GLsizei width,
5898 GLsizei height, GLenum format, GLenum type,
5899 const GLvoid * image)
5900 {
5901 __GLXcontext *const gc = __glXGetCurrentContext();
5902 const GLuint compsize =
5903 (image != NULL) ? __glImageSize(width, height, 1, format, type,
5904 target) : 0;
5905 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
5906 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5907 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5908 if ((gc->pc + cmdlen) > gc->bufEnd) {
5909 (void) __glXFlushRenderBuffer(gc, gc->pc);
5910 }
5911 emit_header(gc->pc, opcode, cmdlen);
5912 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5913 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5914 4);
5915 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5916 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
5917 (void) memcpy((void *) (gc->pc + 40), (void *) (&format), 4);
5918 (void) memcpy((void *) (gc->pc + 44), (void *) (&type), 4);
5919 if (compsize > 0) {
5920 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5921 image, gc->pc + 48, gc->pc + 4);
5922 } else {
5923 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5924 default_pixel_store_2D_size);
5925 }
5926 gc->pc += cmdlen;
5927 if (gc->pc > gc->limit) {
5928 (void) __glXFlushRenderBuffer(gc, gc->pc);
5929 }
5930 } else {
5931 const GLint op = opcode;
5932 const GLuint cmdlenLarge = cmdlen + 4;
5933 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5934 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5935 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5936 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5937 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5938 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5939 (void) memcpy((void *) (pc + 40), (void *) (&height), 4);
5940 (void) memcpy((void *) (pc + 44), (void *) (&format), 4);
5941 (void) memcpy((void *) (pc + 48), (void *) (&type), 4);
5942 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5943 type, image, pc + 52, pc + 8);
5944 }
5945 }
5946 }
5947
5948 #define X_GLrop_ConvolutionFilter1D 4101
5949 void
5950 __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat,
5951 GLsizei width, GLenum format, GLenum type,
5952 const GLvoid * image)
5953 {
5954 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target,
5955 internalformat, width, 1, format, type,
5956 image);
5957 }
5958
5959 #define X_GLrop_ConvolutionFilter2D 4102
5960 void
5961 __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat,
5962 GLsizei width, GLsizei height, GLenum format,
5963 GLenum type, const GLvoid * image)
5964 {
5965 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target,
5966 internalformat, width, height, format, type,
5967 image);
5968 }
5969
5970 #define X_GLrop_ConvolutionParameterf 4103
5971 void
5972 __indirect_glConvolutionParameterf(GLenum target, GLenum pname,
5973 GLfloat params)
5974 {
5975 __GLXcontext *const gc = __glXGetCurrentContext();
5976 const GLuint cmdlen = 16;
5977 emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
5978 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5979 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5980 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
5981 gc->pc += cmdlen;
5982 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5983 (void) __glXFlushRenderBuffer(gc, gc->pc);
5984 }
5985 }
5986
5987 #define X_GLrop_ConvolutionParameterfv 4104
5988 void
5989 __indirect_glConvolutionParameterfv(GLenum target, GLenum pname,
5990 const GLfloat * params)
5991 {
5992 __GLXcontext *const gc = __glXGetCurrentContext();
5993 const GLuint compsize = __glConvolutionParameterfv_size(pname);
5994 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5995 emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
5996 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5997 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5998 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5999 gc->pc += cmdlen;
6000 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6001 (void) __glXFlushRenderBuffer(gc, gc->pc);
6002 }
6003 }
6004
6005 #define X_GLrop_ConvolutionParameteri 4105
6006 void
6007 __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
6008 {
6009 __GLXcontext *const gc = __glXGetCurrentContext();
6010 const GLuint cmdlen = 16;
6011 emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
6012 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6013 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
6014 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
6015 gc->pc += cmdlen;
6016 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6017 (void) __glXFlushRenderBuffer(gc, gc->pc);
6018 }
6019 }
6020
6021 #define X_GLrop_ConvolutionParameteriv 4106
6022 void
6023 __indirect_glConvolutionParameteriv(GLenum target, GLenum pname,
6024 const GLint * params)
6025 {
6026 __GLXcontext *const gc = __glXGetCurrentContext();
6027 const GLuint compsize = __glConvolutionParameteriv_size(pname);
6028 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
6029 emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
6030 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6031 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
6032 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
6033 gc->pc += cmdlen;
6034 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6035 (void) __glXFlushRenderBuffer(gc, gc->pc);
6036 }
6037 }
6038
6039 #define X_GLrop_CopyConvolutionFilter1D 4107
6040 void
6041 __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat,
6042 GLint x, GLint y, GLsizei width)
6043 {
6044 __GLXcontext *const gc = __glXGetCurrentContext();
6045 const GLuint cmdlen = 24;
6046 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
6047 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6048 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6049 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
6050 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
6051 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
6052 gc->pc += cmdlen;
6053 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6054 (void) __glXFlushRenderBuffer(gc, gc->pc);
6055 }
6056 }
6057
6058 #define X_GLrop_CopyConvolutionFilter2D 4108
6059 void
6060 __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat,
6061 GLint x, GLint y, GLsizei width,
6062 GLsizei height)
6063 {
6064 __GLXcontext *const gc = __glXGetCurrentContext();
6065 const GLuint cmdlen = 28;
6066 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
6067 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6068 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6069 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
6070 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
6071 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
6072 (void) memcpy((void *) (gc->pc + 24), (void *) (&height), 4);
6073 gc->pc += cmdlen;
6074 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6075 (void) __glXFlushRenderBuffer(gc, gc->pc);
6076 }
6077 }
6078
6079 #define X_GLsop_GetConvolutionFilter 150
6080 void
6081 __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type,
6082 GLvoid * image)
6083 {
6084 __GLXcontext *const gc = __glXGetCurrentContext();
6085 const __GLXattribute *const state = gc->client_state_private;
6086 Display *const dpy = gc->currentDpy;
6087 #ifndef USE_XCB
6088 const GLuint cmdlen = 16;
6089 #endif
6090 if (__builtin_expect(dpy != NULL, 1)) {
6091 #ifdef USE_XCB
6092 xcb_connection_t *c = XGetXCBConnection(dpy);
6093 (void) __glXFlushRenderBuffer(gc, gc->pc);
6094 xcb_glx_get_convolution_filter_reply_t *reply =
6095 xcb_glx_get_convolution_filter_reply(c,
6096 xcb_glx_get_convolution_filter
6097 (c, gc->currentContextTag,
6098 target, format, type,
6099 state->storePack.
6100 swapEndian), NULL);
6101 (void) memcpy(image, xcb_glx_get_convolution_filter_data(reply),
6102 xcb_glx_get_convolution_filter_data_length(reply) *
6103 sizeof(GLvoid));
6104 free(reply);
6105 #else
6106 GLubyte const *pc =
6107 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
6108 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6109 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6110 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6111 *(int32_t *) (pc + 12) = 0;
6112 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6113 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6114 GL_TRUE);
6115 UnlockDisplay(dpy);
6116 SyncHandle();
6117 #endif /* USE_XCB */
6118 }
6119 return;
6120 }
6121
6122 #define X_GLvop_GetConvolutionFilterEXT 1
6123 void
6124 gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
6125 GLvoid * image)
6126 {
6127 __GLXcontext *const gc = __glXGetCurrentContext();
6128
6129 #ifdef GLX_DIRECT_RENDERING
6130 if (gc->driContext) {
6131 CALL_GetConvolutionFilter(GET_DISPATCH(),
6132 (target, format, type, image));
6133 } else
6134 #endif
6135 {
6136 __GLXcontext *const gc = __glXGetCurrentContext();
6137 const __GLXattribute *const state = gc->client_state_private;
6138 Display *const dpy = gc->currentDpy;
6139 const GLuint cmdlen = 16;
6140 if (__builtin_expect(dpy != NULL, 1)) {
6141 GLubyte const *pc =
6142 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6143 X_GLvop_GetConvolutionFilterEXT,
6144 cmdlen);
6145 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6146 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6147 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6148 *(int32_t *) (pc + 12) = 0;
6149 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6150 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6151 GL_TRUE);
6152 UnlockDisplay(dpy);
6153 SyncHandle();
6154 }
6155 return;
6156 }
6157 }
6158
6159 #define X_GLsop_GetConvolutionParameterfv 151
6160 void
6161 __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
6162 GLfloat * params)
6163 {
6164 __GLXcontext *const gc = __glXGetCurrentContext();
6165 Display *const dpy = gc->currentDpy;
6166 #ifndef USE_XCB
6167 const GLuint cmdlen = 8;
6168 #endif
6169 if (__builtin_expect(dpy != NULL, 1)) {
6170 #ifdef USE_XCB
6171 xcb_connection_t *c = XGetXCBConnection(dpy);
6172 (void) __glXFlushRenderBuffer(gc, gc->pc);
6173 xcb_glx_get_convolution_parameterfv_reply_t *reply =
6174 xcb_glx_get_convolution_parameterfv_reply(c,
6175 xcb_glx_get_convolution_parameterfv
6176 (c,
6177 gc->currentContextTag,
6178 target, pname), NULL);
6179 if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 0)
6180 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6181 else
6182 (void) memcpy(params,
6183 xcb_glx_get_convolution_parameterfv_data(reply),
6184 xcb_glx_get_convolution_parameterfv_data_length
6185 (reply) * sizeof(GLfloat));
6186 free(reply);
6187 #else
6188 GLubyte const *pc =
6189 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv,
6190 cmdlen);
6191 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6192 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6193 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6194 UnlockDisplay(dpy);
6195 SyncHandle();
6196 #endif /* USE_XCB */
6197 }
6198 return;
6199 }
6200
6201 #define X_GLvop_GetConvolutionParameterfvEXT 2
6202 void
6203 gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
6204 {
6205 __GLXcontext *const gc = __glXGetCurrentContext();
6206
6207 #ifdef GLX_DIRECT_RENDERING
6208 if (gc->driContext) {
6209 CALL_GetConvolutionParameterfv(GET_DISPATCH(),
6210 (target, pname, params));
6211 } else
6212 #endif
6213 {
6214 __GLXcontext *const gc = __glXGetCurrentContext();
6215 Display *const dpy = gc->currentDpy;
6216 const GLuint cmdlen = 8;
6217 if (__builtin_expect(dpy != NULL, 1)) {
6218 GLubyte const *pc =
6219 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6220 X_GLvop_GetConvolutionParameterfvEXT,
6221 cmdlen);
6222 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6223 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6224 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6225 UnlockDisplay(dpy);
6226 SyncHandle();
6227 }
6228 return;
6229 }
6230 }
6231
6232 #define X_GLsop_GetConvolutionParameteriv 152
6233 void
6234 __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
6235 GLint * params)
6236 {
6237 __GLXcontext *const gc = __glXGetCurrentContext();
6238 Display *const dpy = gc->currentDpy;
6239 #ifndef USE_XCB
6240 const GLuint cmdlen = 8;
6241 #endif
6242 if (__builtin_expect(dpy != NULL, 1)) {
6243 #ifdef USE_XCB
6244 xcb_connection_t *c = XGetXCBConnection(dpy);
6245 (void) __glXFlushRenderBuffer(gc, gc->pc);
6246 xcb_glx_get_convolution_parameteriv_reply_t *reply =
6247 xcb_glx_get_convolution_parameteriv_reply(c,
6248 xcb_glx_get_convolution_parameteriv
6249 (c,
6250 gc->currentContextTag,
6251 target, pname), NULL);
6252 if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 0)
6253 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6254 else
6255 (void) memcpy(params,
6256 xcb_glx_get_convolution_parameteriv_data(reply),
6257 xcb_glx_get_convolution_parameteriv_data_length
6258 (reply) * sizeof(GLint));
6259 free(reply);
6260 #else
6261 GLubyte const *pc =
6262 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv,
6263 cmdlen);
6264 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6265 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6266 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6267 UnlockDisplay(dpy);
6268 SyncHandle();
6269 #endif /* USE_XCB */
6270 }
6271 return;
6272 }
6273
6274 #define X_GLvop_GetConvolutionParameterivEXT 3
6275 void
6276 gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
6277 {
6278 __GLXcontext *const gc = __glXGetCurrentContext();
6279
6280 #ifdef GLX_DIRECT_RENDERING
6281 if (gc->driContext) {
6282 CALL_GetConvolutionParameteriv(GET_DISPATCH(),
6283 (target, pname, params));
6284 } else
6285 #endif
6286 {
6287 __GLXcontext *const gc = __glXGetCurrentContext();
6288 Display *const dpy = gc->currentDpy;
6289 const GLuint cmdlen = 8;
6290 if (__builtin_expect(dpy != NULL, 1)) {
6291 GLubyte const *pc =
6292 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6293 X_GLvop_GetConvolutionParameterivEXT,
6294 cmdlen);
6295 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6296 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6297 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6298 UnlockDisplay(dpy);
6299 SyncHandle();
6300 }
6301 return;
6302 }
6303 }
6304
6305 #define X_GLsop_GetHistogram 154
6306 void
6307 __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
6308 GLenum type, GLvoid * values)
6309 {
6310 __GLXcontext *const gc = __glXGetCurrentContext();
6311 const __GLXattribute *const state = gc->client_state_private;
6312 Display *const dpy = gc->currentDpy;
6313 #ifndef USE_XCB
6314 const GLuint cmdlen = 16;
6315 #endif
6316 if (__builtin_expect(dpy != NULL, 1)) {
6317 #ifdef USE_XCB
6318 xcb_connection_t *c = XGetXCBConnection(dpy);
6319 (void) __glXFlushRenderBuffer(gc, gc->pc);
6320 xcb_glx_get_histogram_reply_t *reply =
6321 xcb_glx_get_histogram_reply(c,
6322 xcb_glx_get_histogram(c,
6323 gc->
6324 currentContextTag,
6325 target, reset,
6326 format, type,
6327 state->
6328 storePack.
6329 swapEndian),
6330 NULL);
6331 (void) memcpy(values, xcb_glx_get_histogram_data(reply),
6332 xcb_glx_get_histogram_data_length(reply) *
6333 sizeof(GLvoid));
6334 free(reply);
6335 #else
6336 GLubyte const *pc =
6337 __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
6338 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6339 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6340 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6341 *(int32_t *) (pc + 12) = 0;
6342 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6343 *(int8_t *) (pc + 13) = reset;
6344 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6345 GL_TRUE);
6346 UnlockDisplay(dpy);
6347 SyncHandle();
6348 #endif /* USE_XCB */
6349 }
6350 return;
6351 }
6352
6353 #define X_GLvop_GetHistogramEXT 5
6354 void
6355 gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
6356 GLenum type, GLvoid * values)
6357 {
6358 __GLXcontext *const gc = __glXGetCurrentContext();
6359
6360 #ifdef GLX_DIRECT_RENDERING
6361 if (gc->driContext) {
6362 CALL_GetHistogram(GET_DISPATCH(),
6363 (target, reset, format, type, values));
6364 } else
6365 #endif
6366 {
6367 __GLXcontext *const gc = __glXGetCurrentContext();
6368 const __GLXattribute *const state = gc->client_state_private;
6369 Display *const dpy = gc->currentDpy;
6370 const GLuint cmdlen = 16;
6371 if (__builtin_expect(dpy != NULL, 1)) {
6372 GLubyte const *pc =
6373 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6374 X_GLvop_GetHistogramEXT, cmdlen);
6375 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6376 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6377 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6378 *(int32_t *) (pc + 12) = 0;
6379 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6380 *(int8_t *) (pc + 13) = reset;
6381 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6382 GL_TRUE);
6383 UnlockDisplay(dpy);
6384 SyncHandle();
6385 }
6386 return;
6387 }
6388 }
6389
6390 #define X_GLsop_GetHistogramParameterfv 155
6391 void
6392 __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
6393 GLfloat * params)
6394 {
6395 __GLXcontext *const gc = __glXGetCurrentContext();
6396 Display *const dpy = gc->currentDpy;
6397 #ifndef USE_XCB
6398 const GLuint cmdlen = 8;
6399 #endif
6400 if (__builtin_expect(dpy != NULL, 1)) {
6401 #ifdef USE_XCB
6402 xcb_connection_t *c = XGetXCBConnection(dpy);
6403 (void) __glXFlushRenderBuffer(gc, gc->pc);
6404 xcb_glx_get_histogram_parameterfv_reply_t *reply =
6405 xcb_glx_get_histogram_parameterfv_reply(c,
6406 xcb_glx_get_histogram_parameterfv
6407 (c, gc->currentContextTag,
6408 target, pname), NULL);
6409 if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 0)
6410 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6411 else
6412 (void) memcpy(params,
6413 xcb_glx_get_histogram_parameterfv_data(reply),
6414 xcb_glx_get_histogram_parameterfv_data_length(reply)
6415 * sizeof(GLfloat));
6416 free(reply);
6417 #else
6418 GLubyte const *pc =
6419 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv,
6420 cmdlen);
6421 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6422 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6423 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6424 UnlockDisplay(dpy);
6425 SyncHandle();
6426 #endif /* USE_XCB */
6427 }
6428 return;
6429 }
6430
6431 #define X_GLvop_GetHistogramParameterfvEXT 6
6432 void
6433 gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
6434 {
6435 __GLXcontext *const gc = __glXGetCurrentContext();
6436
6437 #ifdef GLX_DIRECT_RENDERING
6438 if (gc->driContext) {
6439 CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params));
6440 } else
6441 #endif
6442 {
6443 __GLXcontext *const gc = __glXGetCurrentContext();
6444 Display *const dpy = gc->currentDpy;
6445 const GLuint cmdlen = 8;
6446 if (__builtin_expect(dpy != NULL, 1)) {
6447 GLubyte const *pc =
6448 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6449 X_GLvop_GetHistogramParameterfvEXT,
6450 cmdlen);
6451 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6452 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6453 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6454 UnlockDisplay(dpy);
6455 SyncHandle();
6456 }
6457 return;
6458 }
6459 }
6460
6461 #define X_GLsop_GetHistogramParameteriv 156
6462 void
6463 __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
6464 GLint * params)
6465 {
6466 __GLXcontext *const gc = __glXGetCurrentContext();
6467 Display *const dpy = gc->currentDpy;
6468 #ifndef USE_XCB
6469 const GLuint cmdlen = 8;
6470 #endif
6471 if (__builtin_expect(dpy != NULL, 1)) {
6472 #ifdef USE_XCB
6473 xcb_connection_t *c = XGetXCBConnection(dpy);
6474 (void) __glXFlushRenderBuffer(gc, gc->pc);
6475 xcb_glx_get_histogram_parameteriv_reply_t *reply =
6476 xcb_glx_get_histogram_parameteriv_reply(c,
6477 xcb_glx_get_histogram_parameteriv
6478 (c, gc->currentContextTag,
6479 target, pname), NULL);
6480 if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 0)
6481 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6482 else
6483 (void) memcpy(params,
6484 xcb_glx_get_histogram_parameteriv_data(reply),
6485 xcb_glx_get_histogram_parameteriv_data_length(reply)
6486 * sizeof(GLint));
6487 free(reply);
6488 #else
6489 GLubyte const *pc =
6490 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv,
6491 cmdlen);
6492 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6493 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6494 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6495 UnlockDisplay(dpy);
6496 SyncHandle();
6497 #endif /* USE_XCB */
6498 }
6499 return;
6500 }
6501
6502 #define X_GLvop_GetHistogramParameterivEXT 7
6503 void
6504 gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
6505 {
6506 __GLXcontext *const gc = __glXGetCurrentContext();
6507
6508 #ifdef GLX_DIRECT_RENDERING
6509 if (gc->driContext) {
6510 CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params));
6511 } else
6512 #endif
6513 {
6514 __GLXcontext *const gc = __glXGetCurrentContext();
6515 Display *const dpy = gc->currentDpy;
6516 const GLuint cmdlen = 8;
6517 if (__builtin_expect(dpy != NULL, 1)) {
6518 GLubyte const *pc =
6519 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6520 X_GLvop_GetHistogramParameterivEXT,
6521 cmdlen);
6522 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6523 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6524 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6525 UnlockDisplay(dpy);
6526 SyncHandle();
6527 }
6528 return;
6529 }
6530 }
6531
6532 #define X_GLsop_GetMinmax 157
6533 void
6534 __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
6535 GLenum type, GLvoid * values)
6536 {
6537 __GLXcontext *const gc = __glXGetCurrentContext();
6538 const __GLXattribute *const state = gc->client_state_private;
6539 Display *const dpy = gc->currentDpy;
6540 #ifndef USE_XCB
6541 const GLuint cmdlen = 16;
6542 #endif
6543 if (__builtin_expect(dpy != NULL, 1)) {
6544 #ifdef USE_XCB
6545 xcb_connection_t *c = XGetXCBConnection(dpy);
6546 (void) __glXFlushRenderBuffer(gc, gc->pc);
6547 xcb_glx_get_minmax_reply_t *reply =
6548 xcb_glx_get_minmax_reply(c,
6549 xcb_glx_get_minmax(c,
6550 gc->currentContextTag,
6551 target, reset, format,
6552 type,
6553 state->storePack.
6554 swapEndian), NULL);
6555 (void) memcpy(values, xcb_glx_get_minmax_data(reply),
6556 xcb_glx_get_minmax_data_length(reply) * sizeof(GLvoid));
6557 free(reply);
6558 #else
6559 GLubyte const *pc =
6560 __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
6561 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6562 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6563 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6564 *(int32_t *) (pc + 12) = 0;
6565 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6566 *(int8_t *) (pc + 13) = reset;
6567 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6568 GL_FALSE);
6569 UnlockDisplay(dpy);
6570 SyncHandle();
6571 #endif /* USE_XCB */
6572 }
6573 return;
6574 }
6575
6576 #define X_GLvop_GetMinmaxEXT 8
6577 void
6578 gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
6579 GLenum type, GLvoid * values)
6580 {
6581 __GLXcontext *const gc = __glXGetCurrentContext();
6582
6583 #ifdef GLX_DIRECT_RENDERING
6584 if (gc->driContext) {
6585 CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values));
6586 } else
6587 #endif
6588 {
6589 __GLXcontext *const gc = __glXGetCurrentContext();
6590 const __GLXattribute *const state = gc->client_state_private;
6591 Display *const dpy = gc->currentDpy;
6592 const GLuint cmdlen = 16;
6593 if (__builtin_expect(dpy != NULL, 1)) {
6594 GLubyte const *pc =
6595 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6596 X_GLvop_GetMinmaxEXT, cmdlen);
6597 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6598 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6599 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6600 *(int32_t *) (pc + 12) = 0;
6601 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6602 *(int8_t *) (pc + 13) = reset;
6603 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6604 GL_FALSE);
6605 UnlockDisplay(dpy);
6606 SyncHandle();
6607 }
6608 return;
6609 }
6610 }
6611
6612 #define X_GLsop_GetMinmaxParameterfv 158
6613 void
6614 __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
6615 GLfloat * params)
6616 {
6617 __GLXcontext *const gc = __glXGetCurrentContext();
6618 Display *const dpy = gc->currentDpy;
6619 #ifndef USE_XCB
6620 const GLuint cmdlen = 8;
6621 #endif
6622 if (__builtin_expect(dpy != NULL, 1)) {
6623 #ifdef USE_XCB
6624 xcb_connection_t *c = XGetXCBConnection(dpy);
6625 (void) __glXFlushRenderBuffer(gc, gc->pc);
6626 xcb_glx_get_minmax_parameterfv_reply_t *reply =
6627 xcb_glx_get_minmax_parameterfv_reply(c,
6628 xcb_glx_get_minmax_parameterfv
6629 (c, gc->currentContextTag,
6630 target, pname), NULL);
6631 if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 0)
6632 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6633 else
6634 (void) memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply),
6635 xcb_glx_get_minmax_parameterfv_data_length(reply) *
6636 sizeof(GLfloat));
6637 free(reply);
6638 #else
6639 GLubyte const *pc =
6640 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
6641 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6642 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6643 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6644 UnlockDisplay(dpy);
6645 SyncHandle();
6646 #endif /* USE_XCB */
6647 }
6648 return;
6649 }
6650
6651 #define X_GLvop_GetMinmaxParameterfvEXT 9
6652 void
6653 gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
6654 {
6655 __GLXcontext *const gc = __glXGetCurrentContext();
6656
6657 #ifdef GLX_DIRECT_RENDERING
6658 if (gc->driContext) {
6659 CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params));
6660 } else
6661 #endif
6662 {
6663 __GLXcontext *const gc = __glXGetCurrentContext();
6664 Display *const dpy = gc->currentDpy;
6665 const GLuint cmdlen = 8;
6666 if (__builtin_expect(dpy != NULL, 1)) {
6667 GLubyte const *pc =
6668 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6669 X_GLvop_GetMinmaxParameterfvEXT,
6670 cmdlen);
6671 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6672 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6673 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6674 UnlockDisplay(dpy);
6675 SyncHandle();
6676 }
6677 return;
6678 }
6679 }
6680
6681 #define X_GLsop_GetMinmaxParameteriv 159
6682 void
6683 __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
6684 {
6685 __GLXcontext *const gc = __glXGetCurrentContext();
6686 Display *const dpy = gc->currentDpy;
6687 #ifndef USE_XCB
6688 const GLuint cmdlen = 8;
6689 #endif
6690 if (__builtin_expect(dpy != NULL, 1)) {
6691 #ifdef USE_XCB
6692 xcb_connection_t *c = XGetXCBConnection(dpy);
6693 (void) __glXFlushRenderBuffer(gc, gc->pc);
6694 xcb_glx_get_minmax_parameteriv_reply_t *reply =
6695 xcb_glx_get_minmax_parameteriv_reply(c,
6696 xcb_glx_get_minmax_parameteriv
6697 (c, gc->currentContextTag,
6698 target, pname), NULL);
6699 if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 0)
6700 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6701 else
6702 (void) memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply),
6703 xcb_glx_get_minmax_parameteriv_data_length(reply) *
6704 sizeof(GLint));
6705 free(reply);
6706 #else
6707 GLubyte const *pc =
6708 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
6709 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6710 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6711 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6712 UnlockDisplay(dpy);
6713 SyncHandle();
6714 #endif /* USE_XCB */
6715 }
6716 return;
6717 }
6718
6719 #define X_GLvop_GetMinmaxParameterivEXT 10
6720 void
6721 gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
6722 {
6723 __GLXcontext *const gc = __glXGetCurrentContext();
6724
6725 #ifdef GLX_DIRECT_RENDERING
6726 if (gc->driContext) {
6727 CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params));
6728 } else
6729 #endif
6730 {
6731 __GLXcontext *const gc = __glXGetCurrentContext();
6732 Display *const dpy = gc->currentDpy;
6733 const GLuint cmdlen = 8;
6734 if (__builtin_expect(dpy != NULL, 1)) {
6735 GLubyte const *pc =
6736 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6737 X_GLvop_GetMinmaxParameterivEXT,
6738 cmdlen);
6739 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6740 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6741 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6742 UnlockDisplay(dpy);
6743 SyncHandle();
6744 }
6745 return;
6746 }
6747 }
6748
6749 #define X_GLrop_Histogram 4110
6750 void
6751 __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
6752 GLboolean sink)
6753 {
6754 __GLXcontext *const gc = __glXGetCurrentContext();
6755 const GLuint cmdlen = 20;
6756 emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
6757 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6758 (void) memcpy((void *) (gc->pc + 8), (void *) (&width), 4);
6759 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
6760 (void) memcpy((void *) (gc->pc + 16), (void *) (&sink), 1);
6761 gc->pc += cmdlen;
6762 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6763 (void) __glXFlushRenderBuffer(gc, gc->pc);
6764 }
6765 }
6766
6767 #define X_GLrop_Minmax 4111
6768 void
6769 __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
6770 {
6771 __GLXcontext *const gc = __glXGetCurrentContext();
6772 const GLuint cmdlen = 16;
6773 emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
6774 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6775 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6776 (void) memcpy((void *) (gc->pc + 12), (void *) (&sink), 1);
6777 gc->pc += cmdlen;
6778 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6779 (void) __glXFlushRenderBuffer(gc, gc->pc);
6780 }
6781 }
6782
6783 #define X_GLrop_ResetHistogram 4112
6784 void
6785 __indirect_glResetHistogram(GLenum target)
6786 {
6787 __GLXcontext *const gc = __glXGetCurrentContext();
6788 const GLuint cmdlen = 8;
6789 emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
6790 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6791 gc->pc += cmdlen;
6792 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6793 (void) __glXFlushRenderBuffer(gc, gc->pc);
6794 }
6795 }
6796
6797 #define X_GLrop_ResetMinmax 4113
6798 void
6799 __indirect_glResetMinmax(GLenum target)
6800 {
6801 __GLXcontext *const gc = __glXGetCurrentContext();
6802 const GLuint cmdlen = 8;
6803 emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
6804 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6805 gc->pc += cmdlen;
6806 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6807 (void) __glXFlushRenderBuffer(gc, gc->pc);
6808 }
6809 }
6810
6811 static void
6812 __glx_TexImage_3D4D(unsigned opcode, unsigned dim, GLenum target, GLint level,
6813 GLint internalformat, GLsizei width, GLsizei height,
6814 GLsizei depth, GLsizei extent, GLint border,
6815 GLenum format, GLenum type, const GLvoid * pixels)
6816 {
6817 __GLXcontext *const gc = __glXGetCurrentContext();
6818 const GLuint compsize =
6819 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6820 target) : 0;
6821 const GLuint cmdlen = 84 + __GLX_PAD(compsize);
6822 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6823 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6824 if ((gc->pc + cmdlen) > gc->bufEnd) {
6825 (void) __glXFlushRenderBuffer(gc, gc->pc);
6826 }
6827 emit_header(gc->pc, opcode, cmdlen);
6828 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6829 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6830 (void) memcpy((void *) (gc->pc + 48), (void *) (&internalformat),
6831 4);
6832 (void) memcpy((void *) (gc->pc + 52), (void *) (&width), 4);
6833 (void) memcpy((void *) (gc->pc + 56), (void *) (&height), 4);
6834 (void) memcpy((void *) (gc->pc + 60), (void *) (&depth), 4);
6835 (void) memcpy((void *) (gc->pc + 64), (void *) (&extent), 4);
6836 (void) memcpy((void *) (gc->pc + 68), (void *) (&border), 4);
6837 (void) memcpy((void *) (gc->pc + 72), (void *) (&format), 4);
6838 (void) memcpy((void *) (gc->pc + 76), (void *) (&type), 4);
6839 (void) memcpy((void *) (gc->pc + 80),
6840 (void *) ((pixels == NULL) ? one : zero), 4);
6841 if (compsize > 0) {
6842 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6843 pixels, gc->pc + 84, gc->pc + 4);
6844 } else {
6845 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6846 default_pixel_store_4D_size);
6847 }
6848 gc->pc += cmdlen;
6849 if (gc->pc > gc->limit) {
6850 (void) __glXFlushRenderBuffer(gc, gc->pc);
6851 }
6852 } else {
6853 const GLint op = opcode;
6854 const GLuint cmdlenLarge = cmdlen + 4;
6855 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6856 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6857 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6858 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6859 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6860 (void) memcpy((void *) (pc + 52), (void *) (&internalformat), 4);
6861 (void) memcpy((void *) (pc + 56), (void *) (&width), 4);
6862 (void) memcpy((void *) (pc + 60), (void *) (&height), 4);
6863 (void) memcpy((void *) (pc + 64), (void *) (&depth), 4);
6864 (void) memcpy((void *) (pc + 68), (void *) (&extent), 4);
6865 (void) memcpy((void *) (pc + 72), (void *) (&border), 4);
6866 (void) memcpy((void *) (pc + 76), (void *) (&format), 4);
6867 (void) memcpy((void *) (pc + 80), (void *) (&type), 4);
6868 (void) memcpy((void *) (pc + 84), zero, 4);
6869 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6870 format, type, pixels, pc + 88, pc + 8);
6871 }
6872 }
6873 }
6874
6875 #define X_GLrop_TexImage3D 4114
6876 void
6877 __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat,
6878 GLsizei width, GLsizei height, GLsizei depth,
6879 GLint border, GLenum format, GLenum type,
6880 const GLvoid * pixels)
6881 {
6882 __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat,
6883 width, height, depth, 1, border, format, type,
6884 pixels);
6885 }
6886
6887 static void
6888 __glx_TexSubImage_3D4D(unsigned opcode, unsigned dim, GLenum target,
6889 GLint level, GLint xoffset, GLint yoffset,
6890 GLint zoffset, GLint woffset, GLsizei width,
6891 GLsizei height, GLsizei depth, GLsizei extent,
6892 GLenum format, GLenum type, const GLvoid * pixels)
6893 {
6894 __GLXcontext *const gc = __glXGetCurrentContext();
6895 const GLuint compsize =
6896 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6897 target) : 0;
6898 const GLuint cmdlen = 92 + __GLX_PAD(compsize);
6899 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6900 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6901 if ((gc->pc + cmdlen) > gc->bufEnd) {
6902 (void) __glXFlushRenderBuffer(gc, gc->pc);
6903 }
6904 emit_header(gc->pc, opcode, cmdlen);
6905 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6906 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6907 (void) memcpy((void *) (gc->pc + 48), (void *) (&xoffset), 4);
6908 (void) memcpy((void *) (gc->pc + 52), (void *) (&yoffset), 4);
6909 (void) memcpy((void *) (gc->pc + 56), (void *) (&zoffset), 4);
6910 (void) memcpy((void *) (gc->pc + 60), (void *) (&woffset), 4);
6911 (void) memcpy((void *) (gc->pc + 64), (void *) (&width), 4);
6912 (void) memcpy((void *) (gc->pc + 68), (void *) (&height), 4);
6913 (void) memcpy((void *) (gc->pc + 72), (void *) (&depth), 4);
6914 (void) memcpy((void *) (gc->pc + 76), (void *) (&extent), 4);
6915 (void) memcpy((void *) (gc->pc + 80), (void *) (&format), 4);
6916 (void) memcpy((void *) (gc->pc + 84), (void *) (&type), 4);
6917 (void) memset((void *) (gc->pc + 88), 0, 4);
6918 if (compsize > 0) {
6919 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6920 pixels, gc->pc + 92, gc->pc + 4);
6921 } else {
6922 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6923 default_pixel_store_4D_size);
6924 }
6925 gc->pc += cmdlen;
6926 if (gc->pc > gc->limit) {
6927 (void) __glXFlushRenderBuffer(gc, gc->pc);
6928 }
6929 } else {
6930 const GLint op = opcode;
6931 const GLuint cmdlenLarge = cmdlen + 4;
6932 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6933 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6934 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6935 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6936 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6937 (void) memcpy((void *) (pc + 52), (void *) (&xoffset), 4);
6938 (void) memcpy((void *) (pc + 56), (void *) (&yoffset), 4);
6939 (void) memcpy((void *) (pc + 60), (void *) (&zoffset), 4);
6940 (void) memcpy((void *) (pc + 64), (void *) (&woffset), 4);
6941 (void) memcpy((void *) (pc + 68), (void *) (&width), 4);
6942 (void) memcpy((void *) (pc + 72), (void *) (&height), 4);
6943 (void) memcpy((void *) (pc + 76), (void *) (&depth), 4);
6944 (void) memcpy((void *) (pc + 80), (void *) (&extent), 4);
6945 (void) memcpy((void *) (pc + 84), (void *) (&format), 4);
6946 (void) memcpy((void *) (pc + 88), (void *) (&type), 4);
6947 (void) memset((void *) (pc + 92), 0, 4);
6948 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6949 format, type, pixels, pc + 96, pc + 8);
6950 }
6951 }
6952 }
6953
6954 #define X_GLrop_TexSubImage3D 4115
6955 void
6956 __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6957 GLint yoffset, GLint zoffset, GLsizei width,
6958 GLsizei height, GLsizei depth, GLenum format,
6959 GLenum type, const GLvoid * pixels)
6960 {
6961 __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset,
6962 yoffset, zoffset, 1, width, height, depth, 1,
6963 format, type, pixels);
6964 }
6965
6966 #define X_GLrop_CopyTexSubImage3D 4123
6967 void
6968 __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6969 GLint yoffset, GLint zoffset, GLint x, GLint y,
6970 GLsizei width, GLsizei height)
6971 {
6972 __GLXcontext *const gc = __glXGetCurrentContext();
6973 const GLuint cmdlen = 40;
6974 emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
6975 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6976 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
6977 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
6978 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
6979 (void) memcpy((void *) (gc->pc + 20), (void *) (&zoffset), 4);
6980 (void) memcpy((void *) (gc->pc + 24), (void *) (&x), 4);
6981 (void) memcpy((void *) (gc->pc + 28), (void *) (&y), 4);
6982 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
6983 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
6984 gc->pc += cmdlen;
6985 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6986 (void) __glXFlushRenderBuffer(gc, gc->pc);
6987 }
6988 }
6989
6990 #define X_GLrop_ActiveTextureARB 197
6991 void
6992 __indirect_glActiveTextureARB(GLenum texture)
6993 {
6994 __GLXcontext *const gc = __glXGetCurrentContext();
6995 const GLuint cmdlen = 8;
6996 emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
6997 (void) memcpy((void *) (gc->pc + 4), (void *) (&texture), 4);
6998 gc->pc += cmdlen;
6999 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7000 (void) __glXFlushRenderBuffer(gc, gc->pc);
7001 }
7002 }
7003
7004 #define X_GLrop_MultiTexCoord1dvARB 198
7005 void
7006 __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
7007 {
7008 __GLXcontext *const gc = __glXGetCurrentContext();
7009 const GLuint cmdlen = 16;
7010 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
7011 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7012 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
7013 gc->pc += cmdlen;
7014 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7015 (void) __glXFlushRenderBuffer(gc, gc->pc);
7016 }
7017 }
7018
7019 #define X_GLrop_MultiTexCoord1dvARB 198
7020 void
7021 __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
7022 {
7023 __GLXcontext *const gc = __glXGetCurrentContext();
7024 const GLuint cmdlen = 16;
7025 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
7026 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 8);
7027 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
7028 gc->pc += cmdlen;
7029 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7030 (void) __glXFlushRenderBuffer(gc, gc->pc);
7031 }
7032 }
7033
7034 #define X_GLrop_MultiTexCoord1fvARB 199
7035 void
7036 __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
7037 {
7038 __GLXcontext *const gc = __glXGetCurrentContext();
7039 const GLuint cmdlen = 12;
7040 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
7041 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7042 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7043 gc->pc += cmdlen;
7044 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7045 (void) __glXFlushRenderBuffer(gc, gc->pc);
7046 }
7047 }
7048
7049 #define X_GLrop_MultiTexCoord1fvARB 199
7050 void
7051 __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
7052 {
7053 __GLXcontext *const gc = __glXGetCurrentContext();
7054 const GLuint cmdlen = 12;
7055 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
7056 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7057 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7058 gc->pc += cmdlen;
7059 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7060 (void) __glXFlushRenderBuffer(gc, gc->pc);
7061 }
7062 }
7063
7064 #define X_GLrop_MultiTexCoord1ivARB 200
7065 void
7066 __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
7067 {
7068 __GLXcontext *const gc = __glXGetCurrentContext();
7069 const GLuint cmdlen = 12;
7070 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
7071 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7072 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
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_MultiTexCoord1ivARB 200
7080 void
7081 __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
7082 {
7083 __GLXcontext *const gc = __glXGetCurrentContext();
7084 const GLuint cmdlen = 12;
7085 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
7086 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7087 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7088 gc->pc += cmdlen;
7089 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7090 (void) __glXFlushRenderBuffer(gc, gc->pc);
7091 }
7092 }
7093
7094 #define X_GLrop_MultiTexCoord1svARB 201
7095 void
7096 __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
7097 {
7098 __GLXcontext *const gc = __glXGetCurrentContext();
7099 const GLuint cmdlen = 12;
7100 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7101 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7102 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7103 gc->pc += cmdlen;
7104 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7105 (void) __glXFlushRenderBuffer(gc, gc->pc);
7106 }
7107 }
7108
7109 #define X_GLrop_MultiTexCoord1svARB 201
7110 void
7111 __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
7112 {
7113 __GLXcontext *const gc = __glXGetCurrentContext();
7114 const GLuint cmdlen = 12;
7115 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7116 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7117 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7118 gc->pc += cmdlen;
7119 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7120 (void) __glXFlushRenderBuffer(gc, gc->pc);
7121 }
7122 }
7123
7124 #define X_GLrop_MultiTexCoord2dvARB 202
7125 void
7126 __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
7127 {
7128 __GLXcontext *const gc = __glXGetCurrentContext();
7129 const GLuint cmdlen = 24;
7130 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7131 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7132 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7133 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
7134 gc->pc += cmdlen;
7135 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7136 (void) __glXFlushRenderBuffer(gc, gc->pc);
7137 }
7138 }
7139
7140 #define X_GLrop_MultiTexCoord2dvARB 202
7141 void
7142 __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
7143 {
7144 __GLXcontext *const gc = __glXGetCurrentContext();
7145 const GLuint cmdlen = 24;
7146 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7147 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 16);
7148 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
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_MultiTexCoord2fvARB 203
7156 void
7157 __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
7158 {
7159 __GLXcontext *const gc = __glXGetCurrentContext();
7160 const GLuint cmdlen = 16;
7161 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7162 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7163 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7164 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7165 gc->pc += cmdlen;
7166 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7167 (void) __glXFlushRenderBuffer(gc, gc->pc);
7168 }
7169 }
7170
7171 #define X_GLrop_MultiTexCoord2fvARB 203
7172 void
7173 __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
7174 {
7175 __GLXcontext *const gc = __glXGetCurrentContext();
7176 const GLuint cmdlen = 16;
7177 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7178 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7179 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7180 gc->pc += cmdlen;
7181 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7182 (void) __glXFlushRenderBuffer(gc, gc->pc);
7183 }
7184 }
7185
7186 #define X_GLrop_MultiTexCoord2ivARB 204
7187 void
7188 __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
7189 {
7190 __GLXcontext *const gc = __glXGetCurrentContext();
7191 const GLuint cmdlen = 16;
7192 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7193 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7194 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7195 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7196 gc->pc += cmdlen;
7197 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7198 (void) __glXFlushRenderBuffer(gc, gc->pc);
7199 }
7200 }
7201
7202 #define X_GLrop_MultiTexCoord2ivARB 204
7203 void
7204 __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
7205 {
7206 __GLXcontext *const gc = __glXGetCurrentContext();
7207 const GLuint cmdlen = 16;
7208 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7209 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7210 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7211 gc->pc += cmdlen;
7212 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7213 (void) __glXFlushRenderBuffer(gc, gc->pc);
7214 }
7215 }
7216
7217 #define X_GLrop_MultiTexCoord2svARB 205
7218 void
7219 __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
7220 {
7221 __GLXcontext *const gc = __glXGetCurrentContext();
7222 const GLuint cmdlen = 12;
7223 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7224 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7225 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7226 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7227 gc->pc += cmdlen;
7228 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7229 (void) __glXFlushRenderBuffer(gc, gc->pc);
7230 }
7231 }
7232
7233 #define X_GLrop_MultiTexCoord2svARB 205
7234 void
7235 __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
7236 {
7237 __GLXcontext *const gc = __glXGetCurrentContext();
7238 const GLuint cmdlen = 12;
7239 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7240 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7241 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7242 gc->pc += cmdlen;
7243 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7244 (void) __glXFlushRenderBuffer(gc, gc->pc);
7245 }
7246 }
7247
7248 #define X_GLrop_MultiTexCoord3dvARB 206
7249 void
7250 __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t,
7251 GLdouble r)
7252 {
7253 __GLXcontext *const gc = __glXGetCurrentContext();
7254 const GLuint cmdlen = 32;
7255 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7256 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7257 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7258 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7259 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
7260 gc->pc += cmdlen;
7261 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7262 (void) __glXFlushRenderBuffer(gc, gc->pc);
7263 }
7264 }
7265
7266 #define X_GLrop_MultiTexCoord3dvARB 206
7267 void
7268 __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
7269 {
7270 __GLXcontext *const gc = __glXGetCurrentContext();
7271 const GLuint cmdlen = 32;
7272 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7273 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 24);
7274 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
7275 gc->pc += cmdlen;
7276 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7277 (void) __glXFlushRenderBuffer(gc, gc->pc);
7278 }
7279 }
7280
7281 #define X_GLrop_MultiTexCoord3fvARB 207
7282 void
7283 __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t,
7284 GLfloat r)
7285 {
7286 __GLXcontext *const gc = __glXGetCurrentContext();
7287 const GLuint cmdlen = 20;
7288 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7289 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7290 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7291 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7292 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7293 gc->pc += cmdlen;
7294 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7295 (void) __glXFlushRenderBuffer(gc, gc->pc);
7296 }
7297 }
7298
7299 #define X_GLrop_MultiTexCoord3fvARB 207
7300 void
7301 __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
7302 {
7303 __GLXcontext *const gc = __glXGetCurrentContext();
7304 const GLuint cmdlen = 20;
7305 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7306 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7307 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7308 gc->pc += cmdlen;
7309 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7310 (void) __glXFlushRenderBuffer(gc, gc->pc);
7311 }
7312 }
7313
7314 #define X_GLrop_MultiTexCoord3ivARB 208
7315 void
7316 __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
7317 {
7318 __GLXcontext *const gc = __glXGetCurrentContext();
7319 const GLuint cmdlen = 20;
7320 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7321 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7322 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7323 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7324 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7325 gc->pc += cmdlen;
7326 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7327 (void) __glXFlushRenderBuffer(gc, gc->pc);
7328 }
7329 }
7330
7331 #define X_GLrop_MultiTexCoord3ivARB 208
7332 void
7333 __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
7334 {
7335 __GLXcontext *const gc = __glXGetCurrentContext();
7336 const GLuint cmdlen = 20;
7337 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7338 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7339 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7340 gc->pc += cmdlen;
7341 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7342 (void) __glXFlushRenderBuffer(gc, gc->pc);
7343 }
7344 }
7345
7346 #define X_GLrop_MultiTexCoord3svARB 209
7347 void
7348 __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t,
7349 GLshort r)
7350 {
7351 __GLXcontext *const gc = __glXGetCurrentContext();
7352 const GLuint cmdlen = 16;
7353 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7354 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7355 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7356 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7357 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7358 gc->pc += cmdlen;
7359 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7360 (void) __glXFlushRenderBuffer(gc, gc->pc);
7361 }
7362 }
7363
7364 #define X_GLrop_MultiTexCoord3svARB 209
7365 void
7366 __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
7367 {
7368 __GLXcontext *const gc = __glXGetCurrentContext();
7369 const GLuint cmdlen = 16;
7370 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7371 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7372 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
7373 gc->pc += cmdlen;
7374 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7375 (void) __glXFlushRenderBuffer(gc, gc->pc);
7376 }
7377 }
7378
7379 #define X_GLrop_MultiTexCoord4dvARB 210
7380 void
7381 __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t,
7382 GLdouble r, GLdouble q)
7383 {
7384 __GLXcontext *const gc = __glXGetCurrentContext();
7385 const GLuint cmdlen = 40;
7386 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7387 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7388 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7389 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7390 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
7391 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7392 gc->pc += cmdlen;
7393 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7394 (void) __glXFlushRenderBuffer(gc, gc->pc);
7395 }
7396 }
7397
7398 #define X_GLrop_MultiTexCoord4dvARB 210
7399 void
7400 __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
7401 {
7402 __GLXcontext *const gc = __glXGetCurrentContext();
7403 const GLuint cmdlen = 40;
7404 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7405 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
7406 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7407 gc->pc += cmdlen;
7408 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7409 (void) __glXFlushRenderBuffer(gc, gc->pc);
7410 }
7411 }
7412
7413 #define X_GLrop_MultiTexCoord4fvARB 211
7414 void
7415 __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t,
7416 GLfloat r, GLfloat q)
7417 {
7418 __GLXcontext *const gc = __glXGetCurrentContext();
7419 const GLuint cmdlen = 24;
7420 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7421 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7422 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7423 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7424 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7425 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
7426 gc->pc += cmdlen;
7427 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7428 (void) __glXFlushRenderBuffer(gc, gc->pc);
7429 }
7430 }
7431
7432 #define X_GLrop_MultiTexCoord4fvARB 211
7433 void
7434 __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
7435 {
7436 __GLXcontext *const gc = __glXGetCurrentContext();
7437 const GLuint cmdlen = 24;
7438 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7439 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7440 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7441 gc->pc += cmdlen;
7442 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7443 (void) __glXFlushRenderBuffer(gc, gc->pc);
7444 }
7445 }
7446
7447 #define X_GLrop_MultiTexCoord4ivARB 212
7448 void
7449 __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r,
7450 GLint q)
7451 {
7452 __GLXcontext *const gc = __glXGetCurrentContext();
7453 const GLuint cmdlen = 24;
7454 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7455 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7456 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7457 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7458 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7459 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
7460 gc->pc += cmdlen;
7461 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7462 (void) __glXFlushRenderBuffer(gc, gc->pc);
7463 }
7464 }
7465
7466 #define X_GLrop_MultiTexCoord4ivARB 212
7467 void
7468 __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
7469 {
7470 __GLXcontext *const gc = __glXGetCurrentContext();
7471 const GLuint cmdlen = 24;
7472 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7473 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7474 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7475 gc->pc += cmdlen;
7476 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7477 (void) __glXFlushRenderBuffer(gc, gc->pc);
7478 }
7479 }
7480
7481 #define X_GLrop_MultiTexCoord4svARB 213
7482 void
7483 __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t,
7484 GLshort r, GLshort q)
7485 {
7486 __GLXcontext *const gc = __glXGetCurrentContext();
7487 const GLuint cmdlen = 16;
7488 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7489 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7490 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7491 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7492 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7493 (void) memcpy((void *) (gc->pc + 14), (void *) (&q), 2);
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_MultiTexCoord4svARB 213
7501 void
7502 __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
7503 {
7504 __GLXcontext *const gc = __glXGetCurrentContext();
7505 const GLuint cmdlen = 16;
7506 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7507 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 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_SampleCoverageARB 229
7516 void
7517 __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
7518 {
7519 __GLXcontext *const gc = __glXGetCurrentContext();
7520 const GLuint cmdlen = 12;
7521 emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen);
7522 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
7523 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
7524 gc->pc += cmdlen;
7525 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7526 (void) __glXFlushRenderBuffer(gc, gc->pc);
7527 }
7528 }
7529
7530 #define X_GLvop_GetProgramStringARB 1308
7531 void
7532 __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
7533 {
7534 __GLXcontext *const gc = __glXGetCurrentContext();
7535 Display *const dpy = gc->currentDpy;
7536 const GLuint cmdlen = 8;
7537 if (__builtin_expect(dpy != NULL, 1)) {
7538 GLubyte const *pc =
7539 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7540 X_GLvop_GetProgramStringARB, cmdlen);
7541 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7542 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7543 (void) __glXReadReply(dpy, 1, string, GL_TRUE);
7544 UnlockDisplay(dpy);
7545 SyncHandle();
7546 }
7547 return;
7548 }
7549
7550 #define X_GLvop_GetProgramivARB 1307
7551 void
7552 __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
7553 {
7554 __GLXcontext *const gc = __glXGetCurrentContext();
7555 Display *const dpy = gc->currentDpy;
7556 const GLuint cmdlen = 8;
7557 if (__builtin_expect(dpy != NULL, 1)) {
7558 GLubyte const *pc =
7559 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7560 X_GLvop_GetProgramivARB, cmdlen);
7561 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7562 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7563 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7564 UnlockDisplay(dpy);
7565 SyncHandle();
7566 }
7567 return;
7568 }
7569
7570 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7571 void
7572 __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x,
7573 GLdouble y, GLdouble z, GLdouble w)
7574 {
7575 __GLXcontext *const gc = __glXGetCurrentContext();
7576 const GLuint cmdlen = 44;
7577 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7578 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7579 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7580 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7581 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7582 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7583 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7584 gc->pc += cmdlen;
7585 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7586 (void) __glXFlushRenderBuffer(gc, gc->pc);
7587 }
7588 }
7589
7590 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7591 void
7592 __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index,
7593 const GLdouble * params)
7594 {
7595 __GLXcontext *const gc = __glXGetCurrentContext();
7596 const GLuint cmdlen = 44;
7597 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7598 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7599 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7600 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7601 gc->pc += cmdlen;
7602 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7603 (void) __glXFlushRenderBuffer(gc, gc->pc);
7604 }
7605 }
7606
7607 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7608 void
7609 __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x,
7610 GLfloat y, GLfloat z, GLfloat w)
7611 {
7612 __GLXcontext *const gc = __glXGetCurrentContext();
7613 const GLuint cmdlen = 28;
7614 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7615 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7616 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7617 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7618 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7619 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7620 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7621 gc->pc += cmdlen;
7622 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7623 (void) __glXFlushRenderBuffer(gc, gc->pc);
7624 }
7625 }
7626
7627 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7628 void
7629 __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index,
7630 const GLfloat * params)
7631 {
7632 __GLXcontext *const gc = __glXGetCurrentContext();
7633 const GLuint cmdlen = 28;
7634 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7635 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7636 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7637 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7638 gc->pc += cmdlen;
7639 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7640 (void) __glXFlushRenderBuffer(gc, gc->pc);
7641 }
7642 }
7643
7644 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7645 void
7646 __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index,
7647 GLdouble x, GLdouble y, GLdouble z,
7648 GLdouble w)
7649 {
7650 __GLXcontext *const gc = __glXGetCurrentContext();
7651 const GLuint cmdlen = 44;
7652 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7653 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7654 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7655 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7656 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7657 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7658 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7659 gc->pc += cmdlen;
7660 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7661 (void) __glXFlushRenderBuffer(gc, gc->pc);
7662 }
7663 }
7664
7665 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7666 void
7667 __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index,
7668 const GLdouble * params)
7669 {
7670 __GLXcontext *const gc = __glXGetCurrentContext();
7671 const GLuint cmdlen = 44;
7672 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7673 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7674 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7675 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7676 gc->pc += cmdlen;
7677 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7678 (void) __glXFlushRenderBuffer(gc, gc->pc);
7679 }
7680 }
7681
7682 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7683 void
7684 __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index,
7685 GLfloat x, GLfloat y, GLfloat z,
7686 GLfloat w)
7687 {
7688 __GLXcontext *const gc = __glXGetCurrentContext();
7689 const GLuint cmdlen = 28;
7690 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7691 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7692 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7693 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7694 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7695 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7696 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7697 gc->pc += cmdlen;
7698 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7699 (void) __glXFlushRenderBuffer(gc, gc->pc);
7700 }
7701 }
7702
7703 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7704 void
7705 __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index,
7706 const GLfloat * params)
7707 {
7708 __GLXcontext *const gc = __glXGetCurrentContext();
7709 const GLuint cmdlen = 28;
7710 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7711 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7712 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7713 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7714 gc->pc += cmdlen;
7715 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7716 (void) __glXFlushRenderBuffer(gc, gc->pc);
7717 }
7718 }
7719
7720 #define X_GLrop_ProgramStringARB 4217
7721 void
7722 __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len,
7723 const GLvoid * string)
7724 {
7725 __GLXcontext *const gc = __glXGetCurrentContext();
7726 const GLuint cmdlen = 16 + __GLX_PAD(len);
7727 if (len < 0) {
7728 __glXSetError(gc, GL_INVALID_VALUE);
7729 return;
7730 }
7731 if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
7732 if (cmdlen <= gc->maxSmallRenderCommandSize) {
7733 if ((gc->pc + cmdlen) > gc->bufEnd) {
7734 (void) __glXFlushRenderBuffer(gc, gc->pc);
7735 }
7736 emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
7737 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7738 (void) memcpy((void *) (gc->pc + 8), (void *) (&format), 4);
7739 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
7740 (void) memcpy((void *) (gc->pc + 16), (void *) (string), len);
7741 gc->pc += cmdlen;
7742 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7743 (void) __glXFlushRenderBuffer(gc, gc->pc);
7744 }
7745 } else {
7746 const GLint op = X_GLrop_ProgramStringARB;
7747 const GLuint cmdlenLarge = cmdlen + 4;
7748 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
7749 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
7750 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
7751 (void) memcpy((void *) (pc + 8), (void *) (&target), 4);
7752 (void) memcpy((void *) (pc + 12), (void *) (&format), 4);
7753 (void) memcpy((void *) (pc + 16), (void *) (&len), 4);
7754 __glXSendLargeCommand(gc, pc, 20, string, len);
7755 }
7756 }
7757 }
7758
7759 #define X_GLrop_VertexAttrib1dvARB 4197
7760 void
7761 __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
7762 {
7763 __GLXcontext *const gc = __glXGetCurrentContext();
7764 const GLuint cmdlen = 16;
7765 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7766 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7767 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7768 gc->pc += cmdlen;
7769 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7770 (void) __glXFlushRenderBuffer(gc, gc->pc);
7771 }
7772 }
7773
7774 #define X_GLrop_VertexAttrib1dvARB 4197
7775 void
7776 __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
7777 {
7778 __GLXcontext *const gc = __glXGetCurrentContext();
7779 const GLuint cmdlen = 16;
7780 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7781 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7782 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7783 gc->pc += cmdlen;
7784 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7785 (void) __glXFlushRenderBuffer(gc, gc->pc);
7786 }
7787 }
7788
7789 #define X_GLrop_VertexAttrib1fvARB 4193
7790 void
7791 __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
7792 {
7793 __GLXcontext *const gc = __glXGetCurrentContext();
7794 const GLuint cmdlen = 12;
7795 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7796 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7797 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7798 gc->pc += cmdlen;
7799 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7800 (void) __glXFlushRenderBuffer(gc, gc->pc);
7801 }
7802 }
7803
7804 #define X_GLrop_VertexAttrib1fvARB 4193
7805 void
7806 __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
7807 {
7808 __GLXcontext *const gc = __glXGetCurrentContext();
7809 const GLuint cmdlen = 12;
7810 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7811 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7812 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7813 gc->pc += cmdlen;
7814 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7815 (void) __glXFlushRenderBuffer(gc, gc->pc);
7816 }
7817 }
7818
7819 #define X_GLrop_VertexAttrib1svARB 4189
7820 void
7821 __indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
7822 {
7823 __GLXcontext *const gc = __glXGetCurrentContext();
7824 const GLuint cmdlen = 12;
7825 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7826 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7827 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7828 gc->pc += cmdlen;
7829 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7830 (void) __glXFlushRenderBuffer(gc, gc->pc);
7831 }
7832 }
7833
7834 #define X_GLrop_VertexAttrib1svARB 4189
7835 void
7836 __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
7837 {
7838 __GLXcontext *const gc = __glXGetCurrentContext();
7839 const GLuint cmdlen = 12;
7840 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7841 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7842 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7843 gc->pc += cmdlen;
7844 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7845 (void) __glXFlushRenderBuffer(gc, gc->pc);
7846 }
7847 }
7848
7849 #define X_GLrop_VertexAttrib2dvARB 4198
7850 void
7851 __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
7852 {
7853 __GLXcontext *const gc = __glXGetCurrentContext();
7854 const GLuint cmdlen = 24;
7855 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7856 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7857 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7858 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7859 gc->pc += cmdlen;
7860 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7861 (void) __glXFlushRenderBuffer(gc, gc->pc);
7862 }
7863 }
7864
7865 #define X_GLrop_VertexAttrib2dvARB 4198
7866 void
7867 __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
7868 {
7869 __GLXcontext *const gc = __glXGetCurrentContext();
7870 const GLuint cmdlen = 24;
7871 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7872 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7873 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7874 gc->pc += cmdlen;
7875 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7876 (void) __glXFlushRenderBuffer(gc, gc->pc);
7877 }
7878 }
7879
7880 #define X_GLrop_VertexAttrib2fvARB 4194
7881 void
7882 __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
7883 {
7884 __GLXcontext *const gc = __glXGetCurrentContext();
7885 const GLuint cmdlen = 16;
7886 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7887 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7888 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7889 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7890 gc->pc += cmdlen;
7891 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7892 (void) __glXFlushRenderBuffer(gc, gc->pc);
7893 }
7894 }
7895
7896 #define X_GLrop_VertexAttrib2fvARB 4194
7897 void
7898 __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
7899 {
7900 __GLXcontext *const gc = __glXGetCurrentContext();
7901 const GLuint cmdlen = 16;
7902 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7903 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7904 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7905 gc->pc += cmdlen;
7906 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7907 (void) __glXFlushRenderBuffer(gc, gc->pc);
7908 }
7909 }
7910
7911 #define X_GLrop_VertexAttrib2svARB 4190
7912 void
7913 __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
7914 {
7915 __GLXcontext *const gc = __glXGetCurrentContext();
7916 const GLuint cmdlen = 12;
7917 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7918 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7919 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7920 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
7921 gc->pc += cmdlen;
7922 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7923 (void) __glXFlushRenderBuffer(gc, gc->pc);
7924 }
7925 }
7926
7927 #define X_GLrop_VertexAttrib2svARB 4190
7928 void
7929 __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
7930 {
7931 __GLXcontext *const gc = __glXGetCurrentContext();
7932 const GLuint cmdlen = 12;
7933 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7934 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7935 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7936 gc->pc += cmdlen;
7937 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7938 (void) __glXFlushRenderBuffer(gc, gc->pc);
7939 }
7940 }
7941
7942 #define X_GLrop_VertexAttrib3dvARB 4199
7943 void
7944 __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y,
7945 GLdouble z)
7946 {
7947 __GLXcontext *const gc = __glXGetCurrentContext();
7948 const GLuint cmdlen = 32;
7949 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7950 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7951 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7952 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7953 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
7954 gc->pc += cmdlen;
7955 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7956 (void) __glXFlushRenderBuffer(gc, gc->pc);
7957 }
7958 }
7959
7960 #define X_GLrop_VertexAttrib3dvARB 4199
7961 void
7962 __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
7963 {
7964 __GLXcontext *const gc = __glXGetCurrentContext();
7965 const GLuint cmdlen = 32;
7966 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7967 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7968 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
7969 gc->pc += cmdlen;
7970 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7971 (void) __glXFlushRenderBuffer(gc, gc->pc);
7972 }
7973 }
7974
7975 #define X_GLrop_VertexAttrib3fvARB 4195
7976 void
7977 __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
7978 {
7979 __GLXcontext *const gc = __glXGetCurrentContext();
7980 const GLuint cmdlen = 20;
7981 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7982 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7983 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7984 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7985 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
7986 gc->pc += cmdlen;
7987 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7988 (void) __glXFlushRenderBuffer(gc, gc->pc);
7989 }
7990 }
7991
7992 #define X_GLrop_VertexAttrib3fvARB 4195
7993 void
7994 __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
7995 {
7996 __GLXcontext *const gc = __glXGetCurrentContext();
7997 const GLuint cmdlen = 20;
7998 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7999 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8000 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
8001 gc->pc += cmdlen;
8002 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8003 (void) __glXFlushRenderBuffer(gc, gc->pc);
8004 }
8005 }
8006
8007 #define X_GLrop_VertexAttrib3svARB 4191
8008 void
8009 __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
8010 {
8011 __GLXcontext *const gc = __glXGetCurrentContext();
8012 const GLuint cmdlen = 16;
8013 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
8014 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8015 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
8016 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
8017 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
8018 gc->pc += cmdlen;
8019 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8020 (void) __glXFlushRenderBuffer(gc, gc->pc);
8021 }
8022 }
8023
8024 #define X_GLrop_VertexAttrib3svARB 4191
8025 void
8026 __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
8027 {
8028 __GLXcontext *const gc = __glXGetCurrentContext();
8029 const GLuint cmdlen = 16;
8030 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
8031 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8032 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
8033 gc->pc += cmdlen;
8034 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8035 (void) __glXFlushRenderBuffer(gc, gc->pc);
8036 }
8037 }
8038
8039 #define X_GLrop_VertexAttrib4NbvARB 4235
8040 void
8041 __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte *v)
8042 {
8043 __GLXcontext *const gc = __glXGetCurrentContext();
8044 const GLuint cmdlen = 12;
8045 emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
8046 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8047 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8048 gc->pc += cmdlen;
8049 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8050 (void) __glXFlushRenderBuffer(gc, gc->pc);
8051 }
8052 }
8053
8054 #define X_GLrop_VertexAttrib4NivARB 4237
8055 void
8056 __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
8057 {
8058 __GLXcontext *const gc = __glXGetCurrentContext();
8059 const GLuint cmdlen = 24;
8060 emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
8061 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8062 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8063 gc->pc += cmdlen;
8064 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8065 (void) __glXFlushRenderBuffer(gc, gc->pc);
8066 }
8067 }
8068
8069 #define X_GLrop_VertexAttrib4NsvARB 4236
8070 void
8071 __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
8072 {
8073 __GLXcontext *const gc = __glXGetCurrentContext();
8074 const GLuint cmdlen = 16;
8075 emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
8076 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8077 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8078 gc->pc += cmdlen;
8079 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8080 (void) __glXFlushRenderBuffer(gc, gc->pc);
8081 }
8082 }
8083
8084 #define X_GLrop_VertexAttrib4NubvARB 4201
8085 void
8086 __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
8087 GLubyte z, GLubyte w)
8088 {
8089 __GLXcontext *const gc = __glXGetCurrentContext();
8090 const GLuint cmdlen = 12;
8091 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
8092 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8093 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
8094 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
8095 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
8096 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
8097 gc->pc += cmdlen;
8098 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8099 (void) __glXFlushRenderBuffer(gc, gc->pc);
8100 }
8101 }
8102
8103 #define X_GLrop_VertexAttrib4NubvARB 4201
8104 void
8105 __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte *v)
8106 {
8107 __GLXcontext *const gc = __glXGetCurrentContext();
8108 const GLuint cmdlen = 12;
8109 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
8110 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8111 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8112 gc->pc += cmdlen;
8113 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8114 (void) __glXFlushRenderBuffer(gc, gc->pc);
8115 }
8116 }
8117
8118 #define X_GLrop_VertexAttrib4NuivARB 4239
8119 void
8120 __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
8121 {
8122 __GLXcontext *const gc = __glXGetCurrentContext();
8123 const GLuint cmdlen = 24;
8124 emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
8125 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8126 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8127 gc->pc += cmdlen;
8128 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8129 (void) __glXFlushRenderBuffer(gc, gc->pc);
8130 }
8131 }
8132
8133 #define X_GLrop_VertexAttrib4NusvARB 4238
8134 void
8135 __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
8136 {
8137 __GLXcontext *const gc = __glXGetCurrentContext();
8138 const GLuint cmdlen = 16;
8139 emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
8140 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8141 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8142 gc->pc += cmdlen;
8143 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8144 (void) __glXFlushRenderBuffer(gc, gc->pc);
8145 }
8146 }
8147
8148 #define X_GLrop_VertexAttrib4bvARB 4230
8149 void
8150 __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte *v)
8151 {
8152 __GLXcontext *const gc = __glXGetCurrentContext();
8153 const GLuint cmdlen = 12;
8154 emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
8155 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8156 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8157 gc->pc += cmdlen;
8158 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8159 (void) __glXFlushRenderBuffer(gc, gc->pc);
8160 }
8161 }
8162
8163 #define X_GLrop_VertexAttrib4dvARB 4200
8164 void
8165 __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y,
8166 GLdouble z, GLdouble w)
8167 {
8168 __GLXcontext *const gc = __glXGetCurrentContext();
8169 const GLuint cmdlen = 40;
8170 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8171 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8172 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
8173 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
8174 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
8175 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
8176 gc->pc += cmdlen;
8177 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8178 (void) __glXFlushRenderBuffer(gc, gc->pc);
8179 }
8180 }
8181
8182 #define X_GLrop_VertexAttrib4dvARB 4200
8183 void
8184 __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
8185 {
8186 __GLXcontext *const gc = __glXGetCurrentContext();
8187 const GLuint cmdlen = 40;
8188 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8189 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8190 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
8191 gc->pc += cmdlen;
8192 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8193 (void) __glXFlushRenderBuffer(gc, gc->pc);
8194 }
8195 }
8196
8197 #define X_GLrop_VertexAttrib4fvARB 4196
8198 void
8199 __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
8200 GLfloat w)
8201 {
8202 __GLXcontext *const gc = __glXGetCurrentContext();
8203 const GLuint cmdlen = 24;
8204 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8205 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8206 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
8207 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
8208 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
8209 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
8210 gc->pc += cmdlen;
8211 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8212 (void) __glXFlushRenderBuffer(gc, gc->pc);
8213 }
8214 }
8215
8216 #define X_GLrop_VertexAttrib4fvARB 4196
8217 void
8218 __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
8219 {
8220 __GLXcontext *const gc = __glXGetCurrentContext();
8221 const GLuint cmdlen = 24;
8222 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8223 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8224 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8225 gc->pc += cmdlen;
8226 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8227 (void) __glXFlushRenderBuffer(gc, gc->pc);
8228 }
8229 }
8230
8231 #define X_GLrop_VertexAttrib4ivARB 4231
8232 void
8233 __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
8234 {
8235 __GLXcontext *const gc = __glXGetCurrentContext();
8236 const GLuint cmdlen = 24;
8237 emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
8238 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8239 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8240 gc->pc += cmdlen;
8241 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8242 (void) __glXFlushRenderBuffer(gc, gc->pc);
8243 }
8244 }
8245
8246 #define X_GLrop_VertexAttrib4svARB 4192
8247 void
8248 __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z,
8249 GLshort w)
8250 {
8251 __GLXcontext *const gc = __glXGetCurrentContext();
8252 const GLuint cmdlen = 16;
8253 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8254 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8255 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
8256 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
8257 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
8258 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
8259 gc->pc += cmdlen;
8260 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8261 (void) __glXFlushRenderBuffer(gc, gc->pc);
8262 }
8263 }
8264
8265 #define X_GLrop_VertexAttrib4svARB 4192
8266 void
8267 __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
8268 {
8269 __GLXcontext *const gc = __glXGetCurrentContext();
8270 const GLuint cmdlen = 16;
8271 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8272 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8273 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8274 gc->pc += cmdlen;
8275 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8276 (void) __glXFlushRenderBuffer(gc, gc->pc);
8277 }
8278 }
8279
8280 #define X_GLrop_VertexAttrib4ubvARB 4232
8281 void
8282 __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte *v)
8283 {
8284 __GLXcontext *const gc = __glXGetCurrentContext();
8285 const GLuint cmdlen = 12;
8286 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
8287 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8288 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8289 gc->pc += cmdlen;
8290 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8291 (void) __glXFlushRenderBuffer(gc, gc->pc);
8292 }
8293 }
8294
8295 #define X_GLrop_VertexAttrib4uivARB 4234
8296 void
8297 __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
8298 {
8299 __GLXcontext *const gc = __glXGetCurrentContext();
8300 const GLuint cmdlen = 24;
8301 emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
8302 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8303 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8304 gc->pc += cmdlen;
8305 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8306 (void) __glXFlushRenderBuffer(gc, gc->pc);
8307 }
8308 }
8309
8310 #define X_GLrop_VertexAttrib4usvARB 4233
8311 void
8312 __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
8313 {
8314 __GLXcontext *const gc = __glXGetCurrentContext();
8315 const GLuint cmdlen = 16;
8316 emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
8317 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8318 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8319 gc->pc += cmdlen;
8320 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8321 (void) __glXFlushRenderBuffer(gc, gc->pc);
8322 }
8323 }
8324
8325 #define X_GLrop_BeginQueryARB 231
8326 void
8327 __indirect_glBeginQueryARB(GLenum target, GLuint id)
8328 {
8329 __GLXcontext *const gc = __glXGetCurrentContext();
8330 const GLuint cmdlen = 12;
8331 emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
8332 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8333 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
8334 gc->pc += cmdlen;
8335 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8336 (void) __glXFlushRenderBuffer(gc, gc->pc);
8337 }
8338 }
8339
8340 #define X_GLsop_DeleteQueriesARB 161
8341 void
8342 __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
8343 {
8344 __GLXcontext *const gc = __glXGetCurrentContext();
8345 Display *const dpy = gc->currentDpy;
8346 #ifndef USE_XCB
8347 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8348 #endif
8349 if (n < 0) {
8350 __glXSetError(gc, GL_INVALID_VALUE);
8351 return;
8352 }
8353 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8354 #ifdef USE_XCB
8355 xcb_connection_t *c = XGetXCBConnection(dpy);
8356 (void) __glXFlushRenderBuffer(gc, gc->pc);
8357 xcb_glx_delete_queries_arb(c, gc->currentContextTag, n, ids);
8358 #else
8359 GLubyte const *pc =
8360 __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
8361 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8362 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8363 UnlockDisplay(dpy);
8364 SyncHandle();
8365 #endif /* USE_XCB */
8366 }
8367 return;
8368 }
8369
8370 #define X_GLrop_EndQueryARB 232
8371 void
8372 __indirect_glEndQueryARB(GLenum target)
8373 {
8374 __GLXcontext *const gc = __glXGetCurrentContext();
8375 const GLuint cmdlen = 8;
8376 emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
8377 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8378 gc->pc += cmdlen;
8379 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8380 (void) __glXFlushRenderBuffer(gc, gc->pc);
8381 }
8382 }
8383
8384 #define X_GLsop_GenQueriesARB 162
8385 void
8386 __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
8387 {
8388 __GLXcontext *const gc = __glXGetCurrentContext();
8389 Display *const dpy = gc->currentDpy;
8390 #ifndef USE_XCB
8391 const GLuint cmdlen = 4;
8392 #endif
8393 if (n < 0) {
8394 __glXSetError(gc, GL_INVALID_VALUE);
8395 return;
8396 }
8397 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8398 #ifdef USE_XCB
8399 xcb_connection_t *c = XGetXCBConnection(dpy);
8400 (void) __glXFlushRenderBuffer(gc, gc->pc);
8401 xcb_glx_gen_queries_arb_reply_t *reply =
8402 xcb_glx_gen_queries_arb_reply(c,
8403 xcb_glx_gen_queries_arb(c,
8404 gc->
8405 currentContextTag,
8406 n), NULL);
8407 (void) memcpy(ids, xcb_glx_gen_queries_arb_data(reply),
8408 xcb_glx_gen_queries_arb_data_length(reply) *
8409 sizeof(GLuint));
8410 free(reply);
8411 #else
8412 GLubyte const *pc =
8413 __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
8414 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8415 (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
8416 UnlockDisplay(dpy);
8417 SyncHandle();
8418 #endif /* USE_XCB */
8419 }
8420 return;
8421 }
8422
8423 #define X_GLsop_GetQueryObjectivARB 165
8424 void
8425 __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
8426 {
8427 __GLXcontext *const gc = __glXGetCurrentContext();
8428 Display *const dpy = gc->currentDpy;
8429 #ifndef USE_XCB
8430 const GLuint cmdlen = 8;
8431 #endif
8432 if (__builtin_expect(dpy != NULL, 1)) {
8433 #ifdef USE_XCB
8434 xcb_connection_t *c = XGetXCBConnection(dpy);
8435 (void) __glXFlushRenderBuffer(gc, gc->pc);
8436 xcb_glx_get_query_objectiv_arb_reply_t *reply =
8437 xcb_glx_get_query_objectiv_arb_reply(c,
8438 xcb_glx_get_query_objectiv_arb
8439 (c, gc->currentContextTag,
8440 id, pname), NULL);
8441 if (xcb_glx_get_query_objectiv_arb_data_length(reply) == 0)
8442 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8443 else
8444 (void) memcpy(params, xcb_glx_get_query_objectiv_arb_data(reply),
8445 xcb_glx_get_query_objectiv_arb_data_length(reply) *
8446 sizeof(GLint));
8447 free(reply);
8448 #else
8449 GLubyte const *pc =
8450 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
8451 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8452 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8453 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8454 UnlockDisplay(dpy);
8455 SyncHandle();
8456 #endif /* USE_XCB */
8457 }
8458 return;
8459 }
8460
8461 #define X_GLsop_GetQueryObjectuivARB 166
8462 void
8463 __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
8464 {
8465 __GLXcontext *const gc = __glXGetCurrentContext();
8466 Display *const dpy = gc->currentDpy;
8467 #ifndef USE_XCB
8468 const GLuint cmdlen = 8;
8469 #endif
8470 if (__builtin_expect(dpy != NULL, 1)) {
8471 #ifdef USE_XCB
8472 xcb_connection_t *c = XGetXCBConnection(dpy);
8473 (void) __glXFlushRenderBuffer(gc, gc->pc);
8474 xcb_glx_get_query_objectuiv_arb_reply_t *reply =
8475 xcb_glx_get_query_objectuiv_arb_reply(c,
8476 xcb_glx_get_query_objectuiv_arb
8477 (c, gc->currentContextTag,
8478 id, pname), NULL);
8479 if (xcb_glx_get_query_objectuiv_arb_data_length(reply) == 0)
8480 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8481 else
8482 (void) memcpy(params, xcb_glx_get_query_objectuiv_arb_data(reply),
8483 xcb_glx_get_query_objectuiv_arb_data_length(reply) *
8484 sizeof(GLuint));
8485 free(reply);
8486 #else
8487 GLubyte const *pc =
8488 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
8489 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8490 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8491 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8492 UnlockDisplay(dpy);
8493 SyncHandle();
8494 #endif /* USE_XCB */
8495 }
8496 return;
8497 }
8498
8499 #define X_GLsop_GetQueryivARB 164
8500 void
8501 __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
8502 {
8503 __GLXcontext *const gc = __glXGetCurrentContext();
8504 Display *const dpy = gc->currentDpy;
8505 #ifndef USE_XCB
8506 const GLuint cmdlen = 8;
8507 #endif
8508 if (__builtin_expect(dpy != NULL, 1)) {
8509 #ifdef USE_XCB
8510 xcb_connection_t *c = XGetXCBConnection(dpy);
8511 (void) __glXFlushRenderBuffer(gc, gc->pc);
8512 xcb_glx_get_queryiv_arb_reply_t *reply =
8513 xcb_glx_get_queryiv_arb_reply(c,
8514 xcb_glx_get_queryiv_arb(c,
8515 gc->
8516 currentContextTag,
8517 target,
8518 pname),
8519 NULL);
8520 if (xcb_glx_get_queryiv_arb_data_length(reply) == 0)
8521 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8522 else
8523 (void) memcpy(params, xcb_glx_get_queryiv_arb_data(reply),
8524 xcb_glx_get_queryiv_arb_data_length(reply) *
8525 sizeof(GLint));
8526 free(reply);
8527 #else
8528 GLubyte const *pc =
8529 __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
8530 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8531 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8532 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8533 UnlockDisplay(dpy);
8534 SyncHandle();
8535 #endif /* USE_XCB */
8536 }
8537 return;
8538 }
8539
8540 #define X_GLsop_IsQueryARB 163
8541 GLboolean
8542 __indirect_glIsQueryARB(GLuint id)
8543 {
8544 __GLXcontext *const gc = __glXGetCurrentContext();
8545 Display *const dpy = gc->currentDpy;
8546 GLboolean retval = (GLboolean) 0;
8547 #ifndef USE_XCB
8548 const GLuint cmdlen = 4;
8549 #endif
8550 if (__builtin_expect(dpy != NULL, 1)) {
8551 #ifdef USE_XCB
8552 xcb_connection_t *c = XGetXCBConnection(dpy);
8553 (void) __glXFlushRenderBuffer(gc, gc->pc);
8554 xcb_glx_is_query_arb_reply_t *reply =
8555 xcb_glx_is_query_arb_reply(c,
8556 xcb_glx_is_query_arb(c,
8557 gc->
8558 currentContextTag,
8559 id), NULL);
8560 retval = reply->ret_val;
8561 free(reply);
8562 #else
8563 GLubyte const *pc =
8564 __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
8565 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8566 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8567 UnlockDisplay(dpy);
8568 SyncHandle();
8569 #endif /* USE_XCB */
8570 }
8571 return retval;
8572 }
8573
8574 #define X_GLrop_DrawBuffersARB 233
8575 void
8576 __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
8577 {
8578 __GLXcontext *const gc = __glXGetCurrentContext();
8579 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8580 if (n < 0) {
8581 __glXSetError(gc, GL_INVALID_VALUE);
8582 return;
8583 }
8584 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
8585 if (cmdlen <= gc->maxSmallRenderCommandSize) {
8586 if ((gc->pc + cmdlen) > gc->bufEnd) {
8587 (void) __glXFlushRenderBuffer(gc, gc->pc);
8588 }
8589 emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
8590 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
8591 (void) memcpy((void *) (gc->pc + 8), (void *) (bufs), (n * 4));
8592 gc->pc += cmdlen;
8593 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8594 (void) __glXFlushRenderBuffer(gc, gc->pc);
8595 }
8596 } else {
8597 const GLint op = X_GLrop_DrawBuffersARB;
8598 const GLuint cmdlenLarge = cmdlen + 4;
8599 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
8600 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
8601 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
8602 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
8603 __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
8604 }
8605 }
8606 }
8607
8608 #define X_GLrop_RenderbufferStorageMultisample 4331
8609 void
8610 __indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples,
8611 GLenum internalformat,
8612 GLsizei width, GLsizei height)
8613 {
8614 __GLXcontext *const gc = __glXGetCurrentContext();
8615 const GLuint cmdlen = 24;
8616 emit_header(gc->pc, X_GLrop_RenderbufferStorageMultisample, cmdlen);
8617 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8618 (void) memcpy((void *) (gc->pc + 8), (void *) (&samples), 4);
8619 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
8620 (void) memcpy((void *) (gc->pc + 16), (void *) (&width), 4);
8621 (void) memcpy((void *) (gc->pc + 20), (void *) (&height), 4);
8622 gc->pc += cmdlen;
8623 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8624 (void) __glXFlushRenderBuffer(gc, gc->pc);
8625 }
8626 }
8627
8628 #define X_GLrop_SampleMaskSGIS 2048
8629 void
8630 __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
8631 {
8632 __GLXcontext *const gc = __glXGetCurrentContext();
8633 const GLuint cmdlen = 12;
8634 emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
8635 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
8636 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
8637 gc->pc += cmdlen;
8638 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8639 (void) __glXFlushRenderBuffer(gc, gc->pc);
8640 }
8641 }
8642
8643 #define X_GLrop_SamplePatternSGIS 2049
8644 void
8645 __indirect_glSamplePatternSGIS(GLenum pattern)
8646 {
8647 __GLXcontext *const gc = __glXGetCurrentContext();
8648 const GLuint cmdlen = 8;
8649 emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
8650 (void) memcpy((void *) (gc->pc + 4), (void *) (&pattern), 4);
8651 gc->pc += cmdlen;
8652 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8653 (void) __glXFlushRenderBuffer(gc, gc->pc);
8654 }
8655 }
8656
8657 #define X_GLrop_PointParameterfEXT 2065
8658 void
8659 __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
8660 {
8661 __GLXcontext *const gc = __glXGetCurrentContext();
8662 const GLuint cmdlen = 12;
8663 emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
8664 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8665 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
8666 gc->pc += cmdlen;
8667 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8668 (void) __glXFlushRenderBuffer(gc, gc->pc);
8669 }
8670 }
8671
8672 #define X_GLrop_PointParameterfvEXT 2066
8673 void
8674 __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
8675 {
8676 __GLXcontext *const gc = __glXGetCurrentContext();
8677 const GLuint compsize = __glPointParameterfvEXT_size(pname);
8678 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
8679 emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
8680 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8681 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
8682 gc->pc += cmdlen;
8683 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8684 (void) __glXFlushRenderBuffer(gc, gc->pc);
8685 }
8686 }
8687
8688 #define X_GLrop_SecondaryColor3bvEXT 4126
8689 void
8690 __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
8691 {
8692 __GLXcontext *const gc = __glXGetCurrentContext();
8693 const GLuint cmdlen = 8;
8694 emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
8695 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8696 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8697 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8698 gc->pc += cmdlen;
8699 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8700 (void) __glXFlushRenderBuffer(gc, gc->pc);
8701 }
8702 }
8703
8704 #define X_GLrop_SecondaryColor3bvEXT 4126
8705 void
8706 __indirect_glSecondaryColor3bvEXT(const GLbyte *v)
8707 {
8708 generic_3_byte(X_GLrop_SecondaryColor3bvEXT, v);
8709 }
8710
8711 #define X_GLrop_SecondaryColor3dvEXT 4130
8712 void
8713 __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
8714 {
8715 __GLXcontext *const gc = __glXGetCurrentContext();
8716 const GLuint cmdlen = 28;
8717 emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
8718 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
8719 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
8720 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
8721 gc->pc += cmdlen;
8722 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8723 (void) __glXFlushRenderBuffer(gc, gc->pc);
8724 }
8725 }
8726
8727 #define X_GLrop_SecondaryColor3dvEXT 4130
8728 void
8729 __indirect_glSecondaryColor3dvEXT(const GLdouble * v)
8730 {
8731 generic_24_byte(X_GLrop_SecondaryColor3dvEXT, v);
8732 }
8733
8734 #define X_GLrop_SecondaryColor3fvEXT 4129
8735 void
8736 __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
8737 {
8738 __GLXcontext *const gc = __glXGetCurrentContext();
8739 const GLuint cmdlen = 16;
8740 emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
8741 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8742 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8743 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8744 gc->pc += cmdlen;
8745 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8746 (void) __glXFlushRenderBuffer(gc, gc->pc);
8747 }
8748 }
8749
8750 #define X_GLrop_SecondaryColor3fvEXT 4129
8751 void
8752 __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
8753 {
8754 generic_12_byte(X_GLrop_SecondaryColor3fvEXT, v);
8755 }
8756
8757 #define X_GLrop_SecondaryColor3ivEXT 4128
8758 void
8759 __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
8760 {
8761 __GLXcontext *const gc = __glXGetCurrentContext();
8762 const GLuint cmdlen = 16;
8763 emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
8764 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8765 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8766 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8767 gc->pc += cmdlen;
8768 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8769 (void) __glXFlushRenderBuffer(gc, gc->pc);
8770 }
8771 }
8772
8773 #define X_GLrop_SecondaryColor3ivEXT 4128
8774 void
8775 __indirect_glSecondaryColor3ivEXT(const GLint * v)
8776 {
8777 generic_12_byte(X_GLrop_SecondaryColor3ivEXT, v);
8778 }
8779
8780 #define X_GLrop_SecondaryColor3svEXT 4127
8781 void
8782 __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
8783 {
8784 __GLXcontext *const gc = __glXGetCurrentContext();
8785 const GLuint cmdlen = 12;
8786 emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
8787 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8788 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8789 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8790 gc->pc += cmdlen;
8791 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8792 (void) __glXFlushRenderBuffer(gc, gc->pc);
8793 }
8794 }
8795
8796 #define X_GLrop_SecondaryColor3svEXT 4127
8797 void
8798 __indirect_glSecondaryColor3svEXT(const GLshort * v)
8799 {
8800 generic_6_byte(X_GLrop_SecondaryColor3svEXT, v);
8801 }
8802
8803 #define X_GLrop_SecondaryColor3ubvEXT 4131
8804 void
8805 __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
8806 {
8807 __GLXcontext *const gc = __glXGetCurrentContext();
8808 const GLuint cmdlen = 8;
8809 emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
8810 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8811 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8812 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8813 gc->pc += cmdlen;
8814 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8815 (void) __glXFlushRenderBuffer(gc, gc->pc);
8816 }
8817 }
8818
8819 #define X_GLrop_SecondaryColor3ubvEXT 4131
8820 void
8821 __indirect_glSecondaryColor3ubvEXT(const GLubyte *v)
8822 {
8823 generic_3_byte(X_GLrop_SecondaryColor3ubvEXT, v);
8824 }
8825
8826 #define X_GLrop_SecondaryColor3uivEXT 4133
8827 void
8828 __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
8829 {
8830 __GLXcontext *const gc = __glXGetCurrentContext();
8831 const GLuint cmdlen = 16;
8832 emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
8833 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8834 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8835 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8836 gc->pc += cmdlen;
8837 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8838 (void) __glXFlushRenderBuffer(gc, gc->pc);
8839 }
8840 }
8841
8842 #define X_GLrop_SecondaryColor3uivEXT 4133
8843 void
8844 __indirect_glSecondaryColor3uivEXT(const GLuint * v)
8845 {
8846 generic_12_byte(X_GLrop_SecondaryColor3uivEXT, v);
8847 }
8848
8849 #define X_GLrop_SecondaryColor3usvEXT 4132
8850 void
8851 __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
8852 {
8853 __GLXcontext *const gc = __glXGetCurrentContext();
8854 const GLuint cmdlen = 12;
8855 emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
8856 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8857 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8858 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8859 gc->pc += cmdlen;
8860 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8861 (void) __glXFlushRenderBuffer(gc, gc->pc);
8862 }
8863 }
8864
8865 #define X_GLrop_SecondaryColor3usvEXT 4132
8866 void
8867 __indirect_glSecondaryColor3usvEXT(const GLushort * v)
8868 {
8869 generic_6_byte(X_GLrop_SecondaryColor3usvEXT, v);
8870 }
8871
8872 #define X_GLrop_FogCoorddvEXT 4125
8873 void
8874 __indirect_glFogCoorddEXT(GLdouble coord)
8875 {
8876 __GLXcontext *const gc = __glXGetCurrentContext();
8877 const GLuint cmdlen = 12;
8878 emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
8879 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 8);
8880 gc->pc += cmdlen;
8881 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8882 (void) __glXFlushRenderBuffer(gc, gc->pc);
8883 }
8884 }
8885
8886 #define X_GLrop_FogCoorddvEXT 4125
8887 void
8888 __indirect_glFogCoorddvEXT(const GLdouble * coord)
8889 {
8890 generic_8_byte(X_GLrop_FogCoorddvEXT, coord);
8891 }
8892
8893 #define X_GLrop_FogCoordfvEXT 4124
8894 void
8895 __indirect_glFogCoordfEXT(GLfloat coord)
8896 {
8897 __GLXcontext *const gc = __glXGetCurrentContext();
8898 const GLuint cmdlen = 8;
8899 emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
8900 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
8901 gc->pc += cmdlen;
8902 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8903 (void) __glXFlushRenderBuffer(gc, gc->pc);
8904 }
8905 }
8906
8907 #define X_GLrop_FogCoordfvEXT 4124
8908 void
8909 __indirect_glFogCoordfvEXT(const GLfloat * coord)
8910 {
8911 generic_4_byte(X_GLrop_FogCoordfvEXT, coord);
8912 }
8913
8914 #define X_GLrop_BlendFuncSeparateEXT 4134
8915 void
8916 __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
8917 GLenum sfactorAlpha, GLenum dfactorAlpha)
8918 {
8919 __GLXcontext *const gc = __glXGetCurrentContext();
8920 const GLuint cmdlen = 20;
8921 emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
8922 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactorRGB), 4);
8923 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactorRGB), 4);
8924 (void) memcpy((void *) (gc->pc + 12), (void *) (&sfactorAlpha), 4);
8925 (void) memcpy((void *) (gc->pc + 16), (void *) (&dfactorAlpha), 4);
8926 gc->pc += cmdlen;
8927 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8928 (void) __glXFlushRenderBuffer(gc, gc->pc);
8929 }
8930 }
8931
8932 #define X_GLrop_WindowPos3fvMESA 230
8933 void
8934 __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
8935 {
8936 __GLXcontext *const gc = __glXGetCurrentContext();
8937 const GLuint cmdlen = 16;
8938 emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
8939 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
8940 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
8941 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
8942 gc->pc += cmdlen;
8943 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8944 (void) __glXFlushRenderBuffer(gc, gc->pc);
8945 }
8946 }
8947
8948 #define X_GLrop_WindowPos3fvMESA 230
8949 void
8950 __indirect_glWindowPos3fvMESA(const GLfloat * v)
8951 {
8952 generic_12_byte(X_GLrop_WindowPos3fvMESA, v);
8953 }
8954
8955 #define X_GLvop_AreProgramsResidentNV 1293
8956 GLboolean
8957 __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids,
8958 GLboolean * residences)
8959 {
8960 __GLXcontext *const gc = __glXGetCurrentContext();
8961 Display *const dpy = gc->currentDpy;
8962 GLboolean retval = (GLboolean) 0;
8963 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8964 if (n < 0) {
8965 __glXSetError(gc, GL_INVALID_VALUE);
8966 return 0;
8967 }
8968 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8969 GLubyte const *pc =
8970 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8971 X_GLvop_AreProgramsResidentNV, cmdlen);
8972 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8973 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8974 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
8975 UnlockDisplay(dpy);
8976 SyncHandle();
8977 }
8978 return retval;
8979 }
8980
8981 #define X_GLrop_BindProgramNV 4180
8982 void
8983 __indirect_glBindProgramNV(GLenum target, GLuint program)
8984 {
8985 __GLXcontext *const gc = __glXGetCurrentContext();
8986 const GLuint cmdlen = 12;
8987 emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
8988 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8989 (void) memcpy((void *) (gc->pc + 8), (void *) (&program), 4);
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_GLvop_DeleteProgramsNV 1294
8997 void
8998 __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
8999 {
9000 __GLXcontext *const gc = __glXGetCurrentContext();
9001 Display *const dpy = gc->currentDpy;
9002 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
9003 if (n < 0) {
9004 __glXSetError(gc, GL_INVALID_VALUE);
9005 return;
9006 }
9007 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
9008 GLubyte const *pc =
9009 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
9010 X_GLvop_DeleteProgramsNV, cmdlen);
9011 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
9012 (void) memcpy((void *) (pc + 4), (void *) (programs), (n * 4));
9013 UnlockDisplay(dpy);
9014 SyncHandle();
9015 }
9016 return;
9017 }
9018
9019 #define X_GLrop_ExecuteProgramNV 4181
9020 void
9021 __indirect_glExecuteProgramNV(GLenum target, GLuint id,
9022 const GLfloat * params)
9023 {
9024 __GLXcontext *const gc = __glXGetCurrentContext();
9025 const GLuint cmdlen = 28;
9026 emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
9027 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9028 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
9029 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
9030 gc->pc += cmdlen;
9031 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9032 (void) __glXFlushRenderBuffer(gc, gc->pc);
9033 }
9034 }
9035
9036 #define X_GLvop_GenProgramsNV 1295
9037 void
9038 __indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
9039 {
9040 __GLXcontext *const gc = __glXGetCurrentContext();
9041 Display *const dpy = gc->currentDpy;
9042 const GLuint cmdlen = 4;
9043 if (n < 0) {
9044 __glXSetError(gc, GL_INVALID_VALUE);
9045 return;
9046 }
9047 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
9048 GLubyte const *pc =
9049 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9050 X_GLvop_GenProgramsNV, cmdlen);
9051 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
9052 (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
9053 UnlockDisplay(dpy);
9054 SyncHandle();
9055 }
9056 return;
9057 }
9058
9059 #define X_GLvop_GetProgramParameterdvNV 1297
9060 void
9061 __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index,
9062 GLenum pname, GLdouble * params)
9063 {
9064 __GLXcontext *const gc = __glXGetCurrentContext();
9065 Display *const dpy = gc->currentDpy;
9066 const GLuint cmdlen = 12;
9067 if (__builtin_expect(dpy != NULL, 1)) {
9068 GLubyte const *pc =
9069 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9070 X_GLvop_GetProgramParameterdvNV, cmdlen);
9071 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9072 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
9073 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9074 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
9075 UnlockDisplay(dpy);
9076 SyncHandle();
9077 }
9078 return;
9079 }
9080
9081 #define X_GLvop_GetProgramParameterfvNV 1296
9082 void
9083 __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
9084 GLenum pname, GLfloat * params)
9085 {
9086 __GLXcontext *const gc = __glXGetCurrentContext();
9087 Display *const dpy = gc->currentDpy;
9088 const GLuint cmdlen = 12;
9089 if (__builtin_expect(dpy != NULL, 1)) {
9090 GLubyte const *pc =
9091 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9092 X_GLvop_GetProgramParameterfvNV, cmdlen);
9093 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9094 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
9095 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9096 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9097 UnlockDisplay(dpy);
9098 SyncHandle();
9099 }
9100 return;
9101 }
9102
9103 #define X_GLvop_GetProgramStringNV 1299
9104 void
9105 __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
9106 {
9107 __GLXcontext *const gc = __glXGetCurrentContext();
9108 Display *const dpy = gc->currentDpy;
9109 const GLuint cmdlen = 8;
9110 if (__builtin_expect(dpy != NULL, 1)) {
9111 GLubyte const *pc =
9112 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9113 X_GLvop_GetProgramStringNV, cmdlen);
9114 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9115 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9116 (void) __glXReadReply(dpy, 1, program, GL_TRUE);
9117 UnlockDisplay(dpy);
9118 SyncHandle();
9119 }
9120 return;
9121 }
9122
9123 #define X_GLvop_GetProgramivNV 1298
9124 void
9125 __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
9126 {
9127 __GLXcontext *const gc = __glXGetCurrentContext();
9128 Display *const dpy = gc->currentDpy;
9129 const GLuint cmdlen = 8;
9130 if (__builtin_expect(dpy != NULL, 1)) {
9131 GLubyte const *pc =
9132 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9133 X_GLvop_GetProgramivNV, cmdlen);
9134 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9135 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9136 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9137 UnlockDisplay(dpy);
9138 SyncHandle();
9139 }
9140 return;
9141 }
9142
9143 #define X_GLvop_GetTrackMatrixivNV 1300
9144 void
9145 __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname,
9146 GLint * params)
9147 {
9148 __GLXcontext *const gc = __glXGetCurrentContext();
9149 Display *const dpy = gc->currentDpy;
9150 const GLuint cmdlen = 12;
9151 if (__builtin_expect(dpy != NULL, 1)) {
9152 GLubyte const *pc =
9153 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9154 X_GLvop_GetTrackMatrixivNV, cmdlen);
9155 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9156 (void) memcpy((void *) (pc + 4), (void *) (&address), 4);
9157 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9158 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9159 UnlockDisplay(dpy);
9160 SyncHandle();
9161 }
9162 return;
9163 }
9164
9165 #define X_GLvop_GetVertexAttribdvNV 1301
9166 void
9167 __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname,
9168 GLdouble * params)
9169 {
9170 __GLXcontext *const gc = __glXGetCurrentContext();
9171 Display *const dpy = gc->currentDpy;
9172 const GLuint cmdlen = 8;
9173 if (__builtin_expect(dpy != NULL, 1)) {
9174 GLubyte const *pc =
9175 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9176 X_GLvop_GetVertexAttribdvNV, cmdlen);
9177 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9178 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9179 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
9180 UnlockDisplay(dpy);
9181 SyncHandle();
9182 }
9183 return;
9184 }
9185
9186 #define X_GLvop_GetVertexAttribfvNV 1302
9187 void
9188 __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
9189 {
9190 __GLXcontext *const gc = __glXGetCurrentContext();
9191 Display *const dpy = gc->currentDpy;
9192 const GLuint cmdlen = 8;
9193 if (__builtin_expect(dpy != NULL, 1)) {
9194 GLubyte const *pc =
9195 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9196 X_GLvop_GetVertexAttribfvNV, cmdlen);
9197 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9198 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9199 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9200 UnlockDisplay(dpy);
9201 SyncHandle();
9202 }
9203 return;
9204 }
9205
9206 #define X_GLvop_GetVertexAttribivNV 1303
9207 void
9208 __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
9209 {
9210 __GLXcontext *const gc = __glXGetCurrentContext();
9211 Display *const dpy = gc->currentDpy;
9212 const GLuint cmdlen = 8;
9213 if (__builtin_expect(dpy != NULL, 1)) {
9214 GLubyte const *pc =
9215 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9216 X_GLvop_GetVertexAttribivNV, cmdlen);
9217 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9218 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9219 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9220 UnlockDisplay(dpy);
9221 SyncHandle();
9222 }
9223 return;
9224 }
9225
9226 #define X_GLvop_IsProgramNV 1304
9227 GLboolean
9228 __indirect_glIsProgramNV(GLuint program)
9229 {
9230 __GLXcontext *const gc = __glXGetCurrentContext();
9231 Display *const dpy = gc->currentDpy;
9232 GLboolean retval = (GLboolean) 0;
9233 const GLuint cmdlen = 4;
9234 if (__builtin_expect(dpy != NULL, 1)) {
9235 GLubyte const *pc =
9236 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9237 X_GLvop_IsProgramNV, cmdlen);
9238 (void) memcpy((void *) (pc + 0), (void *) (&program), 4);
9239 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
9240 UnlockDisplay(dpy);
9241 SyncHandle();
9242 }
9243 return retval;
9244 }
9245
9246 #define X_GLrop_LoadProgramNV 4183
9247 void
9248 __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len,
9249 const GLubyte *program)
9250 {
9251 __GLXcontext *const gc = __glXGetCurrentContext();
9252 const GLuint cmdlen = 16 + __GLX_PAD(len);
9253 if (len < 0) {
9254 __glXSetError(gc, GL_INVALID_VALUE);
9255 return;
9256 }
9257 if (__builtin_expect(len >= 0, 1)) {
9258 emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
9259 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9260 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
9261 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
9262 (void) memcpy((void *) (gc->pc + 16), (void *) (program), len);
9263 gc->pc += cmdlen;
9264 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9265 (void) __glXFlushRenderBuffer(gc, gc->pc);
9266 }
9267 }
9268 }
9269
9270 #define X_GLrop_ProgramParameters4dvNV 4187
9271 void
9272 __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num,
9273 const GLdouble * params)
9274 {
9275 __GLXcontext *const gc = __glXGetCurrentContext();
9276 const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
9277 if (num < 0) {
9278 __glXSetError(gc, GL_INVALID_VALUE);
9279 return;
9280 }
9281 if (__builtin_expect(num >= 0, 1)) {
9282 emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
9283 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9284 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9285 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9286 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 32));
9287 gc->pc += cmdlen;
9288 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9289 (void) __glXFlushRenderBuffer(gc, gc->pc);
9290 }
9291 }
9292 }
9293
9294 #define X_GLrop_ProgramParameters4fvNV 4186
9295 void
9296 __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num,
9297 const GLfloat * params)
9298 {
9299 __GLXcontext *const gc = __glXGetCurrentContext();
9300 const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
9301 if (num < 0) {
9302 __glXSetError(gc, GL_INVALID_VALUE);
9303 return;
9304 }
9305 if (__builtin_expect(num >= 0, 1)) {
9306 emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
9307 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9308 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9309 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9310 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 16));
9311 gc->pc += cmdlen;
9312 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9313 (void) __glXFlushRenderBuffer(gc, gc->pc);
9314 }
9315 }
9316 }
9317
9318 #define X_GLrop_RequestResidentProgramsNV 4182
9319 void
9320 __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
9321 {
9322 __GLXcontext *const gc = __glXGetCurrentContext();
9323 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
9324 if (n < 0) {
9325 __glXSetError(gc, GL_INVALID_VALUE);
9326 return;
9327 }
9328 if (__builtin_expect(n >= 0, 1)) {
9329 emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
9330 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
9331 (void) memcpy((void *) (gc->pc + 8), (void *) (ids), (n * 4));
9332 gc->pc += cmdlen;
9333 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9334 (void) __glXFlushRenderBuffer(gc, gc->pc);
9335 }
9336 }
9337 }
9338
9339 #define X_GLrop_TrackMatrixNV 4188
9340 void
9341 __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix,
9342 GLenum transform)
9343 {
9344 __GLXcontext *const gc = __glXGetCurrentContext();
9345 const GLuint cmdlen = 20;
9346 emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
9347 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9348 (void) memcpy((void *) (gc->pc + 8), (void *) (&address), 4);
9349 (void) memcpy((void *) (gc->pc + 12), (void *) (&matrix), 4);
9350 (void) memcpy((void *) (gc->pc + 16), (void *) (&transform), 4);
9351 gc->pc += cmdlen;
9352 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9353 (void) __glXFlushRenderBuffer(gc, gc->pc);
9354 }
9355 }
9356
9357 #define X_GLrop_VertexAttrib1dvNV 4273
9358 void
9359 __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
9360 {
9361 __GLXcontext *const gc = __glXGetCurrentContext();
9362 const GLuint cmdlen = 16;
9363 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9364 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9365 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9366 gc->pc += cmdlen;
9367 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9368 (void) __glXFlushRenderBuffer(gc, gc->pc);
9369 }
9370 }
9371
9372 #define X_GLrop_VertexAttrib1dvNV 4273
9373 void
9374 __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
9375 {
9376 __GLXcontext *const gc = __glXGetCurrentContext();
9377 const GLuint cmdlen = 16;
9378 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9379 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9380 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9381 gc->pc += cmdlen;
9382 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9383 (void) __glXFlushRenderBuffer(gc, gc->pc);
9384 }
9385 }
9386
9387 #define X_GLrop_VertexAttrib1fvNV 4269
9388 void
9389 __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
9390 {
9391 __GLXcontext *const gc = __glXGetCurrentContext();
9392 const GLuint cmdlen = 12;
9393 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9394 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9395 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9396 gc->pc += cmdlen;
9397 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9398 (void) __glXFlushRenderBuffer(gc, gc->pc);
9399 }
9400 }
9401
9402 #define X_GLrop_VertexAttrib1fvNV 4269
9403 void
9404 __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
9405 {
9406 __GLXcontext *const gc = __glXGetCurrentContext();
9407 const GLuint cmdlen = 12;
9408 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9409 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9410 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9411 gc->pc += cmdlen;
9412 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9413 (void) __glXFlushRenderBuffer(gc, gc->pc);
9414 }
9415 }
9416
9417 #define X_GLrop_VertexAttrib1svNV 4265
9418 void
9419 __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
9420 {
9421 __GLXcontext *const gc = __glXGetCurrentContext();
9422 const GLuint cmdlen = 12;
9423 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9424 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9425 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9426 gc->pc += cmdlen;
9427 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9428 (void) __glXFlushRenderBuffer(gc, gc->pc);
9429 }
9430 }
9431
9432 #define X_GLrop_VertexAttrib1svNV 4265
9433 void
9434 __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
9435 {
9436 __GLXcontext *const gc = __glXGetCurrentContext();
9437 const GLuint cmdlen = 12;
9438 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9439 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9440 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
9441 gc->pc += cmdlen;
9442 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9443 (void) __glXFlushRenderBuffer(gc, gc->pc);
9444 }
9445 }
9446
9447 #define X_GLrop_VertexAttrib2dvNV 4274
9448 void
9449 __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
9450 {
9451 __GLXcontext *const gc = __glXGetCurrentContext();
9452 const GLuint cmdlen = 24;
9453 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9454 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9455 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9456 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9457 gc->pc += cmdlen;
9458 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9459 (void) __glXFlushRenderBuffer(gc, gc->pc);
9460 }
9461 }
9462
9463 #define X_GLrop_VertexAttrib2dvNV 4274
9464 void
9465 __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
9466 {
9467 __GLXcontext *const gc = __glXGetCurrentContext();
9468 const GLuint cmdlen = 24;
9469 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9470 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9471 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9472 gc->pc += cmdlen;
9473 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9474 (void) __glXFlushRenderBuffer(gc, gc->pc);
9475 }
9476 }
9477
9478 #define X_GLrop_VertexAttrib2fvNV 4270
9479 void
9480 __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
9481 {
9482 __GLXcontext *const gc = __glXGetCurrentContext();
9483 const GLuint cmdlen = 16;
9484 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9485 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9486 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9487 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9488 gc->pc += cmdlen;
9489 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9490 (void) __glXFlushRenderBuffer(gc, gc->pc);
9491 }
9492 }
9493
9494 #define X_GLrop_VertexAttrib2fvNV 4270
9495 void
9496 __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
9497 {
9498 __GLXcontext *const gc = __glXGetCurrentContext();
9499 const GLuint cmdlen = 16;
9500 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9501 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9502 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9503 gc->pc += cmdlen;
9504 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9505 (void) __glXFlushRenderBuffer(gc, gc->pc);
9506 }
9507 }
9508
9509 #define X_GLrop_VertexAttrib2svNV 4266
9510 void
9511 __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
9512 {
9513 __GLXcontext *const gc = __glXGetCurrentContext();
9514 const GLuint cmdlen = 12;
9515 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9516 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9517 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9518 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9519 gc->pc += cmdlen;
9520 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9521 (void) __glXFlushRenderBuffer(gc, gc->pc);
9522 }
9523 }
9524
9525 #define X_GLrop_VertexAttrib2svNV 4266
9526 void
9527 __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
9528 {
9529 __GLXcontext *const gc = __glXGetCurrentContext();
9530 const GLuint cmdlen = 12;
9531 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9532 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9533 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9534 gc->pc += cmdlen;
9535 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9536 (void) __glXFlushRenderBuffer(gc, gc->pc);
9537 }
9538 }
9539
9540 #define X_GLrop_VertexAttrib3dvNV 4275
9541 void
9542 __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y,
9543 GLdouble z)
9544 {
9545 __GLXcontext *const gc = __glXGetCurrentContext();
9546 const GLuint cmdlen = 32;
9547 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9548 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9549 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9550 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9551 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9552 gc->pc += cmdlen;
9553 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9554 (void) __glXFlushRenderBuffer(gc, gc->pc);
9555 }
9556 }
9557
9558 #define X_GLrop_VertexAttrib3dvNV 4275
9559 void
9560 __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
9561 {
9562 __GLXcontext *const gc = __glXGetCurrentContext();
9563 const GLuint cmdlen = 32;
9564 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9565 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9566 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
9567 gc->pc += cmdlen;
9568 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9569 (void) __glXFlushRenderBuffer(gc, gc->pc);
9570 }
9571 }
9572
9573 #define X_GLrop_VertexAttrib3fvNV 4271
9574 void
9575 __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
9576 {
9577 __GLXcontext *const gc = __glXGetCurrentContext();
9578 const GLuint cmdlen = 20;
9579 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9580 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9581 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9582 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9583 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9584 gc->pc += cmdlen;
9585 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9586 (void) __glXFlushRenderBuffer(gc, gc->pc);
9587 }
9588 }
9589
9590 #define X_GLrop_VertexAttrib3fvNV 4271
9591 void
9592 __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
9593 {
9594 __GLXcontext *const gc = __glXGetCurrentContext();
9595 const GLuint cmdlen = 20;
9596 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9597 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9598 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
9599 gc->pc += cmdlen;
9600 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9601 (void) __glXFlushRenderBuffer(gc, gc->pc);
9602 }
9603 }
9604
9605 #define X_GLrop_VertexAttrib3svNV 4267
9606 void
9607 __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
9608 {
9609 __GLXcontext *const gc = __glXGetCurrentContext();
9610 const GLuint cmdlen = 16;
9611 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9612 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9613 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9614 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9615 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9616 gc->pc += cmdlen;
9617 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9618 (void) __glXFlushRenderBuffer(gc, gc->pc);
9619 }
9620 }
9621
9622 #define X_GLrop_VertexAttrib3svNV 4267
9623 void
9624 __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
9625 {
9626 __GLXcontext *const gc = __glXGetCurrentContext();
9627 const GLuint cmdlen = 16;
9628 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9629 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9630 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
9631 gc->pc += cmdlen;
9632 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9633 (void) __glXFlushRenderBuffer(gc, gc->pc);
9634 }
9635 }
9636
9637 #define X_GLrop_VertexAttrib4dvNV 4276
9638 void
9639 __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y,
9640 GLdouble z, GLdouble w)
9641 {
9642 __GLXcontext *const gc = __glXGetCurrentContext();
9643 const GLuint cmdlen = 40;
9644 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9645 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9646 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9647 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9648 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9649 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
9650 gc->pc += cmdlen;
9651 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9652 (void) __glXFlushRenderBuffer(gc, gc->pc);
9653 }
9654 }
9655
9656 #define X_GLrop_VertexAttrib4dvNV 4276
9657 void
9658 __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
9659 {
9660 __GLXcontext *const gc = __glXGetCurrentContext();
9661 const GLuint cmdlen = 40;
9662 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9663 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9664 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
9665 gc->pc += cmdlen;
9666 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9667 (void) __glXFlushRenderBuffer(gc, gc->pc);
9668 }
9669 }
9670
9671 #define X_GLrop_VertexAttrib4fvNV 4272
9672 void
9673 __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z,
9674 GLfloat w)
9675 {
9676 __GLXcontext *const gc = __glXGetCurrentContext();
9677 const GLuint cmdlen = 24;
9678 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9679 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9680 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9681 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9682 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9683 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
9684 gc->pc += cmdlen;
9685 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9686 (void) __glXFlushRenderBuffer(gc, gc->pc);
9687 }
9688 }
9689
9690 #define X_GLrop_VertexAttrib4fvNV 4272
9691 void
9692 __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
9693 {
9694 __GLXcontext *const gc = __glXGetCurrentContext();
9695 const GLuint cmdlen = 24;
9696 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9697 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9698 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9699 gc->pc += cmdlen;
9700 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9701 (void) __glXFlushRenderBuffer(gc, gc->pc);
9702 }
9703 }
9704
9705 #define X_GLrop_VertexAttrib4svNV 4268
9706 void
9707 __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z,
9708 GLshort w)
9709 {
9710 __GLXcontext *const gc = __glXGetCurrentContext();
9711 const GLuint cmdlen = 16;
9712 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9713 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9714 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9715 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9716 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9717 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
9718 gc->pc += cmdlen;
9719 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9720 (void) __glXFlushRenderBuffer(gc, gc->pc);
9721 }
9722 }
9723
9724 #define X_GLrop_VertexAttrib4svNV 4268
9725 void
9726 __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
9727 {
9728 __GLXcontext *const gc = __glXGetCurrentContext();
9729 const GLuint cmdlen = 16;
9730 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9731 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9732 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9733 gc->pc += cmdlen;
9734 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9735 (void) __glXFlushRenderBuffer(gc, gc->pc);
9736 }
9737 }
9738
9739 #define X_GLrop_VertexAttrib4ubvNV 4277
9740 void
9741 __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
9742 GLubyte w)
9743 {
9744 __GLXcontext *const gc = __glXGetCurrentContext();
9745 const GLuint cmdlen = 12;
9746 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9747 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9748 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
9749 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
9750 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
9751 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
9752 gc->pc += cmdlen;
9753 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9754 (void) __glXFlushRenderBuffer(gc, gc->pc);
9755 }
9756 }
9757
9758 #define X_GLrop_VertexAttrib4ubvNV 4277
9759 void
9760 __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte *v)
9761 {
9762 __GLXcontext *const gc = __glXGetCurrentContext();
9763 const GLuint cmdlen = 12;
9764 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9765 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9766 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9767 gc->pc += cmdlen;
9768 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9769 (void) __glXFlushRenderBuffer(gc, gc->pc);
9770 }
9771 }
9772
9773 #define X_GLrop_VertexAttribs1dvNV 4210
9774 void
9775 __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
9776 {
9777 __GLXcontext *const gc = __glXGetCurrentContext();
9778 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9779 if (n < 0) {
9780 __glXSetError(gc, GL_INVALID_VALUE);
9781 return;
9782 }
9783 if (__builtin_expect(n >= 0, 1)) {
9784 emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
9785 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9786 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9787 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9788 gc->pc += cmdlen;
9789 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9790 (void) __glXFlushRenderBuffer(gc, gc->pc);
9791 }
9792 }
9793 }
9794
9795 #define X_GLrop_VertexAttribs1fvNV 4206
9796 void
9797 __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
9798 {
9799 __GLXcontext *const gc = __glXGetCurrentContext();
9800 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9801 if (n < 0) {
9802 __glXSetError(gc, GL_INVALID_VALUE);
9803 return;
9804 }
9805 if (__builtin_expect(n >= 0, 1)) {
9806 emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
9807 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9808 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9809 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9810 gc->pc += cmdlen;
9811 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9812 (void) __glXFlushRenderBuffer(gc, gc->pc);
9813 }
9814 }
9815 }
9816
9817 #define X_GLrop_VertexAttribs1svNV 4202
9818 void
9819 __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
9820 {
9821 __GLXcontext *const gc = __glXGetCurrentContext();
9822 const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
9823 if (n < 0) {
9824 __glXSetError(gc, GL_INVALID_VALUE);
9825 return;
9826 }
9827 if (__builtin_expect(n >= 0, 1)) {
9828 emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
9829 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9830 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9831 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 2));
9832 gc->pc += cmdlen;
9833 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9834 (void) __glXFlushRenderBuffer(gc, gc->pc);
9835 }
9836 }
9837 }
9838
9839 #define X_GLrop_VertexAttribs2dvNV 4211
9840 void
9841 __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
9842 {
9843 __GLXcontext *const gc = __glXGetCurrentContext();
9844 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9845 if (n < 0) {
9846 __glXSetError(gc, GL_INVALID_VALUE);
9847 return;
9848 }
9849 if (__builtin_expect(n >= 0, 1)) {
9850 emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
9851 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9852 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9853 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
9854 gc->pc += cmdlen;
9855 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9856 (void) __glXFlushRenderBuffer(gc, gc->pc);
9857 }
9858 }
9859 }
9860
9861 #define X_GLrop_VertexAttribs2fvNV 4207
9862 void
9863 __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
9864 {
9865 __GLXcontext *const gc = __glXGetCurrentContext();
9866 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9867 if (n < 0) {
9868 __glXSetError(gc, GL_INVALID_VALUE);
9869 return;
9870 }
9871 if (__builtin_expect(n >= 0, 1)) {
9872 emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
9873 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9874 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9875 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9876 gc->pc += cmdlen;
9877 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9878 (void) __glXFlushRenderBuffer(gc, gc->pc);
9879 }
9880 }
9881 }
9882
9883 #define X_GLrop_VertexAttribs2svNV 4203
9884 void
9885 __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
9886 {
9887 __GLXcontext *const gc = __glXGetCurrentContext();
9888 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9889 if (n < 0) {
9890 __glXSetError(gc, GL_INVALID_VALUE);
9891 return;
9892 }
9893 if (__builtin_expect(n >= 0, 1)) {
9894 emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
9895 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9896 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9897 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9898 gc->pc += cmdlen;
9899 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9900 (void) __glXFlushRenderBuffer(gc, gc->pc);
9901 }
9902 }
9903 }
9904
9905 #define X_GLrop_VertexAttribs3dvNV 4212
9906 void
9907 __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
9908 {
9909 __GLXcontext *const gc = __glXGetCurrentContext();
9910 const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
9911 if (n < 0) {
9912 __glXSetError(gc, GL_INVALID_VALUE);
9913 return;
9914 }
9915 if (__builtin_expect(n >= 0, 1)) {
9916 emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
9917 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9918 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9919 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 24));
9920 gc->pc += cmdlen;
9921 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9922 (void) __glXFlushRenderBuffer(gc, gc->pc);
9923 }
9924 }
9925 }
9926
9927 #define X_GLrop_VertexAttribs3fvNV 4208
9928 void
9929 __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
9930 {
9931 __GLXcontext *const gc = __glXGetCurrentContext();
9932 const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
9933 if (n < 0) {
9934 __glXSetError(gc, GL_INVALID_VALUE);
9935 return;
9936 }
9937 if (__builtin_expect(n >= 0, 1)) {
9938 emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
9939 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9940 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9941 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 12));
9942 gc->pc += cmdlen;
9943 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9944 (void) __glXFlushRenderBuffer(gc, gc->pc);
9945 }
9946 }
9947 }
9948
9949 #define X_GLrop_VertexAttribs3svNV 4204
9950 void
9951 __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
9952 {
9953 __GLXcontext *const gc = __glXGetCurrentContext();
9954 const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
9955 if (n < 0) {
9956 __glXSetError(gc, GL_INVALID_VALUE);
9957 return;
9958 }
9959 if (__builtin_expect(n >= 0, 1)) {
9960 emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
9961 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9962 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9963 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 6));
9964 gc->pc += cmdlen;
9965 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9966 (void) __glXFlushRenderBuffer(gc, gc->pc);
9967 }
9968 }
9969 }
9970
9971 #define X_GLrop_VertexAttribs4dvNV 4213
9972 void
9973 __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
9974 {
9975 __GLXcontext *const gc = __glXGetCurrentContext();
9976 const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
9977 if (n < 0) {
9978 __glXSetError(gc, GL_INVALID_VALUE);
9979 return;
9980 }
9981 if (__builtin_expect(n >= 0, 1)) {
9982 emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
9983 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9984 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9985 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 32));
9986 gc->pc += cmdlen;
9987 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9988 (void) __glXFlushRenderBuffer(gc, gc->pc);
9989 }
9990 }
9991 }
9992
9993 #define X_GLrop_VertexAttribs4fvNV 4209
9994 void
9995 __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
9996 {
9997 __GLXcontext *const gc = __glXGetCurrentContext();
9998 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9999 if (n < 0) {
10000 __glXSetError(gc, GL_INVALID_VALUE);
10001 return;
10002 }
10003 if (__builtin_expect(n >= 0, 1)) {
10004 emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
10005 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
10006 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
10007 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
10008 gc->pc += cmdlen;
10009 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10010 (void) __glXFlushRenderBuffer(gc, gc->pc);
10011 }
10012 }
10013 }
10014
10015 #define X_GLrop_VertexAttribs4svNV 4205
10016 void
10017 __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
10018 {
10019 __GLXcontext *const gc = __glXGetCurrentContext();
10020 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
10021 if (n < 0) {
10022 __glXSetError(gc, GL_INVALID_VALUE);
10023 return;
10024 }
10025 if (__builtin_expect(n >= 0, 1)) {
10026 emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
10027 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
10028 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
10029 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
10030 gc->pc += cmdlen;
10031 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10032 (void) __glXFlushRenderBuffer(gc, gc->pc);
10033 }
10034 }
10035 }
10036
10037 #define X_GLrop_VertexAttribs4ubvNV 4214
10038 void
10039 __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
10040 {
10041 __GLXcontext *const gc = __glXGetCurrentContext();
10042 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
10043 if (n < 0) {
10044 __glXSetError(gc, GL_INVALID_VALUE);
10045 return;
10046 }
10047 if (__builtin_expect(n >= 0, 1)) {
10048 emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
10049 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
10050 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
10051 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
10052 gc->pc += cmdlen;
10053 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10054 (void) __glXFlushRenderBuffer(gc, gc->pc);
10055 }
10056 }
10057 }
10058
10059 #define X_GLrop_PointParameteriNV 4221
10060 void
10061 __indirect_glPointParameteriNV(GLenum pname, GLint param)
10062 {
10063 __GLXcontext *const gc = __glXGetCurrentContext();
10064 const GLuint cmdlen = 12;
10065 emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
10066 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
10067 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
10068 gc->pc += cmdlen;
10069 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10070 (void) __glXFlushRenderBuffer(gc, gc->pc);
10071 }
10072 }
10073
10074 #define X_GLrop_PointParameterivNV 4222
10075 void
10076 __indirect_glPointParameterivNV(GLenum pname, const GLint * params)
10077 {
10078 __GLXcontext *const gc = __glXGetCurrentContext();
10079 const GLuint compsize = __glPointParameterivNV_size(pname);
10080 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
10081 emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
10082 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
10083 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
10084 gc->pc += cmdlen;
10085 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10086 (void) __glXFlushRenderBuffer(gc, gc->pc);
10087 }
10088 }
10089
10090 #define X_GLrop_ActiveStencilFaceEXT 4220
10091 void
10092 __indirect_glActiveStencilFaceEXT(GLenum face)
10093 {
10094 __GLXcontext *const gc = __glXGetCurrentContext();
10095 const GLuint cmdlen = 8;
10096 emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
10097 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
10098 gc->pc += cmdlen;
10099 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10100 (void) __glXFlushRenderBuffer(gc, gc->pc);
10101 }
10102 }
10103
10104 #define X_GLvop_GetProgramNamedParameterdvNV 1311
10105 void
10106 __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
10107 const GLubyte *name,
10108 GLdouble * params)
10109 {
10110 __GLXcontext *const gc = __glXGetCurrentContext();
10111 Display *const dpy = gc->currentDpy;
10112 const GLuint cmdlen = 8 + __GLX_PAD(len);
10113 if (len < 0) {
10114 __glXSetError(gc, GL_INVALID_VALUE);
10115 return;
10116 }
10117 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
10118 GLubyte const *pc =
10119 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10120 X_GLvop_GetProgramNamedParameterdvNV,
10121 cmdlen);
10122 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
10123 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
10124 (void) memcpy((void *) (pc + 8), (void *) (name), len);
10125 (void) __glXReadReply(dpy, 8, params, GL_TRUE);
10126 UnlockDisplay(dpy);
10127 SyncHandle();
10128 }
10129 return;
10130 }
10131
10132 #define X_GLvop_GetProgramNamedParameterfvNV 1310
10133 void
10134 __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
10135 const GLubyte *name,
10136 GLfloat * params)
10137 {
10138 __GLXcontext *const gc = __glXGetCurrentContext();
10139 Display *const dpy = gc->currentDpy;
10140 const GLuint cmdlen = 8 + __GLX_PAD(len);
10141 if (len < 0) {
10142 __glXSetError(gc, GL_INVALID_VALUE);
10143 return;
10144 }
10145 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
10146 GLubyte const *pc =
10147 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10148 X_GLvop_GetProgramNamedParameterfvNV,
10149 cmdlen);
10150 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
10151 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
10152 (void) memcpy((void *) (pc + 8), (void *) (name), len);
10153 (void) __glXReadReply(dpy, 4, params, GL_TRUE);
10154 UnlockDisplay(dpy);
10155 SyncHandle();
10156 }
10157 return;
10158 }
10159
10160 #define X_GLrop_ProgramNamedParameter4dvNV 4219
10161 void
10162 __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
10163 const GLubyte *name, GLdouble x,
10164 GLdouble y, GLdouble z, GLdouble w)
10165 {
10166 __GLXcontext *const gc = __glXGetCurrentContext();
10167 const GLuint cmdlen = 44 + __GLX_PAD(len);
10168 if (len < 0) {
10169 __glXSetError(gc, GL_INVALID_VALUE);
10170 return;
10171 }
10172 if (__builtin_expect(len >= 0, 1)) {
10173 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
10174 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
10175 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
10176 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
10177 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
10178 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
10179 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
10180 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
10181 gc->pc += cmdlen;
10182 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10183 (void) __glXFlushRenderBuffer(gc, gc->pc);
10184 }
10185 }
10186 }
10187
10188 #define X_GLrop_ProgramNamedParameter4dvNV 4219
10189 void
10190 __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
10191 const GLubyte *name,
10192 const GLdouble * v)
10193 {
10194 __GLXcontext *const gc = __glXGetCurrentContext();
10195 const GLuint cmdlen = 44 + __GLX_PAD(len);
10196 if (len < 0) {
10197 __glXSetError(gc, GL_INVALID_VALUE);
10198 return;
10199 }
10200 if (__builtin_expect(len >= 0, 1)) {
10201 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
10202 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
10203 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
10204 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
10205 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
10206 gc->pc += cmdlen;
10207 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10208 (void) __glXFlushRenderBuffer(gc, gc->pc);
10209 }
10210 }
10211 }
10212
10213 #define X_GLrop_ProgramNamedParameter4fvNV 4218
10214 void
10215 __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
10216 const GLubyte *name, GLfloat x,
10217 GLfloat y, GLfloat z, GLfloat w)
10218 {
10219 __GLXcontext *const gc = __glXGetCurrentContext();
10220 const GLuint cmdlen = 28 + __GLX_PAD(len);
10221 if (len < 0) {
10222 __glXSetError(gc, GL_INVALID_VALUE);
10223 return;
10224 }
10225 if (__builtin_expect(len >= 0, 1)) {
10226 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
10227 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
10228 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
10229 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
10230 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
10231 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
10232 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
10233 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
10234 gc->pc += cmdlen;
10235 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10236 (void) __glXFlushRenderBuffer(gc, gc->pc);
10237 }
10238 }
10239 }
10240
10241 #define X_GLrop_ProgramNamedParameter4fvNV 4218
10242 void
10243 __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
10244 const GLubyte *name,
10245 const GLfloat * v)
10246 {
10247 __GLXcontext *const gc = __glXGetCurrentContext();
10248 const GLuint cmdlen = 28 + __GLX_PAD(len);
10249 if (len < 0) {
10250 __glXSetError(gc, GL_INVALID_VALUE);
10251 return;
10252 }
10253 if (__builtin_expect(len >= 0, 1)) {
10254 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
10255 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
10256 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
10257 (void) memcpy((void *) (gc->pc + 12), (void *) (v), 16);
10258 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
10259 gc->pc += cmdlen;
10260 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10261 (void) __glXFlushRenderBuffer(gc, gc->pc);
10262 }
10263 }
10264 }
10265
10266 #define X_GLrop_BlendEquationSeparateEXT 4228
10267 void
10268 __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
10269 {
10270 __GLXcontext *const gc = __glXGetCurrentContext();
10271 const GLuint cmdlen = 12;
10272 emit_header(gc->pc, X_GLrop_BlendEquationSeparateEXT, cmdlen);
10273 (void) memcpy((void *) (gc->pc + 4), (void *) (&modeRGB), 4);
10274 (void) memcpy((void *) (gc->pc + 8), (void *) (&modeA), 4);
10275 gc->pc += cmdlen;
10276 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10277 (void) __glXFlushRenderBuffer(gc, gc->pc);
10278 }
10279 }
10280
10281 #define X_GLrop_BindFramebufferEXT 4319
10282 void
10283 __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
10284 {
10285 __GLXcontext *const gc = __glXGetCurrentContext();
10286 const GLuint cmdlen = 12;
10287 emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
10288 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10289 (void) memcpy((void *) (gc->pc + 8), (void *) (&framebuffer), 4);
10290 gc->pc += cmdlen;
10291 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10292 (void) __glXFlushRenderBuffer(gc, gc->pc);
10293 }
10294 }
10295
10296 #define X_GLrop_BindRenderbufferEXT 4316
10297 void
10298 __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
10299 {
10300 __GLXcontext *const gc = __glXGetCurrentContext();
10301 const GLuint cmdlen = 12;
10302 emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
10303 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10304 (void) memcpy((void *) (gc->pc + 8), (void *) (&renderbuffer), 4);
10305 gc->pc += cmdlen;
10306 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10307 (void) __glXFlushRenderBuffer(gc, gc->pc);
10308 }
10309 }
10310
10311 #define X_GLvop_CheckFramebufferStatusEXT 1427
10312 GLenum
10313 __indirect_glCheckFramebufferStatusEXT(GLenum target)
10314 {
10315 __GLXcontext *const gc = __glXGetCurrentContext();
10316 Display *const dpy = gc->currentDpy;
10317 GLenum retval = (GLenum) 0;
10318 const GLuint cmdlen = 4;
10319 if (__builtin_expect(dpy != NULL, 1)) {
10320 GLubyte const *pc =
10321 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10322 X_GLvop_CheckFramebufferStatusEXT,
10323 cmdlen);
10324 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10325 retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10326 UnlockDisplay(dpy);
10327 SyncHandle();
10328 }
10329 return retval;
10330 }
10331
10332 #define X_GLrop_DeleteFramebuffersEXT 4320
10333 void
10334 __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
10335 {
10336 __GLXcontext *const gc = __glXGetCurrentContext();
10337 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10338 if (n < 0) {
10339 __glXSetError(gc, GL_INVALID_VALUE);
10340 return;
10341 }
10342 if (__builtin_expect(n >= 0, 1)) {
10343 emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
10344 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10345 (void) memcpy((void *) (gc->pc + 8), (void *) (framebuffers),
10346 (n * 4));
10347 gc->pc += cmdlen;
10348 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10349 (void) __glXFlushRenderBuffer(gc, gc->pc);
10350 }
10351 }
10352 }
10353
10354 #define X_GLrop_DeleteRenderbuffersEXT 4317
10355 void
10356 __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
10357 {
10358 __GLXcontext *const gc = __glXGetCurrentContext();
10359 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10360 if (n < 0) {
10361 __glXSetError(gc, GL_INVALID_VALUE);
10362 return;
10363 }
10364 if (__builtin_expect(n >= 0, 1)) {
10365 emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
10366 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10367 (void) memcpy((void *) (gc->pc + 8), (void *) (renderbuffers),
10368 (n * 4));
10369 gc->pc += cmdlen;
10370 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10371 (void) __glXFlushRenderBuffer(gc, gc->pc);
10372 }
10373 }
10374 }
10375
10376 #define X_GLrop_FramebufferRenderbufferEXT 4324
10377 void
10378 __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
10379 GLenum renderbuffertarget,
10380 GLuint renderbuffer)
10381 {
10382 __GLXcontext *const gc = __glXGetCurrentContext();
10383 const GLuint cmdlen = 20;
10384 emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
10385 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10386 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10387 (void) memcpy((void *) (gc->pc + 12), (void *) (&renderbuffertarget), 4);
10388 (void) memcpy((void *) (gc->pc + 16), (void *) (&renderbuffer), 4);
10389 gc->pc += cmdlen;
10390 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10391 (void) __glXFlushRenderBuffer(gc, gc->pc);
10392 }
10393 }
10394
10395 #define X_GLrop_FramebufferTexture1DEXT 4321
10396 void
10397 __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
10398 GLenum textarget, GLuint texture,
10399 GLint level)
10400 {
10401 __GLXcontext *const gc = __glXGetCurrentContext();
10402 const GLuint cmdlen = 24;
10403 emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
10404 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10405 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10406 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10407 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10408 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10409 gc->pc += cmdlen;
10410 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10411 (void) __glXFlushRenderBuffer(gc, gc->pc);
10412 }
10413 }
10414
10415 #define X_GLrop_FramebufferTexture2DEXT 4322
10416 void
10417 __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
10418 GLenum textarget, GLuint texture,
10419 GLint level)
10420 {
10421 __GLXcontext *const gc = __glXGetCurrentContext();
10422 const GLuint cmdlen = 24;
10423 emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
10424 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10425 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10426 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10427 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10428 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10429 gc->pc += cmdlen;
10430 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10431 (void) __glXFlushRenderBuffer(gc, gc->pc);
10432 }
10433 }
10434
10435 #define X_GLrop_FramebufferTexture3DEXT 4323
10436 void
10437 __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
10438 GLenum textarget, GLuint texture,
10439 GLint level, GLint zoffset)
10440 {
10441 __GLXcontext *const gc = __glXGetCurrentContext();
10442 const GLuint cmdlen = 28;
10443 emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
10444 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10445 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10446 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10447 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10448 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10449 (void) memcpy((void *) (gc->pc + 24), (void *) (&zoffset), 4);
10450 gc->pc += cmdlen;
10451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10452 (void) __glXFlushRenderBuffer(gc, gc->pc);
10453 }
10454 }
10455
10456 #define X_GLvop_GenFramebuffersEXT 1426
10457 void
10458 __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
10459 {
10460 __GLXcontext *const gc = __glXGetCurrentContext();
10461 Display *const dpy = gc->currentDpy;
10462 const GLuint cmdlen = 4;
10463 if (n < 0) {
10464 __glXSetError(gc, GL_INVALID_VALUE);
10465 return;
10466 }
10467 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10468 GLubyte const *pc =
10469 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10470 X_GLvop_GenFramebuffersEXT, cmdlen);
10471 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10472 (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
10473 UnlockDisplay(dpy);
10474 SyncHandle();
10475 }
10476 return;
10477 }
10478
10479 #define X_GLvop_GenRenderbuffersEXT 1423
10480 void
10481 __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
10482 {
10483 __GLXcontext *const gc = __glXGetCurrentContext();
10484 Display *const dpy = gc->currentDpy;
10485 const GLuint cmdlen = 4;
10486 if (n < 0) {
10487 __glXSetError(gc, GL_INVALID_VALUE);
10488 return;
10489 }
10490 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10491 GLubyte const *pc =
10492 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10493 X_GLvop_GenRenderbuffersEXT, cmdlen);
10494 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10495 (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
10496 UnlockDisplay(dpy);
10497 SyncHandle();
10498 }
10499 return;
10500 }
10501
10502 #define X_GLrop_GenerateMipmapEXT 4325
10503 void
10504 __indirect_glGenerateMipmapEXT(GLenum target)
10505 {
10506 __GLXcontext *const gc = __glXGetCurrentContext();
10507 const GLuint cmdlen = 8;
10508 emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
10509 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10510 gc->pc += cmdlen;
10511 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10512 (void) __glXFlushRenderBuffer(gc, gc->pc);
10513 }
10514 }
10515
10516 #define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
10517 void
10518 __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target,
10519 GLenum attachment,
10520 GLenum pname,
10521 GLint * params)
10522 {
10523 __GLXcontext *const gc = __glXGetCurrentContext();
10524 Display *const dpy = gc->currentDpy;
10525 const GLuint cmdlen = 12;
10526 if (__builtin_expect(dpy != NULL, 1)) {
10527 GLubyte const *pc =
10528 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10529 X_GLvop_GetFramebufferAttachmentParameterivEXT,
10530 cmdlen);
10531 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10532 (void) memcpy((void *) (pc + 4), (void *) (&attachment), 4);
10533 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
10534 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10535 UnlockDisplay(dpy);
10536 SyncHandle();
10537 }
10538 return;
10539 }
10540
10541 #define X_GLvop_GetRenderbufferParameterivEXT 1424
10542 void
10543 __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname,
10544 GLint * params)
10545 {
10546 __GLXcontext *const gc = __glXGetCurrentContext();
10547 Display *const dpy = gc->currentDpy;
10548 const GLuint cmdlen = 8;
10549 if (__builtin_expect(dpy != NULL, 1)) {
10550 GLubyte const *pc =
10551 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10552 X_GLvop_GetRenderbufferParameterivEXT,
10553 cmdlen);
10554 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10555 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
10556 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10557 UnlockDisplay(dpy);
10558 SyncHandle();
10559 }
10560 return;
10561 }
10562
10563 #define X_GLvop_IsFramebufferEXT 1425
10564 GLboolean
10565 __indirect_glIsFramebufferEXT(GLuint framebuffer)
10566 {
10567 __GLXcontext *const gc = __glXGetCurrentContext();
10568 Display *const dpy = gc->currentDpy;
10569 GLboolean retval = (GLboolean) 0;
10570 const GLuint cmdlen = 4;
10571 if (__builtin_expect(dpy != NULL, 1)) {
10572 GLubyte const *pc =
10573 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10574 X_GLvop_IsFramebufferEXT, cmdlen);
10575 (void) memcpy((void *) (pc + 0), (void *) (&framebuffer), 4);
10576 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10577 UnlockDisplay(dpy);
10578 SyncHandle();
10579 }
10580 return retval;
10581 }
10582
10583 #define X_GLvop_IsRenderbufferEXT 1422
10584 GLboolean
10585 __indirect_glIsRenderbufferEXT(GLuint renderbuffer)
10586 {
10587 __GLXcontext *const gc = __glXGetCurrentContext();
10588 Display *const dpy = gc->currentDpy;
10589 GLboolean retval = (GLboolean) 0;
10590 const GLuint cmdlen = 4;
10591 if (__builtin_expect(dpy != NULL, 1)) {
10592 GLubyte const *pc =
10593 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10594 X_GLvop_IsRenderbufferEXT, cmdlen);
10595 (void) memcpy((void *) (pc + 0), (void *) (&renderbuffer), 4);
10596 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10597 UnlockDisplay(dpy);
10598 SyncHandle();
10599 }
10600 return retval;
10601 }
10602
10603 #define X_GLrop_RenderbufferStorageEXT 4318
10604 void
10605 __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
10606 GLsizei width, GLsizei height)
10607 {
10608 __GLXcontext *const gc = __glXGetCurrentContext();
10609 const GLuint cmdlen = 20;
10610 emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
10611 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10612 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
10613 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
10614 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
10615 gc->pc += cmdlen;
10616 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10617 (void) __glXFlushRenderBuffer(gc, gc->pc);
10618 }
10619 }
10620
10621 #define X_GLrop_BlitFramebufferEXT 4330
10622 void
10623 __indirect_glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1,
10624 GLint srcY1, GLint dstX0, GLint dstY0,
10625 GLint dstX1, GLint dstY1, GLbitfield mask,
10626 GLenum filter)
10627 {
10628 __GLXcontext *const gc = __glXGetCurrentContext();
10629 const GLuint cmdlen = 44;
10630 emit_header(gc->pc, X_GLrop_BlitFramebufferEXT, cmdlen);
10631 (void) memcpy((void *) (gc->pc + 4), (void *) (&srcX0), 4);
10632 (void) memcpy((void *) (gc->pc + 8), (void *) (&srcY0), 4);
10633 (void) memcpy((void *) (gc->pc + 12), (void *) (&srcX1), 4);
10634 (void) memcpy((void *) (gc->pc + 16), (void *) (&srcY1), 4);
10635 (void) memcpy((void *) (gc->pc + 20), (void *) (&dstX0), 4);
10636 (void) memcpy((void *) (gc->pc + 24), (void *) (&dstY0), 4);
10637 (void) memcpy((void *) (gc->pc + 28), (void *) (&dstX1), 4);
10638 (void) memcpy((void *) (gc->pc + 32), (void *) (&dstY1), 4);
10639 (void) memcpy((void *) (gc->pc + 36), (void *) (&mask), 4);
10640 (void) memcpy((void *) (gc->pc + 40), (void *) (&filter), 4);
10641 gc->pc += cmdlen;
10642 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10643 (void) __glXFlushRenderBuffer(gc, gc->pc);
10644 }
10645 }
10646
10647 #define X_GLrop_FramebufferTextureLayerEXT 237
10648 void
10649 __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment,
10650 GLuint texture, GLint level,
10651 GLint layer)
10652 {
10653 __GLXcontext *const gc = __glXGetCurrentContext();
10654 const GLuint cmdlen = 24;
10655 emit_header(gc->pc, X_GLrop_FramebufferTextureLayerEXT, cmdlen);
10656 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10657 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10658 (void) memcpy((void *) (gc->pc + 12), (void *) (&texture), 4);
10659 (void) memcpy((void *) (gc->pc + 16), (void *) (&level), 4);
10660 (void) memcpy((void *) (gc->pc + 20), (void *) (&layer), 4);
10661 gc->pc += cmdlen;
10662 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10663 (void) __glXFlushRenderBuffer(gc, gc->pc);
10664 }
10665 }
10666
10667
10668 # undef FASTCALL
10669 # undef NOINLINE