gallium: Fix typo in define name.
[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 const GLuint cmdlen = 8;
304 if (__builtin_expect(dpy != NULL, 1)) {
305 #ifdef USE_XCB
306 xcb_connection_t *c = XGetXCBConnection(dpy);
307 (void) __glXFlushRenderBuffer(gc, gc->pc);
308 xcb_glx_new_list(c, gc->currentContextTag, list, mode);
309 #else
310 GLubyte const *pc =
311 __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
312 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
313 (void) memcpy((void *) (pc + 4), (void *) (&mode), 4);
314 UnlockDisplay(dpy);
315 SyncHandle();
316 #endif /* USE_XCB */
317 }
318 return;
319 }
320
321 #define X_GLsop_EndList 102
322 void
323 __indirect_glEndList(void)
324 {
325 __GLXcontext *const gc = __glXGetCurrentContext();
326 Display *const dpy = gc->currentDpy;
327 const GLuint cmdlen = 0;
328 if (__builtin_expect(dpy != NULL, 1)) {
329 #ifdef USE_XCB
330 xcb_connection_t *c = XGetXCBConnection(dpy);
331 (void) __glXFlushRenderBuffer(gc, gc->pc);
332 xcb_glx_end_list(c, gc->currentContextTag);
333 #else
334 (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
335 UnlockDisplay(dpy);
336 SyncHandle();
337 #endif /* USE_XCB */
338 }
339 return;
340 }
341
342 #define X_GLrop_CallList 1
343 void
344 __indirect_glCallList(GLuint list)
345 {
346 __GLXcontext *const gc = __glXGetCurrentContext();
347 const GLuint cmdlen = 8;
348 emit_header(gc->pc, X_GLrop_CallList, cmdlen);
349 (void) memcpy((void *) (gc->pc + 4), (void *) (&list), 4);
350 gc->pc += cmdlen;
351 if (__builtin_expect(gc->pc > gc->limit, 0)) {
352 (void) __glXFlushRenderBuffer(gc, gc->pc);
353 }
354 }
355
356 #define X_GLrop_CallLists 2
357 void
358 __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
359 {
360 __GLXcontext *const gc = __glXGetCurrentContext();
361 const GLuint compsize = __glCallLists_size(type);
362 const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
363 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
364 if (cmdlen <= gc->maxSmallRenderCommandSize) {
365 if ((gc->pc + cmdlen) > gc->bufEnd) {
366 (void) __glXFlushRenderBuffer(gc, gc->pc);
367 }
368 emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
369 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
370 (void) memcpy((void *) (gc->pc + 8), (void *) (&type), 4);
371 (void) memcpy((void *) (gc->pc + 12), (void *) (lists),
372 (compsize * n));
373 gc->pc += cmdlen;
374 if (__builtin_expect(gc->pc > gc->limit, 0)) {
375 (void) __glXFlushRenderBuffer(gc, gc->pc);
376 }
377 } else {
378 const GLint op = X_GLrop_CallLists;
379 const GLuint cmdlenLarge = cmdlen + 4;
380 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
381 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
382 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
383 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
384 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
385 __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
386 }
387 }
388 }
389
390 #define X_GLsop_DeleteLists 103
391 void
392 __indirect_glDeleteLists(GLuint list, GLsizei range)
393 {
394 __GLXcontext *const gc = __glXGetCurrentContext();
395 Display *const dpy = gc->currentDpy;
396 const GLuint cmdlen = 8;
397 if (__builtin_expect(dpy != NULL, 1)) {
398 #ifdef USE_XCB
399 xcb_connection_t *c = XGetXCBConnection(dpy);
400 (void) __glXFlushRenderBuffer(gc, gc->pc);
401 xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
402 #else
403 GLubyte const *pc =
404 __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
405 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
406 (void) memcpy((void *) (pc + 4), (void *) (&range), 4);
407 UnlockDisplay(dpy);
408 SyncHandle();
409 #endif /* USE_XCB */
410 }
411 return;
412 }
413
414 #define X_GLsop_GenLists 104
415 GLuint
416 __indirect_glGenLists(GLsizei range)
417 {
418 __GLXcontext *const gc = __glXGetCurrentContext();
419 Display *const dpy = gc->currentDpy;
420 GLuint retval = (GLuint) 0;
421 const GLuint cmdlen = 4;
422 if (__builtin_expect(dpy != NULL, 1)) {
423 #ifdef USE_XCB
424 xcb_connection_t *c = XGetXCBConnection(dpy);
425 (void) __glXFlushRenderBuffer(gc, gc->pc);
426 xcb_glx_gen_lists_reply_t *reply =
427 xcb_glx_gen_lists_reply(c,
428 xcb_glx_gen_lists(c,
429 gc->currentContextTag,
430 range), NULL);
431 retval = reply->ret_val;
432 free(reply);
433 #else
434 GLubyte const *pc =
435 __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
436 (void) memcpy((void *) (pc + 0), (void *) (&range), 4);
437 retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
438 UnlockDisplay(dpy);
439 SyncHandle();
440 #endif /* USE_XCB */
441 }
442 return retval;
443 }
444
445 #define X_GLrop_ListBase 3
446 void
447 __indirect_glListBase(GLuint base)
448 {
449 __GLXcontext *const gc = __glXGetCurrentContext();
450 const GLuint cmdlen = 8;
451 emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
452 (void) memcpy((void *) (gc->pc + 4), (void *) (&base), 4);
453 gc->pc += cmdlen;
454 if (__builtin_expect(gc->pc > gc->limit, 0)) {
455 (void) __glXFlushRenderBuffer(gc, gc->pc);
456 }
457 }
458
459 #define X_GLrop_Begin 4
460 void
461 __indirect_glBegin(GLenum mode)
462 {
463 __GLXcontext *const gc = __glXGetCurrentContext();
464 const GLuint cmdlen = 8;
465 emit_header(gc->pc, X_GLrop_Begin, cmdlen);
466 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
467 gc->pc += cmdlen;
468 if (__builtin_expect(gc->pc > gc->limit, 0)) {
469 (void) __glXFlushRenderBuffer(gc, gc->pc);
470 }
471 }
472
473 #define X_GLrop_Bitmap 5
474 void
475 __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
476 GLfloat yorig, GLfloat xmove, GLfloat ymove,
477 const GLubyte *bitmap)
478 {
479 __GLXcontext *const gc = __glXGetCurrentContext();
480 const GLuint compsize =
481 (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX,
482 GL_BITMAP, 0) : 0;
483 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
484 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
485 if (cmdlen <= gc->maxSmallRenderCommandSize) {
486 if ((gc->pc + cmdlen) > gc->bufEnd) {
487 (void) __glXFlushRenderBuffer(gc, gc->pc);
488 }
489 emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
490 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
491 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
492 (void) memcpy((void *) (gc->pc + 32), (void *) (&xorig), 4);
493 (void) memcpy((void *) (gc->pc + 36), (void *) (&yorig), 4);
494 (void) memcpy((void *) (gc->pc + 40), (void *) (&xmove), 4);
495 (void) memcpy((void *) (gc->pc + 44), (void *) (&ymove), 4);
496 if (compsize > 0) {
497 (*gc->fillImage) (gc, 2, width, height, 1, GL_COLOR_INDEX,
498 GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
499 } else {
500 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
501 default_pixel_store_2D_size);
502 }
503 gc->pc += cmdlen;
504 if (gc->pc > gc->limit) {
505 (void) __glXFlushRenderBuffer(gc, gc->pc);
506 }
507 } else {
508 const GLint op = X_GLrop_Bitmap;
509 const GLuint cmdlenLarge = cmdlen + 4;
510 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
511 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
512 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
513 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
514 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
515 (void) memcpy((void *) (pc + 36), (void *) (&xorig), 4);
516 (void) memcpy((void *) (pc + 40), (void *) (&yorig), 4);
517 (void) memcpy((void *) (pc + 44), (void *) (&xmove), 4);
518 (void) memcpy((void *) (pc + 48), (void *) (&ymove), 4);
519 __glXSendLargeImage(gc, compsize, 2, width, height, 1,
520 GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52,
521 pc + 8);
522 }
523 }
524 }
525
526 #define X_GLrop_Color3bv 6
527 void
528 __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
529 {
530 __GLXcontext *const gc = __glXGetCurrentContext();
531 const GLuint cmdlen = 8;
532 emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
533 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
534 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
535 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
536 gc->pc += cmdlen;
537 if (__builtin_expect(gc->pc > gc->limit, 0)) {
538 (void) __glXFlushRenderBuffer(gc, gc->pc);
539 }
540 }
541
542 #define X_GLrop_Color3bv 6
543 void
544 __indirect_glColor3bv(const GLbyte *v)
545 {
546 generic_3_byte(X_GLrop_Color3bv, v);
547 }
548
549 #define X_GLrop_Color3dv 7
550 void
551 __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
552 {
553 __GLXcontext *const gc = __glXGetCurrentContext();
554 const GLuint cmdlen = 28;
555 emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
556 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
557 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
558 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
559 gc->pc += cmdlen;
560 if (__builtin_expect(gc->pc > gc->limit, 0)) {
561 (void) __glXFlushRenderBuffer(gc, gc->pc);
562 }
563 }
564
565 #define X_GLrop_Color3dv 7
566 void
567 __indirect_glColor3dv(const GLdouble * v)
568 {
569 generic_24_byte(X_GLrop_Color3dv, v);
570 }
571
572 #define X_GLrop_Color3fv 8
573 void
574 __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
575 {
576 __GLXcontext *const gc = __glXGetCurrentContext();
577 const GLuint cmdlen = 16;
578 emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
579 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
580 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
581 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
582 gc->pc += cmdlen;
583 if (__builtin_expect(gc->pc > gc->limit, 0)) {
584 (void) __glXFlushRenderBuffer(gc, gc->pc);
585 }
586 }
587
588 #define X_GLrop_Color3fv 8
589 void
590 __indirect_glColor3fv(const GLfloat * v)
591 {
592 generic_12_byte(X_GLrop_Color3fv, v);
593 }
594
595 #define X_GLrop_Color3iv 9
596 void
597 __indirect_glColor3i(GLint red, GLint green, GLint blue)
598 {
599 __GLXcontext *const gc = __glXGetCurrentContext();
600 const GLuint cmdlen = 16;
601 emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
602 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
603 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
604 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
605 gc->pc += cmdlen;
606 if (__builtin_expect(gc->pc > gc->limit, 0)) {
607 (void) __glXFlushRenderBuffer(gc, gc->pc);
608 }
609 }
610
611 #define X_GLrop_Color3iv 9
612 void
613 __indirect_glColor3iv(const GLint * v)
614 {
615 generic_12_byte(X_GLrop_Color3iv, v);
616 }
617
618 #define X_GLrop_Color3sv 10
619 void
620 __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
621 {
622 __GLXcontext *const gc = __glXGetCurrentContext();
623 const GLuint cmdlen = 12;
624 emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
625 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
626 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
627 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
628 gc->pc += cmdlen;
629 if (__builtin_expect(gc->pc > gc->limit, 0)) {
630 (void) __glXFlushRenderBuffer(gc, gc->pc);
631 }
632 }
633
634 #define X_GLrop_Color3sv 10
635 void
636 __indirect_glColor3sv(const GLshort * v)
637 {
638 generic_6_byte(X_GLrop_Color3sv, v);
639 }
640
641 #define X_GLrop_Color3ubv 11
642 void
643 __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
644 {
645 __GLXcontext *const gc = __glXGetCurrentContext();
646 const GLuint cmdlen = 8;
647 emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
648 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
649 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
650 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
651 gc->pc += cmdlen;
652 if (__builtin_expect(gc->pc > gc->limit, 0)) {
653 (void) __glXFlushRenderBuffer(gc, gc->pc);
654 }
655 }
656
657 #define X_GLrop_Color3ubv 11
658 void
659 __indirect_glColor3ubv(const GLubyte *v)
660 {
661 generic_3_byte(X_GLrop_Color3ubv, v);
662 }
663
664 #define X_GLrop_Color3uiv 12
665 void
666 __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
667 {
668 __GLXcontext *const gc = __glXGetCurrentContext();
669 const GLuint cmdlen = 16;
670 emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
671 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
672 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
673 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
674 gc->pc += cmdlen;
675 if (__builtin_expect(gc->pc > gc->limit, 0)) {
676 (void) __glXFlushRenderBuffer(gc, gc->pc);
677 }
678 }
679
680 #define X_GLrop_Color3uiv 12
681 void
682 __indirect_glColor3uiv(const GLuint * v)
683 {
684 generic_12_byte(X_GLrop_Color3uiv, v);
685 }
686
687 #define X_GLrop_Color3usv 13
688 void
689 __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
690 {
691 __GLXcontext *const gc = __glXGetCurrentContext();
692 const GLuint cmdlen = 12;
693 emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
694 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
695 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
696 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
697 gc->pc += cmdlen;
698 if (__builtin_expect(gc->pc > gc->limit, 0)) {
699 (void) __glXFlushRenderBuffer(gc, gc->pc);
700 }
701 }
702
703 #define X_GLrop_Color3usv 13
704 void
705 __indirect_glColor3usv(const GLushort * v)
706 {
707 generic_6_byte(X_GLrop_Color3usv, v);
708 }
709
710 #define X_GLrop_Color4bv 14
711 void
712 __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
713 {
714 __GLXcontext *const gc = __glXGetCurrentContext();
715 const GLuint cmdlen = 8;
716 emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
717 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
718 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
719 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
720 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
721 gc->pc += cmdlen;
722 if (__builtin_expect(gc->pc > gc->limit, 0)) {
723 (void) __glXFlushRenderBuffer(gc, gc->pc);
724 }
725 }
726
727 #define X_GLrop_Color4bv 14
728 void
729 __indirect_glColor4bv(const GLbyte *v)
730 {
731 generic_4_byte(X_GLrop_Color4bv, v);
732 }
733
734 #define X_GLrop_Color4dv 15
735 void
736 __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue,
737 GLdouble alpha)
738 {
739 __GLXcontext *const gc = __glXGetCurrentContext();
740 const GLuint cmdlen = 36;
741 emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
742 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
743 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
744 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
745 (void) memcpy((void *) (gc->pc + 28), (void *) (&alpha), 8);
746 gc->pc += cmdlen;
747 if (__builtin_expect(gc->pc > gc->limit, 0)) {
748 (void) __glXFlushRenderBuffer(gc, gc->pc);
749 }
750 }
751
752 #define X_GLrop_Color4dv 15
753 void
754 __indirect_glColor4dv(const GLdouble * v)
755 {
756 generic_32_byte(X_GLrop_Color4dv, v);
757 }
758
759 #define X_GLrop_Color4fv 16
760 void
761 __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
762 {
763 __GLXcontext *const gc = __glXGetCurrentContext();
764 const GLuint cmdlen = 20;
765 emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
766 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
767 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
768 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
769 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
770 gc->pc += cmdlen;
771 if (__builtin_expect(gc->pc > gc->limit, 0)) {
772 (void) __glXFlushRenderBuffer(gc, gc->pc);
773 }
774 }
775
776 #define X_GLrop_Color4fv 16
777 void
778 __indirect_glColor4fv(const GLfloat * v)
779 {
780 generic_16_byte(X_GLrop_Color4fv, v);
781 }
782
783 #define X_GLrop_Color4iv 17
784 void
785 __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
786 {
787 __GLXcontext *const gc = __glXGetCurrentContext();
788 const GLuint cmdlen = 20;
789 emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
790 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
791 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
792 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
793 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
794 gc->pc += cmdlen;
795 if (__builtin_expect(gc->pc > gc->limit, 0)) {
796 (void) __glXFlushRenderBuffer(gc, gc->pc);
797 }
798 }
799
800 #define X_GLrop_Color4iv 17
801 void
802 __indirect_glColor4iv(const GLint * v)
803 {
804 generic_16_byte(X_GLrop_Color4iv, v);
805 }
806
807 #define X_GLrop_Color4sv 18
808 void
809 __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
810 {
811 __GLXcontext *const gc = __glXGetCurrentContext();
812 const GLuint cmdlen = 12;
813 emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
814 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
815 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
816 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
817 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
818 gc->pc += cmdlen;
819 if (__builtin_expect(gc->pc > gc->limit, 0)) {
820 (void) __glXFlushRenderBuffer(gc, gc->pc);
821 }
822 }
823
824 #define X_GLrop_Color4sv 18
825 void
826 __indirect_glColor4sv(const GLshort * v)
827 {
828 generic_8_byte(X_GLrop_Color4sv, v);
829 }
830
831 #define X_GLrop_Color4ubv 19
832 void
833 __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
834 {
835 __GLXcontext *const gc = __glXGetCurrentContext();
836 const GLuint cmdlen = 8;
837 emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
838 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
839 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
840 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
841 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
842 gc->pc += cmdlen;
843 if (__builtin_expect(gc->pc > gc->limit, 0)) {
844 (void) __glXFlushRenderBuffer(gc, gc->pc);
845 }
846 }
847
848 #define X_GLrop_Color4ubv 19
849 void
850 __indirect_glColor4ubv(const GLubyte *v)
851 {
852 generic_4_byte(X_GLrop_Color4ubv, v);
853 }
854
855 #define X_GLrop_Color4uiv 20
856 void
857 __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
858 {
859 __GLXcontext *const gc = __glXGetCurrentContext();
860 const GLuint cmdlen = 20;
861 emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
862 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
863 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
864 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
865 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
866 gc->pc += cmdlen;
867 if (__builtin_expect(gc->pc > gc->limit, 0)) {
868 (void) __glXFlushRenderBuffer(gc, gc->pc);
869 }
870 }
871
872 #define X_GLrop_Color4uiv 20
873 void
874 __indirect_glColor4uiv(const GLuint * v)
875 {
876 generic_16_byte(X_GLrop_Color4uiv, v);
877 }
878
879 #define X_GLrop_Color4usv 21
880 void
881 __indirect_glColor4us(GLushort red, GLushort green, GLushort blue,
882 GLushort alpha)
883 {
884 __GLXcontext *const gc = __glXGetCurrentContext();
885 const GLuint cmdlen = 12;
886 emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
887 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
888 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
889 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
890 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
891 gc->pc += cmdlen;
892 if (__builtin_expect(gc->pc > gc->limit, 0)) {
893 (void) __glXFlushRenderBuffer(gc, gc->pc);
894 }
895 }
896
897 #define X_GLrop_Color4usv 21
898 void
899 __indirect_glColor4usv(const GLushort * v)
900 {
901 generic_8_byte(X_GLrop_Color4usv, v);
902 }
903
904 #define X_GLrop_EdgeFlagv 22
905 void
906 __indirect_glEdgeFlag(GLboolean flag)
907 {
908 __GLXcontext *const gc = __glXGetCurrentContext();
909 const GLuint cmdlen = 8;
910 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
911 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
912 gc->pc += cmdlen;
913 if (__builtin_expect(gc->pc > gc->limit, 0)) {
914 (void) __glXFlushRenderBuffer(gc, gc->pc);
915 }
916 }
917
918 #define X_GLrop_EdgeFlagv 22
919 void
920 __indirect_glEdgeFlagv(const GLboolean * flag)
921 {
922 __GLXcontext *const gc = __glXGetCurrentContext();
923 const GLuint cmdlen = 8;
924 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
925 (void) memcpy((void *) (gc->pc + 4), (void *) (flag), 1);
926 gc->pc += cmdlen;
927 if (__builtin_expect(gc->pc > gc->limit, 0)) {
928 (void) __glXFlushRenderBuffer(gc, gc->pc);
929 }
930 }
931
932 #define X_GLrop_End 23
933 void
934 __indirect_glEnd(void)
935 {
936 __GLXcontext *const gc = __glXGetCurrentContext();
937 const GLuint cmdlen = 4;
938 emit_header(gc->pc, X_GLrop_End, cmdlen);
939 gc->pc += cmdlen;
940 if (__builtin_expect(gc->pc > gc->limit, 0)) {
941 (void) __glXFlushRenderBuffer(gc, gc->pc);
942 }
943 }
944
945 #define X_GLrop_Indexdv 24
946 void
947 __indirect_glIndexd(GLdouble c)
948 {
949 __GLXcontext *const gc = __glXGetCurrentContext();
950 const GLuint cmdlen = 12;
951 emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
952 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 8);
953 gc->pc += cmdlen;
954 if (__builtin_expect(gc->pc > gc->limit, 0)) {
955 (void) __glXFlushRenderBuffer(gc, gc->pc);
956 }
957 }
958
959 #define X_GLrop_Indexdv 24
960 void
961 __indirect_glIndexdv(const GLdouble * c)
962 {
963 generic_8_byte(X_GLrop_Indexdv, c);
964 }
965
966 #define X_GLrop_Indexfv 25
967 void
968 __indirect_glIndexf(GLfloat c)
969 {
970 __GLXcontext *const gc = __glXGetCurrentContext();
971 const GLuint cmdlen = 8;
972 emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
973 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
974 gc->pc += cmdlen;
975 if (__builtin_expect(gc->pc > gc->limit, 0)) {
976 (void) __glXFlushRenderBuffer(gc, gc->pc);
977 }
978 }
979
980 #define X_GLrop_Indexfv 25
981 void
982 __indirect_glIndexfv(const GLfloat * c)
983 {
984 generic_4_byte(X_GLrop_Indexfv, c);
985 }
986
987 #define X_GLrop_Indexiv 26
988 void
989 __indirect_glIndexi(GLint c)
990 {
991 __GLXcontext *const gc = __glXGetCurrentContext();
992 const GLuint cmdlen = 8;
993 emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
994 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
995 gc->pc += cmdlen;
996 if (__builtin_expect(gc->pc > gc->limit, 0)) {
997 (void) __glXFlushRenderBuffer(gc, gc->pc);
998 }
999 }
1000
1001 #define X_GLrop_Indexiv 26
1002 void
1003 __indirect_glIndexiv(const GLint * c)
1004 {
1005 generic_4_byte(X_GLrop_Indexiv, c);
1006 }
1007
1008 #define X_GLrop_Indexsv 27
1009 void
1010 __indirect_glIndexs(GLshort c)
1011 {
1012 __GLXcontext *const gc = __glXGetCurrentContext();
1013 const GLuint cmdlen = 8;
1014 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1015 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 2);
1016 gc->pc += cmdlen;
1017 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1018 (void) __glXFlushRenderBuffer(gc, gc->pc);
1019 }
1020 }
1021
1022 #define X_GLrop_Indexsv 27
1023 void
1024 __indirect_glIndexsv(const GLshort * c)
1025 {
1026 __GLXcontext *const gc = __glXGetCurrentContext();
1027 const GLuint cmdlen = 8;
1028 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1029 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 2);
1030 gc->pc += cmdlen;
1031 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1032 (void) __glXFlushRenderBuffer(gc, gc->pc);
1033 }
1034 }
1035
1036 #define X_GLrop_Normal3bv 28
1037 void
1038 __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
1039 {
1040 __GLXcontext *const gc = __glXGetCurrentContext();
1041 const GLuint cmdlen = 8;
1042 emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
1043 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 1);
1044 (void) memcpy((void *) (gc->pc + 5), (void *) (&ny), 1);
1045 (void) memcpy((void *) (gc->pc + 6), (void *) (&nz), 1);
1046 gc->pc += cmdlen;
1047 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1048 (void) __glXFlushRenderBuffer(gc, gc->pc);
1049 }
1050 }
1051
1052 #define X_GLrop_Normal3bv 28
1053 void
1054 __indirect_glNormal3bv(const GLbyte *v)
1055 {
1056 generic_3_byte(X_GLrop_Normal3bv, v);
1057 }
1058
1059 #define X_GLrop_Normal3dv 29
1060 void
1061 __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
1062 {
1063 __GLXcontext *const gc = __glXGetCurrentContext();
1064 const GLuint cmdlen = 28;
1065 emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
1066 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 8);
1067 (void) memcpy((void *) (gc->pc + 12), (void *) (&ny), 8);
1068 (void) memcpy((void *) (gc->pc + 20), (void *) (&nz), 8);
1069 gc->pc += cmdlen;
1070 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1071 (void) __glXFlushRenderBuffer(gc, gc->pc);
1072 }
1073 }
1074
1075 #define X_GLrop_Normal3dv 29
1076 void
1077 __indirect_glNormal3dv(const GLdouble * v)
1078 {
1079 generic_24_byte(X_GLrop_Normal3dv, v);
1080 }
1081
1082 #define X_GLrop_Normal3fv 30
1083 void
1084 __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1085 {
1086 __GLXcontext *const gc = __glXGetCurrentContext();
1087 const GLuint cmdlen = 16;
1088 emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
1089 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1090 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1091 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1092 gc->pc += cmdlen;
1093 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1094 (void) __glXFlushRenderBuffer(gc, gc->pc);
1095 }
1096 }
1097
1098 #define X_GLrop_Normal3fv 30
1099 void
1100 __indirect_glNormal3fv(const GLfloat * v)
1101 {
1102 generic_12_byte(X_GLrop_Normal3fv, v);
1103 }
1104
1105 #define X_GLrop_Normal3iv 31
1106 void
1107 __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
1108 {
1109 __GLXcontext *const gc = __glXGetCurrentContext();
1110 const GLuint cmdlen = 16;
1111 emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
1112 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1113 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1114 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1115 gc->pc += cmdlen;
1116 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1117 (void) __glXFlushRenderBuffer(gc, gc->pc);
1118 }
1119 }
1120
1121 #define X_GLrop_Normal3iv 31
1122 void
1123 __indirect_glNormal3iv(const GLint * v)
1124 {
1125 generic_12_byte(X_GLrop_Normal3iv, v);
1126 }
1127
1128 #define X_GLrop_Normal3sv 32
1129 void
1130 __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
1131 {
1132 __GLXcontext *const gc = __glXGetCurrentContext();
1133 const GLuint cmdlen = 12;
1134 emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
1135 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 2);
1136 (void) memcpy((void *) (gc->pc + 6), (void *) (&ny), 2);
1137 (void) memcpy((void *) (gc->pc + 8), (void *) (&nz), 2);
1138 gc->pc += cmdlen;
1139 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1140 (void) __glXFlushRenderBuffer(gc, gc->pc);
1141 }
1142 }
1143
1144 #define X_GLrop_Normal3sv 32
1145 void
1146 __indirect_glNormal3sv(const GLshort * v)
1147 {
1148 generic_6_byte(X_GLrop_Normal3sv, v);
1149 }
1150
1151 #define X_GLrop_RasterPos2dv 33
1152 void
1153 __indirect_glRasterPos2d(GLdouble x, GLdouble y)
1154 {
1155 __GLXcontext *const gc = __glXGetCurrentContext();
1156 const GLuint cmdlen = 20;
1157 emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
1158 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1159 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1160 gc->pc += cmdlen;
1161 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1162 (void) __glXFlushRenderBuffer(gc, gc->pc);
1163 }
1164 }
1165
1166 #define X_GLrop_RasterPos2dv 33
1167 void
1168 __indirect_glRasterPos2dv(const GLdouble * v)
1169 {
1170 generic_16_byte(X_GLrop_RasterPos2dv, v);
1171 }
1172
1173 #define X_GLrop_RasterPos2fv 34
1174 void
1175 __indirect_glRasterPos2f(GLfloat x, GLfloat y)
1176 {
1177 __GLXcontext *const gc = __glXGetCurrentContext();
1178 const GLuint cmdlen = 12;
1179 emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
1180 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1181 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1182 gc->pc += cmdlen;
1183 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1184 (void) __glXFlushRenderBuffer(gc, gc->pc);
1185 }
1186 }
1187
1188 #define X_GLrop_RasterPos2fv 34
1189 void
1190 __indirect_glRasterPos2fv(const GLfloat * v)
1191 {
1192 generic_8_byte(X_GLrop_RasterPos2fv, v);
1193 }
1194
1195 #define X_GLrop_RasterPos2iv 35
1196 void
1197 __indirect_glRasterPos2i(GLint x, GLint y)
1198 {
1199 __GLXcontext *const gc = __glXGetCurrentContext();
1200 const GLuint cmdlen = 12;
1201 emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
1202 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1203 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1204 gc->pc += cmdlen;
1205 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1206 (void) __glXFlushRenderBuffer(gc, gc->pc);
1207 }
1208 }
1209
1210 #define X_GLrop_RasterPos2iv 35
1211 void
1212 __indirect_glRasterPos2iv(const GLint * v)
1213 {
1214 generic_8_byte(X_GLrop_RasterPos2iv, v);
1215 }
1216
1217 #define X_GLrop_RasterPos2sv 36
1218 void
1219 __indirect_glRasterPos2s(GLshort x, GLshort y)
1220 {
1221 __GLXcontext *const gc = __glXGetCurrentContext();
1222 const GLuint cmdlen = 8;
1223 emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
1224 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1225 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1226 gc->pc += cmdlen;
1227 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1228 (void) __glXFlushRenderBuffer(gc, gc->pc);
1229 }
1230 }
1231
1232 #define X_GLrop_RasterPos2sv 36
1233 void
1234 __indirect_glRasterPos2sv(const GLshort * v)
1235 {
1236 generic_4_byte(X_GLrop_RasterPos2sv, v);
1237 }
1238
1239 #define X_GLrop_RasterPos3dv 37
1240 void
1241 __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
1242 {
1243 __GLXcontext *const gc = __glXGetCurrentContext();
1244 const GLuint cmdlen = 28;
1245 emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
1246 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1247 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1248 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1249 gc->pc += cmdlen;
1250 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1251 (void) __glXFlushRenderBuffer(gc, gc->pc);
1252 }
1253 }
1254
1255 #define X_GLrop_RasterPos3dv 37
1256 void
1257 __indirect_glRasterPos3dv(const GLdouble * v)
1258 {
1259 generic_24_byte(X_GLrop_RasterPos3dv, v);
1260 }
1261
1262 #define X_GLrop_RasterPos3fv 38
1263 void
1264 __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
1265 {
1266 __GLXcontext *const gc = __glXGetCurrentContext();
1267 const GLuint cmdlen = 16;
1268 emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
1269 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1270 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1271 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1272 gc->pc += cmdlen;
1273 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1274 (void) __glXFlushRenderBuffer(gc, gc->pc);
1275 }
1276 }
1277
1278 #define X_GLrop_RasterPos3fv 38
1279 void
1280 __indirect_glRasterPos3fv(const GLfloat * v)
1281 {
1282 generic_12_byte(X_GLrop_RasterPos3fv, v);
1283 }
1284
1285 #define X_GLrop_RasterPos3iv 39
1286 void
1287 __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
1288 {
1289 __GLXcontext *const gc = __glXGetCurrentContext();
1290 const GLuint cmdlen = 16;
1291 emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
1292 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1293 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1294 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1295 gc->pc += cmdlen;
1296 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1297 (void) __glXFlushRenderBuffer(gc, gc->pc);
1298 }
1299 }
1300
1301 #define X_GLrop_RasterPos3iv 39
1302 void
1303 __indirect_glRasterPos3iv(const GLint * v)
1304 {
1305 generic_12_byte(X_GLrop_RasterPos3iv, v);
1306 }
1307
1308 #define X_GLrop_RasterPos3sv 40
1309 void
1310 __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
1311 {
1312 __GLXcontext *const gc = __glXGetCurrentContext();
1313 const GLuint cmdlen = 12;
1314 emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
1315 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1316 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1317 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1318 gc->pc += cmdlen;
1319 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1320 (void) __glXFlushRenderBuffer(gc, gc->pc);
1321 }
1322 }
1323
1324 #define X_GLrop_RasterPos3sv 40
1325 void
1326 __indirect_glRasterPos3sv(const GLshort * v)
1327 {
1328 generic_6_byte(X_GLrop_RasterPos3sv, v);
1329 }
1330
1331 #define X_GLrop_RasterPos4dv 41
1332 void
1333 __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1334 {
1335 __GLXcontext *const gc = __glXGetCurrentContext();
1336 const GLuint cmdlen = 36;
1337 emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
1338 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1339 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1340 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1341 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
1342 gc->pc += cmdlen;
1343 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1344 (void) __glXFlushRenderBuffer(gc, gc->pc);
1345 }
1346 }
1347
1348 #define X_GLrop_RasterPos4dv 41
1349 void
1350 __indirect_glRasterPos4dv(const GLdouble * v)
1351 {
1352 generic_32_byte(X_GLrop_RasterPos4dv, v);
1353 }
1354
1355 #define X_GLrop_RasterPos4fv 42
1356 void
1357 __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1358 {
1359 __GLXcontext *const gc = __glXGetCurrentContext();
1360 const GLuint cmdlen = 20;
1361 emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
1362 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1363 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1364 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1365 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1366 gc->pc += cmdlen;
1367 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1368 (void) __glXFlushRenderBuffer(gc, gc->pc);
1369 }
1370 }
1371
1372 #define X_GLrop_RasterPos4fv 42
1373 void
1374 __indirect_glRasterPos4fv(const GLfloat * v)
1375 {
1376 generic_16_byte(X_GLrop_RasterPos4fv, v);
1377 }
1378
1379 #define X_GLrop_RasterPos4iv 43
1380 void
1381 __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
1382 {
1383 __GLXcontext *const gc = __glXGetCurrentContext();
1384 const GLuint cmdlen = 20;
1385 emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
1386 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1387 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1388 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1389 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1390 gc->pc += cmdlen;
1391 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1392 (void) __glXFlushRenderBuffer(gc, gc->pc);
1393 }
1394 }
1395
1396 #define X_GLrop_RasterPos4iv 43
1397 void
1398 __indirect_glRasterPos4iv(const GLint * v)
1399 {
1400 generic_16_byte(X_GLrop_RasterPos4iv, v);
1401 }
1402
1403 #define X_GLrop_RasterPos4sv 44
1404 void
1405 __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
1406 {
1407 __GLXcontext *const gc = __glXGetCurrentContext();
1408 const GLuint cmdlen = 12;
1409 emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
1410 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1411 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1412 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1413 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
1414 gc->pc += cmdlen;
1415 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1416 (void) __glXFlushRenderBuffer(gc, gc->pc);
1417 }
1418 }
1419
1420 #define X_GLrop_RasterPos4sv 44
1421 void
1422 __indirect_glRasterPos4sv(const GLshort * v)
1423 {
1424 generic_8_byte(X_GLrop_RasterPos4sv, v);
1425 }
1426
1427 #define X_GLrop_Rectdv 45
1428 void
1429 __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1430 {
1431 __GLXcontext *const gc = __glXGetCurrentContext();
1432 const GLuint cmdlen = 36;
1433 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1434 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 8);
1435 (void) memcpy((void *) (gc->pc + 12), (void *) (&y1), 8);
1436 (void) memcpy((void *) (gc->pc + 20), (void *) (&x2), 8);
1437 (void) memcpy((void *) (gc->pc + 28), (void *) (&y2), 8);
1438 gc->pc += cmdlen;
1439 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1440 (void) __glXFlushRenderBuffer(gc, gc->pc);
1441 }
1442 }
1443
1444 #define X_GLrop_Rectdv 45
1445 void
1446 __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
1447 {
1448 __GLXcontext *const gc = __glXGetCurrentContext();
1449 const GLuint cmdlen = 36;
1450 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1451 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 16);
1452 (void) memcpy((void *) (gc->pc + 20), (void *) (v2), 16);
1453 gc->pc += cmdlen;
1454 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1455 (void) __glXFlushRenderBuffer(gc, gc->pc);
1456 }
1457 }
1458
1459 #define X_GLrop_Rectfv 46
1460 void
1461 __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
1462 {
1463 __GLXcontext *const gc = __glXGetCurrentContext();
1464 const GLuint cmdlen = 20;
1465 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1466 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1467 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1468 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1469 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1470 gc->pc += cmdlen;
1471 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1472 (void) __glXFlushRenderBuffer(gc, gc->pc);
1473 }
1474 }
1475
1476 #define X_GLrop_Rectfv 46
1477 void
1478 __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
1479 {
1480 __GLXcontext *const gc = __glXGetCurrentContext();
1481 const GLuint cmdlen = 20;
1482 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1483 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1484 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1485 gc->pc += cmdlen;
1486 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1487 (void) __glXFlushRenderBuffer(gc, gc->pc);
1488 }
1489 }
1490
1491 #define X_GLrop_Rectiv 47
1492 void
1493 __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
1494 {
1495 __GLXcontext *const gc = __glXGetCurrentContext();
1496 const GLuint cmdlen = 20;
1497 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1498 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1499 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1500 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1501 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1502 gc->pc += cmdlen;
1503 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1504 (void) __glXFlushRenderBuffer(gc, gc->pc);
1505 }
1506 }
1507
1508 #define X_GLrop_Rectiv 47
1509 void
1510 __indirect_glRectiv(const GLint * v1, const GLint * v2)
1511 {
1512 __GLXcontext *const gc = __glXGetCurrentContext();
1513 const GLuint cmdlen = 20;
1514 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1515 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1516 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1517 gc->pc += cmdlen;
1518 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1519 (void) __glXFlushRenderBuffer(gc, gc->pc);
1520 }
1521 }
1522
1523 #define X_GLrop_Rectsv 48
1524 void
1525 __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1526 {
1527 __GLXcontext *const gc = __glXGetCurrentContext();
1528 const GLuint cmdlen = 12;
1529 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1530 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 2);
1531 (void) memcpy((void *) (gc->pc + 6), (void *) (&y1), 2);
1532 (void) memcpy((void *) (gc->pc + 8), (void *) (&x2), 2);
1533 (void) memcpy((void *) (gc->pc + 10), (void *) (&y2), 2);
1534 gc->pc += cmdlen;
1535 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1536 (void) __glXFlushRenderBuffer(gc, gc->pc);
1537 }
1538 }
1539
1540 #define X_GLrop_Rectsv 48
1541 void
1542 __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
1543 {
1544 __GLXcontext *const gc = __glXGetCurrentContext();
1545 const GLuint cmdlen = 12;
1546 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1547 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 4);
1548 (void) memcpy((void *) (gc->pc + 8), (void *) (v2), 4);
1549 gc->pc += cmdlen;
1550 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1551 (void) __glXFlushRenderBuffer(gc, gc->pc);
1552 }
1553 }
1554
1555 #define X_GLrop_TexCoord1dv 49
1556 void
1557 __indirect_glTexCoord1d(GLdouble s)
1558 {
1559 __GLXcontext *const gc = __glXGetCurrentContext();
1560 const GLuint cmdlen = 12;
1561 emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
1562 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1563 gc->pc += cmdlen;
1564 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1565 (void) __glXFlushRenderBuffer(gc, gc->pc);
1566 }
1567 }
1568
1569 #define X_GLrop_TexCoord1dv 49
1570 void
1571 __indirect_glTexCoord1dv(const GLdouble * v)
1572 {
1573 generic_8_byte(X_GLrop_TexCoord1dv, v);
1574 }
1575
1576 #define X_GLrop_TexCoord1fv 50
1577 void
1578 __indirect_glTexCoord1f(GLfloat s)
1579 {
1580 __GLXcontext *const gc = __glXGetCurrentContext();
1581 const GLuint cmdlen = 8;
1582 emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
1583 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1584 gc->pc += cmdlen;
1585 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1586 (void) __glXFlushRenderBuffer(gc, gc->pc);
1587 }
1588 }
1589
1590 #define X_GLrop_TexCoord1fv 50
1591 void
1592 __indirect_glTexCoord1fv(const GLfloat * v)
1593 {
1594 generic_4_byte(X_GLrop_TexCoord1fv, v);
1595 }
1596
1597 #define X_GLrop_TexCoord1iv 51
1598 void
1599 __indirect_glTexCoord1i(GLint s)
1600 {
1601 __GLXcontext *const gc = __glXGetCurrentContext();
1602 const GLuint cmdlen = 8;
1603 emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
1604 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1605 gc->pc += cmdlen;
1606 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1607 (void) __glXFlushRenderBuffer(gc, gc->pc);
1608 }
1609 }
1610
1611 #define X_GLrop_TexCoord1iv 51
1612 void
1613 __indirect_glTexCoord1iv(const GLint * v)
1614 {
1615 generic_4_byte(X_GLrop_TexCoord1iv, v);
1616 }
1617
1618 #define X_GLrop_TexCoord1sv 52
1619 void
1620 __indirect_glTexCoord1s(GLshort s)
1621 {
1622 __GLXcontext *const gc = __glXGetCurrentContext();
1623 const GLuint cmdlen = 8;
1624 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1625 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1626 gc->pc += cmdlen;
1627 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1628 (void) __glXFlushRenderBuffer(gc, gc->pc);
1629 }
1630 }
1631
1632 #define X_GLrop_TexCoord1sv 52
1633 void
1634 __indirect_glTexCoord1sv(const GLshort * v)
1635 {
1636 __GLXcontext *const gc = __glXGetCurrentContext();
1637 const GLuint cmdlen = 8;
1638 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1639 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 2);
1640 gc->pc += cmdlen;
1641 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1642 (void) __glXFlushRenderBuffer(gc, gc->pc);
1643 }
1644 }
1645
1646 #define X_GLrop_TexCoord2dv 53
1647 void
1648 __indirect_glTexCoord2d(GLdouble s, GLdouble t)
1649 {
1650 __GLXcontext *const gc = __glXGetCurrentContext();
1651 const GLuint cmdlen = 20;
1652 emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
1653 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1654 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1655 gc->pc += cmdlen;
1656 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1657 (void) __glXFlushRenderBuffer(gc, gc->pc);
1658 }
1659 }
1660
1661 #define X_GLrop_TexCoord2dv 53
1662 void
1663 __indirect_glTexCoord2dv(const GLdouble * v)
1664 {
1665 generic_16_byte(X_GLrop_TexCoord2dv, v);
1666 }
1667
1668 #define X_GLrop_TexCoord2fv 54
1669 void
1670 __indirect_glTexCoord2f(GLfloat s, GLfloat t)
1671 {
1672 __GLXcontext *const gc = __glXGetCurrentContext();
1673 const GLuint cmdlen = 12;
1674 emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
1675 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1676 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1677 gc->pc += cmdlen;
1678 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1679 (void) __glXFlushRenderBuffer(gc, gc->pc);
1680 }
1681 }
1682
1683 #define X_GLrop_TexCoord2fv 54
1684 void
1685 __indirect_glTexCoord2fv(const GLfloat * v)
1686 {
1687 generic_8_byte(X_GLrop_TexCoord2fv, v);
1688 }
1689
1690 #define X_GLrop_TexCoord2iv 55
1691 void
1692 __indirect_glTexCoord2i(GLint s, GLint t)
1693 {
1694 __GLXcontext *const gc = __glXGetCurrentContext();
1695 const GLuint cmdlen = 12;
1696 emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
1697 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1698 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1699 gc->pc += cmdlen;
1700 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1701 (void) __glXFlushRenderBuffer(gc, gc->pc);
1702 }
1703 }
1704
1705 #define X_GLrop_TexCoord2iv 55
1706 void
1707 __indirect_glTexCoord2iv(const GLint * v)
1708 {
1709 generic_8_byte(X_GLrop_TexCoord2iv, v);
1710 }
1711
1712 #define X_GLrop_TexCoord2sv 56
1713 void
1714 __indirect_glTexCoord2s(GLshort s, GLshort t)
1715 {
1716 __GLXcontext *const gc = __glXGetCurrentContext();
1717 const GLuint cmdlen = 8;
1718 emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
1719 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1720 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1721 gc->pc += cmdlen;
1722 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1723 (void) __glXFlushRenderBuffer(gc, gc->pc);
1724 }
1725 }
1726
1727 #define X_GLrop_TexCoord2sv 56
1728 void
1729 __indirect_glTexCoord2sv(const GLshort * v)
1730 {
1731 generic_4_byte(X_GLrop_TexCoord2sv, v);
1732 }
1733
1734 #define X_GLrop_TexCoord3dv 57
1735 void
1736 __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
1737 {
1738 __GLXcontext *const gc = __glXGetCurrentContext();
1739 const GLuint cmdlen = 28;
1740 emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
1741 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1742 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1743 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1744 gc->pc += cmdlen;
1745 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1746 (void) __glXFlushRenderBuffer(gc, gc->pc);
1747 }
1748 }
1749
1750 #define X_GLrop_TexCoord3dv 57
1751 void
1752 __indirect_glTexCoord3dv(const GLdouble * v)
1753 {
1754 generic_24_byte(X_GLrop_TexCoord3dv, v);
1755 }
1756
1757 #define X_GLrop_TexCoord3fv 58
1758 void
1759 __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
1760 {
1761 __GLXcontext *const gc = __glXGetCurrentContext();
1762 const GLuint cmdlen = 16;
1763 emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
1764 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1765 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1766 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1767 gc->pc += cmdlen;
1768 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1769 (void) __glXFlushRenderBuffer(gc, gc->pc);
1770 }
1771 }
1772
1773 #define X_GLrop_TexCoord3fv 58
1774 void
1775 __indirect_glTexCoord3fv(const GLfloat * v)
1776 {
1777 generic_12_byte(X_GLrop_TexCoord3fv, v);
1778 }
1779
1780 #define X_GLrop_TexCoord3iv 59
1781 void
1782 __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
1783 {
1784 __GLXcontext *const gc = __glXGetCurrentContext();
1785 const GLuint cmdlen = 16;
1786 emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
1787 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1788 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1789 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1790 gc->pc += cmdlen;
1791 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1792 (void) __glXFlushRenderBuffer(gc, gc->pc);
1793 }
1794 }
1795
1796 #define X_GLrop_TexCoord3iv 59
1797 void
1798 __indirect_glTexCoord3iv(const GLint * v)
1799 {
1800 generic_12_byte(X_GLrop_TexCoord3iv, v);
1801 }
1802
1803 #define X_GLrop_TexCoord3sv 60
1804 void
1805 __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
1806 {
1807 __GLXcontext *const gc = __glXGetCurrentContext();
1808 const GLuint cmdlen = 12;
1809 emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
1810 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1811 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1812 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1813 gc->pc += cmdlen;
1814 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1815 (void) __glXFlushRenderBuffer(gc, gc->pc);
1816 }
1817 }
1818
1819 #define X_GLrop_TexCoord3sv 60
1820 void
1821 __indirect_glTexCoord3sv(const GLshort * v)
1822 {
1823 generic_6_byte(X_GLrop_TexCoord3sv, v);
1824 }
1825
1826 #define X_GLrop_TexCoord4dv 61
1827 void
1828 __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1829 {
1830 __GLXcontext *const gc = __glXGetCurrentContext();
1831 const GLuint cmdlen = 36;
1832 emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
1833 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1834 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1835 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1836 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
1837 gc->pc += cmdlen;
1838 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1839 (void) __glXFlushRenderBuffer(gc, gc->pc);
1840 }
1841 }
1842
1843 #define X_GLrop_TexCoord4dv 61
1844 void
1845 __indirect_glTexCoord4dv(const GLdouble * v)
1846 {
1847 generic_32_byte(X_GLrop_TexCoord4dv, v);
1848 }
1849
1850 #define X_GLrop_TexCoord4fv 62
1851 void
1852 __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1853 {
1854 __GLXcontext *const gc = __glXGetCurrentContext();
1855 const GLuint cmdlen = 20;
1856 emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
1857 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1858 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1859 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1860 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1861 gc->pc += cmdlen;
1862 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1863 (void) __glXFlushRenderBuffer(gc, gc->pc);
1864 }
1865 }
1866
1867 #define X_GLrop_TexCoord4fv 62
1868 void
1869 __indirect_glTexCoord4fv(const GLfloat * v)
1870 {
1871 generic_16_byte(X_GLrop_TexCoord4fv, v);
1872 }
1873
1874 #define X_GLrop_TexCoord4iv 63
1875 void
1876 __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
1877 {
1878 __GLXcontext *const gc = __glXGetCurrentContext();
1879 const GLuint cmdlen = 20;
1880 emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
1881 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1882 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1883 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1884 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1885 gc->pc += cmdlen;
1886 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1887 (void) __glXFlushRenderBuffer(gc, gc->pc);
1888 }
1889 }
1890
1891 #define X_GLrop_TexCoord4iv 63
1892 void
1893 __indirect_glTexCoord4iv(const GLint * v)
1894 {
1895 generic_16_byte(X_GLrop_TexCoord4iv, v);
1896 }
1897
1898 #define X_GLrop_TexCoord4sv 64
1899 void
1900 __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
1901 {
1902 __GLXcontext *const gc = __glXGetCurrentContext();
1903 const GLuint cmdlen = 12;
1904 emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
1905 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1906 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1907 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1908 (void) memcpy((void *) (gc->pc + 10), (void *) (&q), 2);
1909 gc->pc += cmdlen;
1910 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1911 (void) __glXFlushRenderBuffer(gc, gc->pc);
1912 }
1913 }
1914
1915 #define X_GLrop_TexCoord4sv 64
1916 void
1917 __indirect_glTexCoord4sv(const GLshort * v)
1918 {
1919 generic_8_byte(X_GLrop_TexCoord4sv, v);
1920 }
1921
1922 #define X_GLrop_Vertex2dv 65
1923 void
1924 __indirect_glVertex2d(GLdouble x, GLdouble y)
1925 {
1926 __GLXcontext *const gc = __glXGetCurrentContext();
1927 const GLuint cmdlen = 20;
1928 emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
1929 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1930 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1931 gc->pc += cmdlen;
1932 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1933 (void) __glXFlushRenderBuffer(gc, gc->pc);
1934 }
1935 }
1936
1937 #define X_GLrop_Vertex2dv 65
1938 void
1939 __indirect_glVertex2dv(const GLdouble * v)
1940 {
1941 generic_16_byte(X_GLrop_Vertex2dv, v);
1942 }
1943
1944 #define X_GLrop_Vertex2fv 66
1945 void
1946 __indirect_glVertex2f(GLfloat x, GLfloat y)
1947 {
1948 __GLXcontext *const gc = __glXGetCurrentContext();
1949 const GLuint cmdlen = 12;
1950 emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
1951 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1952 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1953 gc->pc += cmdlen;
1954 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1955 (void) __glXFlushRenderBuffer(gc, gc->pc);
1956 }
1957 }
1958
1959 #define X_GLrop_Vertex2fv 66
1960 void
1961 __indirect_glVertex2fv(const GLfloat * v)
1962 {
1963 generic_8_byte(X_GLrop_Vertex2fv, v);
1964 }
1965
1966 #define X_GLrop_Vertex2iv 67
1967 void
1968 __indirect_glVertex2i(GLint x, GLint y)
1969 {
1970 __GLXcontext *const gc = __glXGetCurrentContext();
1971 const GLuint cmdlen = 12;
1972 emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
1973 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1974 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1975 gc->pc += cmdlen;
1976 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1977 (void) __glXFlushRenderBuffer(gc, gc->pc);
1978 }
1979 }
1980
1981 #define X_GLrop_Vertex2iv 67
1982 void
1983 __indirect_glVertex2iv(const GLint * v)
1984 {
1985 generic_8_byte(X_GLrop_Vertex2iv, v);
1986 }
1987
1988 #define X_GLrop_Vertex2sv 68
1989 void
1990 __indirect_glVertex2s(GLshort x, GLshort y)
1991 {
1992 __GLXcontext *const gc = __glXGetCurrentContext();
1993 const GLuint cmdlen = 8;
1994 emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
1995 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1996 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1997 gc->pc += cmdlen;
1998 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1999 (void) __glXFlushRenderBuffer(gc, gc->pc);
2000 }
2001 }
2002
2003 #define X_GLrop_Vertex2sv 68
2004 void
2005 __indirect_glVertex2sv(const GLshort * v)
2006 {
2007 generic_4_byte(X_GLrop_Vertex2sv, v);
2008 }
2009
2010 #define X_GLrop_Vertex3dv 69
2011 void
2012 __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
2013 {
2014 __GLXcontext *const gc = __glXGetCurrentContext();
2015 const GLuint cmdlen = 28;
2016 emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
2017 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2018 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2019 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2020 gc->pc += cmdlen;
2021 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2022 (void) __glXFlushRenderBuffer(gc, gc->pc);
2023 }
2024 }
2025
2026 #define X_GLrop_Vertex3dv 69
2027 void
2028 __indirect_glVertex3dv(const GLdouble * v)
2029 {
2030 generic_24_byte(X_GLrop_Vertex3dv, v);
2031 }
2032
2033 #define X_GLrop_Vertex3fv 70
2034 void
2035 __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
2036 {
2037 __GLXcontext *const gc = __glXGetCurrentContext();
2038 const GLuint cmdlen = 16;
2039 emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
2040 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2041 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2042 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2043 gc->pc += cmdlen;
2044 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2045 (void) __glXFlushRenderBuffer(gc, gc->pc);
2046 }
2047 }
2048
2049 #define X_GLrop_Vertex3fv 70
2050 void
2051 __indirect_glVertex3fv(const GLfloat * v)
2052 {
2053 generic_12_byte(X_GLrop_Vertex3fv, v);
2054 }
2055
2056 #define X_GLrop_Vertex3iv 71
2057 void
2058 __indirect_glVertex3i(GLint x, GLint y, GLint z)
2059 {
2060 __GLXcontext *const gc = __glXGetCurrentContext();
2061 const GLuint cmdlen = 16;
2062 emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
2063 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2064 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2065 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2066 gc->pc += cmdlen;
2067 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2068 (void) __glXFlushRenderBuffer(gc, gc->pc);
2069 }
2070 }
2071
2072 #define X_GLrop_Vertex3iv 71
2073 void
2074 __indirect_glVertex3iv(const GLint * v)
2075 {
2076 generic_12_byte(X_GLrop_Vertex3iv, v);
2077 }
2078
2079 #define X_GLrop_Vertex3sv 72
2080 void
2081 __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
2082 {
2083 __GLXcontext *const gc = __glXGetCurrentContext();
2084 const GLuint cmdlen = 12;
2085 emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
2086 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2087 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2088 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2089 gc->pc += cmdlen;
2090 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2091 (void) __glXFlushRenderBuffer(gc, gc->pc);
2092 }
2093 }
2094
2095 #define X_GLrop_Vertex3sv 72
2096 void
2097 __indirect_glVertex3sv(const GLshort * v)
2098 {
2099 generic_6_byte(X_GLrop_Vertex3sv, v);
2100 }
2101
2102 #define X_GLrop_Vertex4dv 73
2103 void
2104 __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
2105 {
2106 __GLXcontext *const gc = __glXGetCurrentContext();
2107 const GLuint cmdlen = 36;
2108 emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
2109 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2110 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2111 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2112 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
2113 gc->pc += cmdlen;
2114 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2115 (void) __glXFlushRenderBuffer(gc, gc->pc);
2116 }
2117 }
2118
2119 #define X_GLrop_Vertex4dv 73
2120 void
2121 __indirect_glVertex4dv(const GLdouble * v)
2122 {
2123 generic_32_byte(X_GLrop_Vertex4dv, v);
2124 }
2125
2126 #define X_GLrop_Vertex4fv 74
2127 void
2128 __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2129 {
2130 __GLXcontext *const gc = __glXGetCurrentContext();
2131 const GLuint cmdlen = 20;
2132 emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
2133 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2134 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2135 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2136 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2137 gc->pc += cmdlen;
2138 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2139 (void) __glXFlushRenderBuffer(gc, gc->pc);
2140 }
2141 }
2142
2143 #define X_GLrop_Vertex4fv 74
2144 void
2145 __indirect_glVertex4fv(const GLfloat * v)
2146 {
2147 generic_16_byte(X_GLrop_Vertex4fv, v);
2148 }
2149
2150 #define X_GLrop_Vertex4iv 75
2151 void
2152 __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
2153 {
2154 __GLXcontext *const gc = __glXGetCurrentContext();
2155 const GLuint cmdlen = 20;
2156 emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
2157 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2158 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2159 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2160 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2161 gc->pc += cmdlen;
2162 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2163 (void) __glXFlushRenderBuffer(gc, gc->pc);
2164 }
2165 }
2166
2167 #define X_GLrop_Vertex4iv 75
2168 void
2169 __indirect_glVertex4iv(const GLint * v)
2170 {
2171 generic_16_byte(X_GLrop_Vertex4iv, v);
2172 }
2173
2174 #define X_GLrop_Vertex4sv 76
2175 void
2176 __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
2177 {
2178 __GLXcontext *const gc = __glXGetCurrentContext();
2179 const GLuint cmdlen = 12;
2180 emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
2181 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2182 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2183 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2184 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
2185 gc->pc += cmdlen;
2186 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2187 (void) __glXFlushRenderBuffer(gc, gc->pc);
2188 }
2189 }
2190
2191 #define X_GLrop_Vertex4sv 76
2192 void
2193 __indirect_glVertex4sv(const GLshort * v)
2194 {
2195 generic_8_byte(X_GLrop_Vertex4sv, v);
2196 }
2197
2198 #define X_GLrop_ClipPlane 77
2199 void
2200 __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
2201 {
2202 __GLXcontext *const gc = __glXGetCurrentContext();
2203 const GLuint cmdlen = 40;
2204 emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
2205 (void) memcpy((void *) (gc->pc + 4), (void *) (equation), 32);
2206 (void) memcpy((void *) (gc->pc + 36), (void *) (&plane), 4);
2207 gc->pc += cmdlen;
2208 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2209 (void) __glXFlushRenderBuffer(gc, gc->pc);
2210 }
2211 }
2212
2213 #define X_GLrop_ColorMaterial 78
2214 void
2215 __indirect_glColorMaterial(GLenum face, GLenum mode)
2216 {
2217 __GLXcontext *const gc = __glXGetCurrentContext();
2218 const GLuint cmdlen = 12;
2219 emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
2220 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2221 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2222 gc->pc += cmdlen;
2223 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2224 (void) __glXFlushRenderBuffer(gc, gc->pc);
2225 }
2226 }
2227
2228 #define X_GLrop_CullFace 79
2229 void
2230 __indirect_glCullFace(GLenum mode)
2231 {
2232 __GLXcontext *const gc = __glXGetCurrentContext();
2233 const GLuint cmdlen = 8;
2234 emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
2235 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2236 gc->pc += cmdlen;
2237 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2238 (void) __glXFlushRenderBuffer(gc, gc->pc);
2239 }
2240 }
2241
2242 #define X_GLrop_Fogf 80
2243 void
2244 __indirect_glFogf(GLenum pname, GLfloat param)
2245 {
2246 __GLXcontext *const gc = __glXGetCurrentContext();
2247 const GLuint cmdlen = 12;
2248 emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
2249 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2250 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2251 gc->pc += cmdlen;
2252 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2253 (void) __glXFlushRenderBuffer(gc, gc->pc);
2254 }
2255 }
2256
2257 #define X_GLrop_Fogfv 81
2258 void
2259 __indirect_glFogfv(GLenum pname, const GLfloat * params)
2260 {
2261 __GLXcontext *const gc = __glXGetCurrentContext();
2262 const GLuint compsize = __glFogfv_size(pname);
2263 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2264 emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
2265 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2266 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2267 gc->pc += cmdlen;
2268 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2269 (void) __glXFlushRenderBuffer(gc, gc->pc);
2270 }
2271 }
2272
2273 #define X_GLrop_Fogi 82
2274 void
2275 __indirect_glFogi(GLenum pname, GLint param)
2276 {
2277 __GLXcontext *const gc = __glXGetCurrentContext();
2278 const GLuint cmdlen = 12;
2279 emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
2280 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2281 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2282 gc->pc += cmdlen;
2283 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2284 (void) __glXFlushRenderBuffer(gc, gc->pc);
2285 }
2286 }
2287
2288 #define X_GLrop_Fogiv 83
2289 void
2290 __indirect_glFogiv(GLenum pname, const GLint * params)
2291 {
2292 __GLXcontext *const gc = __glXGetCurrentContext();
2293 const GLuint compsize = __glFogiv_size(pname);
2294 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2295 emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
2296 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2297 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2298 gc->pc += cmdlen;
2299 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2300 (void) __glXFlushRenderBuffer(gc, gc->pc);
2301 }
2302 }
2303
2304 #define X_GLrop_FrontFace 84
2305 void
2306 __indirect_glFrontFace(GLenum mode)
2307 {
2308 __GLXcontext *const gc = __glXGetCurrentContext();
2309 const GLuint cmdlen = 8;
2310 emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
2311 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2312 gc->pc += cmdlen;
2313 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2314 (void) __glXFlushRenderBuffer(gc, gc->pc);
2315 }
2316 }
2317
2318 #define X_GLrop_Hint 85
2319 void
2320 __indirect_glHint(GLenum target, GLenum mode)
2321 {
2322 __GLXcontext *const gc = __glXGetCurrentContext();
2323 const GLuint cmdlen = 12;
2324 emit_header(gc->pc, X_GLrop_Hint, cmdlen);
2325 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2326 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2327 gc->pc += cmdlen;
2328 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2329 (void) __glXFlushRenderBuffer(gc, gc->pc);
2330 }
2331 }
2332
2333 #define X_GLrop_Lightf 86
2334 void
2335 __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
2336 {
2337 __GLXcontext *const gc = __glXGetCurrentContext();
2338 const GLuint cmdlen = 16;
2339 emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
2340 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2341 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2342 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2343 gc->pc += cmdlen;
2344 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2345 (void) __glXFlushRenderBuffer(gc, gc->pc);
2346 }
2347 }
2348
2349 #define X_GLrop_Lightfv 87
2350 void
2351 __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
2352 {
2353 __GLXcontext *const gc = __glXGetCurrentContext();
2354 const GLuint compsize = __glLightfv_size(pname);
2355 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2356 emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
2357 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2358 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2359 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2360 gc->pc += cmdlen;
2361 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2362 (void) __glXFlushRenderBuffer(gc, gc->pc);
2363 }
2364 }
2365
2366 #define X_GLrop_Lighti 88
2367 void
2368 __indirect_glLighti(GLenum light, GLenum pname, GLint param)
2369 {
2370 __GLXcontext *const gc = __glXGetCurrentContext();
2371 const GLuint cmdlen = 16;
2372 emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
2373 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2374 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2375 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2376 gc->pc += cmdlen;
2377 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2378 (void) __glXFlushRenderBuffer(gc, gc->pc);
2379 }
2380 }
2381
2382 #define X_GLrop_Lightiv 89
2383 void
2384 __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
2385 {
2386 __GLXcontext *const gc = __glXGetCurrentContext();
2387 const GLuint compsize = __glLightiv_size(pname);
2388 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2389 emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
2390 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2391 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2392 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2393 gc->pc += cmdlen;
2394 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2395 (void) __glXFlushRenderBuffer(gc, gc->pc);
2396 }
2397 }
2398
2399 #define X_GLrop_LightModelf 90
2400 void
2401 __indirect_glLightModelf(GLenum pname, GLfloat param)
2402 {
2403 __GLXcontext *const gc = __glXGetCurrentContext();
2404 const GLuint cmdlen = 12;
2405 emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
2406 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2407 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2408 gc->pc += cmdlen;
2409 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2410 (void) __glXFlushRenderBuffer(gc, gc->pc);
2411 }
2412 }
2413
2414 #define X_GLrop_LightModelfv 91
2415 void
2416 __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
2417 {
2418 __GLXcontext *const gc = __glXGetCurrentContext();
2419 const GLuint compsize = __glLightModelfv_size(pname);
2420 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2421 emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
2422 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2423 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2424 gc->pc += cmdlen;
2425 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2426 (void) __glXFlushRenderBuffer(gc, gc->pc);
2427 }
2428 }
2429
2430 #define X_GLrop_LightModeli 92
2431 void
2432 __indirect_glLightModeli(GLenum pname, GLint param)
2433 {
2434 __GLXcontext *const gc = __glXGetCurrentContext();
2435 const GLuint cmdlen = 12;
2436 emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
2437 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2438 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2439 gc->pc += cmdlen;
2440 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2441 (void) __glXFlushRenderBuffer(gc, gc->pc);
2442 }
2443 }
2444
2445 #define X_GLrop_LightModeliv 93
2446 void
2447 __indirect_glLightModeliv(GLenum pname, const GLint * params)
2448 {
2449 __GLXcontext *const gc = __glXGetCurrentContext();
2450 const GLuint compsize = __glLightModeliv_size(pname);
2451 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2452 emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
2453 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2454 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2455 gc->pc += cmdlen;
2456 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2457 (void) __glXFlushRenderBuffer(gc, gc->pc);
2458 }
2459 }
2460
2461 #define X_GLrop_LineStipple 94
2462 void
2463 __indirect_glLineStipple(GLint factor, GLushort pattern)
2464 {
2465 __GLXcontext *const gc = __glXGetCurrentContext();
2466 const GLuint cmdlen = 12;
2467 emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
2468 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
2469 (void) memcpy((void *) (gc->pc + 8), (void *) (&pattern), 2);
2470 gc->pc += cmdlen;
2471 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2472 (void) __glXFlushRenderBuffer(gc, gc->pc);
2473 }
2474 }
2475
2476 #define X_GLrop_LineWidth 95
2477 void
2478 __indirect_glLineWidth(GLfloat width)
2479 {
2480 __GLXcontext *const gc = __glXGetCurrentContext();
2481 const GLuint cmdlen = 8;
2482 emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
2483 (void) memcpy((void *) (gc->pc + 4), (void *) (&width), 4);
2484 gc->pc += cmdlen;
2485 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2486 (void) __glXFlushRenderBuffer(gc, gc->pc);
2487 }
2488 }
2489
2490 #define X_GLrop_Materialf 96
2491 void
2492 __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
2493 {
2494 __GLXcontext *const gc = __glXGetCurrentContext();
2495 const GLuint cmdlen = 16;
2496 emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
2497 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2498 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2499 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2500 gc->pc += cmdlen;
2501 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2502 (void) __glXFlushRenderBuffer(gc, gc->pc);
2503 }
2504 }
2505
2506 #define X_GLrop_Materialfv 97
2507 void
2508 __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
2509 {
2510 __GLXcontext *const gc = __glXGetCurrentContext();
2511 const GLuint compsize = __glMaterialfv_size(pname);
2512 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2513 emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
2514 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2515 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2516 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2517 gc->pc += cmdlen;
2518 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2519 (void) __glXFlushRenderBuffer(gc, gc->pc);
2520 }
2521 }
2522
2523 #define X_GLrop_Materiali 98
2524 void
2525 __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
2526 {
2527 __GLXcontext *const gc = __glXGetCurrentContext();
2528 const GLuint cmdlen = 16;
2529 emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
2530 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2531 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2532 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2533 gc->pc += cmdlen;
2534 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2535 (void) __glXFlushRenderBuffer(gc, gc->pc);
2536 }
2537 }
2538
2539 #define X_GLrop_Materialiv 99
2540 void
2541 __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
2542 {
2543 __GLXcontext *const gc = __glXGetCurrentContext();
2544 const GLuint compsize = __glMaterialiv_size(pname);
2545 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2546 emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
2547 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2548 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2549 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2550 gc->pc += cmdlen;
2551 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2552 (void) __glXFlushRenderBuffer(gc, gc->pc);
2553 }
2554 }
2555
2556 #define X_GLrop_PointSize 100
2557 void
2558 __indirect_glPointSize(GLfloat size)
2559 {
2560 __GLXcontext *const gc = __glXGetCurrentContext();
2561 const GLuint cmdlen = 8;
2562 emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
2563 (void) memcpy((void *) (gc->pc + 4), (void *) (&size), 4);
2564 gc->pc += cmdlen;
2565 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2566 (void) __glXFlushRenderBuffer(gc, gc->pc);
2567 }
2568 }
2569
2570 #define X_GLrop_PolygonMode 101
2571 void
2572 __indirect_glPolygonMode(GLenum face, GLenum mode)
2573 {
2574 __GLXcontext *const gc = __glXGetCurrentContext();
2575 const GLuint cmdlen = 12;
2576 emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
2577 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2578 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2579 gc->pc += cmdlen;
2580 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2581 (void) __glXFlushRenderBuffer(gc, gc->pc);
2582 }
2583 }
2584
2585 #define X_GLrop_PolygonStipple 102
2586 void
2587 __indirect_glPolygonStipple(const GLubyte *mask)
2588 {
2589 __GLXcontext *const gc = __glXGetCurrentContext();
2590 const GLuint compsize =
2591 (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
2592 0) : 0;
2593 const GLuint cmdlen = 24 + __GLX_PAD(compsize);
2594 emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
2595 if (compsize > 0) {
2596 (*gc->fillImage) (gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask,
2597 gc->pc + 24, gc->pc + 4);
2598 } else {
2599 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2600 default_pixel_store_2D_size);
2601 }
2602 gc->pc += cmdlen;
2603 if (gc->pc > gc->limit) {
2604 (void) __glXFlushRenderBuffer(gc, gc->pc);
2605 }
2606 }
2607
2608 #define X_GLrop_Scissor 103
2609 void
2610 __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
2611 {
2612 __GLXcontext *const gc = __glXGetCurrentContext();
2613 const GLuint cmdlen = 20;
2614 emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
2615 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2616 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2617 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
2618 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
2619 gc->pc += cmdlen;
2620 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2621 (void) __glXFlushRenderBuffer(gc, gc->pc);
2622 }
2623 }
2624
2625 #define X_GLrop_ShadeModel 104
2626 void
2627 __indirect_glShadeModel(GLenum mode)
2628 {
2629 __GLXcontext *const gc = __glXGetCurrentContext();
2630 const GLuint cmdlen = 8;
2631 emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
2632 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2633 gc->pc += cmdlen;
2634 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2635 (void) __glXFlushRenderBuffer(gc, gc->pc);
2636 }
2637 }
2638
2639 #define X_GLrop_TexParameterf 105
2640 void
2641 __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
2642 {
2643 __GLXcontext *const gc = __glXGetCurrentContext();
2644 const GLuint cmdlen = 16;
2645 emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
2646 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2647 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2648 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2649 gc->pc += cmdlen;
2650 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2651 (void) __glXFlushRenderBuffer(gc, gc->pc);
2652 }
2653 }
2654
2655 #define X_GLrop_TexParameterfv 106
2656 void
2657 __indirect_glTexParameterfv(GLenum target, GLenum pname,
2658 const GLfloat * params)
2659 {
2660 __GLXcontext *const gc = __glXGetCurrentContext();
2661 const GLuint compsize = __glTexParameterfv_size(pname);
2662 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2663 emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
2664 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2665 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2666 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2667 gc->pc += cmdlen;
2668 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2669 (void) __glXFlushRenderBuffer(gc, gc->pc);
2670 }
2671 }
2672
2673 #define X_GLrop_TexParameteri 107
2674 void
2675 __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
2676 {
2677 __GLXcontext *const gc = __glXGetCurrentContext();
2678 const GLuint cmdlen = 16;
2679 emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
2680 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2681 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2682 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2683 gc->pc += cmdlen;
2684 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2685 (void) __glXFlushRenderBuffer(gc, gc->pc);
2686 }
2687 }
2688
2689 #define X_GLrop_TexParameteriv 108
2690 void
2691 __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
2692 {
2693 __GLXcontext *const gc = __glXGetCurrentContext();
2694 const GLuint compsize = __glTexParameteriv_size(pname);
2695 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2696 emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
2697 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2698 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2699 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2700 gc->pc += cmdlen;
2701 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2702 (void) __glXFlushRenderBuffer(gc, gc->pc);
2703 }
2704 }
2705
2706 static void
2707 __glx_TexImage_1D2D(unsigned opcode, unsigned dim, GLenum target, GLint level,
2708 GLint internalformat, GLsizei width, GLsizei height,
2709 GLint border, GLenum format, GLenum type,
2710 const GLvoid * pixels)
2711 {
2712 __GLXcontext *const gc = __glXGetCurrentContext();
2713 const GLuint compsize =
2714 __glImageSize(width, height, 1, format, type, target);
2715 const GLuint cmdlen = 56 + __GLX_PAD(compsize);
2716 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
2717 if (cmdlen <= gc->maxSmallRenderCommandSize) {
2718 if ((gc->pc + cmdlen) > gc->bufEnd) {
2719 (void) __glXFlushRenderBuffer(gc, gc->pc);
2720 }
2721 emit_header(gc->pc, opcode, cmdlen);
2722 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
2723 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
2724 (void) memcpy((void *) (gc->pc + 32), (void *) (&internalformat),
2725 4);
2726 (void) memcpy((void *) (gc->pc + 36), (void *) (&width), 4);
2727 (void) memcpy((void *) (gc->pc + 40), (void *) (&height), 4);
2728 (void) memcpy((void *) (gc->pc + 44), (void *) (&border), 4);
2729 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
2730 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
2731 if ((compsize > 0) && (pixels != NULL)) {
2732 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
2733 pixels, gc->pc + 56, gc->pc + 4);
2734 } else {
2735 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2736 default_pixel_store_2D_size);
2737 }
2738 gc->pc += cmdlen;
2739 if (gc->pc > gc->limit) {
2740 (void) __glXFlushRenderBuffer(gc, gc->pc);
2741 }
2742 } else {
2743 const GLint op = opcode;
2744 const GLuint cmdlenLarge = cmdlen + 4;
2745 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
2746 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
2747 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
2748 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
2749 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
2750 (void) memcpy((void *) (pc + 36), (void *) (&internalformat), 4);
2751 (void) memcpy((void *) (pc + 40), (void *) (&width), 4);
2752 (void) memcpy((void *) (pc + 44), (void *) (&height), 4);
2753 (void) memcpy((void *) (pc + 48), (void *) (&border), 4);
2754 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
2755 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
2756 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
2757 type, pixels, pc + 60, pc + 8);
2758 }
2759 }
2760 }
2761
2762 #define X_GLrop_TexImage1D 109
2763 void
2764 __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat,
2765 GLsizei width, GLint border, GLenum format,
2766 GLenum type, const GLvoid * pixels)
2767 {
2768 __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat,
2769 width, 1, border, format, type, pixels);
2770 }
2771
2772 #define X_GLrop_TexImage2D 110
2773 void
2774 __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat,
2775 GLsizei width, GLsizei height, GLint border,
2776 GLenum format, GLenum type, const GLvoid * pixels)
2777 {
2778 __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat,
2779 width, height, border, format, type, pixels);
2780 }
2781
2782 #define X_GLrop_TexEnvf 111
2783 void
2784 __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
2785 {
2786 __GLXcontext *const gc = __glXGetCurrentContext();
2787 const GLuint cmdlen = 16;
2788 emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
2789 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2790 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2791 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2792 gc->pc += cmdlen;
2793 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2794 (void) __glXFlushRenderBuffer(gc, gc->pc);
2795 }
2796 }
2797
2798 #define X_GLrop_TexEnvfv 112
2799 void
2800 __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
2801 {
2802 __GLXcontext *const gc = __glXGetCurrentContext();
2803 const GLuint compsize = __glTexEnvfv_size(pname);
2804 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2805 emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
2806 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2807 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2808 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2809 gc->pc += cmdlen;
2810 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2811 (void) __glXFlushRenderBuffer(gc, gc->pc);
2812 }
2813 }
2814
2815 #define X_GLrop_TexEnvi 113
2816 void
2817 __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
2818 {
2819 __GLXcontext *const gc = __glXGetCurrentContext();
2820 const GLuint cmdlen = 16;
2821 emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
2822 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2823 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2824 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2825 gc->pc += cmdlen;
2826 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2827 (void) __glXFlushRenderBuffer(gc, gc->pc);
2828 }
2829 }
2830
2831 #define X_GLrop_TexEnviv 114
2832 void
2833 __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
2834 {
2835 __GLXcontext *const gc = __glXGetCurrentContext();
2836 const GLuint compsize = __glTexEnviv_size(pname);
2837 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2838 emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
2839 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2840 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2841 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2842 gc->pc += cmdlen;
2843 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2844 (void) __glXFlushRenderBuffer(gc, gc->pc);
2845 }
2846 }
2847
2848 #define X_GLrop_TexGend 115
2849 void
2850 __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
2851 {
2852 __GLXcontext *const gc = __glXGetCurrentContext();
2853 const GLuint cmdlen = 20;
2854 emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
2855 (void) memcpy((void *) (gc->pc + 4), (void *) (&param), 8);
2856 (void) memcpy((void *) (gc->pc + 12), (void *) (&coord), 4);
2857 (void) memcpy((void *) (gc->pc + 16), (void *) (&pname), 4);
2858 gc->pc += cmdlen;
2859 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2860 (void) __glXFlushRenderBuffer(gc, gc->pc);
2861 }
2862 }
2863
2864 #define X_GLrop_TexGendv 116
2865 void
2866 __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
2867 {
2868 __GLXcontext *const gc = __glXGetCurrentContext();
2869 const GLuint compsize = __glTexGendv_size(pname);
2870 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
2871 emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
2872 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2873 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2874 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 8));
2875 gc->pc += cmdlen;
2876 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2877 (void) __glXFlushRenderBuffer(gc, gc->pc);
2878 }
2879 }
2880
2881 #define X_GLrop_TexGenf 117
2882 void
2883 __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
2884 {
2885 __GLXcontext *const gc = __glXGetCurrentContext();
2886 const GLuint cmdlen = 16;
2887 emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
2888 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2889 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2890 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2891 gc->pc += cmdlen;
2892 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2893 (void) __glXFlushRenderBuffer(gc, gc->pc);
2894 }
2895 }
2896
2897 #define X_GLrop_TexGenfv 118
2898 void
2899 __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
2900 {
2901 __GLXcontext *const gc = __glXGetCurrentContext();
2902 const GLuint compsize = __glTexGenfv_size(pname);
2903 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2904 emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
2905 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2906 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2907 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2908 gc->pc += cmdlen;
2909 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2910 (void) __glXFlushRenderBuffer(gc, gc->pc);
2911 }
2912 }
2913
2914 #define X_GLrop_TexGeni 119
2915 void
2916 __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
2917 {
2918 __GLXcontext *const gc = __glXGetCurrentContext();
2919 const GLuint cmdlen = 16;
2920 emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
2921 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2922 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2923 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2924 gc->pc += cmdlen;
2925 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2926 (void) __glXFlushRenderBuffer(gc, gc->pc);
2927 }
2928 }
2929
2930 #define X_GLrop_TexGeniv 120
2931 void
2932 __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
2933 {
2934 __GLXcontext *const gc = __glXGetCurrentContext();
2935 const GLuint compsize = __glTexGeniv_size(pname);
2936 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2937 emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
2938 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2939 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2940 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2941 gc->pc += cmdlen;
2942 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2943 (void) __glXFlushRenderBuffer(gc, gc->pc);
2944 }
2945 }
2946
2947 #define X_GLrop_InitNames 121
2948 void
2949 __indirect_glInitNames(void)
2950 {
2951 __GLXcontext *const gc = __glXGetCurrentContext();
2952 const GLuint cmdlen = 4;
2953 emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
2954 gc->pc += cmdlen;
2955 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2956 (void) __glXFlushRenderBuffer(gc, gc->pc);
2957 }
2958 }
2959
2960 #define X_GLrop_LoadName 122
2961 void
2962 __indirect_glLoadName(GLuint name)
2963 {
2964 __GLXcontext *const gc = __glXGetCurrentContext();
2965 const GLuint cmdlen = 8;
2966 emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
2967 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
2968 gc->pc += cmdlen;
2969 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2970 (void) __glXFlushRenderBuffer(gc, gc->pc);
2971 }
2972 }
2973
2974 #define X_GLrop_PassThrough 123
2975 void
2976 __indirect_glPassThrough(GLfloat token)
2977 {
2978 __GLXcontext *const gc = __glXGetCurrentContext();
2979 const GLuint cmdlen = 8;
2980 emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
2981 (void) memcpy((void *) (gc->pc + 4), (void *) (&token), 4);
2982 gc->pc += cmdlen;
2983 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2984 (void) __glXFlushRenderBuffer(gc, gc->pc);
2985 }
2986 }
2987
2988 #define X_GLrop_PopName 124
2989 void
2990 __indirect_glPopName(void)
2991 {
2992 __GLXcontext *const gc = __glXGetCurrentContext();
2993 const GLuint cmdlen = 4;
2994 emit_header(gc->pc, X_GLrop_PopName, cmdlen);
2995 gc->pc += cmdlen;
2996 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2997 (void) __glXFlushRenderBuffer(gc, gc->pc);
2998 }
2999 }
3000
3001 #define X_GLrop_PushName 125
3002 void
3003 __indirect_glPushName(GLuint name)
3004 {
3005 __GLXcontext *const gc = __glXGetCurrentContext();
3006 const GLuint cmdlen = 8;
3007 emit_header(gc->pc, X_GLrop_PushName, cmdlen);
3008 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
3009 gc->pc += cmdlen;
3010 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3011 (void) __glXFlushRenderBuffer(gc, gc->pc);
3012 }
3013 }
3014
3015 #define X_GLrop_DrawBuffer 126
3016 void
3017 __indirect_glDrawBuffer(GLenum mode)
3018 {
3019 __GLXcontext *const gc = __glXGetCurrentContext();
3020 const GLuint cmdlen = 8;
3021 emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
3022 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3023 gc->pc += cmdlen;
3024 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3025 (void) __glXFlushRenderBuffer(gc, gc->pc);
3026 }
3027 }
3028
3029 #define X_GLrop_Clear 127
3030 void
3031 __indirect_glClear(GLbitfield mask)
3032 {
3033 __GLXcontext *const gc = __glXGetCurrentContext();
3034 const GLuint cmdlen = 8;
3035 emit_header(gc->pc, X_GLrop_Clear, cmdlen);
3036 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3037 gc->pc += cmdlen;
3038 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3039 (void) __glXFlushRenderBuffer(gc, gc->pc);
3040 }
3041 }
3042
3043 #define X_GLrop_ClearAccum 128
3044 void
3045 __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue,
3046 GLfloat alpha)
3047 {
3048 __GLXcontext *const gc = __glXGetCurrentContext();
3049 const GLuint cmdlen = 20;
3050 emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
3051 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3052 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3053 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3054 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3055 gc->pc += cmdlen;
3056 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3057 (void) __glXFlushRenderBuffer(gc, gc->pc);
3058 }
3059 }
3060
3061 #define X_GLrop_ClearIndex 129
3062 void
3063 __indirect_glClearIndex(GLfloat c)
3064 {
3065 __GLXcontext *const gc = __glXGetCurrentContext();
3066 const GLuint cmdlen = 8;
3067 emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
3068 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
3069 gc->pc += cmdlen;
3070 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3071 (void) __glXFlushRenderBuffer(gc, gc->pc);
3072 }
3073 }
3074
3075 #define X_GLrop_ClearColor 130
3076 void
3077 __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue,
3078 GLclampf alpha)
3079 {
3080 __GLXcontext *const gc = __glXGetCurrentContext();
3081 const GLuint cmdlen = 20;
3082 emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
3083 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3084 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3085 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3086 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3087 gc->pc += cmdlen;
3088 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3089 (void) __glXFlushRenderBuffer(gc, gc->pc);
3090 }
3091 }
3092
3093 #define X_GLrop_ClearStencil 131
3094 void
3095 __indirect_glClearStencil(GLint s)
3096 {
3097 __GLXcontext *const gc = __glXGetCurrentContext();
3098 const GLuint cmdlen = 8;
3099 emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
3100 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
3101 gc->pc += cmdlen;
3102 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3103 (void) __glXFlushRenderBuffer(gc, gc->pc);
3104 }
3105 }
3106
3107 #define X_GLrop_ClearDepth 132
3108 void
3109 __indirect_glClearDepth(GLclampd depth)
3110 {
3111 __GLXcontext *const gc = __glXGetCurrentContext();
3112 const GLuint cmdlen = 12;
3113 emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
3114 (void) memcpy((void *) (gc->pc + 4), (void *) (&depth), 8);
3115 gc->pc += cmdlen;
3116 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3117 (void) __glXFlushRenderBuffer(gc, gc->pc);
3118 }
3119 }
3120
3121 #define X_GLrop_StencilMask 133
3122 void
3123 __indirect_glStencilMask(GLuint mask)
3124 {
3125 __GLXcontext *const gc = __glXGetCurrentContext();
3126 const GLuint cmdlen = 8;
3127 emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
3128 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3129 gc->pc += cmdlen;
3130 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3131 (void) __glXFlushRenderBuffer(gc, gc->pc);
3132 }
3133 }
3134
3135 #define X_GLrop_ColorMask 134
3136 void
3137 __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue,
3138 GLboolean alpha)
3139 {
3140 __GLXcontext *const gc = __glXGetCurrentContext();
3141 const GLuint cmdlen = 8;
3142 emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
3143 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
3144 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
3145 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
3146 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
3147 gc->pc += cmdlen;
3148 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3149 (void) __glXFlushRenderBuffer(gc, gc->pc);
3150 }
3151 }
3152
3153 #define X_GLrop_DepthMask 135
3154 void
3155 __indirect_glDepthMask(GLboolean flag)
3156 {
3157 __GLXcontext *const gc = __glXGetCurrentContext();
3158 const GLuint cmdlen = 8;
3159 emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
3160 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
3161 gc->pc += cmdlen;
3162 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3163 (void) __glXFlushRenderBuffer(gc, gc->pc);
3164 }
3165 }
3166
3167 #define X_GLrop_IndexMask 136
3168 void
3169 __indirect_glIndexMask(GLuint mask)
3170 {
3171 __GLXcontext *const gc = __glXGetCurrentContext();
3172 const GLuint cmdlen = 8;
3173 emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
3174 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3175 gc->pc += cmdlen;
3176 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3177 (void) __glXFlushRenderBuffer(gc, gc->pc);
3178 }
3179 }
3180
3181 #define X_GLrop_Accum 137
3182 void
3183 __indirect_glAccum(GLenum op, GLfloat value)
3184 {
3185 __GLXcontext *const gc = __glXGetCurrentContext();
3186 const GLuint cmdlen = 12;
3187 emit_header(gc->pc, X_GLrop_Accum, cmdlen);
3188 (void) memcpy((void *) (gc->pc + 4), (void *) (&op), 4);
3189 (void) memcpy((void *) (gc->pc + 8), (void *) (&value), 4);
3190 gc->pc += cmdlen;
3191 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3192 (void) __glXFlushRenderBuffer(gc, gc->pc);
3193 }
3194 }
3195
3196 #define X_GLrop_PopAttrib 141
3197 void
3198 __indirect_glPopAttrib(void)
3199 {
3200 __GLXcontext *const gc = __glXGetCurrentContext();
3201 const GLuint cmdlen = 4;
3202 emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
3203 gc->pc += cmdlen;
3204 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3205 (void) __glXFlushRenderBuffer(gc, gc->pc);
3206 }
3207 }
3208
3209 #define X_GLrop_PushAttrib 142
3210 void
3211 __indirect_glPushAttrib(GLbitfield mask)
3212 {
3213 __GLXcontext *const gc = __glXGetCurrentContext();
3214 const GLuint cmdlen = 8;
3215 emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
3216 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3217 gc->pc += cmdlen;
3218 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3219 (void) __glXFlushRenderBuffer(gc, gc->pc);
3220 }
3221 }
3222
3223 #define X_GLrop_MapGrid1d 147
3224 void
3225 __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
3226 {
3227 __GLXcontext *const gc = __glXGetCurrentContext();
3228 const GLuint cmdlen = 24;
3229 emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
3230 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3231 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3232 (void) memcpy((void *) (gc->pc + 20), (void *) (&un), 4);
3233 gc->pc += cmdlen;
3234 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3235 (void) __glXFlushRenderBuffer(gc, gc->pc);
3236 }
3237 }
3238
3239 #define X_GLrop_MapGrid1f 148
3240 void
3241 __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
3242 {
3243 __GLXcontext *const gc = __glXGetCurrentContext();
3244 const GLuint cmdlen = 16;
3245 emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
3246 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3247 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3248 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3249 gc->pc += cmdlen;
3250 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3251 (void) __glXFlushRenderBuffer(gc, gc->pc);
3252 }
3253 }
3254
3255 #define X_GLrop_MapGrid2d 149
3256 void
3257 __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn,
3258 GLdouble v1, GLdouble v2)
3259 {
3260 __GLXcontext *const gc = __glXGetCurrentContext();
3261 const GLuint cmdlen = 44;
3262 emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
3263 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3264 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3265 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 8);
3266 (void) memcpy((void *) (gc->pc + 28), (void *) (&v2), 8);
3267 (void) memcpy((void *) (gc->pc + 36), (void *) (&un), 4);
3268 (void) memcpy((void *) (gc->pc + 40), (void *) (&vn), 4);
3269 gc->pc += cmdlen;
3270 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3271 (void) __glXFlushRenderBuffer(gc, gc->pc);
3272 }
3273 }
3274
3275 #define X_GLrop_MapGrid2f 150
3276 void
3277 __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
3278 GLfloat v2)
3279 {
3280 __GLXcontext *const gc = __glXGetCurrentContext();
3281 const GLuint cmdlen = 28;
3282 emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
3283 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3284 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3285 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3286 (void) memcpy((void *) (gc->pc + 16), (void *) (&vn), 4);
3287 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 4);
3288 (void) memcpy((void *) (gc->pc + 24), (void *) (&v2), 4);
3289 gc->pc += cmdlen;
3290 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3291 (void) __glXFlushRenderBuffer(gc, gc->pc);
3292 }
3293 }
3294
3295 #define X_GLrop_EvalCoord1dv 151
3296 void
3297 __indirect_glEvalCoord1d(GLdouble u)
3298 {
3299 __GLXcontext *const gc = __glXGetCurrentContext();
3300 const GLuint cmdlen = 12;
3301 emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
3302 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3303 gc->pc += cmdlen;
3304 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3305 (void) __glXFlushRenderBuffer(gc, gc->pc);
3306 }
3307 }
3308
3309 #define X_GLrop_EvalCoord1dv 151
3310 void
3311 __indirect_glEvalCoord1dv(const GLdouble * u)
3312 {
3313 generic_8_byte(X_GLrop_EvalCoord1dv, u);
3314 }
3315
3316 #define X_GLrop_EvalCoord1fv 152
3317 void
3318 __indirect_glEvalCoord1f(GLfloat u)
3319 {
3320 __GLXcontext *const gc = __glXGetCurrentContext();
3321 const GLuint cmdlen = 8;
3322 emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
3323 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3324 gc->pc += cmdlen;
3325 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3326 (void) __glXFlushRenderBuffer(gc, gc->pc);
3327 }
3328 }
3329
3330 #define X_GLrop_EvalCoord1fv 152
3331 void
3332 __indirect_glEvalCoord1fv(const GLfloat * u)
3333 {
3334 generic_4_byte(X_GLrop_EvalCoord1fv, u);
3335 }
3336
3337 #define X_GLrop_EvalCoord2dv 153
3338 void
3339 __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
3340 {
3341 __GLXcontext *const gc = __glXGetCurrentContext();
3342 const GLuint cmdlen = 20;
3343 emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
3344 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3345 (void) memcpy((void *) (gc->pc + 12), (void *) (&v), 8);
3346 gc->pc += cmdlen;
3347 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3348 (void) __glXFlushRenderBuffer(gc, gc->pc);
3349 }
3350 }
3351
3352 #define X_GLrop_EvalCoord2dv 153
3353 void
3354 __indirect_glEvalCoord2dv(const GLdouble * u)
3355 {
3356 generic_16_byte(X_GLrop_EvalCoord2dv, u);
3357 }
3358
3359 #define X_GLrop_EvalCoord2fv 154
3360 void
3361 __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
3362 {
3363 __GLXcontext *const gc = __glXGetCurrentContext();
3364 const GLuint cmdlen = 12;
3365 emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
3366 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3367 (void) memcpy((void *) (gc->pc + 8), (void *) (&v), 4);
3368 gc->pc += cmdlen;
3369 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3370 (void) __glXFlushRenderBuffer(gc, gc->pc);
3371 }
3372 }
3373
3374 #define X_GLrop_EvalCoord2fv 154
3375 void
3376 __indirect_glEvalCoord2fv(const GLfloat * u)
3377 {
3378 generic_8_byte(X_GLrop_EvalCoord2fv, u);
3379 }
3380
3381 #define X_GLrop_EvalMesh1 155
3382 void
3383 __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
3384 {
3385 __GLXcontext *const gc = __glXGetCurrentContext();
3386 const GLuint cmdlen = 16;
3387 emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
3388 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3389 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3390 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3391 gc->pc += cmdlen;
3392 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3393 (void) __glXFlushRenderBuffer(gc, gc->pc);
3394 }
3395 }
3396
3397 #define X_GLrop_EvalPoint1 156
3398 void
3399 __indirect_glEvalPoint1(GLint i)
3400 {
3401 __GLXcontext *const gc = __glXGetCurrentContext();
3402 const GLuint cmdlen = 8;
3403 emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
3404 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3405 gc->pc += cmdlen;
3406 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3407 (void) __glXFlushRenderBuffer(gc, gc->pc);
3408 }
3409 }
3410
3411 #define X_GLrop_EvalMesh2 157
3412 void
3413 __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
3414 {
3415 __GLXcontext *const gc = __glXGetCurrentContext();
3416 const GLuint cmdlen = 24;
3417 emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
3418 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3419 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3420 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3421 (void) memcpy((void *) (gc->pc + 16), (void *) (&j1), 4);
3422 (void) memcpy((void *) (gc->pc + 20), (void *) (&j2), 4);
3423 gc->pc += cmdlen;
3424 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3425 (void) __glXFlushRenderBuffer(gc, gc->pc);
3426 }
3427 }
3428
3429 #define X_GLrop_EvalPoint2 158
3430 void
3431 __indirect_glEvalPoint2(GLint i, GLint j)
3432 {
3433 __GLXcontext *const gc = __glXGetCurrentContext();
3434 const GLuint cmdlen = 12;
3435 emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
3436 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3437 (void) memcpy((void *) (gc->pc + 8), (void *) (&j), 4);
3438 gc->pc += cmdlen;
3439 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3440 (void) __glXFlushRenderBuffer(gc, gc->pc);
3441 }
3442 }
3443
3444 #define X_GLrop_AlphaFunc 159
3445 void
3446 __indirect_glAlphaFunc(GLenum func, GLclampf ref)
3447 {
3448 __GLXcontext *const gc = __glXGetCurrentContext();
3449 const GLuint cmdlen = 12;
3450 emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
3451 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3452 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3453 gc->pc += cmdlen;
3454 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3455 (void) __glXFlushRenderBuffer(gc, gc->pc);
3456 }
3457 }
3458
3459 #define X_GLrop_BlendFunc 160
3460 void
3461 __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
3462 {
3463 __GLXcontext *const gc = __glXGetCurrentContext();
3464 const GLuint cmdlen = 12;
3465 emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
3466 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactor), 4);
3467 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactor), 4);
3468 gc->pc += cmdlen;
3469 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3470 (void) __glXFlushRenderBuffer(gc, gc->pc);
3471 }
3472 }
3473
3474 #define X_GLrop_LogicOp 161
3475 void
3476 __indirect_glLogicOp(GLenum opcode)
3477 {
3478 __GLXcontext *const gc = __glXGetCurrentContext();
3479 const GLuint cmdlen = 8;
3480 emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
3481 (void) memcpy((void *) (gc->pc + 4), (void *) (&opcode), 4);
3482 gc->pc += cmdlen;
3483 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3484 (void) __glXFlushRenderBuffer(gc, gc->pc);
3485 }
3486 }
3487
3488 #define X_GLrop_StencilFunc 162
3489 void
3490 __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
3491 {
3492 __GLXcontext *const gc = __glXGetCurrentContext();
3493 const GLuint cmdlen = 16;
3494 emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
3495 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3496 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3497 (void) memcpy((void *) (gc->pc + 12), (void *) (&mask), 4);
3498 gc->pc += cmdlen;
3499 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3500 (void) __glXFlushRenderBuffer(gc, gc->pc);
3501 }
3502 }
3503
3504 #define X_GLrop_StencilOp 163
3505 void
3506 __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
3507 {
3508 __GLXcontext *const gc = __glXGetCurrentContext();
3509 const GLuint cmdlen = 16;
3510 emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
3511 (void) memcpy((void *) (gc->pc + 4), (void *) (&fail), 4);
3512 (void) memcpy((void *) (gc->pc + 8), (void *) (&zfail), 4);
3513 (void) memcpy((void *) (gc->pc + 12), (void *) (&zpass), 4);
3514 gc->pc += cmdlen;
3515 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3516 (void) __glXFlushRenderBuffer(gc, gc->pc);
3517 }
3518 }
3519
3520 #define X_GLrop_DepthFunc 164
3521 void
3522 __indirect_glDepthFunc(GLenum func)
3523 {
3524 __GLXcontext *const gc = __glXGetCurrentContext();
3525 const GLuint cmdlen = 8;
3526 emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
3527 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3528 gc->pc += cmdlen;
3529 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3530 (void) __glXFlushRenderBuffer(gc, gc->pc);
3531 }
3532 }
3533
3534 #define X_GLrop_PixelZoom 165
3535 void
3536 __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
3537 {
3538 __GLXcontext *const gc = __glXGetCurrentContext();
3539 const GLuint cmdlen = 12;
3540 emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
3541 (void) memcpy((void *) (gc->pc + 4), (void *) (&xfactor), 4);
3542 (void) memcpy((void *) (gc->pc + 8), (void *) (&yfactor), 4);
3543 gc->pc += cmdlen;
3544 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3545 (void) __glXFlushRenderBuffer(gc, gc->pc);
3546 }
3547 }
3548
3549 #define X_GLrop_PixelTransferf 166
3550 void
3551 __indirect_glPixelTransferf(GLenum pname, GLfloat param)
3552 {
3553 __GLXcontext *const gc = __glXGetCurrentContext();
3554 const GLuint cmdlen = 12;
3555 emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
3556 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3557 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3558 gc->pc += cmdlen;
3559 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3560 (void) __glXFlushRenderBuffer(gc, gc->pc);
3561 }
3562 }
3563
3564 #define X_GLrop_PixelTransferi 167
3565 void
3566 __indirect_glPixelTransferi(GLenum pname, GLint param)
3567 {
3568 __GLXcontext *const gc = __glXGetCurrentContext();
3569 const GLuint cmdlen = 12;
3570 emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
3571 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3572 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3573 gc->pc += cmdlen;
3574 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3575 (void) __glXFlushRenderBuffer(gc, gc->pc);
3576 }
3577 }
3578
3579 #define X_GLrop_PixelMapfv 168
3580 void
3581 __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
3582 {
3583 __GLXcontext *const gc = __glXGetCurrentContext();
3584 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3585 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3586 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3587 if ((gc->pc + cmdlen) > gc->bufEnd) {
3588 (void) __glXFlushRenderBuffer(gc, gc->pc);
3589 }
3590 emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
3591 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3592 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3593 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3594 (mapsize * 4));
3595 gc->pc += cmdlen;
3596 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3597 (void) __glXFlushRenderBuffer(gc, gc->pc);
3598 }
3599 } else {
3600 const GLint op = X_GLrop_PixelMapfv;
3601 const GLuint cmdlenLarge = cmdlen + 4;
3602 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3603 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3604 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3605 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3606 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3607 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3608 }
3609 }
3610 }
3611
3612 #define X_GLrop_PixelMapuiv 169
3613 void
3614 __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
3615 {
3616 __GLXcontext *const gc = __glXGetCurrentContext();
3617 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3618 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3619 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3620 if ((gc->pc + cmdlen) > gc->bufEnd) {
3621 (void) __glXFlushRenderBuffer(gc, gc->pc);
3622 }
3623 emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
3624 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3625 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3626 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3627 (mapsize * 4));
3628 gc->pc += cmdlen;
3629 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3630 (void) __glXFlushRenderBuffer(gc, gc->pc);
3631 }
3632 } else {
3633 const GLint op = X_GLrop_PixelMapuiv;
3634 const GLuint cmdlenLarge = cmdlen + 4;
3635 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3636 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3637 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3638 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3639 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3640 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3641 }
3642 }
3643 }
3644
3645 #define X_GLrop_PixelMapusv 170
3646 void
3647 __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
3648 {
3649 __GLXcontext *const gc = __glXGetCurrentContext();
3650 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
3651 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3652 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3653 if ((gc->pc + cmdlen) > gc->bufEnd) {
3654 (void) __glXFlushRenderBuffer(gc, gc->pc);
3655 }
3656 emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
3657 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3658 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3659 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3660 (mapsize * 2));
3661 gc->pc += cmdlen;
3662 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3663 (void) __glXFlushRenderBuffer(gc, gc->pc);
3664 }
3665 } else {
3666 const GLint op = X_GLrop_PixelMapusv;
3667 const GLuint cmdlenLarge = cmdlen + 4;
3668 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3669 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3670 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3671 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3672 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3673 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
3674 }
3675 }
3676 }
3677
3678 #define X_GLrop_ReadBuffer 171
3679 void
3680 __indirect_glReadBuffer(GLenum mode)
3681 {
3682 __GLXcontext *const gc = __glXGetCurrentContext();
3683 const GLuint cmdlen = 8;
3684 emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
3685 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3686 gc->pc += cmdlen;
3687 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3688 (void) __glXFlushRenderBuffer(gc, gc->pc);
3689 }
3690 }
3691
3692 #define X_GLrop_CopyPixels 172
3693 void
3694 __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3695 GLenum type)
3696 {
3697 __GLXcontext *const gc = __glXGetCurrentContext();
3698 const GLuint cmdlen = 24;
3699 emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
3700 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
3701 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
3702 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
3703 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
3704 (void) memcpy((void *) (gc->pc + 20), (void *) (&type), 4);
3705 gc->pc += cmdlen;
3706 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3707 (void) __glXFlushRenderBuffer(gc, gc->pc);
3708 }
3709 }
3710
3711 #define X_GLsop_ReadPixels 111
3712 void
3713 __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3714 GLenum format, GLenum type, GLvoid * pixels)
3715 {
3716 __GLXcontext *const gc = __glXGetCurrentContext();
3717 const __GLXattribute *const state = gc->client_state_private;
3718 Display *const dpy = gc->currentDpy;
3719 const GLuint cmdlen = 28;
3720 if (__builtin_expect(dpy != NULL, 1)) {
3721 #ifdef USE_XCB
3722 xcb_connection_t *c = XGetXCBConnection(dpy);
3723 (void) __glXFlushRenderBuffer(gc, gc->pc);
3724 xcb_glx_read_pixels_reply_t *reply =
3725 xcb_glx_read_pixels_reply(c,
3726 xcb_glx_read_pixels(c,
3727 gc->
3728 currentContextTag,
3729 x, y, width, height,
3730 format, type,
3731 state->storePack.
3732 swapEndian, 0),
3733 NULL);
3734 (void) memcpy(pixels, xcb_glx_read_pixels_data(reply),
3735 xcb_glx_read_pixels_data_length(reply) *
3736 sizeof(GLvoid));
3737 free(reply);
3738 #else
3739 GLubyte const *pc =
3740 __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
3741 (void) memcpy((void *) (pc + 0), (void *) (&x), 4);
3742 (void) memcpy((void *) (pc + 4), (void *) (&y), 4);
3743 (void) memcpy((void *) (pc + 8), (void *) (&width), 4);
3744 (void) memcpy((void *) (pc + 12), (void *) (&height), 4);
3745 (void) memcpy((void *) (pc + 16), (void *) (&format), 4);
3746 (void) memcpy((void *) (pc + 20), (void *) (&type), 4);
3747 *(int32_t *) (pc + 24) = 0;
3748 *(int8_t *) (pc + 24) = state->storePack.swapEndian;
3749 __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type,
3750 pixels, GL_FALSE);
3751 UnlockDisplay(dpy);
3752 SyncHandle();
3753 #endif /* USE_XCB */
3754 }
3755 return;
3756 }
3757
3758 #define X_GLrop_DrawPixels 173
3759 void
3760 __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format,
3761 GLenum type, const GLvoid * pixels)
3762 {
3763 __GLXcontext *const gc = __glXGetCurrentContext();
3764 const GLuint compsize =
3765 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
3766 0) : 0;
3767 const GLuint cmdlen = 40 + __GLX_PAD(compsize);
3768 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
3769 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3770 if ((gc->pc + cmdlen) > gc->bufEnd) {
3771 (void) __glXFlushRenderBuffer(gc, gc->pc);
3772 }
3773 emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
3774 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
3775 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
3776 (void) memcpy((void *) (gc->pc + 32), (void *) (&format), 4);
3777 (void) memcpy((void *) (gc->pc + 36), (void *) (&type), 4);
3778 if (compsize > 0) {
3779 (*gc->fillImage) (gc, 2, width, height, 1, format, type,
3780 pixels, gc->pc + 40, gc->pc + 4);
3781 } else {
3782 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
3783 default_pixel_store_2D_size);
3784 }
3785 gc->pc += cmdlen;
3786 if (gc->pc > gc->limit) {
3787 (void) __glXFlushRenderBuffer(gc, gc->pc);
3788 }
3789 } else {
3790 const GLint op = X_GLrop_DrawPixels;
3791 const GLuint cmdlenLarge = cmdlen + 4;
3792 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3793 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3794 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3795 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
3796 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
3797 (void) memcpy((void *) (pc + 36), (void *) (&format), 4);
3798 (void) memcpy((void *) (pc + 40), (void *) (&type), 4);
3799 __glXSendLargeImage(gc, compsize, 2, width, height, 1, format,
3800 type, pixels, pc + 44, pc + 8);
3801 }
3802 }
3803 }
3804
3805 #define X_GLsop_GetClipPlane 113
3806 void
3807 __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
3808 {
3809 __GLXcontext *const gc = __glXGetCurrentContext();
3810 Display *const dpy = gc->currentDpy;
3811 const GLuint cmdlen = 4;
3812 if (__builtin_expect(dpy != NULL, 1)) {
3813 #ifdef USE_XCB
3814 xcb_connection_t *c = XGetXCBConnection(dpy);
3815 (void) __glXFlushRenderBuffer(gc, gc->pc);
3816 xcb_glx_get_clip_plane_reply_t *reply =
3817 xcb_glx_get_clip_plane_reply(c,
3818 xcb_glx_get_clip_plane(c,
3819 gc->
3820 currentContextTag,
3821 plane), NULL);
3822 (void) memcpy(equation, xcb_glx_get_clip_plane_data(reply),
3823 xcb_glx_get_clip_plane_data_length(reply) *
3824 sizeof(GLdouble));
3825 free(reply);
3826 #else
3827 GLubyte const *pc =
3828 __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
3829 (void) memcpy((void *) (pc + 0), (void *) (&plane), 4);
3830 (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
3831 UnlockDisplay(dpy);
3832 SyncHandle();
3833 #endif /* USE_XCB */
3834 }
3835 return;
3836 }
3837
3838 #define X_GLsop_GetLightfv 118
3839 void
3840 __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
3841 {
3842 __GLXcontext *const gc = __glXGetCurrentContext();
3843 Display *const dpy = gc->currentDpy;
3844 const GLuint cmdlen = 8;
3845 if (__builtin_expect(dpy != NULL, 1)) {
3846 #ifdef USE_XCB
3847 xcb_connection_t *c = XGetXCBConnection(dpy);
3848 (void) __glXFlushRenderBuffer(gc, gc->pc);
3849 xcb_glx_get_lightfv_reply_t *reply =
3850 xcb_glx_get_lightfv_reply(c,
3851 xcb_glx_get_lightfv(c,
3852 gc->
3853 currentContextTag,
3854 light, pname),
3855 NULL);
3856 if (xcb_glx_get_lightfv_data_length(reply) == 0)
3857 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3858 else
3859 (void) memcpy(params, xcb_glx_get_lightfv_data(reply),
3860 xcb_glx_get_lightfv_data_length(reply) *
3861 sizeof(GLfloat));
3862 free(reply);
3863 #else
3864 GLubyte const *pc =
3865 __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
3866 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3867 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3868 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3869 UnlockDisplay(dpy);
3870 SyncHandle();
3871 #endif /* USE_XCB */
3872 }
3873 return;
3874 }
3875
3876 #define X_GLsop_GetLightiv 119
3877 void
3878 __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
3879 {
3880 __GLXcontext *const gc = __glXGetCurrentContext();
3881 Display *const dpy = gc->currentDpy;
3882 const GLuint cmdlen = 8;
3883 if (__builtin_expect(dpy != NULL, 1)) {
3884 #ifdef USE_XCB
3885 xcb_connection_t *c = XGetXCBConnection(dpy);
3886 (void) __glXFlushRenderBuffer(gc, gc->pc);
3887 xcb_glx_get_lightiv_reply_t *reply =
3888 xcb_glx_get_lightiv_reply(c,
3889 xcb_glx_get_lightiv(c,
3890 gc->
3891 currentContextTag,
3892 light, pname),
3893 NULL);
3894 if (xcb_glx_get_lightiv_data_length(reply) == 0)
3895 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3896 else
3897 (void) memcpy(params, xcb_glx_get_lightiv_data(reply),
3898 xcb_glx_get_lightiv_data_length(reply) *
3899 sizeof(GLint));
3900 free(reply);
3901 #else
3902 GLubyte const *pc =
3903 __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
3904 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3905 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3906 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3907 UnlockDisplay(dpy);
3908 SyncHandle();
3909 #endif /* USE_XCB */
3910 }
3911 return;
3912 }
3913
3914 #define X_GLsop_GetMapdv 120
3915 void
3916 __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
3917 {
3918 __GLXcontext *const gc = __glXGetCurrentContext();
3919 Display *const dpy = gc->currentDpy;
3920 const GLuint cmdlen = 8;
3921 if (__builtin_expect(dpy != NULL, 1)) {
3922 #ifdef USE_XCB
3923 xcb_connection_t *c = XGetXCBConnection(dpy);
3924 (void) __glXFlushRenderBuffer(gc, gc->pc);
3925 xcb_glx_get_mapdv_reply_t *reply =
3926 xcb_glx_get_mapdv_reply(c,
3927 xcb_glx_get_mapdv(c,
3928 gc->currentContextTag,
3929 target, query), NULL);
3930 if (xcb_glx_get_mapdv_data_length(reply) == 0)
3931 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3932 else
3933 (void) memcpy(v, xcb_glx_get_mapdv_data(reply),
3934 xcb_glx_get_mapdv_data_length(reply) *
3935 sizeof(GLdouble));
3936 free(reply);
3937 #else
3938 GLubyte const *pc =
3939 __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
3940 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
3941 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3942 (void) __glXReadReply(dpy, 8, v, GL_FALSE);
3943 UnlockDisplay(dpy);
3944 SyncHandle();
3945 #endif /* USE_XCB */
3946 }
3947 return;
3948 }
3949
3950 #define X_GLsop_GetMapfv 121
3951 void
3952 __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
3953 {
3954 __GLXcontext *const gc = __glXGetCurrentContext();
3955 Display *const dpy = gc->currentDpy;
3956 const GLuint cmdlen = 8;
3957 if (__builtin_expect(dpy != NULL, 1)) {
3958 #ifdef USE_XCB
3959 xcb_connection_t *c = XGetXCBConnection(dpy);
3960 (void) __glXFlushRenderBuffer(gc, gc->pc);
3961 xcb_glx_get_mapfv_reply_t *reply =
3962 xcb_glx_get_mapfv_reply(c,
3963 xcb_glx_get_mapfv(c,
3964 gc->currentContextTag,
3965 target, query), NULL);
3966 if (xcb_glx_get_mapfv_data_length(reply) == 0)
3967 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3968 else
3969 (void) memcpy(v, xcb_glx_get_mapfv_data(reply),
3970 xcb_glx_get_mapfv_data_length(reply) *
3971 sizeof(GLfloat));
3972 free(reply);
3973 #else
3974 GLubyte const *pc =
3975 __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
3976 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
3977 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3978 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
3979 UnlockDisplay(dpy);
3980 SyncHandle();
3981 #endif /* USE_XCB */
3982 }
3983 return;
3984 }
3985
3986 #define X_GLsop_GetMapiv 122
3987 void
3988 __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
3989 {
3990 __GLXcontext *const gc = __glXGetCurrentContext();
3991 Display *const dpy = gc->currentDpy;
3992 const GLuint cmdlen = 8;
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_mapiv_reply_t *reply =
3998 xcb_glx_get_mapiv_reply(c,
3999 xcb_glx_get_mapiv(c,
4000 gc->currentContextTag,
4001 target, query), NULL);
4002 if (xcb_glx_get_mapiv_data_length(reply) == 0)
4003 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4004 else
4005 (void) memcpy(v, xcb_glx_get_mapiv_data(reply),
4006 xcb_glx_get_mapiv_data_length(reply) *
4007 sizeof(GLint));
4008 free(reply);
4009 #else
4010 GLubyte const *pc =
4011 __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
4012 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4013 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
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_GetMaterialfv 123
4023 void
4024 __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
4025 {
4026 __GLXcontext *const gc = __glXGetCurrentContext();
4027 Display *const dpy = gc->currentDpy;
4028 const GLuint cmdlen = 8;
4029 if (__builtin_expect(dpy != NULL, 1)) {
4030 #ifdef USE_XCB
4031 xcb_connection_t *c = XGetXCBConnection(dpy);
4032 (void) __glXFlushRenderBuffer(gc, gc->pc);
4033 xcb_glx_get_materialfv_reply_t *reply =
4034 xcb_glx_get_materialfv_reply(c,
4035 xcb_glx_get_materialfv(c,
4036 gc->
4037 currentContextTag,
4038 face, pname),
4039 NULL);
4040 if (xcb_glx_get_materialfv_data_length(reply) == 0)
4041 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4042 else
4043 (void) memcpy(params, xcb_glx_get_materialfv_data(reply),
4044 xcb_glx_get_materialfv_data_length(reply) *
4045 sizeof(GLfloat));
4046 free(reply);
4047 #else
4048 GLubyte const *pc =
4049 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
4050 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4051 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4052 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4053 UnlockDisplay(dpy);
4054 SyncHandle();
4055 #endif /* USE_XCB */
4056 }
4057 return;
4058 }
4059
4060 #define X_GLsop_GetMaterialiv 124
4061 void
4062 __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
4063 {
4064 __GLXcontext *const gc = __glXGetCurrentContext();
4065 Display *const dpy = gc->currentDpy;
4066 const GLuint cmdlen = 8;
4067 if (__builtin_expect(dpy != NULL, 1)) {
4068 #ifdef USE_XCB
4069 xcb_connection_t *c = XGetXCBConnection(dpy);
4070 (void) __glXFlushRenderBuffer(gc, gc->pc);
4071 xcb_glx_get_materialiv_reply_t *reply =
4072 xcb_glx_get_materialiv_reply(c,
4073 xcb_glx_get_materialiv(c,
4074 gc->
4075 currentContextTag,
4076 face, pname),
4077 NULL);
4078 if (xcb_glx_get_materialiv_data_length(reply) == 0)
4079 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4080 else
4081 (void) memcpy(params, xcb_glx_get_materialiv_data(reply),
4082 xcb_glx_get_materialiv_data_length(reply) *
4083 sizeof(GLint));
4084 free(reply);
4085 #else
4086 GLubyte const *pc =
4087 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
4088 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4089 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4090 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4091 UnlockDisplay(dpy);
4092 SyncHandle();
4093 #endif /* USE_XCB */
4094 }
4095 return;
4096 }
4097
4098 #define X_GLsop_GetPixelMapfv 125
4099 void
4100 __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
4101 {
4102 __GLXcontext *const gc = __glXGetCurrentContext();
4103 Display *const dpy = gc->currentDpy;
4104 const GLuint cmdlen = 4;
4105 if (__builtin_expect(dpy != NULL, 1)) {
4106 #ifdef USE_XCB
4107 xcb_connection_t *c = XGetXCBConnection(dpy);
4108 (void) __glXFlushRenderBuffer(gc, gc->pc);
4109 xcb_glx_get_pixel_mapfv_reply_t *reply =
4110 xcb_glx_get_pixel_mapfv_reply(c,
4111 xcb_glx_get_pixel_mapfv(c,
4112 gc->
4113 currentContextTag,
4114 map), NULL);
4115 if (xcb_glx_get_pixel_mapfv_data_length(reply) == 0)
4116 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4117 else
4118 (void) memcpy(values, xcb_glx_get_pixel_mapfv_data(reply),
4119 xcb_glx_get_pixel_mapfv_data_length(reply) *
4120 sizeof(GLfloat));
4121 free(reply);
4122 #else
4123 GLubyte const *pc =
4124 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
4125 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4126 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4127 UnlockDisplay(dpy);
4128 SyncHandle();
4129 #endif /* USE_XCB */
4130 }
4131 return;
4132 }
4133
4134 #define X_GLsop_GetPixelMapuiv 126
4135 void
4136 __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
4137 {
4138 __GLXcontext *const gc = __glXGetCurrentContext();
4139 Display *const dpy = gc->currentDpy;
4140 const GLuint cmdlen = 4;
4141 if (__builtin_expect(dpy != NULL, 1)) {
4142 #ifdef USE_XCB
4143 xcb_connection_t *c = XGetXCBConnection(dpy);
4144 (void) __glXFlushRenderBuffer(gc, gc->pc);
4145 xcb_glx_get_pixel_mapuiv_reply_t *reply =
4146 xcb_glx_get_pixel_mapuiv_reply(c,
4147 xcb_glx_get_pixel_mapuiv(c,
4148 gc->
4149 currentContextTag,
4150 map),
4151 NULL);
4152 if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 0)
4153 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4154 else
4155 (void) memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply),
4156 xcb_glx_get_pixel_mapuiv_data_length(reply) *
4157 sizeof(GLuint));
4158 free(reply);
4159 #else
4160 GLubyte const *pc =
4161 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
4162 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4163 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4164 UnlockDisplay(dpy);
4165 SyncHandle();
4166 #endif /* USE_XCB */
4167 }
4168 return;
4169 }
4170
4171 #define X_GLsop_GetPixelMapusv 127
4172 void
4173 __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
4174 {
4175 __GLXcontext *const gc = __glXGetCurrentContext();
4176 Display *const dpy = gc->currentDpy;
4177 const GLuint cmdlen = 4;
4178 if (__builtin_expect(dpy != NULL, 1)) {
4179 #ifdef USE_XCB
4180 xcb_connection_t *c = XGetXCBConnection(dpy);
4181 (void) __glXFlushRenderBuffer(gc, gc->pc);
4182 xcb_glx_get_pixel_mapusv_reply_t *reply =
4183 xcb_glx_get_pixel_mapusv_reply(c,
4184 xcb_glx_get_pixel_mapusv(c,
4185 gc->
4186 currentContextTag,
4187 map),
4188 NULL);
4189 if (xcb_glx_get_pixel_mapusv_data_length(reply) == 0)
4190 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4191 else
4192 (void) memcpy(values, xcb_glx_get_pixel_mapusv_data(reply),
4193 xcb_glx_get_pixel_mapusv_data_length(reply) *
4194 sizeof(GLushort));
4195 free(reply);
4196 #else
4197 GLubyte const *pc =
4198 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
4199 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4200 (void) __glXReadReply(dpy, 2, values, GL_FALSE);
4201 UnlockDisplay(dpy);
4202 SyncHandle();
4203 #endif /* USE_XCB */
4204 }
4205 return;
4206 }
4207
4208 #define X_GLsop_GetPolygonStipple 128
4209 void
4210 __indirect_glGetPolygonStipple(GLubyte *mask)
4211 {
4212 __GLXcontext *const gc = __glXGetCurrentContext();
4213 const __GLXattribute *const state = gc->client_state_private;
4214 Display *const dpy = gc->currentDpy;
4215 const GLuint cmdlen = 4;
4216 if (__builtin_expect(dpy != NULL, 1)) {
4217 #ifdef USE_XCB
4218 xcb_connection_t *c = XGetXCBConnection(dpy);
4219 (void) __glXFlushRenderBuffer(gc, gc->pc);
4220 xcb_glx_get_polygon_stipple_reply_t *reply =
4221 xcb_glx_get_polygon_stipple_reply(c,
4222 xcb_glx_get_polygon_stipple(c,
4223 gc->
4224 currentContextTag,
4225 0),
4226 NULL);
4227 (void) memcpy(mask, xcb_glx_get_polygon_stipple_data(reply),
4228 xcb_glx_get_polygon_stipple_data_length(reply) *
4229 sizeof(GLubyte));
4230 free(reply);
4231 #else
4232 GLubyte const *pc =
4233 __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
4234 *(int32_t *) (pc + 0) = 0;
4235 __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
4236 mask, GL_FALSE);
4237 UnlockDisplay(dpy);
4238 SyncHandle();
4239 #endif /* USE_XCB */
4240 }
4241 return;
4242 }
4243
4244 #define X_GLsop_GetTexEnvfv 130
4245 void
4246 __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
4247 {
4248 __GLXcontext *const gc = __glXGetCurrentContext();
4249 Display *const dpy = gc->currentDpy;
4250 const GLuint cmdlen = 8;
4251 if (__builtin_expect(dpy != NULL, 1)) {
4252 #ifdef USE_XCB
4253 xcb_connection_t *c = XGetXCBConnection(dpy);
4254 (void) __glXFlushRenderBuffer(gc, gc->pc);
4255 xcb_glx_get_tex_envfv_reply_t *reply =
4256 xcb_glx_get_tex_envfv_reply(c,
4257 xcb_glx_get_tex_envfv(c,
4258 gc->
4259 currentContextTag,
4260 target, pname),
4261 NULL);
4262 if (xcb_glx_get_tex_envfv_data_length(reply) == 0)
4263 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4264 else
4265 (void) memcpy(params, xcb_glx_get_tex_envfv_data(reply),
4266 xcb_glx_get_tex_envfv_data_length(reply) *
4267 sizeof(GLfloat));
4268 free(reply);
4269 #else
4270 GLubyte const *pc =
4271 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
4272 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4273 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4274 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4275 UnlockDisplay(dpy);
4276 SyncHandle();
4277 #endif /* USE_XCB */
4278 }
4279 return;
4280 }
4281
4282 #define X_GLsop_GetTexEnviv 131
4283 void
4284 __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
4285 {
4286 __GLXcontext *const gc = __glXGetCurrentContext();
4287 Display *const dpy = gc->currentDpy;
4288 const GLuint cmdlen = 8;
4289 if (__builtin_expect(dpy != NULL, 1)) {
4290 #ifdef USE_XCB
4291 xcb_connection_t *c = XGetXCBConnection(dpy);
4292 (void) __glXFlushRenderBuffer(gc, gc->pc);
4293 xcb_glx_get_tex_enviv_reply_t *reply =
4294 xcb_glx_get_tex_enviv_reply(c,
4295 xcb_glx_get_tex_enviv(c,
4296 gc->
4297 currentContextTag,
4298 target, pname),
4299 NULL);
4300 if (xcb_glx_get_tex_enviv_data_length(reply) == 0)
4301 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4302 else
4303 (void) memcpy(params, xcb_glx_get_tex_enviv_data(reply),
4304 xcb_glx_get_tex_enviv_data_length(reply) *
4305 sizeof(GLint));
4306 free(reply);
4307 #else
4308 GLubyte const *pc =
4309 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
4310 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4311 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4312 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4313 UnlockDisplay(dpy);
4314 SyncHandle();
4315 #endif /* USE_XCB */
4316 }
4317 return;
4318 }
4319
4320 #define X_GLsop_GetTexGendv 132
4321 void
4322 __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
4323 {
4324 __GLXcontext *const gc = __glXGetCurrentContext();
4325 Display *const dpy = gc->currentDpy;
4326 const GLuint cmdlen = 8;
4327 if (__builtin_expect(dpy != NULL, 1)) {
4328 #ifdef USE_XCB
4329 xcb_connection_t *c = XGetXCBConnection(dpy);
4330 (void) __glXFlushRenderBuffer(gc, gc->pc);
4331 xcb_glx_get_tex_gendv_reply_t *reply =
4332 xcb_glx_get_tex_gendv_reply(c,
4333 xcb_glx_get_tex_gendv(c,
4334 gc->
4335 currentContextTag,
4336 coord, pname),
4337 NULL);
4338 if (xcb_glx_get_tex_gendv_data_length(reply) == 0)
4339 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4340 else
4341 (void) memcpy(params, xcb_glx_get_tex_gendv_data(reply),
4342 xcb_glx_get_tex_gendv_data_length(reply) *
4343 sizeof(GLdouble));
4344 free(reply);
4345 #else
4346 GLubyte const *pc =
4347 __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
4348 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4349 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4350 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
4351 UnlockDisplay(dpy);
4352 SyncHandle();
4353 #endif /* USE_XCB */
4354 }
4355 return;
4356 }
4357
4358 #define X_GLsop_GetTexGenfv 133
4359 void
4360 __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
4361 {
4362 __GLXcontext *const gc = __glXGetCurrentContext();
4363 Display *const dpy = gc->currentDpy;
4364 const GLuint cmdlen = 8;
4365 if (__builtin_expect(dpy != NULL, 1)) {
4366 #ifdef USE_XCB
4367 xcb_connection_t *c = XGetXCBConnection(dpy);
4368 (void) __glXFlushRenderBuffer(gc, gc->pc);
4369 xcb_glx_get_tex_genfv_reply_t *reply =
4370 xcb_glx_get_tex_genfv_reply(c,
4371 xcb_glx_get_tex_genfv(c,
4372 gc->
4373 currentContextTag,
4374 coord, pname),
4375 NULL);
4376 if (xcb_glx_get_tex_genfv_data_length(reply) == 0)
4377 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4378 else
4379 (void) memcpy(params, xcb_glx_get_tex_genfv_data(reply),
4380 xcb_glx_get_tex_genfv_data_length(reply) *
4381 sizeof(GLfloat));
4382 free(reply);
4383 #else
4384 GLubyte const *pc =
4385 __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
4386 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4387 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4388 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4389 UnlockDisplay(dpy);
4390 SyncHandle();
4391 #endif /* USE_XCB */
4392 }
4393 return;
4394 }
4395
4396 #define X_GLsop_GetTexGeniv 134
4397 void
4398 __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
4399 {
4400 __GLXcontext *const gc = __glXGetCurrentContext();
4401 Display *const dpy = gc->currentDpy;
4402 const GLuint cmdlen = 8;
4403 if (__builtin_expect(dpy != NULL, 1)) {
4404 #ifdef USE_XCB
4405 xcb_connection_t *c = XGetXCBConnection(dpy);
4406 (void) __glXFlushRenderBuffer(gc, gc->pc);
4407 xcb_glx_get_tex_geniv_reply_t *reply =
4408 xcb_glx_get_tex_geniv_reply(c,
4409 xcb_glx_get_tex_geniv(c,
4410 gc->
4411 currentContextTag,
4412 coord, pname),
4413 NULL);
4414 if (xcb_glx_get_tex_geniv_data_length(reply) == 0)
4415 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4416 else
4417 (void) memcpy(params, xcb_glx_get_tex_geniv_data(reply),
4418 xcb_glx_get_tex_geniv_data_length(reply) *
4419 sizeof(GLint));
4420 free(reply);
4421 #else
4422 GLubyte const *pc =
4423 __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
4424 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4425 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4426 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4427 UnlockDisplay(dpy);
4428 SyncHandle();
4429 #endif /* USE_XCB */
4430 }
4431 return;
4432 }
4433
4434 #define X_GLsop_GetTexImage 135
4435 void
4436 __indirect_glGetTexImage(GLenum target, GLint level, GLenum format,
4437 GLenum type, GLvoid * pixels)
4438 {
4439 __GLXcontext *const gc = __glXGetCurrentContext();
4440 const __GLXattribute *const state = gc->client_state_private;
4441 Display *const dpy = gc->currentDpy;
4442 const GLuint cmdlen = 20;
4443 if (__builtin_expect(dpy != NULL, 1)) {
4444 #ifdef USE_XCB
4445 xcb_connection_t *c = XGetXCBConnection(dpy);
4446 (void) __glXFlushRenderBuffer(gc, gc->pc);
4447 xcb_glx_get_tex_image_reply_t *reply =
4448 xcb_glx_get_tex_image_reply(c,
4449 xcb_glx_get_tex_image(c,
4450 gc->
4451 currentContextTag,
4452 target, level,
4453 format, type,
4454 state->
4455 storePack.
4456 swapEndian),
4457 NULL);
4458 (void) memcpy(pixels, xcb_glx_get_tex_image_data(reply),
4459 xcb_glx_get_tex_image_data_length(reply) *
4460 sizeof(GLvoid));
4461 free(reply);
4462 #else
4463 GLubyte const *pc =
4464 __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
4465 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4466 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4467 (void) memcpy((void *) (pc + 8), (void *) (&format), 4);
4468 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
4469 *(int32_t *) (pc + 16) = 0;
4470 *(int8_t *) (pc + 16) = state->storePack.swapEndian;
4471 __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels,
4472 GL_TRUE);
4473 UnlockDisplay(dpy);
4474 SyncHandle();
4475 #endif /* USE_XCB */
4476 }
4477 return;
4478 }
4479
4480 #define X_GLsop_GetTexParameterfv 136
4481 void
4482 __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
4483 {
4484 __GLXcontext *const gc = __glXGetCurrentContext();
4485 Display *const dpy = gc->currentDpy;
4486 const GLuint cmdlen = 8;
4487 if (__builtin_expect(dpy != NULL, 1)) {
4488 #ifdef USE_XCB
4489 xcb_connection_t *c = XGetXCBConnection(dpy);
4490 (void) __glXFlushRenderBuffer(gc, gc->pc);
4491 xcb_glx_get_tex_parameterfv_reply_t *reply =
4492 xcb_glx_get_tex_parameterfv_reply(c,
4493 xcb_glx_get_tex_parameterfv(c,
4494 gc->
4495 currentContextTag,
4496 target,
4497 pname),
4498 NULL);
4499 if (xcb_glx_get_tex_parameterfv_data_length(reply) == 0)
4500 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4501 else
4502 (void) memcpy(params, xcb_glx_get_tex_parameterfv_data(reply),
4503 xcb_glx_get_tex_parameterfv_data_length(reply) *
4504 sizeof(GLfloat));
4505 free(reply);
4506 #else
4507 GLubyte const *pc =
4508 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
4509 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4510 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4511 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4512 UnlockDisplay(dpy);
4513 SyncHandle();
4514 #endif /* USE_XCB */
4515 }
4516 return;
4517 }
4518
4519 #define X_GLsop_GetTexParameteriv 137
4520 void
4521 __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
4522 {
4523 __GLXcontext *const gc = __glXGetCurrentContext();
4524 Display *const dpy = gc->currentDpy;
4525 const GLuint cmdlen = 8;
4526 if (__builtin_expect(dpy != NULL, 1)) {
4527 #ifdef USE_XCB
4528 xcb_connection_t *c = XGetXCBConnection(dpy);
4529 (void) __glXFlushRenderBuffer(gc, gc->pc);
4530 xcb_glx_get_tex_parameteriv_reply_t *reply =
4531 xcb_glx_get_tex_parameteriv_reply(c,
4532 xcb_glx_get_tex_parameteriv(c,
4533 gc->
4534 currentContextTag,
4535 target,
4536 pname),
4537 NULL);
4538 if (xcb_glx_get_tex_parameteriv_data_length(reply) == 0)
4539 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4540 else
4541 (void) memcpy(params, xcb_glx_get_tex_parameteriv_data(reply),
4542 xcb_glx_get_tex_parameteriv_data_length(reply) *
4543 sizeof(GLint));
4544 free(reply);
4545 #else
4546 GLubyte const *pc =
4547 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
4548 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4549 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4550 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4551 UnlockDisplay(dpy);
4552 SyncHandle();
4553 #endif /* USE_XCB */
4554 }
4555 return;
4556 }
4557
4558 #define X_GLsop_GetTexLevelParameterfv 138
4559 void
4560 __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
4561 GLfloat * params)
4562 {
4563 __GLXcontext *const gc = __glXGetCurrentContext();
4564 Display *const dpy = gc->currentDpy;
4565 const GLuint cmdlen = 12;
4566 if (__builtin_expect(dpy != NULL, 1)) {
4567 #ifdef USE_XCB
4568 xcb_connection_t *c = XGetXCBConnection(dpy);
4569 (void) __glXFlushRenderBuffer(gc, gc->pc);
4570 xcb_glx_get_tex_level_parameterfv_reply_t *reply =
4571 xcb_glx_get_tex_level_parameterfv_reply(c,
4572 xcb_glx_get_tex_level_parameterfv
4573 (c, gc->currentContextTag,
4574 target, level, pname),
4575 NULL);
4576 if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 0)
4577 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4578 else
4579 (void) memcpy(params,
4580 xcb_glx_get_tex_level_parameterfv_data(reply),
4581 xcb_glx_get_tex_level_parameterfv_data_length(reply)
4582 * sizeof(GLfloat));
4583 free(reply);
4584 #else
4585 GLubyte const *pc =
4586 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv,
4587 cmdlen);
4588 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4589 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4590 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4591 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4592 UnlockDisplay(dpy);
4593 SyncHandle();
4594 #endif /* USE_XCB */
4595 }
4596 return;
4597 }
4598
4599 #define X_GLsop_GetTexLevelParameteriv 139
4600 void
4601 __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
4602 GLint * params)
4603 {
4604 __GLXcontext *const gc = __glXGetCurrentContext();
4605 Display *const dpy = gc->currentDpy;
4606 const GLuint cmdlen = 12;
4607 if (__builtin_expect(dpy != NULL, 1)) {
4608 #ifdef USE_XCB
4609 xcb_connection_t *c = XGetXCBConnection(dpy);
4610 (void) __glXFlushRenderBuffer(gc, gc->pc);
4611 xcb_glx_get_tex_level_parameteriv_reply_t *reply =
4612 xcb_glx_get_tex_level_parameteriv_reply(c,
4613 xcb_glx_get_tex_level_parameteriv
4614 (c, gc->currentContextTag,
4615 target, level, pname),
4616 NULL);
4617 if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 0)
4618 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4619 else
4620 (void) memcpy(params,
4621 xcb_glx_get_tex_level_parameteriv_data(reply),
4622 xcb_glx_get_tex_level_parameteriv_data_length(reply)
4623 * sizeof(GLint));
4624 free(reply);
4625 #else
4626 GLubyte const *pc =
4627 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv,
4628 cmdlen);
4629 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4630 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4631 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4632 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4633 UnlockDisplay(dpy);
4634 SyncHandle();
4635 #endif /* USE_XCB */
4636 }
4637 return;
4638 }
4639
4640 #define X_GLsop_IsList 141
4641 GLboolean
4642 __indirect_glIsList(GLuint list)
4643 {
4644 __GLXcontext *const gc = __glXGetCurrentContext();
4645 Display *const dpy = gc->currentDpy;
4646 GLboolean retval = (GLboolean) 0;
4647 const GLuint cmdlen = 4;
4648 if (__builtin_expect(dpy != NULL, 1)) {
4649 #ifdef USE_XCB
4650 xcb_connection_t *c = XGetXCBConnection(dpy);
4651 (void) __glXFlushRenderBuffer(gc, gc->pc);
4652 xcb_glx_is_list_reply_t *reply =
4653 xcb_glx_is_list_reply(c,
4654 xcb_glx_is_list(c, gc->currentContextTag,
4655 list), NULL);
4656 retval = reply->ret_val;
4657 free(reply);
4658 #else
4659 GLubyte const *pc =
4660 __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
4661 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
4662 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4663 UnlockDisplay(dpy);
4664 SyncHandle();
4665 #endif /* USE_XCB */
4666 }
4667 return retval;
4668 }
4669
4670 #define X_GLrop_DepthRange 174
4671 void
4672 __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
4673 {
4674 __GLXcontext *const gc = __glXGetCurrentContext();
4675 const GLuint cmdlen = 20;
4676 emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
4677 (void) memcpy((void *) (gc->pc + 4), (void *) (&zNear), 8);
4678 (void) memcpy((void *) (gc->pc + 12), (void *) (&zFar), 8);
4679 gc->pc += cmdlen;
4680 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4681 (void) __glXFlushRenderBuffer(gc, gc->pc);
4682 }
4683 }
4684
4685 #define X_GLrop_Frustum 175
4686 void
4687 __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
4688 GLdouble top, GLdouble zNear, GLdouble zFar)
4689 {
4690 __GLXcontext *const gc = __glXGetCurrentContext();
4691 const GLuint cmdlen = 52;
4692 emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
4693 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4694 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4695 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4696 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4697 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4698 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4699 gc->pc += cmdlen;
4700 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4701 (void) __glXFlushRenderBuffer(gc, gc->pc);
4702 }
4703 }
4704
4705 #define X_GLrop_LoadIdentity 176
4706 void
4707 __indirect_glLoadIdentity(void)
4708 {
4709 __GLXcontext *const gc = __glXGetCurrentContext();
4710 const GLuint cmdlen = 4;
4711 emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
4712 gc->pc += cmdlen;
4713 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4714 (void) __glXFlushRenderBuffer(gc, gc->pc);
4715 }
4716 }
4717
4718 #define X_GLrop_LoadMatrixf 177
4719 void
4720 __indirect_glLoadMatrixf(const GLfloat * m)
4721 {
4722 __GLXcontext *const gc = __glXGetCurrentContext();
4723 const GLuint cmdlen = 68;
4724 emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
4725 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4726 gc->pc += cmdlen;
4727 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4728 (void) __glXFlushRenderBuffer(gc, gc->pc);
4729 }
4730 }
4731
4732 #define X_GLrop_LoadMatrixd 178
4733 void
4734 __indirect_glLoadMatrixd(const GLdouble * m)
4735 {
4736 __GLXcontext *const gc = __glXGetCurrentContext();
4737 const GLuint cmdlen = 132;
4738 emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
4739 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4740 gc->pc += cmdlen;
4741 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4742 (void) __glXFlushRenderBuffer(gc, gc->pc);
4743 }
4744 }
4745
4746 #define X_GLrop_MatrixMode 179
4747 void
4748 __indirect_glMatrixMode(GLenum mode)
4749 {
4750 __GLXcontext *const gc = __glXGetCurrentContext();
4751 const GLuint cmdlen = 8;
4752 emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
4753 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
4754 gc->pc += cmdlen;
4755 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4756 (void) __glXFlushRenderBuffer(gc, gc->pc);
4757 }
4758 }
4759
4760 #define X_GLrop_MultMatrixf 180
4761 void
4762 __indirect_glMultMatrixf(const GLfloat * m)
4763 {
4764 __GLXcontext *const gc = __glXGetCurrentContext();
4765 const GLuint cmdlen = 68;
4766 emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
4767 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4768 gc->pc += cmdlen;
4769 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4770 (void) __glXFlushRenderBuffer(gc, gc->pc);
4771 }
4772 }
4773
4774 #define X_GLrop_MultMatrixd 181
4775 void
4776 __indirect_glMultMatrixd(const GLdouble * m)
4777 {
4778 __GLXcontext *const gc = __glXGetCurrentContext();
4779 const GLuint cmdlen = 132;
4780 emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
4781 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4782 gc->pc += cmdlen;
4783 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4784 (void) __glXFlushRenderBuffer(gc, gc->pc);
4785 }
4786 }
4787
4788 #define X_GLrop_Ortho 182
4789 void
4790 __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
4791 GLdouble top, GLdouble zNear, GLdouble zFar)
4792 {
4793 __GLXcontext *const gc = __glXGetCurrentContext();
4794 const GLuint cmdlen = 52;
4795 emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
4796 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4797 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4798 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4799 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4800 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4801 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4802 gc->pc += cmdlen;
4803 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4804 (void) __glXFlushRenderBuffer(gc, gc->pc);
4805 }
4806 }
4807
4808 #define X_GLrop_PopMatrix 183
4809 void
4810 __indirect_glPopMatrix(void)
4811 {
4812 __GLXcontext *const gc = __glXGetCurrentContext();
4813 const GLuint cmdlen = 4;
4814 emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
4815 gc->pc += cmdlen;
4816 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4817 (void) __glXFlushRenderBuffer(gc, gc->pc);
4818 }
4819 }
4820
4821 #define X_GLrop_PushMatrix 184
4822 void
4823 __indirect_glPushMatrix(void)
4824 {
4825 __GLXcontext *const gc = __glXGetCurrentContext();
4826 const GLuint cmdlen = 4;
4827 emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
4828 gc->pc += cmdlen;
4829 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4830 (void) __glXFlushRenderBuffer(gc, gc->pc);
4831 }
4832 }
4833
4834 #define X_GLrop_Rotated 185
4835 void
4836 __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4837 {
4838 __GLXcontext *const gc = __glXGetCurrentContext();
4839 const GLuint cmdlen = 36;
4840 emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
4841 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 8);
4842 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
4843 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
4844 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
4845 gc->pc += cmdlen;
4846 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4847 (void) __glXFlushRenderBuffer(gc, gc->pc);
4848 }
4849 }
4850
4851 #define X_GLrop_Rotatef 186
4852 void
4853 __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
4854 {
4855 __GLXcontext *const gc = __glXGetCurrentContext();
4856 const GLuint cmdlen = 20;
4857 emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
4858 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 4);
4859 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
4860 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
4861 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
4862 gc->pc += cmdlen;
4863 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4864 (void) __glXFlushRenderBuffer(gc, gc->pc);
4865 }
4866 }
4867
4868 #define X_GLrop_Scaled 187
4869 void
4870 __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
4871 {
4872 __GLXcontext *const gc = __glXGetCurrentContext();
4873 const GLuint cmdlen = 28;
4874 emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
4875 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4876 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4877 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4878 gc->pc += cmdlen;
4879 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4880 (void) __glXFlushRenderBuffer(gc, gc->pc);
4881 }
4882 }
4883
4884 #define X_GLrop_Scalef 188
4885 void
4886 __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
4887 {
4888 __GLXcontext *const gc = __glXGetCurrentContext();
4889 const GLuint cmdlen = 16;
4890 emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
4891 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4892 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4893 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4894 gc->pc += cmdlen;
4895 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4896 (void) __glXFlushRenderBuffer(gc, gc->pc);
4897 }
4898 }
4899
4900 #define X_GLrop_Translated 189
4901 void
4902 __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
4903 {
4904 __GLXcontext *const gc = __glXGetCurrentContext();
4905 const GLuint cmdlen = 28;
4906 emit_header(gc->pc, X_GLrop_Translated, cmdlen);
4907 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4908 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4909 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4910 gc->pc += cmdlen;
4911 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4912 (void) __glXFlushRenderBuffer(gc, gc->pc);
4913 }
4914 }
4915
4916 #define X_GLrop_Translatef 190
4917 void
4918 __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
4919 {
4920 __GLXcontext *const gc = __glXGetCurrentContext();
4921 const GLuint cmdlen = 16;
4922 emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
4923 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4924 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4925 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4926 gc->pc += cmdlen;
4927 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4928 (void) __glXFlushRenderBuffer(gc, gc->pc);
4929 }
4930 }
4931
4932 #define X_GLrop_Viewport 191
4933 void
4934 __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
4935 {
4936 __GLXcontext *const gc = __glXGetCurrentContext();
4937 const GLuint cmdlen = 20;
4938 emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
4939 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4940 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4941 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
4942 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
4943 gc->pc += cmdlen;
4944 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4945 (void) __glXFlushRenderBuffer(gc, gc->pc);
4946 }
4947 }
4948
4949 #define X_GLrop_BindTexture 4117
4950 void
4951 __indirect_glBindTexture(GLenum target, GLuint texture)
4952 {
4953 __GLXcontext *const gc = __glXGetCurrentContext();
4954 const GLuint cmdlen = 12;
4955 emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
4956 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
4957 (void) memcpy((void *) (gc->pc + 8), (void *) (&texture), 4);
4958 gc->pc += cmdlen;
4959 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4960 (void) __glXFlushRenderBuffer(gc, gc->pc);
4961 }
4962 }
4963
4964 #define X_GLrop_Indexubv 194
4965 void
4966 __indirect_glIndexub(GLubyte c)
4967 {
4968 __GLXcontext *const gc = __glXGetCurrentContext();
4969 const GLuint cmdlen = 8;
4970 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4971 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 1);
4972 gc->pc += cmdlen;
4973 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4974 (void) __glXFlushRenderBuffer(gc, gc->pc);
4975 }
4976 }
4977
4978 #define X_GLrop_Indexubv 194
4979 void
4980 __indirect_glIndexubv(const GLubyte *c)
4981 {
4982 __GLXcontext *const gc = __glXGetCurrentContext();
4983 const GLuint cmdlen = 8;
4984 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
4985 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 1);
4986 gc->pc += cmdlen;
4987 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4988 (void) __glXFlushRenderBuffer(gc, gc->pc);
4989 }
4990 }
4991
4992 #define X_GLrop_PolygonOffset 192
4993 void
4994 __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
4995 {
4996 __GLXcontext *const gc = __glXGetCurrentContext();
4997 const GLuint cmdlen = 12;
4998 emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
4999 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
5000 (void) memcpy((void *) (gc->pc + 8), (void *) (&units), 4);
5001 gc->pc += cmdlen;
5002 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5003 (void) __glXFlushRenderBuffer(gc, gc->pc);
5004 }
5005 }
5006
5007 #define X_GLsop_AreTexturesResident 143
5008 GLboolean
5009 __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures,
5010 GLboolean * residences)
5011 {
5012 __GLXcontext *const gc = __glXGetCurrentContext();
5013 Display *const dpy = gc->currentDpy;
5014 GLboolean retval = (GLboolean) 0;
5015 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5016 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5017 #ifdef USE_XCB
5018 xcb_connection_t *c = XGetXCBConnection(dpy);
5019 (void) __glXFlushRenderBuffer(gc, gc->pc);
5020 xcb_glx_are_textures_resident_reply_t *reply =
5021 xcb_glx_are_textures_resident_reply(c,
5022 xcb_glx_are_textures_resident
5023 (c, gc->currentContextTag, n,
5024 textures), NULL);
5025 (void) memcpy(residences, xcb_glx_are_textures_resident_data(reply),
5026 xcb_glx_are_textures_resident_data_length(reply) *
5027 sizeof(GLboolean));
5028 retval = reply->ret_val;
5029 free(reply);
5030 #else
5031 GLubyte const *pc =
5032 __glXSetupSingleRequest(gc, X_GLsop_AreTexturesResident, cmdlen);
5033 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5034 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5035 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
5036 UnlockDisplay(dpy);
5037 SyncHandle();
5038 #endif /* USE_XCB */
5039 }
5040 return retval;
5041 }
5042
5043 #define X_GLvop_AreTexturesResidentEXT 11
5044 GLboolean
5045 glAreTexturesResidentEXT(GLsizei n, const GLuint * textures,
5046 GLboolean * residences)
5047 {
5048 __GLXcontext *const gc = __glXGetCurrentContext();
5049
5050 if (gc->isDirect) {
5051 return CALL_AreTexturesResident(GET_DISPATCH(),
5052 (n, textures, residences));
5053 } else {
5054 __GLXcontext *const gc = __glXGetCurrentContext();
5055 Display *const dpy = gc->currentDpy;
5056 GLboolean retval = (GLboolean) 0;
5057 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5058 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5059 GLubyte const *pc =
5060 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5061 X_GLvop_AreTexturesResidentEXT,
5062 cmdlen);
5063 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5064 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5065 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
5066 UnlockDisplay(dpy);
5067 SyncHandle();
5068 }
5069 return retval;
5070 }
5071 }
5072
5073 #define X_GLrop_CopyTexImage1D 4119
5074 void
5075 __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
5076 GLint x, GLint y, GLsizei width, GLint border)
5077 {
5078 __GLXcontext *const gc = __glXGetCurrentContext();
5079 const GLuint cmdlen = 32;
5080 emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
5081 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5082 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5083 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5084 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5085 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5086 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5087 (void) memcpy((void *) (gc->pc + 28), (void *) (&border), 4);
5088 gc->pc += cmdlen;
5089 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5090 (void) __glXFlushRenderBuffer(gc, gc->pc);
5091 }
5092 }
5093
5094 #define X_GLrop_CopyTexImage2D 4120
5095 void
5096 __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
5097 GLint x, GLint y, GLsizei width, GLsizei height,
5098 GLint border)
5099 {
5100 __GLXcontext *const gc = __glXGetCurrentContext();
5101 const GLuint cmdlen = 36;
5102 emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
5103 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5104 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5105 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5106 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5107 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5108 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5109 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
5110 (void) memcpy((void *) (gc->pc + 32), (void *) (&border), 4);
5111 gc->pc += cmdlen;
5112 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5113 (void) __glXFlushRenderBuffer(gc, gc->pc);
5114 }
5115 }
5116
5117 #define X_GLrop_CopyTexSubImage1D 4121
5118 void
5119 __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5120 GLint x, GLint y, GLsizei width)
5121 {
5122 __GLXcontext *const gc = __glXGetCurrentContext();
5123 const GLuint cmdlen = 28;
5124 emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
5125 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5126 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5127 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5128 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5129 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5130 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5131 gc->pc += cmdlen;
5132 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5133 (void) __glXFlushRenderBuffer(gc, gc->pc);
5134 }
5135 }
5136
5137 #define X_GLrop_CopyTexSubImage2D 4122
5138 void
5139 __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5140 GLint yoffset, GLint x, GLint y, GLsizei width,
5141 GLsizei height)
5142 {
5143 __GLXcontext *const gc = __glXGetCurrentContext();
5144 const GLuint cmdlen = 36;
5145 emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
5146 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5147 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5148 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5149 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
5150 (void) memcpy((void *) (gc->pc + 20), (void *) (&x), 4);
5151 (void) memcpy((void *) (gc->pc + 24), (void *) (&y), 4);
5152 (void) memcpy((void *) (gc->pc + 28), (void *) (&width), 4);
5153 (void) memcpy((void *) (gc->pc + 32), (void *) (&height), 4);
5154 gc->pc += cmdlen;
5155 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5156 (void) __glXFlushRenderBuffer(gc, gc->pc);
5157 }
5158 }
5159
5160 #define X_GLsop_DeleteTextures 144
5161 void
5162 __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
5163 {
5164 __GLXcontext *const gc = __glXGetCurrentContext();
5165 Display *const dpy = gc->currentDpy;
5166 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5167 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5168 #ifdef USE_XCB
5169 xcb_connection_t *c = XGetXCBConnection(dpy);
5170 (void) __glXFlushRenderBuffer(gc, gc->pc);
5171 xcb_glx_delete_textures(c, gc->currentContextTag, n, textures);
5172 #else
5173 GLubyte const *pc =
5174 __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
5175 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5176 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5177 UnlockDisplay(dpy);
5178 SyncHandle();
5179 #endif /* USE_XCB */
5180 }
5181 return;
5182 }
5183
5184 #define X_GLvop_DeleteTexturesEXT 12
5185 void
5186 glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
5187 {
5188 __GLXcontext *const gc = __glXGetCurrentContext();
5189
5190 if (gc->isDirect) {
5191 CALL_DeleteTextures(GET_DISPATCH(), (n, textures));
5192 } else {
5193 __GLXcontext *const gc = __glXGetCurrentContext();
5194 Display *const dpy = gc->currentDpy;
5195 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5196 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5197 GLubyte const *pc =
5198 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
5199 X_GLvop_DeleteTexturesEXT, cmdlen);
5200 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5201 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5202 UnlockDisplay(dpy);
5203 SyncHandle();
5204 }
5205 return;
5206 }
5207 }
5208
5209 #define X_GLsop_GenTextures 145
5210 void
5211 __indirect_glGenTextures(GLsizei n, GLuint * textures)
5212 {
5213 __GLXcontext *const gc = __glXGetCurrentContext();
5214 Display *const dpy = gc->currentDpy;
5215 const GLuint cmdlen = 4;
5216 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5217 #ifdef USE_XCB
5218 xcb_connection_t *c = XGetXCBConnection(dpy);
5219 (void) __glXFlushRenderBuffer(gc, gc->pc);
5220 xcb_glx_gen_textures_reply_t *reply =
5221 xcb_glx_gen_textures_reply(c,
5222 xcb_glx_gen_textures(c,
5223 gc->
5224 currentContextTag,
5225 n), NULL);
5226 (void) memcpy(textures, xcb_glx_gen_textures_data(reply),
5227 xcb_glx_gen_textures_data_length(reply) *
5228 sizeof(GLuint));
5229 free(reply);
5230 #else
5231 GLubyte const *pc =
5232 __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
5233 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5234 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5235 UnlockDisplay(dpy);
5236 SyncHandle();
5237 #endif /* USE_XCB */
5238 }
5239 return;
5240 }
5241
5242 #define X_GLvop_GenTexturesEXT 13
5243 void
5244 glGenTexturesEXT(GLsizei n, GLuint * textures)
5245 {
5246 __GLXcontext *const gc = __glXGetCurrentContext();
5247
5248 if (gc->isDirect) {
5249 CALL_GenTextures(GET_DISPATCH(), (n, textures));
5250 } else {
5251 __GLXcontext *const gc = __glXGetCurrentContext();
5252 Display *const dpy = gc->currentDpy;
5253 const GLuint cmdlen = 4;
5254 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5255 GLubyte const *pc =
5256 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5257 X_GLvop_GenTexturesEXT, cmdlen);
5258 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5259 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5260 UnlockDisplay(dpy);
5261 SyncHandle();
5262 }
5263 return;
5264 }
5265 }
5266
5267 #define X_GLsop_IsTexture 146
5268 GLboolean
5269 __indirect_glIsTexture(GLuint texture)
5270 {
5271 __GLXcontext *const gc = __glXGetCurrentContext();
5272 Display *const dpy = gc->currentDpy;
5273 GLboolean retval = (GLboolean) 0;
5274 const GLuint cmdlen = 4;
5275 if (__builtin_expect(dpy != NULL, 1)) {
5276 #ifdef USE_XCB
5277 xcb_connection_t *c = XGetXCBConnection(dpy);
5278 (void) __glXFlushRenderBuffer(gc, gc->pc);
5279 xcb_glx_is_texture_reply_t *reply =
5280 xcb_glx_is_texture_reply(c,
5281 xcb_glx_is_texture(c,
5282 gc->currentContextTag,
5283 texture), NULL);
5284 retval = reply->ret_val;
5285 free(reply);
5286 #else
5287 GLubyte const *pc =
5288 __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
5289 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5290 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5291 UnlockDisplay(dpy);
5292 SyncHandle();
5293 #endif /* USE_XCB */
5294 }
5295 return retval;
5296 }
5297
5298 #define X_GLvop_IsTextureEXT 14
5299 GLboolean
5300 glIsTextureEXT(GLuint texture)
5301 {
5302 __GLXcontext *const gc = __glXGetCurrentContext();
5303
5304 if (gc->isDirect) {
5305 return CALL_IsTexture(GET_DISPATCH(), (texture));
5306 } else {
5307 __GLXcontext *const gc = __glXGetCurrentContext();
5308 Display *const dpy = gc->currentDpy;
5309 GLboolean retval = (GLboolean) 0;
5310 const GLuint cmdlen = 4;
5311 if (__builtin_expect(dpy != NULL, 1)) {
5312 GLubyte const *pc =
5313 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5314 X_GLvop_IsTextureEXT, cmdlen);
5315 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5316 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5317 UnlockDisplay(dpy);
5318 SyncHandle();
5319 }
5320 return retval;
5321 }
5322 }
5323
5324 #define X_GLrop_PrioritizeTextures 4118
5325 void
5326 __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures,
5327 const GLclampf * priorities)
5328 {
5329 __GLXcontext *const gc = __glXGetCurrentContext();
5330 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
5331 if (__builtin_expect(n >= 0, 1)) {
5332 emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
5333 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
5334 (void) memcpy((void *) (gc->pc + 8), (void *) (textures), (n * 4));
5335 (void) memcpy((void *) (gc->pc + 8 + (n * 4)), (void *) (priorities),
5336 (n * 4));
5337 gc->pc += cmdlen;
5338 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5339 (void) __glXFlushRenderBuffer(gc, gc->pc);
5340 }
5341 }
5342 }
5343
5344 static void
5345 __glx_TexSubImage_1D2D(unsigned opcode, unsigned dim, GLenum target,
5346 GLint level, GLint xoffset, GLint yoffset,
5347 GLsizei width, GLsizei height, GLenum format,
5348 GLenum type, const GLvoid * pixels)
5349 {
5350 __GLXcontext *const gc = __glXGetCurrentContext();
5351 const GLuint compsize =
5352 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
5353 target) : 0;
5354 const GLuint cmdlen = 60 + __GLX_PAD(compsize);
5355 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5356 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5357 if ((gc->pc + cmdlen) > gc->bufEnd) {
5358 (void) __glXFlushRenderBuffer(gc, gc->pc);
5359 }
5360 emit_header(gc->pc, opcode, cmdlen);
5361 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5362 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
5363 (void) memcpy((void *) (gc->pc + 32), (void *) (&xoffset), 4);
5364 (void) memcpy((void *) (gc->pc + 36), (void *) (&yoffset), 4);
5365 (void) memcpy((void *) (gc->pc + 40), (void *) (&width), 4);
5366 (void) memcpy((void *) (gc->pc + 44), (void *) (&height), 4);
5367 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
5368 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
5369 (void) memcpy((void *) (gc->pc + 56),
5370 (void *) ((pixels == NULL) ? one : zero), 4);
5371 if (compsize > 0) {
5372 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5373 pixels, gc->pc + 60, gc->pc + 4);
5374 } else {
5375 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5376 default_pixel_store_2D_size);
5377 }
5378 gc->pc += cmdlen;
5379 if (gc->pc > gc->limit) {
5380 (void) __glXFlushRenderBuffer(gc, gc->pc);
5381 }
5382 } else {
5383 const GLint op = opcode;
5384 const GLuint cmdlenLarge = cmdlen + 4;
5385 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5386 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5387 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5388 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5389 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
5390 (void) memcpy((void *) (pc + 36), (void *) (&xoffset), 4);
5391 (void) memcpy((void *) (pc + 40), (void *) (&yoffset), 4);
5392 (void) memcpy((void *) (pc + 44), (void *) (&width), 4);
5393 (void) memcpy((void *) (pc + 48), (void *) (&height), 4);
5394 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
5395 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
5396 (void) memcpy((void *) (pc + 60), zero, 4);
5397 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5398 type, pixels, pc + 64, pc + 8);
5399 }
5400 }
5401 }
5402
5403 #define X_GLrop_TexSubImage1D 4099
5404 void
5405 __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5406 GLsizei width, GLenum format, GLenum type,
5407 const GLvoid * pixels)
5408 {
5409 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset,
5410 1, width, 1, format, type, pixels);
5411 }
5412
5413 #define X_GLrop_TexSubImage2D 4100
5414 void
5415 __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5416 GLint yoffset, GLsizei width, GLsizei height,
5417 GLenum format, GLenum type, const GLvoid * pixels)
5418 {
5419 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset,
5420 yoffset, width, height, format, type, pixels);
5421 }
5422
5423 #define X_GLrop_BlendColor 4096
5424 void
5425 __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue,
5426 GLclampf alpha)
5427 {
5428 __GLXcontext *const gc = __glXGetCurrentContext();
5429 const GLuint cmdlen = 20;
5430 emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
5431 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
5432 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
5433 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
5434 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
5435 gc->pc += cmdlen;
5436 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5437 (void) __glXFlushRenderBuffer(gc, gc->pc);
5438 }
5439 }
5440
5441 #define X_GLrop_BlendEquation 4097
5442 void
5443 __indirect_glBlendEquation(GLenum mode)
5444 {
5445 __GLXcontext *const gc = __glXGetCurrentContext();
5446 const GLuint cmdlen = 8;
5447 emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
5448 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
5449 gc->pc += cmdlen;
5450 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5451 (void) __glXFlushRenderBuffer(gc, gc->pc);
5452 }
5453 }
5454
5455 #define X_GLrop_ColorTable 2053
5456 void
5457 __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width,
5458 GLenum format, GLenum type, const GLvoid * table)
5459 {
5460 __GLXcontext *const gc = __glXGetCurrentContext();
5461 const GLuint compsize =
5462 (table != NULL) ? __glImageSize(width, 1, 1, format, type,
5463 target) : 0;
5464 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5465 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5466 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5467 if ((gc->pc + cmdlen) > gc->bufEnd) {
5468 (void) __glXFlushRenderBuffer(gc, gc->pc);
5469 }
5470 emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
5471 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5472 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5473 4);
5474 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5475 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5476 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5477 if (compsize > 0) {
5478 (*gc->fillImage) (gc, 1, width, 1, 1, format, type, table,
5479 gc->pc + 44, gc->pc + 4);
5480 } else {
5481 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5482 default_pixel_store_1D_size);
5483 }
5484 gc->pc += cmdlen;
5485 if (gc->pc > gc->limit) {
5486 (void) __glXFlushRenderBuffer(gc, gc->pc);
5487 }
5488 } else {
5489 const GLint op = X_GLrop_ColorTable;
5490 const GLuint cmdlenLarge = cmdlen + 4;
5491 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5492 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5493 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5494 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5495 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5496 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5497 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5498 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5499 __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type,
5500 table, pc + 48, pc + 8);
5501 }
5502 }
5503 }
5504
5505 #define X_GLrop_ColorTableParameterfv 2054
5506 void
5507 __indirect_glColorTableParameterfv(GLenum target, GLenum pname,
5508 const GLfloat * params)
5509 {
5510 __GLXcontext *const gc = __glXGetCurrentContext();
5511 const GLuint compsize = __glColorTableParameterfv_size(pname);
5512 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5513 emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
5514 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5515 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5516 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5517 gc->pc += cmdlen;
5518 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5519 (void) __glXFlushRenderBuffer(gc, gc->pc);
5520 }
5521 }
5522
5523 #define X_GLrop_ColorTableParameteriv 2055
5524 void
5525 __indirect_glColorTableParameteriv(GLenum target, GLenum pname,
5526 const GLint * params)
5527 {
5528 __GLXcontext *const gc = __glXGetCurrentContext();
5529 const GLuint compsize = __glColorTableParameteriv_size(pname);
5530 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5531 emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
5532 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5533 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5534 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5535 gc->pc += cmdlen;
5536 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5537 (void) __glXFlushRenderBuffer(gc, gc->pc);
5538 }
5539 }
5540
5541 #define X_GLrop_CopyColorTable 2056
5542 void
5543 __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x,
5544 GLint y, GLsizei width)
5545 {
5546 __GLXcontext *const gc = __glXGetCurrentContext();
5547 const GLuint cmdlen = 24;
5548 emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
5549 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5550 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
5551 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5552 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5553 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5554 gc->pc += cmdlen;
5555 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5556 (void) __glXFlushRenderBuffer(gc, gc->pc);
5557 }
5558 }
5559
5560 #define X_GLsop_GetColorTable 147
5561 void
5562 __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
5563 GLvoid * table)
5564 {
5565 __GLXcontext *const gc = __glXGetCurrentContext();
5566 const __GLXattribute *const state = gc->client_state_private;
5567 Display *const dpy = gc->currentDpy;
5568 const GLuint cmdlen = 16;
5569 if (__builtin_expect(dpy != NULL, 1)) {
5570 #ifdef USE_XCB
5571 xcb_connection_t *c = XGetXCBConnection(dpy);
5572 (void) __glXFlushRenderBuffer(gc, gc->pc);
5573 xcb_glx_get_color_table_reply_t *reply =
5574 xcb_glx_get_color_table_reply(c,
5575 xcb_glx_get_color_table(c,
5576 gc->
5577 currentContextTag,
5578 target,
5579 format,
5580 type,
5581 state->
5582 storePack.
5583 swapEndian),
5584 NULL);
5585 (void) memcpy(table, xcb_glx_get_color_table_data(reply),
5586 xcb_glx_get_color_table_data_length(reply) *
5587 sizeof(GLvoid));
5588 free(reply);
5589 #else
5590 GLubyte const *pc =
5591 __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
5592 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5593 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5594 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5595 *(int32_t *) (pc + 12) = 0;
5596 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5597 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5598 GL_TRUE);
5599 UnlockDisplay(dpy);
5600 SyncHandle();
5601 #endif /* USE_XCB */
5602 }
5603 return;
5604 }
5605
5606 #define X_GLvop_GetColorTableSGI 4098
5607 void
5608 glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
5609 {
5610 __GLXcontext *const gc = __glXGetCurrentContext();
5611
5612 if (gc->isDirect) {
5613 CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table));
5614 } else {
5615 __GLXcontext *const gc = __glXGetCurrentContext();
5616 const __GLXattribute *const state = gc->client_state_private;
5617 Display *const dpy = gc->currentDpy;
5618 const GLuint cmdlen = 16;
5619 if (__builtin_expect(dpy != NULL, 1)) {
5620 GLubyte const *pc =
5621 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5622 X_GLvop_GetColorTableSGI, cmdlen);
5623 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5624 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5625 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5626 *(int32_t *) (pc + 12) = 0;
5627 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5628 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5629 GL_TRUE);
5630 UnlockDisplay(dpy);
5631 SyncHandle();
5632 }
5633 return;
5634 }
5635 }
5636
5637 #define X_GLsop_GetColorTableParameterfv 148
5638 void
5639 __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
5640 GLfloat * params)
5641 {
5642 __GLXcontext *const gc = __glXGetCurrentContext();
5643 Display *const dpy = gc->currentDpy;
5644 const GLuint cmdlen = 8;
5645 if (__builtin_expect(dpy != NULL, 1)) {
5646 #ifdef USE_XCB
5647 xcb_connection_t *c = XGetXCBConnection(dpy);
5648 (void) __glXFlushRenderBuffer(gc, gc->pc);
5649 xcb_glx_get_color_table_parameterfv_reply_t *reply =
5650 xcb_glx_get_color_table_parameterfv_reply(c,
5651 xcb_glx_get_color_table_parameterfv
5652 (c,
5653 gc->currentContextTag,
5654 target, pname), NULL);
5655 if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 0)
5656 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5657 else
5658 (void) memcpy(params,
5659 xcb_glx_get_color_table_parameterfv_data(reply),
5660 xcb_glx_get_color_table_parameterfv_data_length
5661 (reply) * sizeof(GLfloat));
5662 free(reply);
5663 #else
5664 GLubyte const *pc =
5665 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv,
5666 cmdlen);
5667 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5668 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5669 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5670 UnlockDisplay(dpy);
5671 SyncHandle();
5672 #endif /* USE_XCB */
5673 }
5674 return;
5675 }
5676
5677 #define X_GLvop_GetColorTableParameterfvSGI 4099
5678 void
5679 glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
5680 {
5681 __GLXcontext *const gc = __glXGetCurrentContext();
5682
5683 if (gc->isDirect) {
5684 CALL_GetColorTableParameterfv(GET_DISPATCH(),
5685 (target, pname, params));
5686 } else {
5687 __GLXcontext *const gc = __glXGetCurrentContext();
5688 Display *const dpy = gc->currentDpy;
5689 const GLuint cmdlen = 8;
5690 if (__builtin_expect(dpy != NULL, 1)) {
5691 GLubyte const *pc =
5692 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5693 X_GLvop_GetColorTableParameterfvSGI,
5694 cmdlen);
5695 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5696 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5697 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5698 UnlockDisplay(dpy);
5699 SyncHandle();
5700 }
5701 return;
5702 }
5703 }
5704
5705 #define X_GLsop_GetColorTableParameteriv 149
5706 void
5707 __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
5708 GLint * params)
5709 {
5710 __GLXcontext *const gc = __glXGetCurrentContext();
5711 Display *const dpy = gc->currentDpy;
5712 const GLuint cmdlen = 8;
5713 if (__builtin_expect(dpy != NULL, 1)) {
5714 #ifdef USE_XCB
5715 xcb_connection_t *c = XGetXCBConnection(dpy);
5716 (void) __glXFlushRenderBuffer(gc, gc->pc);
5717 xcb_glx_get_color_table_parameteriv_reply_t *reply =
5718 xcb_glx_get_color_table_parameteriv_reply(c,
5719 xcb_glx_get_color_table_parameteriv
5720 (c,
5721 gc->currentContextTag,
5722 target, pname), NULL);
5723 if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 0)
5724 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5725 else
5726 (void) memcpy(params,
5727 xcb_glx_get_color_table_parameteriv_data(reply),
5728 xcb_glx_get_color_table_parameteriv_data_length
5729 (reply) * sizeof(GLint));
5730 free(reply);
5731 #else
5732 GLubyte const *pc =
5733 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv,
5734 cmdlen);
5735 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5736 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5737 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5738 UnlockDisplay(dpy);
5739 SyncHandle();
5740 #endif /* USE_XCB */
5741 }
5742 return;
5743 }
5744
5745 #define X_GLvop_GetColorTableParameterivSGI 4100
5746 void
5747 glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
5748 {
5749 __GLXcontext *const gc = __glXGetCurrentContext();
5750
5751 if (gc->isDirect) {
5752 CALL_GetColorTableParameteriv(GET_DISPATCH(),
5753 (target, pname, params));
5754 } else {
5755 __GLXcontext *const gc = __glXGetCurrentContext();
5756 Display *const dpy = gc->currentDpy;
5757 const GLuint cmdlen = 8;
5758 if (__builtin_expect(dpy != NULL, 1)) {
5759 GLubyte const *pc =
5760 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5761 X_GLvop_GetColorTableParameterivSGI,
5762 cmdlen);
5763 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5764 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5765 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5766 UnlockDisplay(dpy);
5767 SyncHandle();
5768 }
5769 return;
5770 }
5771 }
5772
5773 #define X_GLrop_ColorSubTable 195
5774 void
5775 __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count,
5776 GLenum format, GLenum type, const GLvoid * data)
5777 {
5778 __GLXcontext *const gc = __glXGetCurrentContext();
5779 const GLuint compsize =
5780 (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
5781 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5782 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5783 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5784 if ((gc->pc + cmdlen) > gc->bufEnd) {
5785 (void) __glXFlushRenderBuffer(gc, gc->pc);
5786 }
5787 emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
5788 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5789 (void) memcpy((void *) (gc->pc + 28), (void *) (&start), 4);
5790 (void) memcpy((void *) (gc->pc + 32), (void *) (&count), 4);
5791 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5792 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5793 if (compsize > 0) {
5794 (*gc->fillImage) (gc, 1, count, 1, 1, format, type, data,
5795 gc->pc + 44, gc->pc + 4);
5796 } else {
5797 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5798 default_pixel_store_1D_size);
5799 }
5800 gc->pc += cmdlen;
5801 if (gc->pc > gc->limit) {
5802 (void) __glXFlushRenderBuffer(gc, gc->pc);
5803 }
5804 } else {
5805 const GLint op = X_GLrop_ColorSubTable;
5806 const GLuint cmdlenLarge = cmdlen + 4;
5807 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5808 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5809 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5810 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5811 (void) memcpy((void *) (pc + 32), (void *) (&start), 4);
5812 (void) memcpy((void *) (pc + 36), (void *) (&count), 4);
5813 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5814 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5815 __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type,
5816 data, pc + 48, pc + 8);
5817 }
5818 }
5819 }
5820
5821 #define X_GLrop_CopyColorSubTable 196
5822 void
5823 __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y,
5824 GLsizei width)
5825 {
5826 __GLXcontext *const gc = __glXGetCurrentContext();
5827 const GLuint cmdlen = 24;
5828 emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
5829 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5830 (void) memcpy((void *) (gc->pc + 8), (void *) (&start), 4);
5831 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5832 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5833 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5834 gc->pc += cmdlen;
5835 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5836 (void) __glXFlushRenderBuffer(gc, gc->pc);
5837 }
5838 }
5839
5840 static void
5841 __glx_ConvolutionFilter_1D2D(unsigned opcode, unsigned dim, GLenum target,
5842 GLenum internalformat, GLsizei width,
5843 GLsizei height, GLenum format, GLenum type,
5844 const GLvoid * image)
5845 {
5846 __GLXcontext *const gc = __glXGetCurrentContext();
5847 const GLuint compsize =
5848 (image != NULL) ? __glImageSize(width, height, 1, format, type,
5849 target) : 0;
5850 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
5851 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5852 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5853 if ((gc->pc + cmdlen) > gc->bufEnd) {
5854 (void) __glXFlushRenderBuffer(gc, gc->pc);
5855 }
5856 emit_header(gc->pc, opcode, cmdlen);
5857 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5858 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5859 4);
5860 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5861 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
5862 (void) memcpy((void *) (gc->pc + 40), (void *) (&format), 4);
5863 (void) memcpy((void *) (gc->pc + 44), (void *) (&type), 4);
5864 if (compsize > 0) {
5865 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5866 image, gc->pc + 48, gc->pc + 4);
5867 } else {
5868 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5869 default_pixel_store_2D_size);
5870 }
5871 gc->pc += cmdlen;
5872 if (gc->pc > gc->limit) {
5873 (void) __glXFlushRenderBuffer(gc, gc->pc);
5874 }
5875 } else {
5876 const GLint op = opcode;
5877 const GLuint cmdlenLarge = cmdlen + 4;
5878 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5879 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5880 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5881 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5882 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5883 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5884 (void) memcpy((void *) (pc + 40), (void *) (&height), 4);
5885 (void) memcpy((void *) (pc + 44), (void *) (&format), 4);
5886 (void) memcpy((void *) (pc + 48), (void *) (&type), 4);
5887 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5888 type, image, pc + 52, pc + 8);
5889 }
5890 }
5891 }
5892
5893 #define X_GLrop_ConvolutionFilter1D 4101
5894 void
5895 __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat,
5896 GLsizei width, GLenum format, GLenum type,
5897 const GLvoid * image)
5898 {
5899 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target,
5900 internalformat, width, 1, format, type,
5901 image);
5902 }
5903
5904 #define X_GLrop_ConvolutionFilter2D 4102
5905 void
5906 __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat,
5907 GLsizei width, GLsizei height, GLenum format,
5908 GLenum type, const GLvoid * image)
5909 {
5910 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target,
5911 internalformat, width, height, format, type,
5912 image);
5913 }
5914
5915 #define X_GLrop_ConvolutionParameterf 4103
5916 void
5917 __indirect_glConvolutionParameterf(GLenum target, GLenum pname,
5918 GLfloat params)
5919 {
5920 __GLXcontext *const gc = __glXGetCurrentContext();
5921 const GLuint cmdlen = 16;
5922 emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
5923 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5924 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5925 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
5926 gc->pc += cmdlen;
5927 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5928 (void) __glXFlushRenderBuffer(gc, gc->pc);
5929 }
5930 }
5931
5932 #define X_GLrop_ConvolutionParameterfv 4104
5933 void
5934 __indirect_glConvolutionParameterfv(GLenum target, GLenum pname,
5935 const GLfloat * params)
5936 {
5937 __GLXcontext *const gc = __glXGetCurrentContext();
5938 const GLuint compsize = __glConvolutionParameterfv_size(pname);
5939 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5940 emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
5941 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5942 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5943 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5944 gc->pc += cmdlen;
5945 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5946 (void) __glXFlushRenderBuffer(gc, gc->pc);
5947 }
5948 }
5949
5950 #define X_GLrop_ConvolutionParameteri 4105
5951 void
5952 __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
5953 {
5954 __GLXcontext *const gc = __glXGetCurrentContext();
5955 const GLuint cmdlen = 16;
5956 emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
5957 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5958 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5959 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
5960 gc->pc += cmdlen;
5961 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5962 (void) __glXFlushRenderBuffer(gc, gc->pc);
5963 }
5964 }
5965
5966 #define X_GLrop_ConvolutionParameteriv 4106
5967 void
5968 __indirect_glConvolutionParameteriv(GLenum target, GLenum pname,
5969 const GLint * params)
5970 {
5971 __GLXcontext *const gc = __glXGetCurrentContext();
5972 const GLuint compsize = __glConvolutionParameteriv_size(pname);
5973 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5974 emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
5975 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5976 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5977 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5978 gc->pc += cmdlen;
5979 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5980 (void) __glXFlushRenderBuffer(gc, gc->pc);
5981 }
5982 }
5983
5984 #define X_GLrop_CopyConvolutionFilter1D 4107
5985 void
5986 __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat,
5987 GLint x, GLint y, GLsizei width)
5988 {
5989 __GLXcontext *const gc = __glXGetCurrentContext();
5990 const GLuint cmdlen = 24;
5991 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
5992 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5993 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
5994 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5995 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5996 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
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_CopyConvolutionFilter2D 4108
6004 void
6005 __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat,
6006 GLint x, GLint y, GLsizei width,
6007 GLsizei height)
6008 {
6009 __GLXcontext *const gc = __glXGetCurrentContext();
6010 const GLuint cmdlen = 28;
6011 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
6012 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6013 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6014 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
6015 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
6016 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
6017 (void) memcpy((void *) (gc->pc + 24), (void *) (&height), 4);
6018 gc->pc += cmdlen;
6019 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6020 (void) __glXFlushRenderBuffer(gc, gc->pc);
6021 }
6022 }
6023
6024 #define X_GLsop_GetConvolutionFilter 150
6025 void
6026 __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type,
6027 GLvoid * image)
6028 {
6029 __GLXcontext *const gc = __glXGetCurrentContext();
6030 const __GLXattribute *const state = gc->client_state_private;
6031 Display *const dpy = gc->currentDpy;
6032 const GLuint cmdlen = 16;
6033 if (__builtin_expect(dpy != NULL, 1)) {
6034 #ifdef USE_XCB
6035 xcb_connection_t *c = XGetXCBConnection(dpy);
6036 (void) __glXFlushRenderBuffer(gc, gc->pc);
6037 xcb_glx_get_convolution_filter_reply_t *reply =
6038 xcb_glx_get_convolution_filter_reply(c,
6039 xcb_glx_get_convolution_filter
6040 (c, gc->currentContextTag,
6041 target, format, type,
6042 state->storePack.
6043 swapEndian), NULL);
6044 (void) memcpy(image, xcb_glx_get_convolution_filter_data(reply),
6045 xcb_glx_get_convolution_filter_data_length(reply) *
6046 sizeof(GLvoid));
6047 free(reply);
6048 #else
6049 GLubyte const *pc =
6050 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
6051 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6052 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6053 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6054 *(int32_t *) (pc + 12) = 0;
6055 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6056 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6057 GL_TRUE);
6058 UnlockDisplay(dpy);
6059 SyncHandle();
6060 #endif /* USE_XCB */
6061 }
6062 return;
6063 }
6064
6065 #define X_GLvop_GetConvolutionFilterEXT 1
6066 void
6067 gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
6068 GLvoid * image)
6069 {
6070 __GLXcontext *const gc = __glXGetCurrentContext();
6071
6072 if (gc->isDirect) {
6073 CALL_GetConvolutionFilter(GET_DISPATCH(),
6074 (target, format, type, image));
6075 } else {
6076 __GLXcontext *const gc = __glXGetCurrentContext();
6077 const __GLXattribute *const state = gc->client_state_private;
6078 Display *const dpy = gc->currentDpy;
6079 const GLuint cmdlen = 16;
6080 if (__builtin_expect(dpy != NULL, 1)) {
6081 GLubyte const *pc =
6082 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6083 X_GLvop_GetConvolutionFilterEXT,
6084 cmdlen);
6085 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6086 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6087 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6088 *(int32_t *) (pc + 12) = 0;
6089 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6090 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6091 GL_TRUE);
6092 UnlockDisplay(dpy);
6093 SyncHandle();
6094 }
6095 return;
6096 }
6097 }
6098
6099 #define X_GLsop_GetConvolutionParameterfv 151
6100 void
6101 __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
6102 GLfloat * params)
6103 {
6104 __GLXcontext *const gc = __glXGetCurrentContext();
6105 Display *const dpy = gc->currentDpy;
6106 const GLuint cmdlen = 8;
6107 if (__builtin_expect(dpy != NULL, 1)) {
6108 #ifdef USE_XCB
6109 xcb_connection_t *c = XGetXCBConnection(dpy);
6110 (void) __glXFlushRenderBuffer(gc, gc->pc);
6111 xcb_glx_get_convolution_parameterfv_reply_t *reply =
6112 xcb_glx_get_convolution_parameterfv_reply(c,
6113 xcb_glx_get_convolution_parameterfv
6114 (c,
6115 gc->currentContextTag,
6116 target, pname), NULL);
6117 if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 0)
6118 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6119 else
6120 (void) memcpy(params,
6121 xcb_glx_get_convolution_parameterfv_data(reply),
6122 xcb_glx_get_convolution_parameterfv_data_length
6123 (reply) * sizeof(GLfloat));
6124 free(reply);
6125 #else
6126 GLubyte const *pc =
6127 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv,
6128 cmdlen);
6129 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6130 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6131 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6132 UnlockDisplay(dpy);
6133 SyncHandle();
6134 #endif /* USE_XCB */
6135 }
6136 return;
6137 }
6138
6139 #define X_GLvop_GetConvolutionParameterfvEXT 2
6140 void
6141 gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
6142 {
6143 __GLXcontext *const gc = __glXGetCurrentContext();
6144
6145 if (gc->isDirect) {
6146 CALL_GetConvolutionParameterfv(GET_DISPATCH(),
6147 (target, pname, params));
6148 } else {
6149 __GLXcontext *const gc = __glXGetCurrentContext();
6150 Display *const dpy = gc->currentDpy;
6151 const GLuint cmdlen = 8;
6152 if (__builtin_expect(dpy != NULL, 1)) {
6153 GLubyte const *pc =
6154 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6155 X_GLvop_GetConvolutionParameterfvEXT,
6156 cmdlen);
6157 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6158 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6159 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6160 UnlockDisplay(dpy);
6161 SyncHandle();
6162 }
6163 return;
6164 }
6165 }
6166
6167 #define X_GLsop_GetConvolutionParameteriv 152
6168 void
6169 __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
6170 GLint * params)
6171 {
6172 __GLXcontext *const gc = __glXGetCurrentContext();
6173 Display *const dpy = gc->currentDpy;
6174 const GLuint cmdlen = 8;
6175 if (__builtin_expect(dpy != NULL, 1)) {
6176 #ifdef USE_XCB
6177 xcb_connection_t *c = XGetXCBConnection(dpy);
6178 (void) __glXFlushRenderBuffer(gc, gc->pc);
6179 xcb_glx_get_convolution_parameteriv_reply_t *reply =
6180 xcb_glx_get_convolution_parameteriv_reply(c,
6181 xcb_glx_get_convolution_parameteriv
6182 (c,
6183 gc->currentContextTag,
6184 target, pname), NULL);
6185 if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 0)
6186 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6187 else
6188 (void) memcpy(params,
6189 xcb_glx_get_convolution_parameteriv_data(reply),
6190 xcb_glx_get_convolution_parameteriv_data_length
6191 (reply) * sizeof(GLint));
6192 free(reply);
6193 #else
6194 GLubyte const *pc =
6195 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv,
6196 cmdlen);
6197 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6198 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6199 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6200 UnlockDisplay(dpy);
6201 SyncHandle();
6202 #endif /* USE_XCB */
6203 }
6204 return;
6205 }
6206
6207 #define X_GLvop_GetConvolutionParameterivEXT 3
6208 void
6209 gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
6210 {
6211 __GLXcontext *const gc = __glXGetCurrentContext();
6212
6213 if (gc->isDirect) {
6214 CALL_GetConvolutionParameteriv(GET_DISPATCH(),
6215 (target, pname, params));
6216 } else {
6217 __GLXcontext *const gc = __glXGetCurrentContext();
6218 Display *const dpy = gc->currentDpy;
6219 const GLuint cmdlen = 8;
6220 if (__builtin_expect(dpy != NULL, 1)) {
6221 GLubyte const *pc =
6222 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6223 X_GLvop_GetConvolutionParameterivEXT,
6224 cmdlen);
6225 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6226 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6227 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6228 UnlockDisplay(dpy);
6229 SyncHandle();
6230 }
6231 return;
6232 }
6233 }
6234
6235 #define X_GLsop_GetHistogram 154
6236 void
6237 __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
6238 GLenum type, GLvoid * values)
6239 {
6240 __GLXcontext *const gc = __glXGetCurrentContext();
6241 const __GLXattribute *const state = gc->client_state_private;
6242 Display *const dpy = gc->currentDpy;
6243 const GLuint cmdlen = 16;
6244 if (__builtin_expect(dpy != NULL, 1)) {
6245 #ifdef USE_XCB
6246 xcb_connection_t *c = XGetXCBConnection(dpy);
6247 (void) __glXFlushRenderBuffer(gc, gc->pc);
6248 xcb_glx_get_histogram_reply_t *reply =
6249 xcb_glx_get_histogram_reply(c,
6250 xcb_glx_get_histogram(c,
6251 gc->
6252 currentContextTag,
6253 target, reset,
6254 format, type,
6255 state->
6256 storePack.
6257 swapEndian),
6258 NULL);
6259 (void) memcpy(values, xcb_glx_get_histogram_data(reply),
6260 xcb_glx_get_histogram_data_length(reply) *
6261 sizeof(GLvoid));
6262 free(reply);
6263 #else
6264 GLubyte const *pc =
6265 __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
6266 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6267 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6268 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6269 *(int32_t *) (pc + 12) = 0;
6270 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6271 *(int8_t *) (pc + 13) = reset;
6272 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6273 GL_TRUE);
6274 UnlockDisplay(dpy);
6275 SyncHandle();
6276 #endif /* USE_XCB */
6277 }
6278 return;
6279 }
6280
6281 #define X_GLvop_GetHistogramEXT 5
6282 void
6283 gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
6284 GLenum type, GLvoid * values)
6285 {
6286 __GLXcontext *const gc = __glXGetCurrentContext();
6287
6288 if (gc->isDirect) {
6289 CALL_GetHistogram(GET_DISPATCH(),
6290 (target, reset, format, type, values));
6291 } else {
6292 __GLXcontext *const gc = __glXGetCurrentContext();
6293 const __GLXattribute *const state = gc->client_state_private;
6294 Display *const dpy = gc->currentDpy;
6295 const GLuint cmdlen = 16;
6296 if (__builtin_expect(dpy != NULL, 1)) {
6297 GLubyte const *pc =
6298 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6299 X_GLvop_GetHistogramEXT, cmdlen);
6300 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6301 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6302 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6303 *(int32_t *) (pc + 12) = 0;
6304 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6305 *(int8_t *) (pc + 13) = reset;
6306 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6307 GL_TRUE);
6308 UnlockDisplay(dpy);
6309 SyncHandle();
6310 }
6311 return;
6312 }
6313 }
6314
6315 #define X_GLsop_GetHistogramParameterfv 155
6316 void
6317 __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
6318 GLfloat * params)
6319 {
6320 __GLXcontext *const gc = __glXGetCurrentContext();
6321 Display *const dpy = gc->currentDpy;
6322 const GLuint cmdlen = 8;
6323 if (__builtin_expect(dpy != NULL, 1)) {
6324 #ifdef USE_XCB
6325 xcb_connection_t *c = XGetXCBConnection(dpy);
6326 (void) __glXFlushRenderBuffer(gc, gc->pc);
6327 xcb_glx_get_histogram_parameterfv_reply_t *reply =
6328 xcb_glx_get_histogram_parameterfv_reply(c,
6329 xcb_glx_get_histogram_parameterfv
6330 (c, gc->currentContextTag,
6331 target, pname), NULL);
6332 if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 0)
6333 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6334 else
6335 (void) memcpy(params,
6336 xcb_glx_get_histogram_parameterfv_data(reply),
6337 xcb_glx_get_histogram_parameterfv_data_length(reply)
6338 * sizeof(GLfloat));
6339 free(reply);
6340 #else
6341 GLubyte const *pc =
6342 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv,
6343 cmdlen);
6344 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6345 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6346 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6347 UnlockDisplay(dpy);
6348 SyncHandle();
6349 #endif /* USE_XCB */
6350 }
6351 return;
6352 }
6353
6354 #define X_GLvop_GetHistogramParameterfvEXT 6
6355 void
6356 gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
6357 {
6358 __GLXcontext *const gc = __glXGetCurrentContext();
6359
6360 if (gc->isDirect) {
6361 CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params));
6362 } else {
6363 __GLXcontext *const gc = __glXGetCurrentContext();
6364 Display *const dpy = gc->currentDpy;
6365 const GLuint cmdlen = 8;
6366 if (__builtin_expect(dpy != NULL, 1)) {
6367 GLubyte const *pc =
6368 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6369 X_GLvop_GetHistogramParameterfvEXT,
6370 cmdlen);
6371 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6372 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6373 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6374 UnlockDisplay(dpy);
6375 SyncHandle();
6376 }
6377 return;
6378 }
6379 }
6380
6381 #define X_GLsop_GetHistogramParameteriv 156
6382 void
6383 __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
6384 GLint * params)
6385 {
6386 __GLXcontext *const gc = __glXGetCurrentContext();
6387 Display *const dpy = gc->currentDpy;
6388 const GLuint cmdlen = 8;
6389 if (__builtin_expect(dpy != NULL, 1)) {
6390 #ifdef USE_XCB
6391 xcb_connection_t *c = XGetXCBConnection(dpy);
6392 (void) __glXFlushRenderBuffer(gc, gc->pc);
6393 xcb_glx_get_histogram_parameteriv_reply_t *reply =
6394 xcb_glx_get_histogram_parameteriv_reply(c,
6395 xcb_glx_get_histogram_parameteriv
6396 (c, gc->currentContextTag,
6397 target, pname), NULL);
6398 if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 0)
6399 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6400 else
6401 (void) memcpy(params,
6402 xcb_glx_get_histogram_parameteriv_data(reply),
6403 xcb_glx_get_histogram_parameteriv_data_length(reply)
6404 * sizeof(GLint));
6405 free(reply);
6406 #else
6407 GLubyte const *pc =
6408 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv,
6409 cmdlen);
6410 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6411 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6412 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6413 UnlockDisplay(dpy);
6414 SyncHandle();
6415 #endif /* USE_XCB */
6416 }
6417 return;
6418 }
6419
6420 #define X_GLvop_GetHistogramParameterivEXT 7
6421 void
6422 gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
6423 {
6424 __GLXcontext *const gc = __glXGetCurrentContext();
6425
6426 if (gc->isDirect) {
6427 CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params));
6428 } else {
6429 __GLXcontext *const gc = __glXGetCurrentContext();
6430 Display *const dpy = gc->currentDpy;
6431 const GLuint cmdlen = 8;
6432 if (__builtin_expect(dpy != NULL, 1)) {
6433 GLubyte const *pc =
6434 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6435 X_GLvop_GetHistogramParameterivEXT,
6436 cmdlen);
6437 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6438 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6439 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6440 UnlockDisplay(dpy);
6441 SyncHandle();
6442 }
6443 return;
6444 }
6445 }
6446
6447 #define X_GLsop_GetMinmax 157
6448 void
6449 __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
6450 GLenum type, GLvoid * values)
6451 {
6452 __GLXcontext *const gc = __glXGetCurrentContext();
6453 const __GLXattribute *const state = gc->client_state_private;
6454 Display *const dpy = gc->currentDpy;
6455 const GLuint cmdlen = 16;
6456 if (__builtin_expect(dpy != NULL, 1)) {
6457 #ifdef USE_XCB
6458 xcb_connection_t *c = XGetXCBConnection(dpy);
6459 (void) __glXFlushRenderBuffer(gc, gc->pc);
6460 xcb_glx_get_minmax_reply_t *reply =
6461 xcb_glx_get_minmax_reply(c,
6462 xcb_glx_get_minmax(c,
6463 gc->currentContextTag,
6464 target, reset, format,
6465 type,
6466 state->storePack.
6467 swapEndian), NULL);
6468 (void) memcpy(values, xcb_glx_get_minmax_data(reply),
6469 xcb_glx_get_minmax_data_length(reply) * sizeof(GLvoid));
6470 free(reply);
6471 #else
6472 GLubyte const *pc =
6473 __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
6474 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6475 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6476 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6477 *(int32_t *) (pc + 12) = 0;
6478 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6479 *(int8_t *) (pc + 13) = reset;
6480 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6481 GL_FALSE);
6482 UnlockDisplay(dpy);
6483 SyncHandle();
6484 #endif /* USE_XCB */
6485 }
6486 return;
6487 }
6488
6489 #define X_GLvop_GetMinmaxEXT 8
6490 void
6491 gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
6492 GLenum type, GLvoid * values)
6493 {
6494 __GLXcontext *const gc = __glXGetCurrentContext();
6495
6496 if (gc->isDirect) {
6497 CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values));
6498 } else {
6499 __GLXcontext *const gc = __glXGetCurrentContext();
6500 const __GLXattribute *const state = gc->client_state_private;
6501 Display *const dpy = gc->currentDpy;
6502 const GLuint cmdlen = 16;
6503 if (__builtin_expect(dpy != NULL, 1)) {
6504 GLubyte const *pc =
6505 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6506 X_GLvop_GetMinmaxEXT, cmdlen);
6507 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6508 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6509 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6510 *(int32_t *) (pc + 12) = 0;
6511 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6512 *(int8_t *) (pc + 13) = reset;
6513 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6514 GL_FALSE);
6515 UnlockDisplay(dpy);
6516 SyncHandle();
6517 }
6518 return;
6519 }
6520 }
6521
6522 #define X_GLsop_GetMinmaxParameterfv 158
6523 void
6524 __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
6525 GLfloat * params)
6526 {
6527 __GLXcontext *const gc = __glXGetCurrentContext();
6528 Display *const dpy = gc->currentDpy;
6529 const GLuint cmdlen = 8;
6530 if (__builtin_expect(dpy != NULL, 1)) {
6531 #ifdef USE_XCB
6532 xcb_connection_t *c = XGetXCBConnection(dpy);
6533 (void) __glXFlushRenderBuffer(gc, gc->pc);
6534 xcb_glx_get_minmax_parameterfv_reply_t *reply =
6535 xcb_glx_get_minmax_parameterfv_reply(c,
6536 xcb_glx_get_minmax_parameterfv
6537 (c, gc->currentContextTag,
6538 target, pname), NULL);
6539 if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 0)
6540 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6541 else
6542 (void) memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply),
6543 xcb_glx_get_minmax_parameterfv_data_length(reply) *
6544 sizeof(GLfloat));
6545 free(reply);
6546 #else
6547 GLubyte const *pc =
6548 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
6549 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6550 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6551 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6552 UnlockDisplay(dpy);
6553 SyncHandle();
6554 #endif /* USE_XCB */
6555 }
6556 return;
6557 }
6558
6559 #define X_GLvop_GetMinmaxParameterfvEXT 9
6560 void
6561 gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
6562 {
6563 __GLXcontext *const gc = __glXGetCurrentContext();
6564
6565 if (gc->isDirect) {
6566 CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params));
6567 } else {
6568 __GLXcontext *const gc = __glXGetCurrentContext();
6569 Display *const dpy = gc->currentDpy;
6570 const GLuint cmdlen = 8;
6571 if (__builtin_expect(dpy != NULL, 1)) {
6572 GLubyte const *pc =
6573 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6574 X_GLvop_GetMinmaxParameterfvEXT,
6575 cmdlen);
6576 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6577 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6578 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6579 UnlockDisplay(dpy);
6580 SyncHandle();
6581 }
6582 return;
6583 }
6584 }
6585
6586 #define X_GLsop_GetMinmaxParameteriv 159
6587 void
6588 __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
6589 {
6590 __GLXcontext *const gc = __glXGetCurrentContext();
6591 Display *const dpy = gc->currentDpy;
6592 const GLuint cmdlen = 8;
6593 if (__builtin_expect(dpy != NULL, 1)) {
6594 #ifdef USE_XCB
6595 xcb_connection_t *c = XGetXCBConnection(dpy);
6596 (void) __glXFlushRenderBuffer(gc, gc->pc);
6597 xcb_glx_get_minmax_parameteriv_reply_t *reply =
6598 xcb_glx_get_minmax_parameteriv_reply(c,
6599 xcb_glx_get_minmax_parameteriv
6600 (c, gc->currentContextTag,
6601 target, pname), NULL);
6602 if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 0)
6603 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6604 else
6605 (void) memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply),
6606 xcb_glx_get_minmax_parameteriv_data_length(reply) *
6607 sizeof(GLint));
6608 free(reply);
6609 #else
6610 GLubyte const *pc =
6611 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
6612 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6613 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6614 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6615 UnlockDisplay(dpy);
6616 SyncHandle();
6617 #endif /* USE_XCB */
6618 }
6619 return;
6620 }
6621
6622 #define X_GLvop_GetMinmaxParameterivEXT 10
6623 void
6624 gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
6625 {
6626 __GLXcontext *const gc = __glXGetCurrentContext();
6627
6628 if (gc->isDirect) {
6629 CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params));
6630 } else {
6631 __GLXcontext *const gc = __glXGetCurrentContext();
6632 Display *const dpy = gc->currentDpy;
6633 const GLuint cmdlen = 8;
6634 if (__builtin_expect(dpy != NULL, 1)) {
6635 GLubyte const *pc =
6636 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6637 X_GLvop_GetMinmaxParameterivEXT,
6638 cmdlen);
6639 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6640 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6641 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6642 UnlockDisplay(dpy);
6643 SyncHandle();
6644 }
6645 return;
6646 }
6647 }
6648
6649 #define X_GLrop_Histogram 4110
6650 void
6651 __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
6652 GLboolean sink)
6653 {
6654 __GLXcontext *const gc = __glXGetCurrentContext();
6655 const GLuint cmdlen = 20;
6656 emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
6657 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6658 (void) memcpy((void *) (gc->pc + 8), (void *) (&width), 4);
6659 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
6660 (void) memcpy((void *) (gc->pc + 16), (void *) (&sink), 1);
6661 gc->pc += cmdlen;
6662 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6663 (void) __glXFlushRenderBuffer(gc, gc->pc);
6664 }
6665 }
6666
6667 #define X_GLrop_Minmax 4111
6668 void
6669 __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
6670 {
6671 __GLXcontext *const gc = __glXGetCurrentContext();
6672 const GLuint cmdlen = 16;
6673 emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
6674 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6675 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6676 (void) memcpy((void *) (gc->pc + 12), (void *) (&sink), 1);
6677 gc->pc += cmdlen;
6678 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6679 (void) __glXFlushRenderBuffer(gc, gc->pc);
6680 }
6681 }
6682
6683 #define X_GLrop_ResetHistogram 4112
6684 void
6685 __indirect_glResetHistogram(GLenum target)
6686 {
6687 __GLXcontext *const gc = __glXGetCurrentContext();
6688 const GLuint cmdlen = 8;
6689 emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
6690 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6691 gc->pc += cmdlen;
6692 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6693 (void) __glXFlushRenderBuffer(gc, gc->pc);
6694 }
6695 }
6696
6697 #define X_GLrop_ResetMinmax 4113
6698 void
6699 __indirect_glResetMinmax(GLenum target)
6700 {
6701 __GLXcontext *const gc = __glXGetCurrentContext();
6702 const GLuint cmdlen = 8;
6703 emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
6704 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6705 gc->pc += cmdlen;
6706 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6707 (void) __glXFlushRenderBuffer(gc, gc->pc);
6708 }
6709 }
6710
6711 static void
6712 __glx_TexImage_3D4D(unsigned opcode, unsigned dim, GLenum target, GLint level,
6713 GLint internalformat, GLsizei width, GLsizei height,
6714 GLsizei depth, GLsizei extent, GLint border,
6715 GLenum format, GLenum type, const GLvoid * pixels)
6716 {
6717 __GLXcontext *const gc = __glXGetCurrentContext();
6718 const GLuint compsize =
6719 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6720 target) : 0;
6721 const GLuint cmdlen = 84 + __GLX_PAD(compsize);
6722 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6723 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6724 if ((gc->pc + cmdlen) > gc->bufEnd) {
6725 (void) __glXFlushRenderBuffer(gc, gc->pc);
6726 }
6727 emit_header(gc->pc, opcode, cmdlen);
6728 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6729 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6730 (void) memcpy((void *) (gc->pc + 48), (void *) (&internalformat),
6731 4);
6732 (void) memcpy((void *) (gc->pc + 52), (void *) (&width), 4);
6733 (void) memcpy((void *) (gc->pc + 56), (void *) (&height), 4);
6734 (void) memcpy((void *) (gc->pc + 60), (void *) (&depth), 4);
6735 (void) memcpy((void *) (gc->pc + 64), (void *) (&extent), 4);
6736 (void) memcpy((void *) (gc->pc + 68), (void *) (&border), 4);
6737 (void) memcpy((void *) (gc->pc + 72), (void *) (&format), 4);
6738 (void) memcpy((void *) (gc->pc + 76), (void *) (&type), 4);
6739 (void) memcpy((void *) (gc->pc + 80),
6740 (void *) ((pixels == NULL) ? one : zero), 4);
6741 if (compsize > 0) {
6742 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6743 pixels, gc->pc + 84, gc->pc + 4);
6744 } else {
6745 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6746 default_pixel_store_4D_size);
6747 }
6748 gc->pc += cmdlen;
6749 if (gc->pc > gc->limit) {
6750 (void) __glXFlushRenderBuffer(gc, gc->pc);
6751 }
6752 } else {
6753 const GLint op = opcode;
6754 const GLuint cmdlenLarge = cmdlen + 4;
6755 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6756 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6757 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6758 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6759 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6760 (void) memcpy((void *) (pc + 52), (void *) (&internalformat), 4);
6761 (void) memcpy((void *) (pc + 56), (void *) (&width), 4);
6762 (void) memcpy((void *) (pc + 60), (void *) (&height), 4);
6763 (void) memcpy((void *) (pc + 64), (void *) (&depth), 4);
6764 (void) memcpy((void *) (pc + 68), (void *) (&extent), 4);
6765 (void) memcpy((void *) (pc + 72), (void *) (&border), 4);
6766 (void) memcpy((void *) (pc + 76), (void *) (&format), 4);
6767 (void) memcpy((void *) (pc + 80), (void *) (&type), 4);
6768 (void) memcpy((void *) (pc + 84), zero, 4);
6769 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6770 format, type, pixels, pc + 88, pc + 8);
6771 }
6772 }
6773 }
6774
6775 #define X_GLrop_TexImage3D 4114
6776 void
6777 __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat,
6778 GLsizei width, GLsizei height, GLsizei depth,
6779 GLint border, GLenum format, GLenum type,
6780 const GLvoid * pixels)
6781 {
6782 __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat,
6783 width, height, depth, 1, border, format, type,
6784 pixels);
6785 }
6786
6787 static void
6788 __glx_TexSubImage_3D4D(unsigned opcode, unsigned dim, GLenum target,
6789 GLint level, GLint xoffset, GLint yoffset,
6790 GLint zoffset, GLint woffset, GLsizei width,
6791 GLsizei height, GLsizei depth, GLsizei extent,
6792 GLenum format, GLenum type, const GLvoid * pixels)
6793 {
6794 __GLXcontext *const gc = __glXGetCurrentContext();
6795 const GLuint compsize =
6796 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6797 target) : 0;
6798 const GLuint cmdlen = 92 + __GLX_PAD(compsize);
6799 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6800 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6801 if ((gc->pc + cmdlen) > gc->bufEnd) {
6802 (void) __glXFlushRenderBuffer(gc, gc->pc);
6803 }
6804 emit_header(gc->pc, opcode, cmdlen);
6805 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6806 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6807 (void) memcpy((void *) (gc->pc + 48), (void *) (&xoffset), 4);
6808 (void) memcpy((void *) (gc->pc + 52), (void *) (&yoffset), 4);
6809 (void) memcpy((void *) (gc->pc + 56), (void *) (&zoffset), 4);
6810 (void) memcpy((void *) (gc->pc + 60), (void *) (&woffset), 4);
6811 (void) memcpy((void *) (gc->pc + 64), (void *) (&width), 4);
6812 (void) memcpy((void *) (gc->pc + 68), (void *) (&height), 4);
6813 (void) memcpy((void *) (gc->pc + 72), (void *) (&depth), 4);
6814 (void) memcpy((void *) (gc->pc + 76), (void *) (&extent), 4);
6815 (void) memcpy((void *) (gc->pc + 80), (void *) (&format), 4);
6816 (void) memcpy((void *) (gc->pc + 84), (void *) (&type), 4);
6817 (void) memcpy((void *) (gc->pc + 88),
6818 (void *) ((pixels == NULL) ? one : zero), 4);
6819 if (compsize > 0) {
6820 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6821 pixels, gc->pc + 92, gc->pc + 4);
6822 } else {
6823 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6824 default_pixel_store_4D_size);
6825 }
6826 gc->pc += cmdlen;
6827 if (gc->pc > gc->limit) {
6828 (void) __glXFlushRenderBuffer(gc, gc->pc);
6829 }
6830 } else {
6831 const GLint op = opcode;
6832 const GLuint cmdlenLarge = cmdlen + 4;
6833 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6834 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6835 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6836 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6837 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6838 (void) memcpy((void *) (pc + 52), (void *) (&xoffset), 4);
6839 (void) memcpy((void *) (pc + 56), (void *) (&yoffset), 4);
6840 (void) memcpy((void *) (pc + 60), (void *) (&zoffset), 4);
6841 (void) memcpy((void *) (pc + 64), (void *) (&woffset), 4);
6842 (void) memcpy((void *) (pc + 68), (void *) (&width), 4);
6843 (void) memcpy((void *) (pc + 72), (void *) (&height), 4);
6844 (void) memcpy((void *) (pc + 76), (void *) (&depth), 4);
6845 (void) memcpy((void *) (pc + 80), (void *) (&extent), 4);
6846 (void) memcpy((void *) (pc + 84), (void *) (&format), 4);
6847 (void) memcpy((void *) (pc + 88), (void *) (&type), 4);
6848 (void) memcpy((void *) (pc + 92), zero, 4);
6849 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6850 format, type, pixels, pc + 96, pc + 8);
6851 }
6852 }
6853 }
6854
6855 #define X_GLrop_TexSubImage3D 4115
6856 void
6857 __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6858 GLint yoffset, GLint zoffset, GLsizei width,
6859 GLsizei height, GLsizei depth, GLenum format,
6860 GLenum type, const GLvoid * pixels)
6861 {
6862 __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset,
6863 yoffset, zoffset, 1, width, height, depth, 1,
6864 format, type, pixels);
6865 }
6866
6867 #define X_GLrop_CopyTexSubImage3D 4123
6868 void
6869 __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6870 GLint yoffset, GLint zoffset, GLint x, GLint y,
6871 GLsizei width, GLsizei height)
6872 {
6873 __GLXcontext *const gc = __glXGetCurrentContext();
6874 const GLuint cmdlen = 40;
6875 emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
6876 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6877 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
6878 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
6879 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
6880 (void) memcpy((void *) (gc->pc + 20), (void *) (&zoffset), 4);
6881 (void) memcpy((void *) (gc->pc + 24), (void *) (&x), 4);
6882 (void) memcpy((void *) (gc->pc + 28), (void *) (&y), 4);
6883 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
6884 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
6885 gc->pc += cmdlen;
6886 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6887 (void) __glXFlushRenderBuffer(gc, gc->pc);
6888 }
6889 }
6890
6891 #define X_GLrop_ActiveTextureARB 197
6892 void
6893 __indirect_glActiveTextureARB(GLenum texture)
6894 {
6895 __GLXcontext *const gc = __glXGetCurrentContext();
6896 const GLuint cmdlen = 8;
6897 emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
6898 (void) memcpy((void *) (gc->pc + 4), (void *) (&texture), 4);
6899 gc->pc += cmdlen;
6900 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6901 (void) __glXFlushRenderBuffer(gc, gc->pc);
6902 }
6903 }
6904
6905 #define X_GLrop_MultiTexCoord1dvARB 198
6906 void
6907 __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
6908 {
6909 __GLXcontext *const gc = __glXGetCurrentContext();
6910 const GLuint cmdlen = 16;
6911 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
6912 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
6913 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
6914 gc->pc += cmdlen;
6915 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6916 (void) __glXFlushRenderBuffer(gc, gc->pc);
6917 }
6918 }
6919
6920 #define X_GLrop_MultiTexCoord1dvARB 198
6921 void
6922 __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
6923 {
6924 __GLXcontext *const gc = __glXGetCurrentContext();
6925 const GLuint cmdlen = 16;
6926 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
6927 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 8);
6928 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
6929 gc->pc += cmdlen;
6930 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6931 (void) __glXFlushRenderBuffer(gc, gc->pc);
6932 }
6933 }
6934
6935 #define X_GLrop_MultiTexCoord1fvARB 199
6936 void
6937 __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
6938 {
6939 __GLXcontext *const gc = __glXGetCurrentContext();
6940 const GLuint cmdlen = 12;
6941 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
6942 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6943 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6944 gc->pc += cmdlen;
6945 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6946 (void) __glXFlushRenderBuffer(gc, gc->pc);
6947 }
6948 }
6949
6950 #define X_GLrop_MultiTexCoord1fvARB 199
6951 void
6952 __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
6953 {
6954 __GLXcontext *const gc = __glXGetCurrentContext();
6955 const GLuint cmdlen = 12;
6956 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
6957 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6958 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
6959 gc->pc += cmdlen;
6960 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6961 (void) __glXFlushRenderBuffer(gc, gc->pc);
6962 }
6963 }
6964
6965 #define X_GLrop_MultiTexCoord1ivARB 200
6966 void
6967 __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
6968 {
6969 __GLXcontext *const gc = __glXGetCurrentContext();
6970 const GLuint cmdlen = 12;
6971 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
6972 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6973 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
6974 gc->pc += cmdlen;
6975 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6976 (void) __glXFlushRenderBuffer(gc, gc->pc);
6977 }
6978 }
6979
6980 #define X_GLrop_MultiTexCoord1ivARB 200
6981 void
6982 __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
6983 {
6984 __GLXcontext *const gc = __glXGetCurrentContext();
6985 const GLuint cmdlen = 12;
6986 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
6987 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6988 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
6989 gc->pc += cmdlen;
6990 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6991 (void) __glXFlushRenderBuffer(gc, gc->pc);
6992 }
6993 }
6994
6995 #define X_GLrop_MultiTexCoord1svARB 201
6996 void
6997 __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
6998 {
6999 __GLXcontext *const gc = __glXGetCurrentContext();
7000 const GLuint cmdlen = 12;
7001 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7002 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7003 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7004 gc->pc += cmdlen;
7005 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7006 (void) __glXFlushRenderBuffer(gc, gc->pc);
7007 }
7008 }
7009
7010 #define X_GLrop_MultiTexCoord1svARB 201
7011 void
7012 __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
7013 {
7014 __GLXcontext *const gc = __glXGetCurrentContext();
7015 const GLuint cmdlen = 12;
7016 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7017 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7018 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7019 gc->pc += cmdlen;
7020 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7021 (void) __glXFlushRenderBuffer(gc, gc->pc);
7022 }
7023 }
7024
7025 #define X_GLrop_MultiTexCoord2dvARB 202
7026 void
7027 __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
7028 {
7029 __GLXcontext *const gc = __glXGetCurrentContext();
7030 const GLuint cmdlen = 24;
7031 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7032 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7033 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7034 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
7035 gc->pc += cmdlen;
7036 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7037 (void) __glXFlushRenderBuffer(gc, gc->pc);
7038 }
7039 }
7040
7041 #define X_GLrop_MultiTexCoord2dvARB 202
7042 void
7043 __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
7044 {
7045 __GLXcontext *const gc = __glXGetCurrentContext();
7046 const GLuint cmdlen = 24;
7047 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7048 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 16);
7049 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
7050 gc->pc += cmdlen;
7051 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7052 (void) __glXFlushRenderBuffer(gc, gc->pc);
7053 }
7054 }
7055
7056 #define X_GLrop_MultiTexCoord2fvARB 203
7057 void
7058 __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
7059 {
7060 __GLXcontext *const gc = __glXGetCurrentContext();
7061 const GLuint cmdlen = 16;
7062 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7063 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7064 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7065 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7066 gc->pc += cmdlen;
7067 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7068 (void) __glXFlushRenderBuffer(gc, gc->pc);
7069 }
7070 }
7071
7072 #define X_GLrop_MultiTexCoord2fvARB 203
7073 void
7074 __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
7075 {
7076 __GLXcontext *const gc = __glXGetCurrentContext();
7077 const GLuint cmdlen = 16;
7078 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7079 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7080 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7081 gc->pc += cmdlen;
7082 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7083 (void) __glXFlushRenderBuffer(gc, gc->pc);
7084 }
7085 }
7086
7087 #define X_GLrop_MultiTexCoord2ivARB 204
7088 void
7089 __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
7090 {
7091 __GLXcontext *const gc = __glXGetCurrentContext();
7092 const GLuint cmdlen = 16;
7093 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7094 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7095 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7096 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7097 gc->pc += cmdlen;
7098 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7099 (void) __glXFlushRenderBuffer(gc, gc->pc);
7100 }
7101 }
7102
7103 #define X_GLrop_MultiTexCoord2ivARB 204
7104 void
7105 __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
7106 {
7107 __GLXcontext *const gc = __glXGetCurrentContext();
7108 const GLuint cmdlen = 16;
7109 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7110 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7111 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7112 gc->pc += cmdlen;
7113 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7114 (void) __glXFlushRenderBuffer(gc, gc->pc);
7115 }
7116 }
7117
7118 #define X_GLrop_MultiTexCoord2svARB 205
7119 void
7120 __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
7121 {
7122 __GLXcontext *const gc = __glXGetCurrentContext();
7123 const GLuint cmdlen = 12;
7124 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7125 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7126 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7127 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7128 gc->pc += cmdlen;
7129 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7130 (void) __glXFlushRenderBuffer(gc, gc->pc);
7131 }
7132 }
7133
7134 #define X_GLrop_MultiTexCoord2svARB 205
7135 void
7136 __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
7137 {
7138 __GLXcontext *const gc = __glXGetCurrentContext();
7139 const GLuint cmdlen = 12;
7140 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7141 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7142 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7143 gc->pc += cmdlen;
7144 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7145 (void) __glXFlushRenderBuffer(gc, gc->pc);
7146 }
7147 }
7148
7149 #define X_GLrop_MultiTexCoord3dvARB 206
7150 void
7151 __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t,
7152 GLdouble r)
7153 {
7154 __GLXcontext *const gc = __glXGetCurrentContext();
7155 const GLuint cmdlen = 32;
7156 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7157 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7158 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7159 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7160 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
7161 gc->pc += cmdlen;
7162 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7163 (void) __glXFlushRenderBuffer(gc, gc->pc);
7164 }
7165 }
7166
7167 #define X_GLrop_MultiTexCoord3dvARB 206
7168 void
7169 __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
7170 {
7171 __GLXcontext *const gc = __glXGetCurrentContext();
7172 const GLuint cmdlen = 32;
7173 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7174 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 24);
7175 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
7176 gc->pc += cmdlen;
7177 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7178 (void) __glXFlushRenderBuffer(gc, gc->pc);
7179 }
7180 }
7181
7182 #define X_GLrop_MultiTexCoord3fvARB 207
7183 void
7184 __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t,
7185 GLfloat r)
7186 {
7187 __GLXcontext *const gc = __glXGetCurrentContext();
7188 const GLuint cmdlen = 20;
7189 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7190 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7191 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7192 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7193 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7194 gc->pc += cmdlen;
7195 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7196 (void) __glXFlushRenderBuffer(gc, gc->pc);
7197 }
7198 }
7199
7200 #define X_GLrop_MultiTexCoord3fvARB 207
7201 void
7202 __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
7203 {
7204 __GLXcontext *const gc = __glXGetCurrentContext();
7205 const GLuint cmdlen = 20;
7206 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7207 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7208 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7209 gc->pc += cmdlen;
7210 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7211 (void) __glXFlushRenderBuffer(gc, gc->pc);
7212 }
7213 }
7214
7215 #define X_GLrop_MultiTexCoord3ivARB 208
7216 void
7217 __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
7218 {
7219 __GLXcontext *const gc = __glXGetCurrentContext();
7220 const GLuint cmdlen = 20;
7221 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7222 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7223 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7224 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7225 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7226 gc->pc += cmdlen;
7227 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7228 (void) __glXFlushRenderBuffer(gc, gc->pc);
7229 }
7230 }
7231
7232 #define X_GLrop_MultiTexCoord3ivARB 208
7233 void
7234 __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
7235 {
7236 __GLXcontext *const gc = __glXGetCurrentContext();
7237 const GLuint cmdlen = 20;
7238 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7239 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7240 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7241 gc->pc += cmdlen;
7242 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7243 (void) __glXFlushRenderBuffer(gc, gc->pc);
7244 }
7245 }
7246
7247 #define X_GLrop_MultiTexCoord3svARB 209
7248 void
7249 __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t,
7250 GLshort r)
7251 {
7252 __GLXcontext *const gc = __glXGetCurrentContext();
7253 const GLuint cmdlen = 16;
7254 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7255 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7256 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7257 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7258 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7259 gc->pc += cmdlen;
7260 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7261 (void) __glXFlushRenderBuffer(gc, gc->pc);
7262 }
7263 }
7264
7265 #define X_GLrop_MultiTexCoord3svARB 209
7266 void
7267 __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
7268 {
7269 __GLXcontext *const gc = __glXGetCurrentContext();
7270 const GLuint cmdlen = 16;
7271 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7272 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7273 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
7274 gc->pc += cmdlen;
7275 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7276 (void) __glXFlushRenderBuffer(gc, gc->pc);
7277 }
7278 }
7279
7280 #define X_GLrop_MultiTexCoord4dvARB 210
7281 void
7282 __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t,
7283 GLdouble r, GLdouble q)
7284 {
7285 __GLXcontext *const gc = __glXGetCurrentContext();
7286 const GLuint cmdlen = 40;
7287 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7288 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7289 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7290 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7291 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
7292 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7293 gc->pc += cmdlen;
7294 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7295 (void) __glXFlushRenderBuffer(gc, gc->pc);
7296 }
7297 }
7298
7299 #define X_GLrop_MultiTexCoord4dvARB 210
7300 void
7301 __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
7302 {
7303 __GLXcontext *const gc = __glXGetCurrentContext();
7304 const GLuint cmdlen = 40;
7305 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7306 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
7307 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7308 gc->pc += cmdlen;
7309 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7310 (void) __glXFlushRenderBuffer(gc, gc->pc);
7311 }
7312 }
7313
7314 #define X_GLrop_MultiTexCoord4fvARB 211
7315 void
7316 __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t,
7317 GLfloat r, GLfloat q)
7318 {
7319 __GLXcontext *const gc = __glXGetCurrentContext();
7320 const GLuint cmdlen = 24;
7321 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7322 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7323 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7324 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7325 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7326 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
7327 gc->pc += cmdlen;
7328 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7329 (void) __glXFlushRenderBuffer(gc, gc->pc);
7330 }
7331 }
7332
7333 #define X_GLrop_MultiTexCoord4fvARB 211
7334 void
7335 __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
7336 {
7337 __GLXcontext *const gc = __glXGetCurrentContext();
7338 const GLuint cmdlen = 24;
7339 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7340 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7341 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7342 gc->pc += cmdlen;
7343 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7344 (void) __glXFlushRenderBuffer(gc, gc->pc);
7345 }
7346 }
7347
7348 #define X_GLrop_MultiTexCoord4ivARB 212
7349 void
7350 __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r,
7351 GLint q)
7352 {
7353 __GLXcontext *const gc = __glXGetCurrentContext();
7354 const GLuint cmdlen = 24;
7355 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7356 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7357 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7358 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7359 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7360 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
7361 gc->pc += cmdlen;
7362 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7363 (void) __glXFlushRenderBuffer(gc, gc->pc);
7364 }
7365 }
7366
7367 #define X_GLrop_MultiTexCoord4ivARB 212
7368 void
7369 __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
7370 {
7371 __GLXcontext *const gc = __glXGetCurrentContext();
7372 const GLuint cmdlen = 24;
7373 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7374 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7375 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7376 gc->pc += cmdlen;
7377 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7378 (void) __glXFlushRenderBuffer(gc, gc->pc);
7379 }
7380 }
7381
7382 #define X_GLrop_MultiTexCoord4svARB 213
7383 void
7384 __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t,
7385 GLshort r, GLshort q)
7386 {
7387 __GLXcontext *const gc = __glXGetCurrentContext();
7388 const GLuint cmdlen = 16;
7389 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7390 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7391 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7392 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7393 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7394 (void) memcpy((void *) (gc->pc + 14), (void *) (&q), 2);
7395 gc->pc += cmdlen;
7396 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7397 (void) __glXFlushRenderBuffer(gc, gc->pc);
7398 }
7399 }
7400
7401 #define X_GLrop_MultiTexCoord4svARB 213
7402 void
7403 __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
7404 {
7405 __GLXcontext *const gc = __glXGetCurrentContext();
7406 const GLuint cmdlen = 16;
7407 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7408 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7409 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7410 gc->pc += cmdlen;
7411 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7412 (void) __glXFlushRenderBuffer(gc, gc->pc);
7413 }
7414 }
7415
7416 #define X_GLrop_SampleCoverageARB 229
7417 void
7418 __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
7419 {
7420 __GLXcontext *const gc = __glXGetCurrentContext();
7421 const GLuint cmdlen = 12;
7422 emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen);
7423 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
7424 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
7425 gc->pc += cmdlen;
7426 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7427 (void) __glXFlushRenderBuffer(gc, gc->pc);
7428 }
7429 }
7430
7431 #define X_GLvop_GetProgramStringARB 1308
7432 void
7433 __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
7434 {
7435 __GLXcontext *const gc = __glXGetCurrentContext();
7436 Display *const dpy = gc->currentDpy;
7437 const GLuint cmdlen = 8;
7438 if (__builtin_expect(dpy != NULL, 1)) {
7439 GLubyte const *pc =
7440 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7441 X_GLvop_GetProgramStringARB, cmdlen);
7442 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7443 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7444 (void) __glXReadReply(dpy, 1, string, GL_TRUE);
7445 UnlockDisplay(dpy);
7446 SyncHandle();
7447 }
7448 return;
7449 }
7450
7451 #define X_GLvop_GetProgramivARB 1307
7452 void
7453 __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
7454 {
7455 __GLXcontext *const gc = __glXGetCurrentContext();
7456 Display *const dpy = gc->currentDpy;
7457 const GLuint cmdlen = 8;
7458 if (__builtin_expect(dpy != NULL, 1)) {
7459 GLubyte const *pc =
7460 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7461 X_GLvop_GetProgramivARB, cmdlen);
7462 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7463 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7464 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7465 UnlockDisplay(dpy);
7466 SyncHandle();
7467 }
7468 return;
7469 }
7470
7471 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7472 void
7473 __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index,
7474 const GLdouble * params)
7475 {
7476 __GLXcontext *const gc = __glXGetCurrentContext();
7477 const GLuint cmdlen = 44;
7478 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7479 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7480 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7481 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7482 gc->pc += cmdlen;
7483 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7484 (void) __glXFlushRenderBuffer(gc, gc->pc);
7485 }
7486 }
7487
7488 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7489 void
7490 __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index,
7491 const GLfloat * params)
7492 {
7493 __GLXcontext *const gc = __glXGetCurrentContext();
7494 const GLuint cmdlen = 28;
7495 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7496 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7497 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7498 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7499 gc->pc += cmdlen;
7500 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7501 (void) __glXFlushRenderBuffer(gc, gc->pc);
7502 }
7503 }
7504
7505 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7506 void
7507 __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index,
7508 GLdouble x, GLdouble y, GLdouble z,
7509 GLdouble w)
7510 {
7511 __GLXcontext *const gc = __glXGetCurrentContext();
7512 const GLuint cmdlen = 44;
7513 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7514 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7515 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7516 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7517 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7518 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7519 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7520 gc->pc += cmdlen;
7521 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7522 (void) __glXFlushRenderBuffer(gc, gc->pc);
7523 }
7524 }
7525
7526 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7527 void
7528 __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index,
7529 const GLdouble * params)
7530 {
7531 __GLXcontext *const gc = __glXGetCurrentContext();
7532 const GLuint cmdlen = 44;
7533 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, 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 *) (params), 32);
7537 gc->pc += cmdlen;
7538 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7539 (void) __glXFlushRenderBuffer(gc, gc->pc);
7540 }
7541 }
7542
7543 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7544 void
7545 __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index,
7546 GLfloat x, GLfloat y, GLfloat z,
7547 GLfloat w)
7548 {
7549 __GLXcontext *const gc = __glXGetCurrentContext();
7550 const GLuint cmdlen = 28;
7551 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7552 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7553 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7554 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7555 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7556 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7557 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7558 gc->pc += cmdlen;
7559 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7560 (void) __glXFlushRenderBuffer(gc, gc->pc);
7561 }
7562 }
7563
7564 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7565 void
7566 __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index,
7567 const GLfloat * params)
7568 {
7569 __GLXcontext *const gc = __glXGetCurrentContext();
7570 const GLuint cmdlen = 28;
7571 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7572 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7573 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7574 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7575 gc->pc += cmdlen;
7576 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7577 (void) __glXFlushRenderBuffer(gc, gc->pc);
7578 }
7579 }
7580
7581 #define X_GLrop_ProgramStringARB 4217
7582 void
7583 __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len,
7584 const GLvoid * string)
7585 {
7586 __GLXcontext *const gc = __glXGetCurrentContext();
7587 const GLuint cmdlen = 16 + __GLX_PAD(len);
7588 if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
7589 if (cmdlen <= gc->maxSmallRenderCommandSize) {
7590 if ((gc->pc + cmdlen) > gc->bufEnd) {
7591 (void) __glXFlushRenderBuffer(gc, gc->pc);
7592 }
7593 emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
7594 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7595 (void) memcpy((void *) (gc->pc + 8), (void *) (&format), 4);
7596 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
7597 (void) memcpy((void *) (gc->pc + 16), (void *) (string), len);
7598 gc->pc += cmdlen;
7599 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7600 (void) __glXFlushRenderBuffer(gc, gc->pc);
7601 }
7602 } else {
7603 const GLint op = X_GLrop_ProgramStringARB;
7604 const GLuint cmdlenLarge = cmdlen + 4;
7605 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
7606 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
7607 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
7608 (void) memcpy((void *) (pc + 8), (void *) (&target), 4);
7609 (void) memcpy((void *) (pc + 12), (void *) (&format), 4);
7610 (void) memcpy((void *) (pc + 16), (void *) (&len), 4);
7611 __glXSendLargeCommand(gc, pc, 20, string, len);
7612 }
7613 }
7614 }
7615
7616 #define X_GLrop_VertexAttrib1dvARB 4197
7617 void
7618 __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
7619 {
7620 __GLXcontext *const gc = __glXGetCurrentContext();
7621 const GLuint cmdlen = 16;
7622 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7623 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7624 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7625 gc->pc += cmdlen;
7626 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7627 (void) __glXFlushRenderBuffer(gc, gc->pc);
7628 }
7629 }
7630
7631 #define X_GLrop_VertexAttrib1dvARB 4197
7632 void
7633 __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
7634 {
7635 __GLXcontext *const gc = __glXGetCurrentContext();
7636 const GLuint cmdlen = 16;
7637 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7638 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7639 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7640 gc->pc += cmdlen;
7641 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7642 (void) __glXFlushRenderBuffer(gc, gc->pc);
7643 }
7644 }
7645
7646 #define X_GLrop_VertexAttrib1fvARB 4193
7647 void
7648 __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
7649 {
7650 __GLXcontext *const gc = __glXGetCurrentContext();
7651 const GLuint cmdlen = 12;
7652 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7653 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7654 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7655 gc->pc += cmdlen;
7656 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7657 (void) __glXFlushRenderBuffer(gc, gc->pc);
7658 }
7659 }
7660
7661 #define X_GLrop_VertexAttrib1fvARB 4193
7662 void
7663 __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
7664 {
7665 __GLXcontext *const gc = __glXGetCurrentContext();
7666 const GLuint cmdlen = 12;
7667 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7668 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7669 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
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_VertexAttrib1svARB 4189
7677 void
7678 __indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
7679 {
7680 __GLXcontext *const gc = __glXGetCurrentContext();
7681 const GLuint cmdlen = 12;
7682 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7683 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7684 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7685 gc->pc += cmdlen;
7686 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7687 (void) __glXFlushRenderBuffer(gc, gc->pc);
7688 }
7689 }
7690
7691 #define X_GLrop_VertexAttrib1svARB 4189
7692 void
7693 __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
7694 {
7695 __GLXcontext *const gc = __glXGetCurrentContext();
7696 const GLuint cmdlen = 12;
7697 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7698 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7699 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7700 gc->pc += cmdlen;
7701 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7702 (void) __glXFlushRenderBuffer(gc, gc->pc);
7703 }
7704 }
7705
7706 #define X_GLrop_VertexAttrib2dvARB 4198
7707 void
7708 __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
7709 {
7710 __GLXcontext *const gc = __glXGetCurrentContext();
7711 const GLuint cmdlen = 24;
7712 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7713 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7714 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7715 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7716 gc->pc += cmdlen;
7717 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7718 (void) __glXFlushRenderBuffer(gc, gc->pc);
7719 }
7720 }
7721
7722 #define X_GLrop_VertexAttrib2dvARB 4198
7723 void
7724 __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
7725 {
7726 __GLXcontext *const gc = __glXGetCurrentContext();
7727 const GLuint cmdlen = 24;
7728 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7729 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7730 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7731 gc->pc += cmdlen;
7732 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7733 (void) __glXFlushRenderBuffer(gc, gc->pc);
7734 }
7735 }
7736
7737 #define X_GLrop_VertexAttrib2fvARB 4194
7738 void
7739 __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
7740 {
7741 __GLXcontext *const gc = __glXGetCurrentContext();
7742 const GLuint cmdlen = 16;
7743 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7744 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7745 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7746 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7747 gc->pc += cmdlen;
7748 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7749 (void) __glXFlushRenderBuffer(gc, gc->pc);
7750 }
7751 }
7752
7753 #define X_GLrop_VertexAttrib2fvARB 4194
7754 void
7755 __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
7756 {
7757 __GLXcontext *const gc = __glXGetCurrentContext();
7758 const GLuint cmdlen = 16;
7759 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7760 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7761 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7762 gc->pc += cmdlen;
7763 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7764 (void) __glXFlushRenderBuffer(gc, gc->pc);
7765 }
7766 }
7767
7768 #define X_GLrop_VertexAttrib2svARB 4190
7769 void
7770 __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
7771 {
7772 __GLXcontext *const gc = __glXGetCurrentContext();
7773 const GLuint cmdlen = 12;
7774 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7775 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7776 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7777 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
7778 gc->pc += cmdlen;
7779 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7780 (void) __glXFlushRenderBuffer(gc, gc->pc);
7781 }
7782 }
7783
7784 #define X_GLrop_VertexAttrib2svARB 4190
7785 void
7786 __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
7787 {
7788 __GLXcontext *const gc = __glXGetCurrentContext();
7789 const GLuint cmdlen = 12;
7790 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7791 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7792 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7793 gc->pc += cmdlen;
7794 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7795 (void) __glXFlushRenderBuffer(gc, gc->pc);
7796 }
7797 }
7798
7799 #define X_GLrop_VertexAttrib3dvARB 4199
7800 void
7801 __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y,
7802 GLdouble z)
7803 {
7804 __GLXcontext *const gc = __glXGetCurrentContext();
7805 const GLuint cmdlen = 32;
7806 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7807 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7808 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7809 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7810 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
7811 gc->pc += cmdlen;
7812 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7813 (void) __glXFlushRenderBuffer(gc, gc->pc);
7814 }
7815 }
7816
7817 #define X_GLrop_VertexAttrib3dvARB 4199
7818 void
7819 __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
7820 {
7821 __GLXcontext *const gc = __glXGetCurrentContext();
7822 const GLuint cmdlen = 32;
7823 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7824 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7825 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
7826 gc->pc += cmdlen;
7827 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7828 (void) __glXFlushRenderBuffer(gc, gc->pc);
7829 }
7830 }
7831
7832 #define X_GLrop_VertexAttrib3fvARB 4195
7833 void
7834 __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
7835 {
7836 __GLXcontext *const gc = __glXGetCurrentContext();
7837 const GLuint cmdlen = 20;
7838 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7839 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7840 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7841 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7842 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
7843 gc->pc += cmdlen;
7844 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7845 (void) __glXFlushRenderBuffer(gc, gc->pc);
7846 }
7847 }
7848
7849 #define X_GLrop_VertexAttrib3fvARB 4195
7850 void
7851 __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
7852 {
7853 __GLXcontext *const gc = __glXGetCurrentContext();
7854 const GLuint cmdlen = 20;
7855 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7856 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7857 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7858 gc->pc += cmdlen;
7859 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7860 (void) __glXFlushRenderBuffer(gc, gc->pc);
7861 }
7862 }
7863
7864 #define X_GLrop_VertexAttrib3svARB 4191
7865 void
7866 __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
7867 {
7868 __GLXcontext *const gc = __glXGetCurrentContext();
7869 const GLuint cmdlen = 16;
7870 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
7871 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7872 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7873 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
7874 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
7875 gc->pc += cmdlen;
7876 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7877 (void) __glXFlushRenderBuffer(gc, gc->pc);
7878 }
7879 }
7880
7881 #define X_GLrop_VertexAttrib3svARB 4191
7882 void
7883 __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
7884 {
7885 __GLXcontext *const gc = __glXGetCurrentContext();
7886 const GLuint cmdlen = 16;
7887 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
7888 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7889 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
7890 gc->pc += cmdlen;
7891 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7892 (void) __glXFlushRenderBuffer(gc, gc->pc);
7893 }
7894 }
7895
7896 #define X_GLrop_VertexAttrib4NbvARB 4235
7897 void
7898 __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte *v)
7899 {
7900 __GLXcontext *const gc = __glXGetCurrentContext();
7901 const GLuint cmdlen = 12;
7902 emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
7903 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7904 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7905 gc->pc += cmdlen;
7906 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7907 (void) __glXFlushRenderBuffer(gc, gc->pc);
7908 }
7909 }
7910
7911 #define X_GLrop_VertexAttrib4NivARB 4237
7912 void
7913 __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
7914 {
7915 __GLXcontext *const gc = __glXGetCurrentContext();
7916 const GLuint cmdlen = 24;
7917 emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
7918 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7919 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7920 gc->pc += cmdlen;
7921 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7922 (void) __glXFlushRenderBuffer(gc, gc->pc);
7923 }
7924 }
7925
7926 #define X_GLrop_VertexAttrib4NsvARB 4236
7927 void
7928 __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
7929 {
7930 __GLXcontext *const gc = __glXGetCurrentContext();
7931 const GLuint cmdlen = 16;
7932 emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
7933 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7934 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7935 gc->pc += cmdlen;
7936 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7937 (void) __glXFlushRenderBuffer(gc, gc->pc);
7938 }
7939 }
7940
7941 #define X_GLrop_VertexAttrib4NubvARB 4201
7942 void
7943 __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
7944 GLubyte z, GLubyte w)
7945 {
7946 __GLXcontext *const gc = __glXGetCurrentContext();
7947 const GLuint cmdlen = 12;
7948 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
7949 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7950 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
7951 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
7952 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
7953 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
7954 gc->pc += cmdlen;
7955 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7956 (void) __glXFlushRenderBuffer(gc, gc->pc);
7957 }
7958 }
7959
7960 #define X_GLrop_VertexAttrib4NubvARB 4201
7961 void
7962 __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte *v)
7963 {
7964 __GLXcontext *const gc = __glXGetCurrentContext();
7965 const GLuint cmdlen = 12;
7966 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
7967 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7968 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7969 gc->pc += cmdlen;
7970 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7971 (void) __glXFlushRenderBuffer(gc, gc->pc);
7972 }
7973 }
7974
7975 #define X_GLrop_VertexAttrib4NuivARB 4239
7976 void
7977 __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
7978 {
7979 __GLXcontext *const gc = __glXGetCurrentContext();
7980 const GLuint cmdlen = 24;
7981 emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
7982 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7983 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7984 gc->pc += cmdlen;
7985 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7986 (void) __glXFlushRenderBuffer(gc, gc->pc);
7987 }
7988 }
7989
7990 #define X_GLrop_VertexAttrib4NusvARB 4238
7991 void
7992 __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
7993 {
7994 __GLXcontext *const gc = __glXGetCurrentContext();
7995 const GLuint cmdlen = 16;
7996 emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
7997 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7998 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7999 gc->pc += cmdlen;
8000 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8001 (void) __glXFlushRenderBuffer(gc, gc->pc);
8002 }
8003 }
8004
8005 #define X_GLrop_VertexAttrib4bvARB 4230
8006 void
8007 __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte *v)
8008 {
8009 __GLXcontext *const gc = __glXGetCurrentContext();
8010 const GLuint cmdlen = 12;
8011 emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
8012 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8013 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8014 gc->pc += cmdlen;
8015 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8016 (void) __glXFlushRenderBuffer(gc, gc->pc);
8017 }
8018 }
8019
8020 #define X_GLrop_VertexAttrib4dvARB 4200
8021 void
8022 __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y,
8023 GLdouble z, GLdouble w)
8024 {
8025 __GLXcontext *const gc = __glXGetCurrentContext();
8026 const GLuint cmdlen = 40;
8027 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8028 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8029 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
8030 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
8031 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
8032 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
8033 gc->pc += cmdlen;
8034 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8035 (void) __glXFlushRenderBuffer(gc, gc->pc);
8036 }
8037 }
8038
8039 #define X_GLrop_VertexAttrib4dvARB 4200
8040 void
8041 __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
8042 {
8043 __GLXcontext *const gc = __glXGetCurrentContext();
8044 const GLuint cmdlen = 40;
8045 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8046 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8047 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
8048 gc->pc += cmdlen;
8049 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8050 (void) __glXFlushRenderBuffer(gc, gc->pc);
8051 }
8052 }
8053
8054 #define X_GLrop_VertexAttrib4fvARB 4196
8055 void
8056 __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
8057 GLfloat w)
8058 {
8059 __GLXcontext *const gc = __glXGetCurrentContext();
8060 const GLuint cmdlen = 24;
8061 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8062 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8063 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
8064 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
8065 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
8066 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
8067 gc->pc += cmdlen;
8068 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8069 (void) __glXFlushRenderBuffer(gc, gc->pc);
8070 }
8071 }
8072
8073 #define X_GLrop_VertexAttrib4fvARB 4196
8074 void
8075 __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
8076 {
8077 __GLXcontext *const gc = __glXGetCurrentContext();
8078 const GLuint cmdlen = 24;
8079 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8080 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8081 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8082 gc->pc += cmdlen;
8083 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8084 (void) __glXFlushRenderBuffer(gc, gc->pc);
8085 }
8086 }
8087
8088 #define X_GLrop_VertexAttrib4ivARB 4231
8089 void
8090 __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
8091 {
8092 __GLXcontext *const gc = __glXGetCurrentContext();
8093 const GLuint cmdlen = 24;
8094 emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
8095 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8096 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8097 gc->pc += cmdlen;
8098 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8099 (void) __glXFlushRenderBuffer(gc, gc->pc);
8100 }
8101 }
8102
8103 #define X_GLrop_VertexAttrib4svARB 4192
8104 void
8105 __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z,
8106 GLshort w)
8107 {
8108 __GLXcontext *const gc = __glXGetCurrentContext();
8109 const GLuint cmdlen = 16;
8110 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8111 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8112 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
8113 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
8114 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
8115 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
8116 gc->pc += cmdlen;
8117 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8118 (void) __glXFlushRenderBuffer(gc, gc->pc);
8119 }
8120 }
8121
8122 #define X_GLrop_VertexAttrib4svARB 4192
8123 void
8124 __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
8125 {
8126 __GLXcontext *const gc = __glXGetCurrentContext();
8127 const GLuint cmdlen = 16;
8128 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8129 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8130 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8131 gc->pc += cmdlen;
8132 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8133 (void) __glXFlushRenderBuffer(gc, gc->pc);
8134 }
8135 }
8136
8137 #define X_GLrop_VertexAttrib4ubvARB 4232
8138 void
8139 __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte *v)
8140 {
8141 __GLXcontext *const gc = __glXGetCurrentContext();
8142 const GLuint cmdlen = 12;
8143 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
8144 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8145 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8146 gc->pc += cmdlen;
8147 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8148 (void) __glXFlushRenderBuffer(gc, gc->pc);
8149 }
8150 }
8151
8152 #define X_GLrop_VertexAttrib4uivARB 4234
8153 void
8154 __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
8155 {
8156 __GLXcontext *const gc = __glXGetCurrentContext();
8157 const GLuint cmdlen = 24;
8158 emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
8159 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8160 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8161 gc->pc += cmdlen;
8162 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8163 (void) __glXFlushRenderBuffer(gc, gc->pc);
8164 }
8165 }
8166
8167 #define X_GLrop_VertexAttrib4usvARB 4233
8168 void
8169 __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
8170 {
8171 __GLXcontext *const gc = __glXGetCurrentContext();
8172 const GLuint cmdlen = 16;
8173 emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
8174 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8175 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8176 gc->pc += cmdlen;
8177 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8178 (void) __glXFlushRenderBuffer(gc, gc->pc);
8179 }
8180 }
8181
8182 #define X_GLrop_BeginQueryARB 231
8183 void
8184 __indirect_glBeginQueryARB(GLenum target, GLuint id)
8185 {
8186 __GLXcontext *const gc = __glXGetCurrentContext();
8187 const GLuint cmdlen = 12;
8188 emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
8189 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8190 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
8191 gc->pc += cmdlen;
8192 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8193 (void) __glXFlushRenderBuffer(gc, gc->pc);
8194 }
8195 }
8196
8197 #define X_GLsop_DeleteQueriesARB 161
8198 void
8199 __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
8200 {
8201 __GLXcontext *const gc = __glXGetCurrentContext();
8202 Display *const dpy = gc->currentDpy;
8203 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8204 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8205 #ifdef USE_XCB
8206 xcb_connection_t *c = XGetXCBConnection(dpy);
8207 (void) __glXFlushRenderBuffer(gc, gc->pc);
8208 xcb_glx_delete_queries_arb(c, gc->currentContextTag, n, ids);
8209 #else
8210 GLubyte const *pc =
8211 __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
8212 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8213 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8214 UnlockDisplay(dpy);
8215 SyncHandle();
8216 #endif /* USE_XCB */
8217 }
8218 return;
8219 }
8220
8221 #define X_GLrop_EndQueryARB 232
8222 void
8223 __indirect_glEndQueryARB(GLenum target)
8224 {
8225 __GLXcontext *const gc = __glXGetCurrentContext();
8226 const GLuint cmdlen = 8;
8227 emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
8228 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8229 gc->pc += cmdlen;
8230 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8231 (void) __glXFlushRenderBuffer(gc, gc->pc);
8232 }
8233 }
8234
8235 #define X_GLsop_GenQueriesARB 162
8236 void
8237 __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
8238 {
8239 __GLXcontext *const gc = __glXGetCurrentContext();
8240 Display *const dpy = gc->currentDpy;
8241 const GLuint cmdlen = 4;
8242 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8243 #ifdef USE_XCB
8244 xcb_connection_t *c = XGetXCBConnection(dpy);
8245 (void) __glXFlushRenderBuffer(gc, gc->pc);
8246 xcb_glx_gen_queries_arb_reply_t *reply =
8247 xcb_glx_gen_queries_arb_reply(c,
8248 xcb_glx_gen_queries_arb(c,
8249 gc->
8250 currentContextTag,
8251 n), NULL);
8252 (void) memcpy(ids, xcb_glx_gen_queries_arb_data(reply),
8253 xcb_glx_gen_queries_arb_data_length(reply) *
8254 sizeof(GLuint));
8255 free(reply);
8256 #else
8257 GLubyte const *pc =
8258 __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
8259 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8260 (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
8261 UnlockDisplay(dpy);
8262 SyncHandle();
8263 #endif /* USE_XCB */
8264 }
8265 return;
8266 }
8267
8268 #define X_GLsop_GetQueryObjectivARB 165
8269 void
8270 __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
8271 {
8272 __GLXcontext *const gc = __glXGetCurrentContext();
8273 Display *const dpy = gc->currentDpy;
8274 const GLuint cmdlen = 8;
8275 if (__builtin_expect(dpy != NULL, 1)) {
8276 #ifdef USE_XCB
8277 xcb_connection_t *c = XGetXCBConnection(dpy);
8278 (void) __glXFlushRenderBuffer(gc, gc->pc);
8279 xcb_glx_get_query_objectiv_arb_reply_t *reply =
8280 xcb_glx_get_query_objectiv_arb_reply(c,
8281 xcb_glx_get_query_objectiv_arb
8282 (c, gc->currentContextTag,
8283 id, pname), NULL);
8284 if (xcb_glx_get_query_objectiv_arb_data_length(reply) == 0)
8285 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8286 else
8287 (void) memcpy(params, xcb_glx_get_query_objectiv_arb_data(reply),
8288 xcb_glx_get_query_objectiv_arb_data_length(reply) *
8289 sizeof(GLint));
8290 free(reply);
8291 #else
8292 GLubyte const *pc =
8293 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
8294 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8295 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8296 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8297 UnlockDisplay(dpy);
8298 SyncHandle();
8299 #endif /* USE_XCB */
8300 }
8301 return;
8302 }
8303
8304 #define X_GLsop_GetQueryObjectuivARB 166
8305 void
8306 __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
8307 {
8308 __GLXcontext *const gc = __glXGetCurrentContext();
8309 Display *const dpy = gc->currentDpy;
8310 const GLuint cmdlen = 8;
8311 if (__builtin_expect(dpy != NULL, 1)) {
8312 #ifdef USE_XCB
8313 xcb_connection_t *c = XGetXCBConnection(dpy);
8314 (void) __glXFlushRenderBuffer(gc, gc->pc);
8315 xcb_glx_get_query_objectuiv_arb_reply_t *reply =
8316 xcb_glx_get_query_objectuiv_arb_reply(c,
8317 xcb_glx_get_query_objectuiv_arb
8318 (c, gc->currentContextTag,
8319 id, pname), NULL);
8320 if (xcb_glx_get_query_objectuiv_arb_data_length(reply) == 0)
8321 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8322 else
8323 (void) memcpy(params, xcb_glx_get_query_objectuiv_arb_data(reply),
8324 xcb_glx_get_query_objectuiv_arb_data_length(reply) *
8325 sizeof(GLuint));
8326 free(reply);
8327 #else
8328 GLubyte const *pc =
8329 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
8330 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8331 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8332 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8333 UnlockDisplay(dpy);
8334 SyncHandle();
8335 #endif /* USE_XCB */
8336 }
8337 return;
8338 }
8339
8340 #define X_GLsop_GetQueryivARB 164
8341 void
8342 __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
8343 {
8344 __GLXcontext *const gc = __glXGetCurrentContext();
8345 Display *const dpy = gc->currentDpy;
8346 const GLuint cmdlen = 8;
8347 if (__builtin_expect(dpy != NULL, 1)) {
8348 #ifdef USE_XCB
8349 xcb_connection_t *c = XGetXCBConnection(dpy);
8350 (void) __glXFlushRenderBuffer(gc, gc->pc);
8351 xcb_glx_get_queryiv_arb_reply_t *reply =
8352 xcb_glx_get_queryiv_arb_reply(c,
8353 xcb_glx_get_queryiv_arb(c,
8354 gc->
8355 currentContextTag,
8356 target,
8357 pname),
8358 NULL);
8359 if (xcb_glx_get_queryiv_arb_data_length(reply) == 0)
8360 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8361 else
8362 (void) memcpy(params, xcb_glx_get_queryiv_arb_data(reply),
8363 xcb_glx_get_queryiv_arb_data_length(reply) *
8364 sizeof(GLint));
8365 free(reply);
8366 #else
8367 GLubyte const *pc =
8368 __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
8369 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8370 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8371 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8372 UnlockDisplay(dpy);
8373 SyncHandle();
8374 #endif /* USE_XCB */
8375 }
8376 return;
8377 }
8378
8379 #define X_GLsop_IsQueryARB 163
8380 GLboolean
8381 __indirect_glIsQueryARB(GLuint id)
8382 {
8383 __GLXcontext *const gc = __glXGetCurrentContext();
8384 Display *const dpy = gc->currentDpy;
8385 GLboolean retval = (GLboolean) 0;
8386 const GLuint cmdlen = 4;
8387 if (__builtin_expect(dpy != NULL, 1)) {
8388 #ifdef USE_XCB
8389 xcb_connection_t *c = XGetXCBConnection(dpy);
8390 (void) __glXFlushRenderBuffer(gc, gc->pc);
8391 xcb_glx_is_query_arb_reply_t *reply =
8392 xcb_glx_is_query_arb_reply(c,
8393 xcb_glx_is_query_arb(c,
8394 gc->
8395 currentContextTag,
8396 id), NULL);
8397 retval = reply->ret_val;
8398 free(reply);
8399 #else
8400 GLubyte const *pc =
8401 __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
8402 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8403 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8404 UnlockDisplay(dpy);
8405 SyncHandle();
8406 #endif /* USE_XCB */
8407 }
8408 return retval;
8409 }
8410
8411 #define X_GLrop_DrawBuffersARB 233
8412 void
8413 __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
8414 {
8415 __GLXcontext *const gc = __glXGetCurrentContext();
8416 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8417 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
8418 if (cmdlen <= gc->maxSmallRenderCommandSize) {
8419 if ((gc->pc + cmdlen) > gc->bufEnd) {
8420 (void) __glXFlushRenderBuffer(gc, gc->pc);
8421 }
8422 emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
8423 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
8424 (void) memcpy((void *) (gc->pc + 8), (void *) (bufs), (n * 4));
8425 gc->pc += cmdlen;
8426 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8427 (void) __glXFlushRenderBuffer(gc, gc->pc);
8428 }
8429 } else {
8430 const GLint op = X_GLrop_DrawBuffersARB;
8431 const GLuint cmdlenLarge = cmdlen + 4;
8432 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
8433 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
8434 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
8435 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
8436 __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
8437 }
8438 }
8439 }
8440
8441 #define X_GLrop_SampleMaskSGIS 2048
8442 void
8443 __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
8444 {
8445 __GLXcontext *const gc = __glXGetCurrentContext();
8446 const GLuint cmdlen = 12;
8447 emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
8448 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
8449 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
8450 gc->pc += cmdlen;
8451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8452 (void) __glXFlushRenderBuffer(gc, gc->pc);
8453 }
8454 }
8455
8456 #define X_GLrop_SamplePatternSGIS 2049
8457 void
8458 __indirect_glSamplePatternSGIS(GLenum pattern)
8459 {
8460 __GLXcontext *const gc = __glXGetCurrentContext();
8461 const GLuint cmdlen = 8;
8462 emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
8463 (void) memcpy((void *) (gc->pc + 4), (void *) (&pattern), 4);
8464 gc->pc += cmdlen;
8465 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8466 (void) __glXFlushRenderBuffer(gc, gc->pc);
8467 }
8468 }
8469
8470 #define X_GLrop_PointParameterfEXT 2065
8471 void
8472 __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
8473 {
8474 __GLXcontext *const gc = __glXGetCurrentContext();
8475 const GLuint cmdlen = 12;
8476 emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
8477 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8478 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
8479 gc->pc += cmdlen;
8480 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8481 (void) __glXFlushRenderBuffer(gc, gc->pc);
8482 }
8483 }
8484
8485 #define X_GLrop_PointParameterfvEXT 2066
8486 void
8487 __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
8488 {
8489 __GLXcontext *const gc = __glXGetCurrentContext();
8490 const GLuint compsize = __glPointParameterfvEXT_size(pname);
8491 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
8492 emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
8493 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8494 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
8495 gc->pc += cmdlen;
8496 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8497 (void) __glXFlushRenderBuffer(gc, gc->pc);
8498 }
8499 }
8500
8501 #define X_GLrop_SecondaryColor3bvEXT 4126
8502 void
8503 __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
8504 {
8505 __GLXcontext *const gc = __glXGetCurrentContext();
8506 const GLuint cmdlen = 8;
8507 emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
8508 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8509 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8510 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8511 gc->pc += cmdlen;
8512 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8513 (void) __glXFlushRenderBuffer(gc, gc->pc);
8514 }
8515 }
8516
8517 #define X_GLrop_SecondaryColor3bvEXT 4126
8518 void
8519 __indirect_glSecondaryColor3bvEXT(const GLbyte *v)
8520 {
8521 generic_3_byte(X_GLrop_SecondaryColor3bvEXT, v);
8522 }
8523
8524 #define X_GLrop_SecondaryColor3dvEXT 4130
8525 void
8526 __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
8527 {
8528 __GLXcontext *const gc = __glXGetCurrentContext();
8529 const GLuint cmdlen = 28;
8530 emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
8531 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
8532 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
8533 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
8534 gc->pc += cmdlen;
8535 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8536 (void) __glXFlushRenderBuffer(gc, gc->pc);
8537 }
8538 }
8539
8540 #define X_GLrop_SecondaryColor3dvEXT 4130
8541 void
8542 __indirect_glSecondaryColor3dvEXT(const GLdouble * v)
8543 {
8544 generic_24_byte(X_GLrop_SecondaryColor3dvEXT, v);
8545 }
8546
8547 #define X_GLrop_SecondaryColor3fvEXT 4129
8548 void
8549 __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
8550 {
8551 __GLXcontext *const gc = __glXGetCurrentContext();
8552 const GLuint cmdlen = 16;
8553 emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
8554 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8555 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8556 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8557 gc->pc += cmdlen;
8558 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8559 (void) __glXFlushRenderBuffer(gc, gc->pc);
8560 }
8561 }
8562
8563 #define X_GLrop_SecondaryColor3fvEXT 4129
8564 void
8565 __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
8566 {
8567 generic_12_byte(X_GLrop_SecondaryColor3fvEXT, v);
8568 }
8569
8570 #define X_GLrop_SecondaryColor3ivEXT 4128
8571 void
8572 __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
8573 {
8574 __GLXcontext *const gc = __glXGetCurrentContext();
8575 const GLuint cmdlen = 16;
8576 emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
8577 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8578 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8579 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8580 gc->pc += cmdlen;
8581 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8582 (void) __glXFlushRenderBuffer(gc, gc->pc);
8583 }
8584 }
8585
8586 #define X_GLrop_SecondaryColor3ivEXT 4128
8587 void
8588 __indirect_glSecondaryColor3ivEXT(const GLint * v)
8589 {
8590 generic_12_byte(X_GLrop_SecondaryColor3ivEXT, v);
8591 }
8592
8593 #define X_GLrop_SecondaryColor3svEXT 4127
8594 void
8595 __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
8596 {
8597 __GLXcontext *const gc = __glXGetCurrentContext();
8598 const GLuint cmdlen = 12;
8599 emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
8600 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8601 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8602 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8603 gc->pc += cmdlen;
8604 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8605 (void) __glXFlushRenderBuffer(gc, gc->pc);
8606 }
8607 }
8608
8609 #define X_GLrop_SecondaryColor3svEXT 4127
8610 void
8611 __indirect_glSecondaryColor3svEXT(const GLshort * v)
8612 {
8613 generic_6_byte(X_GLrop_SecondaryColor3svEXT, v);
8614 }
8615
8616 #define X_GLrop_SecondaryColor3ubvEXT 4131
8617 void
8618 __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
8619 {
8620 __GLXcontext *const gc = __glXGetCurrentContext();
8621 const GLuint cmdlen = 8;
8622 emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
8623 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8624 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8625 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8626 gc->pc += cmdlen;
8627 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8628 (void) __glXFlushRenderBuffer(gc, gc->pc);
8629 }
8630 }
8631
8632 #define X_GLrop_SecondaryColor3ubvEXT 4131
8633 void
8634 __indirect_glSecondaryColor3ubvEXT(const GLubyte *v)
8635 {
8636 generic_3_byte(X_GLrop_SecondaryColor3ubvEXT, v);
8637 }
8638
8639 #define X_GLrop_SecondaryColor3uivEXT 4133
8640 void
8641 __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
8642 {
8643 __GLXcontext *const gc = __glXGetCurrentContext();
8644 const GLuint cmdlen = 16;
8645 emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
8646 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8647 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8648 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8649 gc->pc += cmdlen;
8650 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8651 (void) __glXFlushRenderBuffer(gc, gc->pc);
8652 }
8653 }
8654
8655 #define X_GLrop_SecondaryColor3uivEXT 4133
8656 void
8657 __indirect_glSecondaryColor3uivEXT(const GLuint * v)
8658 {
8659 generic_12_byte(X_GLrop_SecondaryColor3uivEXT, v);
8660 }
8661
8662 #define X_GLrop_SecondaryColor3usvEXT 4132
8663 void
8664 __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
8665 {
8666 __GLXcontext *const gc = __glXGetCurrentContext();
8667 const GLuint cmdlen = 12;
8668 emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
8669 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8670 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8671 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8672 gc->pc += cmdlen;
8673 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8674 (void) __glXFlushRenderBuffer(gc, gc->pc);
8675 }
8676 }
8677
8678 #define X_GLrop_SecondaryColor3usvEXT 4132
8679 void
8680 __indirect_glSecondaryColor3usvEXT(const GLushort * v)
8681 {
8682 generic_6_byte(X_GLrop_SecondaryColor3usvEXT, v);
8683 }
8684
8685 #define X_GLrop_FogCoorddvEXT 4125
8686 void
8687 __indirect_glFogCoorddEXT(GLdouble coord)
8688 {
8689 __GLXcontext *const gc = __glXGetCurrentContext();
8690 const GLuint cmdlen = 12;
8691 emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
8692 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 8);
8693 gc->pc += cmdlen;
8694 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8695 (void) __glXFlushRenderBuffer(gc, gc->pc);
8696 }
8697 }
8698
8699 #define X_GLrop_FogCoorddvEXT 4125
8700 void
8701 __indirect_glFogCoorddvEXT(const GLdouble * coord)
8702 {
8703 generic_8_byte(X_GLrop_FogCoorddvEXT, coord);
8704 }
8705
8706 #define X_GLrop_FogCoordfvEXT 4124
8707 void
8708 __indirect_glFogCoordfEXT(GLfloat coord)
8709 {
8710 __GLXcontext *const gc = __glXGetCurrentContext();
8711 const GLuint cmdlen = 8;
8712 emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
8713 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
8714 gc->pc += cmdlen;
8715 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8716 (void) __glXFlushRenderBuffer(gc, gc->pc);
8717 }
8718 }
8719
8720 #define X_GLrop_FogCoordfvEXT 4124
8721 void
8722 __indirect_glFogCoordfvEXT(const GLfloat * coord)
8723 {
8724 generic_4_byte(X_GLrop_FogCoordfvEXT, coord);
8725 }
8726
8727 #define X_GLrop_BlendFuncSeparateEXT 4134
8728 void
8729 __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
8730 GLenum sfactorAlpha, GLenum dfactorAlpha)
8731 {
8732 __GLXcontext *const gc = __glXGetCurrentContext();
8733 const GLuint cmdlen = 20;
8734 emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
8735 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactorRGB), 4);
8736 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactorRGB), 4);
8737 (void) memcpy((void *) (gc->pc + 12), (void *) (&sfactorAlpha), 4);
8738 (void) memcpy((void *) (gc->pc + 16), (void *) (&dfactorAlpha), 4);
8739 gc->pc += cmdlen;
8740 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8741 (void) __glXFlushRenderBuffer(gc, gc->pc);
8742 }
8743 }
8744
8745 #define X_GLrop_WindowPos3fvMESA 230
8746 void
8747 __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
8748 {
8749 __GLXcontext *const gc = __glXGetCurrentContext();
8750 const GLuint cmdlen = 16;
8751 emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
8752 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
8753 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
8754 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
8755 gc->pc += cmdlen;
8756 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8757 (void) __glXFlushRenderBuffer(gc, gc->pc);
8758 }
8759 }
8760
8761 #define X_GLrop_WindowPos3fvMESA 230
8762 void
8763 __indirect_glWindowPos3fvMESA(const GLfloat * v)
8764 {
8765 generic_12_byte(X_GLrop_WindowPos3fvMESA, v);
8766 }
8767
8768 #define X_GLvop_AreProgramsResidentNV 1293
8769 GLboolean
8770 __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids,
8771 GLboolean * residences)
8772 {
8773 __GLXcontext *const gc = __glXGetCurrentContext();
8774 Display *const dpy = gc->currentDpy;
8775 GLboolean retval = (GLboolean) 0;
8776 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8777 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8778 GLubyte const *pc =
8779 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8780 X_GLvop_AreProgramsResidentNV, cmdlen);
8781 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8782 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8783 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
8784 UnlockDisplay(dpy);
8785 SyncHandle();
8786 }
8787 return retval;
8788 }
8789
8790 #define X_GLrop_BindProgramNV 4180
8791 void
8792 __indirect_glBindProgramNV(GLenum target, GLuint program)
8793 {
8794 __GLXcontext *const gc = __glXGetCurrentContext();
8795 const GLuint cmdlen = 12;
8796 emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
8797 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8798 (void) memcpy((void *) (gc->pc + 8), (void *) (&program), 4);
8799 gc->pc += cmdlen;
8800 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8801 (void) __glXFlushRenderBuffer(gc, gc->pc);
8802 }
8803 }
8804
8805 #define X_GLvop_DeleteProgramsNV 1294
8806 void
8807 __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
8808 {
8809 __GLXcontext *const gc = __glXGetCurrentContext();
8810 Display *const dpy = gc->currentDpy;
8811 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8812 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8813 GLubyte const *pc =
8814 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
8815 X_GLvop_DeleteProgramsNV, cmdlen);
8816 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8817 (void) memcpy((void *) (pc + 4), (void *) (programs), (n * 4));
8818 UnlockDisplay(dpy);
8819 SyncHandle();
8820 }
8821 return;
8822 }
8823
8824 #define X_GLrop_ExecuteProgramNV 4181
8825 void
8826 __indirect_glExecuteProgramNV(GLenum target, GLuint id,
8827 const GLfloat * params)
8828 {
8829 __GLXcontext *const gc = __glXGetCurrentContext();
8830 const GLuint cmdlen = 28;
8831 emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
8832 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8833 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
8834 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
8835 gc->pc += cmdlen;
8836 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8837 (void) __glXFlushRenderBuffer(gc, gc->pc);
8838 }
8839 }
8840
8841 #define X_GLvop_GenProgramsNV 1295
8842 void
8843 __indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
8844 {
8845 __GLXcontext *const gc = __glXGetCurrentContext();
8846 Display *const dpy = gc->currentDpy;
8847 const GLuint cmdlen = 4;
8848 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8849 GLubyte const *pc =
8850 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8851 X_GLvop_GenProgramsNV, cmdlen);
8852 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8853 (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
8854 UnlockDisplay(dpy);
8855 SyncHandle();
8856 }
8857 return;
8858 }
8859
8860 #define X_GLvop_GetProgramParameterdvNV 1297
8861 void
8862 __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index,
8863 GLenum pname, GLdouble * params)
8864 {
8865 __GLXcontext *const gc = __glXGetCurrentContext();
8866 Display *const dpy = gc->currentDpy;
8867 const GLuint cmdlen = 12;
8868 if (__builtin_expect(dpy != NULL, 1)) {
8869 GLubyte const *pc =
8870 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8871 X_GLvop_GetProgramParameterdvNV, cmdlen);
8872 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8873 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
8874 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
8875 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
8876 UnlockDisplay(dpy);
8877 SyncHandle();
8878 }
8879 return;
8880 }
8881
8882 #define X_GLvop_GetProgramParameterfvNV 1296
8883 void
8884 __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
8885 GLenum pname, GLfloat * params)
8886 {
8887 __GLXcontext *const gc = __glXGetCurrentContext();
8888 Display *const dpy = gc->currentDpy;
8889 const GLuint cmdlen = 12;
8890 if (__builtin_expect(dpy != NULL, 1)) {
8891 GLubyte const *pc =
8892 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8893 X_GLvop_GetProgramParameterfvNV, cmdlen);
8894 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8895 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
8896 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
8897 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8898 UnlockDisplay(dpy);
8899 SyncHandle();
8900 }
8901 return;
8902 }
8903
8904 #define X_GLvop_GetProgramStringNV 1299
8905 void
8906 __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
8907 {
8908 __GLXcontext *const gc = __glXGetCurrentContext();
8909 Display *const dpy = gc->currentDpy;
8910 const GLuint cmdlen = 8;
8911 if (__builtin_expect(dpy != NULL, 1)) {
8912 GLubyte const *pc =
8913 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8914 X_GLvop_GetProgramStringNV, cmdlen);
8915 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8916 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8917 (void) __glXReadReply(dpy, 1, program, GL_TRUE);
8918 UnlockDisplay(dpy);
8919 SyncHandle();
8920 }
8921 return;
8922 }
8923
8924 #define X_GLvop_GetProgramivNV 1298
8925 void
8926 __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
8927 {
8928 __GLXcontext *const gc = __glXGetCurrentContext();
8929 Display *const dpy = gc->currentDpy;
8930 const GLuint cmdlen = 8;
8931 if (__builtin_expect(dpy != NULL, 1)) {
8932 GLubyte const *pc =
8933 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8934 X_GLvop_GetProgramivNV, cmdlen);
8935 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8936 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8937 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8938 UnlockDisplay(dpy);
8939 SyncHandle();
8940 }
8941 return;
8942 }
8943
8944 #define X_GLvop_GetTrackMatrixivNV 1300
8945 void
8946 __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname,
8947 GLint * params)
8948 {
8949 __GLXcontext *const gc = __glXGetCurrentContext();
8950 Display *const dpy = gc->currentDpy;
8951 const GLuint cmdlen = 12;
8952 if (__builtin_expect(dpy != NULL, 1)) {
8953 GLubyte const *pc =
8954 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8955 X_GLvop_GetTrackMatrixivNV, cmdlen);
8956 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8957 (void) memcpy((void *) (pc + 4), (void *) (&address), 4);
8958 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
8959 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8960 UnlockDisplay(dpy);
8961 SyncHandle();
8962 }
8963 return;
8964 }
8965
8966 #define X_GLvop_GetVertexAttribdvNV 1301
8967 void
8968 __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname,
8969 GLdouble * params)
8970 {
8971 __GLXcontext *const gc = __glXGetCurrentContext();
8972 Display *const dpy = gc->currentDpy;
8973 const GLuint cmdlen = 8;
8974 if (__builtin_expect(dpy != NULL, 1)) {
8975 GLubyte const *pc =
8976 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8977 X_GLvop_GetVertexAttribdvNV, cmdlen);
8978 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
8979 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8980 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
8981 UnlockDisplay(dpy);
8982 SyncHandle();
8983 }
8984 return;
8985 }
8986
8987 #define X_GLvop_GetVertexAttribfvNV 1302
8988 void
8989 __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
8990 {
8991 __GLXcontext *const gc = __glXGetCurrentContext();
8992 Display *const dpy = gc->currentDpy;
8993 const GLuint cmdlen = 8;
8994 if (__builtin_expect(dpy != NULL, 1)) {
8995 GLubyte const *pc =
8996 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8997 X_GLvop_GetVertexAttribfvNV, cmdlen);
8998 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
8999 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9000 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9001 UnlockDisplay(dpy);
9002 SyncHandle();
9003 }
9004 return;
9005 }
9006
9007 #define X_GLvop_GetVertexAttribivNV 1303
9008 void
9009 __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
9010 {
9011 __GLXcontext *const gc = __glXGetCurrentContext();
9012 Display *const dpy = gc->currentDpy;
9013 const GLuint cmdlen = 8;
9014 if (__builtin_expect(dpy != NULL, 1)) {
9015 GLubyte const *pc =
9016 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9017 X_GLvop_GetVertexAttribivNV, cmdlen);
9018 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9019 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9020 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9021 UnlockDisplay(dpy);
9022 SyncHandle();
9023 }
9024 return;
9025 }
9026
9027 #define X_GLvop_IsProgramNV 1304
9028 GLboolean
9029 __indirect_glIsProgramNV(GLuint program)
9030 {
9031 __GLXcontext *const gc = __glXGetCurrentContext();
9032 Display *const dpy = gc->currentDpy;
9033 GLboolean retval = (GLboolean) 0;
9034 const GLuint cmdlen = 4;
9035 if (__builtin_expect(dpy != NULL, 1)) {
9036 GLubyte const *pc =
9037 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9038 X_GLvop_IsProgramNV, cmdlen);
9039 (void) memcpy((void *) (pc + 0), (void *) (&program), 4);
9040 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
9041 UnlockDisplay(dpy);
9042 SyncHandle();
9043 }
9044 return retval;
9045 }
9046
9047 #define X_GLrop_LoadProgramNV 4183
9048 void
9049 __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len,
9050 const GLubyte *program)
9051 {
9052 __GLXcontext *const gc = __glXGetCurrentContext();
9053 const GLuint cmdlen = 16 + __GLX_PAD(len);
9054 if (__builtin_expect(len >= 0, 1)) {
9055 emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
9056 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9057 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
9058 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
9059 (void) memcpy((void *) (gc->pc + 16), (void *) (program), len);
9060 gc->pc += cmdlen;
9061 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9062 (void) __glXFlushRenderBuffer(gc, gc->pc);
9063 }
9064 }
9065 }
9066
9067 #define X_GLrop_ProgramParameters4dvNV 4187
9068 void
9069 __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num,
9070 const GLdouble * params)
9071 {
9072 __GLXcontext *const gc = __glXGetCurrentContext();
9073 const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
9074 if (__builtin_expect(num >= 0, 1)) {
9075 emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
9076 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9077 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9078 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9079 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 32));
9080 gc->pc += cmdlen;
9081 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9082 (void) __glXFlushRenderBuffer(gc, gc->pc);
9083 }
9084 }
9085 }
9086
9087 #define X_GLrop_ProgramParameters4fvNV 4186
9088 void
9089 __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num,
9090 const GLfloat * params)
9091 {
9092 __GLXcontext *const gc = __glXGetCurrentContext();
9093 const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
9094 if (__builtin_expect(num >= 0, 1)) {
9095 emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
9096 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9097 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9098 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9099 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 16));
9100 gc->pc += cmdlen;
9101 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9102 (void) __glXFlushRenderBuffer(gc, gc->pc);
9103 }
9104 }
9105 }
9106
9107 #define X_GLrop_RequestResidentProgramsNV 4182
9108 void
9109 __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
9110 {
9111 __GLXcontext *const gc = __glXGetCurrentContext();
9112 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
9113 if (__builtin_expect(n >= 0, 1)) {
9114 emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
9115 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
9116 (void) memcpy((void *) (gc->pc + 8), (void *) (ids), (n * 4));
9117 gc->pc += cmdlen;
9118 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9119 (void) __glXFlushRenderBuffer(gc, gc->pc);
9120 }
9121 }
9122 }
9123
9124 #define X_GLrop_TrackMatrixNV 4188
9125 void
9126 __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix,
9127 GLenum transform)
9128 {
9129 __GLXcontext *const gc = __glXGetCurrentContext();
9130 const GLuint cmdlen = 20;
9131 emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
9132 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9133 (void) memcpy((void *) (gc->pc + 8), (void *) (&address), 4);
9134 (void) memcpy((void *) (gc->pc + 12), (void *) (&matrix), 4);
9135 (void) memcpy((void *) (gc->pc + 16), (void *) (&transform), 4);
9136 gc->pc += cmdlen;
9137 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9138 (void) __glXFlushRenderBuffer(gc, gc->pc);
9139 }
9140 }
9141
9142 #define X_GLrop_VertexAttrib1dvNV 4273
9143 void
9144 __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
9145 {
9146 __GLXcontext *const gc = __glXGetCurrentContext();
9147 const GLuint cmdlen = 16;
9148 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9149 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9150 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9151 gc->pc += cmdlen;
9152 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9153 (void) __glXFlushRenderBuffer(gc, gc->pc);
9154 }
9155 }
9156
9157 #define X_GLrop_VertexAttrib1dvNV 4273
9158 void
9159 __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
9160 {
9161 __GLXcontext *const gc = __glXGetCurrentContext();
9162 const GLuint cmdlen = 16;
9163 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9164 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9165 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9166 gc->pc += cmdlen;
9167 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9168 (void) __glXFlushRenderBuffer(gc, gc->pc);
9169 }
9170 }
9171
9172 #define X_GLrop_VertexAttrib1fvNV 4269
9173 void
9174 __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
9175 {
9176 __GLXcontext *const gc = __glXGetCurrentContext();
9177 const GLuint cmdlen = 12;
9178 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9179 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9180 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9181 gc->pc += cmdlen;
9182 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9183 (void) __glXFlushRenderBuffer(gc, gc->pc);
9184 }
9185 }
9186
9187 #define X_GLrop_VertexAttrib1fvNV 4269
9188 void
9189 __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
9190 {
9191 __GLXcontext *const gc = __glXGetCurrentContext();
9192 const GLuint cmdlen = 12;
9193 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9194 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9195 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9196 gc->pc += cmdlen;
9197 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9198 (void) __glXFlushRenderBuffer(gc, gc->pc);
9199 }
9200 }
9201
9202 #define X_GLrop_VertexAttrib1svNV 4265
9203 void
9204 __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
9205 {
9206 __GLXcontext *const gc = __glXGetCurrentContext();
9207 const GLuint cmdlen = 12;
9208 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9209 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9210 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9211 gc->pc += cmdlen;
9212 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9213 (void) __glXFlushRenderBuffer(gc, gc->pc);
9214 }
9215 }
9216
9217 #define X_GLrop_VertexAttrib1svNV 4265
9218 void
9219 __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
9220 {
9221 __GLXcontext *const gc = __glXGetCurrentContext();
9222 const GLuint cmdlen = 12;
9223 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9224 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9225 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
9226 gc->pc += cmdlen;
9227 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9228 (void) __glXFlushRenderBuffer(gc, gc->pc);
9229 }
9230 }
9231
9232 #define X_GLrop_VertexAttrib2dvNV 4274
9233 void
9234 __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
9235 {
9236 __GLXcontext *const gc = __glXGetCurrentContext();
9237 const GLuint cmdlen = 24;
9238 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9239 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9240 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9241 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9242 gc->pc += cmdlen;
9243 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9244 (void) __glXFlushRenderBuffer(gc, gc->pc);
9245 }
9246 }
9247
9248 #define X_GLrop_VertexAttrib2dvNV 4274
9249 void
9250 __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
9251 {
9252 __GLXcontext *const gc = __glXGetCurrentContext();
9253 const GLuint cmdlen = 24;
9254 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9255 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9256 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9257 gc->pc += cmdlen;
9258 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9259 (void) __glXFlushRenderBuffer(gc, gc->pc);
9260 }
9261 }
9262
9263 #define X_GLrop_VertexAttrib2fvNV 4270
9264 void
9265 __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
9266 {
9267 __GLXcontext *const gc = __glXGetCurrentContext();
9268 const GLuint cmdlen = 16;
9269 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9270 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9271 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9272 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9273 gc->pc += cmdlen;
9274 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9275 (void) __glXFlushRenderBuffer(gc, gc->pc);
9276 }
9277 }
9278
9279 #define X_GLrop_VertexAttrib2fvNV 4270
9280 void
9281 __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
9282 {
9283 __GLXcontext *const gc = __glXGetCurrentContext();
9284 const GLuint cmdlen = 16;
9285 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9286 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9287 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9288 gc->pc += cmdlen;
9289 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9290 (void) __glXFlushRenderBuffer(gc, gc->pc);
9291 }
9292 }
9293
9294 #define X_GLrop_VertexAttrib2svNV 4266
9295 void
9296 __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
9297 {
9298 __GLXcontext *const gc = __glXGetCurrentContext();
9299 const GLuint cmdlen = 12;
9300 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9301 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9302 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9303 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9304 gc->pc += cmdlen;
9305 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9306 (void) __glXFlushRenderBuffer(gc, gc->pc);
9307 }
9308 }
9309
9310 #define X_GLrop_VertexAttrib2svNV 4266
9311 void
9312 __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
9313 {
9314 __GLXcontext *const gc = __glXGetCurrentContext();
9315 const GLuint cmdlen = 12;
9316 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9317 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9318 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9319 gc->pc += cmdlen;
9320 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9321 (void) __glXFlushRenderBuffer(gc, gc->pc);
9322 }
9323 }
9324
9325 #define X_GLrop_VertexAttrib3dvNV 4275
9326 void
9327 __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y,
9328 GLdouble z)
9329 {
9330 __GLXcontext *const gc = __glXGetCurrentContext();
9331 const GLuint cmdlen = 32;
9332 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9333 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9334 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9335 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9336 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9337 gc->pc += cmdlen;
9338 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9339 (void) __glXFlushRenderBuffer(gc, gc->pc);
9340 }
9341 }
9342
9343 #define X_GLrop_VertexAttrib3dvNV 4275
9344 void
9345 __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
9346 {
9347 __GLXcontext *const gc = __glXGetCurrentContext();
9348 const GLuint cmdlen = 32;
9349 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9350 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9351 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
9352 gc->pc += cmdlen;
9353 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9354 (void) __glXFlushRenderBuffer(gc, gc->pc);
9355 }
9356 }
9357
9358 #define X_GLrop_VertexAttrib3fvNV 4271
9359 void
9360 __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
9361 {
9362 __GLXcontext *const gc = __glXGetCurrentContext();
9363 const GLuint cmdlen = 20;
9364 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9365 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9366 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9367 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9368 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9369 gc->pc += cmdlen;
9370 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9371 (void) __glXFlushRenderBuffer(gc, gc->pc);
9372 }
9373 }
9374
9375 #define X_GLrop_VertexAttrib3fvNV 4271
9376 void
9377 __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
9378 {
9379 __GLXcontext *const gc = __glXGetCurrentContext();
9380 const GLuint cmdlen = 20;
9381 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9382 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9383 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
9384 gc->pc += cmdlen;
9385 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9386 (void) __glXFlushRenderBuffer(gc, gc->pc);
9387 }
9388 }
9389
9390 #define X_GLrop_VertexAttrib3svNV 4267
9391 void
9392 __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
9393 {
9394 __GLXcontext *const gc = __glXGetCurrentContext();
9395 const GLuint cmdlen = 16;
9396 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9397 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9398 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9399 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9400 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9401 gc->pc += cmdlen;
9402 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9403 (void) __glXFlushRenderBuffer(gc, gc->pc);
9404 }
9405 }
9406
9407 #define X_GLrop_VertexAttrib3svNV 4267
9408 void
9409 __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
9410 {
9411 __GLXcontext *const gc = __glXGetCurrentContext();
9412 const GLuint cmdlen = 16;
9413 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9414 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9415 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
9416 gc->pc += cmdlen;
9417 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9418 (void) __glXFlushRenderBuffer(gc, gc->pc);
9419 }
9420 }
9421
9422 #define X_GLrop_VertexAttrib4dvNV 4276
9423 void
9424 __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y,
9425 GLdouble z, GLdouble w)
9426 {
9427 __GLXcontext *const gc = __glXGetCurrentContext();
9428 const GLuint cmdlen = 40;
9429 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9430 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9431 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9432 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9433 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9434 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
9435 gc->pc += cmdlen;
9436 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9437 (void) __glXFlushRenderBuffer(gc, gc->pc);
9438 }
9439 }
9440
9441 #define X_GLrop_VertexAttrib4dvNV 4276
9442 void
9443 __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
9444 {
9445 __GLXcontext *const gc = __glXGetCurrentContext();
9446 const GLuint cmdlen = 40;
9447 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9448 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9449 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
9450 gc->pc += cmdlen;
9451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9452 (void) __glXFlushRenderBuffer(gc, gc->pc);
9453 }
9454 }
9455
9456 #define X_GLrop_VertexAttrib4fvNV 4272
9457 void
9458 __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z,
9459 GLfloat w)
9460 {
9461 __GLXcontext *const gc = __glXGetCurrentContext();
9462 const GLuint cmdlen = 24;
9463 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9464 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9465 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9466 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9467 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9468 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
9469 gc->pc += cmdlen;
9470 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9471 (void) __glXFlushRenderBuffer(gc, gc->pc);
9472 }
9473 }
9474
9475 #define X_GLrop_VertexAttrib4fvNV 4272
9476 void
9477 __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
9478 {
9479 __GLXcontext *const gc = __glXGetCurrentContext();
9480 const GLuint cmdlen = 24;
9481 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9482 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9483 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9484 gc->pc += cmdlen;
9485 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9486 (void) __glXFlushRenderBuffer(gc, gc->pc);
9487 }
9488 }
9489
9490 #define X_GLrop_VertexAttrib4svNV 4268
9491 void
9492 __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z,
9493 GLshort w)
9494 {
9495 __GLXcontext *const gc = __glXGetCurrentContext();
9496 const GLuint cmdlen = 16;
9497 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9498 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9499 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9500 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9501 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9502 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
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_VertexAttrib4svNV 4268
9510 void
9511 __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
9512 {
9513 __GLXcontext *const gc = __glXGetCurrentContext();
9514 const GLuint cmdlen = 16;
9515 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9516 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9517 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9518 gc->pc += cmdlen;
9519 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9520 (void) __glXFlushRenderBuffer(gc, gc->pc);
9521 }
9522 }
9523
9524 #define X_GLrop_VertexAttrib4ubvNV 4277
9525 void
9526 __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
9527 GLubyte w)
9528 {
9529 __GLXcontext *const gc = __glXGetCurrentContext();
9530 const GLuint cmdlen = 12;
9531 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9532 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9533 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
9534 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
9535 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
9536 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
9537 gc->pc += cmdlen;
9538 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9539 (void) __glXFlushRenderBuffer(gc, gc->pc);
9540 }
9541 }
9542
9543 #define X_GLrop_VertexAttrib4ubvNV 4277
9544 void
9545 __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte *v)
9546 {
9547 __GLXcontext *const gc = __glXGetCurrentContext();
9548 const GLuint cmdlen = 12;
9549 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9550 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9551 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
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_VertexAttribs1dvNV 4210
9559 void
9560 __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
9561 {
9562 __GLXcontext *const gc = __glXGetCurrentContext();
9563 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9564 if (__builtin_expect(n >= 0, 1)) {
9565 emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
9566 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9567 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9568 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9569 gc->pc += cmdlen;
9570 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9571 (void) __glXFlushRenderBuffer(gc, gc->pc);
9572 }
9573 }
9574 }
9575
9576 #define X_GLrop_VertexAttribs1fvNV 4206
9577 void
9578 __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
9579 {
9580 __GLXcontext *const gc = __glXGetCurrentContext();
9581 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9582 if (__builtin_expect(n >= 0, 1)) {
9583 emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
9584 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9585 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9586 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9587 gc->pc += cmdlen;
9588 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9589 (void) __glXFlushRenderBuffer(gc, gc->pc);
9590 }
9591 }
9592 }
9593
9594 #define X_GLrop_VertexAttribs1svNV 4202
9595 void
9596 __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
9597 {
9598 __GLXcontext *const gc = __glXGetCurrentContext();
9599 const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
9600 if (__builtin_expect(n >= 0, 1)) {
9601 emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
9602 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9603 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9604 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 2));
9605 gc->pc += cmdlen;
9606 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9607 (void) __glXFlushRenderBuffer(gc, gc->pc);
9608 }
9609 }
9610 }
9611
9612 #define X_GLrop_VertexAttribs2dvNV 4211
9613 void
9614 __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
9615 {
9616 __GLXcontext *const gc = __glXGetCurrentContext();
9617 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9618 if (__builtin_expect(n >= 0, 1)) {
9619 emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
9620 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9621 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9622 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
9623 gc->pc += cmdlen;
9624 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9625 (void) __glXFlushRenderBuffer(gc, gc->pc);
9626 }
9627 }
9628 }
9629
9630 #define X_GLrop_VertexAttribs2fvNV 4207
9631 void
9632 __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
9633 {
9634 __GLXcontext *const gc = __glXGetCurrentContext();
9635 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9636 if (__builtin_expect(n >= 0, 1)) {
9637 emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
9638 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9639 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9640 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9641 gc->pc += cmdlen;
9642 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9643 (void) __glXFlushRenderBuffer(gc, gc->pc);
9644 }
9645 }
9646 }
9647
9648 #define X_GLrop_VertexAttribs2svNV 4203
9649 void
9650 __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
9651 {
9652 __GLXcontext *const gc = __glXGetCurrentContext();
9653 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9654 if (__builtin_expect(n >= 0, 1)) {
9655 emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
9656 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9657 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9658 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9659 gc->pc += cmdlen;
9660 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9661 (void) __glXFlushRenderBuffer(gc, gc->pc);
9662 }
9663 }
9664 }
9665
9666 #define X_GLrop_VertexAttribs3dvNV 4212
9667 void
9668 __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
9669 {
9670 __GLXcontext *const gc = __glXGetCurrentContext();
9671 const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
9672 if (__builtin_expect(n >= 0, 1)) {
9673 emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
9674 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9675 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9676 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 24));
9677 gc->pc += cmdlen;
9678 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9679 (void) __glXFlushRenderBuffer(gc, gc->pc);
9680 }
9681 }
9682 }
9683
9684 #define X_GLrop_VertexAttribs3fvNV 4208
9685 void
9686 __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
9687 {
9688 __GLXcontext *const gc = __glXGetCurrentContext();
9689 const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
9690 if (__builtin_expect(n >= 0, 1)) {
9691 emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
9692 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9693 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9694 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 12));
9695 gc->pc += cmdlen;
9696 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9697 (void) __glXFlushRenderBuffer(gc, gc->pc);
9698 }
9699 }
9700 }
9701
9702 #define X_GLrop_VertexAttribs3svNV 4204
9703 void
9704 __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
9705 {
9706 __GLXcontext *const gc = __glXGetCurrentContext();
9707 const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
9708 if (__builtin_expect(n >= 0, 1)) {
9709 emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
9710 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9711 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9712 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 6));
9713 gc->pc += cmdlen;
9714 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9715 (void) __glXFlushRenderBuffer(gc, gc->pc);
9716 }
9717 }
9718 }
9719
9720 #define X_GLrop_VertexAttribs4dvNV 4213
9721 void
9722 __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
9723 {
9724 __GLXcontext *const gc = __glXGetCurrentContext();
9725 const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
9726 if (__builtin_expect(n >= 0, 1)) {
9727 emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
9728 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9729 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9730 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 32));
9731 gc->pc += cmdlen;
9732 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9733 (void) __glXFlushRenderBuffer(gc, gc->pc);
9734 }
9735 }
9736 }
9737
9738 #define X_GLrop_VertexAttribs4fvNV 4209
9739 void
9740 __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
9741 {
9742 __GLXcontext *const gc = __glXGetCurrentContext();
9743 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9744 if (__builtin_expect(n >= 0, 1)) {
9745 emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
9746 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9747 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9748 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
9749 gc->pc += cmdlen;
9750 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9751 (void) __glXFlushRenderBuffer(gc, gc->pc);
9752 }
9753 }
9754 }
9755
9756 #define X_GLrop_VertexAttribs4svNV 4205
9757 void
9758 __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
9759 {
9760 __GLXcontext *const gc = __glXGetCurrentContext();
9761 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9762 if (__builtin_expect(n >= 0, 1)) {
9763 emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
9764 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9765 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9766 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9767 gc->pc += cmdlen;
9768 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9769 (void) __glXFlushRenderBuffer(gc, gc->pc);
9770 }
9771 }
9772 }
9773
9774 #define X_GLrop_VertexAttribs4ubvNV 4214
9775 void
9776 __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
9777 {
9778 __GLXcontext *const gc = __glXGetCurrentContext();
9779 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9780 if (__builtin_expect(n >= 0, 1)) {
9781 emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
9782 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9783 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9784 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9785 gc->pc += cmdlen;
9786 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9787 (void) __glXFlushRenderBuffer(gc, gc->pc);
9788 }
9789 }
9790 }
9791
9792 #define X_GLrop_PointParameteriNV 4221
9793 void
9794 __indirect_glPointParameteriNV(GLenum pname, GLint param)
9795 {
9796 __GLXcontext *const gc = __glXGetCurrentContext();
9797 const GLuint cmdlen = 12;
9798 emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
9799 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
9800 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
9801 gc->pc += cmdlen;
9802 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9803 (void) __glXFlushRenderBuffer(gc, gc->pc);
9804 }
9805 }
9806
9807 #define X_GLrop_PointParameterivNV 4222
9808 void
9809 __indirect_glPointParameterivNV(GLenum pname, const GLint * params)
9810 {
9811 __GLXcontext *const gc = __glXGetCurrentContext();
9812 const GLuint compsize = __glPointParameterivNV_size(pname);
9813 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
9814 emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
9815 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
9816 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
9817 gc->pc += cmdlen;
9818 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9819 (void) __glXFlushRenderBuffer(gc, gc->pc);
9820 }
9821 }
9822
9823 #define X_GLrop_ActiveStencilFaceEXT 4220
9824 void
9825 __indirect_glActiveStencilFaceEXT(GLenum face)
9826 {
9827 __GLXcontext *const gc = __glXGetCurrentContext();
9828 const GLuint cmdlen = 8;
9829 emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
9830 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
9831 gc->pc += cmdlen;
9832 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9833 (void) __glXFlushRenderBuffer(gc, gc->pc);
9834 }
9835 }
9836
9837 #define X_GLvop_GetProgramNamedParameterdvNV 1311
9838 void
9839 __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
9840 const GLubyte *name,
9841 GLdouble * params)
9842 {
9843 __GLXcontext *const gc = __glXGetCurrentContext();
9844 Display *const dpy = gc->currentDpy;
9845 const GLuint cmdlen = 8 + __GLX_PAD(len);
9846 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
9847 GLubyte const *pc =
9848 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9849 X_GLvop_GetProgramNamedParameterdvNV,
9850 cmdlen);
9851 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9852 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
9853 (void) memcpy((void *) (pc + 8), (void *) (name), len);
9854 (void) __glXReadReply(dpy, 8, params, GL_TRUE);
9855 UnlockDisplay(dpy);
9856 SyncHandle();
9857 }
9858 return;
9859 }
9860
9861 #define X_GLvop_GetProgramNamedParameterfvNV 1310
9862 void
9863 __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
9864 const GLubyte *name,
9865 GLfloat * params)
9866 {
9867 __GLXcontext *const gc = __glXGetCurrentContext();
9868 Display *const dpy = gc->currentDpy;
9869 const GLuint cmdlen = 8 + __GLX_PAD(len);
9870 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
9871 GLubyte const *pc =
9872 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9873 X_GLvop_GetProgramNamedParameterfvNV,
9874 cmdlen);
9875 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9876 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
9877 (void) memcpy((void *) (pc + 8), (void *) (name), len);
9878 (void) __glXReadReply(dpy, 4, params, GL_TRUE);
9879 UnlockDisplay(dpy);
9880 SyncHandle();
9881 }
9882 return;
9883 }
9884
9885 #define X_GLrop_ProgramNamedParameter4dvNV 4219
9886 void
9887 __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
9888 const GLubyte *name, GLdouble x,
9889 GLdouble y, GLdouble z, GLdouble w)
9890 {
9891 __GLXcontext *const gc = __glXGetCurrentContext();
9892 const GLuint cmdlen = 44 + __GLX_PAD(len);
9893 if (__builtin_expect(len >= 0, 1)) {
9894 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
9895 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
9896 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
9897 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
9898 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
9899 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
9900 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
9901 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
9902 gc->pc += cmdlen;
9903 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9904 (void) __glXFlushRenderBuffer(gc, gc->pc);
9905 }
9906 }
9907 }
9908
9909 #define X_GLrop_ProgramNamedParameter4dvNV 4219
9910 void
9911 __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
9912 const GLubyte *name,
9913 const GLdouble * v)
9914 {
9915 __GLXcontext *const gc = __glXGetCurrentContext();
9916 const GLuint cmdlen = 44 + __GLX_PAD(len);
9917 if (__builtin_expect(len >= 0, 1)) {
9918 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
9919 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
9920 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
9921 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
9922 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
9923 gc->pc += cmdlen;
9924 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9925 (void) __glXFlushRenderBuffer(gc, gc->pc);
9926 }
9927 }
9928 }
9929
9930 #define X_GLrop_ProgramNamedParameter4fvNV 4218
9931 void
9932 __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
9933 const GLubyte *name, GLfloat x,
9934 GLfloat y, GLfloat z, GLfloat w)
9935 {
9936 __GLXcontext *const gc = __glXGetCurrentContext();
9937 const GLuint cmdlen = 28 + __GLX_PAD(len);
9938 if (__builtin_expect(len >= 0, 1)) {
9939 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
9940 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
9941 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
9942 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
9943 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
9944 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
9945 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
9946 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
9947 gc->pc += cmdlen;
9948 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9949 (void) __glXFlushRenderBuffer(gc, gc->pc);
9950 }
9951 }
9952 }
9953
9954 #define X_GLrop_ProgramNamedParameter4fvNV 4218
9955 void
9956 __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
9957 const GLubyte *name,
9958 const GLfloat * v)
9959 {
9960 __GLXcontext *const gc = __glXGetCurrentContext();
9961 const GLuint cmdlen = 28 + __GLX_PAD(len);
9962 if (__builtin_expect(len >= 0, 1)) {
9963 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
9964 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
9965 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
9966 (void) memcpy((void *) (gc->pc + 12), (void *) (v), 16);
9967 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
9968 gc->pc += cmdlen;
9969 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9970 (void) __glXFlushRenderBuffer(gc, gc->pc);
9971 }
9972 }
9973 }
9974
9975 #define X_GLrop_BlendEquationSeparateEXT 4228
9976 void
9977 __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
9978 {
9979 __GLXcontext *const gc = __glXGetCurrentContext();
9980 const GLuint cmdlen = 12;
9981 emit_header(gc->pc, X_GLrop_BlendEquationSeparateEXT, cmdlen);
9982 (void) memcpy((void *) (gc->pc + 4), (void *) (&modeRGB), 4);
9983 (void) memcpy((void *) (gc->pc + 8), (void *) (&modeA), 4);
9984 gc->pc += cmdlen;
9985 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9986 (void) __glXFlushRenderBuffer(gc, gc->pc);
9987 }
9988 }
9989
9990 #define X_GLrop_BindFramebufferEXT 4319
9991 void
9992 __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
9993 {
9994 __GLXcontext *const gc = __glXGetCurrentContext();
9995 const GLuint cmdlen = 12;
9996 emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
9997 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9998 (void) memcpy((void *) (gc->pc + 8), (void *) (&framebuffer), 4);
9999 gc->pc += cmdlen;
10000 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10001 (void) __glXFlushRenderBuffer(gc, gc->pc);
10002 }
10003 }
10004
10005 #define X_GLrop_BindRenderbufferEXT 4316
10006 void
10007 __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
10008 {
10009 __GLXcontext *const gc = __glXGetCurrentContext();
10010 const GLuint cmdlen = 12;
10011 emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
10012 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10013 (void) memcpy((void *) (gc->pc + 8), (void *) (&renderbuffer), 4);
10014 gc->pc += cmdlen;
10015 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10016 (void) __glXFlushRenderBuffer(gc, gc->pc);
10017 }
10018 }
10019
10020 #define X_GLvop_CheckFramebufferStatusEXT 1427
10021 GLenum
10022 __indirect_glCheckFramebufferStatusEXT(GLenum target)
10023 {
10024 __GLXcontext *const gc = __glXGetCurrentContext();
10025 Display *const dpy = gc->currentDpy;
10026 GLenum retval = (GLenum) 0;
10027 const GLuint cmdlen = 4;
10028 if (__builtin_expect(dpy != NULL, 1)) {
10029 GLubyte const *pc =
10030 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10031 X_GLvop_CheckFramebufferStatusEXT,
10032 cmdlen);
10033 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10034 retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10035 UnlockDisplay(dpy);
10036 SyncHandle();
10037 }
10038 return retval;
10039 }
10040
10041 #define X_GLrop_DeleteFramebuffersEXT 4320
10042 void
10043 __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
10044 {
10045 __GLXcontext *const gc = __glXGetCurrentContext();
10046 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10047 if (__builtin_expect(n >= 0, 1)) {
10048 emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
10049 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10050 (void) memcpy((void *) (gc->pc + 8), (void *) (framebuffers),
10051 (n * 4));
10052 gc->pc += cmdlen;
10053 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10054 (void) __glXFlushRenderBuffer(gc, gc->pc);
10055 }
10056 }
10057 }
10058
10059 #define X_GLrop_DeleteRenderbuffersEXT 4317
10060 void
10061 __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
10062 {
10063 __GLXcontext *const gc = __glXGetCurrentContext();
10064 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10065 if (__builtin_expect(n >= 0, 1)) {
10066 emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
10067 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10068 (void) memcpy((void *) (gc->pc + 8), (void *) (renderbuffers),
10069 (n * 4));
10070 gc->pc += cmdlen;
10071 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10072 (void) __glXFlushRenderBuffer(gc, gc->pc);
10073 }
10074 }
10075 }
10076
10077 #define X_GLrop_FramebufferRenderbufferEXT 4324
10078 void
10079 __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
10080 GLenum renderbuffertarget,
10081 GLuint renderbuffer)
10082 {
10083 __GLXcontext *const gc = __glXGetCurrentContext();
10084 const GLuint cmdlen = 20;
10085 emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
10086 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10087 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10088 (void) memcpy((void *) (gc->pc + 12), (void *) (&renderbuffertarget), 4);
10089 (void) memcpy((void *) (gc->pc + 16), (void *) (&renderbuffer), 4);
10090 gc->pc += cmdlen;
10091 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10092 (void) __glXFlushRenderBuffer(gc, gc->pc);
10093 }
10094 }
10095
10096 #define X_GLrop_FramebufferTexture1DEXT 4321
10097 void
10098 __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
10099 GLenum textarget, GLuint texture,
10100 GLint level)
10101 {
10102 __GLXcontext *const gc = __glXGetCurrentContext();
10103 const GLuint cmdlen = 24;
10104 emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
10105 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10106 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10107 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10108 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10109 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10110 gc->pc += cmdlen;
10111 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10112 (void) __glXFlushRenderBuffer(gc, gc->pc);
10113 }
10114 }
10115
10116 #define X_GLrop_FramebufferTexture2DEXT 4322
10117 void
10118 __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
10119 GLenum textarget, GLuint texture,
10120 GLint level)
10121 {
10122 __GLXcontext *const gc = __glXGetCurrentContext();
10123 const GLuint cmdlen = 24;
10124 emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
10125 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10126 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10127 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10128 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10129 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10130 gc->pc += cmdlen;
10131 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10132 (void) __glXFlushRenderBuffer(gc, gc->pc);
10133 }
10134 }
10135
10136 #define X_GLrop_FramebufferTexture3DEXT 4323
10137 void
10138 __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
10139 GLenum textarget, GLuint texture,
10140 GLint level, GLint zoffset)
10141 {
10142 __GLXcontext *const gc = __glXGetCurrentContext();
10143 const GLuint cmdlen = 28;
10144 emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
10145 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10146 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10147 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10148 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10149 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10150 (void) memcpy((void *) (gc->pc + 24), (void *) (&zoffset), 4);
10151 gc->pc += cmdlen;
10152 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10153 (void) __glXFlushRenderBuffer(gc, gc->pc);
10154 }
10155 }
10156
10157 #define X_GLvop_GenFramebuffersEXT 1426
10158 void
10159 __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
10160 {
10161 __GLXcontext *const gc = __glXGetCurrentContext();
10162 Display *const dpy = gc->currentDpy;
10163 const GLuint cmdlen = 4;
10164 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10165 GLubyte const *pc =
10166 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10167 X_GLvop_GenFramebuffersEXT, cmdlen);
10168 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10169 (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
10170 UnlockDisplay(dpy);
10171 SyncHandle();
10172 }
10173 return;
10174 }
10175
10176 #define X_GLvop_GenRenderbuffersEXT 1423
10177 void
10178 __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
10179 {
10180 __GLXcontext *const gc = __glXGetCurrentContext();
10181 Display *const dpy = gc->currentDpy;
10182 const GLuint cmdlen = 4;
10183 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10184 GLubyte const *pc =
10185 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10186 X_GLvop_GenRenderbuffersEXT, cmdlen);
10187 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10188 (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
10189 UnlockDisplay(dpy);
10190 SyncHandle();
10191 }
10192 return;
10193 }
10194
10195 #define X_GLrop_GenerateMipmapEXT 4325
10196 void
10197 __indirect_glGenerateMipmapEXT(GLenum target)
10198 {
10199 __GLXcontext *const gc = __glXGetCurrentContext();
10200 const GLuint cmdlen = 8;
10201 emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
10202 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10203 gc->pc += cmdlen;
10204 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10205 (void) __glXFlushRenderBuffer(gc, gc->pc);
10206 }
10207 }
10208
10209 #define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
10210 void
10211 __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target,
10212 GLenum attachment,
10213 GLenum pname,
10214 GLint * params)
10215 {
10216 __GLXcontext *const gc = __glXGetCurrentContext();
10217 Display *const dpy = gc->currentDpy;
10218 const GLuint cmdlen = 12;
10219 if (__builtin_expect(dpy != NULL, 1)) {
10220 GLubyte const *pc =
10221 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10222 X_GLvop_GetFramebufferAttachmentParameterivEXT,
10223 cmdlen);
10224 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10225 (void) memcpy((void *) (pc + 4), (void *) (&attachment), 4);
10226 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
10227 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10228 UnlockDisplay(dpy);
10229 SyncHandle();
10230 }
10231 return;
10232 }
10233
10234 #define X_GLvop_GetRenderbufferParameterivEXT 1424
10235 void
10236 __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname,
10237 GLint * params)
10238 {
10239 __GLXcontext *const gc = __glXGetCurrentContext();
10240 Display *const dpy = gc->currentDpy;
10241 const GLuint cmdlen = 8;
10242 if (__builtin_expect(dpy != NULL, 1)) {
10243 GLubyte const *pc =
10244 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10245 X_GLvop_GetRenderbufferParameterivEXT,
10246 cmdlen);
10247 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10248 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
10249 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10250 UnlockDisplay(dpy);
10251 SyncHandle();
10252 }
10253 return;
10254 }
10255
10256 #define X_GLvop_IsFramebufferEXT 1425
10257 GLboolean
10258 __indirect_glIsFramebufferEXT(GLuint framebuffer)
10259 {
10260 __GLXcontext *const gc = __glXGetCurrentContext();
10261 Display *const dpy = gc->currentDpy;
10262 GLboolean retval = (GLboolean) 0;
10263 const GLuint cmdlen = 4;
10264 if (__builtin_expect(dpy != NULL, 1)) {
10265 GLubyte const *pc =
10266 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10267 X_GLvop_IsFramebufferEXT, cmdlen);
10268 (void) memcpy((void *) (pc + 0), (void *) (&framebuffer), 4);
10269 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10270 UnlockDisplay(dpy);
10271 SyncHandle();
10272 }
10273 return retval;
10274 }
10275
10276 #define X_GLvop_IsRenderbufferEXT 1422
10277 GLboolean
10278 __indirect_glIsRenderbufferEXT(GLuint renderbuffer)
10279 {
10280 __GLXcontext *const gc = __glXGetCurrentContext();
10281 Display *const dpy = gc->currentDpy;
10282 GLboolean retval = (GLboolean) 0;
10283 const GLuint cmdlen = 4;
10284 if (__builtin_expect(dpy != NULL, 1)) {
10285 GLubyte const *pc =
10286 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10287 X_GLvop_IsRenderbufferEXT, cmdlen);
10288 (void) memcpy((void *) (pc + 0), (void *) (&renderbuffer), 4);
10289 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10290 UnlockDisplay(dpy);
10291 SyncHandle();
10292 }
10293 return retval;
10294 }
10295
10296 #define X_GLrop_RenderbufferStorageEXT 4318
10297 void
10298 __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
10299 GLsizei width, GLsizei height)
10300 {
10301 __GLXcontext *const gc = __glXGetCurrentContext();
10302 const GLuint cmdlen = 20;
10303 emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
10304 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10305 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
10306 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
10307 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
10308 gc->pc += cmdlen;
10309 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10310 (void) __glXFlushRenderBuffer(gc, gc->pc);
10311 }
10312 }
10313
10314
10315 # undef FASTCALL
10316 # undef NOINLINE