GLX: fix out-of-bounds memory issue in indirect glAreTexturesResident()
[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 "dispatch.h"
34 #include "glapi.h"
35 #include "glthread.h"
36 #include <GL/glxproto.h>
37 #ifdef USE_XCB
38 #include <X11/Xlib-xcb.h>
39 #include <xcb/xcb.h>
40 #include <xcb/glx.h>
41 #endif /* USE_XCB */
42
43 #define __GLX_PAD(n) (((n) + 3) & ~3)
44
45 # if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
46 # define FASTCALL __attribute__((fastcall))
47 # else
48 # define FASTCALL
49 # endif
50 # if defined(__GNUC__)
51 # define NOINLINE __attribute__((noinline))
52 # else
53 # define NOINLINE
54 # endif
55
56 #if !defined __GNUC__ || __GNUC__ < 3
57 # define __builtin_expect(x, y) x
58 #endif
59
60 /* If the size and opcode values are known at compile-time, this will, on
61 * x86 at least, emit them with a single instruction.
62 */
63 #define emit_header(dest, op, size) \
64 do { union { short s[2]; int i; } temp; \
65 temp.s[0] = (size); temp.s[1] = (op); \
66 *((int *)(dest)) = temp.i; } while(0)
67
68 NOINLINE CARD32
69 __glXReadReply(Display * dpy, size_t size, void *dest,
70 GLboolean reply_is_always_array)
71 {
72 xGLXSingleReply reply;
73
74 (void) _XReply(dpy, (xReply *) & reply, 0, False);
75 if (size != 0) {
76 if ((reply.length > 0) || reply_is_always_array) {
77 const GLint bytes = (reply_is_always_array)
78 ? (4 * reply.length) : (reply.size * size);
79 const GLint extra = 4 - (bytes & 3);
80
81 _XRead(dpy, dest, bytes);
82 if (extra < 4) {
83 _XEatData(dpy, extra);
84 }
85 } else {
86 (void) memcpy(dest, &(reply.pad3), size);
87 }
88 }
89
90 return reply.retval;
91 }
92
93 NOINLINE void
94 __glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim,
95 GLint width, GLint height, GLint depth, GLenum format,
96 GLenum type, void *dest, GLboolean dimensions_in_reply)
97 {
98 xGLXSingleReply reply;
99 GLint size;
100
101 (void) _XReply(dpy, (xReply *) & reply, 0, False);
102
103 if (dimensions_in_reply) {
104 width = reply.pad3;
105 height = reply.pad4;
106 depth = reply.pad5;
107
108 if ((height == 0) || (max_dim < 2)) {
109 height = 1;
110 }
111 if ((depth == 0) || (max_dim < 3)) {
112 depth = 1;
113 }
114 }
115
116 size = reply.length * 4;
117 if (size != 0) {
118 void *buf = Xmalloc(size);
119
120 if (buf == NULL) {
121 _XEatData(dpy, size);
122 __glXSetError(gc, GL_OUT_OF_MEMORY);
123 } else {
124 const GLint extra = 4 - (size & 3);
125
126 _XRead(dpy, buf, size);
127 if (extra < 4) {
128 _XEatData(dpy, extra);
129 }
130
131 __glEmptyImage(gc, 3, width, height, depth, format, type,
132 buf, dest);
133 Xfree(buf);
134 }
135 }
136 }
137
138 #define X_GLXSingle 0
139
140 NOINLINE FASTCALL GLubyte *
141 __glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
142 {
143 xGLXSingleReq *req;
144 Display *const dpy = gc->currentDpy;
145
146 (void) __glXFlushRenderBuffer(gc, gc->pc);
147 LockDisplay(dpy);
148 GetReqExtra(GLXSingle, cmdlen, req);
149 req->reqType = gc->majorOpcode;
150 req->contextTag = gc->currentContextTag;
151 req->glxCode = sop;
152 return (GLubyte *) (req) + sz_xGLXSingleReq;
153 }
154
155 NOINLINE FASTCALL GLubyte *
156 __glXSetupVendorRequest(__GLXcontext * gc, GLint code, GLint vop,
157 GLint cmdlen)
158 {
159 xGLXVendorPrivateReq *req;
160 Display *const dpy = gc->currentDpy;
161
162 (void) __glXFlushRenderBuffer(gc, gc->pc);
163 LockDisplay(dpy);
164 GetReqExtra(GLXVendorPrivate, cmdlen, req);
165 req->reqType = gc->majorOpcode;
166 req->glxCode = code;
167 req->vendorCode = vop;
168 req->contextTag = gc->currentContextTag;
169 return (GLubyte *) (req) + sz_xGLXVendorPrivateReq;
170 }
171
172 const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
173
174 #define zero (__glXDefaultPixelStore+0)
175 #define one (__glXDefaultPixelStore+8)
176 #define default_pixel_store_1D (__glXDefaultPixelStore+4)
177 #define default_pixel_store_1D_size 20
178 #define default_pixel_store_2D (__glXDefaultPixelStore+4)
179 #define default_pixel_store_2D_size 20
180 #define default_pixel_store_3D (__glXDefaultPixelStore+0)
181 #define default_pixel_store_3D_size 36
182 #define default_pixel_store_4D (__glXDefaultPixelStore+0)
183 #define default_pixel_store_4D_size 36
184
185 static FASTCALL NOINLINE void
186 generic_3_byte(GLint rop, const void *ptr)
187 {
188 __GLXcontext *const gc = __glXGetCurrentContext();
189 const GLuint cmdlen = 8;
190
191 emit_header(gc->pc, rop, cmdlen);
192 (void) memcpy((void *) (gc->pc + 4), ptr, 4);
193 gc->pc += cmdlen;
194 if (__builtin_expect(gc->pc > gc->limit, 0)) {
195 (void) __glXFlushRenderBuffer(gc, gc->pc);
196 }
197 }
198
199 static FASTCALL NOINLINE void
200 generic_4_byte(GLint rop, const void *ptr)
201 {
202 __GLXcontext *const gc = __glXGetCurrentContext();
203 const GLuint cmdlen = 8;
204
205 emit_header(gc->pc, rop, cmdlen);
206 (void) memcpy((void *) (gc->pc + 4), ptr, 4);
207 gc->pc += cmdlen;
208 if (__builtin_expect(gc->pc > gc->limit, 0)) {
209 (void) __glXFlushRenderBuffer(gc, gc->pc);
210 }
211 }
212
213 static FASTCALL NOINLINE void
214 generic_6_byte(GLint rop, const void *ptr)
215 {
216 __GLXcontext *const gc = __glXGetCurrentContext();
217 const GLuint cmdlen = 12;
218
219 emit_header(gc->pc, rop, cmdlen);
220 (void) memcpy((void *) (gc->pc + 4), ptr, 8);
221 gc->pc += cmdlen;
222 if (__builtin_expect(gc->pc > gc->limit, 0)) {
223 (void) __glXFlushRenderBuffer(gc, gc->pc);
224 }
225 }
226
227 static FASTCALL NOINLINE void
228 generic_8_byte(GLint rop, const void *ptr)
229 {
230 __GLXcontext *const gc = __glXGetCurrentContext();
231 const GLuint cmdlen = 12;
232
233 emit_header(gc->pc, rop, cmdlen);
234 (void) memcpy((void *) (gc->pc + 4), ptr, 8);
235 gc->pc += cmdlen;
236 if (__builtin_expect(gc->pc > gc->limit, 0)) {
237 (void) __glXFlushRenderBuffer(gc, gc->pc);
238 }
239 }
240
241 static FASTCALL NOINLINE void
242 generic_12_byte(GLint rop, const void *ptr)
243 {
244 __GLXcontext *const gc = __glXGetCurrentContext();
245 const GLuint cmdlen = 16;
246
247 emit_header(gc->pc, rop, cmdlen);
248 (void) memcpy((void *) (gc->pc + 4), ptr, 12);
249 gc->pc += cmdlen;
250 if (__builtin_expect(gc->pc > gc->limit, 0)) {
251 (void) __glXFlushRenderBuffer(gc, gc->pc);
252 }
253 }
254
255 static FASTCALL NOINLINE void
256 generic_16_byte(GLint rop, const void *ptr)
257 {
258 __GLXcontext *const gc = __glXGetCurrentContext();
259 const GLuint cmdlen = 20;
260
261 emit_header(gc->pc, rop, cmdlen);
262 (void) memcpy((void *) (gc->pc + 4), ptr, 16);
263 gc->pc += cmdlen;
264 if (__builtin_expect(gc->pc > gc->limit, 0)) {
265 (void) __glXFlushRenderBuffer(gc, gc->pc);
266 }
267 }
268
269 static FASTCALL NOINLINE void
270 generic_24_byte(GLint rop, const void *ptr)
271 {
272 __GLXcontext *const gc = __glXGetCurrentContext();
273 const GLuint cmdlen = 28;
274
275 emit_header(gc->pc, rop, cmdlen);
276 (void) memcpy((void *) (gc->pc + 4), ptr, 24);
277 gc->pc += cmdlen;
278 if (__builtin_expect(gc->pc > gc->limit, 0)) {
279 (void) __glXFlushRenderBuffer(gc, gc->pc);
280 }
281 }
282
283 static FASTCALL NOINLINE void
284 generic_32_byte(GLint rop, const void *ptr)
285 {
286 __GLXcontext *const gc = __glXGetCurrentContext();
287 const GLuint cmdlen = 36;
288
289 emit_header(gc->pc, rop, cmdlen);
290 (void) memcpy((void *) (gc->pc + 4), ptr, 32);
291 gc->pc += cmdlen;
292 if (__builtin_expect(gc->pc > gc->limit, 0)) {
293 (void) __glXFlushRenderBuffer(gc, gc->pc);
294 }
295 }
296
297 #define X_GLsop_NewList 101
298 void
299 __indirect_glNewList(GLuint list, GLenum mode)
300 {
301 __GLXcontext *const gc = __glXGetCurrentContext();
302 Display *const dpy = gc->currentDpy;
303 #ifndef USE_XCB
304 const GLuint cmdlen = 8;
305 #endif
306 if (__builtin_expect(dpy != NULL, 1)) {
307 #ifdef USE_XCB
308 xcb_connection_t *c = XGetXCBConnection(dpy);
309 (void) __glXFlushRenderBuffer(gc, gc->pc);
310 xcb_glx_new_list(c, gc->currentContextTag, list, mode);
311 #else
312 GLubyte const *pc =
313 __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
314 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
315 (void) memcpy((void *) (pc + 4), (void *) (&mode), 4);
316 UnlockDisplay(dpy);
317 SyncHandle();
318 #endif /* USE_XCB */
319 }
320 return;
321 }
322
323 #define X_GLsop_EndList 102
324 void
325 __indirect_glEndList(void)
326 {
327 __GLXcontext *const gc = __glXGetCurrentContext();
328 Display *const dpy = gc->currentDpy;
329 #ifndef USE_XCB
330 const GLuint cmdlen = 0;
331 #endif
332 if (__builtin_expect(dpy != NULL, 1)) {
333 #ifdef USE_XCB
334 xcb_connection_t *c = XGetXCBConnection(dpy);
335 (void) __glXFlushRenderBuffer(gc, gc->pc);
336 xcb_glx_end_list(c, gc->currentContextTag);
337 #else
338 (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
339 UnlockDisplay(dpy);
340 SyncHandle();
341 #endif /* USE_XCB */
342 }
343 return;
344 }
345
346 #define X_GLrop_CallList 1
347 void
348 __indirect_glCallList(GLuint list)
349 {
350 __GLXcontext *const gc = __glXGetCurrentContext();
351 const GLuint cmdlen = 8;
352 emit_header(gc->pc, X_GLrop_CallList, cmdlen);
353 (void) memcpy((void *) (gc->pc + 4), (void *) (&list), 4);
354 gc->pc += cmdlen;
355 if (__builtin_expect(gc->pc > gc->limit, 0)) {
356 (void) __glXFlushRenderBuffer(gc, gc->pc);
357 }
358 }
359
360 #define X_GLrop_CallLists 2
361 void
362 __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
363 {
364 __GLXcontext *const gc = __glXGetCurrentContext();
365 const GLuint compsize = __glCallLists_size(type);
366 const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
367 if (n < 0) {
368 __glXSetError(gc, GL_INVALID_VALUE);
369 return;
370 }
371 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
372 if (cmdlen <= gc->maxSmallRenderCommandSize) {
373 if ((gc->pc + cmdlen) > gc->bufEnd) {
374 (void) __glXFlushRenderBuffer(gc, gc->pc);
375 }
376 emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
377 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
378 (void) memcpy((void *) (gc->pc + 8), (void *) (&type), 4);
379 (void) memcpy((void *) (gc->pc + 12), (void *) (lists),
380 (compsize * n));
381 gc->pc += cmdlen;
382 if (__builtin_expect(gc->pc > gc->limit, 0)) {
383 (void) __glXFlushRenderBuffer(gc, gc->pc);
384 }
385 } else {
386 const GLint op = X_GLrop_CallLists;
387 const GLuint cmdlenLarge = cmdlen + 4;
388 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
389 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
390 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
391 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
392 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
393 __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
394 }
395 }
396 }
397
398 #define X_GLsop_DeleteLists 103
399 void
400 __indirect_glDeleteLists(GLuint list, GLsizei range)
401 {
402 __GLXcontext *const gc = __glXGetCurrentContext();
403 Display *const dpy = gc->currentDpy;
404 #ifndef USE_XCB
405 const GLuint cmdlen = 8;
406 #endif
407 if (__builtin_expect(dpy != NULL, 1)) {
408 #ifdef USE_XCB
409 xcb_connection_t *c = XGetXCBConnection(dpy);
410 (void) __glXFlushRenderBuffer(gc, gc->pc);
411 xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
412 #else
413 GLubyte const *pc =
414 __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
415 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
416 (void) memcpy((void *) (pc + 4), (void *) (&range), 4);
417 UnlockDisplay(dpy);
418 SyncHandle();
419 #endif /* USE_XCB */
420 }
421 return;
422 }
423
424 #define X_GLsop_GenLists 104
425 GLuint
426 __indirect_glGenLists(GLsizei range)
427 {
428 __GLXcontext *const gc = __glXGetCurrentContext();
429 Display *const dpy = gc->currentDpy;
430 GLuint retval = (GLuint) 0;
431 #ifndef USE_XCB
432 const GLuint cmdlen = 4;
433 #endif
434 if (__builtin_expect(dpy != NULL, 1)) {
435 #ifdef USE_XCB
436 xcb_connection_t *c = XGetXCBConnection(dpy);
437 (void) __glXFlushRenderBuffer(gc, gc->pc);
438 xcb_glx_gen_lists_reply_t *reply =
439 xcb_glx_gen_lists_reply(c,
440 xcb_glx_gen_lists(c,
441 gc->currentContextTag,
442 range), NULL);
443 retval = reply->ret_val;
444 free(reply);
445 #else
446 GLubyte const *pc =
447 __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
448 (void) memcpy((void *) (pc + 0), (void *) (&range), 4);
449 retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
450 UnlockDisplay(dpy);
451 SyncHandle();
452 #endif /* USE_XCB */
453 }
454 return retval;
455 }
456
457 #define X_GLrop_ListBase 3
458 void
459 __indirect_glListBase(GLuint base)
460 {
461 __GLXcontext *const gc = __glXGetCurrentContext();
462 const GLuint cmdlen = 8;
463 emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
464 (void) memcpy((void *) (gc->pc + 4), (void *) (&base), 4);
465 gc->pc += cmdlen;
466 if (__builtin_expect(gc->pc > gc->limit, 0)) {
467 (void) __glXFlushRenderBuffer(gc, gc->pc);
468 }
469 }
470
471 #define X_GLrop_Begin 4
472 void
473 __indirect_glBegin(GLenum mode)
474 {
475 __GLXcontext *const gc = __glXGetCurrentContext();
476 const GLuint cmdlen = 8;
477 emit_header(gc->pc, X_GLrop_Begin, cmdlen);
478 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
479 gc->pc += cmdlen;
480 if (__builtin_expect(gc->pc > gc->limit, 0)) {
481 (void) __glXFlushRenderBuffer(gc, gc->pc);
482 }
483 }
484
485 #define X_GLrop_Bitmap 5
486 void
487 __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
488 GLfloat yorig, GLfloat xmove, GLfloat ymove,
489 const GLubyte *bitmap)
490 {
491 __GLXcontext *const gc = __glXGetCurrentContext();
492 const GLuint compsize =
493 (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX,
494 GL_BITMAP, 0) : 0;
495 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
496 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
497 if (cmdlen <= gc->maxSmallRenderCommandSize) {
498 if ((gc->pc + cmdlen) > gc->bufEnd) {
499 (void) __glXFlushRenderBuffer(gc, gc->pc);
500 }
501 emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
502 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
503 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
504 (void) memcpy((void *) (gc->pc + 32), (void *) (&xorig), 4);
505 (void) memcpy((void *) (gc->pc + 36), (void *) (&yorig), 4);
506 (void) memcpy((void *) (gc->pc + 40), (void *) (&xmove), 4);
507 (void) memcpy((void *) (gc->pc + 44), (void *) (&ymove), 4);
508 if (compsize > 0) {
509 (*gc->fillImage) (gc, 2, width, height, 1, GL_COLOR_INDEX,
510 GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
511 } else {
512 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
513 default_pixel_store_2D_size);
514 }
515 gc->pc += cmdlen;
516 if (gc->pc > gc->limit) {
517 (void) __glXFlushRenderBuffer(gc, gc->pc);
518 }
519 } else {
520 const GLint op = X_GLrop_Bitmap;
521 const GLuint cmdlenLarge = cmdlen + 4;
522 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
523 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
524 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
525 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
526 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
527 (void) memcpy((void *) (pc + 36), (void *) (&xorig), 4);
528 (void) memcpy((void *) (pc + 40), (void *) (&yorig), 4);
529 (void) memcpy((void *) (pc + 44), (void *) (&xmove), 4);
530 (void) memcpy((void *) (pc + 48), (void *) (&ymove), 4);
531 __glXSendLargeImage(gc, compsize, 2, width, height, 1,
532 GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52,
533 pc + 8);
534 }
535 }
536 }
537
538 #define X_GLrop_Color3bv 6
539 void
540 __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
541 {
542 __GLXcontext *const gc = __glXGetCurrentContext();
543 const GLuint cmdlen = 8;
544 emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
545 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
546 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
547 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
548 gc->pc += cmdlen;
549 if (__builtin_expect(gc->pc > gc->limit, 0)) {
550 (void) __glXFlushRenderBuffer(gc, gc->pc);
551 }
552 }
553
554 #define X_GLrop_Color3bv 6
555 void
556 __indirect_glColor3bv(const GLbyte *v)
557 {
558 generic_3_byte(X_GLrop_Color3bv, v);
559 }
560
561 #define X_GLrop_Color3dv 7
562 void
563 __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
564 {
565 __GLXcontext *const gc = __glXGetCurrentContext();
566 const GLuint cmdlen = 28;
567 emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
568 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
569 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
570 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
571 gc->pc += cmdlen;
572 if (__builtin_expect(gc->pc > gc->limit, 0)) {
573 (void) __glXFlushRenderBuffer(gc, gc->pc);
574 }
575 }
576
577 #define X_GLrop_Color3dv 7
578 void
579 __indirect_glColor3dv(const GLdouble * v)
580 {
581 generic_24_byte(X_GLrop_Color3dv, v);
582 }
583
584 #define X_GLrop_Color3fv 8
585 void
586 __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
587 {
588 __GLXcontext *const gc = __glXGetCurrentContext();
589 const GLuint cmdlen = 16;
590 emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
591 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
592 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
593 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
594 gc->pc += cmdlen;
595 if (__builtin_expect(gc->pc > gc->limit, 0)) {
596 (void) __glXFlushRenderBuffer(gc, gc->pc);
597 }
598 }
599
600 #define X_GLrop_Color3fv 8
601 void
602 __indirect_glColor3fv(const GLfloat * v)
603 {
604 generic_12_byte(X_GLrop_Color3fv, v);
605 }
606
607 #define X_GLrop_Color3iv 9
608 void
609 __indirect_glColor3i(GLint red, GLint green, GLint blue)
610 {
611 __GLXcontext *const gc = __glXGetCurrentContext();
612 const GLuint cmdlen = 16;
613 emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
614 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
615 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
616 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
617 gc->pc += cmdlen;
618 if (__builtin_expect(gc->pc > gc->limit, 0)) {
619 (void) __glXFlushRenderBuffer(gc, gc->pc);
620 }
621 }
622
623 #define X_GLrop_Color3iv 9
624 void
625 __indirect_glColor3iv(const GLint * v)
626 {
627 generic_12_byte(X_GLrop_Color3iv, v);
628 }
629
630 #define X_GLrop_Color3sv 10
631 void
632 __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
633 {
634 __GLXcontext *const gc = __glXGetCurrentContext();
635 const GLuint cmdlen = 12;
636 emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
637 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
638 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
639 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
640 gc->pc += cmdlen;
641 if (__builtin_expect(gc->pc > gc->limit, 0)) {
642 (void) __glXFlushRenderBuffer(gc, gc->pc);
643 }
644 }
645
646 #define X_GLrop_Color3sv 10
647 void
648 __indirect_glColor3sv(const GLshort * v)
649 {
650 generic_6_byte(X_GLrop_Color3sv, v);
651 }
652
653 #define X_GLrop_Color3ubv 11
654 void
655 __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
656 {
657 __GLXcontext *const gc = __glXGetCurrentContext();
658 const GLuint cmdlen = 8;
659 emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
660 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
661 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
662 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
663 gc->pc += cmdlen;
664 if (__builtin_expect(gc->pc > gc->limit, 0)) {
665 (void) __glXFlushRenderBuffer(gc, gc->pc);
666 }
667 }
668
669 #define X_GLrop_Color3ubv 11
670 void
671 __indirect_glColor3ubv(const GLubyte *v)
672 {
673 generic_3_byte(X_GLrop_Color3ubv, v);
674 }
675
676 #define X_GLrop_Color3uiv 12
677 void
678 __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
679 {
680 __GLXcontext *const gc = __glXGetCurrentContext();
681 const GLuint cmdlen = 16;
682 emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
683 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
684 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
685 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
686 gc->pc += cmdlen;
687 if (__builtin_expect(gc->pc > gc->limit, 0)) {
688 (void) __glXFlushRenderBuffer(gc, gc->pc);
689 }
690 }
691
692 #define X_GLrop_Color3uiv 12
693 void
694 __indirect_glColor3uiv(const GLuint * v)
695 {
696 generic_12_byte(X_GLrop_Color3uiv, v);
697 }
698
699 #define X_GLrop_Color3usv 13
700 void
701 __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
702 {
703 __GLXcontext *const gc = __glXGetCurrentContext();
704 const GLuint cmdlen = 12;
705 emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
706 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
707 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
708 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
709 gc->pc += cmdlen;
710 if (__builtin_expect(gc->pc > gc->limit, 0)) {
711 (void) __glXFlushRenderBuffer(gc, gc->pc);
712 }
713 }
714
715 #define X_GLrop_Color3usv 13
716 void
717 __indirect_glColor3usv(const GLushort * v)
718 {
719 generic_6_byte(X_GLrop_Color3usv, v);
720 }
721
722 #define X_GLrop_Color4bv 14
723 void
724 __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
725 {
726 __GLXcontext *const gc = __glXGetCurrentContext();
727 const GLuint cmdlen = 8;
728 emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
729 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
730 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
731 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
732 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
733 gc->pc += cmdlen;
734 if (__builtin_expect(gc->pc > gc->limit, 0)) {
735 (void) __glXFlushRenderBuffer(gc, gc->pc);
736 }
737 }
738
739 #define X_GLrop_Color4bv 14
740 void
741 __indirect_glColor4bv(const GLbyte *v)
742 {
743 generic_4_byte(X_GLrop_Color4bv, v);
744 }
745
746 #define X_GLrop_Color4dv 15
747 void
748 __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue,
749 GLdouble alpha)
750 {
751 __GLXcontext *const gc = __glXGetCurrentContext();
752 const GLuint cmdlen = 36;
753 emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
754 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
755 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
756 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
757 (void) memcpy((void *) (gc->pc + 28), (void *) (&alpha), 8);
758 gc->pc += cmdlen;
759 if (__builtin_expect(gc->pc > gc->limit, 0)) {
760 (void) __glXFlushRenderBuffer(gc, gc->pc);
761 }
762 }
763
764 #define X_GLrop_Color4dv 15
765 void
766 __indirect_glColor4dv(const GLdouble * v)
767 {
768 generic_32_byte(X_GLrop_Color4dv, v);
769 }
770
771 #define X_GLrop_Color4fv 16
772 void
773 __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
774 {
775 __GLXcontext *const gc = __glXGetCurrentContext();
776 const GLuint cmdlen = 20;
777 emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
778 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
779 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
780 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
781 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
782 gc->pc += cmdlen;
783 if (__builtin_expect(gc->pc > gc->limit, 0)) {
784 (void) __glXFlushRenderBuffer(gc, gc->pc);
785 }
786 }
787
788 #define X_GLrop_Color4fv 16
789 void
790 __indirect_glColor4fv(const GLfloat * v)
791 {
792 generic_16_byte(X_GLrop_Color4fv, v);
793 }
794
795 #define X_GLrop_Color4iv 17
796 void
797 __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
798 {
799 __GLXcontext *const gc = __glXGetCurrentContext();
800 const GLuint cmdlen = 20;
801 emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
802 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
803 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
804 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
805 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
806 gc->pc += cmdlen;
807 if (__builtin_expect(gc->pc > gc->limit, 0)) {
808 (void) __glXFlushRenderBuffer(gc, gc->pc);
809 }
810 }
811
812 #define X_GLrop_Color4iv 17
813 void
814 __indirect_glColor4iv(const GLint * v)
815 {
816 generic_16_byte(X_GLrop_Color4iv, v);
817 }
818
819 #define X_GLrop_Color4sv 18
820 void
821 __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
822 {
823 __GLXcontext *const gc = __glXGetCurrentContext();
824 const GLuint cmdlen = 12;
825 emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
826 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
827 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
828 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
829 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
830 gc->pc += cmdlen;
831 if (__builtin_expect(gc->pc > gc->limit, 0)) {
832 (void) __glXFlushRenderBuffer(gc, gc->pc);
833 }
834 }
835
836 #define X_GLrop_Color4sv 18
837 void
838 __indirect_glColor4sv(const GLshort * v)
839 {
840 generic_8_byte(X_GLrop_Color4sv, v);
841 }
842
843 #define X_GLrop_Color4ubv 19
844 void
845 __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
846 {
847 __GLXcontext *const gc = __glXGetCurrentContext();
848 const GLuint cmdlen = 8;
849 emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
850 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
851 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
852 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
853 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
854 gc->pc += cmdlen;
855 if (__builtin_expect(gc->pc > gc->limit, 0)) {
856 (void) __glXFlushRenderBuffer(gc, gc->pc);
857 }
858 }
859
860 #define X_GLrop_Color4ubv 19
861 void
862 __indirect_glColor4ubv(const GLubyte *v)
863 {
864 generic_4_byte(X_GLrop_Color4ubv, v);
865 }
866
867 #define X_GLrop_Color4uiv 20
868 void
869 __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
870 {
871 __GLXcontext *const gc = __glXGetCurrentContext();
872 const GLuint cmdlen = 20;
873 emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
874 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
875 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
876 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
877 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
878 gc->pc += cmdlen;
879 if (__builtin_expect(gc->pc > gc->limit, 0)) {
880 (void) __glXFlushRenderBuffer(gc, gc->pc);
881 }
882 }
883
884 #define X_GLrop_Color4uiv 20
885 void
886 __indirect_glColor4uiv(const GLuint * v)
887 {
888 generic_16_byte(X_GLrop_Color4uiv, v);
889 }
890
891 #define X_GLrop_Color4usv 21
892 void
893 __indirect_glColor4us(GLushort red, GLushort green, GLushort blue,
894 GLushort alpha)
895 {
896 __GLXcontext *const gc = __glXGetCurrentContext();
897 const GLuint cmdlen = 12;
898 emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
899 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
900 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
901 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
902 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
903 gc->pc += cmdlen;
904 if (__builtin_expect(gc->pc > gc->limit, 0)) {
905 (void) __glXFlushRenderBuffer(gc, gc->pc);
906 }
907 }
908
909 #define X_GLrop_Color4usv 21
910 void
911 __indirect_glColor4usv(const GLushort * v)
912 {
913 generic_8_byte(X_GLrop_Color4usv, v);
914 }
915
916 #define X_GLrop_EdgeFlagv 22
917 void
918 __indirect_glEdgeFlag(GLboolean flag)
919 {
920 __GLXcontext *const gc = __glXGetCurrentContext();
921 const GLuint cmdlen = 8;
922 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
923 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
924 gc->pc += cmdlen;
925 if (__builtin_expect(gc->pc > gc->limit, 0)) {
926 (void) __glXFlushRenderBuffer(gc, gc->pc);
927 }
928 }
929
930 #define X_GLrop_EdgeFlagv 22
931 void
932 __indirect_glEdgeFlagv(const GLboolean * flag)
933 {
934 __GLXcontext *const gc = __glXGetCurrentContext();
935 const GLuint cmdlen = 8;
936 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
937 (void) memcpy((void *) (gc->pc + 4), (void *) (flag), 1);
938 gc->pc += cmdlen;
939 if (__builtin_expect(gc->pc > gc->limit, 0)) {
940 (void) __glXFlushRenderBuffer(gc, gc->pc);
941 }
942 }
943
944 #define X_GLrop_End 23
945 void
946 __indirect_glEnd(void)
947 {
948 __GLXcontext *const gc = __glXGetCurrentContext();
949 const GLuint cmdlen = 4;
950 emit_header(gc->pc, X_GLrop_End, cmdlen);
951 gc->pc += cmdlen;
952 if (__builtin_expect(gc->pc > gc->limit, 0)) {
953 (void) __glXFlushRenderBuffer(gc, gc->pc);
954 }
955 }
956
957 #define X_GLrop_Indexdv 24
958 void
959 __indirect_glIndexd(GLdouble c)
960 {
961 __GLXcontext *const gc = __glXGetCurrentContext();
962 const GLuint cmdlen = 12;
963 emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
964 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 8);
965 gc->pc += cmdlen;
966 if (__builtin_expect(gc->pc > gc->limit, 0)) {
967 (void) __glXFlushRenderBuffer(gc, gc->pc);
968 }
969 }
970
971 #define X_GLrop_Indexdv 24
972 void
973 __indirect_glIndexdv(const GLdouble * c)
974 {
975 generic_8_byte(X_GLrop_Indexdv, c);
976 }
977
978 #define X_GLrop_Indexfv 25
979 void
980 __indirect_glIndexf(GLfloat c)
981 {
982 __GLXcontext *const gc = __glXGetCurrentContext();
983 const GLuint cmdlen = 8;
984 emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
985 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
986 gc->pc += cmdlen;
987 if (__builtin_expect(gc->pc > gc->limit, 0)) {
988 (void) __glXFlushRenderBuffer(gc, gc->pc);
989 }
990 }
991
992 #define X_GLrop_Indexfv 25
993 void
994 __indirect_glIndexfv(const GLfloat * c)
995 {
996 generic_4_byte(X_GLrop_Indexfv, c);
997 }
998
999 #define X_GLrop_Indexiv 26
1000 void
1001 __indirect_glIndexi(GLint c)
1002 {
1003 __GLXcontext *const gc = __glXGetCurrentContext();
1004 const GLuint cmdlen = 8;
1005 emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
1006 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
1007 gc->pc += cmdlen;
1008 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1009 (void) __glXFlushRenderBuffer(gc, gc->pc);
1010 }
1011 }
1012
1013 #define X_GLrop_Indexiv 26
1014 void
1015 __indirect_glIndexiv(const GLint * c)
1016 {
1017 generic_4_byte(X_GLrop_Indexiv, c);
1018 }
1019
1020 #define X_GLrop_Indexsv 27
1021 void
1022 __indirect_glIndexs(GLshort c)
1023 {
1024 __GLXcontext *const gc = __glXGetCurrentContext();
1025 const GLuint cmdlen = 8;
1026 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1027 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 2);
1028 gc->pc += cmdlen;
1029 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1030 (void) __glXFlushRenderBuffer(gc, gc->pc);
1031 }
1032 }
1033
1034 #define X_GLrop_Indexsv 27
1035 void
1036 __indirect_glIndexsv(const GLshort * c)
1037 {
1038 __GLXcontext *const gc = __glXGetCurrentContext();
1039 const GLuint cmdlen = 8;
1040 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1041 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 2);
1042 gc->pc += cmdlen;
1043 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1044 (void) __glXFlushRenderBuffer(gc, gc->pc);
1045 }
1046 }
1047
1048 #define X_GLrop_Normal3bv 28
1049 void
1050 __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
1051 {
1052 __GLXcontext *const gc = __glXGetCurrentContext();
1053 const GLuint cmdlen = 8;
1054 emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
1055 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 1);
1056 (void) memcpy((void *) (gc->pc + 5), (void *) (&ny), 1);
1057 (void) memcpy((void *) (gc->pc + 6), (void *) (&nz), 1);
1058 gc->pc += cmdlen;
1059 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1060 (void) __glXFlushRenderBuffer(gc, gc->pc);
1061 }
1062 }
1063
1064 #define X_GLrop_Normal3bv 28
1065 void
1066 __indirect_glNormal3bv(const GLbyte *v)
1067 {
1068 generic_3_byte(X_GLrop_Normal3bv, v);
1069 }
1070
1071 #define X_GLrop_Normal3dv 29
1072 void
1073 __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
1074 {
1075 __GLXcontext *const gc = __glXGetCurrentContext();
1076 const GLuint cmdlen = 28;
1077 emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
1078 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 8);
1079 (void) memcpy((void *) (gc->pc + 12), (void *) (&ny), 8);
1080 (void) memcpy((void *) (gc->pc + 20), (void *) (&nz), 8);
1081 gc->pc += cmdlen;
1082 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1083 (void) __glXFlushRenderBuffer(gc, gc->pc);
1084 }
1085 }
1086
1087 #define X_GLrop_Normal3dv 29
1088 void
1089 __indirect_glNormal3dv(const GLdouble * v)
1090 {
1091 generic_24_byte(X_GLrop_Normal3dv, v);
1092 }
1093
1094 #define X_GLrop_Normal3fv 30
1095 void
1096 __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1097 {
1098 __GLXcontext *const gc = __glXGetCurrentContext();
1099 const GLuint cmdlen = 16;
1100 emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
1101 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1102 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1103 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1104 gc->pc += cmdlen;
1105 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1106 (void) __glXFlushRenderBuffer(gc, gc->pc);
1107 }
1108 }
1109
1110 #define X_GLrop_Normal3fv 30
1111 void
1112 __indirect_glNormal3fv(const GLfloat * v)
1113 {
1114 generic_12_byte(X_GLrop_Normal3fv, v);
1115 }
1116
1117 #define X_GLrop_Normal3iv 31
1118 void
1119 __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
1120 {
1121 __GLXcontext *const gc = __glXGetCurrentContext();
1122 const GLuint cmdlen = 16;
1123 emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
1124 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1125 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1126 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1127 gc->pc += cmdlen;
1128 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1129 (void) __glXFlushRenderBuffer(gc, gc->pc);
1130 }
1131 }
1132
1133 #define X_GLrop_Normal3iv 31
1134 void
1135 __indirect_glNormal3iv(const GLint * v)
1136 {
1137 generic_12_byte(X_GLrop_Normal3iv, v);
1138 }
1139
1140 #define X_GLrop_Normal3sv 32
1141 void
1142 __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
1143 {
1144 __GLXcontext *const gc = __glXGetCurrentContext();
1145 const GLuint cmdlen = 12;
1146 emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
1147 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 2);
1148 (void) memcpy((void *) (gc->pc + 6), (void *) (&ny), 2);
1149 (void) memcpy((void *) (gc->pc + 8), (void *) (&nz), 2);
1150 gc->pc += cmdlen;
1151 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1152 (void) __glXFlushRenderBuffer(gc, gc->pc);
1153 }
1154 }
1155
1156 #define X_GLrop_Normal3sv 32
1157 void
1158 __indirect_glNormal3sv(const GLshort * v)
1159 {
1160 generic_6_byte(X_GLrop_Normal3sv, v);
1161 }
1162
1163 #define X_GLrop_RasterPos2dv 33
1164 void
1165 __indirect_glRasterPos2d(GLdouble x, GLdouble y)
1166 {
1167 __GLXcontext *const gc = __glXGetCurrentContext();
1168 const GLuint cmdlen = 20;
1169 emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
1170 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1171 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1172 gc->pc += cmdlen;
1173 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1174 (void) __glXFlushRenderBuffer(gc, gc->pc);
1175 }
1176 }
1177
1178 #define X_GLrop_RasterPos2dv 33
1179 void
1180 __indirect_glRasterPos2dv(const GLdouble * v)
1181 {
1182 generic_16_byte(X_GLrop_RasterPos2dv, v);
1183 }
1184
1185 #define X_GLrop_RasterPos2fv 34
1186 void
1187 __indirect_glRasterPos2f(GLfloat x, GLfloat y)
1188 {
1189 __GLXcontext *const gc = __glXGetCurrentContext();
1190 const GLuint cmdlen = 12;
1191 emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
1192 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1193 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1194 gc->pc += cmdlen;
1195 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1196 (void) __glXFlushRenderBuffer(gc, gc->pc);
1197 }
1198 }
1199
1200 #define X_GLrop_RasterPos2fv 34
1201 void
1202 __indirect_glRasterPos2fv(const GLfloat * v)
1203 {
1204 generic_8_byte(X_GLrop_RasterPos2fv, v);
1205 }
1206
1207 #define X_GLrop_RasterPos2iv 35
1208 void
1209 __indirect_glRasterPos2i(GLint x, GLint y)
1210 {
1211 __GLXcontext *const gc = __glXGetCurrentContext();
1212 const GLuint cmdlen = 12;
1213 emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
1214 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1215 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1216 gc->pc += cmdlen;
1217 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1218 (void) __glXFlushRenderBuffer(gc, gc->pc);
1219 }
1220 }
1221
1222 #define X_GLrop_RasterPos2iv 35
1223 void
1224 __indirect_glRasterPos2iv(const GLint * v)
1225 {
1226 generic_8_byte(X_GLrop_RasterPos2iv, v);
1227 }
1228
1229 #define X_GLrop_RasterPos2sv 36
1230 void
1231 __indirect_glRasterPos2s(GLshort x, GLshort y)
1232 {
1233 __GLXcontext *const gc = __glXGetCurrentContext();
1234 const GLuint cmdlen = 8;
1235 emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
1236 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1237 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1238 gc->pc += cmdlen;
1239 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1240 (void) __glXFlushRenderBuffer(gc, gc->pc);
1241 }
1242 }
1243
1244 #define X_GLrop_RasterPos2sv 36
1245 void
1246 __indirect_glRasterPos2sv(const GLshort * v)
1247 {
1248 generic_4_byte(X_GLrop_RasterPos2sv, v);
1249 }
1250
1251 #define X_GLrop_RasterPos3dv 37
1252 void
1253 __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
1254 {
1255 __GLXcontext *const gc = __glXGetCurrentContext();
1256 const GLuint cmdlen = 28;
1257 emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
1258 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1259 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1260 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1261 gc->pc += cmdlen;
1262 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1263 (void) __glXFlushRenderBuffer(gc, gc->pc);
1264 }
1265 }
1266
1267 #define X_GLrop_RasterPos3dv 37
1268 void
1269 __indirect_glRasterPos3dv(const GLdouble * v)
1270 {
1271 generic_24_byte(X_GLrop_RasterPos3dv, v);
1272 }
1273
1274 #define X_GLrop_RasterPos3fv 38
1275 void
1276 __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
1277 {
1278 __GLXcontext *const gc = __glXGetCurrentContext();
1279 const GLuint cmdlen = 16;
1280 emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
1281 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1282 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1283 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1284 gc->pc += cmdlen;
1285 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1286 (void) __glXFlushRenderBuffer(gc, gc->pc);
1287 }
1288 }
1289
1290 #define X_GLrop_RasterPos3fv 38
1291 void
1292 __indirect_glRasterPos3fv(const GLfloat * v)
1293 {
1294 generic_12_byte(X_GLrop_RasterPos3fv, v);
1295 }
1296
1297 #define X_GLrop_RasterPos3iv 39
1298 void
1299 __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
1300 {
1301 __GLXcontext *const gc = __glXGetCurrentContext();
1302 const GLuint cmdlen = 16;
1303 emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
1304 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1305 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1306 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1307 gc->pc += cmdlen;
1308 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1309 (void) __glXFlushRenderBuffer(gc, gc->pc);
1310 }
1311 }
1312
1313 #define X_GLrop_RasterPos3iv 39
1314 void
1315 __indirect_glRasterPos3iv(const GLint * v)
1316 {
1317 generic_12_byte(X_GLrop_RasterPos3iv, v);
1318 }
1319
1320 #define X_GLrop_RasterPos3sv 40
1321 void
1322 __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
1323 {
1324 __GLXcontext *const gc = __glXGetCurrentContext();
1325 const GLuint cmdlen = 12;
1326 emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
1327 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1328 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1329 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1330 gc->pc += cmdlen;
1331 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1332 (void) __glXFlushRenderBuffer(gc, gc->pc);
1333 }
1334 }
1335
1336 #define X_GLrop_RasterPos3sv 40
1337 void
1338 __indirect_glRasterPos3sv(const GLshort * v)
1339 {
1340 generic_6_byte(X_GLrop_RasterPos3sv, v);
1341 }
1342
1343 #define X_GLrop_RasterPos4dv 41
1344 void
1345 __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1346 {
1347 __GLXcontext *const gc = __glXGetCurrentContext();
1348 const GLuint cmdlen = 36;
1349 emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
1350 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1351 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1352 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1353 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
1354 gc->pc += cmdlen;
1355 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1356 (void) __glXFlushRenderBuffer(gc, gc->pc);
1357 }
1358 }
1359
1360 #define X_GLrop_RasterPos4dv 41
1361 void
1362 __indirect_glRasterPos4dv(const GLdouble * v)
1363 {
1364 generic_32_byte(X_GLrop_RasterPos4dv, v);
1365 }
1366
1367 #define X_GLrop_RasterPos4fv 42
1368 void
1369 __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1370 {
1371 __GLXcontext *const gc = __glXGetCurrentContext();
1372 const GLuint cmdlen = 20;
1373 emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
1374 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1375 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1376 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1377 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1378 gc->pc += cmdlen;
1379 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1380 (void) __glXFlushRenderBuffer(gc, gc->pc);
1381 }
1382 }
1383
1384 #define X_GLrop_RasterPos4fv 42
1385 void
1386 __indirect_glRasterPos4fv(const GLfloat * v)
1387 {
1388 generic_16_byte(X_GLrop_RasterPos4fv, v);
1389 }
1390
1391 #define X_GLrop_RasterPos4iv 43
1392 void
1393 __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
1394 {
1395 __GLXcontext *const gc = __glXGetCurrentContext();
1396 const GLuint cmdlen = 20;
1397 emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
1398 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1399 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1400 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1401 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1402 gc->pc += cmdlen;
1403 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1404 (void) __glXFlushRenderBuffer(gc, gc->pc);
1405 }
1406 }
1407
1408 #define X_GLrop_RasterPos4iv 43
1409 void
1410 __indirect_glRasterPos4iv(const GLint * v)
1411 {
1412 generic_16_byte(X_GLrop_RasterPos4iv, v);
1413 }
1414
1415 #define X_GLrop_RasterPos4sv 44
1416 void
1417 __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
1418 {
1419 __GLXcontext *const gc = __glXGetCurrentContext();
1420 const GLuint cmdlen = 12;
1421 emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
1422 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1423 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1424 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1425 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
1426 gc->pc += cmdlen;
1427 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1428 (void) __glXFlushRenderBuffer(gc, gc->pc);
1429 }
1430 }
1431
1432 #define X_GLrop_RasterPos4sv 44
1433 void
1434 __indirect_glRasterPos4sv(const GLshort * v)
1435 {
1436 generic_8_byte(X_GLrop_RasterPos4sv, v);
1437 }
1438
1439 #define X_GLrop_Rectdv 45
1440 void
1441 __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1442 {
1443 __GLXcontext *const gc = __glXGetCurrentContext();
1444 const GLuint cmdlen = 36;
1445 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1446 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 8);
1447 (void) memcpy((void *) (gc->pc + 12), (void *) (&y1), 8);
1448 (void) memcpy((void *) (gc->pc + 20), (void *) (&x2), 8);
1449 (void) memcpy((void *) (gc->pc + 28), (void *) (&y2), 8);
1450 gc->pc += cmdlen;
1451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1452 (void) __glXFlushRenderBuffer(gc, gc->pc);
1453 }
1454 }
1455
1456 #define X_GLrop_Rectdv 45
1457 void
1458 __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
1459 {
1460 __GLXcontext *const gc = __glXGetCurrentContext();
1461 const GLuint cmdlen = 36;
1462 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1463 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 16);
1464 (void) memcpy((void *) (gc->pc + 20), (void *) (v2), 16);
1465 gc->pc += cmdlen;
1466 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1467 (void) __glXFlushRenderBuffer(gc, gc->pc);
1468 }
1469 }
1470
1471 #define X_GLrop_Rectfv 46
1472 void
1473 __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
1474 {
1475 __GLXcontext *const gc = __glXGetCurrentContext();
1476 const GLuint cmdlen = 20;
1477 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1478 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1479 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1480 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1481 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1482 gc->pc += cmdlen;
1483 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1484 (void) __glXFlushRenderBuffer(gc, gc->pc);
1485 }
1486 }
1487
1488 #define X_GLrop_Rectfv 46
1489 void
1490 __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
1491 {
1492 __GLXcontext *const gc = __glXGetCurrentContext();
1493 const GLuint cmdlen = 20;
1494 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1495 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1496 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1497 gc->pc += cmdlen;
1498 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1499 (void) __glXFlushRenderBuffer(gc, gc->pc);
1500 }
1501 }
1502
1503 #define X_GLrop_Rectiv 47
1504 void
1505 __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
1506 {
1507 __GLXcontext *const gc = __glXGetCurrentContext();
1508 const GLuint cmdlen = 20;
1509 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1510 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1511 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1512 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1513 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1514 gc->pc += cmdlen;
1515 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1516 (void) __glXFlushRenderBuffer(gc, gc->pc);
1517 }
1518 }
1519
1520 #define X_GLrop_Rectiv 47
1521 void
1522 __indirect_glRectiv(const GLint * v1, const GLint * v2)
1523 {
1524 __GLXcontext *const gc = __glXGetCurrentContext();
1525 const GLuint cmdlen = 20;
1526 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1527 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1528 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1529 gc->pc += cmdlen;
1530 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1531 (void) __glXFlushRenderBuffer(gc, gc->pc);
1532 }
1533 }
1534
1535 #define X_GLrop_Rectsv 48
1536 void
1537 __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1538 {
1539 __GLXcontext *const gc = __glXGetCurrentContext();
1540 const GLuint cmdlen = 12;
1541 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1542 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 2);
1543 (void) memcpy((void *) (gc->pc + 6), (void *) (&y1), 2);
1544 (void) memcpy((void *) (gc->pc + 8), (void *) (&x2), 2);
1545 (void) memcpy((void *) (gc->pc + 10), (void *) (&y2), 2);
1546 gc->pc += cmdlen;
1547 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1548 (void) __glXFlushRenderBuffer(gc, gc->pc);
1549 }
1550 }
1551
1552 #define X_GLrop_Rectsv 48
1553 void
1554 __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
1555 {
1556 __GLXcontext *const gc = __glXGetCurrentContext();
1557 const GLuint cmdlen = 12;
1558 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1559 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 4);
1560 (void) memcpy((void *) (gc->pc + 8), (void *) (v2), 4);
1561 gc->pc += cmdlen;
1562 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1563 (void) __glXFlushRenderBuffer(gc, gc->pc);
1564 }
1565 }
1566
1567 #define X_GLrop_TexCoord1dv 49
1568 void
1569 __indirect_glTexCoord1d(GLdouble s)
1570 {
1571 __GLXcontext *const gc = __glXGetCurrentContext();
1572 const GLuint cmdlen = 12;
1573 emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
1574 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1575 gc->pc += cmdlen;
1576 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1577 (void) __glXFlushRenderBuffer(gc, gc->pc);
1578 }
1579 }
1580
1581 #define X_GLrop_TexCoord1dv 49
1582 void
1583 __indirect_glTexCoord1dv(const GLdouble * v)
1584 {
1585 generic_8_byte(X_GLrop_TexCoord1dv, v);
1586 }
1587
1588 #define X_GLrop_TexCoord1fv 50
1589 void
1590 __indirect_glTexCoord1f(GLfloat s)
1591 {
1592 __GLXcontext *const gc = __glXGetCurrentContext();
1593 const GLuint cmdlen = 8;
1594 emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
1595 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1596 gc->pc += cmdlen;
1597 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1598 (void) __glXFlushRenderBuffer(gc, gc->pc);
1599 }
1600 }
1601
1602 #define X_GLrop_TexCoord1fv 50
1603 void
1604 __indirect_glTexCoord1fv(const GLfloat * v)
1605 {
1606 generic_4_byte(X_GLrop_TexCoord1fv, v);
1607 }
1608
1609 #define X_GLrop_TexCoord1iv 51
1610 void
1611 __indirect_glTexCoord1i(GLint s)
1612 {
1613 __GLXcontext *const gc = __glXGetCurrentContext();
1614 const GLuint cmdlen = 8;
1615 emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
1616 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1617 gc->pc += cmdlen;
1618 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1619 (void) __glXFlushRenderBuffer(gc, gc->pc);
1620 }
1621 }
1622
1623 #define X_GLrop_TexCoord1iv 51
1624 void
1625 __indirect_glTexCoord1iv(const GLint * v)
1626 {
1627 generic_4_byte(X_GLrop_TexCoord1iv, v);
1628 }
1629
1630 #define X_GLrop_TexCoord1sv 52
1631 void
1632 __indirect_glTexCoord1s(GLshort s)
1633 {
1634 __GLXcontext *const gc = __glXGetCurrentContext();
1635 const GLuint cmdlen = 8;
1636 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1637 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1638 gc->pc += cmdlen;
1639 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1640 (void) __glXFlushRenderBuffer(gc, gc->pc);
1641 }
1642 }
1643
1644 #define X_GLrop_TexCoord1sv 52
1645 void
1646 __indirect_glTexCoord1sv(const GLshort * v)
1647 {
1648 __GLXcontext *const gc = __glXGetCurrentContext();
1649 const GLuint cmdlen = 8;
1650 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1651 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 2);
1652 gc->pc += cmdlen;
1653 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1654 (void) __glXFlushRenderBuffer(gc, gc->pc);
1655 }
1656 }
1657
1658 #define X_GLrop_TexCoord2dv 53
1659 void
1660 __indirect_glTexCoord2d(GLdouble s, GLdouble t)
1661 {
1662 __GLXcontext *const gc = __glXGetCurrentContext();
1663 const GLuint cmdlen = 20;
1664 emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
1665 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1666 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1667 gc->pc += cmdlen;
1668 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1669 (void) __glXFlushRenderBuffer(gc, gc->pc);
1670 }
1671 }
1672
1673 #define X_GLrop_TexCoord2dv 53
1674 void
1675 __indirect_glTexCoord2dv(const GLdouble * v)
1676 {
1677 generic_16_byte(X_GLrop_TexCoord2dv, v);
1678 }
1679
1680 #define X_GLrop_TexCoord2fv 54
1681 void
1682 __indirect_glTexCoord2f(GLfloat s, GLfloat t)
1683 {
1684 __GLXcontext *const gc = __glXGetCurrentContext();
1685 const GLuint cmdlen = 12;
1686 emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
1687 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1688 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1689 gc->pc += cmdlen;
1690 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1691 (void) __glXFlushRenderBuffer(gc, gc->pc);
1692 }
1693 }
1694
1695 #define X_GLrop_TexCoord2fv 54
1696 void
1697 __indirect_glTexCoord2fv(const GLfloat * v)
1698 {
1699 generic_8_byte(X_GLrop_TexCoord2fv, v);
1700 }
1701
1702 #define X_GLrop_TexCoord2iv 55
1703 void
1704 __indirect_glTexCoord2i(GLint s, GLint t)
1705 {
1706 __GLXcontext *const gc = __glXGetCurrentContext();
1707 const GLuint cmdlen = 12;
1708 emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
1709 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1710 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1711 gc->pc += cmdlen;
1712 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1713 (void) __glXFlushRenderBuffer(gc, gc->pc);
1714 }
1715 }
1716
1717 #define X_GLrop_TexCoord2iv 55
1718 void
1719 __indirect_glTexCoord2iv(const GLint * v)
1720 {
1721 generic_8_byte(X_GLrop_TexCoord2iv, v);
1722 }
1723
1724 #define X_GLrop_TexCoord2sv 56
1725 void
1726 __indirect_glTexCoord2s(GLshort s, GLshort t)
1727 {
1728 __GLXcontext *const gc = __glXGetCurrentContext();
1729 const GLuint cmdlen = 8;
1730 emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
1731 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1732 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1733 gc->pc += cmdlen;
1734 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1735 (void) __glXFlushRenderBuffer(gc, gc->pc);
1736 }
1737 }
1738
1739 #define X_GLrop_TexCoord2sv 56
1740 void
1741 __indirect_glTexCoord2sv(const GLshort * v)
1742 {
1743 generic_4_byte(X_GLrop_TexCoord2sv, v);
1744 }
1745
1746 #define X_GLrop_TexCoord3dv 57
1747 void
1748 __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
1749 {
1750 __GLXcontext *const gc = __glXGetCurrentContext();
1751 const GLuint cmdlen = 28;
1752 emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
1753 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1754 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1755 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1756 gc->pc += cmdlen;
1757 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1758 (void) __glXFlushRenderBuffer(gc, gc->pc);
1759 }
1760 }
1761
1762 #define X_GLrop_TexCoord3dv 57
1763 void
1764 __indirect_glTexCoord3dv(const GLdouble * v)
1765 {
1766 generic_24_byte(X_GLrop_TexCoord3dv, v);
1767 }
1768
1769 #define X_GLrop_TexCoord3fv 58
1770 void
1771 __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
1772 {
1773 __GLXcontext *const gc = __glXGetCurrentContext();
1774 const GLuint cmdlen = 16;
1775 emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
1776 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1777 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1778 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1779 gc->pc += cmdlen;
1780 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1781 (void) __glXFlushRenderBuffer(gc, gc->pc);
1782 }
1783 }
1784
1785 #define X_GLrop_TexCoord3fv 58
1786 void
1787 __indirect_glTexCoord3fv(const GLfloat * v)
1788 {
1789 generic_12_byte(X_GLrop_TexCoord3fv, v);
1790 }
1791
1792 #define X_GLrop_TexCoord3iv 59
1793 void
1794 __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
1795 {
1796 __GLXcontext *const gc = __glXGetCurrentContext();
1797 const GLuint cmdlen = 16;
1798 emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
1799 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1800 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1801 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1802 gc->pc += cmdlen;
1803 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1804 (void) __glXFlushRenderBuffer(gc, gc->pc);
1805 }
1806 }
1807
1808 #define X_GLrop_TexCoord3iv 59
1809 void
1810 __indirect_glTexCoord3iv(const GLint * v)
1811 {
1812 generic_12_byte(X_GLrop_TexCoord3iv, v);
1813 }
1814
1815 #define X_GLrop_TexCoord3sv 60
1816 void
1817 __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
1818 {
1819 __GLXcontext *const gc = __glXGetCurrentContext();
1820 const GLuint cmdlen = 12;
1821 emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
1822 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1823 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1824 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1825 gc->pc += cmdlen;
1826 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1827 (void) __glXFlushRenderBuffer(gc, gc->pc);
1828 }
1829 }
1830
1831 #define X_GLrop_TexCoord3sv 60
1832 void
1833 __indirect_glTexCoord3sv(const GLshort * v)
1834 {
1835 generic_6_byte(X_GLrop_TexCoord3sv, v);
1836 }
1837
1838 #define X_GLrop_TexCoord4dv 61
1839 void
1840 __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1841 {
1842 __GLXcontext *const gc = __glXGetCurrentContext();
1843 const GLuint cmdlen = 36;
1844 emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
1845 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1846 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1847 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1848 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
1849 gc->pc += cmdlen;
1850 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1851 (void) __glXFlushRenderBuffer(gc, gc->pc);
1852 }
1853 }
1854
1855 #define X_GLrop_TexCoord4dv 61
1856 void
1857 __indirect_glTexCoord4dv(const GLdouble * v)
1858 {
1859 generic_32_byte(X_GLrop_TexCoord4dv, v);
1860 }
1861
1862 #define X_GLrop_TexCoord4fv 62
1863 void
1864 __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1865 {
1866 __GLXcontext *const gc = __glXGetCurrentContext();
1867 const GLuint cmdlen = 20;
1868 emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
1869 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1870 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1871 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1872 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1873 gc->pc += cmdlen;
1874 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1875 (void) __glXFlushRenderBuffer(gc, gc->pc);
1876 }
1877 }
1878
1879 #define X_GLrop_TexCoord4fv 62
1880 void
1881 __indirect_glTexCoord4fv(const GLfloat * v)
1882 {
1883 generic_16_byte(X_GLrop_TexCoord4fv, v);
1884 }
1885
1886 #define X_GLrop_TexCoord4iv 63
1887 void
1888 __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
1889 {
1890 __GLXcontext *const gc = __glXGetCurrentContext();
1891 const GLuint cmdlen = 20;
1892 emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
1893 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1894 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1895 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1896 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1897 gc->pc += cmdlen;
1898 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1899 (void) __glXFlushRenderBuffer(gc, gc->pc);
1900 }
1901 }
1902
1903 #define X_GLrop_TexCoord4iv 63
1904 void
1905 __indirect_glTexCoord4iv(const GLint * v)
1906 {
1907 generic_16_byte(X_GLrop_TexCoord4iv, v);
1908 }
1909
1910 #define X_GLrop_TexCoord4sv 64
1911 void
1912 __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
1913 {
1914 __GLXcontext *const gc = __glXGetCurrentContext();
1915 const GLuint cmdlen = 12;
1916 emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
1917 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1918 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1919 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1920 (void) memcpy((void *) (gc->pc + 10), (void *) (&q), 2);
1921 gc->pc += cmdlen;
1922 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1923 (void) __glXFlushRenderBuffer(gc, gc->pc);
1924 }
1925 }
1926
1927 #define X_GLrop_TexCoord4sv 64
1928 void
1929 __indirect_glTexCoord4sv(const GLshort * v)
1930 {
1931 generic_8_byte(X_GLrop_TexCoord4sv, v);
1932 }
1933
1934 #define X_GLrop_Vertex2dv 65
1935 void
1936 __indirect_glVertex2d(GLdouble x, GLdouble y)
1937 {
1938 __GLXcontext *const gc = __glXGetCurrentContext();
1939 const GLuint cmdlen = 20;
1940 emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
1941 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1942 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1943 gc->pc += cmdlen;
1944 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1945 (void) __glXFlushRenderBuffer(gc, gc->pc);
1946 }
1947 }
1948
1949 #define X_GLrop_Vertex2dv 65
1950 void
1951 __indirect_glVertex2dv(const GLdouble * v)
1952 {
1953 generic_16_byte(X_GLrop_Vertex2dv, v);
1954 }
1955
1956 #define X_GLrop_Vertex2fv 66
1957 void
1958 __indirect_glVertex2f(GLfloat x, GLfloat y)
1959 {
1960 __GLXcontext *const gc = __glXGetCurrentContext();
1961 const GLuint cmdlen = 12;
1962 emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
1963 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1964 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1965 gc->pc += cmdlen;
1966 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1967 (void) __glXFlushRenderBuffer(gc, gc->pc);
1968 }
1969 }
1970
1971 #define X_GLrop_Vertex2fv 66
1972 void
1973 __indirect_glVertex2fv(const GLfloat * v)
1974 {
1975 generic_8_byte(X_GLrop_Vertex2fv, v);
1976 }
1977
1978 #define X_GLrop_Vertex2iv 67
1979 void
1980 __indirect_glVertex2i(GLint x, GLint y)
1981 {
1982 __GLXcontext *const gc = __glXGetCurrentContext();
1983 const GLuint cmdlen = 12;
1984 emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
1985 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1986 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1987 gc->pc += cmdlen;
1988 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1989 (void) __glXFlushRenderBuffer(gc, gc->pc);
1990 }
1991 }
1992
1993 #define X_GLrop_Vertex2iv 67
1994 void
1995 __indirect_glVertex2iv(const GLint * v)
1996 {
1997 generic_8_byte(X_GLrop_Vertex2iv, v);
1998 }
1999
2000 #define X_GLrop_Vertex2sv 68
2001 void
2002 __indirect_glVertex2s(GLshort x, GLshort y)
2003 {
2004 __GLXcontext *const gc = __glXGetCurrentContext();
2005 const GLuint cmdlen = 8;
2006 emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
2007 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2008 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2009 gc->pc += cmdlen;
2010 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2011 (void) __glXFlushRenderBuffer(gc, gc->pc);
2012 }
2013 }
2014
2015 #define X_GLrop_Vertex2sv 68
2016 void
2017 __indirect_glVertex2sv(const GLshort * v)
2018 {
2019 generic_4_byte(X_GLrop_Vertex2sv, v);
2020 }
2021
2022 #define X_GLrop_Vertex3dv 69
2023 void
2024 __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
2025 {
2026 __GLXcontext *const gc = __glXGetCurrentContext();
2027 const GLuint cmdlen = 28;
2028 emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
2029 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2030 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2031 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2032 gc->pc += cmdlen;
2033 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2034 (void) __glXFlushRenderBuffer(gc, gc->pc);
2035 }
2036 }
2037
2038 #define X_GLrop_Vertex3dv 69
2039 void
2040 __indirect_glVertex3dv(const GLdouble * v)
2041 {
2042 generic_24_byte(X_GLrop_Vertex3dv, v);
2043 }
2044
2045 #define X_GLrop_Vertex3fv 70
2046 void
2047 __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
2048 {
2049 __GLXcontext *const gc = __glXGetCurrentContext();
2050 const GLuint cmdlen = 16;
2051 emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
2052 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2053 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2054 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2055 gc->pc += cmdlen;
2056 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2057 (void) __glXFlushRenderBuffer(gc, gc->pc);
2058 }
2059 }
2060
2061 #define X_GLrop_Vertex3fv 70
2062 void
2063 __indirect_glVertex3fv(const GLfloat * v)
2064 {
2065 generic_12_byte(X_GLrop_Vertex3fv, v);
2066 }
2067
2068 #define X_GLrop_Vertex3iv 71
2069 void
2070 __indirect_glVertex3i(GLint x, GLint y, GLint z)
2071 {
2072 __GLXcontext *const gc = __glXGetCurrentContext();
2073 const GLuint cmdlen = 16;
2074 emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
2075 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2076 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2077 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2078 gc->pc += cmdlen;
2079 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2080 (void) __glXFlushRenderBuffer(gc, gc->pc);
2081 }
2082 }
2083
2084 #define X_GLrop_Vertex3iv 71
2085 void
2086 __indirect_glVertex3iv(const GLint * v)
2087 {
2088 generic_12_byte(X_GLrop_Vertex3iv, v);
2089 }
2090
2091 #define X_GLrop_Vertex3sv 72
2092 void
2093 __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
2094 {
2095 __GLXcontext *const gc = __glXGetCurrentContext();
2096 const GLuint cmdlen = 12;
2097 emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
2098 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2099 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2100 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2101 gc->pc += cmdlen;
2102 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2103 (void) __glXFlushRenderBuffer(gc, gc->pc);
2104 }
2105 }
2106
2107 #define X_GLrop_Vertex3sv 72
2108 void
2109 __indirect_glVertex3sv(const GLshort * v)
2110 {
2111 generic_6_byte(X_GLrop_Vertex3sv, v);
2112 }
2113
2114 #define X_GLrop_Vertex4dv 73
2115 void
2116 __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
2117 {
2118 __GLXcontext *const gc = __glXGetCurrentContext();
2119 const GLuint cmdlen = 36;
2120 emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
2121 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2122 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2123 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2124 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
2125 gc->pc += cmdlen;
2126 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2127 (void) __glXFlushRenderBuffer(gc, gc->pc);
2128 }
2129 }
2130
2131 #define X_GLrop_Vertex4dv 73
2132 void
2133 __indirect_glVertex4dv(const GLdouble * v)
2134 {
2135 generic_32_byte(X_GLrop_Vertex4dv, v);
2136 }
2137
2138 #define X_GLrop_Vertex4fv 74
2139 void
2140 __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2141 {
2142 __GLXcontext *const gc = __glXGetCurrentContext();
2143 const GLuint cmdlen = 20;
2144 emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
2145 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2146 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2147 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2148 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2149 gc->pc += cmdlen;
2150 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2151 (void) __glXFlushRenderBuffer(gc, gc->pc);
2152 }
2153 }
2154
2155 #define X_GLrop_Vertex4fv 74
2156 void
2157 __indirect_glVertex4fv(const GLfloat * v)
2158 {
2159 generic_16_byte(X_GLrop_Vertex4fv, v);
2160 }
2161
2162 #define X_GLrop_Vertex4iv 75
2163 void
2164 __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
2165 {
2166 __GLXcontext *const gc = __glXGetCurrentContext();
2167 const GLuint cmdlen = 20;
2168 emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
2169 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2170 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2171 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2172 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2173 gc->pc += cmdlen;
2174 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2175 (void) __glXFlushRenderBuffer(gc, gc->pc);
2176 }
2177 }
2178
2179 #define X_GLrop_Vertex4iv 75
2180 void
2181 __indirect_glVertex4iv(const GLint * v)
2182 {
2183 generic_16_byte(X_GLrop_Vertex4iv, v);
2184 }
2185
2186 #define X_GLrop_Vertex4sv 76
2187 void
2188 __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
2189 {
2190 __GLXcontext *const gc = __glXGetCurrentContext();
2191 const GLuint cmdlen = 12;
2192 emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
2193 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2194 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2195 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2196 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
2197 gc->pc += cmdlen;
2198 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2199 (void) __glXFlushRenderBuffer(gc, gc->pc);
2200 }
2201 }
2202
2203 #define X_GLrop_Vertex4sv 76
2204 void
2205 __indirect_glVertex4sv(const GLshort * v)
2206 {
2207 generic_8_byte(X_GLrop_Vertex4sv, v);
2208 }
2209
2210 #define X_GLrop_ClipPlane 77
2211 void
2212 __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
2213 {
2214 __GLXcontext *const gc = __glXGetCurrentContext();
2215 const GLuint cmdlen = 40;
2216 emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
2217 (void) memcpy((void *) (gc->pc + 4), (void *) (equation), 32);
2218 (void) memcpy((void *) (gc->pc + 36), (void *) (&plane), 4);
2219 gc->pc += cmdlen;
2220 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2221 (void) __glXFlushRenderBuffer(gc, gc->pc);
2222 }
2223 }
2224
2225 #define X_GLrop_ColorMaterial 78
2226 void
2227 __indirect_glColorMaterial(GLenum face, GLenum mode)
2228 {
2229 __GLXcontext *const gc = __glXGetCurrentContext();
2230 const GLuint cmdlen = 12;
2231 emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
2232 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2233 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2234 gc->pc += cmdlen;
2235 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2236 (void) __glXFlushRenderBuffer(gc, gc->pc);
2237 }
2238 }
2239
2240 #define X_GLrop_CullFace 79
2241 void
2242 __indirect_glCullFace(GLenum mode)
2243 {
2244 __GLXcontext *const gc = __glXGetCurrentContext();
2245 const GLuint cmdlen = 8;
2246 emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
2247 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2248 gc->pc += cmdlen;
2249 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2250 (void) __glXFlushRenderBuffer(gc, gc->pc);
2251 }
2252 }
2253
2254 #define X_GLrop_Fogf 80
2255 void
2256 __indirect_glFogf(GLenum pname, GLfloat param)
2257 {
2258 __GLXcontext *const gc = __glXGetCurrentContext();
2259 const GLuint cmdlen = 12;
2260 emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
2261 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2262 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2263 gc->pc += cmdlen;
2264 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2265 (void) __glXFlushRenderBuffer(gc, gc->pc);
2266 }
2267 }
2268
2269 #define X_GLrop_Fogfv 81
2270 void
2271 __indirect_glFogfv(GLenum pname, const GLfloat * params)
2272 {
2273 __GLXcontext *const gc = __glXGetCurrentContext();
2274 const GLuint compsize = __glFogfv_size(pname);
2275 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2276 emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
2277 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2278 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2279 gc->pc += cmdlen;
2280 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2281 (void) __glXFlushRenderBuffer(gc, gc->pc);
2282 }
2283 }
2284
2285 #define X_GLrop_Fogi 82
2286 void
2287 __indirect_glFogi(GLenum pname, GLint param)
2288 {
2289 __GLXcontext *const gc = __glXGetCurrentContext();
2290 const GLuint cmdlen = 12;
2291 emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
2292 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2293 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2294 gc->pc += cmdlen;
2295 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2296 (void) __glXFlushRenderBuffer(gc, gc->pc);
2297 }
2298 }
2299
2300 #define X_GLrop_Fogiv 83
2301 void
2302 __indirect_glFogiv(GLenum pname, const GLint * params)
2303 {
2304 __GLXcontext *const gc = __glXGetCurrentContext();
2305 const GLuint compsize = __glFogiv_size(pname);
2306 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2307 emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
2308 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2309 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2310 gc->pc += cmdlen;
2311 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2312 (void) __glXFlushRenderBuffer(gc, gc->pc);
2313 }
2314 }
2315
2316 #define X_GLrop_FrontFace 84
2317 void
2318 __indirect_glFrontFace(GLenum mode)
2319 {
2320 __GLXcontext *const gc = __glXGetCurrentContext();
2321 const GLuint cmdlen = 8;
2322 emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
2323 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2324 gc->pc += cmdlen;
2325 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2326 (void) __glXFlushRenderBuffer(gc, gc->pc);
2327 }
2328 }
2329
2330 #define X_GLrop_Hint 85
2331 void
2332 __indirect_glHint(GLenum target, GLenum mode)
2333 {
2334 __GLXcontext *const gc = __glXGetCurrentContext();
2335 const GLuint cmdlen = 12;
2336 emit_header(gc->pc, X_GLrop_Hint, cmdlen);
2337 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2338 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2339 gc->pc += cmdlen;
2340 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2341 (void) __glXFlushRenderBuffer(gc, gc->pc);
2342 }
2343 }
2344
2345 #define X_GLrop_Lightf 86
2346 void
2347 __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
2348 {
2349 __GLXcontext *const gc = __glXGetCurrentContext();
2350 const GLuint cmdlen = 16;
2351 emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
2352 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2353 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2354 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2355 gc->pc += cmdlen;
2356 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2357 (void) __glXFlushRenderBuffer(gc, gc->pc);
2358 }
2359 }
2360
2361 #define X_GLrop_Lightfv 87
2362 void
2363 __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
2364 {
2365 __GLXcontext *const gc = __glXGetCurrentContext();
2366 const GLuint compsize = __glLightfv_size(pname);
2367 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2368 emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
2369 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2370 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2371 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2372 gc->pc += cmdlen;
2373 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2374 (void) __glXFlushRenderBuffer(gc, gc->pc);
2375 }
2376 }
2377
2378 #define X_GLrop_Lighti 88
2379 void
2380 __indirect_glLighti(GLenum light, GLenum pname, GLint param)
2381 {
2382 __GLXcontext *const gc = __glXGetCurrentContext();
2383 const GLuint cmdlen = 16;
2384 emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
2385 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2386 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2387 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2388 gc->pc += cmdlen;
2389 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2390 (void) __glXFlushRenderBuffer(gc, gc->pc);
2391 }
2392 }
2393
2394 #define X_GLrop_Lightiv 89
2395 void
2396 __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
2397 {
2398 __GLXcontext *const gc = __glXGetCurrentContext();
2399 const GLuint compsize = __glLightiv_size(pname);
2400 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2401 emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
2402 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2403 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2404 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2405 gc->pc += cmdlen;
2406 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2407 (void) __glXFlushRenderBuffer(gc, gc->pc);
2408 }
2409 }
2410
2411 #define X_GLrop_LightModelf 90
2412 void
2413 __indirect_glLightModelf(GLenum pname, GLfloat param)
2414 {
2415 __GLXcontext *const gc = __glXGetCurrentContext();
2416 const GLuint cmdlen = 12;
2417 emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
2418 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2419 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2420 gc->pc += cmdlen;
2421 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2422 (void) __glXFlushRenderBuffer(gc, gc->pc);
2423 }
2424 }
2425
2426 #define X_GLrop_LightModelfv 91
2427 void
2428 __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
2429 {
2430 __GLXcontext *const gc = __glXGetCurrentContext();
2431 const GLuint compsize = __glLightModelfv_size(pname);
2432 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2433 emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
2434 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2435 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2436 gc->pc += cmdlen;
2437 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2438 (void) __glXFlushRenderBuffer(gc, gc->pc);
2439 }
2440 }
2441
2442 #define X_GLrop_LightModeli 92
2443 void
2444 __indirect_glLightModeli(GLenum pname, GLint param)
2445 {
2446 __GLXcontext *const gc = __glXGetCurrentContext();
2447 const GLuint cmdlen = 12;
2448 emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
2449 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2450 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2451 gc->pc += cmdlen;
2452 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2453 (void) __glXFlushRenderBuffer(gc, gc->pc);
2454 }
2455 }
2456
2457 #define X_GLrop_LightModeliv 93
2458 void
2459 __indirect_glLightModeliv(GLenum pname, const GLint * params)
2460 {
2461 __GLXcontext *const gc = __glXGetCurrentContext();
2462 const GLuint compsize = __glLightModeliv_size(pname);
2463 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2464 emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
2465 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2466 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2467 gc->pc += cmdlen;
2468 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2469 (void) __glXFlushRenderBuffer(gc, gc->pc);
2470 }
2471 }
2472
2473 #define X_GLrop_LineStipple 94
2474 void
2475 __indirect_glLineStipple(GLint factor, GLushort pattern)
2476 {
2477 __GLXcontext *const gc = __glXGetCurrentContext();
2478 const GLuint cmdlen = 12;
2479 emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
2480 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
2481 (void) memcpy((void *) (gc->pc + 8), (void *) (&pattern), 2);
2482 gc->pc += cmdlen;
2483 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2484 (void) __glXFlushRenderBuffer(gc, gc->pc);
2485 }
2486 }
2487
2488 #define X_GLrop_LineWidth 95
2489 void
2490 __indirect_glLineWidth(GLfloat width)
2491 {
2492 __GLXcontext *const gc = __glXGetCurrentContext();
2493 const GLuint cmdlen = 8;
2494 emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
2495 (void) memcpy((void *) (gc->pc + 4), (void *) (&width), 4);
2496 gc->pc += cmdlen;
2497 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2498 (void) __glXFlushRenderBuffer(gc, gc->pc);
2499 }
2500 }
2501
2502 #define X_GLrop_Materialf 96
2503 void
2504 __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
2505 {
2506 __GLXcontext *const gc = __glXGetCurrentContext();
2507 const GLuint cmdlen = 16;
2508 emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
2509 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2510 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2511 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2512 gc->pc += cmdlen;
2513 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2514 (void) __glXFlushRenderBuffer(gc, gc->pc);
2515 }
2516 }
2517
2518 #define X_GLrop_Materialfv 97
2519 void
2520 __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
2521 {
2522 __GLXcontext *const gc = __glXGetCurrentContext();
2523 const GLuint compsize = __glMaterialfv_size(pname);
2524 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2525 emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
2526 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2527 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2528 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2529 gc->pc += cmdlen;
2530 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2531 (void) __glXFlushRenderBuffer(gc, gc->pc);
2532 }
2533 }
2534
2535 #define X_GLrop_Materiali 98
2536 void
2537 __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
2538 {
2539 __GLXcontext *const gc = __glXGetCurrentContext();
2540 const GLuint cmdlen = 16;
2541 emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
2542 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2543 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2544 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2545 gc->pc += cmdlen;
2546 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2547 (void) __glXFlushRenderBuffer(gc, gc->pc);
2548 }
2549 }
2550
2551 #define X_GLrop_Materialiv 99
2552 void
2553 __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
2554 {
2555 __GLXcontext *const gc = __glXGetCurrentContext();
2556 const GLuint compsize = __glMaterialiv_size(pname);
2557 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2558 emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
2559 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2560 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2561 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2562 gc->pc += cmdlen;
2563 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2564 (void) __glXFlushRenderBuffer(gc, gc->pc);
2565 }
2566 }
2567
2568 #define X_GLrop_PointSize 100
2569 void
2570 __indirect_glPointSize(GLfloat size)
2571 {
2572 __GLXcontext *const gc = __glXGetCurrentContext();
2573 const GLuint cmdlen = 8;
2574 emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
2575 (void) memcpy((void *) (gc->pc + 4), (void *) (&size), 4);
2576 gc->pc += cmdlen;
2577 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2578 (void) __glXFlushRenderBuffer(gc, gc->pc);
2579 }
2580 }
2581
2582 #define X_GLrop_PolygonMode 101
2583 void
2584 __indirect_glPolygonMode(GLenum face, GLenum mode)
2585 {
2586 __GLXcontext *const gc = __glXGetCurrentContext();
2587 const GLuint cmdlen = 12;
2588 emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
2589 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2590 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2591 gc->pc += cmdlen;
2592 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2593 (void) __glXFlushRenderBuffer(gc, gc->pc);
2594 }
2595 }
2596
2597 #define X_GLrop_PolygonStipple 102
2598 void
2599 __indirect_glPolygonStipple(const GLubyte *mask)
2600 {
2601 __GLXcontext *const gc = __glXGetCurrentContext();
2602 const GLuint compsize =
2603 (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
2604 0) : 0;
2605 const GLuint cmdlen = 24 + __GLX_PAD(compsize);
2606 emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
2607 if (compsize > 0) {
2608 (*gc->fillImage) (gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask,
2609 gc->pc + 24, gc->pc + 4);
2610 } else {
2611 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2612 default_pixel_store_2D_size);
2613 }
2614 gc->pc += cmdlen;
2615 if (gc->pc > gc->limit) {
2616 (void) __glXFlushRenderBuffer(gc, gc->pc);
2617 }
2618 }
2619
2620 #define X_GLrop_Scissor 103
2621 void
2622 __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
2623 {
2624 __GLXcontext *const gc = __glXGetCurrentContext();
2625 const GLuint cmdlen = 20;
2626 emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
2627 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2628 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2629 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
2630 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
2631 gc->pc += cmdlen;
2632 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2633 (void) __glXFlushRenderBuffer(gc, gc->pc);
2634 }
2635 }
2636
2637 #define X_GLrop_ShadeModel 104
2638 void
2639 __indirect_glShadeModel(GLenum mode)
2640 {
2641 __GLXcontext *const gc = __glXGetCurrentContext();
2642 const GLuint cmdlen = 8;
2643 emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
2644 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2645 gc->pc += cmdlen;
2646 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2647 (void) __glXFlushRenderBuffer(gc, gc->pc);
2648 }
2649 }
2650
2651 #define X_GLrop_TexParameterf 105
2652 void
2653 __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
2654 {
2655 __GLXcontext *const gc = __glXGetCurrentContext();
2656 const GLuint cmdlen = 16;
2657 emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
2658 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2659 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2660 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2661 gc->pc += cmdlen;
2662 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2663 (void) __glXFlushRenderBuffer(gc, gc->pc);
2664 }
2665 }
2666
2667 #define X_GLrop_TexParameterfv 106
2668 void
2669 __indirect_glTexParameterfv(GLenum target, GLenum pname,
2670 const GLfloat * params)
2671 {
2672 __GLXcontext *const gc = __glXGetCurrentContext();
2673 const GLuint compsize = __glTexParameterfv_size(pname);
2674 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2675 emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
2676 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2677 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2678 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2679 gc->pc += cmdlen;
2680 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2681 (void) __glXFlushRenderBuffer(gc, gc->pc);
2682 }
2683 }
2684
2685 #define X_GLrop_TexParameteri 107
2686 void
2687 __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
2688 {
2689 __GLXcontext *const gc = __glXGetCurrentContext();
2690 const GLuint cmdlen = 16;
2691 emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
2692 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2693 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2694 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2695 gc->pc += cmdlen;
2696 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2697 (void) __glXFlushRenderBuffer(gc, gc->pc);
2698 }
2699 }
2700
2701 #define X_GLrop_TexParameteriv 108
2702 void
2703 __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
2704 {
2705 __GLXcontext *const gc = __glXGetCurrentContext();
2706 const GLuint compsize = __glTexParameteriv_size(pname);
2707 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2708 emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
2709 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2710 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2711 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2712 gc->pc += cmdlen;
2713 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2714 (void) __glXFlushRenderBuffer(gc, gc->pc);
2715 }
2716 }
2717
2718 static void
2719 __glx_TexImage_1D2D(unsigned opcode, unsigned dim, GLenum target, GLint level,
2720 GLint internalformat, GLsizei width, GLsizei height,
2721 GLint border, GLenum format, GLenum type,
2722 const GLvoid * pixels)
2723 {
2724 __GLXcontext *const gc = __glXGetCurrentContext();
2725 const GLuint compsize =
2726 __glImageSize(width, height, 1, format, type, target);
2727 const GLuint cmdlen = 56 + __GLX_PAD(compsize);
2728 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
2729 if (cmdlen <= gc->maxSmallRenderCommandSize) {
2730 if ((gc->pc + cmdlen) > gc->bufEnd) {
2731 (void) __glXFlushRenderBuffer(gc, gc->pc);
2732 }
2733 emit_header(gc->pc, opcode, cmdlen);
2734 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
2735 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
2736 (void) memcpy((void *) (gc->pc + 32), (void *) (&internalformat),
2737 4);
2738 (void) memcpy((void *) (gc->pc + 36), (void *) (&width), 4);
2739 (void) memcpy((void *) (gc->pc + 40), (void *) (&height), 4);
2740 (void) memcpy((void *) (gc->pc + 44), (void *) (&border), 4);
2741 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
2742 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
2743 if ((compsize > 0) && (pixels != NULL)) {
2744 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
2745 pixels, gc->pc + 56, gc->pc + 4);
2746 } else {
2747 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2748 default_pixel_store_2D_size);
2749 }
2750 gc->pc += cmdlen;
2751 if (gc->pc > gc->limit) {
2752 (void) __glXFlushRenderBuffer(gc, gc->pc);
2753 }
2754 } else {
2755 const GLint op = opcode;
2756 const GLuint cmdlenLarge = cmdlen + 4;
2757 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
2758 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
2759 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
2760 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
2761 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
2762 (void) memcpy((void *) (pc + 36), (void *) (&internalformat), 4);
2763 (void) memcpy((void *) (pc + 40), (void *) (&width), 4);
2764 (void) memcpy((void *) (pc + 44), (void *) (&height), 4);
2765 (void) memcpy((void *) (pc + 48), (void *) (&border), 4);
2766 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
2767 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
2768 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
2769 type, pixels, pc + 60, pc + 8);
2770 }
2771 }
2772 }
2773
2774 #define X_GLrop_TexImage1D 109
2775 void
2776 __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat,
2777 GLsizei width, GLint border, GLenum format,
2778 GLenum type, const GLvoid * pixels)
2779 {
2780 __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat,
2781 width, 1, border, format, type, pixels);
2782 }
2783
2784 #define X_GLrop_TexImage2D 110
2785 void
2786 __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat,
2787 GLsizei width, GLsizei height, GLint border,
2788 GLenum format, GLenum type, const GLvoid * pixels)
2789 {
2790 __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat,
2791 width, height, border, format, type, pixels);
2792 }
2793
2794 #define X_GLrop_TexEnvf 111
2795 void
2796 __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
2797 {
2798 __GLXcontext *const gc = __glXGetCurrentContext();
2799 const GLuint cmdlen = 16;
2800 emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
2801 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2802 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2803 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2804 gc->pc += cmdlen;
2805 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2806 (void) __glXFlushRenderBuffer(gc, gc->pc);
2807 }
2808 }
2809
2810 #define X_GLrop_TexEnvfv 112
2811 void
2812 __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
2813 {
2814 __GLXcontext *const gc = __glXGetCurrentContext();
2815 const GLuint compsize = __glTexEnvfv_size(pname);
2816 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2817 emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
2818 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2819 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2820 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2821 gc->pc += cmdlen;
2822 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2823 (void) __glXFlushRenderBuffer(gc, gc->pc);
2824 }
2825 }
2826
2827 #define X_GLrop_TexEnvi 113
2828 void
2829 __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
2830 {
2831 __GLXcontext *const gc = __glXGetCurrentContext();
2832 const GLuint cmdlen = 16;
2833 emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
2834 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2835 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2836 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2837 gc->pc += cmdlen;
2838 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2839 (void) __glXFlushRenderBuffer(gc, gc->pc);
2840 }
2841 }
2842
2843 #define X_GLrop_TexEnviv 114
2844 void
2845 __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
2846 {
2847 __GLXcontext *const gc = __glXGetCurrentContext();
2848 const GLuint compsize = __glTexEnviv_size(pname);
2849 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2850 emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
2851 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2852 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2853 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2854 gc->pc += cmdlen;
2855 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2856 (void) __glXFlushRenderBuffer(gc, gc->pc);
2857 }
2858 }
2859
2860 #define X_GLrop_TexGend 115
2861 void
2862 __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
2863 {
2864 __GLXcontext *const gc = __glXGetCurrentContext();
2865 const GLuint cmdlen = 20;
2866 emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
2867 (void) memcpy((void *) (gc->pc + 4), (void *) (&param), 8);
2868 (void) memcpy((void *) (gc->pc + 12), (void *) (&coord), 4);
2869 (void) memcpy((void *) (gc->pc + 16), (void *) (&pname), 4);
2870 gc->pc += cmdlen;
2871 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2872 (void) __glXFlushRenderBuffer(gc, gc->pc);
2873 }
2874 }
2875
2876 #define X_GLrop_TexGendv 116
2877 void
2878 __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
2879 {
2880 __GLXcontext *const gc = __glXGetCurrentContext();
2881 const GLuint compsize = __glTexGendv_size(pname);
2882 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
2883 emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
2884 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2885 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2886 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 8));
2887 gc->pc += cmdlen;
2888 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2889 (void) __glXFlushRenderBuffer(gc, gc->pc);
2890 }
2891 }
2892
2893 #define X_GLrop_TexGenf 117
2894 void
2895 __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
2896 {
2897 __GLXcontext *const gc = __glXGetCurrentContext();
2898 const GLuint cmdlen = 16;
2899 emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
2900 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2901 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2902 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2903 gc->pc += cmdlen;
2904 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2905 (void) __glXFlushRenderBuffer(gc, gc->pc);
2906 }
2907 }
2908
2909 #define X_GLrop_TexGenfv 118
2910 void
2911 __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
2912 {
2913 __GLXcontext *const gc = __glXGetCurrentContext();
2914 const GLuint compsize = __glTexGenfv_size(pname);
2915 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2916 emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
2917 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2918 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2919 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2920 gc->pc += cmdlen;
2921 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2922 (void) __glXFlushRenderBuffer(gc, gc->pc);
2923 }
2924 }
2925
2926 #define X_GLrop_TexGeni 119
2927 void
2928 __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
2929 {
2930 __GLXcontext *const gc = __glXGetCurrentContext();
2931 const GLuint cmdlen = 16;
2932 emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
2933 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2934 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2935 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2936 gc->pc += cmdlen;
2937 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2938 (void) __glXFlushRenderBuffer(gc, gc->pc);
2939 }
2940 }
2941
2942 #define X_GLrop_TexGeniv 120
2943 void
2944 __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
2945 {
2946 __GLXcontext *const gc = __glXGetCurrentContext();
2947 const GLuint compsize = __glTexGeniv_size(pname);
2948 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2949 emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
2950 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2951 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2952 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2953 gc->pc += cmdlen;
2954 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2955 (void) __glXFlushRenderBuffer(gc, gc->pc);
2956 }
2957 }
2958
2959 #define X_GLrop_InitNames 121
2960 void
2961 __indirect_glInitNames(void)
2962 {
2963 __GLXcontext *const gc = __glXGetCurrentContext();
2964 const GLuint cmdlen = 4;
2965 emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
2966 gc->pc += cmdlen;
2967 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2968 (void) __glXFlushRenderBuffer(gc, gc->pc);
2969 }
2970 }
2971
2972 #define X_GLrop_LoadName 122
2973 void
2974 __indirect_glLoadName(GLuint name)
2975 {
2976 __GLXcontext *const gc = __glXGetCurrentContext();
2977 const GLuint cmdlen = 8;
2978 emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
2979 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
2980 gc->pc += cmdlen;
2981 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2982 (void) __glXFlushRenderBuffer(gc, gc->pc);
2983 }
2984 }
2985
2986 #define X_GLrop_PassThrough 123
2987 void
2988 __indirect_glPassThrough(GLfloat token)
2989 {
2990 __GLXcontext *const gc = __glXGetCurrentContext();
2991 const GLuint cmdlen = 8;
2992 emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
2993 (void) memcpy((void *) (gc->pc + 4), (void *) (&token), 4);
2994 gc->pc += cmdlen;
2995 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2996 (void) __glXFlushRenderBuffer(gc, gc->pc);
2997 }
2998 }
2999
3000 #define X_GLrop_PopName 124
3001 void
3002 __indirect_glPopName(void)
3003 {
3004 __GLXcontext *const gc = __glXGetCurrentContext();
3005 const GLuint cmdlen = 4;
3006 emit_header(gc->pc, X_GLrop_PopName, cmdlen);
3007 gc->pc += cmdlen;
3008 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3009 (void) __glXFlushRenderBuffer(gc, gc->pc);
3010 }
3011 }
3012
3013 #define X_GLrop_PushName 125
3014 void
3015 __indirect_glPushName(GLuint name)
3016 {
3017 __GLXcontext *const gc = __glXGetCurrentContext();
3018 const GLuint cmdlen = 8;
3019 emit_header(gc->pc, X_GLrop_PushName, cmdlen);
3020 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
3021 gc->pc += cmdlen;
3022 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3023 (void) __glXFlushRenderBuffer(gc, gc->pc);
3024 }
3025 }
3026
3027 #define X_GLrop_DrawBuffer 126
3028 void
3029 __indirect_glDrawBuffer(GLenum mode)
3030 {
3031 __GLXcontext *const gc = __glXGetCurrentContext();
3032 const GLuint cmdlen = 8;
3033 emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
3034 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3035 gc->pc += cmdlen;
3036 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3037 (void) __glXFlushRenderBuffer(gc, gc->pc);
3038 }
3039 }
3040
3041 #define X_GLrop_Clear 127
3042 void
3043 __indirect_glClear(GLbitfield mask)
3044 {
3045 __GLXcontext *const gc = __glXGetCurrentContext();
3046 const GLuint cmdlen = 8;
3047 emit_header(gc->pc, X_GLrop_Clear, cmdlen);
3048 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3049 gc->pc += cmdlen;
3050 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3051 (void) __glXFlushRenderBuffer(gc, gc->pc);
3052 }
3053 }
3054
3055 #define X_GLrop_ClearAccum 128
3056 void
3057 __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue,
3058 GLfloat alpha)
3059 {
3060 __GLXcontext *const gc = __glXGetCurrentContext();
3061 const GLuint cmdlen = 20;
3062 emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
3063 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3064 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3065 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3066 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3067 gc->pc += cmdlen;
3068 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3069 (void) __glXFlushRenderBuffer(gc, gc->pc);
3070 }
3071 }
3072
3073 #define X_GLrop_ClearIndex 129
3074 void
3075 __indirect_glClearIndex(GLfloat c)
3076 {
3077 __GLXcontext *const gc = __glXGetCurrentContext();
3078 const GLuint cmdlen = 8;
3079 emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
3080 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
3081 gc->pc += cmdlen;
3082 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3083 (void) __glXFlushRenderBuffer(gc, gc->pc);
3084 }
3085 }
3086
3087 #define X_GLrop_ClearColor 130
3088 void
3089 __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue,
3090 GLclampf alpha)
3091 {
3092 __GLXcontext *const gc = __glXGetCurrentContext();
3093 const GLuint cmdlen = 20;
3094 emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
3095 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3096 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3097 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3098 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3099 gc->pc += cmdlen;
3100 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3101 (void) __glXFlushRenderBuffer(gc, gc->pc);
3102 }
3103 }
3104
3105 #define X_GLrop_ClearStencil 131
3106 void
3107 __indirect_glClearStencil(GLint s)
3108 {
3109 __GLXcontext *const gc = __glXGetCurrentContext();
3110 const GLuint cmdlen = 8;
3111 emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
3112 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
3113 gc->pc += cmdlen;
3114 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3115 (void) __glXFlushRenderBuffer(gc, gc->pc);
3116 }
3117 }
3118
3119 #define X_GLrop_ClearDepth 132
3120 void
3121 __indirect_glClearDepth(GLclampd depth)
3122 {
3123 __GLXcontext *const gc = __glXGetCurrentContext();
3124 const GLuint cmdlen = 12;
3125 emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
3126 (void) memcpy((void *) (gc->pc + 4), (void *) (&depth), 8);
3127 gc->pc += cmdlen;
3128 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3129 (void) __glXFlushRenderBuffer(gc, gc->pc);
3130 }
3131 }
3132
3133 #define X_GLrop_StencilMask 133
3134 void
3135 __indirect_glStencilMask(GLuint mask)
3136 {
3137 __GLXcontext *const gc = __glXGetCurrentContext();
3138 const GLuint cmdlen = 8;
3139 emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
3140 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3141 gc->pc += cmdlen;
3142 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3143 (void) __glXFlushRenderBuffer(gc, gc->pc);
3144 }
3145 }
3146
3147 #define X_GLrop_ColorMask 134
3148 void
3149 __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue,
3150 GLboolean alpha)
3151 {
3152 __GLXcontext *const gc = __glXGetCurrentContext();
3153 const GLuint cmdlen = 8;
3154 emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
3155 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
3156 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
3157 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
3158 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
3159 gc->pc += cmdlen;
3160 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3161 (void) __glXFlushRenderBuffer(gc, gc->pc);
3162 }
3163 }
3164
3165 #define X_GLrop_DepthMask 135
3166 void
3167 __indirect_glDepthMask(GLboolean flag)
3168 {
3169 __GLXcontext *const gc = __glXGetCurrentContext();
3170 const GLuint cmdlen = 8;
3171 emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
3172 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
3173 gc->pc += cmdlen;
3174 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3175 (void) __glXFlushRenderBuffer(gc, gc->pc);
3176 }
3177 }
3178
3179 #define X_GLrop_IndexMask 136
3180 void
3181 __indirect_glIndexMask(GLuint mask)
3182 {
3183 __GLXcontext *const gc = __glXGetCurrentContext();
3184 const GLuint cmdlen = 8;
3185 emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
3186 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3187 gc->pc += cmdlen;
3188 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3189 (void) __glXFlushRenderBuffer(gc, gc->pc);
3190 }
3191 }
3192
3193 #define X_GLrop_Accum 137
3194 void
3195 __indirect_glAccum(GLenum op, GLfloat value)
3196 {
3197 __GLXcontext *const gc = __glXGetCurrentContext();
3198 const GLuint cmdlen = 12;
3199 emit_header(gc->pc, X_GLrop_Accum, cmdlen);
3200 (void) memcpy((void *) (gc->pc + 4), (void *) (&op), 4);
3201 (void) memcpy((void *) (gc->pc + 8), (void *) (&value), 4);
3202 gc->pc += cmdlen;
3203 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3204 (void) __glXFlushRenderBuffer(gc, gc->pc);
3205 }
3206 }
3207
3208 #define X_GLrop_PopAttrib 141
3209 void
3210 __indirect_glPopAttrib(void)
3211 {
3212 __GLXcontext *const gc = __glXGetCurrentContext();
3213 const GLuint cmdlen = 4;
3214 emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
3215 gc->pc += cmdlen;
3216 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3217 (void) __glXFlushRenderBuffer(gc, gc->pc);
3218 }
3219 }
3220
3221 #define X_GLrop_PushAttrib 142
3222 void
3223 __indirect_glPushAttrib(GLbitfield mask)
3224 {
3225 __GLXcontext *const gc = __glXGetCurrentContext();
3226 const GLuint cmdlen = 8;
3227 emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
3228 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3229 gc->pc += cmdlen;
3230 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3231 (void) __glXFlushRenderBuffer(gc, gc->pc);
3232 }
3233 }
3234
3235 #define X_GLrop_MapGrid1d 147
3236 void
3237 __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
3238 {
3239 __GLXcontext *const gc = __glXGetCurrentContext();
3240 const GLuint cmdlen = 24;
3241 emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
3242 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3243 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3244 (void) memcpy((void *) (gc->pc + 20), (void *) (&un), 4);
3245 gc->pc += cmdlen;
3246 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3247 (void) __glXFlushRenderBuffer(gc, gc->pc);
3248 }
3249 }
3250
3251 #define X_GLrop_MapGrid1f 148
3252 void
3253 __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
3254 {
3255 __GLXcontext *const gc = __glXGetCurrentContext();
3256 const GLuint cmdlen = 16;
3257 emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
3258 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3259 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3260 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3261 gc->pc += cmdlen;
3262 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3263 (void) __glXFlushRenderBuffer(gc, gc->pc);
3264 }
3265 }
3266
3267 #define X_GLrop_MapGrid2d 149
3268 void
3269 __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn,
3270 GLdouble v1, GLdouble v2)
3271 {
3272 __GLXcontext *const gc = __glXGetCurrentContext();
3273 const GLuint cmdlen = 44;
3274 emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
3275 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3276 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3277 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 8);
3278 (void) memcpy((void *) (gc->pc + 28), (void *) (&v2), 8);
3279 (void) memcpy((void *) (gc->pc + 36), (void *) (&un), 4);
3280 (void) memcpy((void *) (gc->pc + 40), (void *) (&vn), 4);
3281 gc->pc += cmdlen;
3282 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3283 (void) __glXFlushRenderBuffer(gc, gc->pc);
3284 }
3285 }
3286
3287 #define X_GLrop_MapGrid2f 150
3288 void
3289 __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
3290 GLfloat v2)
3291 {
3292 __GLXcontext *const gc = __glXGetCurrentContext();
3293 const GLuint cmdlen = 28;
3294 emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
3295 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3296 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3297 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3298 (void) memcpy((void *) (gc->pc + 16), (void *) (&vn), 4);
3299 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 4);
3300 (void) memcpy((void *) (gc->pc + 24), (void *) (&v2), 4);
3301 gc->pc += cmdlen;
3302 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3303 (void) __glXFlushRenderBuffer(gc, gc->pc);
3304 }
3305 }
3306
3307 #define X_GLrop_EvalCoord1dv 151
3308 void
3309 __indirect_glEvalCoord1d(GLdouble u)
3310 {
3311 __GLXcontext *const gc = __glXGetCurrentContext();
3312 const GLuint cmdlen = 12;
3313 emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
3314 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3315 gc->pc += cmdlen;
3316 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3317 (void) __glXFlushRenderBuffer(gc, gc->pc);
3318 }
3319 }
3320
3321 #define X_GLrop_EvalCoord1dv 151
3322 void
3323 __indirect_glEvalCoord1dv(const GLdouble * u)
3324 {
3325 generic_8_byte(X_GLrop_EvalCoord1dv, u);
3326 }
3327
3328 #define X_GLrop_EvalCoord1fv 152
3329 void
3330 __indirect_glEvalCoord1f(GLfloat u)
3331 {
3332 __GLXcontext *const gc = __glXGetCurrentContext();
3333 const GLuint cmdlen = 8;
3334 emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
3335 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3336 gc->pc += cmdlen;
3337 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3338 (void) __glXFlushRenderBuffer(gc, gc->pc);
3339 }
3340 }
3341
3342 #define X_GLrop_EvalCoord1fv 152
3343 void
3344 __indirect_glEvalCoord1fv(const GLfloat * u)
3345 {
3346 generic_4_byte(X_GLrop_EvalCoord1fv, u);
3347 }
3348
3349 #define X_GLrop_EvalCoord2dv 153
3350 void
3351 __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
3352 {
3353 __GLXcontext *const gc = __glXGetCurrentContext();
3354 const GLuint cmdlen = 20;
3355 emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
3356 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3357 (void) memcpy((void *) (gc->pc + 12), (void *) (&v), 8);
3358 gc->pc += cmdlen;
3359 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3360 (void) __glXFlushRenderBuffer(gc, gc->pc);
3361 }
3362 }
3363
3364 #define X_GLrop_EvalCoord2dv 153
3365 void
3366 __indirect_glEvalCoord2dv(const GLdouble * u)
3367 {
3368 generic_16_byte(X_GLrop_EvalCoord2dv, u);
3369 }
3370
3371 #define X_GLrop_EvalCoord2fv 154
3372 void
3373 __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
3374 {
3375 __GLXcontext *const gc = __glXGetCurrentContext();
3376 const GLuint cmdlen = 12;
3377 emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
3378 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3379 (void) memcpy((void *) (gc->pc + 8), (void *) (&v), 4);
3380 gc->pc += cmdlen;
3381 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3382 (void) __glXFlushRenderBuffer(gc, gc->pc);
3383 }
3384 }
3385
3386 #define X_GLrop_EvalCoord2fv 154
3387 void
3388 __indirect_glEvalCoord2fv(const GLfloat * u)
3389 {
3390 generic_8_byte(X_GLrop_EvalCoord2fv, u);
3391 }
3392
3393 #define X_GLrop_EvalMesh1 155
3394 void
3395 __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
3396 {
3397 __GLXcontext *const gc = __glXGetCurrentContext();
3398 const GLuint cmdlen = 16;
3399 emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
3400 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3401 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3402 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3403 gc->pc += cmdlen;
3404 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3405 (void) __glXFlushRenderBuffer(gc, gc->pc);
3406 }
3407 }
3408
3409 #define X_GLrop_EvalPoint1 156
3410 void
3411 __indirect_glEvalPoint1(GLint i)
3412 {
3413 __GLXcontext *const gc = __glXGetCurrentContext();
3414 const GLuint cmdlen = 8;
3415 emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
3416 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3417 gc->pc += cmdlen;
3418 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3419 (void) __glXFlushRenderBuffer(gc, gc->pc);
3420 }
3421 }
3422
3423 #define X_GLrop_EvalMesh2 157
3424 void
3425 __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
3426 {
3427 __GLXcontext *const gc = __glXGetCurrentContext();
3428 const GLuint cmdlen = 24;
3429 emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
3430 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3431 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3432 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3433 (void) memcpy((void *) (gc->pc + 16), (void *) (&j1), 4);
3434 (void) memcpy((void *) (gc->pc + 20), (void *) (&j2), 4);
3435 gc->pc += cmdlen;
3436 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3437 (void) __glXFlushRenderBuffer(gc, gc->pc);
3438 }
3439 }
3440
3441 #define X_GLrop_EvalPoint2 158
3442 void
3443 __indirect_glEvalPoint2(GLint i, GLint j)
3444 {
3445 __GLXcontext *const gc = __glXGetCurrentContext();
3446 const GLuint cmdlen = 12;
3447 emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
3448 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3449 (void) memcpy((void *) (gc->pc + 8), (void *) (&j), 4);
3450 gc->pc += cmdlen;
3451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3452 (void) __glXFlushRenderBuffer(gc, gc->pc);
3453 }
3454 }
3455
3456 #define X_GLrop_AlphaFunc 159
3457 void
3458 __indirect_glAlphaFunc(GLenum func, GLclampf ref)
3459 {
3460 __GLXcontext *const gc = __glXGetCurrentContext();
3461 const GLuint cmdlen = 12;
3462 emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
3463 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3464 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3465 gc->pc += cmdlen;
3466 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3467 (void) __glXFlushRenderBuffer(gc, gc->pc);
3468 }
3469 }
3470
3471 #define X_GLrop_BlendFunc 160
3472 void
3473 __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
3474 {
3475 __GLXcontext *const gc = __glXGetCurrentContext();
3476 const GLuint cmdlen = 12;
3477 emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
3478 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactor), 4);
3479 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactor), 4);
3480 gc->pc += cmdlen;
3481 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3482 (void) __glXFlushRenderBuffer(gc, gc->pc);
3483 }
3484 }
3485
3486 #define X_GLrop_LogicOp 161
3487 void
3488 __indirect_glLogicOp(GLenum opcode)
3489 {
3490 __GLXcontext *const gc = __glXGetCurrentContext();
3491 const GLuint cmdlen = 8;
3492 emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
3493 (void) memcpy((void *) (gc->pc + 4), (void *) (&opcode), 4);
3494 gc->pc += cmdlen;
3495 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3496 (void) __glXFlushRenderBuffer(gc, gc->pc);
3497 }
3498 }
3499
3500 #define X_GLrop_StencilFunc 162
3501 void
3502 __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
3503 {
3504 __GLXcontext *const gc = __glXGetCurrentContext();
3505 const GLuint cmdlen = 16;
3506 emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
3507 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3508 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3509 (void) memcpy((void *) (gc->pc + 12), (void *) (&mask), 4);
3510 gc->pc += cmdlen;
3511 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3512 (void) __glXFlushRenderBuffer(gc, gc->pc);
3513 }
3514 }
3515
3516 #define X_GLrop_StencilOp 163
3517 void
3518 __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
3519 {
3520 __GLXcontext *const gc = __glXGetCurrentContext();
3521 const GLuint cmdlen = 16;
3522 emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
3523 (void) memcpy((void *) (gc->pc + 4), (void *) (&fail), 4);
3524 (void) memcpy((void *) (gc->pc + 8), (void *) (&zfail), 4);
3525 (void) memcpy((void *) (gc->pc + 12), (void *) (&zpass), 4);
3526 gc->pc += cmdlen;
3527 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3528 (void) __glXFlushRenderBuffer(gc, gc->pc);
3529 }
3530 }
3531
3532 #define X_GLrop_DepthFunc 164
3533 void
3534 __indirect_glDepthFunc(GLenum func)
3535 {
3536 __GLXcontext *const gc = __glXGetCurrentContext();
3537 const GLuint cmdlen = 8;
3538 emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
3539 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3540 gc->pc += cmdlen;
3541 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3542 (void) __glXFlushRenderBuffer(gc, gc->pc);
3543 }
3544 }
3545
3546 #define X_GLrop_PixelZoom 165
3547 void
3548 __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
3549 {
3550 __GLXcontext *const gc = __glXGetCurrentContext();
3551 const GLuint cmdlen = 12;
3552 emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
3553 (void) memcpy((void *) (gc->pc + 4), (void *) (&xfactor), 4);
3554 (void) memcpy((void *) (gc->pc + 8), (void *) (&yfactor), 4);
3555 gc->pc += cmdlen;
3556 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3557 (void) __glXFlushRenderBuffer(gc, gc->pc);
3558 }
3559 }
3560
3561 #define X_GLrop_PixelTransferf 166
3562 void
3563 __indirect_glPixelTransferf(GLenum pname, GLfloat param)
3564 {
3565 __GLXcontext *const gc = __glXGetCurrentContext();
3566 const GLuint cmdlen = 12;
3567 emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
3568 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3569 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3570 gc->pc += cmdlen;
3571 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3572 (void) __glXFlushRenderBuffer(gc, gc->pc);
3573 }
3574 }
3575
3576 #define X_GLrop_PixelTransferi 167
3577 void
3578 __indirect_glPixelTransferi(GLenum pname, GLint param)
3579 {
3580 __GLXcontext *const gc = __glXGetCurrentContext();
3581 const GLuint cmdlen = 12;
3582 emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
3583 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3584 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3585 gc->pc += cmdlen;
3586 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3587 (void) __glXFlushRenderBuffer(gc, gc->pc);
3588 }
3589 }
3590
3591 #define X_GLrop_PixelMapfv 168
3592 void
3593 __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
3594 {
3595 __GLXcontext *const gc = __glXGetCurrentContext();
3596 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3597 if (mapsize < 0) {
3598 __glXSetError(gc, GL_INVALID_VALUE);
3599 return;
3600 }
3601 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3602 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3603 if ((gc->pc + cmdlen) > gc->bufEnd) {
3604 (void) __glXFlushRenderBuffer(gc, gc->pc);
3605 }
3606 emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
3607 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3608 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3609 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3610 (mapsize * 4));
3611 gc->pc += cmdlen;
3612 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3613 (void) __glXFlushRenderBuffer(gc, gc->pc);
3614 }
3615 } else {
3616 const GLint op = X_GLrop_PixelMapfv;
3617 const GLuint cmdlenLarge = cmdlen + 4;
3618 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3619 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3620 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3621 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3622 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3623 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3624 }
3625 }
3626 }
3627
3628 #define X_GLrop_PixelMapuiv 169
3629 void
3630 __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
3631 {
3632 __GLXcontext *const gc = __glXGetCurrentContext();
3633 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3634 if (mapsize < 0) {
3635 __glXSetError(gc, GL_INVALID_VALUE);
3636 return;
3637 }
3638 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3639 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3640 if ((gc->pc + cmdlen) > gc->bufEnd) {
3641 (void) __glXFlushRenderBuffer(gc, gc->pc);
3642 }
3643 emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
3644 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3645 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3646 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3647 (mapsize * 4));
3648 gc->pc += cmdlen;
3649 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3650 (void) __glXFlushRenderBuffer(gc, gc->pc);
3651 }
3652 } else {
3653 const GLint op = X_GLrop_PixelMapuiv;
3654 const GLuint cmdlenLarge = cmdlen + 4;
3655 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3656 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3657 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3658 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3659 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3660 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3661 }
3662 }
3663 }
3664
3665 #define X_GLrop_PixelMapusv 170
3666 void
3667 __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
3668 {
3669 __GLXcontext *const gc = __glXGetCurrentContext();
3670 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
3671 if (mapsize < 0) {
3672 __glXSetError(gc, GL_INVALID_VALUE);
3673 return;
3674 }
3675 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3676 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3677 if ((gc->pc + cmdlen) > gc->bufEnd) {
3678 (void) __glXFlushRenderBuffer(gc, gc->pc);
3679 }
3680 emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
3681 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3682 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3683 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3684 (mapsize * 2));
3685 gc->pc += cmdlen;
3686 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3687 (void) __glXFlushRenderBuffer(gc, gc->pc);
3688 }
3689 } else {
3690 const GLint op = X_GLrop_PixelMapusv;
3691 const GLuint cmdlenLarge = cmdlen + 4;
3692 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3693 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3694 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3695 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3696 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3697 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
3698 }
3699 }
3700 }
3701
3702 #define X_GLrop_ReadBuffer 171
3703 void
3704 __indirect_glReadBuffer(GLenum mode)
3705 {
3706 __GLXcontext *const gc = __glXGetCurrentContext();
3707 const GLuint cmdlen = 8;
3708 emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
3709 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3710 gc->pc += cmdlen;
3711 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3712 (void) __glXFlushRenderBuffer(gc, gc->pc);
3713 }
3714 }
3715
3716 #define X_GLrop_CopyPixels 172
3717 void
3718 __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3719 GLenum type)
3720 {
3721 __GLXcontext *const gc = __glXGetCurrentContext();
3722 const GLuint cmdlen = 24;
3723 emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
3724 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
3725 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
3726 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
3727 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
3728 (void) memcpy((void *) (gc->pc + 20), (void *) (&type), 4);
3729 gc->pc += cmdlen;
3730 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3731 (void) __glXFlushRenderBuffer(gc, gc->pc);
3732 }
3733 }
3734
3735 #define X_GLsop_ReadPixels 111
3736 void
3737 __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3738 GLenum format, GLenum type, GLvoid * pixels)
3739 {
3740 __GLXcontext *const gc = __glXGetCurrentContext();
3741 const __GLXattribute *const state = gc->client_state_private;
3742 Display *const dpy = gc->currentDpy;
3743 #ifndef USE_XCB
3744 const GLuint cmdlen = 28;
3745 #endif
3746 if (__builtin_expect(dpy != NULL, 1)) {
3747 #ifdef USE_XCB
3748 xcb_connection_t *c = XGetXCBConnection(dpy);
3749 (void) __glXFlushRenderBuffer(gc, gc->pc);
3750 xcb_glx_read_pixels_reply_t *reply =
3751 xcb_glx_read_pixels_reply(c,
3752 xcb_glx_read_pixels(c,
3753 gc->
3754 currentContextTag,
3755 x, y, width, height,
3756 format, type,
3757 state->storePack.
3758 swapEndian, 0),
3759 NULL);
3760 (void) memcpy(pixels, xcb_glx_read_pixels_data(reply),
3761 xcb_glx_read_pixels_data_length(reply) *
3762 sizeof(GLvoid));
3763 free(reply);
3764 #else
3765 GLubyte const *pc =
3766 __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
3767 (void) memcpy((void *) (pc + 0), (void *) (&x), 4);
3768 (void) memcpy((void *) (pc + 4), (void *) (&y), 4);
3769 (void) memcpy((void *) (pc + 8), (void *) (&width), 4);
3770 (void) memcpy((void *) (pc + 12), (void *) (&height), 4);
3771 (void) memcpy((void *) (pc + 16), (void *) (&format), 4);
3772 (void) memcpy((void *) (pc + 20), (void *) (&type), 4);
3773 *(int32_t *) (pc + 24) = 0;
3774 *(int8_t *) (pc + 24) = state->storePack.swapEndian;
3775 __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type,
3776 pixels, GL_FALSE);
3777 UnlockDisplay(dpy);
3778 SyncHandle();
3779 #endif /* USE_XCB */
3780 }
3781 return;
3782 }
3783
3784 #define X_GLrop_DrawPixels 173
3785 void
3786 __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format,
3787 GLenum type, const GLvoid * pixels)
3788 {
3789 __GLXcontext *const gc = __glXGetCurrentContext();
3790 const GLuint compsize =
3791 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
3792 0) : 0;
3793 const GLuint cmdlen = 40 + __GLX_PAD(compsize);
3794 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
3795 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3796 if ((gc->pc + cmdlen) > gc->bufEnd) {
3797 (void) __glXFlushRenderBuffer(gc, gc->pc);
3798 }
3799 emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
3800 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
3801 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
3802 (void) memcpy((void *) (gc->pc + 32), (void *) (&format), 4);
3803 (void) memcpy((void *) (gc->pc + 36), (void *) (&type), 4);
3804 if (compsize > 0) {
3805 (*gc->fillImage) (gc, 2, width, height, 1, format, type,
3806 pixels, gc->pc + 40, gc->pc + 4);
3807 } else {
3808 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
3809 default_pixel_store_2D_size);
3810 }
3811 gc->pc += cmdlen;
3812 if (gc->pc > gc->limit) {
3813 (void) __glXFlushRenderBuffer(gc, gc->pc);
3814 }
3815 } else {
3816 const GLint op = X_GLrop_DrawPixels;
3817 const GLuint cmdlenLarge = cmdlen + 4;
3818 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3819 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3820 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3821 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
3822 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
3823 (void) memcpy((void *) (pc + 36), (void *) (&format), 4);
3824 (void) memcpy((void *) (pc + 40), (void *) (&type), 4);
3825 __glXSendLargeImage(gc, compsize, 2, width, height, 1, format,
3826 type, pixels, pc + 44, pc + 8);
3827 }
3828 }
3829 }
3830
3831 #define X_GLsop_GetClipPlane 113
3832 void
3833 __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
3834 {
3835 __GLXcontext *const gc = __glXGetCurrentContext();
3836 Display *const dpy = gc->currentDpy;
3837 #ifndef USE_XCB
3838 const GLuint cmdlen = 4;
3839 #endif
3840 if (__builtin_expect(dpy != NULL, 1)) {
3841 #ifdef USE_XCB
3842 xcb_connection_t *c = XGetXCBConnection(dpy);
3843 (void) __glXFlushRenderBuffer(gc, gc->pc);
3844 xcb_glx_get_clip_plane_reply_t *reply =
3845 xcb_glx_get_clip_plane_reply(c,
3846 xcb_glx_get_clip_plane(c,
3847 gc->
3848 currentContextTag,
3849 plane), NULL);
3850 (void) memcpy(equation, xcb_glx_get_clip_plane_data(reply),
3851 xcb_glx_get_clip_plane_data_length(reply) *
3852 sizeof(GLdouble));
3853 free(reply);
3854 #else
3855 GLubyte const *pc =
3856 __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
3857 (void) memcpy((void *) (pc + 0), (void *) (&plane), 4);
3858 (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
3859 UnlockDisplay(dpy);
3860 SyncHandle();
3861 #endif /* USE_XCB */
3862 }
3863 return;
3864 }
3865
3866 #define X_GLsop_GetLightfv 118
3867 void
3868 __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
3869 {
3870 __GLXcontext *const gc = __glXGetCurrentContext();
3871 Display *const dpy = gc->currentDpy;
3872 #ifndef USE_XCB
3873 const GLuint cmdlen = 8;
3874 #endif
3875 if (__builtin_expect(dpy != NULL, 1)) {
3876 #ifdef USE_XCB
3877 xcb_connection_t *c = XGetXCBConnection(dpy);
3878 (void) __glXFlushRenderBuffer(gc, gc->pc);
3879 xcb_glx_get_lightfv_reply_t *reply =
3880 xcb_glx_get_lightfv_reply(c,
3881 xcb_glx_get_lightfv(c,
3882 gc->
3883 currentContextTag,
3884 light, pname),
3885 NULL);
3886 if (xcb_glx_get_lightfv_data_length(reply) == 0)
3887 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3888 else
3889 (void) memcpy(params, xcb_glx_get_lightfv_data(reply),
3890 xcb_glx_get_lightfv_data_length(reply) *
3891 sizeof(GLfloat));
3892 free(reply);
3893 #else
3894 GLubyte const *pc =
3895 __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
3896 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3897 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3898 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3899 UnlockDisplay(dpy);
3900 SyncHandle();
3901 #endif /* USE_XCB */
3902 }
3903 return;
3904 }
3905
3906 #define X_GLsop_GetLightiv 119
3907 void
3908 __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
3909 {
3910 __GLXcontext *const gc = __glXGetCurrentContext();
3911 Display *const dpy = gc->currentDpy;
3912 #ifndef USE_XCB
3913 const GLuint cmdlen = 8;
3914 #endif
3915 if (__builtin_expect(dpy != NULL, 1)) {
3916 #ifdef USE_XCB
3917 xcb_connection_t *c = XGetXCBConnection(dpy);
3918 (void) __glXFlushRenderBuffer(gc, gc->pc);
3919 xcb_glx_get_lightiv_reply_t *reply =
3920 xcb_glx_get_lightiv_reply(c,
3921 xcb_glx_get_lightiv(c,
3922 gc->
3923 currentContextTag,
3924 light, pname),
3925 NULL);
3926 if (xcb_glx_get_lightiv_data_length(reply) == 0)
3927 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3928 else
3929 (void) memcpy(params, xcb_glx_get_lightiv_data(reply),
3930 xcb_glx_get_lightiv_data_length(reply) *
3931 sizeof(GLint));
3932 free(reply);
3933 #else
3934 GLubyte const *pc =
3935 __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
3936 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3937 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3938 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3939 UnlockDisplay(dpy);
3940 SyncHandle();
3941 #endif /* USE_XCB */
3942 }
3943 return;
3944 }
3945
3946 #define X_GLsop_GetMapdv 120
3947 void
3948 __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
3949 {
3950 __GLXcontext *const gc = __glXGetCurrentContext();
3951 Display *const dpy = gc->currentDpy;
3952 #ifndef USE_XCB
3953 const GLuint cmdlen = 8;
3954 #endif
3955 if (__builtin_expect(dpy != NULL, 1)) {
3956 #ifdef USE_XCB
3957 xcb_connection_t *c = XGetXCBConnection(dpy);
3958 (void) __glXFlushRenderBuffer(gc, gc->pc);
3959 xcb_glx_get_mapdv_reply_t *reply =
3960 xcb_glx_get_mapdv_reply(c,
3961 xcb_glx_get_mapdv(c,
3962 gc->currentContextTag,
3963 target, query), NULL);
3964 if (xcb_glx_get_mapdv_data_length(reply) == 0)
3965 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3966 else
3967 (void) memcpy(v, xcb_glx_get_mapdv_data(reply),
3968 xcb_glx_get_mapdv_data_length(reply) *
3969 sizeof(GLdouble));
3970 free(reply);
3971 #else
3972 GLubyte const *pc =
3973 __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
3974 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
3975 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3976 (void) __glXReadReply(dpy, 8, v, GL_FALSE);
3977 UnlockDisplay(dpy);
3978 SyncHandle();
3979 #endif /* USE_XCB */
3980 }
3981 return;
3982 }
3983
3984 #define X_GLsop_GetMapfv 121
3985 void
3986 __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
3987 {
3988 __GLXcontext *const gc = __glXGetCurrentContext();
3989 Display *const dpy = gc->currentDpy;
3990 #ifndef USE_XCB
3991 const GLuint cmdlen = 8;
3992 #endif
3993 if (__builtin_expect(dpy != NULL, 1)) {
3994 #ifdef USE_XCB
3995 xcb_connection_t *c = XGetXCBConnection(dpy);
3996 (void) __glXFlushRenderBuffer(gc, gc->pc);
3997 xcb_glx_get_mapfv_reply_t *reply =
3998 xcb_glx_get_mapfv_reply(c,
3999 xcb_glx_get_mapfv(c,
4000 gc->currentContextTag,
4001 target, query), NULL);
4002 if (xcb_glx_get_mapfv_data_length(reply) == 0)
4003 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4004 else
4005 (void) memcpy(v, xcb_glx_get_mapfv_data(reply),
4006 xcb_glx_get_mapfv_data_length(reply) *
4007 sizeof(GLfloat));
4008 free(reply);
4009 #else
4010 GLubyte const *pc =
4011 __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
4012 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4013 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
4014 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
4015 UnlockDisplay(dpy);
4016 SyncHandle();
4017 #endif /* USE_XCB */
4018 }
4019 return;
4020 }
4021
4022 #define X_GLsop_GetMapiv 122
4023 void
4024 __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
4025 {
4026 __GLXcontext *const gc = __glXGetCurrentContext();
4027 Display *const dpy = gc->currentDpy;
4028 #ifndef USE_XCB
4029 const GLuint cmdlen = 8;
4030 #endif
4031 if (__builtin_expect(dpy != NULL, 1)) {
4032 #ifdef USE_XCB
4033 xcb_connection_t *c = XGetXCBConnection(dpy);
4034 (void) __glXFlushRenderBuffer(gc, gc->pc);
4035 xcb_glx_get_mapiv_reply_t *reply =
4036 xcb_glx_get_mapiv_reply(c,
4037 xcb_glx_get_mapiv(c,
4038 gc->currentContextTag,
4039 target, query), NULL);
4040 if (xcb_glx_get_mapiv_data_length(reply) == 0)
4041 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4042 else
4043 (void) memcpy(v, xcb_glx_get_mapiv_data(reply),
4044 xcb_glx_get_mapiv_data_length(reply) *
4045 sizeof(GLint));
4046 free(reply);
4047 #else
4048 GLubyte const *pc =
4049 __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
4050 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4051 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
4052 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
4053 UnlockDisplay(dpy);
4054 SyncHandle();
4055 #endif /* USE_XCB */
4056 }
4057 return;
4058 }
4059
4060 #define X_GLsop_GetMaterialfv 123
4061 void
4062 __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
4063 {
4064 __GLXcontext *const gc = __glXGetCurrentContext();
4065 Display *const dpy = gc->currentDpy;
4066 #ifndef USE_XCB
4067 const GLuint cmdlen = 8;
4068 #endif
4069 if (__builtin_expect(dpy != NULL, 1)) {
4070 #ifdef USE_XCB
4071 xcb_connection_t *c = XGetXCBConnection(dpy);
4072 (void) __glXFlushRenderBuffer(gc, gc->pc);
4073 xcb_glx_get_materialfv_reply_t *reply =
4074 xcb_glx_get_materialfv_reply(c,
4075 xcb_glx_get_materialfv(c,
4076 gc->
4077 currentContextTag,
4078 face, pname),
4079 NULL);
4080 if (xcb_glx_get_materialfv_data_length(reply) == 0)
4081 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4082 else
4083 (void) memcpy(params, xcb_glx_get_materialfv_data(reply),
4084 xcb_glx_get_materialfv_data_length(reply) *
4085 sizeof(GLfloat));
4086 free(reply);
4087 #else
4088 GLubyte const *pc =
4089 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
4090 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4091 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4092 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4093 UnlockDisplay(dpy);
4094 SyncHandle();
4095 #endif /* USE_XCB */
4096 }
4097 return;
4098 }
4099
4100 #define X_GLsop_GetMaterialiv 124
4101 void
4102 __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
4103 {
4104 __GLXcontext *const gc = __glXGetCurrentContext();
4105 Display *const dpy = gc->currentDpy;
4106 #ifndef USE_XCB
4107 const GLuint cmdlen = 8;
4108 #endif
4109 if (__builtin_expect(dpy != NULL, 1)) {
4110 #ifdef USE_XCB
4111 xcb_connection_t *c = XGetXCBConnection(dpy);
4112 (void) __glXFlushRenderBuffer(gc, gc->pc);
4113 xcb_glx_get_materialiv_reply_t *reply =
4114 xcb_glx_get_materialiv_reply(c,
4115 xcb_glx_get_materialiv(c,
4116 gc->
4117 currentContextTag,
4118 face, pname),
4119 NULL);
4120 if (xcb_glx_get_materialiv_data_length(reply) == 0)
4121 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4122 else
4123 (void) memcpy(params, xcb_glx_get_materialiv_data(reply),
4124 xcb_glx_get_materialiv_data_length(reply) *
4125 sizeof(GLint));
4126 free(reply);
4127 #else
4128 GLubyte const *pc =
4129 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
4130 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4131 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4132 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4133 UnlockDisplay(dpy);
4134 SyncHandle();
4135 #endif /* USE_XCB */
4136 }
4137 return;
4138 }
4139
4140 #define X_GLsop_GetPixelMapfv 125
4141 void
4142 __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
4143 {
4144 __GLXcontext *const gc = __glXGetCurrentContext();
4145 Display *const dpy = gc->currentDpy;
4146 #ifndef USE_XCB
4147 const GLuint cmdlen = 4;
4148 #endif
4149 if (__builtin_expect(dpy != NULL, 1)) {
4150 #ifdef USE_XCB
4151 xcb_connection_t *c = XGetXCBConnection(dpy);
4152 (void) __glXFlushRenderBuffer(gc, gc->pc);
4153 xcb_glx_get_pixel_mapfv_reply_t *reply =
4154 xcb_glx_get_pixel_mapfv_reply(c,
4155 xcb_glx_get_pixel_mapfv(c,
4156 gc->
4157 currentContextTag,
4158 map), NULL);
4159 if (xcb_glx_get_pixel_mapfv_data_length(reply) == 0)
4160 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4161 else
4162 (void) memcpy(values, xcb_glx_get_pixel_mapfv_data(reply),
4163 xcb_glx_get_pixel_mapfv_data_length(reply) *
4164 sizeof(GLfloat));
4165 free(reply);
4166 #else
4167 GLubyte const *pc =
4168 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
4169 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4170 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4171 UnlockDisplay(dpy);
4172 SyncHandle();
4173 #endif /* USE_XCB */
4174 }
4175 return;
4176 }
4177
4178 #define X_GLsop_GetPixelMapuiv 126
4179 void
4180 __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
4181 {
4182 __GLXcontext *const gc = __glXGetCurrentContext();
4183 Display *const dpy = gc->currentDpy;
4184 #ifndef USE_XCB
4185 const GLuint cmdlen = 4;
4186 #endif
4187 if (__builtin_expect(dpy != NULL, 1)) {
4188 #ifdef USE_XCB
4189 xcb_connection_t *c = XGetXCBConnection(dpy);
4190 (void) __glXFlushRenderBuffer(gc, gc->pc);
4191 xcb_glx_get_pixel_mapuiv_reply_t *reply =
4192 xcb_glx_get_pixel_mapuiv_reply(c,
4193 xcb_glx_get_pixel_mapuiv(c,
4194 gc->
4195 currentContextTag,
4196 map),
4197 NULL);
4198 if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 0)
4199 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4200 else
4201 (void) memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply),
4202 xcb_glx_get_pixel_mapuiv_data_length(reply) *
4203 sizeof(GLuint));
4204 free(reply);
4205 #else
4206 GLubyte const *pc =
4207 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
4208 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4209 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4210 UnlockDisplay(dpy);
4211 SyncHandle();
4212 #endif /* USE_XCB */
4213 }
4214 return;
4215 }
4216
4217 #define X_GLsop_GetPixelMapusv 127
4218 void
4219 __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
4220 {
4221 __GLXcontext *const gc = __glXGetCurrentContext();
4222 Display *const dpy = gc->currentDpy;
4223 #ifndef USE_XCB
4224 const GLuint cmdlen = 4;
4225 #endif
4226 if (__builtin_expect(dpy != NULL, 1)) {
4227 #ifdef USE_XCB
4228 xcb_connection_t *c = XGetXCBConnection(dpy);
4229 (void) __glXFlushRenderBuffer(gc, gc->pc);
4230 xcb_glx_get_pixel_mapusv_reply_t *reply =
4231 xcb_glx_get_pixel_mapusv_reply(c,
4232 xcb_glx_get_pixel_mapusv(c,
4233 gc->
4234 currentContextTag,
4235 map),
4236 NULL);
4237 if (xcb_glx_get_pixel_mapusv_data_length(reply) == 0)
4238 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4239 else
4240 (void) memcpy(values, xcb_glx_get_pixel_mapusv_data(reply),
4241 xcb_glx_get_pixel_mapusv_data_length(reply) *
4242 sizeof(GLushort));
4243 free(reply);
4244 #else
4245 GLubyte const *pc =
4246 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
4247 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4248 (void) __glXReadReply(dpy, 2, values, GL_FALSE);
4249 UnlockDisplay(dpy);
4250 SyncHandle();
4251 #endif /* USE_XCB */
4252 }
4253 return;
4254 }
4255
4256 #define X_GLsop_GetPolygonStipple 128
4257 void
4258 __indirect_glGetPolygonStipple(GLubyte *mask)
4259 {
4260 __GLXcontext *const gc = __glXGetCurrentContext();
4261 Display *const dpy = gc->currentDpy;
4262 #ifndef USE_XCB
4263 const GLuint cmdlen = 4;
4264 #endif
4265 if (__builtin_expect(dpy != NULL, 1)) {
4266 #ifdef USE_XCB
4267 xcb_connection_t *c = XGetXCBConnection(dpy);
4268 (void) __glXFlushRenderBuffer(gc, gc->pc);
4269 xcb_glx_get_polygon_stipple_reply_t *reply =
4270 xcb_glx_get_polygon_stipple_reply(c,
4271 xcb_glx_get_polygon_stipple(c,
4272 gc->
4273 currentContextTag,
4274 0),
4275 NULL);
4276 (void) memcpy(mask, xcb_glx_get_polygon_stipple_data(reply),
4277 xcb_glx_get_polygon_stipple_data_length(reply) *
4278 sizeof(GLubyte));
4279 free(reply);
4280 #else
4281 GLubyte const *pc =
4282 __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
4283 *(int32_t *) (pc + 0) = 0;
4284 __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
4285 mask, GL_FALSE);
4286 UnlockDisplay(dpy);
4287 SyncHandle();
4288 #endif /* USE_XCB */
4289 }
4290 return;
4291 }
4292
4293 #define X_GLsop_GetTexEnvfv 130
4294 void
4295 __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
4296 {
4297 __GLXcontext *const gc = __glXGetCurrentContext();
4298 Display *const dpy = gc->currentDpy;
4299 #ifndef USE_XCB
4300 const GLuint cmdlen = 8;
4301 #endif
4302 if (__builtin_expect(dpy != NULL, 1)) {
4303 #ifdef USE_XCB
4304 xcb_connection_t *c = XGetXCBConnection(dpy);
4305 (void) __glXFlushRenderBuffer(gc, gc->pc);
4306 xcb_glx_get_tex_envfv_reply_t *reply =
4307 xcb_glx_get_tex_envfv_reply(c,
4308 xcb_glx_get_tex_envfv(c,
4309 gc->
4310 currentContextTag,
4311 target, pname),
4312 NULL);
4313 if (xcb_glx_get_tex_envfv_data_length(reply) == 0)
4314 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4315 else
4316 (void) memcpy(params, xcb_glx_get_tex_envfv_data(reply),
4317 xcb_glx_get_tex_envfv_data_length(reply) *
4318 sizeof(GLfloat));
4319 free(reply);
4320 #else
4321 GLubyte const *pc =
4322 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
4323 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4324 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4325 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4326 UnlockDisplay(dpy);
4327 SyncHandle();
4328 #endif /* USE_XCB */
4329 }
4330 return;
4331 }
4332
4333 #define X_GLsop_GetTexEnviv 131
4334 void
4335 __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
4336 {
4337 __GLXcontext *const gc = __glXGetCurrentContext();
4338 Display *const dpy = gc->currentDpy;
4339 #ifndef USE_XCB
4340 const GLuint cmdlen = 8;
4341 #endif
4342 if (__builtin_expect(dpy != NULL, 1)) {
4343 #ifdef USE_XCB
4344 xcb_connection_t *c = XGetXCBConnection(dpy);
4345 (void) __glXFlushRenderBuffer(gc, gc->pc);
4346 xcb_glx_get_tex_enviv_reply_t *reply =
4347 xcb_glx_get_tex_enviv_reply(c,
4348 xcb_glx_get_tex_enviv(c,
4349 gc->
4350 currentContextTag,
4351 target, pname),
4352 NULL);
4353 if (xcb_glx_get_tex_enviv_data_length(reply) == 0)
4354 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4355 else
4356 (void) memcpy(params, xcb_glx_get_tex_enviv_data(reply),
4357 xcb_glx_get_tex_enviv_data_length(reply) *
4358 sizeof(GLint));
4359 free(reply);
4360 #else
4361 GLubyte const *pc =
4362 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
4363 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4364 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4365 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4366 UnlockDisplay(dpy);
4367 SyncHandle();
4368 #endif /* USE_XCB */
4369 }
4370 return;
4371 }
4372
4373 #define X_GLsop_GetTexGendv 132
4374 void
4375 __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
4376 {
4377 __GLXcontext *const gc = __glXGetCurrentContext();
4378 Display *const dpy = gc->currentDpy;
4379 #ifndef USE_XCB
4380 const GLuint cmdlen = 8;
4381 #endif
4382 if (__builtin_expect(dpy != NULL, 1)) {
4383 #ifdef USE_XCB
4384 xcb_connection_t *c = XGetXCBConnection(dpy);
4385 (void) __glXFlushRenderBuffer(gc, gc->pc);
4386 xcb_glx_get_tex_gendv_reply_t *reply =
4387 xcb_glx_get_tex_gendv_reply(c,
4388 xcb_glx_get_tex_gendv(c,
4389 gc->
4390 currentContextTag,
4391 coord, pname),
4392 NULL);
4393 if (xcb_glx_get_tex_gendv_data_length(reply) == 0)
4394 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4395 else
4396 (void) memcpy(params, xcb_glx_get_tex_gendv_data(reply),
4397 xcb_glx_get_tex_gendv_data_length(reply) *
4398 sizeof(GLdouble));
4399 free(reply);
4400 #else
4401 GLubyte const *pc =
4402 __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
4403 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4404 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4405 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
4406 UnlockDisplay(dpy);
4407 SyncHandle();
4408 #endif /* USE_XCB */
4409 }
4410 return;
4411 }
4412
4413 #define X_GLsop_GetTexGenfv 133
4414 void
4415 __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
4416 {
4417 __GLXcontext *const gc = __glXGetCurrentContext();
4418 Display *const dpy = gc->currentDpy;
4419 #ifndef USE_XCB
4420 const GLuint cmdlen = 8;
4421 #endif
4422 if (__builtin_expect(dpy != NULL, 1)) {
4423 #ifdef USE_XCB
4424 xcb_connection_t *c = XGetXCBConnection(dpy);
4425 (void) __glXFlushRenderBuffer(gc, gc->pc);
4426 xcb_glx_get_tex_genfv_reply_t *reply =
4427 xcb_glx_get_tex_genfv_reply(c,
4428 xcb_glx_get_tex_genfv(c,
4429 gc->
4430 currentContextTag,
4431 coord, pname),
4432 NULL);
4433 if (xcb_glx_get_tex_genfv_data_length(reply) == 0)
4434 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4435 else
4436 (void) memcpy(params, xcb_glx_get_tex_genfv_data(reply),
4437 xcb_glx_get_tex_genfv_data_length(reply) *
4438 sizeof(GLfloat));
4439 free(reply);
4440 #else
4441 GLubyte const *pc =
4442 __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
4443 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4444 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4445 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4446 UnlockDisplay(dpy);
4447 SyncHandle();
4448 #endif /* USE_XCB */
4449 }
4450 return;
4451 }
4452
4453 #define X_GLsop_GetTexGeniv 134
4454 void
4455 __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
4456 {
4457 __GLXcontext *const gc = __glXGetCurrentContext();
4458 Display *const dpy = gc->currentDpy;
4459 #ifndef USE_XCB
4460 const GLuint cmdlen = 8;
4461 #endif
4462 if (__builtin_expect(dpy != NULL, 1)) {
4463 #ifdef USE_XCB
4464 xcb_connection_t *c = XGetXCBConnection(dpy);
4465 (void) __glXFlushRenderBuffer(gc, gc->pc);
4466 xcb_glx_get_tex_geniv_reply_t *reply =
4467 xcb_glx_get_tex_geniv_reply(c,
4468 xcb_glx_get_tex_geniv(c,
4469 gc->
4470 currentContextTag,
4471 coord, pname),
4472 NULL);
4473 if (xcb_glx_get_tex_geniv_data_length(reply) == 0)
4474 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4475 else
4476 (void) memcpy(params, xcb_glx_get_tex_geniv_data(reply),
4477 xcb_glx_get_tex_geniv_data_length(reply) *
4478 sizeof(GLint));
4479 free(reply);
4480 #else
4481 GLubyte const *pc =
4482 __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
4483 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4484 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4485 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4486 UnlockDisplay(dpy);
4487 SyncHandle();
4488 #endif /* USE_XCB */
4489 }
4490 return;
4491 }
4492
4493 #define X_GLsop_GetTexImage 135
4494 void
4495 __indirect_glGetTexImage(GLenum target, GLint level, GLenum format,
4496 GLenum type, GLvoid * pixels)
4497 {
4498 __GLXcontext *const gc = __glXGetCurrentContext();
4499 const __GLXattribute *const state = gc->client_state_private;
4500 Display *const dpy = gc->currentDpy;
4501 #ifndef USE_XCB
4502 const GLuint cmdlen = 20;
4503 #endif
4504 if (__builtin_expect(dpy != NULL, 1)) {
4505 #ifdef USE_XCB
4506 xcb_connection_t *c = XGetXCBConnection(dpy);
4507 (void) __glXFlushRenderBuffer(gc, gc->pc);
4508 xcb_glx_get_tex_image_reply_t *reply =
4509 xcb_glx_get_tex_image_reply(c,
4510 xcb_glx_get_tex_image(c,
4511 gc->
4512 currentContextTag,
4513 target, level,
4514 format, type,
4515 state->
4516 storePack.
4517 swapEndian),
4518 NULL);
4519 (void) memcpy(pixels, xcb_glx_get_tex_image_data(reply),
4520 xcb_glx_get_tex_image_data_length(reply) *
4521 sizeof(GLvoid));
4522 free(reply);
4523 #else
4524 GLubyte const *pc =
4525 __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
4526 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4527 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4528 (void) memcpy((void *) (pc + 8), (void *) (&format), 4);
4529 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
4530 *(int32_t *) (pc + 16) = 0;
4531 *(int8_t *) (pc + 16) = state->storePack.swapEndian;
4532 __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels,
4533 GL_TRUE);
4534 UnlockDisplay(dpy);
4535 SyncHandle();
4536 #endif /* USE_XCB */
4537 }
4538 return;
4539 }
4540
4541 #define X_GLsop_GetTexParameterfv 136
4542 void
4543 __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
4544 {
4545 __GLXcontext *const gc = __glXGetCurrentContext();
4546 Display *const dpy = gc->currentDpy;
4547 #ifndef USE_XCB
4548 const GLuint cmdlen = 8;
4549 #endif
4550 if (__builtin_expect(dpy != NULL, 1)) {
4551 #ifdef USE_XCB
4552 xcb_connection_t *c = XGetXCBConnection(dpy);
4553 (void) __glXFlushRenderBuffer(gc, gc->pc);
4554 xcb_glx_get_tex_parameterfv_reply_t *reply =
4555 xcb_glx_get_tex_parameterfv_reply(c,
4556 xcb_glx_get_tex_parameterfv(c,
4557 gc->
4558 currentContextTag,
4559 target,
4560 pname),
4561 NULL);
4562 if (xcb_glx_get_tex_parameterfv_data_length(reply) == 0)
4563 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4564 else
4565 (void) memcpy(params, xcb_glx_get_tex_parameterfv_data(reply),
4566 xcb_glx_get_tex_parameterfv_data_length(reply) *
4567 sizeof(GLfloat));
4568 free(reply);
4569 #else
4570 GLubyte const *pc =
4571 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
4572 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4573 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4574 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4575 UnlockDisplay(dpy);
4576 SyncHandle();
4577 #endif /* USE_XCB */
4578 }
4579 return;
4580 }
4581
4582 #define X_GLsop_GetTexParameteriv 137
4583 void
4584 __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
4585 {
4586 __GLXcontext *const gc = __glXGetCurrentContext();
4587 Display *const dpy = gc->currentDpy;
4588 #ifndef USE_XCB
4589 const GLuint cmdlen = 8;
4590 #endif
4591 if (__builtin_expect(dpy != NULL, 1)) {
4592 #ifdef USE_XCB
4593 xcb_connection_t *c = XGetXCBConnection(dpy);
4594 (void) __glXFlushRenderBuffer(gc, gc->pc);
4595 xcb_glx_get_tex_parameteriv_reply_t *reply =
4596 xcb_glx_get_tex_parameteriv_reply(c,
4597 xcb_glx_get_tex_parameteriv(c,
4598 gc->
4599 currentContextTag,
4600 target,
4601 pname),
4602 NULL);
4603 if (xcb_glx_get_tex_parameteriv_data_length(reply) == 0)
4604 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4605 else
4606 (void) memcpy(params, xcb_glx_get_tex_parameteriv_data(reply),
4607 xcb_glx_get_tex_parameteriv_data_length(reply) *
4608 sizeof(GLint));
4609 free(reply);
4610 #else
4611 GLubyte const *pc =
4612 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
4613 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4614 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4615 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4616 UnlockDisplay(dpy);
4617 SyncHandle();
4618 #endif /* USE_XCB */
4619 }
4620 return;
4621 }
4622
4623 #define X_GLsop_GetTexLevelParameterfv 138
4624 void
4625 __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
4626 GLfloat * params)
4627 {
4628 __GLXcontext *const gc = __glXGetCurrentContext();
4629 Display *const dpy = gc->currentDpy;
4630 #ifndef USE_XCB
4631 const GLuint cmdlen = 12;
4632 #endif
4633 if (__builtin_expect(dpy != NULL, 1)) {
4634 #ifdef USE_XCB
4635 xcb_connection_t *c = XGetXCBConnection(dpy);
4636 (void) __glXFlushRenderBuffer(gc, gc->pc);
4637 xcb_glx_get_tex_level_parameterfv_reply_t *reply =
4638 xcb_glx_get_tex_level_parameterfv_reply(c,
4639 xcb_glx_get_tex_level_parameterfv
4640 (c, gc->currentContextTag,
4641 target, level, pname),
4642 NULL);
4643 if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 0)
4644 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4645 else
4646 (void) memcpy(params,
4647 xcb_glx_get_tex_level_parameterfv_data(reply),
4648 xcb_glx_get_tex_level_parameterfv_data_length(reply)
4649 * sizeof(GLfloat));
4650 free(reply);
4651 #else
4652 GLubyte const *pc =
4653 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv,
4654 cmdlen);
4655 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4656 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4657 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4658 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4659 UnlockDisplay(dpy);
4660 SyncHandle();
4661 #endif /* USE_XCB */
4662 }
4663 return;
4664 }
4665
4666 #define X_GLsop_GetTexLevelParameteriv 139
4667 void
4668 __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
4669 GLint * params)
4670 {
4671 __GLXcontext *const gc = __glXGetCurrentContext();
4672 Display *const dpy = gc->currentDpy;
4673 #ifndef USE_XCB
4674 const GLuint cmdlen = 12;
4675 #endif
4676 if (__builtin_expect(dpy != NULL, 1)) {
4677 #ifdef USE_XCB
4678 xcb_connection_t *c = XGetXCBConnection(dpy);
4679 (void) __glXFlushRenderBuffer(gc, gc->pc);
4680 xcb_glx_get_tex_level_parameteriv_reply_t *reply =
4681 xcb_glx_get_tex_level_parameteriv_reply(c,
4682 xcb_glx_get_tex_level_parameteriv
4683 (c, gc->currentContextTag,
4684 target, level, pname),
4685 NULL);
4686 if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 0)
4687 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4688 else
4689 (void) memcpy(params,
4690 xcb_glx_get_tex_level_parameteriv_data(reply),
4691 xcb_glx_get_tex_level_parameteriv_data_length(reply)
4692 * sizeof(GLint));
4693 free(reply);
4694 #else
4695 GLubyte const *pc =
4696 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv,
4697 cmdlen);
4698 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4699 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4700 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4701 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4702 UnlockDisplay(dpy);
4703 SyncHandle();
4704 #endif /* USE_XCB */
4705 }
4706 return;
4707 }
4708
4709 #define X_GLsop_IsList 141
4710 GLboolean
4711 __indirect_glIsList(GLuint list)
4712 {
4713 __GLXcontext *const gc = __glXGetCurrentContext();
4714 Display *const dpy = gc->currentDpy;
4715 GLboolean retval = (GLboolean) 0;
4716 #ifndef USE_XCB
4717 const GLuint cmdlen = 4;
4718 #endif
4719 if (__builtin_expect(dpy != NULL, 1)) {
4720 #ifdef USE_XCB
4721 xcb_connection_t *c = XGetXCBConnection(dpy);
4722 (void) __glXFlushRenderBuffer(gc, gc->pc);
4723 xcb_glx_is_list_reply_t *reply =
4724 xcb_glx_is_list_reply(c,
4725 xcb_glx_is_list(c, gc->currentContextTag,
4726 list), NULL);
4727 retval = reply->ret_val;
4728 free(reply);
4729 #else
4730 GLubyte const *pc =
4731 __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
4732 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
4733 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4734 UnlockDisplay(dpy);
4735 SyncHandle();
4736 #endif /* USE_XCB */
4737 }
4738 return retval;
4739 }
4740
4741 #define X_GLrop_DepthRange 174
4742 void
4743 __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
4744 {
4745 __GLXcontext *const gc = __glXGetCurrentContext();
4746 const GLuint cmdlen = 20;
4747 emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
4748 (void) memcpy((void *) (gc->pc + 4), (void *) (&zNear), 8);
4749 (void) memcpy((void *) (gc->pc + 12), (void *) (&zFar), 8);
4750 gc->pc += cmdlen;
4751 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4752 (void) __glXFlushRenderBuffer(gc, gc->pc);
4753 }
4754 }
4755
4756 #define X_GLrop_Frustum 175
4757 void
4758 __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
4759 GLdouble top, GLdouble zNear, GLdouble zFar)
4760 {
4761 __GLXcontext *const gc = __glXGetCurrentContext();
4762 const GLuint cmdlen = 52;
4763 emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
4764 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4765 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4766 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4767 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4768 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4769 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4770 gc->pc += cmdlen;
4771 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4772 (void) __glXFlushRenderBuffer(gc, gc->pc);
4773 }
4774 }
4775
4776 #define X_GLrop_LoadIdentity 176
4777 void
4778 __indirect_glLoadIdentity(void)
4779 {
4780 __GLXcontext *const gc = __glXGetCurrentContext();
4781 const GLuint cmdlen = 4;
4782 emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
4783 gc->pc += cmdlen;
4784 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4785 (void) __glXFlushRenderBuffer(gc, gc->pc);
4786 }
4787 }
4788
4789 #define X_GLrop_LoadMatrixf 177
4790 void
4791 __indirect_glLoadMatrixf(const GLfloat * m)
4792 {
4793 __GLXcontext *const gc = __glXGetCurrentContext();
4794 const GLuint cmdlen = 68;
4795 emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
4796 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4797 gc->pc += cmdlen;
4798 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4799 (void) __glXFlushRenderBuffer(gc, gc->pc);
4800 }
4801 }
4802
4803 #define X_GLrop_LoadMatrixd 178
4804 void
4805 __indirect_glLoadMatrixd(const GLdouble * m)
4806 {
4807 __GLXcontext *const gc = __glXGetCurrentContext();
4808 const GLuint cmdlen = 132;
4809 emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
4810 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4811 gc->pc += cmdlen;
4812 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4813 (void) __glXFlushRenderBuffer(gc, gc->pc);
4814 }
4815 }
4816
4817 #define X_GLrop_MatrixMode 179
4818 void
4819 __indirect_glMatrixMode(GLenum mode)
4820 {
4821 __GLXcontext *const gc = __glXGetCurrentContext();
4822 const GLuint cmdlen = 8;
4823 emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
4824 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
4825 gc->pc += cmdlen;
4826 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4827 (void) __glXFlushRenderBuffer(gc, gc->pc);
4828 }
4829 }
4830
4831 #define X_GLrop_MultMatrixf 180
4832 void
4833 __indirect_glMultMatrixf(const GLfloat * m)
4834 {
4835 __GLXcontext *const gc = __glXGetCurrentContext();
4836 const GLuint cmdlen = 68;
4837 emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
4838 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4839 gc->pc += cmdlen;
4840 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4841 (void) __glXFlushRenderBuffer(gc, gc->pc);
4842 }
4843 }
4844
4845 #define X_GLrop_MultMatrixd 181
4846 void
4847 __indirect_glMultMatrixd(const GLdouble * m)
4848 {
4849 __GLXcontext *const gc = __glXGetCurrentContext();
4850 const GLuint cmdlen = 132;
4851 emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
4852 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4853 gc->pc += cmdlen;
4854 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4855 (void) __glXFlushRenderBuffer(gc, gc->pc);
4856 }
4857 }
4858
4859 #define X_GLrop_Ortho 182
4860 void
4861 __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
4862 GLdouble top, GLdouble zNear, GLdouble zFar)
4863 {
4864 __GLXcontext *const gc = __glXGetCurrentContext();
4865 const GLuint cmdlen = 52;
4866 emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
4867 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4868 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4869 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4870 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4871 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4872 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4873 gc->pc += cmdlen;
4874 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4875 (void) __glXFlushRenderBuffer(gc, gc->pc);
4876 }
4877 }
4878
4879 #define X_GLrop_PopMatrix 183
4880 void
4881 __indirect_glPopMatrix(void)
4882 {
4883 __GLXcontext *const gc = __glXGetCurrentContext();
4884 const GLuint cmdlen = 4;
4885 emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
4886 gc->pc += cmdlen;
4887 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4888 (void) __glXFlushRenderBuffer(gc, gc->pc);
4889 }
4890 }
4891
4892 #define X_GLrop_PushMatrix 184
4893 void
4894 __indirect_glPushMatrix(void)
4895 {
4896 __GLXcontext *const gc = __glXGetCurrentContext();
4897 const GLuint cmdlen = 4;
4898 emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
4899 gc->pc += cmdlen;
4900 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4901 (void) __glXFlushRenderBuffer(gc, gc->pc);
4902 }
4903 }
4904
4905 #define X_GLrop_Rotated 185
4906 void
4907 __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4908 {
4909 __GLXcontext *const gc = __glXGetCurrentContext();
4910 const GLuint cmdlen = 36;
4911 emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
4912 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 8);
4913 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
4914 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
4915 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
4916 gc->pc += cmdlen;
4917 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4918 (void) __glXFlushRenderBuffer(gc, gc->pc);
4919 }
4920 }
4921
4922 #define X_GLrop_Rotatef 186
4923 void
4924 __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
4925 {
4926 __GLXcontext *const gc = __glXGetCurrentContext();
4927 const GLuint cmdlen = 20;
4928 emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
4929 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 4);
4930 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
4931 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
4932 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
4933 gc->pc += cmdlen;
4934 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4935 (void) __glXFlushRenderBuffer(gc, gc->pc);
4936 }
4937 }
4938
4939 #define X_GLrop_Scaled 187
4940 void
4941 __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
4942 {
4943 __GLXcontext *const gc = __glXGetCurrentContext();
4944 const GLuint cmdlen = 28;
4945 emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
4946 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4947 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4948 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4949 gc->pc += cmdlen;
4950 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4951 (void) __glXFlushRenderBuffer(gc, gc->pc);
4952 }
4953 }
4954
4955 #define X_GLrop_Scalef 188
4956 void
4957 __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
4958 {
4959 __GLXcontext *const gc = __glXGetCurrentContext();
4960 const GLuint cmdlen = 16;
4961 emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
4962 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4963 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4964 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4965 gc->pc += cmdlen;
4966 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4967 (void) __glXFlushRenderBuffer(gc, gc->pc);
4968 }
4969 }
4970
4971 #define X_GLrop_Translated 189
4972 void
4973 __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
4974 {
4975 __GLXcontext *const gc = __glXGetCurrentContext();
4976 const GLuint cmdlen = 28;
4977 emit_header(gc->pc, X_GLrop_Translated, cmdlen);
4978 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4979 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4980 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4981 gc->pc += cmdlen;
4982 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4983 (void) __glXFlushRenderBuffer(gc, gc->pc);
4984 }
4985 }
4986
4987 #define X_GLrop_Translatef 190
4988 void
4989 __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
4990 {
4991 __GLXcontext *const gc = __glXGetCurrentContext();
4992 const GLuint cmdlen = 16;
4993 emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
4994 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4995 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4996 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4997 gc->pc += cmdlen;
4998 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4999 (void) __glXFlushRenderBuffer(gc, gc->pc);
5000 }
5001 }
5002
5003 #define X_GLrop_Viewport 191
5004 void
5005 __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
5006 {
5007 __GLXcontext *const gc = __glXGetCurrentContext();
5008 const GLuint cmdlen = 20;
5009 emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
5010 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
5011 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
5012 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
5013 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
5014 gc->pc += cmdlen;
5015 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5016 (void) __glXFlushRenderBuffer(gc, gc->pc);
5017 }
5018 }
5019
5020 #define X_GLrop_BindTexture 4117
5021 void
5022 __indirect_glBindTexture(GLenum target, GLuint texture)
5023 {
5024 __GLXcontext *const gc = __glXGetCurrentContext();
5025 const GLuint cmdlen = 12;
5026 emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
5027 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5028 (void) memcpy((void *) (gc->pc + 8), (void *) (&texture), 4);
5029 gc->pc += cmdlen;
5030 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5031 (void) __glXFlushRenderBuffer(gc, gc->pc);
5032 }
5033 }
5034
5035 #define X_GLrop_Indexubv 194
5036 void
5037 __indirect_glIndexub(GLubyte c)
5038 {
5039 __GLXcontext *const gc = __glXGetCurrentContext();
5040 const GLuint cmdlen = 8;
5041 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
5042 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 1);
5043 gc->pc += cmdlen;
5044 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5045 (void) __glXFlushRenderBuffer(gc, gc->pc);
5046 }
5047 }
5048
5049 #define X_GLrop_Indexubv 194
5050 void
5051 __indirect_glIndexubv(const GLubyte *c)
5052 {
5053 __GLXcontext *const gc = __glXGetCurrentContext();
5054 const GLuint cmdlen = 8;
5055 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
5056 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 1);
5057 gc->pc += cmdlen;
5058 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5059 (void) __glXFlushRenderBuffer(gc, gc->pc);
5060 }
5061 }
5062
5063 #define X_GLrop_PolygonOffset 192
5064 void
5065 __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
5066 {
5067 __GLXcontext *const gc = __glXGetCurrentContext();
5068 const GLuint cmdlen = 12;
5069 emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
5070 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
5071 (void) memcpy((void *) (gc->pc + 8), (void *) (&units), 4);
5072 gc->pc += cmdlen;
5073 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5074 (void) __glXFlushRenderBuffer(gc, gc->pc);
5075 }
5076 }
5077
5078 #define X_GLrop_CopyTexImage1D 4119
5079 void
5080 __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
5081 GLint x, GLint y, GLsizei width, GLint border)
5082 {
5083 __GLXcontext *const gc = __glXGetCurrentContext();
5084 const GLuint cmdlen = 32;
5085 emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
5086 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5087 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5088 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5089 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5090 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5091 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5092 (void) memcpy((void *) (gc->pc + 28), (void *) (&border), 4);
5093 gc->pc += cmdlen;
5094 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5095 (void) __glXFlushRenderBuffer(gc, gc->pc);
5096 }
5097 }
5098
5099 #define X_GLrop_CopyTexImage2D 4120
5100 void
5101 __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
5102 GLint x, GLint y, GLsizei width, GLsizei height,
5103 GLint border)
5104 {
5105 __GLXcontext *const gc = __glXGetCurrentContext();
5106 const GLuint cmdlen = 36;
5107 emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
5108 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5109 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5110 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5111 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5112 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5113 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5114 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
5115 (void) memcpy((void *) (gc->pc + 32), (void *) (&border), 4);
5116 gc->pc += cmdlen;
5117 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5118 (void) __glXFlushRenderBuffer(gc, gc->pc);
5119 }
5120 }
5121
5122 #define X_GLrop_CopyTexSubImage1D 4121
5123 void
5124 __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5125 GLint x, GLint y, GLsizei width)
5126 {
5127 __GLXcontext *const gc = __glXGetCurrentContext();
5128 const GLuint cmdlen = 28;
5129 emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
5130 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5131 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5132 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5133 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5134 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5135 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5136 gc->pc += cmdlen;
5137 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5138 (void) __glXFlushRenderBuffer(gc, gc->pc);
5139 }
5140 }
5141
5142 #define X_GLrop_CopyTexSubImage2D 4122
5143 void
5144 __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5145 GLint yoffset, GLint x, GLint y, GLsizei width,
5146 GLsizei height)
5147 {
5148 __GLXcontext *const gc = __glXGetCurrentContext();
5149 const GLuint cmdlen = 36;
5150 emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
5151 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5152 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5153 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5154 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
5155 (void) memcpy((void *) (gc->pc + 20), (void *) (&x), 4);
5156 (void) memcpy((void *) (gc->pc + 24), (void *) (&y), 4);
5157 (void) memcpy((void *) (gc->pc + 28), (void *) (&width), 4);
5158 (void) memcpy((void *) (gc->pc + 32), (void *) (&height), 4);
5159 gc->pc += cmdlen;
5160 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5161 (void) __glXFlushRenderBuffer(gc, gc->pc);
5162 }
5163 }
5164
5165 #define X_GLsop_DeleteTextures 144
5166 void
5167 __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
5168 {
5169 __GLXcontext *const gc = __glXGetCurrentContext();
5170 Display *const dpy = gc->currentDpy;
5171 #ifndef USE_XCB
5172 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5173 #endif
5174 if (n < 0) {
5175 __glXSetError(gc, GL_INVALID_VALUE);
5176 return;
5177 }
5178 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5179 #ifdef USE_XCB
5180 xcb_connection_t *c = XGetXCBConnection(dpy);
5181 (void) __glXFlushRenderBuffer(gc, gc->pc);
5182 xcb_glx_delete_textures(c, gc->currentContextTag, n, textures);
5183 #else
5184 GLubyte const *pc =
5185 __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
5186 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5187 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5188 UnlockDisplay(dpy);
5189 SyncHandle();
5190 #endif /* USE_XCB */
5191 }
5192 return;
5193 }
5194
5195 #define X_GLvop_DeleteTexturesEXT 12
5196 void
5197 glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
5198 {
5199 __GLXcontext *const gc = __glXGetCurrentContext();
5200
5201 if (gc->driContext) {
5202 CALL_DeleteTextures(GET_DISPATCH(), (n, textures));
5203 } else {
5204 __GLXcontext *const gc = __glXGetCurrentContext();
5205 Display *const dpy = gc->currentDpy;
5206 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5207 if (n < 0) {
5208 __glXSetError(gc, GL_INVALID_VALUE);
5209 return;
5210 }
5211 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5212 GLubyte const *pc =
5213 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
5214 X_GLvop_DeleteTexturesEXT, cmdlen);
5215 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5216 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5217 UnlockDisplay(dpy);
5218 SyncHandle();
5219 }
5220 return;
5221 }
5222 }
5223
5224 #define X_GLsop_GenTextures 145
5225 void
5226 __indirect_glGenTextures(GLsizei n, GLuint * textures)
5227 {
5228 __GLXcontext *const gc = __glXGetCurrentContext();
5229 Display *const dpy = gc->currentDpy;
5230 #ifndef USE_XCB
5231 const GLuint cmdlen = 4;
5232 #endif
5233 if (n < 0) {
5234 __glXSetError(gc, GL_INVALID_VALUE);
5235 return;
5236 }
5237 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5238 #ifdef USE_XCB
5239 xcb_connection_t *c = XGetXCBConnection(dpy);
5240 (void) __glXFlushRenderBuffer(gc, gc->pc);
5241 xcb_glx_gen_textures_reply_t *reply =
5242 xcb_glx_gen_textures_reply(c,
5243 xcb_glx_gen_textures(c,
5244 gc->
5245 currentContextTag,
5246 n), NULL);
5247 (void) memcpy(textures, xcb_glx_gen_textures_data(reply),
5248 xcb_glx_gen_textures_data_length(reply) *
5249 sizeof(GLuint));
5250 free(reply);
5251 #else
5252 GLubyte const *pc =
5253 __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
5254 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5255 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5256 UnlockDisplay(dpy);
5257 SyncHandle();
5258 #endif /* USE_XCB */
5259 }
5260 return;
5261 }
5262
5263 #define X_GLvop_GenTexturesEXT 13
5264 void
5265 glGenTexturesEXT(GLsizei n, GLuint * textures)
5266 {
5267 __GLXcontext *const gc = __glXGetCurrentContext();
5268
5269 if (gc->driContext) {
5270 CALL_GenTextures(GET_DISPATCH(), (n, textures));
5271 } else {
5272 __GLXcontext *const gc = __glXGetCurrentContext();
5273 Display *const dpy = gc->currentDpy;
5274 const GLuint cmdlen = 4;
5275 if (n < 0) {
5276 __glXSetError(gc, GL_INVALID_VALUE);
5277 return;
5278 }
5279 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5280 GLubyte const *pc =
5281 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5282 X_GLvop_GenTexturesEXT, cmdlen);
5283 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5284 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5285 UnlockDisplay(dpy);
5286 SyncHandle();
5287 }
5288 return;
5289 }
5290 }
5291
5292 #define X_GLsop_IsTexture 146
5293 GLboolean
5294 __indirect_glIsTexture(GLuint texture)
5295 {
5296 __GLXcontext *const gc = __glXGetCurrentContext();
5297 Display *const dpy = gc->currentDpy;
5298 GLboolean retval = (GLboolean) 0;
5299 #ifndef USE_XCB
5300 const GLuint cmdlen = 4;
5301 #endif
5302 if (__builtin_expect(dpy != NULL, 1)) {
5303 #ifdef USE_XCB
5304 xcb_connection_t *c = XGetXCBConnection(dpy);
5305 (void) __glXFlushRenderBuffer(gc, gc->pc);
5306 xcb_glx_is_texture_reply_t *reply =
5307 xcb_glx_is_texture_reply(c,
5308 xcb_glx_is_texture(c,
5309 gc->currentContextTag,
5310 texture), NULL);
5311 retval = reply->ret_val;
5312 free(reply);
5313 #else
5314 GLubyte const *pc =
5315 __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
5316 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5317 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5318 UnlockDisplay(dpy);
5319 SyncHandle();
5320 #endif /* USE_XCB */
5321 }
5322 return retval;
5323 }
5324
5325 #define X_GLvop_IsTextureEXT 14
5326 GLboolean
5327 glIsTextureEXT(GLuint texture)
5328 {
5329 __GLXcontext *const gc = __glXGetCurrentContext();
5330
5331 if (gc->driContext) {
5332 return CALL_IsTexture(GET_DISPATCH(), (texture));
5333 } else {
5334 __GLXcontext *const gc = __glXGetCurrentContext();
5335 Display *const dpy = gc->currentDpy;
5336 GLboolean retval = (GLboolean) 0;
5337 const GLuint cmdlen = 4;
5338 if (__builtin_expect(dpy != NULL, 1)) {
5339 GLubyte const *pc =
5340 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5341 X_GLvop_IsTextureEXT, cmdlen);
5342 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5343 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5344 UnlockDisplay(dpy);
5345 SyncHandle();
5346 }
5347 return retval;
5348 }
5349 }
5350
5351 #define X_GLrop_PrioritizeTextures 4118
5352 void
5353 __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures,
5354 const GLclampf * priorities)
5355 {
5356 __GLXcontext *const gc = __glXGetCurrentContext();
5357 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
5358 if (n < 0) {
5359 __glXSetError(gc, GL_INVALID_VALUE);
5360 return;
5361 }
5362 if (__builtin_expect(n >= 0, 1)) {
5363 emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
5364 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
5365 (void) memcpy((void *) (gc->pc + 8), (void *) (textures), (n * 4));
5366 (void) memcpy((void *) (gc->pc + 8 + (n * 4)), (void *) (priorities),
5367 (n * 4));
5368 gc->pc += cmdlen;
5369 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5370 (void) __glXFlushRenderBuffer(gc, gc->pc);
5371 }
5372 }
5373 }
5374
5375 static void
5376 __glx_TexSubImage_1D2D(unsigned opcode, unsigned dim, GLenum target,
5377 GLint level, GLint xoffset, GLint yoffset,
5378 GLsizei width, GLsizei height, GLenum format,
5379 GLenum type, const GLvoid * pixels)
5380 {
5381 __GLXcontext *const gc = __glXGetCurrentContext();
5382 const GLuint compsize =
5383 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
5384 target) : 0;
5385 const GLuint cmdlen = 60 + __GLX_PAD(compsize);
5386 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5387 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5388 if ((gc->pc + cmdlen) > gc->bufEnd) {
5389 (void) __glXFlushRenderBuffer(gc, gc->pc);
5390 }
5391 emit_header(gc->pc, opcode, cmdlen);
5392 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5393 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
5394 (void) memcpy((void *) (gc->pc + 32), (void *) (&xoffset), 4);
5395 (void) memcpy((void *) (gc->pc + 36), (void *) (&yoffset), 4);
5396 (void) memcpy((void *) (gc->pc + 40), (void *) (&width), 4);
5397 (void) memcpy((void *) (gc->pc + 44), (void *) (&height), 4);
5398 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
5399 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
5400 (void) memcpy((void *) (gc->pc + 56),
5401 (void *) ((pixels == NULL) ? one : zero), 4);
5402 if (compsize > 0) {
5403 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5404 pixels, gc->pc + 60, gc->pc + 4);
5405 } else {
5406 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5407 default_pixel_store_2D_size);
5408 }
5409 gc->pc += cmdlen;
5410 if (gc->pc > gc->limit) {
5411 (void) __glXFlushRenderBuffer(gc, gc->pc);
5412 }
5413 } else {
5414 const GLint op = opcode;
5415 const GLuint cmdlenLarge = cmdlen + 4;
5416 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5417 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5418 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5419 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5420 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
5421 (void) memcpy((void *) (pc + 36), (void *) (&xoffset), 4);
5422 (void) memcpy((void *) (pc + 40), (void *) (&yoffset), 4);
5423 (void) memcpy((void *) (pc + 44), (void *) (&width), 4);
5424 (void) memcpy((void *) (pc + 48), (void *) (&height), 4);
5425 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
5426 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
5427 (void) memcpy((void *) (pc + 60), zero, 4);
5428 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5429 type, pixels, pc + 64, pc + 8);
5430 }
5431 }
5432 }
5433
5434 #define X_GLrop_TexSubImage1D 4099
5435 void
5436 __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5437 GLsizei width, GLenum format, GLenum type,
5438 const GLvoid * pixels)
5439 {
5440 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset,
5441 1, width, 1, format, type, pixels);
5442 }
5443
5444 #define X_GLrop_TexSubImage2D 4100
5445 void
5446 __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5447 GLint yoffset, GLsizei width, GLsizei height,
5448 GLenum format, GLenum type, const GLvoid * pixels)
5449 {
5450 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset,
5451 yoffset, width, height, format, type, pixels);
5452 }
5453
5454 #define X_GLrop_BlendColor 4096
5455 void
5456 __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue,
5457 GLclampf alpha)
5458 {
5459 __GLXcontext *const gc = __glXGetCurrentContext();
5460 const GLuint cmdlen = 20;
5461 emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
5462 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
5463 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
5464 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
5465 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
5466 gc->pc += cmdlen;
5467 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5468 (void) __glXFlushRenderBuffer(gc, gc->pc);
5469 }
5470 }
5471
5472 #define X_GLrop_BlendEquation 4097
5473 void
5474 __indirect_glBlendEquation(GLenum mode)
5475 {
5476 __GLXcontext *const gc = __glXGetCurrentContext();
5477 const GLuint cmdlen = 8;
5478 emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
5479 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
5480 gc->pc += cmdlen;
5481 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5482 (void) __glXFlushRenderBuffer(gc, gc->pc);
5483 }
5484 }
5485
5486 #define X_GLrop_ColorTable 2053
5487 void
5488 __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width,
5489 GLenum format, GLenum type, const GLvoid * table)
5490 {
5491 __GLXcontext *const gc = __glXGetCurrentContext();
5492 const GLuint compsize =
5493 (table != NULL) ? __glImageSize(width, 1, 1, format, type,
5494 target) : 0;
5495 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5496 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5497 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5498 if ((gc->pc + cmdlen) > gc->bufEnd) {
5499 (void) __glXFlushRenderBuffer(gc, gc->pc);
5500 }
5501 emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
5502 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5503 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5504 4);
5505 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5506 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5507 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5508 if (compsize > 0) {
5509 (*gc->fillImage) (gc, 1, width, 1, 1, format, type, table,
5510 gc->pc + 44, gc->pc + 4);
5511 } else {
5512 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5513 default_pixel_store_1D_size);
5514 }
5515 gc->pc += cmdlen;
5516 if (gc->pc > gc->limit) {
5517 (void) __glXFlushRenderBuffer(gc, gc->pc);
5518 }
5519 } else {
5520 const GLint op = X_GLrop_ColorTable;
5521 const GLuint cmdlenLarge = cmdlen + 4;
5522 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5523 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5524 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5525 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5526 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5527 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5528 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5529 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5530 __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type,
5531 table, pc + 48, pc + 8);
5532 }
5533 }
5534 }
5535
5536 #define X_GLrop_ColorTableParameterfv 2054
5537 void
5538 __indirect_glColorTableParameterfv(GLenum target, GLenum pname,
5539 const GLfloat * params)
5540 {
5541 __GLXcontext *const gc = __glXGetCurrentContext();
5542 const GLuint compsize = __glColorTableParameterfv_size(pname);
5543 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5544 emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
5545 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5546 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5547 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5548 gc->pc += cmdlen;
5549 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5550 (void) __glXFlushRenderBuffer(gc, gc->pc);
5551 }
5552 }
5553
5554 #define X_GLrop_ColorTableParameteriv 2055
5555 void
5556 __indirect_glColorTableParameteriv(GLenum target, GLenum pname,
5557 const GLint * params)
5558 {
5559 __GLXcontext *const gc = __glXGetCurrentContext();
5560 const GLuint compsize = __glColorTableParameteriv_size(pname);
5561 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5562 emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
5563 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5564 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5565 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5566 gc->pc += cmdlen;
5567 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5568 (void) __glXFlushRenderBuffer(gc, gc->pc);
5569 }
5570 }
5571
5572 #define X_GLrop_CopyColorTable 2056
5573 void
5574 __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x,
5575 GLint y, GLsizei width)
5576 {
5577 __GLXcontext *const gc = __glXGetCurrentContext();
5578 const GLuint cmdlen = 24;
5579 emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
5580 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5581 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
5582 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5583 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5584 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5585 gc->pc += cmdlen;
5586 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5587 (void) __glXFlushRenderBuffer(gc, gc->pc);
5588 }
5589 }
5590
5591 #define X_GLsop_GetColorTable 147
5592 void
5593 __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
5594 GLvoid * table)
5595 {
5596 __GLXcontext *const gc = __glXGetCurrentContext();
5597 const __GLXattribute *const state = gc->client_state_private;
5598 Display *const dpy = gc->currentDpy;
5599 #ifndef USE_XCB
5600 const GLuint cmdlen = 16;
5601 #endif
5602 if (__builtin_expect(dpy != NULL, 1)) {
5603 #ifdef USE_XCB
5604 xcb_connection_t *c = XGetXCBConnection(dpy);
5605 (void) __glXFlushRenderBuffer(gc, gc->pc);
5606 xcb_glx_get_color_table_reply_t *reply =
5607 xcb_glx_get_color_table_reply(c,
5608 xcb_glx_get_color_table(c,
5609 gc->
5610 currentContextTag,
5611 target,
5612 format,
5613 type,
5614 state->
5615 storePack.
5616 swapEndian),
5617 NULL);
5618 (void) memcpy(table, xcb_glx_get_color_table_data(reply),
5619 xcb_glx_get_color_table_data_length(reply) *
5620 sizeof(GLvoid));
5621 free(reply);
5622 #else
5623 GLubyte const *pc =
5624 __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
5625 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5626 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5627 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5628 *(int32_t *) (pc + 12) = 0;
5629 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5630 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5631 GL_TRUE);
5632 UnlockDisplay(dpy);
5633 SyncHandle();
5634 #endif /* USE_XCB */
5635 }
5636 return;
5637 }
5638
5639 #define X_GLvop_GetColorTableSGI 4098
5640 void
5641 glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
5642 {
5643 __GLXcontext *const gc = __glXGetCurrentContext();
5644
5645 if (gc->driContext) {
5646 CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table));
5647 } else {
5648 __GLXcontext *const gc = __glXGetCurrentContext();
5649 const __GLXattribute *const state = gc->client_state_private;
5650 Display *const dpy = gc->currentDpy;
5651 const GLuint cmdlen = 16;
5652 if (__builtin_expect(dpy != NULL, 1)) {
5653 GLubyte const *pc =
5654 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5655 X_GLvop_GetColorTableSGI, cmdlen);
5656 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5657 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5658 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5659 *(int32_t *) (pc + 12) = 0;
5660 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5661 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5662 GL_TRUE);
5663 UnlockDisplay(dpy);
5664 SyncHandle();
5665 }
5666 return;
5667 }
5668 }
5669
5670 #define X_GLsop_GetColorTableParameterfv 148
5671 void
5672 __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
5673 GLfloat * params)
5674 {
5675 __GLXcontext *const gc = __glXGetCurrentContext();
5676 Display *const dpy = gc->currentDpy;
5677 #ifndef USE_XCB
5678 const GLuint cmdlen = 8;
5679 #endif
5680 if (__builtin_expect(dpy != NULL, 1)) {
5681 #ifdef USE_XCB
5682 xcb_connection_t *c = XGetXCBConnection(dpy);
5683 (void) __glXFlushRenderBuffer(gc, gc->pc);
5684 xcb_glx_get_color_table_parameterfv_reply_t *reply =
5685 xcb_glx_get_color_table_parameterfv_reply(c,
5686 xcb_glx_get_color_table_parameterfv
5687 (c,
5688 gc->currentContextTag,
5689 target, pname), NULL);
5690 if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 0)
5691 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5692 else
5693 (void) memcpy(params,
5694 xcb_glx_get_color_table_parameterfv_data(reply),
5695 xcb_glx_get_color_table_parameterfv_data_length
5696 (reply) * sizeof(GLfloat));
5697 free(reply);
5698 #else
5699 GLubyte const *pc =
5700 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv,
5701 cmdlen);
5702 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5703 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5704 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5705 UnlockDisplay(dpy);
5706 SyncHandle();
5707 #endif /* USE_XCB */
5708 }
5709 return;
5710 }
5711
5712 #define X_GLvop_GetColorTableParameterfvSGI 4099
5713 void
5714 glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
5715 {
5716 __GLXcontext *const gc = __glXGetCurrentContext();
5717
5718 if (gc->driContext) {
5719 CALL_GetColorTableParameterfv(GET_DISPATCH(),
5720 (target, pname, params));
5721 } else {
5722 __GLXcontext *const gc = __glXGetCurrentContext();
5723 Display *const dpy = gc->currentDpy;
5724 const GLuint cmdlen = 8;
5725 if (__builtin_expect(dpy != NULL, 1)) {
5726 GLubyte const *pc =
5727 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5728 X_GLvop_GetColorTableParameterfvSGI,
5729 cmdlen);
5730 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5731 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5732 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5733 UnlockDisplay(dpy);
5734 SyncHandle();
5735 }
5736 return;
5737 }
5738 }
5739
5740 #define X_GLsop_GetColorTableParameteriv 149
5741 void
5742 __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
5743 GLint * params)
5744 {
5745 __GLXcontext *const gc = __glXGetCurrentContext();
5746 Display *const dpy = gc->currentDpy;
5747 #ifndef USE_XCB
5748 const GLuint cmdlen = 8;
5749 #endif
5750 if (__builtin_expect(dpy != NULL, 1)) {
5751 #ifdef USE_XCB
5752 xcb_connection_t *c = XGetXCBConnection(dpy);
5753 (void) __glXFlushRenderBuffer(gc, gc->pc);
5754 xcb_glx_get_color_table_parameteriv_reply_t *reply =
5755 xcb_glx_get_color_table_parameteriv_reply(c,
5756 xcb_glx_get_color_table_parameteriv
5757 (c,
5758 gc->currentContextTag,
5759 target, pname), NULL);
5760 if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 0)
5761 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5762 else
5763 (void) memcpy(params,
5764 xcb_glx_get_color_table_parameteriv_data(reply),
5765 xcb_glx_get_color_table_parameteriv_data_length
5766 (reply) * sizeof(GLint));
5767 free(reply);
5768 #else
5769 GLubyte const *pc =
5770 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv,
5771 cmdlen);
5772 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5773 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5774 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5775 UnlockDisplay(dpy);
5776 SyncHandle();
5777 #endif /* USE_XCB */
5778 }
5779 return;
5780 }
5781
5782 #define X_GLvop_GetColorTableParameterivSGI 4100
5783 void
5784 glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
5785 {
5786 __GLXcontext *const gc = __glXGetCurrentContext();
5787
5788 if (gc->driContext) {
5789 CALL_GetColorTableParameteriv(GET_DISPATCH(),
5790 (target, pname, params));
5791 } else {
5792 __GLXcontext *const gc = __glXGetCurrentContext();
5793 Display *const dpy = gc->currentDpy;
5794 const GLuint cmdlen = 8;
5795 if (__builtin_expect(dpy != NULL, 1)) {
5796 GLubyte const *pc =
5797 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5798 X_GLvop_GetColorTableParameterivSGI,
5799 cmdlen);
5800 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5801 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5802 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5803 UnlockDisplay(dpy);
5804 SyncHandle();
5805 }
5806 return;
5807 }
5808 }
5809
5810 #define X_GLrop_ColorSubTable 195
5811 void
5812 __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count,
5813 GLenum format, GLenum type, const GLvoid * data)
5814 {
5815 __GLXcontext *const gc = __glXGetCurrentContext();
5816 const GLuint compsize =
5817 (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
5818 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5819 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5820 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5821 if ((gc->pc + cmdlen) > gc->bufEnd) {
5822 (void) __glXFlushRenderBuffer(gc, gc->pc);
5823 }
5824 emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
5825 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5826 (void) memcpy((void *) (gc->pc + 28), (void *) (&start), 4);
5827 (void) memcpy((void *) (gc->pc + 32), (void *) (&count), 4);
5828 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5829 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5830 if (compsize > 0) {
5831 (*gc->fillImage) (gc, 1, count, 1, 1, format, type, data,
5832 gc->pc + 44, gc->pc + 4);
5833 } else {
5834 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5835 default_pixel_store_1D_size);
5836 }
5837 gc->pc += cmdlen;
5838 if (gc->pc > gc->limit) {
5839 (void) __glXFlushRenderBuffer(gc, gc->pc);
5840 }
5841 } else {
5842 const GLint op = X_GLrop_ColorSubTable;
5843 const GLuint cmdlenLarge = cmdlen + 4;
5844 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5845 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5846 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5847 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5848 (void) memcpy((void *) (pc + 32), (void *) (&start), 4);
5849 (void) memcpy((void *) (pc + 36), (void *) (&count), 4);
5850 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5851 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5852 __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type,
5853 data, pc + 48, pc + 8);
5854 }
5855 }
5856 }
5857
5858 #define X_GLrop_CopyColorSubTable 196
5859 void
5860 __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y,
5861 GLsizei width)
5862 {
5863 __GLXcontext *const gc = __glXGetCurrentContext();
5864 const GLuint cmdlen = 24;
5865 emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
5866 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5867 (void) memcpy((void *) (gc->pc + 8), (void *) (&start), 4);
5868 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5869 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5870 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5871 gc->pc += cmdlen;
5872 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5873 (void) __glXFlushRenderBuffer(gc, gc->pc);
5874 }
5875 }
5876
5877 static void
5878 __glx_ConvolutionFilter_1D2D(unsigned opcode, unsigned dim, GLenum target,
5879 GLenum internalformat, GLsizei width,
5880 GLsizei height, GLenum format, GLenum type,
5881 const GLvoid * image)
5882 {
5883 __GLXcontext *const gc = __glXGetCurrentContext();
5884 const GLuint compsize =
5885 (image != NULL) ? __glImageSize(width, height, 1, format, type,
5886 target) : 0;
5887 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
5888 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5889 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5890 if ((gc->pc + cmdlen) > gc->bufEnd) {
5891 (void) __glXFlushRenderBuffer(gc, gc->pc);
5892 }
5893 emit_header(gc->pc, opcode, cmdlen);
5894 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5895 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5896 4);
5897 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5898 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
5899 (void) memcpy((void *) (gc->pc + 40), (void *) (&format), 4);
5900 (void) memcpy((void *) (gc->pc + 44), (void *) (&type), 4);
5901 if (compsize > 0) {
5902 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5903 image, gc->pc + 48, gc->pc + 4);
5904 } else {
5905 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5906 default_pixel_store_2D_size);
5907 }
5908 gc->pc += cmdlen;
5909 if (gc->pc > gc->limit) {
5910 (void) __glXFlushRenderBuffer(gc, gc->pc);
5911 }
5912 } else {
5913 const GLint op = opcode;
5914 const GLuint cmdlenLarge = cmdlen + 4;
5915 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5916 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5917 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5918 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5919 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5920 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5921 (void) memcpy((void *) (pc + 40), (void *) (&height), 4);
5922 (void) memcpy((void *) (pc + 44), (void *) (&format), 4);
5923 (void) memcpy((void *) (pc + 48), (void *) (&type), 4);
5924 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5925 type, image, pc + 52, pc + 8);
5926 }
5927 }
5928 }
5929
5930 #define X_GLrop_ConvolutionFilter1D 4101
5931 void
5932 __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat,
5933 GLsizei width, GLenum format, GLenum type,
5934 const GLvoid * image)
5935 {
5936 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target,
5937 internalformat, width, 1, format, type,
5938 image);
5939 }
5940
5941 #define X_GLrop_ConvolutionFilter2D 4102
5942 void
5943 __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat,
5944 GLsizei width, GLsizei height, GLenum format,
5945 GLenum type, const GLvoid * image)
5946 {
5947 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target,
5948 internalformat, width, height, format, type,
5949 image);
5950 }
5951
5952 #define X_GLrop_ConvolutionParameterf 4103
5953 void
5954 __indirect_glConvolutionParameterf(GLenum target, GLenum pname,
5955 GLfloat params)
5956 {
5957 __GLXcontext *const gc = __glXGetCurrentContext();
5958 const GLuint cmdlen = 16;
5959 emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
5960 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5961 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5962 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
5963 gc->pc += cmdlen;
5964 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5965 (void) __glXFlushRenderBuffer(gc, gc->pc);
5966 }
5967 }
5968
5969 #define X_GLrop_ConvolutionParameterfv 4104
5970 void
5971 __indirect_glConvolutionParameterfv(GLenum target, GLenum pname,
5972 const GLfloat * params)
5973 {
5974 __GLXcontext *const gc = __glXGetCurrentContext();
5975 const GLuint compsize = __glConvolutionParameterfv_size(pname);
5976 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5977 emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, 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), (compsize * 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_ConvolutionParameteri 4105
5988 void
5989 __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
5990 {
5991 __GLXcontext *const gc = __glXGetCurrentContext();
5992 const GLuint cmdlen = 16;
5993 emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
5994 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5995 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5996 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
5997 gc->pc += cmdlen;
5998 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5999 (void) __glXFlushRenderBuffer(gc, gc->pc);
6000 }
6001 }
6002
6003 #define X_GLrop_ConvolutionParameteriv 4106
6004 void
6005 __indirect_glConvolutionParameteriv(GLenum target, GLenum pname,
6006 const GLint * params)
6007 {
6008 __GLXcontext *const gc = __glXGetCurrentContext();
6009 const GLuint compsize = __glConvolutionParameteriv_size(pname);
6010 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
6011 emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, 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), (compsize * 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_CopyConvolutionFilter1D 4107
6022 void
6023 __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat,
6024 GLint x, GLint y, GLsizei width)
6025 {
6026 __GLXcontext *const gc = __glXGetCurrentContext();
6027 const GLuint cmdlen = 24;
6028 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
6029 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6030 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6031 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
6032 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
6033 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
6034 gc->pc += cmdlen;
6035 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6036 (void) __glXFlushRenderBuffer(gc, gc->pc);
6037 }
6038 }
6039
6040 #define X_GLrop_CopyConvolutionFilter2D 4108
6041 void
6042 __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat,
6043 GLint x, GLint y, GLsizei width,
6044 GLsizei height)
6045 {
6046 __GLXcontext *const gc = __glXGetCurrentContext();
6047 const GLuint cmdlen = 28;
6048 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
6049 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6050 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6051 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
6052 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
6053 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
6054 (void) memcpy((void *) (gc->pc + 24), (void *) (&height), 4);
6055 gc->pc += cmdlen;
6056 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6057 (void) __glXFlushRenderBuffer(gc, gc->pc);
6058 }
6059 }
6060
6061 #define X_GLsop_GetConvolutionFilter 150
6062 void
6063 __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type,
6064 GLvoid * image)
6065 {
6066 __GLXcontext *const gc = __glXGetCurrentContext();
6067 const __GLXattribute *const state = gc->client_state_private;
6068 Display *const dpy = gc->currentDpy;
6069 #ifndef USE_XCB
6070 const GLuint cmdlen = 16;
6071 #endif
6072 if (__builtin_expect(dpy != NULL, 1)) {
6073 #ifdef USE_XCB
6074 xcb_connection_t *c = XGetXCBConnection(dpy);
6075 (void) __glXFlushRenderBuffer(gc, gc->pc);
6076 xcb_glx_get_convolution_filter_reply_t *reply =
6077 xcb_glx_get_convolution_filter_reply(c,
6078 xcb_glx_get_convolution_filter
6079 (c, gc->currentContextTag,
6080 target, format, type,
6081 state->storePack.
6082 swapEndian), NULL);
6083 (void) memcpy(image, xcb_glx_get_convolution_filter_data(reply),
6084 xcb_glx_get_convolution_filter_data_length(reply) *
6085 sizeof(GLvoid));
6086 free(reply);
6087 #else
6088 GLubyte const *pc =
6089 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
6090 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6091 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6092 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6093 *(int32_t *) (pc + 12) = 0;
6094 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6095 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6096 GL_TRUE);
6097 UnlockDisplay(dpy);
6098 SyncHandle();
6099 #endif /* USE_XCB */
6100 }
6101 return;
6102 }
6103
6104 #define X_GLvop_GetConvolutionFilterEXT 1
6105 void
6106 gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
6107 GLvoid * image)
6108 {
6109 __GLXcontext *const gc = __glXGetCurrentContext();
6110
6111 if (gc->driContext) {
6112 CALL_GetConvolutionFilter(GET_DISPATCH(),
6113 (target, format, type, image));
6114 } else {
6115 __GLXcontext *const gc = __glXGetCurrentContext();
6116 const __GLXattribute *const state = gc->client_state_private;
6117 Display *const dpy = gc->currentDpy;
6118 const GLuint cmdlen = 16;
6119 if (__builtin_expect(dpy != NULL, 1)) {
6120 GLubyte const *pc =
6121 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6122 X_GLvop_GetConvolutionFilterEXT,
6123 cmdlen);
6124 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6125 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6126 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6127 *(int32_t *) (pc + 12) = 0;
6128 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6129 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6130 GL_TRUE);
6131 UnlockDisplay(dpy);
6132 SyncHandle();
6133 }
6134 return;
6135 }
6136 }
6137
6138 #define X_GLsop_GetConvolutionParameterfv 151
6139 void
6140 __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
6141 GLfloat * params)
6142 {
6143 __GLXcontext *const gc = __glXGetCurrentContext();
6144 Display *const dpy = gc->currentDpy;
6145 #ifndef USE_XCB
6146 const GLuint cmdlen = 8;
6147 #endif
6148 if (__builtin_expect(dpy != NULL, 1)) {
6149 #ifdef USE_XCB
6150 xcb_connection_t *c = XGetXCBConnection(dpy);
6151 (void) __glXFlushRenderBuffer(gc, gc->pc);
6152 xcb_glx_get_convolution_parameterfv_reply_t *reply =
6153 xcb_glx_get_convolution_parameterfv_reply(c,
6154 xcb_glx_get_convolution_parameterfv
6155 (c,
6156 gc->currentContextTag,
6157 target, pname), NULL);
6158 if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 0)
6159 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6160 else
6161 (void) memcpy(params,
6162 xcb_glx_get_convolution_parameterfv_data(reply),
6163 xcb_glx_get_convolution_parameterfv_data_length
6164 (reply) * sizeof(GLfloat));
6165 free(reply);
6166 #else
6167 GLubyte const *pc =
6168 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv,
6169 cmdlen);
6170 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6171 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6172 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6173 UnlockDisplay(dpy);
6174 SyncHandle();
6175 #endif /* USE_XCB */
6176 }
6177 return;
6178 }
6179
6180 #define X_GLvop_GetConvolutionParameterfvEXT 2
6181 void
6182 gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
6183 {
6184 __GLXcontext *const gc = __glXGetCurrentContext();
6185
6186 if (gc->driContext) {
6187 CALL_GetConvolutionParameterfv(GET_DISPATCH(),
6188 (target, pname, params));
6189 } else {
6190 __GLXcontext *const gc = __glXGetCurrentContext();
6191 Display *const dpy = gc->currentDpy;
6192 const GLuint cmdlen = 8;
6193 if (__builtin_expect(dpy != NULL, 1)) {
6194 GLubyte const *pc =
6195 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6196 X_GLvop_GetConvolutionParameterfvEXT,
6197 cmdlen);
6198 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6199 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6200 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6201 UnlockDisplay(dpy);
6202 SyncHandle();
6203 }
6204 return;
6205 }
6206 }
6207
6208 #define X_GLsop_GetConvolutionParameteriv 152
6209 void
6210 __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
6211 GLint * params)
6212 {
6213 __GLXcontext *const gc = __glXGetCurrentContext();
6214 Display *const dpy = gc->currentDpy;
6215 #ifndef USE_XCB
6216 const GLuint cmdlen = 8;
6217 #endif
6218 if (__builtin_expect(dpy != NULL, 1)) {
6219 #ifdef USE_XCB
6220 xcb_connection_t *c = XGetXCBConnection(dpy);
6221 (void) __glXFlushRenderBuffer(gc, gc->pc);
6222 xcb_glx_get_convolution_parameteriv_reply_t *reply =
6223 xcb_glx_get_convolution_parameteriv_reply(c,
6224 xcb_glx_get_convolution_parameteriv
6225 (c,
6226 gc->currentContextTag,
6227 target, pname), NULL);
6228 if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 0)
6229 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6230 else
6231 (void) memcpy(params,
6232 xcb_glx_get_convolution_parameteriv_data(reply),
6233 xcb_glx_get_convolution_parameteriv_data_length
6234 (reply) * sizeof(GLint));
6235 free(reply);
6236 #else
6237 GLubyte const *pc =
6238 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv,
6239 cmdlen);
6240 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6241 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6242 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6243 UnlockDisplay(dpy);
6244 SyncHandle();
6245 #endif /* USE_XCB */
6246 }
6247 return;
6248 }
6249
6250 #define X_GLvop_GetConvolutionParameterivEXT 3
6251 void
6252 gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
6253 {
6254 __GLXcontext *const gc = __glXGetCurrentContext();
6255
6256 if (gc->driContext) {
6257 CALL_GetConvolutionParameteriv(GET_DISPATCH(),
6258 (target, pname, params));
6259 } else {
6260 __GLXcontext *const gc = __glXGetCurrentContext();
6261 Display *const dpy = gc->currentDpy;
6262 const GLuint cmdlen = 8;
6263 if (__builtin_expect(dpy != NULL, 1)) {
6264 GLubyte const *pc =
6265 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6266 X_GLvop_GetConvolutionParameterivEXT,
6267 cmdlen);
6268 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6269 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6270 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6271 UnlockDisplay(dpy);
6272 SyncHandle();
6273 }
6274 return;
6275 }
6276 }
6277
6278 #define X_GLsop_GetHistogram 154
6279 void
6280 __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
6281 GLenum type, GLvoid * values)
6282 {
6283 __GLXcontext *const gc = __glXGetCurrentContext();
6284 const __GLXattribute *const state = gc->client_state_private;
6285 Display *const dpy = gc->currentDpy;
6286 #ifndef USE_XCB
6287 const GLuint cmdlen = 16;
6288 #endif
6289 if (__builtin_expect(dpy != NULL, 1)) {
6290 #ifdef USE_XCB
6291 xcb_connection_t *c = XGetXCBConnection(dpy);
6292 (void) __glXFlushRenderBuffer(gc, gc->pc);
6293 xcb_glx_get_histogram_reply_t *reply =
6294 xcb_glx_get_histogram_reply(c,
6295 xcb_glx_get_histogram(c,
6296 gc->
6297 currentContextTag,
6298 target, reset,
6299 format, type,
6300 state->
6301 storePack.
6302 swapEndian),
6303 NULL);
6304 (void) memcpy(values, xcb_glx_get_histogram_data(reply),
6305 xcb_glx_get_histogram_data_length(reply) *
6306 sizeof(GLvoid));
6307 free(reply);
6308 #else
6309 GLubyte const *pc =
6310 __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
6311 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6312 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6313 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6314 *(int32_t *) (pc + 12) = 0;
6315 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6316 *(int8_t *) (pc + 13) = reset;
6317 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6318 GL_TRUE);
6319 UnlockDisplay(dpy);
6320 SyncHandle();
6321 #endif /* USE_XCB */
6322 }
6323 return;
6324 }
6325
6326 #define X_GLvop_GetHistogramEXT 5
6327 void
6328 gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
6329 GLenum type, GLvoid * values)
6330 {
6331 __GLXcontext *const gc = __glXGetCurrentContext();
6332
6333 if (gc->driContext) {
6334 CALL_GetHistogram(GET_DISPATCH(),
6335 (target, reset, format, type, values));
6336 } else {
6337 __GLXcontext *const gc = __glXGetCurrentContext();
6338 const __GLXattribute *const state = gc->client_state_private;
6339 Display *const dpy = gc->currentDpy;
6340 const GLuint cmdlen = 16;
6341 if (__builtin_expect(dpy != NULL, 1)) {
6342 GLubyte const *pc =
6343 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6344 X_GLvop_GetHistogramEXT, cmdlen);
6345 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6346 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6347 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6348 *(int32_t *) (pc + 12) = 0;
6349 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6350 *(int8_t *) (pc + 13) = reset;
6351 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6352 GL_TRUE);
6353 UnlockDisplay(dpy);
6354 SyncHandle();
6355 }
6356 return;
6357 }
6358 }
6359
6360 #define X_GLsop_GetHistogramParameterfv 155
6361 void
6362 __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
6363 GLfloat * params)
6364 {
6365 __GLXcontext *const gc = __glXGetCurrentContext();
6366 Display *const dpy = gc->currentDpy;
6367 #ifndef USE_XCB
6368 const GLuint cmdlen = 8;
6369 #endif
6370 if (__builtin_expect(dpy != NULL, 1)) {
6371 #ifdef USE_XCB
6372 xcb_connection_t *c = XGetXCBConnection(dpy);
6373 (void) __glXFlushRenderBuffer(gc, gc->pc);
6374 xcb_glx_get_histogram_parameterfv_reply_t *reply =
6375 xcb_glx_get_histogram_parameterfv_reply(c,
6376 xcb_glx_get_histogram_parameterfv
6377 (c, gc->currentContextTag,
6378 target, pname), NULL);
6379 if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 0)
6380 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6381 else
6382 (void) memcpy(params,
6383 xcb_glx_get_histogram_parameterfv_data(reply),
6384 xcb_glx_get_histogram_parameterfv_data_length(reply)
6385 * sizeof(GLfloat));
6386 free(reply);
6387 #else
6388 GLubyte const *pc =
6389 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv,
6390 cmdlen);
6391 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6392 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6393 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6394 UnlockDisplay(dpy);
6395 SyncHandle();
6396 #endif /* USE_XCB */
6397 }
6398 return;
6399 }
6400
6401 #define X_GLvop_GetHistogramParameterfvEXT 6
6402 void
6403 gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
6404 {
6405 __GLXcontext *const gc = __glXGetCurrentContext();
6406
6407 if (gc->driContext) {
6408 CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params));
6409 } else {
6410 __GLXcontext *const gc = __glXGetCurrentContext();
6411 Display *const dpy = gc->currentDpy;
6412 const GLuint cmdlen = 8;
6413 if (__builtin_expect(dpy != NULL, 1)) {
6414 GLubyte const *pc =
6415 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6416 X_GLvop_GetHistogramParameterfvEXT,
6417 cmdlen);
6418 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6419 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6420 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6421 UnlockDisplay(dpy);
6422 SyncHandle();
6423 }
6424 return;
6425 }
6426 }
6427
6428 #define X_GLsop_GetHistogramParameteriv 156
6429 void
6430 __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
6431 GLint * params)
6432 {
6433 __GLXcontext *const gc = __glXGetCurrentContext();
6434 Display *const dpy = gc->currentDpy;
6435 #ifndef USE_XCB
6436 const GLuint cmdlen = 8;
6437 #endif
6438 if (__builtin_expect(dpy != NULL, 1)) {
6439 #ifdef USE_XCB
6440 xcb_connection_t *c = XGetXCBConnection(dpy);
6441 (void) __glXFlushRenderBuffer(gc, gc->pc);
6442 xcb_glx_get_histogram_parameteriv_reply_t *reply =
6443 xcb_glx_get_histogram_parameteriv_reply(c,
6444 xcb_glx_get_histogram_parameteriv
6445 (c, gc->currentContextTag,
6446 target, pname), NULL);
6447 if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 0)
6448 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6449 else
6450 (void) memcpy(params,
6451 xcb_glx_get_histogram_parameteriv_data(reply),
6452 xcb_glx_get_histogram_parameteriv_data_length(reply)
6453 * sizeof(GLint));
6454 free(reply);
6455 #else
6456 GLubyte const *pc =
6457 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv,
6458 cmdlen);
6459 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6460 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6461 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6462 UnlockDisplay(dpy);
6463 SyncHandle();
6464 #endif /* USE_XCB */
6465 }
6466 return;
6467 }
6468
6469 #define X_GLvop_GetHistogramParameterivEXT 7
6470 void
6471 gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
6472 {
6473 __GLXcontext *const gc = __glXGetCurrentContext();
6474
6475 if (gc->driContext) {
6476 CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params));
6477 } else {
6478 __GLXcontext *const gc = __glXGetCurrentContext();
6479 Display *const dpy = gc->currentDpy;
6480 const GLuint cmdlen = 8;
6481 if (__builtin_expect(dpy != NULL, 1)) {
6482 GLubyte const *pc =
6483 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6484 X_GLvop_GetHistogramParameterivEXT,
6485 cmdlen);
6486 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6487 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6488 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6489 UnlockDisplay(dpy);
6490 SyncHandle();
6491 }
6492 return;
6493 }
6494 }
6495
6496 #define X_GLsop_GetMinmax 157
6497 void
6498 __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
6499 GLenum type, GLvoid * values)
6500 {
6501 __GLXcontext *const gc = __glXGetCurrentContext();
6502 const __GLXattribute *const state = gc->client_state_private;
6503 Display *const dpy = gc->currentDpy;
6504 #ifndef USE_XCB
6505 const GLuint cmdlen = 16;
6506 #endif
6507 if (__builtin_expect(dpy != NULL, 1)) {
6508 #ifdef USE_XCB
6509 xcb_connection_t *c = XGetXCBConnection(dpy);
6510 (void) __glXFlushRenderBuffer(gc, gc->pc);
6511 xcb_glx_get_minmax_reply_t *reply =
6512 xcb_glx_get_minmax_reply(c,
6513 xcb_glx_get_minmax(c,
6514 gc->currentContextTag,
6515 target, reset, format,
6516 type,
6517 state->storePack.
6518 swapEndian), NULL);
6519 (void) memcpy(values, xcb_glx_get_minmax_data(reply),
6520 xcb_glx_get_minmax_data_length(reply) * sizeof(GLvoid));
6521 free(reply);
6522 #else
6523 GLubyte const *pc =
6524 __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
6525 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6526 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6527 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6528 *(int32_t *) (pc + 12) = 0;
6529 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6530 *(int8_t *) (pc + 13) = reset;
6531 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6532 GL_FALSE);
6533 UnlockDisplay(dpy);
6534 SyncHandle();
6535 #endif /* USE_XCB */
6536 }
6537 return;
6538 }
6539
6540 #define X_GLvop_GetMinmaxEXT 8
6541 void
6542 gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
6543 GLenum type, GLvoid * values)
6544 {
6545 __GLXcontext *const gc = __glXGetCurrentContext();
6546
6547 if (gc->driContext) {
6548 CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values));
6549 } else {
6550 __GLXcontext *const gc = __glXGetCurrentContext();
6551 const __GLXattribute *const state = gc->client_state_private;
6552 Display *const dpy = gc->currentDpy;
6553 const GLuint cmdlen = 16;
6554 if (__builtin_expect(dpy != NULL, 1)) {
6555 GLubyte const *pc =
6556 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6557 X_GLvop_GetMinmaxEXT, cmdlen);
6558 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6559 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6560 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6561 *(int32_t *) (pc + 12) = 0;
6562 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6563 *(int8_t *) (pc + 13) = reset;
6564 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6565 GL_FALSE);
6566 UnlockDisplay(dpy);
6567 SyncHandle();
6568 }
6569 return;
6570 }
6571 }
6572
6573 #define X_GLsop_GetMinmaxParameterfv 158
6574 void
6575 __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
6576 GLfloat * params)
6577 {
6578 __GLXcontext *const gc = __glXGetCurrentContext();
6579 Display *const dpy = gc->currentDpy;
6580 #ifndef USE_XCB
6581 const GLuint cmdlen = 8;
6582 #endif
6583 if (__builtin_expect(dpy != NULL, 1)) {
6584 #ifdef USE_XCB
6585 xcb_connection_t *c = XGetXCBConnection(dpy);
6586 (void) __glXFlushRenderBuffer(gc, gc->pc);
6587 xcb_glx_get_minmax_parameterfv_reply_t *reply =
6588 xcb_glx_get_minmax_parameterfv_reply(c,
6589 xcb_glx_get_minmax_parameterfv
6590 (c, gc->currentContextTag,
6591 target, pname), NULL);
6592 if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 0)
6593 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6594 else
6595 (void) memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply),
6596 xcb_glx_get_minmax_parameterfv_data_length(reply) *
6597 sizeof(GLfloat));
6598 free(reply);
6599 #else
6600 GLubyte const *pc =
6601 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
6602 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6603 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6604 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6605 UnlockDisplay(dpy);
6606 SyncHandle();
6607 #endif /* USE_XCB */
6608 }
6609 return;
6610 }
6611
6612 #define X_GLvop_GetMinmaxParameterfvEXT 9
6613 void
6614 gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
6615 {
6616 __GLXcontext *const gc = __glXGetCurrentContext();
6617
6618 if (gc->driContext) {
6619 CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params));
6620 } else {
6621 __GLXcontext *const gc = __glXGetCurrentContext();
6622 Display *const dpy = gc->currentDpy;
6623 const GLuint cmdlen = 8;
6624 if (__builtin_expect(dpy != NULL, 1)) {
6625 GLubyte const *pc =
6626 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6627 X_GLvop_GetMinmaxParameterfvEXT,
6628 cmdlen);
6629 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6630 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6631 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6632 UnlockDisplay(dpy);
6633 SyncHandle();
6634 }
6635 return;
6636 }
6637 }
6638
6639 #define X_GLsop_GetMinmaxParameteriv 159
6640 void
6641 __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
6642 {
6643 __GLXcontext *const gc = __glXGetCurrentContext();
6644 Display *const dpy = gc->currentDpy;
6645 #ifndef USE_XCB
6646 const GLuint cmdlen = 8;
6647 #endif
6648 if (__builtin_expect(dpy != NULL, 1)) {
6649 #ifdef USE_XCB
6650 xcb_connection_t *c = XGetXCBConnection(dpy);
6651 (void) __glXFlushRenderBuffer(gc, gc->pc);
6652 xcb_glx_get_minmax_parameteriv_reply_t *reply =
6653 xcb_glx_get_minmax_parameteriv_reply(c,
6654 xcb_glx_get_minmax_parameteriv
6655 (c, gc->currentContextTag,
6656 target, pname), NULL);
6657 if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 0)
6658 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6659 else
6660 (void) memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply),
6661 xcb_glx_get_minmax_parameteriv_data_length(reply) *
6662 sizeof(GLint));
6663 free(reply);
6664 #else
6665 GLubyte const *pc =
6666 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
6667 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6668 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6669 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6670 UnlockDisplay(dpy);
6671 SyncHandle();
6672 #endif /* USE_XCB */
6673 }
6674 return;
6675 }
6676
6677 #define X_GLvop_GetMinmaxParameterivEXT 10
6678 void
6679 gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
6680 {
6681 __GLXcontext *const gc = __glXGetCurrentContext();
6682
6683 if (gc->driContext) {
6684 CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params));
6685 } else {
6686 __GLXcontext *const gc = __glXGetCurrentContext();
6687 Display *const dpy = gc->currentDpy;
6688 const GLuint cmdlen = 8;
6689 if (__builtin_expect(dpy != NULL, 1)) {
6690 GLubyte const *pc =
6691 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6692 X_GLvop_GetMinmaxParameterivEXT,
6693 cmdlen);
6694 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6695 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6696 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6697 UnlockDisplay(dpy);
6698 SyncHandle();
6699 }
6700 return;
6701 }
6702 }
6703
6704 #define X_GLrop_Histogram 4110
6705 void
6706 __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
6707 GLboolean sink)
6708 {
6709 __GLXcontext *const gc = __glXGetCurrentContext();
6710 const GLuint cmdlen = 20;
6711 emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
6712 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6713 (void) memcpy((void *) (gc->pc + 8), (void *) (&width), 4);
6714 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
6715 (void) memcpy((void *) (gc->pc + 16), (void *) (&sink), 1);
6716 gc->pc += cmdlen;
6717 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6718 (void) __glXFlushRenderBuffer(gc, gc->pc);
6719 }
6720 }
6721
6722 #define X_GLrop_Minmax 4111
6723 void
6724 __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
6725 {
6726 __GLXcontext *const gc = __glXGetCurrentContext();
6727 const GLuint cmdlen = 16;
6728 emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
6729 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6730 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6731 (void) memcpy((void *) (gc->pc + 12), (void *) (&sink), 1);
6732 gc->pc += cmdlen;
6733 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6734 (void) __glXFlushRenderBuffer(gc, gc->pc);
6735 }
6736 }
6737
6738 #define X_GLrop_ResetHistogram 4112
6739 void
6740 __indirect_glResetHistogram(GLenum target)
6741 {
6742 __GLXcontext *const gc = __glXGetCurrentContext();
6743 const GLuint cmdlen = 8;
6744 emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
6745 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6746 gc->pc += cmdlen;
6747 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6748 (void) __glXFlushRenderBuffer(gc, gc->pc);
6749 }
6750 }
6751
6752 #define X_GLrop_ResetMinmax 4113
6753 void
6754 __indirect_glResetMinmax(GLenum target)
6755 {
6756 __GLXcontext *const gc = __glXGetCurrentContext();
6757 const GLuint cmdlen = 8;
6758 emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
6759 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6760 gc->pc += cmdlen;
6761 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6762 (void) __glXFlushRenderBuffer(gc, gc->pc);
6763 }
6764 }
6765
6766 static void
6767 __glx_TexImage_3D4D(unsigned opcode, unsigned dim, GLenum target, GLint level,
6768 GLint internalformat, GLsizei width, GLsizei height,
6769 GLsizei depth, GLsizei extent, GLint border,
6770 GLenum format, GLenum type, const GLvoid * pixels)
6771 {
6772 __GLXcontext *const gc = __glXGetCurrentContext();
6773 const GLuint compsize =
6774 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6775 target) : 0;
6776 const GLuint cmdlen = 84 + __GLX_PAD(compsize);
6777 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6778 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6779 if ((gc->pc + cmdlen) > gc->bufEnd) {
6780 (void) __glXFlushRenderBuffer(gc, gc->pc);
6781 }
6782 emit_header(gc->pc, opcode, cmdlen);
6783 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6784 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6785 (void) memcpy((void *) (gc->pc + 48), (void *) (&internalformat),
6786 4);
6787 (void) memcpy((void *) (gc->pc + 52), (void *) (&width), 4);
6788 (void) memcpy((void *) (gc->pc + 56), (void *) (&height), 4);
6789 (void) memcpy((void *) (gc->pc + 60), (void *) (&depth), 4);
6790 (void) memcpy((void *) (gc->pc + 64), (void *) (&extent), 4);
6791 (void) memcpy((void *) (gc->pc + 68), (void *) (&border), 4);
6792 (void) memcpy((void *) (gc->pc + 72), (void *) (&format), 4);
6793 (void) memcpy((void *) (gc->pc + 76), (void *) (&type), 4);
6794 (void) memcpy((void *) (gc->pc + 80),
6795 (void *) ((pixels == NULL) ? one : zero), 4);
6796 if (compsize > 0) {
6797 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6798 pixels, gc->pc + 84, gc->pc + 4);
6799 } else {
6800 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6801 default_pixel_store_4D_size);
6802 }
6803 gc->pc += cmdlen;
6804 if (gc->pc > gc->limit) {
6805 (void) __glXFlushRenderBuffer(gc, gc->pc);
6806 }
6807 } else {
6808 const GLint op = opcode;
6809 const GLuint cmdlenLarge = cmdlen + 4;
6810 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6811 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6812 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6813 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6814 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6815 (void) memcpy((void *) (pc + 52), (void *) (&internalformat), 4);
6816 (void) memcpy((void *) (pc + 56), (void *) (&width), 4);
6817 (void) memcpy((void *) (pc + 60), (void *) (&height), 4);
6818 (void) memcpy((void *) (pc + 64), (void *) (&depth), 4);
6819 (void) memcpy((void *) (pc + 68), (void *) (&extent), 4);
6820 (void) memcpy((void *) (pc + 72), (void *) (&border), 4);
6821 (void) memcpy((void *) (pc + 76), (void *) (&format), 4);
6822 (void) memcpy((void *) (pc + 80), (void *) (&type), 4);
6823 (void) memcpy((void *) (pc + 84), zero, 4);
6824 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6825 format, type, pixels, pc + 88, pc + 8);
6826 }
6827 }
6828 }
6829
6830 #define X_GLrop_TexImage3D 4114
6831 void
6832 __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat,
6833 GLsizei width, GLsizei height, GLsizei depth,
6834 GLint border, GLenum format, GLenum type,
6835 const GLvoid * pixels)
6836 {
6837 __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat,
6838 width, height, depth, 1, border, format, type,
6839 pixels);
6840 }
6841
6842 static void
6843 __glx_TexSubImage_3D4D(unsigned opcode, unsigned dim, GLenum target,
6844 GLint level, GLint xoffset, GLint yoffset,
6845 GLint zoffset, GLint woffset, GLsizei width,
6846 GLsizei height, GLsizei depth, GLsizei extent,
6847 GLenum format, GLenum type, const GLvoid * pixels)
6848 {
6849 __GLXcontext *const gc = __glXGetCurrentContext();
6850 const GLuint compsize =
6851 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6852 target) : 0;
6853 const GLuint cmdlen = 92 + __GLX_PAD(compsize);
6854 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6855 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6856 if ((gc->pc + cmdlen) > gc->bufEnd) {
6857 (void) __glXFlushRenderBuffer(gc, gc->pc);
6858 }
6859 emit_header(gc->pc, opcode, cmdlen);
6860 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6861 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6862 (void) memcpy((void *) (gc->pc + 48), (void *) (&xoffset), 4);
6863 (void) memcpy((void *) (gc->pc + 52), (void *) (&yoffset), 4);
6864 (void) memcpy((void *) (gc->pc + 56), (void *) (&zoffset), 4);
6865 (void) memcpy((void *) (gc->pc + 60), (void *) (&woffset), 4);
6866 (void) memcpy((void *) (gc->pc + 64), (void *) (&width), 4);
6867 (void) memcpy((void *) (gc->pc + 68), (void *) (&height), 4);
6868 (void) memcpy((void *) (gc->pc + 72), (void *) (&depth), 4);
6869 (void) memcpy((void *) (gc->pc + 76), (void *) (&extent), 4);
6870 (void) memcpy((void *) (gc->pc + 80), (void *) (&format), 4);
6871 (void) memcpy((void *) (gc->pc + 84), (void *) (&type), 4);
6872 (void) memcpy((void *) (gc->pc + 88),
6873 (void *) ((pixels == NULL) ? one : zero), 4);
6874 if (compsize > 0) {
6875 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6876 pixels, gc->pc + 92, gc->pc + 4);
6877 } else {
6878 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6879 default_pixel_store_4D_size);
6880 }
6881 gc->pc += cmdlen;
6882 if (gc->pc > gc->limit) {
6883 (void) __glXFlushRenderBuffer(gc, gc->pc);
6884 }
6885 } else {
6886 const GLint op = opcode;
6887 const GLuint cmdlenLarge = cmdlen + 4;
6888 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6889 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6890 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6891 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6892 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6893 (void) memcpy((void *) (pc + 52), (void *) (&xoffset), 4);
6894 (void) memcpy((void *) (pc + 56), (void *) (&yoffset), 4);
6895 (void) memcpy((void *) (pc + 60), (void *) (&zoffset), 4);
6896 (void) memcpy((void *) (pc + 64), (void *) (&woffset), 4);
6897 (void) memcpy((void *) (pc + 68), (void *) (&width), 4);
6898 (void) memcpy((void *) (pc + 72), (void *) (&height), 4);
6899 (void) memcpy((void *) (pc + 76), (void *) (&depth), 4);
6900 (void) memcpy((void *) (pc + 80), (void *) (&extent), 4);
6901 (void) memcpy((void *) (pc + 84), (void *) (&format), 4);
6902 (void) memcpy((void *) (pc + 88), (void *) (&type), 4);
6903 (void) memcpy((void *) (pc + 92), zero, 4);
6904 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6905 format, type, pixels, pc + 96, pc + 8);
6906 }
6907 }
6908 }
6909
6910 #define X_GLrop_TexSubImage3D 4115
6911 void
6912 __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6913 GLint yoffset, GLint zoffset, GLsizei width,
6914 GLsizei height, GLsizei depth, GLenum format,
6915 GLenum type, const GLvoid * pixels)
6916 {
6917 __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset,
6918 yoffset, zoffset, 1, width, height, depth, 1,
6919 format, type, pixels);
6920 }
6921
6922 #define X_GLrop_CopyTexSubImage3D 4123
6923 void
6924 __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6925 GLint yoffset, GLint zoffset, GLint x, GLint y,
6926 GLsizei width, GLsizei height)
6927 {
6928 __GLXcontext *const gc = __glXGetCurrentContext();
6929 const GLuint cmdlen = 40;
6930 emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
6931 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6932 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
6933 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
6934 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
6935 (void) memcpy((void *) (gc->pc + 20), (void *) (&zoffset), 4);
6936 (void) memcpy((void *) (gc->pc + 24), (void *) (&x), 4);
6937 (void) memcpy((void *) (gc->pc + 28), (void *) (&y), 4);
6938 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
6939 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
6940 gc->pc += cmdlen;
6941 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6942 (void) __glXFlushRenderBuffer(gc, gc->pc);
6943 }
6944 }
6945
6946 #define X_GLrop_ActiveTextureARB 197
6947 void
6948 __indirect_glActiveTextureARB(GLenum texture)
6949 {
6950 __GLXcontext *const gc = __glXGetCurrentContext();
6951 const GLuint cmdlen = 8;
6952 emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
6953 (void) memcpy((void *) (gc->pc + 4), (void *) (&texture), 4);
6954 gc->pc += cmdlen;
6955 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6956 (void) __glXFlushRenderBuffer(gc, gc->pc);
6957 }
6958 }
6959
6960 #define X_GLrop_MultiTexCoord1dvARB 198
6961 void
6962 __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
6963 {
6964 __GLXcontext *const gc = __glXGetCurrentContext();
6965 const GLuint cmdlen = 16;
6966 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
6967 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
6968 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
6969 gc->pc += cmdlen;
6970 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6971 (void) __glXFlushRenderBuffer(gc, gc->pc);
6972 }
6973 }
6974
6975 #define X_GLrop_MultiTexCoord1dvARB 198
6976 void
6977 __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
6978 {
6979 __GLXcontext *const gc = __glXGetCurrentContext();
6980 const GLuint cmdlen = 16;
6981 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
6982 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 8);
6983 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 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_MultiTexCoord1fvARB 199
6991 void
6992 __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
6993 {
6994 __GLXcontext *const gc = __glXGetCurrentContext();
6995 const GLuint cmdlen = 12;
6996 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
6997 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6998 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6999 gc->pc += cmdlen;
7000 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7001 (void) __glXFlushRenderBuffer(gc, gc->pc);
7002 }
7003 }
7004
7005 #define X_GLrop_MultiTexCoord1fvARB 199
7006 void
7007 __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
7008 {
7009 __GLXcontext *const gc = __glXGetCurrentContext();
7010 const GLuint cmdlen = 12;
7011 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
7012 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7013 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7014 gc->pc += cmdlen;
7015 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7016 (void) __glXFlushRenderBuffer(gc, gc->pc);
7017 }
7018 }
7019
7020 #define X_GLrop_MultiTexCoord1ivARB 200
7021 void
7022 __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
7023 {
7024 __GLXcontext *const gc = __glXGetCurrentContext();
7025 const GLuint cmdlen = 12;
7026 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
7027 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7028 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7029 gc->pc += cmdlen;
7030 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7031 (void) __glXFlushRenderBuffer(gc, gc->pc);
7032 }
7033 }
7034
7035 #define X_GLrop_MultiTexCoord1ivARB 200
7036 void
7037 __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
7038 {
7039 __GLXcontext *const gc = __glXGetCurrentContext();
7040 const GLuint cmdlen = 12;
7041 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
7042 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7043 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7044 gc->pc += cmdlen;
7045 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7046 (void) __glXFlushRenderBuffer(gc, gc->pc);
7047 }
7048 }
7049
7050 #define X_GLrop_MultiTexCoord1svARB 201
7051 void
7052 __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
7053 {
7054 __GLXcontext *const gc = __glXGetCurrentContext();
7055 const GLuint cmdlen = 12;
7056 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7057 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7058 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7059 gc->pc += cmdlen;
7060 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7061 (void) __glXFlushRenderBuffer(gc, gc->pc);
7062 }
7063 }
7064
7065 #define X_GLrop_MultiTexCoord1svARB 201
7066 void
7067 __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
7068 {
7069 __GLXcontext *const gc = __glXGetCurrentContext();
7070 const GLuint cmdlen = 12;
7071 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7072 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7073 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7074 gc->pc += cmdlen;
7075 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7076 (void) __glXFlushRenderBuffer(gc, gc->pc);
7077 }
7078 }
7079
7080 #define X_GLrop_MultiTexCoord2dvARB 202
7081 void
7082 __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
7083 {
7084 __GLXcontext *const gc = __glXGetCurrentContext();
7085 const GLuint cmdlen = 24;
7086 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7087 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7088 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7089 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
7090 gc->pc += cmdlen;
7091 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7092 (void) __glXFlushRenderBuffer(gc, gc->pc);
7093 }
7094 }
7095
7096 #define X_GLrop_MultiTexCoord2dvARB 202
7097 void
7098 __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
7099 {
7100 __GLXcontext *const gc = __glXGetCurrentContext();
7101 const GLuint cmdlen = 24;
7102 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7103 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 16);
7104 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
7105 gc->pc += cmdlen;
7106 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7107 (void) __glXFlushRenderBuffer(gc, gc->pc);
7108 }
7109 }
7110
7111 #define X_GLrop_MultiTexCoord2fvARB 203
7112 void
7113 __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
7114 {
7115 __GLXcontext *const gc = __glXGetCurrentContext();
7116 const GLuint cmdlen = 16;
7117 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7118 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7119 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7120 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7121 gc->pc += cmdlen;
7122 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7123 (void) __glXFlushRenderBuffer(gc, gc->pc);
7124 }
7125 }
7126
7127 #define X_GLrop_MultiTexCoord2fvARB 203
7128 void
7129 __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
7130 {
7131 __GLXcontext *const gc = __glXGetCurrentContext();
7132 const GLuint cmdlen = 16;
7133 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7134 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7135 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7136 gc->pc += cmdlen;
7137 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7138 (void) __glXFlushRenderBuffer(gc, gc->pc);
7139 }
7140 }
7141
7142 #define X_GLrop_MultiTexCoord2ivARB 204
7143 void
7144 __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
7145 {
7146 __GLXcontext *const gc = __glXGetCurrentContext();
7147 const GLuint cmdlen = 16;
7148 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7149 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7150 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7151 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7152 gc->pc += cmdlen;
7153 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7154 (void) __glXFlushRenderBuffer(gc, gc->pc);
7155 }
7156 }
7157
7158 #define X_GLrop_MultiTexCoord2ivARB 204
7159 void
7160 __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
7161 {
7162 __GLXcontext *const gc = __glXGetCurrentContext();
7163 const GLuint cmdlen = 16;
7164 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7165 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7166 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7167 gc->pc += cmdlen;
7168 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7169 (void) __glXFlushRenderBuffer(gc, gc->pc);
7170 }
7171 }
7172
7173 #define X_GLrop_MultiTexCoord2svARB 205
7174 void
7175 __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
7176 {
7177 __GLXcontext *const gc = __glXGetCurrentContext();
7178 const GLuint cmdlen = 12;
7179 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7180 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7181 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7182 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7183 gc->pc += cmdlen;
7184 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7185 (void) __glXFlushRenderBuffer(gc, gc->pc);
7186 }
7187 }
7188
7189 #define X_GLrop_MultiTexCoord2svARB 205
7190 void
7191 __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
7192 {
7193 __GLXcontext *const gc = __glXGetCurrentContext();
7194 const GLuint cmdlen = 12;
7195 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7196 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7197 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7198 gc->pc += cmdlen;
7199 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7200 (void) __glXFlushRenderBuffer(gc, gc->pc);
7201 }
7202 }
7203
7204 #define X_GLrop_MultiTexCoord3dvARB 206
7205 void
7206 __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t,
7207 GLdouble r)
7208 {
7209 __GLXcontext *const gc = __glXGetCurrentContext();
7210 const GLuint cmdlen = 32;
7211 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7212 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7213 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7214 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7215 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
7216 gc->pc += cmdlen;
7217 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7218 (void) __glXFlushRenderBuffer(gc, gc->pc);
7219 }
7220 }
7221
7222 #define X_GLrop_MultiTexCoord3dvARB 206
7223 void
7224 __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
7225 {
7226 __GLXcontext *const gc = __glXGetCurrentContext();
7227 const GLuint cmdlen = 32;
7228 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7229 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 24);
7230 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
7231 gc->pc += cmdlen;
7232 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7233 (void) __glXFlushRenderBuffer(gc, gc->pc);
7234 }
7235 }
7236
7237 #define X_GLrop_MultiTexCoord3fvARB 207
7238 void
7239 __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t,
7240 GLfloat r)
7241 {
7242 __GLXcontext *const gc = __glXGetCurrentContext();
7243 const GLuint cmdlen = 20;
7244 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7245 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7246 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7247 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7248 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7249 gc->pc += cmdlen;
7250 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7251 (void) __glXFlushRenderBuffer(gc, gc->pc);
7252 }
7253 }
7254
7255 #define X_GLrop_MultiTexCoord3fvARB 207
7256 void
7257 __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
7258 {
7259 __GLXcontext *const gc = __glXGetCurrentContext();
7260 const GLuint cmdlen = 20;
7261 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7262 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7263 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7264 gc->pc += cmdlen;
7265 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7266 (void) __glXFlushRenderBuffer(gc, gc->pc);
7267 }
7268 }
7269
7270 #define X_GLrop_MultiTexCoord3ivARB 208
7271 void
7272 __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
7273 {
7274 __GLXcontext *const gc = __glXGetCurrentContext();
7275 const GLuint cmdlen = 20;
7276 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7277 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7278 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7279 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7280 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7281 gc->pc += cmdlen;
7282 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7283 (void) __glXFlushRenderBuffer(gc, gc->pc);
7284 }
7285 }
7286
7287 #define X_GLrop_MultiTexCoord3ivARB 208
7288 void
7289 __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
7290 {
7291 __GLXcontext *const gc = __glXGetCurrentContext();
7292 const GLuint cmdlen = 20;
7293 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7294 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7295 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7296 gc->pc += cmdlen;
7297 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7298 (void) __glXFlushRenderBuffer(gc, gc->pc);
7299 }
7300 }
7301
7302 #define X_GLrop_MultiTexCoord3svARB 209
7303 void
7304 __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t,
7305 GLshort r)
7306 {
7307 __GLXcontext *const gc = __glXGetCurrentContext();
7308 const GLuint cmdlen = 16;
7309 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7310 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7311 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7312 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7313 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7314 gc->pc += cmdlen;
7315 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7316 (void) __glXFlushRenderBuffer(gc, gc->pc);
7317 }
7318 }
7319
7320 #define X_GLrop_MultiTexCoord3svARB 209
7321 void
7322 __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
7323 {
7324 __GLXcontext *const gc = __glXGetCurrentContext();
7325 const GLuint cmdlen = 16;
7326 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7327 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7328 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
7329 gc->pc += cmdlen;
7330 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7331 (void) __glXFlushRenderBuffer(gc, gc->pc);
7332 }
7333 }
7334
7335 #define X_GLrop_MultiTexCoord4dvARB 210
7336 void
7337 __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t,
7338 GLdouble r, GLdouble q)
7339 {
7340 __GLXcontext *const gc = __glXGetCurrentContext();
7341 const GLuint cmdlen = 40;
7342 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7343 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7344 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7345 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7346 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
7347 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7348 gc->pc += cmdlen;
7349 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7350 (void) __glXFlushRenderBuffer(gc, gc->pc);
7351 }
7352 }
7353
7354 #define X_GLrop_MultiTexCoord4dvARB 210
7355 void
7356 __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
7357 {
7358 __GLXcontext *const gc = __glXGetCurrentContext();
7359 const GLuint cmdlen = 40;
7360 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7361 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
7362 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7363 gc->pc += cmdlen;
7364 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7365 (void) __glXFlushRenderBuffer(gc, gc->pc);
7366 }
7367 }
7368
7369 #define X_GLrop_MultiTexCoord4fvARB 211
7370 void
7371 __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t,
7372 GLfloat r, GLfloat q)
7373 {
7374 __GLXcontext *const gc = __glXGetCurrentContext();
7375 const GLuint cmdlen = 24;
7376 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7377 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7378 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7379 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7380 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7381 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
7382 gc->pc += cmdlen;
7383 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7384 (void) __glXFlushRenderBuffer(gc, gc->pc);
7385 }
7386 }
7387
7388 #define X_GLrop_MultiTexCoord4fvARB 211
7389 void
7390 __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
7391 {
7392 __GLXcontext *const gc = __glXGetCurrentContext();
7393 const GLuint cmdlen = 24;
7394 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7395 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7396 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7397 gc->pc += cmdlen;
7398 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7399 (void) __glXFlushRenderBuffer(gc, gc->pc);
7400 }
7401 }
7402
7403 #define X_GLrop_MultiTexCoord4ivARB 212
7404 void
7405 __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r,
7406 GLint q)
7407 {
7408 __GLXcontext *const gc = __glXGetCurrentContext();
7409 const GLuint cmdlen = 24;
7410 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7411 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7412 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7413 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7414 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7415 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
7416 gc->pc += cmdlen;
7417 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7418 (void) __glXFlushRenderBuffer(gc, gc->pc);
7419 }
7420 }
7421
7422 #define X_GLrop_MultiTexCoord4ivARB 212
7423 void
7424 __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
7425 {
7426 __GLXcontext *const gc = __glXGetCurrentContext();
7427 const GLuint cmdlen = 24;
7428 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7429 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7430 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7431 gc->pc += cmdlen;
7432 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7433 (void) __glXFlushRenderBuffer(gc, gc->pc);
7434 }
7435 }
7436
7437 #define X_GLrop_MultiTexCoord4svARB 213
7438 void
7439 __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t,
7440 GLshort r, GLshort q)
7441 {
7442 __GLXcontext *const gc = __glXGetCurrentContext();
7443 const GLuint cmdlen = 16;
7444 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7445 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7446 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7447 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7448 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7449 (void) memcpy((void *) (gc->pc + 14), (void *) (&q), 2);
7450 gc->pc += cmdlen;
7451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7452 (void) __glXFlushRenderBuffer(gc, gc->pc);
7453 }
7454 }
7455
7456 #define X_GLrop_MultiTexCoord4svARB 213
7457 void
7458 __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
7459 {
7460 __GLXcontext *const gc = __glXGetCurrentContext();
7461 const GLuint cmdlen = 16;
7462 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7463 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7464 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7465 gc->pc += cmdlen;
7466 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7467 (void) __glXFlushRenderBuffer(gc, gc->pc);
7468 }
7469 }
7470
7471 #define X_GLrop_SampleCoverageARB 229
7472 void
7473 __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
7474 {
7475 __GLXcontext *const gc = __glXGetCurrentContext();
7476 const GLuint cmdlen = 12;
7477 emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen);
7478 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
7479 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
7480 gc->pc += cmdlen;
7481 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7482 (void) __glXFlushRenderBuffer(gc, gc->pc);
7483 }
7484 }
7485
7486 #define X_GLvop_GetProgramStringARB 1308
7487 void
7488 __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
7489 {
7490 __GLXcontext *const gc = __glXGetCurrentContext();
7491 Display *const dpy = gc->currentDpy;
7492 const GLuint cmdlen = 8;
7493 if (__builtin_expect(dpy != NULL, 1)) {
7494 GLubyte const *pc =
7495 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7496 X_GLvop_GetProgramStringARB, cmdlen);
7497 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7498 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7499 (void) __glXReadReply(dpy, 1, string, GL_TRUE);
7500 UnlockDisplay(dpy);
7501 SyncHandle();
7502 }
7503 return;
7504 }
7505
7506 #define X_GLvop_GetProgramivARB 1307
7507 void
7508 __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
7509 {
7510 __GLXcontext *const gc = __glXGetCurrentContext();
7511 Display *const dpy = gc->currentDpy;
7512 const GLuint cmdlen = 8;
7513 if (__builtin_expect(dpy != NULL, 1)) {
7514 GLubyte const *pc =
7515 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7516 X_GLvop_GetProgramivARB, cmdlen);
7517 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7518 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7519 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7520 UnlockDisplay(dpy);
7521 SyncHandle();
7522 }
7523 return;
7524 }
7525
7526 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7527 void
7528 __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x,
7529 GLdouble y, GLdouble z, GLdouble w)
7530 {
7531 __GLXcontext *const gc = __glXGetCurrentContext();
7532 const GLuint cmdlen = 44;
7533 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7534 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7535 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7536 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7537 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7538 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7539 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7540 gc->pc += cmdlen;
7541 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7542 (void) __glXFlushRenderBuffer(gc, gc->pc);
7543 }
7544 }
7545
7546 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7547 void
7548 __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index,
7549 const GLdouble * params)
7550 {
7551 __GLXcontext *const gc = __glXGetCurrentContext();
7552 const GLuint cmdlen = 44;
7553 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7554 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7555 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7556 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7557 gc->pc += cmdlen;
7558 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7559 (void) __glXFlushRenderBuffer(gc, gc->pc);
7560 }
7561 }
7562
7563 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7564 void
7565 __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x,
7566 GLfloat y, GLfloat z, GLfloat w)
7567 {
7568 __GLXcontext *const gc = __glXGetCurrentContext();
7569 const GLuint cmdlen = 28;
7570 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7571 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7572 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7573 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7574 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7575 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7576 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7577 gc->pc += cmdlen;
7578 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7579 (void) __glXFlushRenderBuffer(gc, gc->pc);
7580 }
7581 }
7582
7583 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7584 void
7585 __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index,
7586 const GLfloat * params)
7587 {
7588 __GLXcontext *const gc = __glXGetCurrentContext();
7589 const GLuint cmdlen = 28;
7590 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7591 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7592 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7593 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7594 gc->pc += cmdlen;
7595 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7596 (void) __glXFlushRenderBuffer(gc, gc->pc);
7597 }
7598 }
7599
7600 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7601 void
7602 __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index,
7603 GLdouble x, GLdouble y, GLdouble z,
7604 GLdouble w)
7605 {
7606 __GLXcontext *const gc = __glXGetCurrentContext();
7607 const GLuint cmdlen = 44;
7608 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7609 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7610 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7611 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7612 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7613 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7614 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7615 gc->pc += cmdlen;
7616 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7617 (void) __glXFlushRenderBuffer(gc, gc->pc);
7618 }
7619 }
7620
7621 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7622 void
7623 __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index,
7624 const GLdouble * params)
7625 {
7626 __GLXcontext *const gc = __glXGetCurrentContext();
7627 const GLuint cmdlen = 44;
7628 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7629 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7630 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7631 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7632 gc->pc += cmdlen;
7633 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7634 (void) __glXFlushRenderBuffer(gc, gc->pc);
7635 }
7636 }
7637
7638 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7639 void
7640 __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index,
7641 GLfloat x, GLfloat y, GLfloat z,
7642 GLfloat w)
7643 {
7644 __GLXcontext *const gc = __glXGetCurrentContext();
7645 const GLuint cmdlen = 28;
7646 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7647 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7648 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7649 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7650 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7651 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7652 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7653 gc->pc += cmdlen;
7654 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7655 (void) __glXFlushRenderBuffer(gc, gc->pc);
7656 }
7657 }
7658
7659 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7660 void
7661 __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index,
7662 const GLfloat * params)
7663 {
7664 __GLXcontext *const gc = __glXGetCurrentContext();
7665 const GLuint cmdlen = 28;
7666 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7667 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7668 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7669 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7670 gc->pc += cmdlen;
7671 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7672 (void) __glXFlushRenderBuffer(gc, gc->pc);
7673 }
7674 }
7675
7676 #define X_GLrop_ProgramStringARB 4217
7677 void
7678 __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len,
7679 const GLvoid * string)
7680 {
7681 __GLXcontext *const gc = __glXGetCurrentContext();
7682 const GLuint cmdlen = 16 + __GLX_PAD(len);
7683 if (len < 0) {
7684 __glXSetError(gc, GL_INVALID_VALUE);
7685 return;
7686 }
7687 if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
7688 if (cmdlen <= gc->maxSmallRenderCommandSize) {
7689 if ((gc->pc + cmdlen) > gc->bufEnd) {
7690 (void) __glXFlushRenderBuffer(gc, gc->pc);
7691 }
7692 emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
7693 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7694 (void) memcpy((void *) (gc->pc + 8), (void *) (&format), 4);
7695 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
7696 (void) memcpy((void *) (gc->pc + 16), (void *) (string), len);
7697 gc->pc += cmdlen;
7698 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7699 (void) __glXFlushRenderBuffer(gc, gc->pc);
7700 }
7701 } else {
7702 const GLint op = X_GLrop_ProgramStringARB;
7703 const GLuint cmdlenLarge = cmdlen + 4;
7704 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
7705 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
7706 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
7707 (void) memcpy((void *) (pc + 8), (void *) (&target), 4);
7708 (void) memcpy((void *) (pc + 12), (void *) (&format), 4);
7709 (void) memcpy((void *) (pc + 16), (void *) (&len), 4);
7710 __glXSendLargeCommand(gc, pc, 20, string, len);
7711 }
7712 }
7713 }
7714
7715 #define X_GLrop_VertexAttrib1dvARB 4197
7716 void
7717 __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
7718 {
7719 __GLXcontext *const gc = __glXGetCurrentContext();
7720 const GLuint cmdlen = 16;
7721 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7722 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7723 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7724 gc->pc += cmdlen;
7725 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7726 (void) __glXFlushRenderBuffer(gc, gc->pc);
7727 }
7728 }
7729
7730 #define X_GLrop_VertexAttrib1dvARB 4197
7731 void
7732 __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
7733 {
7734 __GLXcontext *const gc = __glXGetCurrentContext();
7735 const GLuint cmdlen = 16;
7736 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7737 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7738 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7739 gc->pc += cmdlen;
7740 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7741 (void) __glXFlushRenderBuffer(gc, gc->pc);
7742 }
7743 }
7744
7745 #define X_GLrop_VertexAttrib1fvARB 4193
7746 void
7747 __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
7748 {
7749 __GLXcontext *const gc = __glXGetCurrentContext();
7750 const GLuint cmdlen = 12;
7751 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7752 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7753 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7754 gc->pc += cmdlen;
7755 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7756 (void) __glXFlushRenderBuffer(gc, gc->pc);
7757 }
7758 }
7759
7760 #define X_GLrop_VertexAttrib1fvARB 4193
7761 void
7762 __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
7763 {
7764 __GLXcontext *const gc = __glXGetCurrentContext();
7765 const GLuint cmdlen = 12;
7766 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7767 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7768 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7769 gc->pc += cmdlen;
7770 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7771 (void) __glXFlushRenderBuffer(gc, gc->pc);
7772 }
7773 }
7774
7775 #define X_GLrop_VertexAttrib1svARB 4189
7776 void
7777 __indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
7778 {
7779 __GLXcontext *const gc = __glXGetCurrentContext();
7780 const GLuint cmdlen = 12;
7781 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7782 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7783 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7784 gc->pc += cmdlen;
7785 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7786 (void) __glXFlushRenderBuffer(gc, gc->pc);
7787 }
7788 }
7789
7790 #define X_GLrop_VertexAttrib1svARB 4189
7791 void
7792 __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
7793 {
7794 __GLXcontext *const gc = __glXGetCurrentContext();
7795 const GLuint cmdlen = 12;
7796 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7797 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7798 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7799 gc->pc += cmdlen;
7800 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7801 (void) __glXFlushRenderBuffer(gc, gc->pc);
7802 }
7803 }
7804
7805 #define X_GLrop_VertexAttrib2dvARB 4198
7806 void
7807 __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
7808 {
7809 __GLXcontext *const gc = __glXGetCurrentContext();
7810 const GLuint cmdlen = 24;
7811 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7812 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7813 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7814 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7815 gc->pc += cmdlen;
7816 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7817 (void) __glXFlushRenderBuffer(gc, gc->pc);
7818 }
7819 }
7820
7821 #define X_GLrop_VertexAttrib2dvARB 4198
7822 void
7823 __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
7824 {
7825 __GLXcontext *const gc = __glXGetCurrentContext();
7826 const GLuint cmdlen = 24;
7827 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7828 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7829 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7830 gc->pc += cmdlen;
7831 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7832 (void) __glXFlushRenderBuffer(gc, gc->pc);
7833 }
7834 }
7835
7836 #define X_GLrop_VertexAttrib2fvARB 4194
7837 void
7838 __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
7839 {
7840 __GLXcontext *const gc = __glXGetCurrentContext();
7841 const GLuint cmdlen = 16;
7842 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7843 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7844 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7845 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7846 gc->pc += cmdlen;
7847 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7848 (void) __glXFlushRenderBuffer(gc, gc->pc);
7849 }
7850 }
7851
7852 #define X_GLrop_VertexAttrib2fvARB 4194
7853 void
7854 __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
7855 {
7856 __GLXcontext *const gc = __glXGetCurrentContext();
7857 const GLuint cmdlen = 16;
7858 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7859 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7860 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7861 gc->pc += cmdlen;
7862 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7863 (void) __glXFlushRenderBuffer(gc, gc->pc);
7864 }
7865 }
7866
7867 #define X_GLrop_VertexAttrib2svARB 4190
7868 void
7869 __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
7870 {
7871 __GLXcontext *const gc = __glXGetCurrentContext();
7872 const GLuint cmdlen = 12;
7873 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7874 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7875 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7876 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
7877 gc->pc += cmdlen;
7878 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7879 (void) __glXFlushRenderBuffer(gc, gc->pc);
7880 }
7881 }
7882
7883 #define X_GLrop_VertexAttrib2svARB 4190
7884 void
7885 __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
7886 {
7887 __GLXcontext *const gc = __glXGetCurrentContext();
7888 const GLuint cmdlen = 12;
7889 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7890 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7891 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7892 gc->pc += cmdlen;
7893 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7894 (void) __glXFlushRenderBuffer(gc, gc->pc);
7895 }
7896 }
7897
7898 #define X_GLrop_VertexAttrib3dvARB 4199
7899 void
7900 __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y,
7901 GLdouble z)
7902 {
7903 __GLXcontext *const gc = __glXGetCurrentContext();
7904 const GLuint cmdlen = 32;
7905 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7906 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7907 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7908 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7909 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
7910 gc->pc += cmdlen;
7911 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7912 (void) __glXFlushRenderBuffer(gc, gc->pc);
7913 }
7914 }
7915
7916 #define X_GLrop_VertexAttrib3dvARB 4199
7917 void
7918 __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
7919 {
7920 __GLXcontext *const gc = __glXGetCurrentContext();
7921 const GLuint cmdlen = 32;
7922 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7923 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7924 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
7925 gc->pc += cmdlen;
7926 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7927 (void) __glXFlushRenderBuffer(gc, gc->pc);
7928 }
7929 }
7930
7931 #define X_GLrop_VertexAttrib3fvARB 4195
7932 void
7933 __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
7934 {
7935 __GLXcontext *const gc = __glXGetCurrentContext();
7936 const GLuint cmdlen = 20;
7937 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7938 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7939 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7940 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7941 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
7942 gc->pc += cmdlen;
7943 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7944 (void) __glXFlushRenderBuffer(gc, gc->pc);
7945 }
7946 }
7947
7948 #define X_GLrop_VertexAttrib3fvARB 4195
7949 void
7950 __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
7951 {
7952 __GLXcontext *const gc = __glXGetCurrentContext();
7953 const GLuint cmdlen = 20;
7954 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7955 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7956 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7957 gc->pc += cmdlen;
7958 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7959 (void) __glXFlushRenderBuffer(gc, gc->pc);
7960 }
7961 }
7962
7963 #define X_GLrop_VertexAttrib3svARB 4191
7964 void
7965 __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
7966 {
7967 __GLXcontext *const gc = __glXGetCurrentContext();
7968 const GLuint cmdlen = 16;
7969 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
7970 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7971 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7972 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
7973 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
7974 gc->pc += cmdlen;
7975 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7976 (void) __glXFlushRenderBuffer(gc, gc->pc);
7977 }
7978 }
7979
7980 #define X_GLrop_VertexAttrib3svARB 4191
7981 void
7982 __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
7983 {
7984 __GLXcontext *const gc = __glXGetCurrentContext();
7985 const GLuint cmdlen = 16;
7986 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
7987 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7988 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
7989 gc->pc += cmdlen;
7990 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7991 (void) __glXFlushRenderBuffer(gc, gc->pc);
7992 }
7993 }
7994
7995 #define X_GLrop_VertexAttrib4NbvARB 4235
7996 void
7997 __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte *v)
7998 {
7999 __GLXcontext *const gc = __glXGetCurrentContext();
8000 const GLuint cmdlen = 12;
8001 emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
8002 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8003 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8004 gc->pc += cmdlen;
8005 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8006 (void) __glXFlushRenderBuffer(gc, gc->pc);
8007 }
8008 }
8009
8010 #define X_GLrop_VertexAttrib4NivARB 4237
8011 void
8012 __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
8013 {
8014 __GLXcontext *const gc = __glXGetCurrentContext();
8015 const GLuint cmdlen = 24;
8016 emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
8017 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8018 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8019 gc->pc += cmdlen;
8020 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8021 (void) __glXFlushRenderBuffer(gc, gc->pc);
8022 }
8023 }
8024
8025 #define X_GLrop_VertexAttrib4NsvARB 4236
8026 void
8027 __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
8028 {
8029 __GLXcontext *const gc = __glXGetCurrentContext();
8030 const GLuint cmdlen = 16;
8031 emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
8032 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8033 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8034 gc->pc += cmdlen;
8035 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8036 (void) __glXFlushRenderBuffer(gc, gc->pc);
8037 }
8038 }
8039
8040 #define X_GLrop_VertexAttrib4NubvARB 4201
8041 void
8042 __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
8043 GLubyte z, GLubyte w)
8044 {
8045 __GLXcontext *const gc = __glXGetCurrentContext();
8046 const GLuint cmdlen = 12;
8047 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
8048 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8049 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
8050 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
8051 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
8052 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
8053 gc->pc += cmdlen;
8054 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8055 (void) __glXFlushRenderBuffer(gc, gc->pc);
8056 }
8057 }
8058
8059 #define X_GLrop_VertexAttrib4NubvARB 4201
8060 void
8061 __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte *v)
8062 {
8063 __GLXcontext *const gc = __glXGetCurrentContext();
8064 const GLuint cmdlen = 12;
8065 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
8066 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8067 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8068 gc->pc += cmdlen;
8069 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8070 (void) __glXFlushRenderBuffer(gc, gc->pc);
8071 }
8072 }
8073
8074 #define X_GLrop_VertexAttrib4NuivARB 4239
8075 void
8076 __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
8077 {
8078 __GLXcontext *const gc = __glXGetCurrentContext();
8079 const GLuint cmdlen = 24;
8080 emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
8081 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8082 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8083 gc->pc += cmdlen;
8084 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8085 (void) __glXFlushRenderBuffer(gc, gc->pc);
8086 }
8087 }
8088
8089 #define X_GLrop_VertexAttrib4NusvARB 4238
8090 void
8091 __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
8092 {
8093 __GLXcontext *const gc = __glXGetCurrentContext();
8094 const GLuint cmdlen = 16;
8095 emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
8096 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8097 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8098 gc->pc += cmdlen;
8099 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8100 (void) __glXFlushRenderBuffer(gc, gc->pc);
8101 }
8102 }
8103
8104 #define X_GLrop_VertexAttrib4bvARB 4230
8105 void
8106 __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte *v)
8107 {
8108 __GLXcontext *const gc = __glXGetCurrentContext();
8109 const GLuint cmdlen = 12;
8110 emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
8111 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8112 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8113 gc->pc += cmdlen;
8114 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8115 (void) __glXFlushRenderBuffer(gc, gc->pc);
8116 }
8117 }
8118
8119 #define X_GLrop_VertexAttrib4dvARB 4200
8120 void
8121 __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y,
8122 GLdouble z, GLdouble w)
8123 {
8124 __GLXcontext *const gc = __glXGetCurrentContext();
8125 const GLuint cmdlen = 40;
8126 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8127 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8128 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
8129 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
8130 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
8131 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
8132 gc->pc += cmdlen;
8133 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8134 (void) __glXFlushRenderBuffer(gc, gc->pc);
8135 }
8136 }
8137
8138 #define X_GLrop_VertexAttrib4dvARB 4200
8139 void
8140 __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
8141 {
8142 __GLXcontext *const gc = __glXGetCurrentContext();
8143 const GLuint cmdlen = 40;
8144 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8145 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8146 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
8147 gc->pc += cmdlen;
8148 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8149 (void) __glXFlushRenderBuffer(gc, gc->pc);
8150 }
8151 }
8152
8153 #define X_GLrop_VertexAttrib4fvARB 4196
8154 void
8155 __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
8156 GLfloat w)
8157 {
8158 __GLXcontext *const gc = __glXGetCurrentContext();
8159 const GLuint cmdlen = 24;
8160 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8161 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8162 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
8163 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
8164 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
8165 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
8166 gc->pc += cmdlen;
8167 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8168 (void) __glXFlushRenderBuffer(gc, gc->pc);
8169 }
8170 }
8171
8172 #define X_GLrop_VertexAttrib4fvARB 4196
8173 void
8174 __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
8175 {
8176 __GLXcontext *const gc = __glXGetCurrentContext();
8177 const GLuint cmdlen = 24;
8178 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8179 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8180 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8181 gc->pc += cmdlen;
8182 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8183 (void) __glXFlushRenderBuffer(gc, gc->pc);
8184 }
8185 }
8186
8187 #define X_GLrop_VertexAttrib4ivARB 4231
8188 void
8189 __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
8190 {
8191 __GLXcontext *const gc = __glXGetCurrentContext();
8192 const GLuint cmdlen = 24;
8193 emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
8194 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8195 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8196 gc->pc += cmdlen;
8197 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8198 (void) __glXFlushRenderBuffer(gc, gc->pc);
8199 }
8200 }
8201
8202 #define X_GLrop_VertexAttrib4svARB 4192
8203 void
8204 __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z,
8205 GLshort w)
8206 {
8207 __GLXcontext *const gc = __glXGetCurrentContext();
8208 const GLuint cmdlen = 16;
8209 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8210 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8211 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
8212 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
8213 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
8214 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
8215 gc->pc += cmdlen;
8216 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8217 (void) __glXFlushRenderBuffer(gc, gc->pc);
8218 }
8219 }
8220
8221 #define X_GLrop_VertexAttrib4svARB 4192
8222 void
8223 __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
8224 {
8225 __GLXcontext *const gc = __glXGetCurrentContext();
8226 const GLuint cmdlen = 16;
8227 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8228 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8229 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8230 gc->pc += cmdlen;
8231 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8232 (void) __glXFlushRenderBuffer(gc, gc->pc);
8233 }
8234 }
8235
8236 #define X_GLrop_VertexAttrib4ubvARB 4232
8237 void
8238 __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte *v)
8239 {
8240 __GLXcontext *const gc = __glXGetCurrentContext();
8241 const GLuint cmdlen = 12;
8242 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
8243 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8244 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8245 gc->pc += cmdlen;
8246 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8247 (void) __glXFlushRenderBuffer(gc, gc->pc);
8248 }
8249 }
8250
8251 #define X_GLrop_VertexAttrib4uivARB 4234
8252 void
8253 __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
8254 {
8255 __GLXcontext *const gc = __glXGetCurrentContext();
8256 const GLuint cmdlen = 24;
8257 emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
8258 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8259 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8260 gc->pc += cmdlen;
8261 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8262 (void) __glXFlushRenderBuffer(gc, gc->pc);
8263 }
8264 }
8265
8266 #define X_GLrop_VertexAttrib4usvARB 4233
8267 void
8268 __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
8269 {
8270 __GLXcontext *const gc = __glXGetCurrentContext();
8271 const GLuint cmdlen = 16;
8272 emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
8273 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8274 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8275 gc->pc += cmdlen;
8276 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8277 (void) __glXFlushRenderBuffer(gc, gc->pc);
8278 }
8279 }
8280
8281 #define X_GLrop_BeginQueryARB 231
8282 void
8283 __indirect_glBeginQueryARB(GLenum target, GLuint id)
8284 {
8285 __GLXcontext *const gc = __glXGetCurrentContext();
8286 const GLuint cmdlen = 12;
8287 emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
8288 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8289 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
8290 gc->pc += cmdlen;
8291 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8292 (void) __glXFlushRenderBuffer(gc, gc->pc);
8293 }
8294 }
8295
8296 #define X_GLsop_DeleteQueriesARB 161
8297 void
8298 __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
8299 {
8300 __GLXcontext *const gc = __glXGetCurrentContext();
8301 Display *const dpy = gc->currentDpy;
8302 #ifndef USE_XCB
8303 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8304 #endif
8305 if (n < 0) {
8306 __glXSetError(gc, GL_INVALID_VALUE);
8307 return;
8308 }
8309 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8310 #ifdef USE_XCB
8311 xcb_connection_t *c = XGetXCBConnection(dpy);
8312 (void) __glXFlushRenderBuffer(gc, gc->pc);
8313 xcb_glx_delete_queries_arb(c, gc->currentContextTag, n, ids);
8314 #else
8315 GLubyte const *pc =
8316 __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
8317 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8318 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8319 UnlockDisplay(dpy);
8320 SyncHandle();
8321 #endif /* USE_XCB */
8322 }
8323 return;
8324 }
8325
8326 #define X_GLrop_EndQueryARB 232
8327 void
8328 __indirect_glEndQueryARB(GLenum target)
8329 {
8330 __GLXcontext *const gc = __glXGetCurrentContext();
8331 const GLuint cmdlen = 8;
8332 emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
8333 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 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_GenQueriesARB 162
8341 void
8342 __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
8343 {
8344 __GLXcontext *const gc = __glXGetCurrentContext();
8345 Display *const dpy = gc->currentDpy;
8346 #ifndef USE_XCB
8347 const GLuint cmdlen = 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_gen_queries_arb_reply_t *reply =
8358 xcb_glx_gen_queries_arb_reply(c,
8359 xcb_glx_gen_queries_arb(c,
8360 gc->
8361 currentContextTag,
8362 n), NULL);
8363 (void) memcpy(ids, xcb_glx_gen_queries_arb_data(reply),
8364 xcb_glx_gen_queries_arb_data_length(reply) *
8365 sizeof(GLuint));
8366 free(reply);
8367 #else
8368 GLubyte const *pc =
8369 __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
8370 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8371 (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
8372 UnlockDisplay(dpy);
8373 SyncHandle();
8374 #endif /* USE_XCB */
8375 }
8376 return;
8377 }
8378
8379 #define X_GLsop_GetQueryObjectivARB 165
8380 void
8381 __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
8382 {
8383 __GLXcontext *const gc = __glXGetCurrentContext();
8384 Display *const dpy = gc->currentDpy;
8385 #ifndef USE_XCB
8386 const GLuint cmdlen = 8;
8387 #endif
8388 if (__builtin_expect(dpy != NULL, 1)) {
8389 #ifdef USE_XCB
8390 xcb_connection_t *c = XGetXCBConnection(dpy);
8391 (void) __glXFlushRenderBuffer(gc, gc->pc);
8392 xcb_glx_get_query_objectiv_arb_reply_t *reply =
8393 xcb_glx_get_query_objectiv_arb_reply(c,
8394 xcb_glx_get_query_objectiv_arb
8395 (c, gc->currentContextTag,
8396 id, pname), NULL);
8397 if (xcb_glx_get_query_objectiv_arb_data_length(reply) == 0)
8398 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8399 else
8400 (void) memcpy(params, xcb_glx_get_query_objectiv_arb_data(reply),
8401 xcb_glx_get_query_objectiv_arb_data_length(reply) *
8402 sizeof(GLint));
8403 free(reply);
8404 #else
8405 GLubyte const *pc =
8406 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
8407 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8408 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8409 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8410 UnlockDisplay(dpy);
8411 SyncHandle();
8412 #endif /* USE_XCB */
8413 }
8414 return;
8415 }
8416
8417 #define X_GLsop_GetQueryObjectuivARB 166
8418 void
8419 __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
8420 {
8421 __GLXcontext *const gc = __glXGetCurrentContext();
8422 Display *const dpy = gc->currentDpy;
8423 #ifndef USE_XCB
8424 const GLuint cmdlen = 8;
8425 #endif
8426 if (__builtin_expect(dpy != NULL, 1)) {
8427 #ifdef USE_XCB
8428 xcb_connection_t *c = XGetXCBConnection(dpy);
8429 (void) __glXFlushRenderBuffer(gc, gc->pc);
8430 xcb_glx_get_query_objectuiv_arb_reply_t *reply =
8431 xcb_glx_get_query_objectuiv_arb_reply(c,
8432 xcb_glx_get_query_objectuiv_arb
8433 (c, gc->currentContextTag,
8434 id, pname), NULL);
8435 if (xcb_glx_get_query_objectuiv_arb_data_length(reply) == 0)
8436 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8437 else
8438 (void) memcpy(params, xcb_glx_get_query_objectuiv_arb_data(reply),
8439 xcb_glx_get_query_objectuiv_arb_data_length(reply) *
8440 sizeof(GLuint));
8441 free(reply);
8442 #else
8443 GLubyte const *pc =
8444 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
8445 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8446 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8447 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8448 UnlockDisplay(dpy);
8449 SyncHandle();
8450 #endif /* USE_XCB */
8451 }
8452 return;
8453 }
8454
8455 #define X_GLsop_GetQueryivARB 164
8456 void
8457 __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
8458 {
8459 __GLXcontext *const gc = __glXGetCurrentContext();
8460 Display *const dpy = gc->currentDpy;
8461 #ifndef USE_XCB
8462 const GLuint cmdlen = 8;
8463 #endif
8464 if (__builtin_expect(dpy != NULL, 1)) {
8465 #ifdef USE_XCB
8466 xcb_connection_t *c = XGetXCBConnection(dpy);
8467 (void) __glXFlushRenderBuffer(gc, gc->pc);
8468 xcb_glx_get_queryiv_arb_reply_t *reply =
8469 xcb_glx_get_queryiv_arb_reply(c,
8470 xcb_glx_get_queryiv_arb(c,
8471 gc->
8472 currentContextTag,
8473 target,
8474 pname),
8475 NULL);
8476 if (xcb_glx_get_queryiv_arb_data_length(reply) == 0)
8477 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8478 else
8479 (void) memcpy(params, xcb_glx_get_queryiv_arb_data(reply),
8480 xcb_glx_get_queryiv_arb_data_length(reply) *
8481 sizeof(GLint));
8482 free(reply);
8483 #else
8484 GLubyte const *pc =
8485 __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
8486 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8487 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8488 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8489 UnlockDisplay(dpy);
8490 SyncHandle();
8491 #endif /* USE_XCB */
8492 }
8493 return;
8494 }
8495
8496 #define X_GLsop_IsQueryARB 163
8497 GLboolean
8498 __indirect_glIsQueryARB(GLuint id)
8499 {
8500 __GLXcontext *const gc = __glXGetCurrentContext();
8501 Display *const dpy = gc->currentDpy;
8502 GLboolean retval = (GLboolean) 0;
8503 #ifndef USE_XCB
8504 const GLuint cmdlen = 4;
8505 #endif
8506 if (__builtin_expect(dpy != NULL, 1)) {
8507 #ifdef USE_XCB
8508 xcb_connection_t *c = XGetXCBConnection(dpy);
8509 (void) __glXFlushRenderBuffer(gc, gc->pc);
8510 xcb_glx_is_query_arb_reply_t *reply =
8511 xcb_glx_is_query_arb_reply(c,
8512 xcb_glx_is_query_arb(c,
8513 gc->
8514 currentContextTag,
8515 id), NULL);
8516 retval = reply->ret_val;
8517 free(reply);
8518 #else
8519 GLubyte const *pc =
8520 __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
8521 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8522 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8523 UnlockDisplay(dpy);
8524 SyncHandle();
8525 #endif /* USE_XCB */
8526 }
8527 return retval;
8528 }
8529
8530 #define X_GLrop_DrawBuffersARB 233
8531 void
8532 __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
8533 {
8534 __GLXcontext *const gc = __glXGetCurrentContext();
8535 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8536 if (n < 0) {
8537 __glXSetError(gc, GL_INVALID_VALUE);
8538 return;
8539 }
8540 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
8541 if (cmdlen <= gc->maxSmallRenderCommandSize) {
8542 if ((gc->pc + cmdlen) > gc->bufEnd) {
8543 (void) __glXFlushRenderBuffer(gc, gc->pc);
8544 }
8545 emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
8546 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
8547 (void) memcpy((void *) (gc->pc + 8), (void *) (bufs), (n * 4));
8548 gc->pc += cmdlen;
8549 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8550 (void) __glXFlushRenderBuffer(gc, gc->pc);
8551 }
8552 } else {
8553 const GLint op = X_GLrop_DrawBuffersARB;
8554 const GLuint cmdlenLarge = cmdlen + 4;
8555 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
8556 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
8557 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
8558 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
8559 __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
8560 }
8561 }
8562 }
8563
8564 #define X_GLrop_SampleMaskSGIS 2048
8565 void
8566 __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
8567 {
8568 __GLXcontext *const gc = __glXGetCurrentContext();
8569 const GLuint cmdlen = 12;
8570 emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
8571 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
8572 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
8573 gc->pc += cmdlen;
8574 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8575 (void) __glXFlushRenderBuffer(gc, gc->pc);
8576 }
8577 }
8578
8579 #define X_GLrop_SamplePatternSGIS 2049
8580 void
8581 __indirect_glSamplePatternSGIS(GLenum pattern)
8582 {
8583 __GLXcontext *const gc = __glXGetCurrentContext();
8584 const GLuint cmdlen = 8;
8585 emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
8586 (void) memcpy((void *) (gc->pc + 4), (void *) (&pattern), 4);
8587 gc->pc += cmdlen;
8588 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8589 (void) __glXFlushRenderBuffer(gc, gc->pc);
8590 }
8591 }
8592
8593 #define X_GLrop_PointParameterfEXT 2065
8594 void
8595 __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
8596 {
8597 __GLXcontext *const gc = __glXGetCurrentContext();
8598 const GLuint cmdlen = 12;
8599 emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
8600 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8601 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
8602 gc->pc += cmdlen;
8603 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8604 (void) __glXFlushRenderBuffer(gc, gc->pc);
8605 }
8606 }
8607
8608 #define X_GLrop_PointParameterfvEXT 2066
8609 void
8610 __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
8611 {
8612 __GLXcontext *const gc = __glXGetCurrentContext();
8613 const GLuint compsize = __glPointParameterfvEXT_size(pname);
8614 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
8615 emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
8616 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8617 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
8618 gc->pc += cmdlen;
8619 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8620 (void) __glXFlushRenderBuffer(gc, gc->pc);
8621 }
8622 }
8623
8624 #define X_GLrop_SecondaryColor3bvEXT 4126
8625 void
8626 __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
8627 {
8628 __GLXcontext *const gc = __glXGetCurrentContext();
8629 const GLuint cmdlen = 8;
8630 emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
8631 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8632 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8633 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8634 gc->pc += cmdlen;
8635 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8636 (void) __glXFlushRenderBuffer(gc, gc->pc);
8637 }
8638 }
8639
8640 #define X_GLrop_SecondaryColor3bvEXT 4126
8641 void
8642 __indirect_glSecondaryColor3bvEXT(const GLbyte *v)
8643 {
8644 generic_3_byte(X_GLrop_SecondaryColor3bvEXT, v);
8645 }
8646
8647 #define X_GLrop_SecondaryColor3dvEXT 4130
8648 void
8649 __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
8650 {
8651 __GLXcontext *const gc = __glXGetCurrentContext();
8652 const GLuint cmdlen = 28;
8653 emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
8654 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
8655 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
8656 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
8657 gc->pc += cmdlen;
8658 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8659 (void) __glXFlushRenderBuffer(gc, gc->pc);
8660 }
8661 }
8662
8663 #define X_GLrop_SecondaryColor3dvEXT 4130
8664 void
8665 __indirect_glSecondaryColor3dvEXT(const GLdouble * v)
8666 {
8667 generic_24_byte(X_GLrop_SecondaryColor3dvEXT, v);
8668 }
8669
8670 #define X_GLrop_SecondaryColor3fvEXT 4129
8671 void
8672 __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
8673 {
8674 __GLXcontext *const gc = __glXGetCurrentContext();
8675 const GLuint cmdlen = 16;
8676 emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
8677 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8678 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8679 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8680 gc->pc += cmdlen;
8681 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8682 (void) __glXFlushRenderBuffer(gc, gc->pc);
8683 }
8684 }
8685
8686 #define X_GLrop_SecondaryColor3fvEXT 4129
8687 void
8688 __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
8689 {
8690 generic_12_byte(X_GLrop_SecondaryColor3fvEXT, v);
8691 }
8692
8693 #define X_GLrop_SecondaryColor3ivEXT 4128
8694 void
8695 __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
8696 {
8697 __GLXcontext *const gc = __glXGetCurrentContext();
8698 const GLuint cmdlen = 16;
8699 emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
8700 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8701 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8702 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8703 gc->pc += cmdlen;
8704 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8705 (void) __glXFlushRenderBuffer(gc, gc->pc);
8706 }
8707 }
8708
8709 #define X_GLrop_SecondaryColor3ivEXT 4128
8710 void
8711 __indirect_glSecondaryColor3ivEXT(const GLint * v)
8712 {
8713 generic_12_byte(X_GLrop_SecondaryColor3ivEXT, v);
8714 }
8715
8716 #define X_GLrop_SecondaryColor3svEXT 4127
8717 void
8718 __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
8719 {
8720 __GLXcontext *const gc = __glXGetCurrentContext();
8721 const GLuint cmdlen = 12;
8722 emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
8723 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8724 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8725 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8726 gc->pc += cmdlen;
8727 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8728 (void) __glXFlushRenderBuffer(gc, gc->pc);
8729 }
8730 }
8731
8732 #define X_GLrop_SecondaryColor3svEXT 4127
8733 void
8734 __indirect_glSecondaryColor3svEXT(const GLshort * v)
8735 {
8736 generic_6_byte(X_GLrop_SecondaryColor3svEXT, v);
8737 }
8738
8739 #define X_GLrop_SecondaryColor3ubvEXT 4131
8740 void
8741 __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
8742 {
8743 __GLXcontext *const gc = __glXGetCurrentContext();
8744 const GLuint cmdlen = 8;
8745 emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
8746 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8747 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8748 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8749 gc->pc += cmdlen;
8750 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8751 (void) __glXFlushRenderBuffer(gc, gc->pc);
8752 }
8753 }
8754
8755 #define X_GLrop_SecondaryColor3ubvEXT 4131
8756 void
8757 __indirect_glSecondaryColor3ubvEXT(const GLubyte *v)
8758 {
8759 generic_3_byte(X_GLrop_SecondaryColor3ubvEXT, v);
8760 }
8761
8762 #define X_GLrop_SecondaryColor3uivEXT 4133
8763 void
8764 __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
8765 {
8766 __GLXcontext *const gc = __glXGetCurrentContext();
8767 const GLuint cmdlen = 16;
8768 emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
8769 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8770 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8771 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8772 gc->pc += cmdlen;
8773 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8774 (void) __glXFlushRenderBuffer(gc, gc->pc);
8775 }
8776 }
8777
8778 #define X_GLrop_SecondaryColor3uivEXT 4133
8779 void
8780 __indirect_glSecondaryColor3uivEXT(const GLuint * v)
8781 {
8782 generic_12_byte(X_GLrop_SecondaryColor3uivEXT, v);
8783 }
8784
8785 #define X_GLrop_SecondaryColor3usvEXT 4132
8786 void
8787 __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
8788 {
8789 __GLXcontext *const gc = __glXGetCurrentContext();
8790 const GLuint cmdlen = 12;
8791 emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
8792 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8793 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8794 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8795 gc->pc += cmdlen;
8796 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8797 (void) __glXFlushRenderBuffer(gc, gc->pc);
8798 }
8799 }
8800
8801 #define X_GLrop_SecondaryColor3usvEXT 4132
8802 void
8803 __indirect_glSecondaryColor3usvEXT(const GLushort * v)
8804 {
8805 generic_6_byte(X_GLrop_SecondaryColor3usvEXT, v);
8806 }
8807
8808 #define X_GLrop_FogCoorddvEXT 4125
8809 void
8810 __indirect_glFogCoorddEXT(GLdouble coord)
8811 {
8812 __GLXcontext *const gc = __glXGetCurrentContext();
8813 const GLuint cmdlen = 12;
8814 emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
8815 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 8);
8816 gc->pc += cmdlen;
8817 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8818 (void) __glXFlushRenderBuffer(gc, gc->pc);
8819 }
8820 }
8821
8822 #define X_GLrop_FogCoorddvEXT 4125
8823 void
8824 __indirect_glFogCoorddvEXT(const GLdouble * coord)
8825 {
8826 generic_8_byte(X_GLrop_FogCoorddvEXT, coord);
8827 }
8828
8829 #define X_GLrop_FogCoordfvEXT 4124
8830 void
8831 __indirect_glFogCoordfEXT(GLfloat coord)
8832 {
8833 __GLXcontext *const gc = __glXGetCurrentContext();
8834 const GLuint cmdlen = 8;
8835 emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
8836 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
8837 gc->pc += cmdlen;
8838 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8839 (void) __glXFlushRenderBuffer(gc, gc->pc);
8840 }
8841 }
8842
8843 #define X_GLrop_FogCoordfvEXT 4124
8844 void
8845 __indirect_glFogCoordfvEXT(const GLfloat * coord)
8846 {
8847 generic_4_byte(X_GLrop_FogCoordfvEXT, coord);
8848 }
8849
8850 #define X_GLrop_BlendFuncSeparateEXT 4134
8851 void
8852 __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
8853 GLenum sfactorAlpha, GLenum dfactorAlpha)
8854 {
8855 __GLXcontext *const gc = __glXGetCurrentContext();
8856 const GLuint cmdlen = 20;
8857 emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
8858 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactorRGB), 4);
8859 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactorRGB), 4);
8860 (void) memcpy((void *) (gc->pc + 12), (void *) (&sfactorAlpha), 4);
8861 (void) memcpy((void *) (gc->pc + 16), (void *) (&dfactorAlpha), 4);
8862 gc->pc += cmdlen;
8863 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8864 (void) __glXFlushRenderBuffer(gc, gc->pc);
8865 }
8866 }
8867
8868 #define X_GLrop_WindowPos3fvMESA 230
8869 void
8870 __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
8871 {
8872 __GLXcontext *const gc = __glXGetCurrentContext();
8873 const GLuint cmdlen = 16;
8874 emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
8875 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
8876 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
8877 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
8878 gc->pc += cmdlen;
8879 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8880 (void) __glXFlushRenderBuffer(gc, gc->pc);
8881 }
8882 }
8883
8884 #define X_GLrop_WindowPos3fvMESA 230
8885 void
8886 __indirect_glWindowPos3fvMESA(const GLfloat * v)
8887 {
8888 generic_12_byte(X_GLrop_WindowPos3fvMESA, v);
8889 }
8890
8891 #define X_GLvop_AreProgramsResidentNV 1293
8892 GLboolean
8893 __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids,
8894 GLboolean * residences)
8895 {
8896 __GLXcontext *const gc = __glXGetCurrentContext();
8897 Display *const dpy = gc->currentDpy;
8898 GLboolean retval = (GLboolean) 0;
8899 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8900 if (n < 0) {
8901 __glXSetError(gc, GL_INVALID_VALUE);
8902 return 0;
8903 }
8904 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8905 GLubyte const *pc =
8906 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8907 X_GLvop_AreProgramsResidentNV, cmdlen);
8908 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8909 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8910 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
8911 UnlockDisplay(dpy);
8912 SyncHandle();
8913 }
8914 return retval;
8915 }
8916
8917 #define X_GLrop_BindProgramNV 4180
8918 void
8919 __indirect_glBindProgramNV(GLenum target, GLuint program)
8920 {
8921 __GLXcontext *const gc = __glXGetCurrentContext();
8922 const GLuint cmdlen = 12;
8923 emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
8924 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8925 (void) memcpy((void *) (gc->pc + 8), (void *) (&program), 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_GLvop_DeleteProgramsNV 1294
8933 void
8934 __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
8935 {
8936 __GLXcontext *const gc = __glXGetCurrentContext();
8937 Display *const dpy = gc->currentDpy;
8938 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8939 if (n < 0) {
8940 __glXSetError(gc, GL_INVALID_VALUE);
8941 return;
8942 }
8943 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8944 GLubyte const *pc =
8945 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
8946 X_GLvop_DeleteProgramsNV, cmdlen);
8947 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8948 (void) memcpy((void *) (pc + 4), (void *) (programs), (n * 4));
8949 UnlockDisplay(dpy);
8950 SyncHandle();
8951 }
8952 return;
8953 }
8954
8955 #define X_GLrop_ExecuteProgramNV 4181
8956 void
8957 __indirect_glExecuteProgramNV(GLenum target, GLuint id,
8958 const GLfloat * params)
8959 {
8960 __GLXcontext *const gc = __glXGetCurrentContext();
8961 const GLuint cmdlen = 28;
8962 emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
8963 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8964 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
8965 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
8966 gc->pc += cmdlen;
8967 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8968 (void) __glXFlushRenderBuffer(gc, gc->pc);
8969 }
8970 }
8971
8972 #define X_GLvop_GenProgramsNV 1295
8973 void
8974 __indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
8975 {
8976 __GLXcontext *const gc = __glXGetCurrentContext();
8977 Display *const dpy = gc->currentDpy;
8978 const GLuint cmdlen = 4;
8979 if (n < 0) {
8980 __glXSetError(gc, GL_INVALID_VALUE);
8981 return;
8982 }
8983 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8984 GLubyte const *pc =
8985 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8986 X_GLvop_GenProgramsNV, cmdlen);
8987 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8988 (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
8989 UnlockDisplay(dpy);
8990 SyncHandle();
8991 }
8992 return;
8993 }
8994
8995 #define X_GLvop_GetProgramParameterdvNV 1297
8996 void
8997 __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index,
8998 GLenum pname, GLdouble * params)
8999 {
9000 __GLXcontext *const gc = __glXGetCurrentContext();
9001 Display *const dpy = gc->currentDpy;
9002 const GLuint cmdlen = 12;
9003 if (__builtin_expect(dpy != NULL, 1)) {
9004 GLubyte const *pc =
9005 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9006 X_GLvop_GetProgramParameterdvNV, cmdlen);
9007 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9008 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
9009 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9010 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
9011 UnlockDisplay(dpy);
9012 SyncHandle();
9013 }
9014 return;
9015 }
9016
9017 #define X_GLvop_GetProgramParameterfvNV 1296
9018 void
9019 __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
9020 GLenum pname, GLfloat * params)
9021 {
9022 __GLXcontext *const gc = __glXGetCurrentContext();
9023 Display *const dpy = gc->currentDpy;
9024 const GLuint cmdlen = 12;
9025 if (__builtin_expect(dpy != NULL, 1)) {
9026 GLubyte const *pc =
9027 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9028 X_GLvop_GetProgramParameterfvNV, cmdlen);
9029 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9030 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
9031 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9032 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9033 UnlockDisplay(dpy);
9034 SyncHandle();
9035 }
9036 return;
9037 }
9038
9039 #define X_GLvop_GetProgramStringNV 1299
9040 void
9041 __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
9042 {
9043 __GLXcontext *const gc = __glXGetCurrentContext();
9044 Display *const dpy = gc->currentDpy;
9045 const GLuint cmdlen = 8;
9046 if (__builtin_expect(dpy != NULL, 1)) {
9047 GLubyte const *pc =
9048 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9049 X_GLvop_GetProgramStringNV, cmdlen);
9050 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9051 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9052 (void) __glXReadReply(dpy, 1, program, GL_TRUE);
9053 UnlockDisplay(dpy);
9054 SyncHandle();
9055 }
9056 return;
9057 }
9058
9059 #define X_GLvop_GetProgramivNV 1298
9060 void
9061 __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
9062 {
9063 __GLXcontext *const gc = __glXGetCurrentContext();
9064 Display *const dpy = gc->currentDpy;
9065 const GLuint cmdlen = 8;
9066 if (__builtin_expect(dpy != NULL, 1)) {
9067 GLubyte const *pc =
9068 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9069 X_GLvop_GetProgramivNV, cmdlen);
9070 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9071 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9072 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9073 UnlockDisplay(dpy);
9074 SyncHandle();
9075 }
9076 return;
9077 }
9078
9079 #define X_GLvop_GetTrackMatrixivNV 1300
9080 void
9081 __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname,
9082 GLint * params)
9083 {
9084 __GLXcontext *const gc = __glXGetCurrentContext();
9085 Display *const dpy = gc->currentDpy;
9086 const GLuint cmdlen = 12;
9087 if (__builtin_expect(dpy != NULL, 1)) {
9088 GLubyte const *pc =
9089 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9090 X_GLvop_GetTrackMatrixivNV, cmdlen);
9091 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9092 (void) memcpy((void *) (pc + 4), (void *) (&address), 4);
9093 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9094 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9095 UnlockDisplay(dpy);
9096 SyncHandle();
9097 }
9098 return;
9099 }
9100
9101 #define X_GLvop_GetVertexAttribdvNV 1301
9102 void
9103 __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname,
9104 GLdouble * params)
9105 {
9106 __GLXcontext *const gc = __glXGetCurrentContext();
9107 Display *const dpy = gc->currentDpy;
9108 const GLuint cmdlen = 8;
9109 if (__builtin_expect(dpy != NULL, 1)) {
9110 GLubyte const *pc =
9111 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9112 X_GLvop_GetVertexAttribdvNV, cmdlen);
9113 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9114 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9115 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
9116 UnlockDisplay(dpy);
9117 SyncHandle();
9118 }
9119 return;
9120 }
9121
9122 #define X_GLvop_GetVertexAttribfvNV 1302
9123 void
9124 __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
9125 {
9126 __GLXcontext *const gc = __glXGetCurrentContext();
9127 Display *const dpy = gc->currentDpy;
9128 const GLuint cmdlen = 8;
9129 if (__builtin_expect(dpy != NULL, 1)) {
9130 GLubyte const *pc =
9131 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9132 X_GLvop_GetVertexAttribfvNV, cmdlen);
9133 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9134 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9135 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9136 UnlockDisplay(dpy);
9137 SyncHandle();
9138 }
9139 return;
9140 }
9141
9142 #define X_GLvop_GetVertexAttribivNV 1303
9143 void
9144 __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
9145 {
9146 __GLXcontext *const gc = __glXGetCurrentContext();
9147 Display *const dpy = gc->currentDpy;
9148 const GLuint cmdlen = 8;
9149 if (__builtin_expect(dpy != NULL, 1)) {
9150 GLubyte const *pc =
9151 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9152 X_GLvop_GetVertexAttribivNV, cmdlen);
9153 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9154 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9155 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9156 UnlockDisplay(dpy);
9157 SyncHandle();
9158 }
9159 return;
9160 }
9161
9162 #define X_GLvop_IsProgramNV 1304
9163 GLboolean
9164 __indirect_glIsProgramNV(GLuint program)
9165 {
9166 __GLXcontext *const gc = __glXGetCurrentContext();
9167 Display *const dpy = gc->currentDpy;
9168 GLboolean retval = (GLboolean) 0;
9169 const GLuint cmdlen = 4;
9170 if (__builtin_expect(dpy != NULL, 1)) {
9171 GLubyte const *pc =
9172 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9173 X_GLvop_IsProgramNV, cmdlen);
9174 (void) memcpy((void *) (pc + 0), (void *) (&program), 4);
9175 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
9176 UnlockDisplay(dpy);
9177 SyncHandle();
9178 }
9179 return retval;
9180 }
9181
9182 #define X_GLrop_LoadProgramNV 4183
9183 void
9184 __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len,
9185 const GLubyte *program)
9186 {
9187 __GLXcontext *const gc = __glXGetCurrentContext();
9188 const GLuint cmdlen = 16 + __GLX_PAD(len);
9189 if (len < 0) {
9190 __glXSetError(gc, GL_INVALID_VALUE);
9191 return;
9192 }
9193 if (__builtin_expect(len >= 0, 1)) {
9194 emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
9195 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9196 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
9197 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
9198 (void) memcpy((void *) (gc->pc + 16), (void *) (program), len);
9199 gc->pc += cmdlen;
9200 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9201 (void) __glXFlushRenderBuffer(gc, gc->pc);
9202 }
9203 }
9204 }
9205
9206 #define X_GLrop_ProgramParameters4dvNV 4187
9207 void
9208 __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num,
9209 const GLdouble * params)
9210 {
9211 __GLXcontext *const gc = __glXGetCurrentContext();
9212 const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
9213 if (num < 0) {
9214 __glXSetError(gc, GL_INVALID_VALUE);
9215 return;
9216 }
9217 if (__builtin_expect(num >= 0, 1)) {
9218 emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
9219 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9220 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9221 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9222 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 32));
9223 gc->pc += cmdlen;
9224 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9225 (void) __glXFlushRenderBuffer(gc, gc->pc);
9226 }
9227 }
9228 }
9229
9230 #define X_GLrop_ProgramParameters4fvNV 4186
9231 void
9232 __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num,
9233 const GLfloat * params)
9234 {
9235 __GLXcontext *const gc = __glXGetCurrentContext();
9236 const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
9237 if (num < 0) {
9238 __glXSetError(gc, GL_INVALID_VALUE);
9239 return;
9240 }
9241 if (__builtin_expect(num >= 0, 1)) {
9242 emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
9243 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9244 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9245 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9246 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 16));
9247 gc->pc += cmdlen;
9248 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9249 (void) __glXFlushRenderBuffer(gc, gc->pc);
9250 }
9251 }
9252 }
9253
9254 #define X_GLrop_RequestResidentProgramsNV 4182
9255 void
9256 __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
9257 {
9258 __GLXcontext *const gc = __glXGetCurrentContext();
9259 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
9260 if (n < 0) {
9261 __glXSetError(gc, GL_INVALID_VALUE);
9262 return;
9263 }
9264 if (__builtin_expect(n >= 0, 1)) {
9265 emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
9266 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
9267 (void) memcpy((void *) (gc->pc + 8), (void *) (ids), (n * 4));
9268 gc->pc += cmdlen;
9269 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9270 (void) __glXFlushRenderBuffer(gc, gc->pc);
9271 }
9272 }
9273 }
9274
9275 #define X_GLrop_TrackMatrixNV 4188
9276 void
9277 __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix,
9278 GLenum transform)
9279 {
9280 __GLXcontext *const gc = __glXGetCurrentContext();
9281 const GLuint cmdlen = 20;
9282 emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
9283 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9284 (void) memcpy((void *) (gc->pc + 8), (void *) (&address), 4);
9285 (void) memcpy((void *) (gc->pc + 12), (void *) (&matrix), 4);
9286 (void) memcpy((void *) (gc->pc + 16), (void *) (&transform), 4);
9287 gc->pc += cmdlen;
9288 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9289 (void) __glXFlushRenderBuffer(gc, gc->pc);
9290 }
9291 }
9292
9293 #define X_GLrop_VertexAttrib1dvNV 4273
9294 void
9295 __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
9296 {
9297 __GLXcontext *const gc = __glXGetCurrentContext();
9298 const GLuint cmdlen = 16;
9299 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9300 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9301 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9302 gc->pc += cmdlen;
9303 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9304 (void) __glXFlushRenderBuffer(gc, gc->pc);
9305 }
9306 }
9307
9308 #define X_GLrop_VertexAttrib1dvNV 4273
9309 void
9310 __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
9311 {
9312 __GLXcontext *const gc = __glXGetCurrentContext();
9313 const GLuint cmdlen = 16;
9314 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9315 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9316 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9317 gc->pc += cmdlen;
9318 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9319 (void) __glXFlushRenderBuffer(gc, gc->pc);
9320 }
9321 }
9322
9323 #define X_GLrop_VertexAttrib1fvNV 4269
9324 void
9325 __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
9326 {
9327 __GLXcontext *const gc = __glXGetCurrentContext();
9328 const GLuint cmdlen = 12;
9329 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9330 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9331 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9332 gc->pc += cmdlen;
9333 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9334 (void) __glXFlushRenderBuffer(gc, gc->pc);
9335 }
9336 }
9337
9338 #define X_GLrop_VertexAttrib1fvNV 4269
9339 void
9340 __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
9341 {
9342 __GLXcontext *const gc = __glXGetCurrentContext();
9343 const GLuint cmdlen = 12;
9344 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9345 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9346 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9347 gc->pc += cmdlen;
9348 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9349 (void) __glXFlushRenderBuffer(gc, gc->pc);
9350 }
9351 }
9352
9353 #define X_GLrop_VertexAttrib1svNV 4265
9354 void
9355 __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
9356 {
9357 __GLXcontext *const gc = __glXGetCurrentContext();
9358 const GLuint cmdlen = 12;
9359 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9360 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9361 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9362 gc->pc += cmdlen;
9363 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9364 (void) __glXFlushRenderBuffer(gc, gc->pc);
9365 }
9366 }
9367
9368 #define X_GLrop_VertexAttrib1svNV 4265
9369 void
9370 __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
9371 {
9372 __GLXcontext *const gc = __glXGetCurrentContext();
9373 const GLuint cmdlen = 12;
9374 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9375 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9376 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
9377 gc->pc += cmdlen;
9378 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9379 (void) __glXFlushRenderBuffer(gc, gc->pc);
9380 }
9381 }
9382
9383 #define X_GLrop_VertexAttrib2dvNV 4274
9384 void
9385 __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
9386 {
9387 __GLXcontext *const gc = __glXGetCurrentContext();
9388 const GLuint cmdlen = 24;
9389 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9390 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9391 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9392 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9393 gc->pc += cmdlen;
9394 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9395 (void) __glXFlushRenderBuffer(gc, gc->pc);
9396 }
9397 }
9398
9399 #define X_GLrop_VertexAttrib2dvNV 4274
9400 void
9401 __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
9402 {
9403 __GLXcontext *const gc = __glXGetCurrentContext();
9404 const GLuint cmdlen = 24;
9405 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9406 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9407 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9408 gc->pc += cmdlen;
9409 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9410 (void) __glXFlushRenderBuffer(gc, gc->pc);
9411 }
9412 }
9413
9414 #define X_GLrop_VertexAttrib2fvNV 4270
9415 void
9416 __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
9417 {
9418 __GLXcontext *const gc = __glXGetCurrentContext();
9419 const GLuint cmdlen = 16;
9420 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9421 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9422 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9423 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9424 gc->pc += cmdlen;
9425 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9426 (void) __glXFlushRenderBuffer(gc, gc->pc);
9427 }
9428 }
9429
9430 #define X_GLrop_VertexAttrib2fvNV 4270
9431 void
9432 __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
9433 {
9434 __GLXcontext *const gc = __glXGetCurrentContext();
9435 const GLuint cmdlen = 16;
9436 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9437 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9438 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9439 gc->pc += cmdlen;
9440 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9441 (void) __glXFlushRenderBuffer(gc, gc->pc);
9442 }
9443 }
9444
9445 #define X_GLrop_VertexAttrib2svNV 4266
9446 void
9447 __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
9448 {
9449 __GLXcontext *const gc = __glXGetCurrentContext();
9450 const GLuint cmdlen = 12;
9451 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9452 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9453 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9454 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9455 gc->pc += cmdlen;
9456 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9457 (void) __glXFlushRenderBuffer(gc, gc->pc);
9458 }
9459 }
9460
9461 #define X_GLrop_VertexAttrib2svNV 4266
9462 void
9463 __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
9464 {
9465 __GLXcontext *const gc = __glXGetCurrentContext();
9466 const GLuint cmdlen = 12;
9467 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9468 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9469 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9470 gc->pc += cmdlen;
9471 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9472 (void) __glXFlushRenderBuffer(gc, gc->pc);
9473 }
9474 }
9475
9476 #define X_GLrop_VertexAttrib3dvNV 4275
9477 void
9478 __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y,
9479 GLdouble z)
9480 {
9481 __GLXcontext *const gc = __glXGetCurrentContext();
9482 const GLuint cmdlen = 32;
9483 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9484 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9485 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9486 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9487 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
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_VertexAttrib3dvNV 4275
9495 void
9496 __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
9497 {
9498 __GLXcontext *const gc = __glXGetCurrentContext();
9499 const GLuint cmdlen = 32;
9500 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9501 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9502 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
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_VertexAttrib3fvNV 4271
9510 void
9511 __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
9512 {
9513 __GLXcontext *const gc = __glXGetCurrentContext();
9514 const GLuint cmdlen = 20;
9515 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9516 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9517 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9518 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9519 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9520 gc->pc += cmdlen;
9521 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9522 (void) __glXFlushRenderBuffer(gc, gc->pc);
9523 }
9524 }
9525
9526 #define X_GLrop_VertexAttrib3fvNV 4271
9527 void
9528 __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
9529 {
9530 __GLXcontext *const gc = __glXGetCurrentContext();
9531 const GLuint cmdlen = 20;
9532 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9533 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9534 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
9535 gc->pc += cmdlen;
9536 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9537 (void) __glXFlushRenderBuffer(gc, gc->pc);
9538 }
9539 }
9540
9541 #define X_GLrop_VertexAttrib3svNV 4267
9542 void
9543 __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
9544 {
9545 __GLXcontext *const gc = __glXGetCurrentContext();
9546 const GLuint cmdlen = 16;
9547 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9548 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9549 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9550 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9551 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
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_VertexAttrib3svNV 4267
9559 void
9560 __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
9561 {
9562 __GLXcontext *const gc = __glXGetCurrentContext();
9563 const GLuint cmdlen = 16;
9564 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9565 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9566 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
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_VertexAttrib4dvNV 4276
9574 void
9575 __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y,
9576 GLdouble z, GLdouble w)
9577 {
9578 __GLXcontext *const gc = __glXGetCurrentContext();
9579 const GLuint cmdlen = 40;
9580 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9581 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9582 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9583 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9584 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9585 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
9586 gc->pc += cmdlen;
9587 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9588 (void) __glXFlushRenderBuffer(gc, gc->pc);
9589 }
9590 }
9591
9592 #define X_GLrop_VertexAttrib4dvNV 4276
9593 void
9594 __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
9595 {
9596 __GLXcontext *const gc = __glXGetCurrentContext();
9597 const GLuint cmdlen = 40;
9598 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9599 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9600 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
9601 gc->pc += cmdlen;
9602 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9603 (void) __glXFlushRenderBuffer(gc, gc->pc);
9604 }
9605 }
9606
9607 #define X_GLrop_VertexAttrib4fvNV 4272
9608 void
9609 __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z,
9610 GLfloat w)
9611 {
9612 __GLXcontext *const gc = __glXGetCurrentContext();
9613 const GLuint cmdlen = 24;
9614 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9615 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9616 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9617 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9618 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9619 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
9620 gc->pc += cmdlen;
9621 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9622 (void) __glXFlushRenderBuffer(gc, gc->pc);
9623 }
9624 }
9625
9626 #define X_GLrop_VertexAttrib4fvNV 4272
9627 void
9628 __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
9629 {
9630 __GLXcontext *const gc = __glXGetCurrentContext();
9631 const GLuint cmdlen = 24;
9632 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9633 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9634 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9635 gc->pc += cmdlen;
9636 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9637 (void) __glXFlushRenderBuffer(gc, gc->pc);
9638 }
9639 }
9640
9641 #define X_GLrop_VertexAttrib4svNV 4268
9642 void
9643 __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z,
9644 GLshort w)
9645 {
9646 __GLXcontext *const gc = __glXGetCurrentContext();
9647 const GLuint cmdlen = 16;
9648 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9649 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9650 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9651 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9652 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9653 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
9654 gc->pc += cmdlen;
9655 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9656 (void) __glXFlushRenderBuffer(gc, gc->pc);
9657 }
9658 }
9659
9660 #define X_GLrop_VertexAttrib4svNV 4268
9661 void
9662 __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
9663 {
9664 __GLXcontext *const gc = __glXGetCurrentContext();
9665 const GLuint cmdlen = 16;
9666 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9667 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9668 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9669 gc->pc += cmdlen;
9670 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9671 (void) __glXFlushRenderBuffer(gc, gc->pc);
9672 }
9673 }
9674
9675 #define X_GLrop_VertexAttrib4ubvNV 4277
9676 void
9677 __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
9678 GLubyte w)
9679 {
9680 __GLXcontext *const gc = __glXGetCurrentContext();
9681 const GLuint cmdlen = 12;
9682 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9683 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9684 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
9685 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
9686 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
9687 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
9688 gc->pc += cmdlen;
9689 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9690 (void) __glXFlushRenderBuffer(gc, gc->pc);
9691 }
9692 }
9693
9694 #define X_GLrop_VertexAttrib4ubvNV 4277
9695 void
9696 __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte *v)
9697 {
9698 __GLXcontext *const gc = __glXGetCurrentContext();
9699 const GLuint cmdlen = 12;
9700 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9701 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9702 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9703 gc->pc += cmdlen;
9704 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9705 (void) __glXFlushRenderBuffer(gc, gc->pc);
9706 }
9707 }
9708
9709 #define X_GLrop_VertexAttribs1dvNV 4210
9710 void
9711 __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
9712 {
9713 __GLXcontext *const gc = __glXGetCurrentContext();
9714 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9715 if (n < 0) {
9716 __glXSetError(gc, GL_INVALID_VALUE);
9717 return;
9718 }
9719 if (__builtin_expect(n >= 0, 1)) {
9720 emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
9721 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9722 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9723 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9724 gc->pc += cmdlen;
9725 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9726 (void) __glXFlushRenderBuffer(gc, gc->pc);
9727 }
9728 }
9729 }
9730
9731 #define X_GLrop_VertexAttribs1fvNV 4206
9732 void
9733 __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
9734 {
9735 __GLXcontext *const gc = __glXGetCurrentContext();
9736 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9737 if (n < 0) {
9738 __glXSetError(gc, GL_INVALID_VALUE);
9739 return;
9740 }
9741 if (__builtin_expect(n >= 0, 1)) {
9742 emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
9743 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9744 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9745 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9746 gc->pc += cmdlen;
9747 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9748 (void) __glXFlushRenderBuffer(gc, gc->pc);
9749 }
9750 }
9751 }
9752
9753 #define X_GLrop_VertexAttribs1svNV 4202
9754 void
9755 __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
9756 {
9757 __GLXcontext *const gc = __glXGetCurrentContext();
9758 const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
9759 if (n < 0) {
9760 __glXSetError(gc, GL_INVALID_VALUE);
9761 return;
9762 }
9763 if (__builtin_expect(n >= 0, 1)) {
9764 emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
9765 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9766 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9767 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 2));
9768 gc->pc += cmdlen;
9769 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9770 (void) __glXFlushRenderBuffer(gc, gc->pc);
9771 }
9772 }
9773 }
9774
9775 #define X_GLrop_VertexAttribs2dvNV 4211
9776 void
9777 __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
9778 {
9779 __GLXcontext *const gc = __glXGetCurrentContext();
9780 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9781 if (n < 0) {
9782 __glXSetError(gc, GL_INVALID_VALUE);
9783 return;
9784 }
9785 if (__builtin_expect(n >= 0, 1)) {
9786 emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
9787 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9788 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9789 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
9790 gc->pc += cmdlen;
9791 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9792 (void) __glXFlushRenderBuffer(gc, gc->pc);
9793 }
9794 }
9795 }
9796
9797 #define X_GLrop_VertexAttribs2fvNV 4207
9798 void
9799 __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
9800 {
9801 __GLXcontext *const gc = __glXGetCurrentContext();
9802 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9803 if (n < 0) {
9804 __glXSetError(gc, GL_INVALID_VALUE);
9805 return;
9806 }
9807 if (__builtin_expect(n >= 0, 1)) {
9808 emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
9809 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9810 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9811 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9812 gc->pc += cmdlen;
9813 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9814 (void) __glXFlushRenderBuffer(gc, gc->pc);
9815 }
9816 }
9817 }
9818
9819 #define X_GLrop_VertexAttribs2svNV 4203
9820 void
9821 __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
9822 {
9823 __GLXcontext *const gc = __glXGetCurrentContext();
9824 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9825 if (n < 0) {
9826 __glXSetError(gc, GL_INVALID_VALUE);
9827 return;
9828 }
9829 if (__builtin_expect(n >= 0, 1)) {
9830 emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
9831 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9832 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9833 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9834 gc->pc += cmdlen;
9835 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9836 (void) __glXFlushRenderBuffer(gc, gc->pc);
9837 }
9838 }
9839 }
9840
9841 #define X_GLrop_VertexAttribs3dvNV 4212
9842 void
9843 __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
9844 {
9845 __GLXcontext *const gc = __glXGetCurrentContext();
9846 const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
9847 if (n < 0) {
9848 __glXSetError(gc, GL_INVALID_VALUE);
9849 return;
9850 }
9851 if (__builtin_expect(n >= 0, 1)) {
9852 emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
9853 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9854 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9855 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 24));
9856 gc->pc += cmdlen;
9857 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9858 (void) __glXFlushRenderBuffer(gc, gc->pc);
9859 }
9860 }
9861 }
9862
9863 #define X_GLrop_VertexAttribs3fvNV 4208
9864 void
9865 __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
9866 {
9867 __GLXcontext *const gc = __glXGetCurrentContext();
9868 const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
9869 if (n < 0) {
9870 __glXSetError(gc, GL_INVALID_VALUE);
9871 return;
9872 }
9873 if (__builtin_expect(n >= 0, 1)) {
9874 emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
9875 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9876 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9877 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 12));
9878 gc->pc += cmdlen;
9879 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9880 (void) __glXFlushRenderBuffer(gc, gc->pc);
9881 }
9882 }
9883 }
9884
9885 #define X_GLrop_VertexAttribs3svNV 4204
9886 void
9887 __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
9888 {
9889 __GLXcontext *const gc = __glXGetCurrentContext();
9890 const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
9891 if (n < 0) {
9892 __glXSetError(gc, GL_INVALID_VALUE);
9893 return;
9894 }
9895 if (__builtin_expect(n >= 0, 1)) {
9896 emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
9897 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9898 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9899 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 6));
9900 gc->pc += cmdlen;
9901 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9902 (void) __glXFlushRenderBuffer(gc, gc->pc);
9903 }
9904 }
9905 }
9906
9907 #define X_GLrop_VertexAttribs4dvNV 4213
9908 void
9909 __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
9910 {
9911 __GLXcontext *const gc = __glXGetCurrentContext();
9912 const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
9913 if (n < 0) {
9914 __glXSetError(gc, GL_INVALID_VALUE);
9915 return;
9916 }
9917 if (__builtin_expect(n >= 0, 1)) {
9918 emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
9919 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9920 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9921 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 32));
9922 gc->pc += cmdlen;
9923 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9924 (void) __glXFlushRenderBuffer(gc, gc->pc);
9925 }
9926 }
9927 }
9928
9929 #define X_GLrop_VertexAttribs4fvNV 4209
9930 void
9931 __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
9932 {
9933 __GLXcontext *const gc = __glXGetCurrentContext();
9934 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9935 if (n < 0) {
9936 __glXSetError(gc, GL_INVALID_VALUE);
9937 return;
9938 }
9939 if (__builtin_expect(n >= 0, 1)) {
9940 emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
9941 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9942 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9943 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
9944 gc->pc += cmdlen;
9945 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9946 (void) __glXFlushRenderBuffer(gc, gc->pc);
9947 }
9948 }
9949 }
9950
9951 #define X_GLrop_VertexAttribs4svNV 4205
9952 void
9953 __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
9954 {
9955 __GLXcontext *const gc = __glXGetCurrentContext();
9956 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9957 if (n < 0) {
9958 __glXSetError(gc, GL_INVALID_VALUE);
9959 return;
9960 }
9961 if (__builtin_expect(n >= 0, 1)) {
9962 emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
9963 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9964 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9965 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9966 gc->pc += cmdlen;
9967 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9968 (void) __glXFlushRenderBuffer(gc, gc->pc);
9969 }
9970 }
9971 }
9972
9973 #define X_GLrop_VertexAttribs4ubvNV 4214
9974 void
9975 __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
9976 {
9977 __GLXcontext *const gc = __glXGetCurrentContext();
9978 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9979 if (n < 0) {
9980 __glXSetError(gc, GL_INVALID_VALUE);
9981 return;
9982 }
9983 if (__builtin_expect(n >= 0, 1)) {
9984 emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
9985 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9986 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9987 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9988 gc->pc += cmdlen;
9989 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9990 (void) __glXFlushRenderBuffer(gc, gc->pc);
9991 }
9992 }
9993 }
9994
9995 #define X_GLrop_PointParameteriNV 4221
9996 void
9997 __indirect_glPointParameteriNV(GLenum pname, GLint param)
9998 {
9999 __GLXcontext *const gc = __glXGetCurrentContext();
10000 const GLuint cmdlen = 12;
10001 emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
10002 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
10003 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
10004 gc->pc += cmdlen;
10005 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10006 (void) __glXFlushRenderBuffer(gc, gc->pc);
10007 }
10008 }
10009
10010 #define X_GLrop_PointParameterivNV 4222
10011 void
10012 __indirect_glPointParameterivNV(GLenum pname, const GLint * params)
10013 {
10014 __GLXcontext *const gc = __glXGetCurrentContext();
10015 const GLuint compsize = __glPointParameterivNV_size(pname);
10016 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
10017 emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
10018 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
10019 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
10020 gc->pc += cmdlen;
10021 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10022 (void) __glXFlushRenderBuffer(gc, gc->pc);
10023 }
10024 }
10025
10026 #define X_GLrop_ActiveStencilFaceEXT 4220
10027 void
10028 __indirect_glActiveStencilFaceEXT(GLenum face)
10029 {
10030 __GLXcontext *const gc = __glXGetCurrentContext();
10031 const GLuint cmdlen = 8;
10032 emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
10033 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
10034 gc->pc += cmdlen;
10035 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10036 (void) __glXFlushRenderBuffer(gc, gc->pc);
10037 }
10038 }
10039
10040 #define X_GLvop_GetProgramNamedParameterdvNV 1311
10041 void
10042 __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
10043 const GLubyte *name,
10044 GLdouble * params)
10045 {
10046 __GLXcontext *const gc = __glXGetCurrentContext();
10047 Display *const dpy = gc->currentDpy;
10048 const GLuint cmdlen = 8 + __GLX_PAD(len);
10049 if (len < 0) {
10050 __glXSetError(gc, GL_INVALID_VALUE);
10051 return;
10052 }
10053 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
10054 GLubyte const *pc =
10055 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10056 X_GLvop_GetProgramNamedParameterdvNV,
10057 cmdlen);
10058 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
10059 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
10060 (void) memcpy((void *) (pc + 8), (void *) (name), len);
10061 (void) __glXReadReply(dpy, 8, params, GL_TRUE);
10062 UnlockDisplay(dpy);
10063 SyncHandle();
10064 }
10065 return;
10066 }
10067
10068 #define X_GLvop_GetProgramNamedParameterfvNV 1310
10069 void
10070 __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
10071 const GLubyte *name,
10072 GLfloat * params)
10073 {
10074 __GLXcontext *const gc = __glXGetCurrentContext();
10075 Display *const dpy = gc->currentDpy;
10076 const GLuint cmdlen = 8 + __GLX_PAD(len);
10077 if (len < 0) {
10078 __glXSetError(gc, GL_INVALID_VALUE);
10079 return;
10080 }
10081 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
10082 GLubyte const *pc =
10083 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10084 X_GLvop_GetProgramNamedParameterfvNV,
10085 cmdlen);
10086 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
10087 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
10088 (void) memcpy((void *) (pc + 8), (void *) (name), len);
10089 (void) __glXReadReply(dpy, 4, params, GL_TRUE);
10090 UnlockDisplay(dpy);
10091 SyncHandle();
10092 }
10093 return;
10094 }
10095
10096 #define X_GLrop_ProgramNamedParameter4dvNV 4219
10097 void
10098 __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
10099 const GLubyte *name, GLdouble x,
10100 GLdouble y, GLdouble z, GLdouble w)
10101 {
10102 __GLXcontext *const gc = __glXGetCurrentContext();
10103 const GLuint cmdlen = 44 + __GLX_PAD(len);
10104 if (len < 0) {
10105 __glXSetError(gc, GL_INVALID_VALUE);
10106 return;
10107 }
10108 if (__builtin_expect(len >= 0, 1)) {
10109 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
10110 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
10111 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
10112 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
10113 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
10114 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
10115 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
10116 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
10117 gc->pc += cmdlen;
10118 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10119 (void) __glXFlushRenderBuffer(gc, gc->pc);
10120 }
10121 }
10122 }
10123
10124 #define X_GLrop_ProgramNamedParameter4dvNV 4219
10125 void
10126 __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
10127 const GLubyte *name,
10128 const GLdouble * v)
10129 {
10130 __GLXcontext *const gc = __glXGetCurrentContext();
10131 const GLuint cmdlen = 44 + __GLX_PAD(len);
10132 if (len < 0) {
10133 __glXSetError(gc, GL_INVALID_VALUE);
10134 return;
10135 }
10136 if (__builtin_expect(len >= 0, 1)) {
10137 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
10138 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
10139 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
10140 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
10141 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
10142 gc->pc += cmdlen;
10143 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10144 (void) __glXFlushRenderBuffer(gc, gc->pc);
10145 }
10146 }
10147 }
10148
10149 #define X_GLrop_ProgramNamedParameter4fvNV 4218
10150 void
10151 __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
10152 const GLubyte *name, GLfloat x,
10153 GLfloat y, GLfloat z, GLfloat w)
10154 {
10155 __GLXcontext *const gc = __glXGetCurrentContext();
10156 const GLuint cmdlen = 28 + __GLX_PAD(len);
10157 if (len < 0) {
10158 __glXSetError(gc, GL_INVALID_VALUE);
10159 return;
10160 }
10161 if (__builtin_expect(len >= 0, 1)) {
10162 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
10163 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
10164 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
10165 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
10166 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
10167 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
10168 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
10169 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
10170 gc->pc += cmdlen;
10171 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10172 (void) __glXFlushRenderBuffer(gc, gc->pc);
10173 }
10174 }
10175 }
10176
10177 #define X_GLrop_ProgramNamedParameter4fvNV 4218
10178 void
10179 __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
10180 const GLubyte *name,
10181 const GLfloat * v)
10182 {
10183 __GLXcontext *const gc = __glXGetCurrentContext();
10184 const GLuint cmdlen = 28 + __GLX_PAD(len);
10185 if (len < 0) {
10186 __glXSetError(gc, GL_INVALID_VALUE);
10187 return;
10188 }
10189 if (__builtin_expect(len >= 0, 1)) {
10190 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
10191 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
10192 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
10193 (void) memcpy((void *) (gc->pc + 12), (void *) (v), 16);
10194 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
10195 gc->pc += cmdlen;
10196 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10197 (void) __glXFlushRenderBuffer(gc, gc->pc);
10198 }
10199 }
10200 }
10201
10202 #define X_GLrop_BlendEquationSeparateEXT 4228
10203 void
10204 __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
10205 {
10206 __GLXcontext *const gc = __glXGetCurrentContext();
10207 const GLuint cmdlen = 12;
10208 emit_header(gc->pc, X_GLrop_BlendEquationSeparateEXT, cmdlen);
10209 (void) memcpy((void *) (gc->pc + 4), (void *) (&modeRGB), 4);
10210 (void) memcpy((void *) (gc->pc + 8), (void *) (&modeA), 4);
10211 gc->pc += cmdlen;
10212 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10213 (void) __glXFlushRenderBuffer(gc, gc->pc);
10214 }
10215 }
10216
10217 #define X_GLrop_BindFramebufferEXT 4319
10218 void
10219 __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
10220 {
10221 __GLXcontext *const gc = __glXGetCurrentContext();
10222 const GLuint cmdlen = 12;
10223 emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
10224 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10225 (void) memcpy((void *) (gc->pc + 8), (void *) (&framebuffer), 4);
10226 gc->pc += cmdlen;
10227 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10228 (void) __glXFlushRenderBuffer(gc, gc->pc);
10229 }
10230 }
10231
10232 #define X_GLrop_BindRenderbufferEXT 4316
10233 void
10234 __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
10235 {
10236 __GLXcontext *const gc = __glXGetCurrentContext();
10237 const GLuint cmdlen = 12;
10238 emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
10239 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10240 (void) memcpy((void *) (gc->pc + 8), (void *) (&renderbuffer), 4);
10241 gc->pc += cmdlen;
10242 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10243 (void) __glXFlushRenderBuffer(gc, gc->pc);
10244 }
10245 }
10246
10247 #define X_GLvop_CheckFramebufferStatusEXT 1427
10248 GLenum
10249 __indirect_glCheckFramebufferStatusEXT(GLenum target)
10250 {
10251 __GLXcontext *const gc = __glXGetCurrentContext();
10252 Display *const dpy = gc->currentDpy;
10253 GLenum retval = (GLenum) 0;
10254 const GLuint cmdlen = 4;
10255 if (__builtin_expect(dpy != NULL, 1)) {
10256 GLubyte const *pc =
10257 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10258 X_GLvop_CheckFramebufferStatusEXT,
10259 cmdlen);
10260 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10261 retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10262 UnlockDisplay(dpy);
10263 SyncHandle();
10264 }
10265 return retval;
10266 }
10267
10268 #define X_GLrop_DeleteFramebuffersEXT 4320
10269 void
10270 __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
10271 {
10272 __GLXcontext *const gc = __glXGetCurrentContext();
10273 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10274 if (n < 0) {
10275 __glXSetError(gc, GL_INVALID_VALUE);
10276 return;
10277 }
10278 if (__builtin_expect(n >= 0, 1)) {
10279 emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
10280 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10281 (void) memcpy((void *) (gc->pc + 8), (void *) (framebuffers),
10282 (n * 4));
10283 gc->pc += cmdlen;
10284 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10285 (void) __glXFlushRenderBuffer(gc, gc->pc);
10286 }
10287 }
10288 }
10289
10290 #define X_GLrop_DeleteRenderbuffersEXT 4317
10291 void
10292 __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
10293 {
10294 __GLXcontext *const gc = __glXGetCurrentContext();
10295 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10296 if (n < 0) {
10297 __glXSetError(gc, GL_INVALID_VALUE);
10298 return;
10299 }
10300 if (__builtin_expect(n >= 0, 1)) {
10301 emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
10302 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10303 (void) memcpy((void *) (gc->pc + 8), (void *) (renderbuffers),
10304 (n * 4));
10305 gc->pc += cmdlen;
10306 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10307 (void) __glXFlushRenderBuffer(gc, gc->pc);
10308 }
10309 }
10310 }
10311
10312 #define X_GLrop_FramebufferRenderbufferEXT 4324
10313 void
10314 __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
10315 GLenum renderbuffertarget,
10316 GLuint renderbuffer)
10317 {
10318 __GLXcontext *const gc = __glXGetCurrentContext();
10319 const GLuint cmdlen = 20;
10320 emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
10321 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10322 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10323 (void) memcpy((void *) (gc->pc + 12), (void *) (&renderbuffertarget), 4);
10324 (void) memcpy((void *) (gc->pc + 16), (void *) (&renderbuffer), 4);
10325 gc->pc += cmdlen;
10326 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10327 (void) __glXFlushRenderBuffer(gc, gc->pc);
10328 }
10329 }
10330
10331 #define X_GLrop_FramebufferTexture1DEXT 4321
10332 void
10333 __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
10334 GLenum textarget, GLuint texture,
10335 GLint level)
10336 {
10337 __GLXcontext *const gc = __glXGetCurrentContext();
10338 const GLuint cmdlen = 24;
10339 emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
10340 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10341 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10342 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10343 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10344 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10345 gc->pc += cmdlen;
10346 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10347 (void) __glXFlushRenderBuffer(gc, gc->pc);
10348 }
10349 }
10350
10351 #define X_GLrop_FramebufferTexture2DEXT 4322
10352 void
10353 __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
10354 GLenum textarget, GLuint texture,
10355 GLint level)
10356 {
10357 __GLXcontext *const gc = __glXGetCurrentContext();
10358 const GLuint cmdlen = 24;
10359 emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
10360 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10361 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10362 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10363 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10364 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10365 gc->pc += cmdlen;
10366 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10367 (void) __glXFlushRenderBuffer(gc, gc->pc);
10368 }
10369 }
10370
10371 #define X_GLrop_FramebufferTexture3DEXT 4323
10372 void
10373 __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
10374 GLenum textarget, GLuint texture,
10375 GLint level, GLint zoffset)
10376 {
10377 __GLXcontext *const gc = __glXGetCurrentContext();
10378 const GLuint cmdlen = 28;
10379 emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
10380 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10381 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10382 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10383 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10384 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10385 (void) memcpy((void *) (gc->pc + 24), (void *) (&zoffset), 4);
10386 gc->pc += cmdlen;
10387 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10388 (void) __glXFlushRenderBuffer(gc, gc->pc);
10389 }
10390 }
10391
10392 #define X_GLvop_GenFramebuffersEXT 1426
10393 void
10394 __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
10395 {
10396 __GLXcontext *const gc = __glXGetCurrentContext();
10397 Display *const dpy = gc->currentDpy;
10398 const GLuint cmdlen = 4;
10399 if (n < 0) {
10400 __glXSetError(gc, GL_INVALID_VALUE);
10401 return;
10402 }
10403 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10404 GLubyte const *pc =
10405 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10406 X_GLvop_GenFramebuffersEXT, cmdlen);
10407 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10408 (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
10409 UnlockDisplay(dpy);
10410 SyncHandle();
10411 }
10412 return;
10413 }
10414
10415 #define X_GLvop_GenRenderbuffersEXT 1423
10416 void
10417 __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
10418 {
10419 __GLXcontext *const gc = __glXGetCurrentContext();
10420 Display *const dpy = gc->currentDpy;
10421 const GLuint cmdlen = 4;
10422 if (n < 0) {
10423 __glXSetError(gc, GL_INVALID_VALUE);
10424 return;
10425 }
10426 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10427 GLubyte const *pc =
10428 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10429 X_GLvop_GenRenderbuffersEXT, cmdlen);
10430 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10431 (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
10432 UnlockDisplay(dpy);
10433 SyncHandle();
10434 }
10435 return;
10436 }
10437
10438 #define X_GLrop_GenerateMipmapEXT 4325
10439 void
10440 __indirect_glGenerateMipmapEXT(GLenum target)
10441 {
10442 __GLXcontext *const gc = __glXGetCurrentContext();
10443 const GLuint cmdlen = 8;
10444 emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
10445 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10446 gc->pc += cmdlen;
10447 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10448 (void) __glXFlushRenderBuffer(gc, gc->pc);
10449 }
10450 }
10451
10452 #define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
10453 void
10454 __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target,
10455 GLenum attachment,
10456 GLenum pname,
10457 GLint * params)
10458 {
10459 __GLXcontext *const gc = __glXGetCurrentContext();
10460 Display *const dpy = gc->currentDpy;
10461 const GLuint cmdlen = 12;
10462 if (__builtin_expect(dpy != NULL, 1)) {
10463 GLubyte const *pc =
10464 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10465 X_GLvop_GetFramebufferAttachmentParameterivEXT,
10466 cmdlen);
10467 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10468 (void) memcpy((void *) (pc + 4), (void *) (&attachment), 4);
10469 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
10470 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10471 UnlockDisplay(dpy);
10472 SyncHandle();
10473 }
10474 return;
10475 }
10476
10477 #define X_GLvop_GetRenderbufferParameterivEXT 1424
10478 void
10479 __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname,
10480 GLint * params)
10481 {
10482 __GLXcontext *const gc = __glXGetCurrentContext();
10483 Display *const dpy = gc->currentDpy;
10484 const GLuint cmdlen = 8;
10485 if (__builtin_expect(dpy != NULL, 1)) {
10486 GLubyte const *pc =
10487 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10488 X_GLvop_GetRenderbufferParameterivEXT,
10489 cmdlen);
10490 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10491 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
10492 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10493 UnlockDisplay(dpy);
10494 SyncHandle();
10495 }
10496 return;
10497 }
10498
10499 #define X_GLvop_IsFramebufferEXT 1425
10500 GLboolean
10501 __indirect_glIsFramebufferEXT(GLuint framebuffer)
10502 {
10503 __GLXcontext *const gc = __glXGetCurrentContext();
10504 Display *const dpy = gc->currentDpy;
10505 GLboolean retval = (GLboolean) 0;
10506 const GLuint cmdlen = 4;
10507 if (__builtin_expect(dpy != NULL, 1)) {
10508 GLubyte const *pc =
10509 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10510 X_GLvop_IsFramebufferEXT, cmdlen);
10511 (void) memcpy((void *) (pc + 0), (void *) (&framebuffer), 4);
10512 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10513 UnlockDisplay(dpy);
10514 SyncHandle();
10515 }
10516 return retval;
10517 }
10518
10519 #define X_GLvop_IsRenderbufferEXT 1422
10520 GLboolean
10521 __indirect_glIsRenderbufferEXT(GLuint renderbuffer)
10522 {
10523 __GLXcontext *const gc = __glXGetCurrentContext();
10524 Display *const dpy = gc->currentDpy;
10525 GLboolean retval = (GLboolean) 0;
10526 const GLuint cmdlen = 4;
10527 if (__builtin_expect(dpy != NULL, 1)) {
10528 GLubyte const *pc =
10529 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10530 X_GLvop_IsRenderbufferEXT, cmdlen);
10531 (void) memcpy((void *) (pc + 0), (void *) (&renderbuffer), 4);
10532 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10533 UnlockDisplay(dpy);
10534 SyncHandle();
10535 }
10536 return retval;
10537 }
10538
10539 #define X_GLrop_RenderbufferStorageEXT 4318
10540 void
10541 __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
10542 GLsizei width, GLsizei height)
10543 {
10544 __GLXcontext *const gc = __glXGetCurrentContext();
10545 const GLuint cmdlen = 20;
10546 emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
10547 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10548 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
10549 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
10550 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
10551 gc->pc += cmdlen;
10552 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10553 (void) __glXFlushRenderBuffer(gc, gc->pc);
10554 }
10555 }
10556
10557
10558 # undef FASTCALL
10559 # undef NOINLINE