glx: Rename __GLXcontext and __GLXdisplayPrivate to struct types.
[mesa.git] / src / glx / 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 "glapidispatch.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__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
51 # define NOINLINE __attribute__((noinline))
52 # else
53 # define NOINLINE
54 # endif
55
56 #ifndef __GNUC__
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, struct glx_context * 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(struct glx_context * 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(struct glx_context * 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 struct glx_context *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 struct glx_context *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 struct glx_context *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 struct glx_context *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 struct glx_context *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 struct glx_context *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 struct glx_context *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 struct glx_context *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 struct glx_context *const gc = __glXGetCurrentContext();
302 Display *const dpy = gc->currentDpy;
303 #ifndef USE_XCB
304 const GLuint cmdlen = 8;
305 #endif
306 if (__builtin_expect(dpy != NULL, 1)) {
307 #ifdef USE_XCB
308 xcb_connection_t *c = XGetXCBConnection(dpy);
309 (void) __glXFlushRenderBuffer(gc, gc->pc);
310 xcb_glx_new_list(c, gc->currentContextTag, list, mode);
311 #else
312 GLubyte const *pc =
313 __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen);
314 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
315 (void) memcpy((void *) (pc + 4), (void *) (&mode), 4);
316 UnlockDisplay(dpy);
317 SyncHandle();
318 #endif /* USE_XCB */
319 }
320 return;
321 }
322
323 #define X_GLsop_EndList 102
324 void
325 __indirect_glEndList(void)
326 {
327 struct glx_context *const gc = __glXGetCurrentContext();
328 Display *const dpy = gc->currentDpy;
329 #ifndef USE_XCB
330 const GLuint cmdlen = 0;
331 #endif
332 if (__builtin_expect(dpy != NULL, 1)) {
333 #ifdef USE_XCB
334 xcb_connection_t *c = XGetXCBConnection(dpy);
335 (void) __glXFlushRenderBuffer(gc, gc->pc);
336 xcb_glx_end_list(c, gc->currentContextTag);
337 #else
338 (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen);
339 UnlockDisplay(dpy);
340 SyncHandle();
341 #endif /* USE_XCB */
342 }
343 return;
344 }
345
346 #define X_GLrop_CallList 1
347 void
348 __indirect_glCallList(GLuint list)
349 {
350 struct glx_context *const gc = __glXGetCurrentContext();
351 const GLuint cmdlen = 8;
352 emit_header(gc->pc, X_GLrop_CallList, cmdlen);
353 (void) memcpy((void *) (gc->pc + 4), (void *) (&list), 4);
354 gc->pc += cmdlen;
355 if (__builtin_expect(gc->pc > gc->limit, 0)) {
356 (void) __glXFlushRenderBuffer(gc, gc->pc);
357 }
358 }
359
360 #define X_GLrop_CallLists 2
361 void
362 __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
363 {
364 struct glx_context *const gc = __glXGetCurrentContext();
365 const GLuint compsize = __glCallLists_size(type);
366 const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
367 if (n < 0) {
368 __glXSetError(gc, GL_INVALID_VALUE);
369 return;
370 }
371 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
372 if (cmdlen <= gc->maxSmallRenderCommandSize) {
373 if ((gc->pc + cmdlen) > gc->bufEnd) {
374 (void) __glXFlushRenderBuffer(gc, gc->pc);
375 }
376 emit_header(gc->pc, X_GLrop_CallLists, cmdlen);
377 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
378 (void) memcpy((void *) (gc->pc + 8), (void *) (&type), 4);
379 (void) memcpy((void *) (gc->pc + 12), (void *) (lists),
380 (compsize * n));
381 gc->pc += cmdlen;
382 if (__builtin_expect(gc->pc > gc->limit, 0)) {
383 (void) __glXFlushRenderBuffer(gc, gc->pc);
384 }
385 } else {
386 const GLint op = X_GLrop_CallLists;
387 const GLuint cmdlenLarge = cmdlen + 4;
388 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
389 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
390 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
391 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
392 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
393 __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n));
394 }
395 }
396 }
397
398 #define X_GLsop_DeleteLists 103
399 void
400 __indirect_glDeleteLists(GLuint list, GLsizei range)
401 {
402 struct glx_context *const gc = __glXGetCurrentContext();
403 Display *const dpy = gc->currentDpy;
404 #ifndef USE_XCB
405 const GLuint cmdlen = 8;
406 #endif
407 if (__builtin_expect(dpy != NULL, 1)) {
408 #ifdef USE_XCB
409 xcb_connection_t *c = XGetXCBConnection(dpy);
410 (void) __glXFlushRenderBuffer(gc, gc->pc);
411 xcb_glx_delete_lists(c, gc->currentContextTag, list, range);
412 #else
413 GLubyte const *pc =
414 __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen);
415 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
416 (void) memcpy((void *) (pc + 4), (void *) (&range), 4);
417 UnlockDisplay(dpy);
418 SyncHandle();
419 #endif /* USE_XCB */
420 }
421 return;
422 }
423
424 #define X_GLsop_GenLists 104
425 GLuint
426 __indirect_glGenLists(GLsizei range)
427 {
428 struct glx_context *const gc = __glXGetCurrentContext();
429 Display *const dpy = gc->currentDpy;
430 GLuint retval = (GLuint) 0;
431 #ifndef USE_XCB
432 const GLuint cmdlen = 4;
433 #endif
434 if (__builtin_expect(dpy != NULL, 1)) {
435 #ifdef USE_XCB
436 xcb_connection_t *c = XGetXCBConnection(dpy);
437 (void) __glXFlushRenderBuffer(gc, gc->pc);
438 xcb_glx_gen_lists_reply_t *reply =
439 xcb_glx_gen_lists_reply(c,
440 xcb_glx_gen_lists(c,
441 gc->currentContextTag,
442 range), NULL);
443 retval = reply->ret_val;
444 free(reply);
445 #else
446 GLubyte const *pc =
447 __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen);
448 (void) memcpy((void *) (pc + 0), (void *) (&range), 4);
449 retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE);
450 UnlockDisplay(dpy);
451 SyncHandle();
452 #endif /* USE_XCB */
453 }
454 return retval;
455 }
456
457 #define X_GLrop_ListBase 3
458 void
459 __indirect_glListBase(GLuint base)
460 {
461 struct glx_context *const gc = __glXGetCurrentContext();
462 const GLuint cmdlen = 8;
463 emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
464 (void) memcpy((void *) (gc->pc + 4), (void *) (&base), 4);
465 gc->pc += cmdlen;
466 if (__builtin_expect(gc->pc > gc->limit, 0)) {
467 (void) __glXFlushRenderBuffer(gc, gc->pc);
468 }
469 }
470
471 #define X_GLrop_Begin 4
472 void
473 __indirect_glBegin(GLenum mode)
474 {
475 struct glx_context *const gc = __glXGetCurrentContext();
476 const GLuint cmdlen = 8;
477 emit_header(gc->pc, X_GLrop_Begin, cmdlen);
478 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
479 gc->pc += cmdlen;
480 if (__builtin_expect(gc->pc > gc->limit, 0)) {
481 (void) __glXFlushRenderBuffer(gc, gc->pc);
482 }
483 }
484
485 #define X_GLrop_Bitmap 5
486 void
487 __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
488 GLfloat yorig, GLfloat xmove, GLfloat ymove,
489 const GLubyte *bitmap)
490 {
491 struct glx_context *const gc = __glXGetCurrentContext();
492 const GLuint compsize =
493 (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX,
494 GL_BITMAP, 0) : 0;
495 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
496 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
497 if (cmdlen <= gc->maxSmallRenderCommandSize) {
498 if ((gc->pc + cmdlen) > gc->bufEnd) {
499 (void) __glXFlushRenderBuffer(gc, gc->pc);
500 }
501 emit_header(gc->pc, X_GLrop_Bitmap, cmdlen);
502 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
503 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
504 (void) memcpy((void *) (gc->pc + 32), (void *) (&xorig), 4);
505 (void) memcpy((void *) (gc->pc + 36), (void *) (&yorig), 4);
506 (void) memcpy((void *) (gc->pc + 40), (void *) (&xmove), 4);
507 (void) memcpy((void *) (gc->pc + 44), (void *) (&ymove), 4);
508 if (compsize > 0) {
509 (*gc->fillImage) (gc, 2, width, height, 1, GL_COLOR_INDEX,
510 GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4);
511 } else {
512 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
513 default_pixel_store_2D_size);
514 }
515 gc->pc += cmdlen;
516 if (gc->pc > gc->limit) {
517 (void) __glXFlushRenderBuffer(gc, gc->pc);
518 }
519 } else {
520 const GLint op = X_GLrop_Bitmap;
521 const GLuint cmdlenLarge = cmdlen + 4;
522 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
523 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
524 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
525 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
526 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
527 (void) memcpy((void *) (pc + 36), (void *) (&xorig), 4);
528 (void) memcpy((void *) (pc + 40), (void *) (&yorig), 4);
529 (void) memcpy((void *) (pc + 44), (void *) (&xmove), 4);
530 (void) memcpy((void *) (pc + 48), (void *) (&ymove), 4);
531 __glXSendLargeImage(gc, compsize, 2, width, height, 1,
532 GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52,
533 pc + 8);
534 }
535 }
536 }
537
538 #define X_GLrop_Color3bv 6
539 void
540 __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
541 {
542 struct glx_context *const gc = __glXGetCurrentContext();
543 const GLuint cmdlen = 8;
544 emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
545 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
546 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
547 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
548 gc->pc += cmdlen;
549 if (__builtin_expect(gc->pc > gc->limit, 0)) {
550 (void) __glXFlushRenderBuffer(gc, gc->pc);
551 }
552 }
553
554 #define X_GLrop_Color3bv 6
555 void
556 __indirect_glColor3bv(const GLbyte *v)
557 {
558 generic_3_byte(X_GLrop_Color3bv, v);
559 }
560
561 #define X_GLrop_Color3dv 7
562 void
563 __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
564 {
565 struct glx_context *const gc = __glXGetCurrentContext();
566 const GLuint cmdlen = 28;
567 emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
568 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
569 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
570 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
571 gc->pc += cmdlen;
572 if (__builtin_expect(gc->pc > gc->limit, 0)) {
573 (void) __glXFlushRenderBuffer(gc, gc->pc);
574 }
575 }
576
577 #define X_GLrop_Color3dv 7
578 void
579 __indirect_glColor3dv(const GLdouble * v)
580 {
581 generic_24_byte(X_GLrop_Color3dv, v);
582 }
583
584 #define X_GLrop_Color3fv 8
585 void
586 __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
587 {
588 struct glx_context *const gc = __glXGetCurrentContext();
589 const GLuint cmdlen = 16;
590 emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
591 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
592 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
593 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
594 gc->pc += cmdlen;
595 if (__builtin_expect(gc->pc > gc->limit, 0)) {
596 (void) __glXFlushRenderBuffer(gc, gc->pc);
597 }
598 }
599
600 #define X_GLrop_Color3fv 8
601 void
602 __indirect_glColor3fv(const GLfloat * v)
603 {
604 generic_12_byte(X_GLrop_Color3fv, v);
605 }
606
607 #define X_GLrop_Color3iv 9
608 void
609 __indirect_glColor3i(GLint red, GLint green, GLint blue)
610 {
611 struct glx_context *const gc = __glXGetCurrentContext();
612 const GLuint cmdlen = 16;
613 emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
614 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
615 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
616 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
617 gc->pc += cmdlen;
618 if (__builtin_expect(gc->pc > gc->limit, 0)) {
619 (void) __glXFlushRenderBuffer(gc, gc->pc);
620 }
621 }
622
623 #define X_GLrop_Color3iv 9
624 void
625 __indirect_glColor3iv(const GLint * v)
626 {
627 generic_12_byte(X_GLrop_Color3iv, v);
628 }
629
630 #define X_GLrop_Color3sv 10
631 void
632 __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
633 {
634 struct glx_context *const gc = __glXGetCurrentContext();
635 const GLuint cmdlen = 12;
636 emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
637 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
638 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
639 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
640 gc->pc += cmdlen;
641 if (__builtin_expect(gc->pc > gc->limit, 0)) {
642 (void) __glXFlushRenderBuffer(gc, gc->pc);
643 }
644 }
645
646 #define X_GLrop_Color3sv 10
647 void
648 __indirect_glColor3sv(const GLshort * v)
649 {
650 generic_6_byte(X_GLrop_Color3sv, v);
651 }
652
653 #define X_GLrop_Color3ubv 11
654 void
655 __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
656 {
657 struct glx_context *const gc = __glXGetCurrentContext();
658 const GLuint cmdlen = 8;
659 emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
660 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
661 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
662 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
663 gc->pc += cmdlen;
664 if (__builtin_expect(gc->pc > gc->limit, 0)) {
665 (void) __glXFlushRenderBuffer(gc, gc->pc);
666 }
667 }
668
669 #define X_GLrop_Color3ubv 11
670 void
671 __indirect_glColor3ubv(const GLubyte *v)
672 {
673 generic_3_byte(X_GLrop_Color3ubv, v);
674 }
675
676 #define X_GLrop_Color3uiv 12
677 void
678 __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
679 {
680 struct glx_context *const gc = __glXGetCurrentContext();
681 const GLuint cmdlen = 16;
682 emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
683 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
684 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
685 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
686 gc->pc += cmdlen;
687 if (__builtin_expect(gc->pc > gc->limit, 0)) {
688 (void) __glXFlushRenderBuffer(gc, gc->pc);
689 }
690 }
691
692 #define X_GLrop_Color3uiv 12
693 void
694 __indirect_glColor3uiv(const GLuint * v)
695 {
696 generic_12_byte(X_GLrop_Color3uiv, v);
697 }
698
699 #define X_GLrop_Color3usv 13
700 void
701 __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
702 {
703 struct glx_context *const gc = __glXGetCurrentContext();
704 const GLuint cmdlen = 12;
705 emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
706 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
707 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
708 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
709 gc->pc += cmdlen;
710 if (__builtin_expect(gc->pc > gc->limit, 0)) {
711 (void) __glXFlushRenderBuffer(gc, gc->pc);
712 }
713 }
714
715 #define X_GLrop_Color3usv 13
716 void
717 __indirect_glColor3usv(const GLushort * v)
718 {
719 generic_6_byte(X_GLrop_Color3usv, v);
720 }
721
722 #define X_GLrop_Color4bv 14
723 void
724 __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
725 {
726 struct glx_context *const gc = __glXGetCurrentContext();
727 const GLuint cmdlen = 8;
728 emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
729 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
730 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
731 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
732 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
733 gc->pc += cmdlen;
734 if (__builtin_expect(gc->pc > gc->limit, 0)) {
735 (void) __glXFlushRenderBuffer(gc, gc->pc);
736 }
737 }
738
739 #define X_GLrop_Color4bv 14
740 void
741 __indirect_glColor4bv(const GLbyte *v)
742 {
743 generic_4_byte(X_GLrop_Color4bv, v);
744 }
745
746 #define X_GLrop_Color4dv 15
747 void
748 __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue,
749 GLdouble alpha)
750 {
751 struct glx_context *const gc = __glXGetCurrentContext();
752 const GLuint cmdlen = 36;
753 emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
754 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
755 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
756 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
757 (void) memcpy((void *) (gc->pc + 28), (void *) (&alpha), 8);
758 gc->pc += cmdlen;
759 if (__builtin_expect(gc->pc > gc->limit, 0)) {
760 (void) __glXFlushRenderBuffer(gc, gc->pc);
761 }
762 }
763
764 #define X_GLrop_Color4dv 15
765 void
766 __indirect_glColor4dv(const GLdouble * v)
767 {
768 generic_32_byte(X_GLrop_Color4dv, v);
769 }
770
771 #define X_GLrop_Color4fv 16
772 void
773 __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
774 {
775 struct glx_context *const gc = __glXGetCurrentContext();
776 const GLuint cmdlen = 20;
777 emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
778 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
779 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
780 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
781 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
782 gc->pc += cmdlen;
783 if (__builtin_expect(gc->pc > gc->limit, 0)) {
784 (void) __glXFlushRenderBuffer(gc, gc->pc);
785 }
786 }
787
788 #define X_GLrop_Color4fv 16
789 void
790 __indirect_glColor4fv(const GLfloat * v)
791 {
792 generic_16_byte(X_GLrop_Color4fv, v);
793 }
794
795 #define X_GLrop_Color4iv 17
796 void
797 __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
798 {
799 struct glx_context *const gc = __glXGetCurrentContext();
800 const GLuint cmdlen = 20;
801 emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
802 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
803 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
804 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
805 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
806 gc->pc += cmdlen;
807 if (__builtin_expect(gc->pc > gc->limit, 0)) {
808 (void) __glXFlushRenderBuffer(gc, gc->pc);
809 }
810 }
811
812 #define X_GLrop_Color4iv 17
813 void
814 __indirect_glColor4iv(const GLint * v)
815 {
816 generic_16_byte(X_GLrop_Color4iv, v);
817 }
818
819 #define X_GLrop_Color4sv 18
820 void
821 __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
822 {
823 struct glx_context *const gc = __glXGetCurrentContext();
824 const GLuint cmdlen = 12;
825 emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
826 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
827 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
828 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
829 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
830 gc->pc += cmdlen;
831 if (__builtin_expect(gc->pc > gc->limit, 0)) {
832 (void) __glXFlushRenderBuffer(gc, gc->pc);
833 }
834 }
835
836 #define X_GLrop_Color4sv 18
837 void
838 __indirect_glColor4sv(const GLshort * v)
839 {
840 generic_8_byte(X_GLrop_Color4sv, v);
841 }
842
843 #define X_GLrop_Color4ubv 19
844 void
845 __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
846 {
847 struct glx_context *const gc = __glXGetCurrentContext();
848 const GLuint cmdlen = 8;
849 emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
850 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
851 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
852 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
853 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
854 gc->pc += cmdlen;
855 if (__builtin_expect(gc->pc > gc->limit, 0)) {
856 (void) __glXFlushRenderBuffer(gc, gc->pc);
857 }
858 }
859
860 #define X_GLrop_Color4ubv 19
861 void
862 __indirect_glColor4ubv(const GLubyte *v)
863 {
864 generic_4_byte(X_GLrop_Color4ubv, v);
865 }
866
867 #define X_GLrop_Color4uiv 20
868 void
869 __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
870 {
871 struct glx_context *const gc = __glXGetCurrentContext();
872 const GLuint cmdlen = 20;
873 emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
874 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
875 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
876 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
877 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
878 gc->pc += cmdlen;
879 if (__builtin_expect(gc->pc > gc->limit, 0)) {
880 (void) __glXFlushRenderBuffer(gc, gc->pc);
881 }
882 }
883
884 #define X_GLrop_Color4uiv 20
885 void
886 __indirect_glColor4uiv(const GLuint * v)
887 {
888 generic_16_byte(X_GLrop_Color4uiv, v);
889 }
890
891 #define X_GLrop_Color4usv 21
892 void
893 __indirect_glColor4us(GLushort red, GLushort green, GLushort blue,
894 GLushort alpha)
895 {
896 struct glx_context *const gc = __glXGetCurrentContext();
897 const GLuint cmdlen = 12;
898 emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
899 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
900 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
901 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
902 (void) memcpy((void *) (gc->pc + 10), (void *) (&alpha), 2);
903 gc->pc += cmdlen;
904 if (__builtin_expect(gc->pc > gc->limit, 0)) {
905 (void) __glXFlushRenderBuffer(gc, gc->pc);
906 }
907 }
908
909 #define X_GLrop_Color4usv 21
910 void
911 __indirect_glColor4usv(const GLushort * v)
912 {
913 generic_8_byte(X_GLrop_Color4usv, v);
914 }
915
916 #define X_GLrop_EdgeFlagv 22
917 void
918 __indirect_glEdgeFlag(GLboolean flag)
919 {
920 struct glx_context *const gc = __glXGetCurrentContext();
921 const GLuint cmdlen = 8;
922 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
923 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
924 gc->pc += cmdlen;
925 if (__builtin_expect(gc->pc > gc->limit, 0)) {
926 (void) __glXFlushRenderBuffer(gc, gc->pc);
927 }
928 }
929
930 #define X_GLrop_EdgeFlagv 22
931 void
932 __indirect_glEdgeFlagv(const GLboolean * flag)
933 {
934 struct glx_context *const gc = __glXGetCurrentContext();
935 const GLuint cmdlen = 8;
936 emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
937 (void) memcpy((void *) (gc->pc + 4), (void *) (flag), 1);
938 gc->pc += cmdlen;
939 if (__builtin_expect(gc->pc > gc->limit, 0)) {
940 (void) __glXFlushRenderBuffer(gc, gc->pc);
941 }
942 }
943
944 #define X_GLrop_End 23
945 void
946 __indirect_glEnd(void)
947 {
948 struct glx_context *const gc = __glXGetCurrentContext();
949 const GLuint cmdlen = 4;
950 emit_header(gc->pc, X_GLrop_End, cmdlen);
951 gc->pc += cmdlen;
952 if (__builtin_expect(gc->pc > gc->limit, 0)) {
953 (void) __glXFlushRenderBuffer(gc, gc->pc);
954 }
955 }
956
957 #define X_GLrop_Indexdv 24
958 void
959 __indirect_glIndexd(GLdouble c)
960 {
961 struct glx_context *const gc = __glXGetCurrentContext();
962 const GLuint cmdlen = 12;
963 emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
964 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 8);
965 gc->pc += cmdlen;
966 if (__builtin_expect(gc->pc > gc->limit, 0)) {
967 (void) __glXFlushRenderBuffer(gc, gc->pc);
968 }
969 }
970
971 #define X_GLrop_Indexdv 24
972 void
973 __indirect_glIndexdv(const GLdouble * c)
974 {
975 generic_8_byte(X_GLrop_Indexdv, c);
976 }
977
978 #define X_GLrop_Indexfv 25
979 void
980 __indirect_glIndexf(GLfloat c)
981 {
982 struct glx_context *const gc = __glXGetCurrentContext();
983 const GLuint cmdlen = 8;
984 emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
985 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
986 gc->pc += cmdlen;
987 if (__builtin_expect(gc->pc > gc->limit, 0)) {
988 (void) __glXFlushRenderBuffer(gc, gc->pc);
989 }
990 }
991
992 #define X_GLrop_Indexfv 25
993 void
994 __indirect_glIndexfv(const GLfloat * c)
995 {
996 generic_4_byte(X_GLrop_Indexfv, c);
997 }
998
999 #define X_GLrop_Indexiv 26
1000 void
1001 __indirect_glIndexi(GLint c)
1002 {
1003 struct glx_context *const gc = __glXGetCurrentContext();
1004 const GLuint cmdlen = 8;
1005 emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
1006 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
1007 gc->pc += cmdlen;
1008 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1009 (void) __glXFlushRenderBuffer(gc, gc->pc);
1010 }
1011 }
1012
1013 #define X_GLrop_Indexiv 26
1014 void
1015 __indirect_glIndexiv(const GLint * c)
1016 {
1017 generic_4_byte(X_GLrop_Indexiv, c);
1018 }
1019
1020 #define X_GLrop_Indexsv 27
1021 void
1022 __indirect_glIndexs(GLshort c)
1023 {
1024 struct glx_context *const gc = __glXGetCurrentContext();
1025 const GLuint cmdlen = 8;
1026 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1027 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 2);
1028 gc->pc += cmdlen;
1029 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1030 (void) __glXFlushRenderBuffer(gc, gc->pc);
1031 }
1032 }
1033
1034 #define X_GLrop_Indexsv 27
1035 void
1036 __indirect_glIndexsv(const GLshort * c)
1037 {
1038 struct glx_context *const gc = __glXGetCurrentContext();
1039 const GLuint cmdlen = 8;
1040 emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
1041 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 2);
1042 gc->pc += cmdlen;
1043 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1044 (void) __glXFlushRenderBuffer(gc, gc->pc);
1045 }
1046 }
1047
1048 #define X_GLrop_Normal3bv 28
1049 void
1050 __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
1051 {
1052 struct glx_context *const gc = __glXGetCurrentContext();
1053 const GLuint cmdlen = 8;
1054 emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
1055 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 1);
1056 (void) memcpy((void *) (gc->pc + 5), (void *) (&ny), 1);
1057 (void) memcpy((void *) (gc->pc + 6), (void *) (&nz), 1);
1058 gc->pc += cmdlen;
1059 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1060 (void) __glXFlushRenderBuffer(gc, gc->pc);
1061 }
1062 }
1063
1064 #define X_GLrop_Normal3bv 28
1065 void
1066 __indirect_glNormal3bv(const GLbyte *v)
1067 {
1068 generic_3_byte(X_GLrop_Normal3bv, v);
1069 }
1070
1071 #define X_GLrop_Normal3dv 29
1072 void
1073 __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
1074 {
1075 struct glx_context *const gc = __glXGetCurrentContext();
1076 const GLuint cmdlen = 28;
1077 emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
1078 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 8);
1079 (void) memcpy((void *) (gc->pc + 12), (void *) (&ny), 8);
1080 (void) memcpy((void *) (gc->pc + 20), (void *) (&nz), 8);
1081 gc->pc += cmdlen;
1082 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1083 (void) __glXFlushRenderBuffer(gc, gc->pc);
1084 }
1085 }
1086
1087 #define X_GLrop_Normal3dv 29
1088 void
1089 __indirect_glNormal3dv(const GLdouble * v)
1090 {
1091 generic_24_byte(X_GLrop_Normal3dv, v);
1092 }
1093
1094 #define X_GLrop_Normal3fv 30
1095 void
1096 __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1097 {
1098 struct glx_context *const gc = __glXGetCurrentContext();
1099 const GLuint cmdlen = 16;
1100 emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
1101 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1102 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1103 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1104 gc->pc += cmdlen;
1105 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1106 (void) __glXFlushRenderBuffer(gc, gc->pc);
1107 }
1108 }
1109
1110 #define X_GLrop_Normal3fv 30
1111 void
1112 __indirect_glNormal3fv(const GLfloat * v)
1113 {
1114 generic_12_byte(X_GLrop_Normal3fv, v);
1115 }
1116
1117 #define X_GLrop_Normal3iv 31
1118 void
1119 __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
1120 {
1121 struct glx_context *const gc = __glXGetCurrentContext();
1122 const GLuint cmdlen = 16;
1123 emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
1124 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
1125 (void) memcpy((void *) (gc->pc + 8), (void *) (&ny), 4);
1126 (void) memcpy((void *) (gc->pc + 12), (void *) (&nz), 4);
1127 gc->pc += cmdlen;
1128 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1129 (void) __glXFlushRenderBuffer(gc, gc->pc);
1130 }
1131 }
1132
1133 #define X_GLrop_Normal3iv 31
1134 void
1135 __indirect_glNormal3iv(const GLint * v)
1136 {
1137 generic_12_byte(X_GLrop_Normal3iv, v);
1138 }
1139
1140 #define X_GLrop_Normal3sv 32
1141 void
1142 __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
1143 {
1144 struct glx_context *const gc = __glXGetCurrentContext();
1145 const GLuint cmdlen = 12;
1146 emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
1147 (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 2);
1148 (void) memcpy((void *) (gc->pc + 6), (void *) (&ny), 2);
1149 (void) memcpy((void *) (gc->pc + 8), (void *) (&nz), 2);
1150 gc->pc += cmdlen;
1151 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1152 (void) __glXFlushRenderBuffer(gc, gc->pc);
1153 }
1154 }
1155
1156 #define X_GLrop_Normal3sv 32
1157 void
1158 __indirect_glNormal3sv(const GLshort * v)
1159 {
1160 generic_6_byte(X_GLrop_Normal3sv, v);
1161 }
1162
1163 #define X_GLrop_RasterPos2dv 33
1164 void
1165 __indirect_glRasterPos2d(GLdouble x, GLdouble y)
1166 {
1167 struct glx_context *const gc = __glXGetCurrentContext();
1168 const GLuint cmdlen = 20;
1169 emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
1170 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1171 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1172 gc->pc += cmdlen;
1173 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1174 (void) __glXFlushRenderBuffer(gc, gc->pc);
1175 }
1176 }
1177
1178 #define X_GLrop_RasterPos2dv 33
1179 void
1180 __indirect_glRasterPos2dv(const GLdouble * v)
1181 {
1182 generic_16_byte(X_GLrop_RasterPos2dv, v);
1183 }
1184
1185 #define X_GLrop_RasterPos2fv 34
1186 void
1187 __indirect_glRasterPos2f(GLfloat x, GLfloat y)
1188 {
1189 struct glx_context *const gc = __glXGetCurrentContext();
1190 const GLuint cmdlen = 12;
1191 emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
1192 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1193 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1194 gc->pc += cmdlen;
1195 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1196 (void) __glXFlushRenderBuffer(gc, gc->pc);
1197 }
1198 }
1199
1200 #define X_GLrop_RasterPos2fv 34
1201 void
1202 __indirect_glRasterPos2fv(const GLfloat * v)
1203 {
1204 generic_8_byte(X_GLrop_RasterPos2fv, v);
1205 }
1206
1207 #define X_GLrop_RasterPos2iv 35
1208 void
1209 __indirect_glRasterPos2i(GLint x, GLint y)
1210 {
1211 struct glx_context *const gc = __glXGetCurrentContext();
1212 const GLuint cmdlen = 12;
1213 emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
1214 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1215 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1216 gc->pc += cmdlen;
1217 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1218 (void) __glXFlushRenderBuffer(gc, gc->pc);
1219 }
1220 }
1221
1222 #define X_GLrop_RasterPos2iv 35
1223 void
1224 __indirect_glRasterPos2iv(const GLint * v)
1225 {
1226 generic_8_byte(X_GLrop_RasterPos2iv, v);
1227 }
1228
1229 #define X_GLrop_RasterPos2sv 36
1230 void
1231 __indirect_glRasterPos2s(GLshort x, GLshort y)
1232 {
1233 struct glx_context *const gc = __glXGetCurrentContext();
1234 const GLuint cmdlen = 8;
1235 emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
1236 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1237 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1238 gc->pc += cmdlen;
1239 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1240 (void) __glXFlushRenderBuffer(gc, gc->pc);
1241 }
1242 }
1243
1244 #define X_GLrop_RasterPos2sv 36
1245 void
1246 __indirect_glRasterPos2sv(const GLshort * v)
1247 {
1248 generic_4_byte(X_GLrop_RasterPos2sv, v);
1249 }
1250
1251 #define X_GLrop_RasterPos3dv 37
1252 void
1253 __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
1254 {
1255 struct glx_context *const gc = __glXGetCurrentContext();
1256 const GLuint cmdlen = 28;
1257 emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
1258 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1259 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1260 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1261 gc->pc += cmdlen;
1262 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1263 (void) __glXFlushRenderBuffer(gc, gc->pc);
1264 }
1265 }
1266
1267 #define X_GLrop_RasterPos3dv 37
1268 void
1269 __indirect_glRasterPos3dv(const GLdouble * v)
1270 {
1271 generic_24_byte(X_GLrop_RasterPos3dv, v);
1272 }
1273
1274 #define X_GLrop_RasterPos3fv 38
1275 void
1276 __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
1277 {
1278 struct glx_context *const gc = __glXGetCurrentContext();
1279 const GLuint cmdlen = 16;
1280 emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
1281 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1282 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1283 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1284 gc->pc += cmdlen;
1285 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1286 (void) __glXFlushRenderBuffer(gc, gc->pc);
1287 }
1288 }
1289
1290 #define X_GLrop_RasterPos3fv 38
1291 void
1292 __indirect_glRasterPos3fv(const GLfloat * v)
1293 {
1294 generic_12_byte(X_GLrop_RasterPos3fv, v);
1295 }
1296
1297 #define X_GLrop_RasterPos3iv 39
1298 void
1299 __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
1300 {
1301 struct glx_context *const gc = __glXGetCurrentContext();
1302 const GLuint cmdlen = 16;
1303 emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
1304 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1305 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1306 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1307 gc->pc += cmdlen;
1308 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1309 (void) __glXFlushRenderBuffer(gc, gc->pc);
1310 }
1311 }
1312
1313 #define X_GLrop_RasterPos3iv 39
1314 void
1315 __indirect_glRasterPos3iv(const GLint * v)
1316 {
1317 generic_12_byte(X_GLrop_RasterPos3iv, v);
1318 }
1319
1320 #define X_GLrop_RasterPos3sv 40
1321 void
1322 __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
1323 {
1324 struct glx_context *const gc = __glXGetCurrentContext();
1325 const GLuint cmdlen = 12;
1326 emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
1327 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1328 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1329 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1330 gc->pc += cmdlen;
1331 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1332 (void) __glXFlushRenderBuffer(gc, gc->pc);
1333 }
1334 }
1335
1336 #define X_GLrop_RasterPos3sv 40
1337 void
1338 __indirect_glRasterPos3sv(const GLshort * v)
1339 {
1340 generic_6_byte(X_GLrop_RasterPos3sv, v);
1341 }
1342
1343 #define X_GLrop_RasterPos4dv 41
1344 void
1345 __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1346 {
1347 struct glx_context *const gc = __glXGetCurrentContext();
1348 const GLuint cmdlen = 36;
1349 emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
1350 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1351 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1352 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
1353 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
1354 gc->pc += cmdlen;
1355 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1356 (void) __glXFlushRenderBuffer(gc, gc->pc);
1357 }
1358 }
1359
1360 #define X_GLrop_RasterPos4dv 41
1361 void
1362 __indirect_glRasterPos4dv(const GLdouble * v)
1363 {
1364 generic_32_byte(X_GLrop_RasterPos4dv, v);
1365 }
1366
1367 #define X_GLrop_RasterPos4fv 42
1368 void
1369 __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1370 {
1371 struct glx_context *const gc = __glXGetCurrentContext();
1372 const GLuint cmdlen = 20;
1373 emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
1374 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1375 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1376 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1377 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1378 gc->pc += cmdlen;
1379 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1380 (void) __glXFlushRenderBuffer(gc, gc->pc);
1381 }
1382 }
1383
1384 #define X_GLrop_RasterPos4fv 42
1385 void
1386 __indirect_glRasterPos4fv(const GLfloat * v)
1387 {
1388 generic_16_byte(X_GLrop_RasterPos4fv, v);
1389 }
1390
1391 #define X_GLrop_RasterPos4iv 43
1392 void
1393 __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
1394 {
1395 struct glx_context *const gc = __glXGetCurrentContext();
1396 const GLuint cmdlen = 20;
1397 emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
1398 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1399 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1400 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
1401 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
1402 gc->pc += cmdlen;
1403 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1404 (void) __glXFlushRenderBuffer(gc, gc->pc);
1405 }
1406 }
1407
1408 #define X_GLrop_RasterPos4iv 43
1409 void
1410 __indirect_glRasterPos4iv(const GLint * v)
1411 {
1412 generic_16_byte(X_GLrop_RasterPos4iv, v);
1413 }
1414
1415 #define X_GLrop_RasterPos4sv 44
1416 void
1417 __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
1418 {
1419 struct glx_context *const gc = __glXGetCurrentContext();
1420 const GLuint cmdlen = 12;
1421 emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
1422 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
1423 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
1424 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
1425 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
1426 gc->pc += cmdlen;
1427 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1428 (void) __glXFlushRenderBuffer(gc, gc->pc);
1429 }
1430 }
1431
1432 #define X_GLrop_RasterPos4sv 44
1433 void
1434 __indirect_glRasterPos4sv(const GLshort * v)
1435 {
1436 generic_8_byte(X_GLrop_RasterPos4sv, v);
1437 }
1438
1439 #define X_GLrop_Rectdv 45
1440 void
1441 __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1442 {
1443 struct glx_context *const gc = __glXGetCurrentContext();
1444 const GLuint cmdlen = 36;
1445 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1446 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 8);
1447 (void) memcpy((void *) (gc->pc + 12), (void *) (&y1), 8);
1448 (void) memcpy((void *) (gc->pc + 20), (void *) (&x2), 8);
1449 (void) memcpy((void *) (gc->pc + 28), (void *) (&y2), 8);
1450 gc->pc += cmdlen;
1451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1452 (void) __glXFlushRenderBuffer(gc, gc->pc);
1453 }
1454 }
1455
1456 #define X_GLrop_Rectdv 45
1457 void
1458 __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
1459 {
1460 struct glx_context *const gc = __glXGetCurrentContext();
1461 const GLuint cmdlen = 36;
1462 emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
1463 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 16);
1464 (void) memcpy((void *) (gc->pc + 20), (void *) (v2), 16);
1465 gc->pc += cmdlen;
1466 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1467 (void) __glXFlushRenderBuffer(gc, gc->pc);
1468 }
1469 }
1470
1471 #define X_GLrop_Rectfv 46
1472 void
1473 __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
1474 {
1475 struct glx_context *const gc = __glXGetCurrentContext();
1476 const GLuint cmdlen = 20;
1477 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1478 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1479 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1480 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1481 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1482 gc->pc += cmdlen;
1483 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1484 (void) __glXFlushRenderBuffer(gc, gc->pc);
1485 }
1486 }
1487
1488 #define X_GLrop_Rectfv 46
1489 void
1490 __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
1491 {
1492 struct glx_context *const gc = __glXGetCurrentContext();
1493 const GLuint cmdlen = 20;
1494 emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
1495 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1496 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1497 gc->pc += cmdlen;
1498 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1499 (void) __glXFlushRenderBuffer(gc, gc->pc);
1500 }
1501 }
1502
1503 #define X_GLrop_Rectiv 47
1504 void
1505 __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
1506 {
1507 struct glx_context *const gc = __glXGetCurrentContext();
1508 const GLuint cmdlen = 20;
1509 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1510 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
1511 (void) memcpy((void *) (gc->pc + 8), (void *) (&y1), 4);
1512 (void) memcpy((void *) (gc->pc + 12), (void *) (&x2), 4);
1513 (void) memcpy((void *) (gc->pc + 16), (void *) (&y2), 4);
1514 gc->pc += cmdlen;
1515 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1516 (void) __glXFlushRenderBuffer(gc, gc->pc);
1517 }
1518 }
1519
1520 #define X_GLrop_Rectiv 47
1521 void
1522 __indirect_glRectiv(const GLint * v1, const GLint * v2)
1523 {
1524 struct glx_context *const gc = __glXGetCurrentContext();
1525 const GLuint cmdlen = 20;
1526 emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
1527 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
1528 (void) memcpy((void *) (gc->pc + 12), (void *) (v2), 8);
1529 gc->pc += cmdlen;
1530 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1531 (void) __glXFlushRenderBuffer(gc, gc->pc);
1532 }
1533 }
1534
1535 #define X_GLrop_Rectsv 48
1536 void
1537 __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1538 {
1539 struct glx_context *const gc = __glXGetCurrentContext();
1540 const GLuint cmdlen = 12;
1541 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1542 (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 2);
1543 (void) memcpy((void *) (gc->pc + 6), (void *) (&y1), 2);
1544 (void) memcpy((void *) (gc->pc + 8), (void *) (&x2), 2);
1545 (void) memcpy((void *) (gc->pc + 10), (void *) (&y2), 2);
1546 gc->pc += cmdlen;
1547 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1548 (void) __glXFlushRenderBuffer(gc, gc->pc);
1549 }
1550 }
1551
1552 #define X_GLrop_Rectsv 48
1553 void
1554 __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
1555 {
1556 struct glx_context *const gc = __glXGetCurrentContext();
1557 const GLuint cmdlen = 12;
1558 emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
1559 (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 4);
1560 (void) memcpy((void *) (gc->pc + 8), (void *) (v2), 4);
1561 gc->pc += cmdlen;
1562 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1563 (void) __glXFlushRenderBuffer(gc, gc->pc);
1564 }
1565 }
1566
1567 #define X_GLrop_TexCoord1dv 49
1568 void
1569 __indirect_glTexCoord1d(GLdouble s)
1570 {
1571 struct glx_context *const gc = __glXGetCurrentContext();
1572 const GLuint cmdlen = 12;
1573 emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
1574 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1575 gc->pc += cmdlen;
1576 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1577 (void) __glXFlushRenderBuffer(gc, gc->pc);
1578 }
1579 }
1580
1581 #define X_GLrop_TexCoord1dv 49
1582 void
1583 __indirect_glTexCoord1dv(const GLdouble * v)
1584 {
1585 generic_8_byte(X_GLrop_TexCoord1dv, v);
1586 }
1587
1588 #define X_GLrop_TexCoord1fv 50
1589 void
1590 __indirect_glTexCoord1f(GLfloat s)
1591 {
1592 struct glx_context *const gc = __glXGetCurrentContext();
1593 const GLuint cmdlen = 8;
1594 emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
1595 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1596 gc->pc += cmdlen;
1597 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1598 (void) __glXFlushRenderBuffer(gc, gc->pc);
1599 }
1600 }
1601
1602 #define X_GLrop_TexCoord1fv 50
1603 void
1604 __indirect_glTexCoord1fv(const GLfloat * v)
1605 {
1606 generic_4_byte(X_GLrop_TexCoord1fv, v);
1607 }
1608
1609 #define X_GLrop_TexCoord1iv 51
1610 void
1611 __indirect_glTexCoord1i(GLint s)
1612 {
1613 struct glx_context *const gc = __glXGetCurrentContext();
1614 const GLuint cmdlen = 8;
1615 emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
1616 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1617 gc->pc += cmdlen;
1618 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1619 (void) __glXFlushRenderBuffer(gc, gc->pc);
1620 }
1621 }
1622
1623 #define X_GLrop_TexCoord1iv 51
1624 void
1625 __indirect_glTexCoord1iv(const GLint * v)
1626 {
1627 generic_4_byte(X_GLrop_TexCoord1iv, v);
1628 }
1629
1630 #define X_GLrop_TexCoord1sv 52
1631 void
1632 __indirect_glTexCoord1s(GLshort s)
1633 {
1634 struct glx_context *const gc = __glXGetCurrentContext();
1635 const GLuint cmdlen = 8;
1636 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1637 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1638 gc->pc += cmdlen;
1639 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1640 (void) __glXFlushRenderBuffer(gc, gc->pc);
1641 }
1642 }
1643
1644 #define X_GLrop_TexCoord1sv 52
1645 void
1646 __indirect_glTexCoord1sv(const GLshort * v)
1647 {
1648 struct glx_context *const gc = __glXGetCurrentContext();
1649 const GLuint cmdlen = 8;
1650 emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
1651 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 2);
1652 gc->pc += cmdlen;
1653 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1654 (void) __glXFlushRenderBuffer(gc, gc->pc);
1655 }
1656 }
1657
1658 #define X_GLrop_TexCoord2dv 53
1659 void
1660 __indirect_glTexCoord2d(GLdouble s, GLdouble t)
1661 {
1662 struct glx_context *const gc = __glXGetCurrentContext();
1663 const GLuint cmdlen = 20;
1664 emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
1665 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1666 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1667 gc->pc += cmdlen;
1668 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1669 (void) __glXFlushRenderBuffer(gc, gc->pc);
1670 }
1671 }
1672
1673 #define X_GLrop_TexCoord2dv 53
1674 void
1675 __indirect_glTexCoord2dv(const GLdouble * v)
1676 {
1677 generic_16_byte(X_GLrop_TexCoord2dv, v);
1678 }
1679
1680 #define X_GLrop_TexCoord2fv 54
1681 void
1682 __indirect_glTexCoord2f(GLfloat s, GLfloat t)
1683 {
1684 struct glx_context *const gc = __glXGetCurrentContext();
1685 const GLuint cmdlen = 12;
1686 emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
1687 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1688 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1689 gc->pc += cmdlen;
1690 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1691 (void) __glXFlushRenderBuffer(gc, gc->pc);
1692 }
1693 }
1694
1695 #define X_GLrop_TexCoord2fv 54
1696 void
1697 __indirect_glTexCoord2fv(const GLfloat * v)
1698 {
1699 generic_8_byte(X_GLrop_TexCoord2fv, v);
1700 }
1701
1702 #define X_GLrop_TexCoord2iv 55
1703 void
1704 __indirect_glTexCoord2i(GLint s, GLint t)
1705 {
1706 struct glx_context *const gc = __glXGetCurrentContext();
1707 const GLuint cmdlen = 12;
1708 emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
1709 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1710 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1711 gc->pc += cmdlen;
1712 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1713 (void) __glXFlushRenderBuffer(gc, gc->pc);
1714 }
1715 }
1716
1717 #define X_GLrop_TexCoord2iv 55
1718 void
1719 __indirect_glTexCoord2iv(const GLint * v)
1720 {
1721 generic_8_byte(X_GLrop_TexCoord2iv, v);
1722 }
1723
1724 #define X_GLrop_TexCoord2sv 56
1725 void
1726 __indirect_glTexCoord2s(GLshort s, GLshort t)
1727 {
1728 struct glx_context *const gc = __glXGetCurrentContext();
1729 const GLuint cmdlen = 8;
1730 emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
1731 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1732 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1733 gc->pc += cmdlen;
1734 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1735 (void) __glXFlushRenderBuffer(gc, gc->pc);
1736 }
1737 }
1738
1739 #define X_GLrop_TexCoord2sv 56
1740 void
1741 __indirect_glTexCoord2sv(const GLshort * v)
1742 {
1743 generic_4_byte(X_GLrop_TexCoord2sv, v);
1744 }
1745
1746 #define X_GLrop_TexCoord3dv 57
1747 void
1748 __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
1749 {
1750 struct glx_context *const gc = __glXGetCurrentContext();
1751 const GLuint cmdlen = 28;
1752 emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
1753 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1754 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1755 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1756 gc->pc += cmdlen;
1757 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1758 (void) __glXFlushRenderBuffer(gc, gc->pc);
1759 }
1760 }
1761
1762 #define X_GLrop_TexCoord3dv 57
1763 void
1764 __indirect_glTexCoord3dv(const GLdouble * v)
1765 {
1766 generic_24_byte(X_GLrop_TexCoord3dv, v);
1767 }
1768
1769 #define X_GLrop_TexCoord3fv 58
1770 void
1771 __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
1772 {
1773 struct glx_context *const gc = __glXGetCurrentContext();
1774 const GLuint cmdlen = 16;
1775 emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
1776 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1777 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1778 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1779 gc->pc += cmdlen;
1780 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1781 (void) __glXFlushRenderBuffer(gc, gc->pc);
1782 }
1783 }
1784
1785 #define X_GLrop_TexCoord3fv 58
1786 void
1787 __indirect_glTexCoord3fv(const GLfloat * v)
1788 {
1789 generic_12_byte(X_GLrop_TexCoord3fv, v);
1790 }
1791
1792 #define X_GLrop_TexCoord3iv 59
1793 void
1794 __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
1795 {
1796 struct glx_context *const gc = __glXGetCurrentContext();
1797 const GLuint cmdlen = 16;
1798 emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
1799 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1800 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1801 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1802 gc->pc += cmdlen;
1803 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1804 (void) __glXFlushRenderBuffer(gc, gc->pc);
1805 }
1806 }
1807
1808 #define X_GLrop_TexCoord3iv 59
1809 void
1810 __indirect_glTexCoord3iv(const GLint * v)
1811 {
1812 generic_12_byte(X_GLrop_TexCoord3iv, v);
1813 }
1814
1815 #define X_GLrop_TexCoord3sv 60
1816 void
1817 __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
1818 {
1819 struct glx_context *const gc = __glXGetCurrentContext();
1820 const GLuint cmdlen = 12;
1821 emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
1822 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1823 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1824 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1825 gc->pc += cmdlen;
1826 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1827 (void) __glXFlushRenderBuffer(gc, gc->pc);
1828 }
1829 }
1830
1831 #define X_GLrop_TexCoord3sv 60
1832 void
1833 __indirect_glTexCoord3sv(const GLshort * v)
1834 {
1835 generic_6_byte(X_GLrop_TexCoord3sv, v);
1836 }
1837
1838 #define X_GLrop_TexCoord4dv 61
1839 void
1840 __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1841 {
1842 struct glx_context *const gc = __glXGetCurrentContext();
1843 const GLuint cmdlen = 36;
1844 emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
1845 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
1846 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
1847 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
1848 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
1849 gc->pc += cmdlen;
1850 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1851 (void) __glXFlushRenderBuffer(gc, gc->pc);
1852 }
1853 }
1854
1855 #define X_GLrop_TexCoord4dv 61
1856 void
1857 __indirect_glTexCoord4dv(const GLdouble * v)
1858 {
1859 generic_32_byte(X_GLrop_TexCoord4dv, v);
1860 }
1861
1862 #define X_GLrop_TexCoord4fv 62
1863 void
1864 __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1865 {
1866 struct glx_context *const gc = __glXGetCurrentContext();
1867 const GLuint cmdlen = 20;
1868 emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
1869 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1870 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1871 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1872 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1873 gc->pc += cmdlen;
1874 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1875 (void) __glXFlushRenderBuffer(gc, gc->pc);
1876 }
1877 }
1878
1879 #define X_GLrop_TexCoord4fv 62
1880 void
1881 __indirect_glTexCoord4fv(const GLfloat * v)
1882 {
1883 generic_16_byte(X_GLrop_TexCoord4fv, v);
1884 }
1885
1886 #define X_GLrop_TexCoord4iv 63
1887 void
1888 __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
1889 {
1890 struct glx_context *const gc = __glXGetCurrentContext();
1891 const GLuint cmdlen = 20;
1892 emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
1893 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
1894 (void) memcpy((void *) (gc->pc + 8), (void *) (&t), 4);
1895 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 4);
1896 (void) memcpy((void *) (gc->pc + 16), (void *) (&q), 4);
1897 gc->pc += cmdlen;
1898 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1899 (void) __glXFlushRenderBuffer(gc, gc->pc);
1900 }
1901 }
1902
1903 #define X_GLrop_TexCoord4iv 63
1904 void
1905 __indirect_glTexCoord4iv(const GLint * v)
1906 {
1907 generic_16_byte(X_GLrop_TexCoord4iv, v);
1908 }
1909
1910 #define X_GLrop_TexCoord4sv 64
1911 void
1912 __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
1913 {
1914 struct glx_context *const gc = __glXGetCurrentContext();
1915 const GLuint cmdlen = 12;
1916 emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
1917 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
1918 (void) memcpy((void *) (gc->pc + 6), (void *) (&t), 2);
1919 (void) memcpy((void *) (gc->pc + 8), (void *) (&r), 2);
1920 (void) memcpy((void *) (gc->pc + 10), (void *) (&q), 2);
1921 gc->pc += cmdlen;
1922 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1923 (void) __glXFlushRenderBuffer(gc, gc->pc);
1924 }
1925 }
1926
1927 #define X_GLrop_TexCoord4sv 64
1928 void
1929 __indirect_glTexCoord4sv(const GLshort * v)
1930 {
1931 generic_8_byte(X_GLrop_TexCoord4sv, v);
1932 }
1933
1934 #define X_GLrop_Vertex2dv 65
1935 void
1936 __indirect_glVertex2d(GLdouble x, GLdouble y)
1937 {
1938 struct glx_context *const gc = __glXGetCurrentContext();
1939 const GLuint cmdlen = 20;
1940 emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
1941 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
1942 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
1943 gc->pc += cmdlen;
1944 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1945 (void) __glXFlushRenderBuffer(gc, gc->pc);
1946 }
1947 }
1948
1949 #define X_GLrop_Vertex2dv 65
1950 void
1951 __indirect_glVertex2dv(const GLdouble * v)
1952 {
1953 generic_16_byte(X_GLrop_Vertex2dv, v);
1954 }
1955
1956 #define X_GLrop_Vertex2fv 66
1957 void
1958 __indirect_glVertex2f(GLfloat x, GLfloat y)
1959 {
1960 struct glx_context *const gc = __glXGetCurrentContext();
1961 const GLuint cmdlen = 12;
1962 emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
1963 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1964 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1965 gc->pc += cmdlen;
1966 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1967 (void) __glXFlushRenderBuffer(gc, gc->pc);
1968 }
1969 }
1970
1971 #define X_GLrop_Vertex2fv 66
1972 void
1973 __indirect_glVertex2fv(const GLfloat * v)
1974 {
1975 generic_8_byte(X_GLrop_Vertex2fv, v);
1976 }
1977
1978 #define X_GLrop_Vertex2iv 67
1979 void
1980 __indirect_glVertex2i(GLint x, GLint y)
1981 {
1982 struct glx_context *const gc = __glXGetCurrentContext();
1983 const GLuint cmdlen = 12;
1984 emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
1985 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
1986 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
1987 gc->pc += cmdlen;
1988 if (__builtin_expect(gc->pc > gc->limit, 0)) {
1989 (void) __glXFlushRenderBuffer(gc, gc->pc);
1990 }
1991 }
1992
1993 #define X_GLrop_Vertex2iv 67
1994 void
1995 __indirect_glVertex2iv(const GLint * v)
1996 {
1997 generic_8_byte(X_GLrop_Vertex2iv, v);
1998 }
1999
2000 #define X_GLrop_Vertex2sv 68
2001 void
2002 __indirect_glVertex2s(GLshort x, GLshort y)
2003 {
2004 struct glx_context *const gc = __glXGetCurrentContext();
2005 const GLuint cmdlen = 8;
2006 emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
2007 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2008 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2009 gc->pc += cmdlen;
2010 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2011 (void) __glXFlushRenderBuffer(gc, gc->pc);
2012 }
2013 }
2014
2015 #define X_GLrop_Vertex2sv 68
2016 void
2017 __indirect_glVertex2sv(const GLshort * v)
2018 {
2019 generic_4_byte(X_GLrop_Vertex2sv, v);
2020 }
2021
2022 #define X_GLrop_Vertex3dv 69
2023 void
2024 __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
2025 {
2026 struct glx_context *const gc = __glXGetCurrentContext();
2027 const GLuint cmdlen = 28;
2028 emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
2029 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2030 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2031 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2032 gc->pc += cmdlen;
2033 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2034 (void) __glXFlushRenderBuffer(gc, gc->pc);
2035 }
2036 }
2037
2038 #define X_GLrop_Vertex3dv 69
2039 void
2040 __indirect_glVertex3dv(const GLdouble * v)
2041 {
2042 generic_24_byte(X_GLrop_Vertex3dv, v);
2043 }
2044
2045 #define X_GLrop_Vertex3fv 70
2046 void
2047 __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
2048 {
2049 struct glx_context *const gc = __glXGetCurrentContext();
2050 const GLuint cmdlen = 16;
2051 emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
2052 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2053 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2054 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2055 gc->pc += cmdlen;
2056 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2057 (void) __glXFlushRenderBuffer(gc, gc->pc);
2058 }
2059 }
2060
2061 #define X_GLrop_Vertex3fv 70
2062 void
2063 __indirect_glVertex3fv(const GLfloat * v)
2064 {
2065 generic_12_byte(X_GLrop_Vertex3fv, v);
2066 }
2067
2068 #define X_GLrop_Vertex3iv 71
2069 void
2070 __indirect_glVertex3i(GLint x, GLint y, GLint z)
2071 {
2072 struct glx_context *const gc = __glXGetCurrentContext();
2073 const GLuint cmdlen = 16;
2074 emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
2075 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2076 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2077 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2078 gc->pc += cmdlen;
2079 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2080 (void) __glXFlushRenderBuffer(gc, gc->pc);
2081 }
2082 }
2083
2084 #define X_GLrop_Vertex3iv 71
2085 void
2086 __indirect_glVertex3iv(const GLint * v)
2087 {
2088 generic_12_byte(X_GLrop_Vertex3iv, v);
2089 }
2090
2091 #define X_GLrop_Vertex3sv 72
2092 void
2093 __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
2094 {
2095 struct glx_context *const gc = __glXGetCurrentContext();
2096 const GLuint cmdlen = 12;
2097 emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
2098 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2099 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2100 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2101 gc->pc += cmdlen;
2102 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2103 (void) __glXFlushRenderBuffer(gc, gc->pc);
2104 }
2105 }
2106
2107 #define X_GLrop_Vertex3sv 72
2108 void
2109 __indirect_glVertex3sv(const GLshort * v)
2110 {
2111 generic_6_byte(X_GLrop_Vertex3sv, v);
2112 }
2113
2114 #define X_GLrop_Vertex4dv 73
2115 void
2116 __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
2117 {
2118 struct glx_context *const gc = __glXGetCurrentContext();
2119 const GLuint cmdlen = 36;
2120 emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
2121 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
2122 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
2123 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
2124 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
2125 gc->pc += cmdlen;
2126 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2127 (void) __glXFlushRenderBuffer(gc, gc->pc);
2128 }
2129 }
2130
2131 #define X_GLrop_Vertex4dv 73
2132 void
2133 __indirect_glVertex4dv(const GLdouble * v)
2134 {
2135 generic_32_byte(X_GLrop_Vertex4dv, v);
2136 }
2137
2138 #define X_GLrop_Vertex4fv 74
2139 void
2140 __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2141 {
2142 struct glx_context *const gc = __glXGetCurrentContext();
2143 const GLuint cmdlen = 20;
2144 emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
2145 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2146 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2147 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2148 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2149 gc->pc += cmdlen;
2150 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2151 (void) __glXFlushRenderBuffer(gc, gc->pc);
2152 }
2153 }
2154
2155 #define X_GLrop_Vertex4fv 74
2156 void
2157 __indirect_glVertex4fv(const GLfloat * v)
2158 {
2159 generic_16_byte(X_GLrop_Vertex4fv, v);
2160 }
2161
2162 #define X_GLrop_Vertex4iv 75
2163 void
2164 __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
2165 {
2166 struct glx_context *const gc = __glXGetCurrentContext();
2167 const GLuint cmdlen = 20;
2168 emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
2169 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2170 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2171 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
2172 (void) memcpy((void *) (gc->pc + 16), (void *) (&w), 4);
2173 gc->pc += cmdlen;
2174 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2175 (void) __glXFlushRenderBuffer(gc, gc->pc);
2176 }
2177 }
2178
2179 #define X_GLrop_Vertex4iv 75
2180 void
2181 __indirect_glVertex4iv(const GLint * v)
2182 {
2183 generic_16_byte(X_GLrop_Vertex4iv, v);
2184 }
2185
2186 #define X_GLrop_Vertex4sv 76
2187 void
2188 __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
2189 {
2190 struct glx_context *const gc = __glXGetCurrentContext();
2191 const GLuint cmdlen = 12;
2192 emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
2193 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
2194 (void) memcpy((void *) (gc->pc + 6), (void *) (&y), 2);
2195 (void) memcpy((void *) (gc->pc + 8), (void *) (&z), 2);
2196 (void) memcpy((void *) (gc->pc + 10), (void *) (&w), 2);
2197 gc->pc += cmdlen;
2198 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2199 (void) __glXFlushRenderBuffer(gc, gc->pc);
2200 }
2201 }
2202
2203 #define X_GLrop_Vertex4sv 76
2204 void
2205 __indirect_glVertex4sv(const GLshort * v)
2206 {
2207 generic_8_byte(X_GLrop_Vertex4sv, v);
2208 }
2209
2210 #define X_GLrop_ClipPlane 77
2211 void
2212 __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
2213 {
2214 struct glx_context *const gc = __glXGetCurrentContext();
2215 const GLuint cmdlen = 40;
2216 emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
2217 (void) memcpy((void *) (gc->pc + 4), (void *) (equation), 32);
2218 (void) memcpy((void *) (gc->pc + 36), (void *) (&plane), 4);
2219 gc->pc += cmdlen;
2220 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2221 (void) __glXFlushRenderBuffer(gc, gc->pc);
2222 }
2223 }
2224
2225 #define X_GLrop_ColorMaterial 78
2226 void
2227 __indirect_glColorMaterial(GLenum face, GLenum mode)
2228 {
2229 struct glx_context *const gc = __glXGetCurrentContext();
2230 const GLuint cmdlen = 12;
2231 emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
2232 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2233 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2234 gc->pc += cmdlen;
2235 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2236 (void) __glXFlushRenderBuffer(gc, gc->pc);
2237 }
2238 }
2239
2240 #define X_GLrop_CullFace 79
2241 void
2242 __indirect_glCullFace(GLenum mode)
2243 {
2244 struct glx_context *const gc = __glXGetCurrentContext();
2245 const GLuint cmdlen = 8;
2246 emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
2247 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2248 gc->pc += cmdlen;
2249 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2250 (void) __glXFlushRenderBuffer(gc, gc->pc);
2251 }
2252 }
2253
2254 #define X_GLrop_Fogf 80
2255 void
2256 __indirect_glFogf(GLenum pname, GLfloat param)
2257 {
2258 struct glx_context *const gc = __glXGetCurrentContext();
2259 const GLuint cmdlen = 12;
2260 emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
2261 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2262 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2263 gc->pc += cmdlen;
2264 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2265 (void) __glXFlushRenderBuffer(gc, gc->pc);
2266 }
2267 }
2268
2269 #define X_GLrop_Fogfv 81
2270 void
2271 __indirect_glFogfv(GLenum pname, const GLfloat * params)
2272 {
2273 struct glx_context *const gc = __glXGetCurrentContext();
2274 const GLuint compsize = __glFogfv_size(pname);
2275 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2276 emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
2277 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2278 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2279 gc->pc += cmdlen;
2280 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2281 (void) __glXFlushRenderBuffer(gc, gc->pc);
2282 }
2283 }
2284
2285 #define X_GLrop_Fogi 82
2286 void
2287 __indirect_glFogi(GLenum pname, GLint param)
2288 {
2289 struct glx_context *const gc = __glXGetCurrentContext();
2290 const GLuint cmdlen = 12;
2291 emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
2292 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2293 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2294 gc->pc += cmdlen;
2295 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2296 (void) __glXFlushRenderBuffer(gc, gc->pc);
2297 }
2298 }
2299
2300 #define X_GLrop_Fogiv 83
2301 void
2302 __indirect_glFogiv(GLenum pname, const GLint * params)
2303 {
2304 struct glx_context *const gc = __glXGetCurrentContext();
2305 const GLuint compsize = __glFogiv_size(pname);
2306 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2307 emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
2308 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2309 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2310 gc->pc += cmdlen;
2311 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2312 (void) __glXFlushRenderBuffer(gc, gc->pc);
2313 }
2314 }
2315
2316 #define X_GLrop_FrontFace 84
2317 void
2318 __indirect_glFrontFace(GLenum mode)
2319 {
2320 struct glx_context *const gc = __glXGetCurrentContext();
2321 const GLuint cmdlen = 8;
2322 emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
2323 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2324 gc->pc += cmdlen;
2325 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2326 (void) __glXFlushRenderBuffer(gc, gc->pc);
2327 }
2328 }
2329
2330 #define X_GLrop_Hint 85
2331 void
2332 __indirect_glHint(GLenum target, GLenum mode)
2333 {
2334 struct glx_context *const gc = __glXGetCurrentContext();
2335 const GLuint cmdlen = 12;
2336 emit_header(gc->pc, X_GLrop_Hint, cmdlen);
2337 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2338 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2339 gc->pc += cmdlen;
2340 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2341 (void) __glXFlushRenderBuffer(gc, gc->pc);
2342 }
2343 }
2344
2345 #define X_GLrop_Lightf 86
2346 void
2347 __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
2348 {
2349 struct glx_context *const gc = __glXGetCurrentContext();
2350 const GLuint cmdlen = 16;
2351 emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
2352 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2353 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2354 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2355 gc->pc += cmdlen;
2356 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2357 (void) __glXFlushRenderBuffer(gc, gc->pc);
2358 }
2359 }
2360
2361 #define X_GLrop_Lightfv 87
2362 void
2363 __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
2364 {
2365 struct glx_context *const gc = __glXGetCurrentContext();
2366 const GLuint compsize = __glLightfv_size(pname);
2367 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2368 emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
2369 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2370 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2371 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2372 gc->pc += cmdlen;
2373 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2374 (void) __glXFlushRenderBuffer(gc, gc->pc);
2375 }
2376 }
2377
2378 #define X_GLrop_Lighti 88
2379 void
2380 __indirect_glLighti(GLenum light, GLenum pname, GLint param)
2381 {
2382 struct glx_context *const gc = __glXGetCurrentContext();
2383 const GLuint cmdlen = 16;
2384 emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
2385 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2386 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2387 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2388 gc->pc += cmdlen;
2389 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2390 (void) __glXFlushRenderBuffer(gc, gc->pc);
2391 }
2392 }
2393
2394 #define X_GLrop_Lightiv 89
2395 void
2396 __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
2397 {
2398 struct glx_context *const gc = __glXGetCurrentContext();
2399 const GLuint compsize = __glLightiv_size(pname);
2400 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2401 emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
2402 (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
2403 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2404 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2405 gc->pc += cmdlen;
2406 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2407 (void) __glXFlushRenderBuffer(gc, gc->pc);
2408 }
2409 }
2410
2411 #define X_GLrop_LightModelf 90
2412 void
2413 __indirect_glLightModelf(GLenum pname, GLfloat param)
2414 {
2415 struct glx_context *const gc = __glXGetCurrentContext();
2416 const GLuint cmdlen = 12;
2417 emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
2418 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2419 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2420 gc->pc += cmdlen;
2421 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2422 (void) __glXFlushRenderBuffer(gc, gc->pc);
2423 }
2424 }
2425
2426 #define X_GLrop_LightModelfv 91
2427 void
2428 __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
2429 {
2430 struct glx_context *const gc = __glXGetCurrentContext();
2431 const GLuint compsize = __glLightModelfv_size(pname);
2432 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2433 emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
2434 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2435 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2436 gc->pc += cmdlen;
2437 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2438 (void) __glXFlushRenderBuffer(gc, gc->pc);
2439 }
2440 }
2441
2442 #define X_GLrop_LightModeli 92
2443 void
2444 __indirect_glLightModeli(GLenum pname, GLint param)
2445 {
2446 struct glx_context *const gc = __glXGetCurrentContext();
2447 const GLuint cmdlen = 12;
2448 emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
2449 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2450 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
2451 gc->pc += cmdlen;
2452 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2453 (void) __glXFlushRenderBuffer(gc, gc->pc);
2454 }
2455 }
2456
2457 #define X_GLrop_LightModeliv 93
2458 void
2459 __indirect_glLightModeliv(GLenum pname, const GLint * params)
2460 {
2461 struct glx_context *const gc = __glXGetCurrentContext();
2462 const GLuint compsize = __glLightModeliv_size(pname);
2463 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
2464 emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
2465 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
2466 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
2467 gc->pc += cmdlen;
2468 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2469 (void) __glXFlushRenderBuffer(gc, gc->pc);
2470 }
2471 }
2472
2473 #define X_GLrop_LineStipple 94
2474 void
2475 __indirect_glLineStipple(GLint factor, GLushort pattern)
2476 {
2477 struct glx_context *const gc = __glXGetCurrentContext();
2478 const GLuint cmdlen = 12;
2479 emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
2480 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
2481 (void) memcpy((void *) (gc->pc + 8), (void *) (&pattern), 2);
2482 gc->pc += cmdlen;
2483 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2484 (void) __glXFlushRenderBuffer(gc, gc->pc);
2485 }
2486 }
2487
2488 #define X_GLrop_LineWidth 95
2489 void
2490 __indirect_glLineWidth(GLfloat width)
2491 {
2492 struct glx_context *const gc = __glXGetCurrentContext();
2493 const GLuint cmdlen = 8;
2494 emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
2495 (void) memcpy((void *) (gc->pc + 4), (void *) (&width), 4);
2496 gc->pc += cmdlen;
2497 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2498 (void) __glXFlushRenderBuffer(gc, gc->pc);
2499 }
2500 }
2501
2502 #define X_GLrop_Materialf 96
2503 void
2504 __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
2505 {
2506 struct glx_context *const gc = __glXGetCurrentContext();
2507 const GLuint cmdlen = 16;
2508 emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
2509 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2510 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2511 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2512 gc->pc += cmdlen;
2513 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2514 (void) __glXFlushRenderBuffer(gc, gc->pc);
2515 }
2516 }
2517
2518 #define X_GLrop_Materialfv 97
2519 void
2520 __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
2521 {
2522 struct glx_context *const gc = __glXGetCurrentContext();
2523 const GLuint compsize = __glMaterialfv_size(pname);
2524 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2525 emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
2526 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2527 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2528 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2529 gc->pc += cmdlen;
2530 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2531 (void) __glXFlushRenderBuffer(gc, gc->pc);
2532 }
2533 }
2534
2535 #define X_GLrop_Materiali 98
2536 void
2537 __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
2538 {
2539 struct glx_context *const gc = __glXGetCurrentContext();
2540 const GLuint cmdlen = 16;
2541 emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
2542 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2543 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2544 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2545 gc->pc += cmdlen;
2546 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2547 (void) __glXFlushRenderBuffer(gc, gc->pc);
2548 }
2549 }
2550
2551 #define X_GLrop_Materialiv 99
2552 void
2553 __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
2554 {
2555 struct glx_context *const gc = __glXGetCurrentContext();
2556 const GLuint compsize = __glMaterialiv_size(pname);
2557 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2558 emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
2559 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2560 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2561 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2562 gc->pc += cmdlen;
2563 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2564 (void) __glXFlushRenderBuffer(gc, gc->pc);
2565 }
2566 }
2567
2568 #define X_GLrop_PointSize 100
2569 void
2570 __indirect_glPointSize(GLfloat size)
2571 {
2572 struct glx_context *const gc = __glXGetCurrentContext();
2573 const GLuint cmdlen = 8;
2574 emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
2575 (void) memcpy((void *) (gc->pc + 4), (void *) (&size), 4);
2576 gc->pc += cmdlen;
2577 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2578 (void) __glXFlushRenderBuffer(gc, gc->pc);
2579 }
2580 }
2581
2582 #define X_GLrop_PolygonMode 101
2583 void
2584 __indirect_glPolygonMode(GLenum face, GLenum mode)
2585 {
2586 struct glx_context *const gc = __glXGetCurrentContext();
2587 const GLuint cmdlen = 12;
2588 emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
2589 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
2590 (void) memcpy((void *) (gc->pc + 8), (void *) (&mode), 4);
2591 gc->pc += cmdlen;
2592 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2593 (void) __glXFlushRenderBuffer(gc, gc->pc);
2594 }
2595 }
2596
2597 #define X_GLrop_PolygonStipple 102
2598 void
2599 __indirect_glPolygonStipple(const GLubyte *mask)
2600 {
2601 struct glx_context *const gc = __glXGetCurrentContext();
2602 const GLuint compsize =
2603 (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
2604 0) : 0;
2605 const GLuint cmdlen = 24 + __GLX_PAD(compsize);
2606 emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen);
2607 if (compsize > 0) {
2608 (*gc->fillImage) (gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask,
2609 gc->pc + 24, gc->pc + 4);
2610 } else {
2611 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2612 default_pixel_store_2D_size);
2613 }
2614 gc->pc += cmdlen;
2615 if (gc->pc > gc->limit) {
2616 (void) __glXFlushRenderBuffer(gc, gc->pc);
2617 }
2618 }
2619
2620 #define X_GLrop_Scissor 103
2621 void
2622 __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
2623 {
2624 struct glx_context *const gc = __glXGetCurrentContext();
2625 const GLuint cmdlen = 20;
2626 emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
2627 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
2628 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
2629 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
2630 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
2631 gc->pc += cmdlen;
2632 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2633 (void) __glXFlushRenderBuffer(gc, gc->pc);
2634 }
2635 }
2636
2637 #define X_GLrop_ShadeModel 104
2638 void
2639 __indirect_glShadeModel(GLenum mode)
2640 {
2641 struct glx_context *const gc = __glXGetCurrentContext();
2642 const GLuint cmdlen = 8;
2643 emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
2644 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
2645 gc->pc += cmdlen;
2646 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2647 (void) __glXFlushRenderBuffer(gc, gc->pc);
2648 }
2649 }
2650
2651 #define X_GLrop_TexParameterf 105
2652 void
2653 __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
2654 {
2655 struct glx_context *const gc = __glXGetCurrentContext();
2656 const GLuint cmdlen = 16;
2657 emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
2658 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2659 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2660 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2661 gc->pc += cmdlen;
2662 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2663 (void) __glXFlushRenderBuffer(gc, gc->pc);
2664 }
2665 }
2666
2667 #define X_GLrop_TexParameterfv 106
2668 void
2669 __indirect_glTexParameterfv(GLenum target, GLenum pname,
2670 const GLfloat * params)
2671 {
2672 struct glx_context *const gc = __glXGetCurrentContext();
2673 const GLuint compsize = __glTexParameterfv_size(pname);
2674 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2675 emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
2676 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2677 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2678 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2679 gc->pc += cmdlen;
2680 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2681 (void) __glXFlushRenderBuffer(gc, gc->pc);
2682 }
2683 }
2684
2685 #define X_GLrop_TexParameteri 107
2686 void
2687 __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
2688 {
2689 struct glx_context *const gc = __glXGetCurrentContext();
2690 const GLuint cmdlen = 16;
2691 emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
2692 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2693 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2694 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2695 gc->pc += cmdlen;
2696 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2697 (void) __glXFlushRenderBuffer(gc, gc->pc);
2698 }
2699 }
2700
2701 #define X_GLrop_TexParameteriv 108
2702 void
2703 __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
2704 {
2705 struct glx_context *const gc = __glXGetCurrentContext();
2706 const GLuint compsize = __glTexParameteriv_size(pname);
2707 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2708 emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
2709 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2710 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2711 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2712 gc->pc += cmdlen;
2713 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2714 (void) __glXFlushRenderBuffer(gc, gc->pc);
2715 }
2716 }
2717
2718 static void
2719 __glx_TexImage_1D2D(unsigned opcode, unsigned dim, GLenum target, GLint level,
2720 GLint internalformat, GLsizei width, GLsizei height,
2721 GLint border, GLenum format, GLenum type,
2722 const GLvoid * pixels)
2723 {
2724 struct glx_context *const gc = __glXGetCurrentContext();
2725 const GLuint compsize =
2726 __glImageSize(width, height, 1, format, type, target);
2727 const GLuint cmdlen = 56 + __GLX_PAD(compsize);
2728 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
2729 if (cmdlen <= gc->maxSmallRenderCommandSize) {
2730 if ((gc->pc + cmdlen) > gc->bufEnd) {
2731 (void) __glXFlushRenderBuffer(gc, gc->pc);
2732 }
2733 emit_header(gc->pc, opcode, cmdlen);
2734 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
2735 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
2736 (void) memcpy((void *) (gc->pc + 32), (void *) (&internalformat),
2737 4);
2738 (void) memcpy((void *) (gc->pc + 36), (void *) (&width), 4);
2739 (void) memcpy((void *) (gc->pc + 40), (void *) (&height), 4);
2740 (void) memcpy((void *) (gc->pc + 44), (void *) (&border), 4);
2741 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
2742 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
2743 if ((compsize > 0) && (pixels != NULL)) {
2744 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
2745 pixels, gc->pc + 56, gc->pc + 4);
2746 } else {
2747 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
2748 default_pixel_store_2D_size);
2749 }
2750 gc->pc += cmdlen;
2751 if (gc->pc > gc->limit) {
2752 (void) __glXFlushRenderBuffer(gc, gc->pc);
2753 }
2754 } else {
2755 const GLint op = opcode;
2756 const GLuint cmdlenLarge = cmdlen + 4;
2757 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
2758 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
2759 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
2760 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
2761 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
2762 (void) memcpy((void *) (pc + 36), (void *) (&internalformat), 4);
2763 (void) memcpy((void *) (pc + 40), (void *) (&width), 4);
2764 (void) memcpy((void *) (pc + 44), (void *) (&height), 4);
2765 (void) memcpy((void *) (pc + 48), (void *) (&border), 4);
2766 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
2767 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
2768 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
2769 type, pixels, pc + 60, pc + 8);
2770 }
2771 }
2772 }
2773
2774 #define X_GLrop_TexImage1D 109
2775 void
2776 __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat,
2777 GLsizei width, GLint border, GLenum format,
2778 GLenum type, const GLvoid * pixels)
2779 {
2780 __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat,
2781 width, 1, border, format, type, pixels);
2782 }
2783
2784 #define X_GLrop_TexImage2D 110
2785 void
2786 __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat,
2787 GLsizei width, GLsizei height, GLint border,
2788 GLenum format, GLenum type, const GLvoid * pixels)
2789 {
2790 __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat,
2791 width, height, border, format, type, pixels);
2792 }
2793
2794 #define X_GLrop_TexEnvf 111
2795 void
2796 __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
2797 {
2798 struct glx_context *const gc = __glXGetCurrentContext();
2799 const GLuint cmdlen = 16;
2800 emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
2801 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2802 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2803 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2804 gc->pc += cmdlen;
2805 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2806 (void) __glXFlushRenderBuffer(gc, gc->pc);
2807 }
2808 }
2809
2810 #define X_GLrop_TexEnvfv 112
2811 void
2812 __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
2813 {
2814 struct glx_context *const gc = __glXGetCurrentContext();
2815 const GLuint compsize = __glTexEnvfv_size(pname);
2816 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2817 emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
2818 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2819 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2820 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2821 gc->pc += cmdlen;
2822 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2823 (void) __glXFlushRenderBuffer(gc, gc->pc);
2824 }
2825 }
2826
2827 #define X_GLrop_TexEnvi 113
2828 void
2829 __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
2830 {
2831 struct glx_context *const gc = __glXGetCurrentContext();
2832 const GLuint cmdlen = 16;
2833 emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
2834 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2835 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2836 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2837 gc->pc += cmdlen;
2838 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2839 (void) __glXFlushRenderBuffer(gc, gc->pc);
2840 }
2841 }
2842
2843 #define X_GLrop_TexEnviv 114
2844 void
2845 __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
2846 {
2847 struct glx_context *const gc = __glXGetCurrentContext();
2848 const GLuint compsize = __glTexEnviv_size(pname);
2849 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2850 emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
2851 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
2852 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2853 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2854 gc->pc += cmdlen;
2855 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2856 (void) __glXFlushRenderBuffer(gc, gc->pc);
2857 }
2858 }
2859
2860 #define X_GLrop_TexGend 115
2861 void
2862 __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
2863 {
2864 struct glx_context *const gc = __glXGetCurrentContext();
2865 const GLuint cmdlen = 20;
2866 emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
2867 (void) memcpy((void *) (gc->pc + 4), (void *) (&param), 8);
2868 (void) memcpy((void *) (gc->pc + 12), (void *) (&coord), 4);
2869 (void) memcpy((void *) (gc->pc + 16), (void *) (&pname), 4);
2870 gc->pc += cmdlen;
2871 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2872 (void) __glXFlushRenderBuffer(gc, gc->pc);
2873 }
2874 }
2875
2876 #define X_GLrop_TexGendv 116
2877 void
2878 __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
2879 {
2880 struct glx_context *const gc = __glXGetCurrentContext();
2881 const GLuint compsize = __glTexGendv_size(pname);
2882 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
2883 emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
2884 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2885 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2886 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 8));
2887 gc->pc += cmdlen;
2888 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2889 (void) __glXFlushRenderBuffer(gc, gc->pc);
2890 }
2891 }
2892
2893 #define X_GLrop_TexGenf 117
2894 void
2895 __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
2896 {
2897 struct glx_context *const gc = __glXGetCurrentContext();
2898 const GLuint cmdlen = 16;
2899 emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
2900 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2901 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2902 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2903 gc->pc += cmdlen;
2904 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2905 (void) __glXFlushRenderBuffer(gc, gc->pc);
2906 }
2907 }
2908
2909 #define X_GLrop_TexGenfv 118
2910 void
2911 __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
2912 {
2913 struct glx_context *const gc = __glXGetCurrentContext();
2914 const GLuint compsize = __glTexGenfv_size(pname);
2915 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2916 emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
2917 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2918 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2919 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2920 gc->pc += cmdlen;
2921 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2922 (void) __glXFlushRenderBuffer(gc, gc->pc);
2923 }
2924 }
2925
2926 #define X_GLrop_TexGeni 119
2927 void
2928 __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
2929 {
2930 struct glx_context *const gc = __glXGetCurrentContext();
2931 const GLuint cmdlen = 16;
2932 emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
2933 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2934 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2935 (void) memcpy((void *) (gc->pc + 12), (void *) (&param), 4);
2936 gc->pc += cmdlen;
2937 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2938 (void) __glXFlushRenderBuffer(gc, gc->pc);
2939 }
2940 }
2941
2942 #define X_GLrop_TexGeniv 120
2943 void
2944 __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
2945 {
2946 struct glx_context *const gc = __glXGetCurrentContext();
2947 const GLuint compsize = __glTexGeniv_size(pname);
2948 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
2949 emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
2950 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
2951 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
2952 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
2953 gc->pc += cmdlen;
2954 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2955 (void) __glXFlushRenderBuffer(gc, gc->pc);
2956 }
2957 }
2958
2959 #define X_GLrop_InitNames 121
2960 void
2961 __indirect_glInitNames(void)
2962 {
2963 struct glx_context *const gc = __glXGetCurrentContext();
2964 const GLuint cmdlen = 4;
2965 emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
2966 gc->pc += cmdlen;
2967 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2968 (void) __glXFlushRenderBuffer(gc, gc->pc);
2969 }
2970 }
2971
2972 #define X_GLrop_LoadName 122
2973 void
2974 __indirect_glLoadName(GLuint name)
2975 {
2976 struct glx_context *const gc = __glXGetCurrentContext();
2977 const GLuint cmdlen = 8;
2978 emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
2979 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
2980 gc->pc += cmdlen;
2981 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2982 (void) __glXFlushRenderBuffer(gc, gc->pc);
2983 }
2984 }
2985
2986 #define X_GLrop_PassThrough 123
2987 void
2988 __indirect_glPassThrough(GLfloat token)
2989 {
2990 struct glx_context *const gc = __glXGetCurrentContext();
2991 const GLuint cmdlen = 8;
2992 emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
2993 (void) memcpy((void *) (gc->pc + 4), (void *) (&token), 4);
2994 gc->pc += cmdlen;
2995 if (__builtin_expect(gc->pc > gc->limit, 0)) {
2996 (void) __glXFlushRenderBuffer(gc, gc->pc);
2997 }
2998 }
2999
3000 #define X_GLrop_PopName 124
3001 void
3002 __indirect_glPopName(void)
3003 {
3004 struct glx_context *const gc = __glXGetCurrentContext();
3005 const GLuint cmdlen = 4;
3006 emit_header(gc->pc, X_GLrop_PopName, cmdlen);
3007 gc->pc += cmdlen;
3008 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3009 (void) __glXFlushRenderBuffer(gc, gc->pc);
3010 }
3011 }
3012
3013 #define X_GLrop_PushName 125
3014 void
3015 __indirect_glPushName(GLuint name)
3016 {
3017 struct glx_context *const gc = __glXGetCurrentContext();
3018 const GLuint cmdlen = 8;
3019 emit_header(gc->pc, X_GLrop_PushName, cmdlen);
3020 (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
3021 gc->pc += cmdlen;
3022 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3023 (void) __glXFlushRenderBuffer(gc, gc->pc);
3024 }
3025 }
3026
3027 #define X_GLrop_DrawBuffer 126
3028 void
3029 __indirect_glDrawBuffer(GLenum mode)
3030 {
3031 struct glx_context *const gc = __glXGetCurrentContext();
3032 const GLuint cmdlen = 8;
3033 emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
3034 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3035 gc->pc += cmdlen;
3036 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3037 (void) __glXFlushRenderBuffer(gc, gc->pc);
3038 }
3039 }
3040
3041 #define X_GLrop_Clear 127
3042 void
3043 __indirect_glClear(GLbitfield mask)
3044 {
3045 struct glx_context *const gc = __glXGetCurrentContext();
3046 const GLuint cmdlen = 8;
3047 emit_header(gc->pc, X_GLrop_Clear, cmdlen);
3048 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3049 gc->pc += cmdlen;
3050 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3051 (void) __glXFlushRenderBuffer(gc, gc->pc);
3052 }
3053 }
3054
3055 #define X_GLrop_ClearAccum 128
3056 void
3057 __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue,
3058 GLfloat alpha)
3059 {
3060 struct glx_context *const gc = __glXGetCurrentContext();
3061 const GLuint cmdlen = 20;
3062 emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
3063 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3064 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3065 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3066 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3067 gc->pc += cmdlen;
3068 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3069 (void) __glXFlushRenderBuffer(gc, gc->pc);
3070 }
3071 }
3072
3073 #define X_GLrop_ClearIndex 129
3074 void
3075 __indirect_glClearIndex(GLfloat c)
3076 {
3077 struct glx_context *const gc = __glXGetCurrentContext();
3078 const GLuint cmdlen = 8;
3079 emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
3080 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
3081 gc->pc += cmdlen;
3082 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3083 (void) __glXFlushRenderBuffer(gc, gc->pc);
3084 }
3085 }
3086
3087 #define X_GLrop_ClearColor 130
3088 void
3089 __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue,
3090 GLclampf alpha)
3091 {
3092 struct glx_context *const gc = __glXGetCurrentContext();
3093 const GLuint cmdlen = 20;
3094 emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
3095 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
3096 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
3097 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
3098 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
3099 gc->pc += cmdlen;
3100 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3101 (void) __glXFlushRenderBuffer(gc, gc->pc);
3102 }
3103 }
3104
3105 #define X_GLrop_ClearStencil 131
3106 void
3107 __indirect_glClearStencil(GLint s)
3108 {
3109 struct glx_context *const gc = __glXGetCurrentContext();
3110 const GLuint cmdlen = 8;
3111 emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
3112 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
3113 gc->pc += cmdlen;
3114 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3115 (void) __glXFlushRenderBuffer(gc, gc->pc);
3116 }
3117 }
3118
3119 #define X_GLrop_ClearDepth 132
3120 void
3121 __indirect_glClearDepth(GLclampd depth)
3122 {
3123 struct glx_context *const gc = __glXGetCurrentContext();
3124 const GLuint cmdlen = 12;
3125 emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
3126 (void) memcpy((void *) (gc->pc + 4), (void *) (&depth), 8);
3127 gc->pc += cmdlen;
3128 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3129 (void) __glXFlushRenderBuffer(gc, gc->pc);
3130 }
3131 }
3132
3133 #define X_GLrop_StencilMask 133
3134 void
3135 __indirect_glStencilMask(GLuint mask)
3136 {
3137 struct glx_context *const gc = __glXGetCurrentContext();
3138 const GLuint cmdlen = 8;
3139 emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
3140 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3141 gc->pc += cmdlen;
3142 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3143 (void) __glXFlushRenderBuffer(gc, gc->pc);
3144 }
3145 }
3146
3147 #define X_GLrop_ColorMask 134
3148 void
3149 __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue,
3150 GLboolean alpha)
3151 {
3152 struct glx_context *const gc = __glXGetCurrentContext();
3153 const GLuint cmdlen = 8;
3154 emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
3155 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
3156 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
3157 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
3158 (void) memcpy((void *) (gc->pc + 7), (void *) (&alpha), 1);
3159 gc->pc += cmdlen;
3160 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3161 (void) __glXFlushRenderBuffer(gc, gc->pc);
3162 }
3163 }
3164
3165 #define X_GLrop_DepthMask 135
3166 void
3167 __indirect_glDepthMask(GLboolean flag)
3168 {
3169 struct glx_context *const gc = __glXGetCurrentContext();
3170 const GLuint cmdlen = 8;
3171 emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
3172 (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
3173 gc->pc += cmdlen;
3174 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3175 (void) __glXFlushRenderBuffer(gc, gc->pc);
3176 }
3177 }
3178
3179 #define X_GLrop_IndexMask 136
3180 void
3181 __indirect_glIndexMask(GLuint mask)
3182 {
3183 struct glx_context *const gc = __glXGetCurrentContext();
3184 const GLuint cmdlen = 8;
3185 emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
3186 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3187 gc->pc += cmdlen;
3188 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3189 (void) __glXFlushRenderBuffer(gc, gc->pc);
3190 }
3191 }
3192
3193 #define X_GLrop_Accum 137
3194 void
3195 __indirect_glAccum(GLenum op, GLfloat value)
3196 {
3197 struct glx_context *const gc = __glXGetCurrentContext();
3198 const GLuint cmdlen = 12;
3199 emit_header(gc->pc, X_GLrop_Accum, cmdlen);
3200 (void) memcpy((void *) (gc->pc + 4), (void *) (&op), 4);
3201 (void) memcpy((void *) (gc->pc + 8), (void *) (&value), 4);
3202 gc->pc += cmdlen;
3203 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3204 (void) __glXFlushRenderBuffer(gc, gc->pc);
3205 }
3206 }
3207
3208 #define X_GLrop_PopAttrib 141
3209 void
3210 __indirect_glPopAttrib(void)
3211 {
3212 struct glx_context *const gc = __glXGetCurrentContext();
3213 const GLuint cmdlen = 4;
3214 emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
3215 gc->pc += cmdlen;
3216 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3217 (void) __glXFlushRenderBuffer(gc, gc->pc);
3218 }
3219 }
3220
3221 #define X_GLrop_PushAttrib 142
3222 void
3223 __indirect_glPushAttrib(GLbitfield mask)
3224 {
3225 struct glx_context *const gc = __glXGetCurrentContext();
3226 const GLuint cmdlen = 8;
3227 emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
3228 (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
3229 gc->pc += cmdlen;
3230 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3231 (void) __glXFlushRenderBuffer(gc, gc->pc);
3232 }
3233 }
3234
3235 #define X_GLrop_MapGrid1d 147
3236 void
3237 __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
3238 {
3239 struct glx_context *const gc = __glXGetCurrentContext();
3240 const GLuint cmdlen = 24;
3241 emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
3242 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3243 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3244 (void) memcpy((void *) (gc->pc + 20), (void *) (&un), 4);
3245 gc->pc += cmdlen;
3246 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3247 (void) __glXFlushRenderBuffer(gc, gc->pc);
3248 }
3249 }
3250
3251 #define X_GLrop_MapGrid1f 148
3252 void
3253 __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
3254 {
3255 struct glx_context *const gc = __glXGetCurrentContext();
3256 const GLuint cmdlen = 16;
3257 emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
3258 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3259 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3260 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3261 gc->pc += cmdlen;
3262 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3263 (void) __glXFlushRenderBuffer(gc, gc->pc);
3264 }
3265 }
3266
3267 #define X_GLrop_MapGrid2d 149
3268 void
3269 __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn,
3270 GLdouble v1, GLdouble v2)
3271 {
3272 struct glx_context *const gc = __glXGetCurrentContext();
3273 const GLuint cmdlen = 44;
3274 emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
3275 (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
3276 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 8);
3277 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 8);
3278 (void) memcpy((void *) (gc->pc + 28), (void *) (&v2), 8);
3279 (void) memcpy((void *) (gc->pc + 36), (void *) (&un), 4);
3280 (void) memcpy((void *) (gc->pc + 40), (void *) (&vn), 4);
3281 gc->pc += cmdlen;
3282 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3283 (void) __glXFlushRenderBuffer(gc, gc->pc);
3284 }
3285 }
3286
3287 #define X_GLrop_MapGrid2f 150
3288 void
3289 __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
3290 GLfloat v2)
3291 {
3292 struct glx_context *const gc = __glXGetCurrentContext();
3293 const GLuint cmdlen = 28;
3294 emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
3295 (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
3296 (void) memcpy((void *) (gc->pc + 8), (void *) (&u1), 4);
3297 (void) memcpy((void *) (gc->pc + 12), (void *) (&u2), 4);
3298 (void) memcpy((void *) (gc->pc + 16), (void *) (&vn), 4);
3299 (void) memcpy((void *) (gc->pc + 20), (void *) (&v1), 4);
3300 (void) memcpy((void *) (gc->pc + 24), (void *) (&v2), 4);
3301 gc->pc += cmdlen;
3302 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3303 (void) __glXFlushRenderBuffer(gc, gc->pc);
3304 }
3305 }
3306
3307 #define X_GLrop_EvalCoord1dv 151
3308 void
3309 __indirect_glEvalCoord1d(GLdouble u)
3310 {
3311 struct glx_context *const gc = __glXGetCurrentContext();
3312 const GLuint cmdlen = 12;
3313 emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
3314 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3315 gc->pc += cmdlen;
3316 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3317 (void) __glXFlushRenderBuffer(gc, gc->pc);
3318 }
3319 }
3320
3321 #define X_GLrop_EvalCoord1dv 151
3322 void
3323 __indirect_glEvalCoord1dv(const GLdouble * u)
3324 {
3325 generic_8_byte(X_GLrop_EvalCoord1dv, u);
3326 }
3327
3328 #define X_GLrop_EvalCoord1fv 152
3329 void
3330 __indirect_glEvalCoord1f(GLfloat u)
3331 {
3332 struct glx_context *const gc = __glXGetCurrentContext();
3333 const GLuint cmdlen = 8;
3334 emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
3335 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3336 gc->pc += cmdlen;
3337 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3338 (void) __glXFlushRenderBuffer(gc, gc->pc);
3339 }
3340 }
3341
3342 #define X_GLrop_EvalCoord1fv 152
3343 void
3344 __indirect_glEvalCoord1fv(const GLfloat * u)
3345 {
3346 generic_4_byte(X_GLrop_EvalCoord1fv, u);
3347 }
3348
3349 #define X_GLrop_EvalCoord2dv 153
3350 void
3351 __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
3352 {
3353 struct glx_context *const gc = __glXGetCurrentContext();
3354 const GLuint cmdlen = 20;
3355 emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
3356 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
3357 (void) memcpy((void *) (gc->pc + 12), (void *) (&v), 8);
3358 gc->pc += cmdlen;
3359 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3360 (void) __glXFlushRenderBuffer(gc, gc->pc);
3361 }
3362 }
3363
3364 #define X_GLrop_EvalCoord2dv 153
3365 void
3366 __indirect_glEvalCoord2dv(const GLdouble * u)
3367 {
3368 generic_16_byte(X_GLrop_EvalCoord2dv, u);
3369 }
3370
3371 #define X_GLrop_EvalCoord2fv 154
3372 void
3373 __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
3374 {
3375 struct glx_context *const gc = __glXGetCurrentContext();
3376 const GLuint cmdlen = 12;
3377 emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
3378 (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
3379 (void) memcpy((void *) (gc->pc + 8), (void *) (&v), 4);
3380 gc->pc += cmdlen;
3381 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3382 (void) __glXFlushRenderBuffer(gc, gc->pc);
3383 }
3384 }
3385
3386 #define X_GLrop_EvalCoord2fv 154
3387 void
3388 __indirect_glEvalCoord2fv(const GLfloat * u)
3389 {
3390 generic_8_byte(X_GLrop_EvalCoord2fv, u);
3391 }
3392
3393 #define X_GLrop_EvalMesh1 155
3394 void
3395 __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
3396 {
3397 struct glx_context *const gc = __glXGetCurrentContext();
3398 const GLuint cmdlen = 16;
3399 emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
3400 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3401 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3402 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3403 gc->pc += cmdlen;
3404 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3405 (void) __glXFlushRenderBuffer(gc, gc->pc);
3406 }
3407 }
3408
3409 #define X_GLrop_EvalPoint1 156
3410 void
3411 __indirect_glEvalPoint1(GLint i)
3412 {
3413 struct glx_context *const gc = __glXGetCurrentContext();
3414 const GLuint cmdlen = 8;
3415 emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
3416 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3417 gc->pc += cmdlen;
3418 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3419 (void) __glXFlushRenderBuffer(gc, gc->pc);
3420 }
3421 }
3422
3423 #define X_GLrop_EvalMesh2 157
3424 void
3425 __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
3426 {
3427 struct glx_context *const gc = __glXGetCurrentContext();
3428 const GLuint cmdlen = 24;
3429 emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
3430 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3431 (void) memcpy((void *) (gc->pc + 8), (void *) (&i1), 4);
3432 (void) memcpy((void *) (gc->pc + 12), (void *) (&i2), 4);
3433 (void) memcpy((void *) (gc->pc + 16), (void *) (&j1), 4);
3434 (void) memcpy((void *) (gc->pc + 20), (void *) (&j2), 4);
3435 gc->pc += cmdlen;
3436 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3437 (void) __glXFlushRenderBuffer(gc, gc->pc);
3438 }
3439 }
3440
3441 #define X_GLrop_EvalPoint2 158
3442 void
3443 __indirect_glEvalPoint2(GLint i, GLint j)
3444 {
3445 struct glx_context *const gc = __glXGetCurrentContext();
3446 const GLuint cmdlen = 12;
3447 emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
3448 (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
3449 (void) memcpy((void *) (gc->pc + 8), (void *) (&j), 4);
3450 gc->pc += cmdlen;
3451 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3452 (void) __glXFlushRenderBuffer(gc, gc->pc);
3453 }
3454 }
3455
3456 #define X_GLrop_AlphaFunc 159
3457 void
3458 __indirect_glAlphaFunc(GLenum func, GLclampf ref)
3459 {
3460 struct glx_context *const gc = __glXGetCurrentContext();
3461 const GLuint cmdlen = 12;
3462 emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
3463 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3464 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3465 gc->pc += cmdlen;
3466 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3467 (void) __glXFlushRenderBuffer(gc, gc->pc);
3468 }
3469 }
3470
3471 #define X_GLrop_BlendFunc 160
3472 void
3473 __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
3474 {
3475 struct glx_context *const gc = __glXGetCurrentContext();
3476 const GLuint cmdlen = 12;
3477 emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
3478 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactor), 4);
3479 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactor), 4);
3480 gc->pc += cmdlen;
3481 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3482 (void) __glXFlushRenderBuffer(gc, gc->pc);
3483 }
3484 }
3485
3486 #define X_GLrop_LogicOp 161
3487 void
3488 __indirect_glLogicOp(GLenum opcode)
3489 {
3490 struct glx_context *const gc = __glXGetCurrentContext();
3491 const GLuint cmdlen = 8;
3492 emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
3493 (void) memcpy((void *) (gc->pc + 4), (void *) (&opcode), 4);
3494 gc->pc += cmdlen;
3495 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3496 (void) __glXFlushRenderBuffer(gc, gc->pc);
3497 }
3498 }
3499
3500 #define X_GLrop_StencilFunc 162
3501 void
3502 __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
3503 {
3504 struct glx_context *const gc = __glXGetCurrentContext();
3505 const GLuint cmdlen = 16;
3506 emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
3507 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3508 (void) memcpy((void *) (gc->pc + 8), (void *) (&ref), 4);
3509 (void) memcpy((void *) (gc->pc + 12), (void *) (&mask), 4);
3510 gc->pc += cmdlen;
3511 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3512 (void) __glXFlushRenderBuffer(gc, gc->pc);
3513 }
3514 }
3515
3516 #define X_GLrop_StencilOp 163
3517 void
3518 __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
3519 {
3520 struct glx_context *const gc = __glXGetCurrentContext();
3521 const GLuint cmdlen = 16;
3522 emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
3523 (void) memcpy((void *) (gc->pc + 4), (void *) (&fail), 4);
3524 (void) memcpy((void *) (gc->pc + 8), (void *) (&zfail), 4);
3525 (void) memcpy((void *) (gc->pc + 12), (void *) (&zpass), 4);
3526 gc->pc += cmdlen;
3527 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3528 (void) __glXFlushRenderBuffer(gc, gc->pc);
3529 }
3530 }
3531
3532 #define X_GLrop_DepthFunc 164
3533 void
3534 __indirect_glDepthFunc(GLenum func)
3535 {
3536 struct glx_context *const gc = __glXGetCurrentContext();
3537 const GLuint cmdlen = 8;
3538 emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
3539 (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
3540 gc->pc += cmdlen;
3541 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3542 (void) __glXFlushRenderBuffer(gc, gc->pc);
3543 }
3544 }
3545
3546 #define X_GLrop_PixelZoom 165
3547 void
3548 __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
3549 {
3550 struct glx_context *const gc = __glXGetCurrentContext();
3551 const GLuint cmdlen = 12;
3552 emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
3553 (void) memcpy((void *) (gc->pc + 4), (void *) (&xfactor), 4);
3554 (void) memcpy((void *) (gc->pc + 8), (void *) (&yfactor), 4);
3555 gc->pc += cmdlen;
3556 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3557 (void) __glXFlushRenderBuffer(gc, gc->pc);
3558 }
3559 }
3560
3561 #define X_GLrop_PixelTransferf 166
3562 void
3563 __indirect_glPixelTransferf(GLenum pname, GLfloat param)
3564 {
3565 struct glx_context *const gc = __glXGetCurrentContext();
3566 const GLuint cmdlen = 12;
3567 emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
3568 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3569 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3570 gc->pc += cmdlen;
3571 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3572 (void) __glXFlushRenderBuffer(gc, gc->pc);
3573 }
3574 }
3575
3576 #define X_GLrop_PixelTransferi 167
3577 void
3578 __indirect_glPixelTransferi(GLenum pname, GLint param)
3579 {
3580 struct glx_context *const gc = __glXGetCurrentContext();
3581 const GLuint cmdlen = 12;
3582 emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
3583 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
3584 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
3585 gc->pc += cmdlen;
3586 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3587 (void) __glXFlushRenderBuffer(gc, gc->pc);
3588 }
3589 }
3590
3591 #define X_GLrop_PixelMapfv 168
3592 void
3593 __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
3594 {
3595 struct glx_context *const gc = __glXGetCurrentContext();
3596 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3597 if (mapsize < 0) {
3598 __glXSetError(gc, GL_INVALID_VALUE);
3599 return;
3600 }
3601 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3602 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3603 if ((gc->pc + cmdlen) > gc->bufEnd) {
3604 (void) __glXFlushRenderBuffer(gc, gc->pc);
3605 }
3606 emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen);
3607 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3608 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3609 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3610 (mapsize * 4));
3611 gc->pc += cmdlen;
3612 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3613 (void) __glXFlushRenderBuffer(gc, gc->pc);
3614 }
3615 } else {
3616 const GLint op = X_GLrop_PixelMapfv;
3617 const GLuint cmdlenLarge = cmdlen + 4;
3618 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3619 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3620 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3621 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3622 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3623 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3624 }
3625 }
3626 }
3627
3628 #define X_GLrop_PixelMapuiv 169
3629 void
3630 __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
3631 {
3632 struct glx_context *const gc = __glXGetCurrentContext();
3633 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
3634 if (mapsize < 0) {
3635 __glXSetError(gc, GL_INVALID_VALUE);
3636 return;
3637 }
3638 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3639 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3640 if ((gc->pc + cmdlen) > gc->bufEnd) {
3641 (void) __glXFlushRenderBuffer(gc, gc->pc);
3642 }
3643 emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen);
3644 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3645 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3646 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3647 (mapsize * 4));
3648 gc->pc += cmdlen;
3649 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3650 (void) __glXFlushRenderBuffer(gc, gc->pc);
3651 }
3652 } else {
3653 const GLint op = X_GLrop_PixelMapuiv;
3654 const GLuint cmdlenLarge = cmdlen + 4;
3655 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3656 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3657 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3658 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3659 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3660 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4));
3661 }
3662 }
3663 }
3664
3665 #define X_GLrop_PixelMapusv 170
3666 void
3667 __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
3668 {
3669 struct glx_context *const gc = __glXGetCurrentContext();
3670 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
3671 if (mapsize < 0) {
3672 __glXSetError(gc, GL_INVALID_VALUE);
3673 return;
3674 }
3675 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) {
3676 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3677 if ((gc->pc + cmdlen) > gc->bufEnd) {
3678 (void) __glXFlushRenderBuffer(gc, gc->pc);
3679 }
3680 emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen);
3681 (void) memcpy((void *) (gc->pc + 4), (void *) (&map), 4);
3682 (void) memcpy((void *) (gc->pc + 8), (void *) (&mapsize), 4);
3683 (void) memcpy((void *) (gc->pc + 12), (void *) (values),
3684 (mapsize * 2));
3685 gc->pc += cmdlen;
3686 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3687 (void) __glXFlushRenderBuffer(gc, gc->pc);
3688 }
3689 } else {
3690 const GLint op = X_GLrop_PixelMapusv;
3691 const GLuint cmdlenLarge = cmdlen + 4;
3692 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3693 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3694 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3695 (void) memcpy((void *) (pc + 8), (void *) (&map), 4);
3696 (void) memcpy((void *) (pc + 12), (void *) (&mapsize), 4);
3697 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2));
3698 }
3699 }
3700 }
3701
3702 #define X_GLrop_ReadBuffer 171
3703 void
3704 __indirect_glReadBuffer(GLenum mode)
3705 {
3706 struct glx_context *const gc = __glXGetCurrentContext();
3707 const GLuint cmdlen = 8;
3708 emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
3709 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
3710 gc->pc += cmdlen;
3711 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3712 (void) __glXFlushRenderBuffer(gc, gc->pc);
3713 }
3714 }
3715
3716 #define X_GLrop_CopyPixels 172
3717 void
3718 __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3719 GLenum type)
3720 {
3721 struct glx_context *const gc = __glXGetCurrentContext();
3722 const GLuint cmdlen = 24;
3723 emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
3724 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
3725 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
3726 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
3727 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
3728 (void) memcpy((void *) (gc->pc + 20), (void *) (&type), 4);
3729 gc->pc += cmdlen;
3730 if (__builtin_expect(gc->pc > gc->limit, 0)) {
3731 (void) __glXFlushRenderBuffer(gc, gc->pc);
3732 }
3733 }
3734
3735 #define X_GLsop_ReadPixels 111
3736 void
3737 __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
3738 GLenum format, GLenum type, GLvoid * pixels)
3739 {
3740 struct glx_context *const gc = __glXGetCurrentContext();
3741 const __GLXattribute *const state = gc->client_state_private;
3742 Display *const dpy = gc->currentDpy;
3743 #ifndef USE_XCB
3744 const GLuint cmdlen = 28;
3745 #endif
3746 if (__builtin_expect(dpy != NULL, 1)) {
3747 #ifdef USE_XCB
3748 xcb_connection_t *c = XGetXCBConnection(dpy);
3749 (void) __glXFlushRenderBuffer(gc, gc->pc);
3750 xcb_glx_read_pixels_reply_t *reply =
3751 xcb_glx_read_pixels_reply(c,
3752 xcb_glx_read_pixels(c,
3753 gc->
3754 currentContextTag,
3755 x, y, width, height,
3756 format, type,
3757 state->storePack.
3758 swapEndian, 0),
3759 NULL);
3760 (void) memcpy(pixels, xcb_glx_read_pixels_data(reply),
3761 xcb_glx_read_pixels_data_length(reply) *
3762 sizeof(GLvoid));
3763 free(reply);
3764 #else
3765 GLubyte const *pc =
3766 __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen);
3767 (void) memcpy((void *) (pc + 0), (void *) (&x), 4);
3768 (void) memcpy((void *) (pc + 4), (void *) (&y), 4);
3769 (void) memcpy((void *) (pc + 8), (void *) (&width), 4);
3770 (void) memcpy((void *) (pc + 12), (void *) (&height), 4);
3771 (void) memcpy((void *) (pc + 16), (void *) (&format), 4);
3772 (void) memcpy((void *) (pc + 20), (void *) (&type), 4);
3773 *(int32_t *) (pc + 24) = 0;
3774 *(int8_t *) (pc + 24) = state->storePack.swapEndian;
3775 __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type,
3776 pixels, GL_FALSE);
3777 UnlockDisplay(dpy);
3778 SyncHandle();
3779 #endif /* USE_XCB */
3780 }
3781 return;
3782 }
3783
3784 #define X_GLrop_DrawPixels 173
3785 void
3786 __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format,
3787 GLenum type, const GLvoid * pixels)
3788 {
3789 struct glx_context *const gc = __glXGetCurrentContext();
3790 const GLuint compsize =
3791 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
3792 0) : 0;
3793 const GLuint cmdlen = 40 + __GLX_PAD(compsize);
3794 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
3795 if (cmdlen <= gc->maxSmallRenderCommandSize) {
3796 if ((gc->pc + cmdlen) > gc->bufEnd) {
3797 (void) __glXFlushRenderBuffer(gc, gc->pc);
3798 }
3799 emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen);
3800 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
3801 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
3802 (void) memcpy((void *) (gc->pc + 32), (void *) (&format), 4);
3803 (void) memcpy((void *) (gc->pc + 36), (void *) (&type), 4);
3804 if (compsize > 0) {
3805 (*gc->fillImage) (gc, 2, width, height, 1, format, type,
3806 pixels, gc->pc + 40, gc->pc + 4);
3807 } else {
3808 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
3809 default_pixel_store_2D_size);
3810 }
3811 gc->pc += cmdlen;
3812 if (gc->pc > gc->limit) {
3813 (void) __glXFlushRenderBuffer(gc, gc->pc);
3814 }
3815 } else {
3816 const GLint op = X_GLrop_DrawPixels;
3817 const GLuint cmdlenLarge = cmdlen + 4;
3818 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
3819 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
3820 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
3821 (void) memcpy((void *) (pc + 28), (void *) (&width), 4);
3822 (void) memcpy((void *) (pc + 32), (void *) (&height), 4);
3823 (void) memcpy((void *) (pc + 36), (void *) (&format), 4);
3824 (void) memcpy((void *) (pc + 40), (void *) (&type), 4);
3825 __glXSendLargeImage(gc, compsize, 2, width, height, 1, format,
3826 type, pixels, pc + 44, pc + 8);
3827 }
3828 }
3829 }
3830
3831 #define X_GLsop_GetClipPlane 113
3832 void
3833 __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
3834 {
3835 struct glx_context *const gc = __glXGetCurrentContext();
3836 Display *const dpy = gc->currentDpy;
3837 #ifndef USE_XCB
3838 const GLuint cmdlen = 4;
3839 #endif
3840 if (__builtin_expect(dpy != NULL, 1)) {
3841 #ifdef USE_XCB
3842 xcb_connection_t *c = XGetXCBConnection(dpy);
3843 (void) __glXFlushRenderBuffer(gc, gc->pc);
3844 xcb_glx_get_clip_plane_reply_t *reply =
3845 xcb_glx_get_clip_plane_reply(c,
3846 xcb_glx_get_clip_plane(c,
3847 gc->
3848 currentContextTag,
3849 plane), NULL);
3850 (void) memcpy(equation, xcb_glx_get_clip_plane_data(reply),
3851 xcb_glx_get_clip_plane_data_length(reply) *
3852 sizeof(GLdouble));
3853 free(reply);
3854 #else
3855 GLubyte const *pc =
3856 __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen);
3857 (void) memcpy((void *) (pc + 0), (void *) (&plane), 4);
3858 (void) __glXReadReply(dpy, 8, equation, GL_TRUE);
3859 UnlockDisplay(dpy);
3860 SyncHandle();
3861 #endif /* USE_XCB */
3862 }
3863 return;
3864 }
3865
3866 #define X_GLsop_GetLightfv 118
3867 void
3868 __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
3869 {
3870 struct glx_context *const gc = __glXGetCurrentContext();
3871 Display *const dpy = gc->currentDpy;
3872 #ifndef USE_XCB
3873 const GLuint cmdlen = 8;
3874 #endif
3875 if (__builtin_expect(dpy != NULL, 1)) {
3876 #ifdef USE_XCB
3877 xcb_connection_t *c = XGetXCBConnection(dpy);
3878 (void) __glXFlushRenderBuffer(gc, gc->pc);
3879 xcb_glx_get_lightfv_reply_t *reply =
3880 xcb_glx_get_lightfv_reply(c,
3881 xcb_glx_get_lightfv(c,
3882 gc->
3883 currentContextTag,
3884 light, pname),
3885 NULL);
3886 if (xcb_glx_get_lightfv_data_length(reply) == 0)
3887 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3888 else
3889 (void) memcpy(params, xcb_glx_get_lightfv_data(reply),
3890 xcb_glx_get_lightfv_data_length(reply) *
3891 sizeof(GLfloat));
3892 free(reply);
3893 #else
3894 GLubyte const *pc =
3895 __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen);
3896 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3897 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3898 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3899 UnlockDisplay(dpy);
3900 SyncHandle();
3901 #endif /* USE_XCB */
3902 }
3903 return;
3904 }
3905
3906 #define X_GLsop_GetLightiv 119
3907 void
3908 __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
3909 {
3910 struct glx_context *const gc = __glXGetCurrentContext();
3911 Display *const dpy = gc->currentDpy;
3912 #ifndef USE_XCB
3913 const GLuint cmdlen = 8;
3914 #endif
3915 if (__builtin_expect(dpy != NULL, 1)) {
3916 #ifdef USE_XCB
3917 xcb_connection_t *c = XGetXCBConnection(dpy);
3918 (void) __glXFlushRenderBuffer(gc, gc->pc);
3919 xcb_glx_get_lightiv_reply_t *reply =
3920 xcb_glx_get_lightiv_reply(c,
3921 xcb_glx_get_lightiv(c,
3922 gc->
3923 currentContextTag,
3924 light, pname),
3925 NULL);
3926 if (xcb_glx_get_lightiv_data_length(reply) == 0)
3927 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
3928 else
3929 (void) memcpy(params, xcb_glx_get_lightiv_data(reply),
3930 xcb_glx_get_lightiv_data_length(reply) *
3931 sizeof(GLint));
3932 free(reply);
3933 #else
3934 GLubyte const *pc =
3935 __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen);
3936 (void) memcpy((void *) (pc + 0), (void *) (&light), 4);
3937 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
3938 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
3939 UnlockDisplay(dpy);
3940 SyncHandle();
3941 #endif /* USE_XCB */
3942 }
3943 return;
3944 }
3945
3946 #define X_GLsop_GetMapdv 120
3947 void
3948 __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
3949 {
3950 struct glx_context *const gc = __glXGetCurrentContext();
3951 Display *const dpy = gc->currentDpy;
3952 #ifndef USE_XCB
3953 const GLuint cmdlen = 8;
3954 #endif
3955 if (__builtin_expect(dpy != NULL, 1)) {
3956 #ifdef USE_XCB
3957 xcb_connection_t *c = XGetXCBConnection(dpy);
3958 (void) __glXFlushRenderBuffer(gc, gc->pc);
3959 xcb_glx_get_mapdv_reply_t *reply =
3960 xcb_glx_get_mapdv_reply(c,
3961 xcb_glx_get_mapdv(c,
3962 gc->currentContextTag,
3963 target, query), NULL);
3964 if (xcb_glx_get_mapdv_data_length(reply) == 0)
3965 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
3966 else
3967 (void) memcpy(v, xcb_glx_get_mapdv_data(reply),
3968 xcb_glx_get_mapdv_data_length(reply) *
3969 sizeof(GLdouble));
3970 free(reply);
3971 #else
3972 GLubyte const *pc =
3973 __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen);
3974 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
3975 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
3976 (void) __glXReadReply(dpy, 8, v, GL_FALSE);
3977 UnlockDisplay(dpy);
3978 SyncHandle();
3979 #endif /* USE_XCB */
3980 }
3981 return;
3982 }
3983
3984 #define X_GLsop_GetMapfv 121
3985 void
3986 __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
3987 {
3988 struct glx_context *const gc = __glXGetCurrentContext();
3989 Display *const dpy = gc->currentDpy;
3990 #ifndef USE_XCB
3991 const GLuint cmdlen = 8;
3992 #endif
3993 if (__builtin_expect(dpy != NULL, 1)) {
3994 #ifdef USE_XCB
3995 xcb_connection_t *c = XGetXCBConnection(dpy);
3996 (void) __glXFlushRenderBuffer(gc, gc->pc);
3997 xcb_glx_get_mapfv_reply_t *reply =
3998 xcb_glx_get_mapfv_reply(c,
3999 xcb_glx_get_mapfv(c,
4000 gc->currentContextTag,
4001 target, query), NULL);
4002 if (xcb_glx_get_mapfv_data_length(reply) == 0)
4003 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4004 else
4005 (void) memcpy(v, xcb_glx_get_mapfv_data(reply),
4006 xcb_glx_get_mapfv_data_length(reply) *
4007 sizeof(GLfloat));
4008 free(reply);
4009 #else
4010 GLubyte const *pc =
4011 __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen);
4012 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4013 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
4014 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
4015 UnlockDisplay(dpy);
4016 SyncHandle();
4017 #endif /* USE_XCB */
4018 }
4019 return;
4020 }
4021
4022 #define X_GLsop_GetMapiv 122
4023 void
4024 __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
4025 {
4026 struct glx_context *const gc = __glXGetCurrentContext();
4027 Display *const dpy = gc->currentDpy;
4028 #ifndef USE_XCB
4029 const GLuint cmdlen = 8;
4030 #endif
4031 if (__builtin_expect(dpy != NULL, 1)) {
4032 #ifdef USE_XCB
4033 xcb_connection_t *c = XGetXCBConnection(dpy);
4034 (void) __glXFlushRenderBuffer(gc, gc->pc);
4035 xcb_glx_get_mapiv_reply_t *reply =
4036 xcb_glx_get_mapiv_reply(c,
4037 xcb_glx_get_mapiv(c,
4038 gc->currentContextTag,
4039 target, query), NULL);
4040 if (xcb_glx_get_mapiv_data_length(reply) == 0)
4041 (void) memcpy(v, &reply->datum, sizeof(reply->datum));
4042 else
4043 (void) memcpy(v, xcb_glx_get_mapiv_data(reply),
4044 xcb_glx_get_mapiv_data_length(reply) *
4045 sizeof(GLint));
4046 free(reply);
4047 #else
4048 GLubyte const *pc =
4049 __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen);
4050 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4051 (void) memcpy((void *) (pc + 4), (void *) (&query), 4);
4052 (void) __glXReadReply(dpy, 4, v, GL_FALSE);
4053 UnlockDisplay(dpy);
4054 SyncHandle();
4055 #endif /* USE_XCB */
4056 }
4057 return;
4058 }
4059
4060 #define X_GLsop_GetMaterialfv 123
4061 void
4062 __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
4063 {
4064 struct glx_context *const gc = __glXGetCurrentContext();
4065 Display *const dpy = gc->currentDpy;
4066 #ifndef USE_XCB
4067 const GLuint cmdlen = 8;
4068 #endif
4069 if (__builtin_expect(dpy != NULL, 1)) {
4070 #ifdef USE_XCB
4071 xcb_connection_t *c = XGetXCBConnection(dpy);
4072 (void) __glXFlushRenderBuffer(gc, gc->pc);
4073 xcb_glx_get_materialfv_reply_t *reply =
4074 xcb_glx_get_materialfv_reply(c,
4075 xcb_glx_get_materialfv(c,
4076 gc->
4077 currentContextTag,
4078 face, pname),
4079 NULL);
4080 if (xcb_glx_get_materialfv_data_length(reply) == 0)
4081 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4082 else
4083 (void) memcpy(params, xcb_glx_get_materialfv_data(reply),
4084 xcb_glx_get_materialfv_data_length(reply) *
4085 sizeof(GLfloat));
4086 free(reply);
4087 #else
4088 GLubyte const *pc =
4089 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen);
4090 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4091 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4092 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4093 UnlockDisplay(dpy);
4094 SyncHandle();
4095 #endif /* USE_XCB */
4096 }
4097 return;
4098 }
4099
4100 #define X_GLsop_GetMaterialiv 124
4101 void
4102 __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
4103 {
4104 struct glx_context *const gc = __glXGetCurrentContext();
4105 Display *const dpy = gc->currentDpy;
4106 #ifndef USE_XCB
4107 const GLuint cmdlen = 8;
4108 #endif
4109 if (__builtin_expect(dpy != NULL, 1)) {
4110 #ifdef USE_XCB
4111 xcb_connection_t *c = XGetXCBConnection(dpy);
4112 (void) __glXFlushRenderBuffer(gc, gc->pc);
4113 xcb_glx_get_materialiv_reply_t *reply =
4114 xcb_glx_get_materialiv_reply(c,
4115 xcb_glx_get_materialiv(c,
4116 gc->
4117 currentContextTag,
4118 face, pname),
4119 NULL);
4120 if (xcb_glx_get_materialiv_data_length(reply) == 0)
4121 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4122 else
4123 (void) memcpy(params, xcb_glx_get_materialiv_data(reply),
4124 xcb_glx_get_materialiv_data_length(reply) *
4125 sizeof(GLint));
4126 free(reply);
4127 #else
4128 GLubyte const *pc =
4129 __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen);
4130 (void) memcpy((void *) (pc + 0), (void *) (&face), 4);
4131 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4132 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4133 UnlockDisplay(dpy);
4134 SyncHandle();
4135 #endif /* USE_XCB */
4136 }
4137 return;
4138 }
4139
4140 #define X_GLsop_GetPixelMapfv 125
4141 void
4142 __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
4143 {
4144 struct glx_context *const gc = __glXGetCurrentContext();
4145 Display *const dpy = gc->currentDpy;
4146 #ifndef USE_XCB
4147 const GLuint cmdlen = 4;
4148 #endif
4149 if (__builtin_expect(dpy != NULL, 1)) {
4150 #ifdef USE_XCB
4151 xcb_connection_t *c = XGetXCBConnection(dpy);
4152 (void) __glXFlushRenderBuffer(gc, gc->pc);
4153 xcb_glx_get_pixel_mapfv_reply_t *reply =
4154 xcb_glx_get_pixel_mapfv_reply(c,
4155 xcb_glx_get_pixel_mapfv(c,
4156 gc->
4157 currentContextTag,
4158 map), NULL);
4159 if (xcb_glx_get_pixel_mapfv_data_length(reply) == 0)
4160 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4161 else
4162 (void) memcpy(values, xcb_glx_get_pixel_mapfv_data(reply),
4163 xcb_glx_get_pixel_mapfv_data_length(reply) *
4164 sizeof(GLfloat));
4165 free(reply);
4166 #else
4167 GLubyte const *pc =
4168 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen);
4169 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4170 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4171 UnlockDisplay(dpy);
4172 SyncHandle();
4173 #endif /* USE_XCB */
4174 }
4175 return;
4176 }
4177
4178 #define X_GLsop_GetPixelMapuiv 126
4179 void
4180 __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
4181 {
4182 struct glx_context *const gc = __glXGetCurrentContext();
4183 Display *const dpy = gc->currentDpy;
4184 #ifndef USE_XCB
4185 const GLuint cmdlen = 4;
4186 #endif
4187 if (__builtin_expect(dpy != NULL, 1)) {
4188 #ifdef USE_XCB
4189 xcb_connection_t *c = XGetXCBConnection(dpy);
4190 (void) __glXFlushRenderBuffer(gc, gc->pc);
4191 xcb_glx_get_pixel_mapuiv_reply_t *reply =
4192 xcb_glx_get_pixel_mapuiv_reply(c,
4193 xcb_glx_get_pixel_mapuiv(c,
4194 gc->
4195 currentContextTag,
4196 map),
4197 NULL);
4198 if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 0)
4199 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4200 else
4201 (void) memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply),
4202 xcb_glx_get_pixel_mapuiv_data_length(reply) *
4203 sizeof(GLuint));
4204 free(reply);
4205 #else
4206 GLubyte const *pc =
4207 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen);
4208 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4209 (void) __glXReadReply(dpy, 4, values, GL_FALSE);
4210 UnlockDisplay(dpy);
4211 SyncHandle();
4212 #endif /* USE_XCB */
4213 }
4214 return;
4215 }
4216
4217 #define X_GLsop_GetPixelMapusv 127
4218 void
4219 __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
4220 {
4221 struct glx_context *const gc = __glXGetCurrentContext();
4222 Display *const dpy = gc->currentDpy;
4223 #ifndef USE_XCB
4224 const GLuint cmdlen = 4;
4225 #endif
4226 if (__builtin_expect(dpy != NULL, 1)) {
4227 #ifdef USE_XCB
4228 xcb_connection_t *c = XGetXCBConnection(dpy);
4229 (void) __glXFlushRenderBuffer(gc, gc->pc);
4230 xcb_glx_get_pixel_mapusv_reply_t *reply =
4231 xcb_glx_get_pixel_mapusv_reply(c,
4232 xcb_glx_get_pixel_mapusv(c,
4233 gc->
4234 currentContextTag,
4235 map),
4236 NULL);
4237 if (xcb_glx_get_pixel_mapusv_data_length(reply) == 0)
4238 (void) memcpy(values, &reply->datum, sizeof(reply->datum));
4239 else
4240 (void) memcpy(values, xcb_glx_get_pixel_mapusv_data(reply),
4241 xcb_glx_get_pixel_mapusv_data_length(reply) *
4242 sizeof(GLushort));
4243 free(reply);
4244 #else
4245 GLubyte const *pc =
4246 __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen);
4247 (void) memcpy((void *) (pc + 0), (void *) (&map), 4);
4248 (void) __glXReadReply(dpy, 2, values, GL_FALSE);
4249 UnlockDisplay(dpy);
4250 SyncHandle();
4251 #endif /* USE_XCB */
4252 }
4253 return;
4254 }
4255
4256 #define X_GLsop_GetPolygonStipple 128
4257 void
4258 __indirect_glGetPolygonStipple(GLubyte *mask)
4259 {
4260 struct glx_context *const gc = __glXGetCurrentContext();
4261 Display *const dpy = gc->currentDpy;
4262 #ifndef USE_XCB
4263 const GLuint cmdlen = 4;
4264 #endif
4265 if (__builtin_expect(dpy != NULL, 1)) {
4266 #ifdef USE_XCB
4267 xcb_connection_t *c = XGetXCBConnection(dpy);
4268 (void) __glXFlushRenderBuffer(gc, gc->pc);
4269 xcb_glx_get_polygon_stipple_reply_t *reply =
4270 xcb_glx_get_polygon_stipple_reply(c,
4271 xcb_glx_get_polygon_stipple(c,
4272 gc->
4273 currentContextTag,
4274 0),
4275 NULL);
4276 (void) memcpy(mask, xcb_glx_get_polygon_stipple_data(reply),
4277 xcb_glx_get_polygon_stipple_data_length(reply) *
4278 sizeof(GLubyte));
4279 free(reply);
4280 #else
4281 GLubyte const *pc =
4282 __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen);
4283 *(int32_t *) (pc + 0) = 0;
4284 __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
4285 mask, GL_FALSE);
4286 UnlockDisplay(dpy);
4287 SyncHandle();
4288 #endif /* USE_XCB */
4289 }
4290 return;
4291 }
4292
4293 #define X_GLsop_GetTexEnvfv 130
4294 void
4295 __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
4296 {
4297 struct glx_context *const gc = __glXGetCurrentContext();
4298 Display *const dpy = gc->currentDpy;
4299 #ifndef USE_XCB
4300 const GLuint cmdlen = 8;
4301 #endif
4302 if (__builtin_expect(dpy != NULL, 1)) {
4303 #ifdef USE_XCB
4304 xcb_connection_t *c = XGetXCBConnection(dpy);
4305 (void) __glXFlushRenderBuffer(gc, gc->pc);
4306 xcb_glx_get_tex_envfv_reply_t *reply =
4307 xcb_glx_get_tex_envfv_reply(c,
4308 xcb_glx_get_tex_envfv(c,
4309 gc->
4310 currentContextTag,
4311 target, pname),
4312 NULL);
4313 if (xcb_glx_get_tex_envfv_data_length(reply) == 0)
4314 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4315 else
4316 (void) memcpy(params, xcb_glx_get_tex_envfv_data(reply),
4317 xcb_glx_get_tex_envfv_data_length(reply) *
4318 sizeof(GLfloat));
4319 free(reply);
4320 #else
4321 GLubyte const *pc =
4322 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen);
4323 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4324 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4325 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4326 UnlockDisplay(dpy);
4327 SyncHandle();
4328 #endif /* USE_XCB */
4329 }
4330 return;
4331 }
4332
4333 #define X_GLsop_GetTexEnviv 131
4334 void
4335 __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
4336 {
4337 struct glx_context *const gc = __glXGetCurrentContext();
4338 Display *const dpy = gc->currentDpy;
4339 #ifndef USE_XCB
4340 const GLuint cmdlen = 8;
4341 #endif
4342 if (__builtin_expect(dpy != NULL, 1)) {
4343 #ifdef USE_XCB
4344 xcb_connection_t *c = XGetXCBConnection(dpy);
4345 (void) __glXFlushRenderBuffer(gc, gc->pc);
4346 xcb_glx_get_tex_enviv_reply_t *reply =
4347 xcb_glx_get_tex_enviv_reply(c,
4348 xcb_glx_get_tex_enviv(c,
4349 gc->
4350 currentContextTag,
4351 target, pname),
4352 NULL);
4353 if (xcb_glx_get_tex_enviv_data_length(reply) == 0)
4354 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4355 else
4356 (void) memcpy(params, xcb_glx_get_tex_enviv_data(reply),
4357 xcb_glx_get_tex_enviv_data_length(reply) *
4358 sizeof(GLint));
4359 free(reply);
4360 #else
4361 GLubyte const *pc =
4362 __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen);
4363 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4364 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4365 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4366 UnlockDisplay(dpy);
4367 SyncHandle();
4368 #endif /* USE_XCB */
4369 }
4370 return;
4371 }
4372
4373 #define X_GLsop_GetTexGendv 132
4374 void
4375 __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
4376 {
4377 struct glx_context *const gc = __glXGetCurrentContext();
4378 Display *const dpy = gc->currentDpy;
4379 #ifndef USE_XCB
4380 const GLuint cmdlen = 8;
4381 #endif
4382 if (__builtin_expect(dpy != NULL, 1)) {
4383 #ifdef USE_XCB
4384 xcb_connection_t *c = XGetXCBConnection(dpy);
4385 (void) __glXFlushRenderBuffer(gc, gc->pc);
4386 xcb_glx_get_tex_gendv_reply_t *reply =
4387 xcb_glx_get_tex_gendv_reply(c,
4388 xcb_glx_get_tex_gendv(c,
4389 gc->
4390 currentContextTag,
4391 coord, pname),
4392 NULL);
4393 if (xcb_glx_get_tex_gendv_data_length(reply) == 0)
4394 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4395 else
4396 (void) memcpy(params, xcb_glx_get_tex_gendv_data(reply),
4397 xcb_glx_get_tex_gendv_data_length(reply) *
4398 sizeof(GLdouble));
4399 free(reply);
4400 #else
4401 GLubyte const *pc =
4402 __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen);
4403 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4404 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4405 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
4406 UnlockDisplay(dpy);
4407 SyncHandle();
4408 #endif /* USE_XCB */
4409 }
4410 return;
4411 }
4412
4413 #define X_GLsop_GetTexGenfv 133
4414 void
4415 __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
4416 {
4417 struct glx_context *const gc = __glXGetCurrentContext();
4418 Display *const dpy = gc->currentDpy;
4419 #ifndef USE_XCB
4420 const GLuint cmdlen = 8;
4421 #endif
4422 if (__builtin_expect(dpy != NULL, 1)) {
4423 #ifdef USE_XCB
4424 xcb_connection_t *c = XGetXCBConnection(dpy);
4425 (void) __glXFlushRenderBuffer(gc, gc->pc);
4426 xcb_glx_get_tex_genfv_reply_t *reply =
4427 xcb_glx_get_tex_genfv_reply(c,
4428 xcb_glx_get_tex_genfv(c,
4429 gc->
4430 currentContextTag,
4431 coord, pname),
4432 NULL);
4433 if (xcb_glx_get_tex_genfv_data_length(reply) == 0)
4434 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4435 else
4436 (void) memcpy(params, xcb_glx_get_tex_genfv_data(reply),
4437 xcb_glx_get_tex_genfv_data_length(reply) *
4438 sizeof(GLfloat));
4439 free(reply);
4440 #else
4441 GLubyte const *pc =
4442 __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen);
4443 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4444 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4445 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4446 UnlockDisplay(dpy);
4447 SyncHandle();
4448 #endif /* USE_XCB */
4449 }
4450 return;
4451 }
4452
4453 #define X_GLsop_GetTexGeniv 134
4454 void
4455 __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
4456 {
4457 struct glx_context *const gc = __glXGetCurrentContext();
4458 Display *const dpy = gc->currentDpy;
4459 #ifndef USE_XCB
4460 const GLuint cmdlen = 8;
4461 #endif
4462 if (__builtin_expect(dpy != NULL, 1)) {
4463 #ifdef USE_XCB
4464 xcb_connection_t *c = XGetXCBConnection(dpy);
4465 (void) __glXFlushRenderBuffer(gc, gc->pc);
4466 xcb_glx_get_tex_geniv_reply_t *reply =
4467 xcb_glx_get_tex_geniv_reply(c,
4468 xcb_glx_get_tex_geniv(c,
4469 gc->
4470 currentContextTag,
4471 coord, pname),
4472 NULL);
4473 if (xcb_glx_get_tex_geniv_data_length(reply) == 0)
4474 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4475 else
4476 (void) memcpy(params, xcb_glx_get_tex_geniv_data(reply),
4477 xcb_glx_get_tex_geniv_data_length(reply) *
4478 sizeof(GLint));
4479 free(reply);
4480 #else
4481 GLubyte const *pc =
4482 __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen);
4483 (void) memcpy((void *) (pc + 0), (void *) (&coord), 4);
4484 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4485 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4486 UnlockDisplay(dpy);
4487 SyncHandle();
4488 #endif /* USE_XCB */
4489 }
4490 return;
4491 }
4492
4493 #define X_GLsop_GetTexImage 135
4494 void
4495 __indirect_glGetTexImage(GLenum target, GLint level, GLenum format,
4496 GLenum type, GLvoid * pixels)
4497 {
4498 struct glx_context *const gc = __glXGetCurrentContext();
4499 const __GLXattribute *const state = gc->client_state_private;
4500 Display *const dpy = gc->currentDpy;
4501 #ifndef USE_XCB
4502 const GLuint cmdlen = 20;
4503 #endif
4504 if (__builtin_expect(dpy != NULL, 1)) {
4505 #ifdef USE_XCB
4506 xcb_connection_t *c = XGetXCBConnection(dpy);
4507 (void) __glXFlushRenderBuffer(gc, gc->pc);
4508 xcb_glx_get_tex_image_reply_t *reply =
4509 xcb_glx_get_tex_image_reply(c,
4510 xcb_glx_get_tex_image(c,
4511 gc->
4512 currentContextTag,
4513 target, level,
4514 format, type,
4515 state->
4516 storePack.
4517 swapEndian),
4518 NULL);
4519 (void) memcpy(pixels, xcb_glx_get_tex_image_data(reply),
4520 xcb_glx_get_tex_image_data_length(reply) *
4521 sizeof(GLvoid));
4522 free(reply);
4523 #else
4524 GLubyte const *pc =
4525 __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen);
4526 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4527 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4528 (void) memcpy((void *) (pc + 8), (void *) (&format), 4);
4529 (void) memcpy((void *) (pc + 12), (void *) (&type), 4);
4530 *(int32_t *) (pc + 16) = 0;
4531 *(int8_t *) (pc + 16) = state->storePack.swapEndian;
4532 __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels,
4533 GL_TRUE);
4534 UnlockDisplay(dpy);
4535 SyncHandle();
4536 #endif /* USE_XCB */
4537 }
4538 return;
4539 }
4540
4541 #define X_GLsop_GetTexParameterfv 136
4542 void
4543 __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
4544 {
4545 struct glx_context *const gc = __glXGetCurrentContext();
4546 Display *const dpy = gc->currentDpy;
4547 #ifndef USE_XCB
4548 const GLuint cmdlen = 8;
4549 #endif
4550 if (__builtin_expect(dpy != NULL, 1)) {
4551 #ifdef USE_XCB
4552 xcb_connection_t *c = XGetXCBConnection(dpy);
4553 (void) __glXFlushRenderBuffer(gc, gc->pc);
4554 xcb_glx_get_tex_parameterfv_reply_t *reply =
4555 xcb_glx_get_tex_parameterfv_reply(c,
4556 xcb_glx_get_tex_parameterfv(c,
4557 gc->
4558 currentContextTag,
4559 target,
4560 pname),
4561 NULL);
4562 if (xcb_glx_get_tex_parameterfv_data_length(reply) == 0)
4563 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4564 else
4565 (void) memcpy(params, xcb_glx_get_tex_parameterfv_data(reply),
4566 xcb_glx_get_tex_parameterfv_data_length(reply) *
4567 sizeof(GLfloat));
4568 free(reply);
4569 #else
4570 GLubyte const *pc =
4571 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen);
4572 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4573 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4574 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4575 UnlockDisplay(dpy);
4576 SyncHandle();
4577 #endif /* USE_XCB */
4578 }
4579 return;
4580 }
4581
4582 #define X_GLsop_GetTexParameteriv 137
4583 void
4584 __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
4585 {
4586 struct glx_context *const gc = __glXGetCurrentContext();
4587 Display *const dpy = gc->currentDpy;
4588 #ifndef USE_XCB
4589 const GLuint cmdlen = 8;
4590 #endif
4591 if (__builtin_expect(dpy != NULL, 1)) {
4592 #ifdef USE_XCB
4593 xcb_connection_t *c = XGetXCBConnection(dpy);
4594 (void) __glXFlushRenderBuffer(gc, gc->pc);
4595 xcb_glx_get_tex_parameteriv_reply_t *reply =
4596 xcb_glx_get_tex_parameteriv_reply(c,
4597 xcb_glx_get_tex_parameteriv(c,
4598 gc->
4599 currentContextTag,
4600 target,
4601 pname),
4602 NULL);
4603 if (xcb_glx_get_tex_parameteriv_data_length(reply) == 0)
4604 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4605 else
4606 (void) memcpy(params, xcb_glx_get_tex_parameteriv_data(reply),
4607 xcb_glx_get_tex_parameteriv_data_length(reply) *
4608 sizeof(GLint));
4609 free(reply);
4610 #else
4611 GLubyte const *pc =
4612 __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen);
4613 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4614 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
4615 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4616 UnlockDisplay(dpy);
4617 SyncHandle();
4618 #endif /* USE_XCB */
4619 }
4620 return;
4621 }
4622
4623 #define X_GLsop_GetTexLevelParameterfv 138
4624 void
4625 __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
4626 GLfloat * params)
4627 {
4628 struct glx_context *const gc = __glXGetCurrentContext();
4629 Display *const dpy = gc->currentDpy;
4630 #ifndef USE_XCB
4631 const GLuint cmdlen = 12;
4632 #endif
4633 if (__builtin_expect(dpy != NULL, 1)) {
4634 #ifdef USE_XCB
4635 xcb_connection_t *c = XGetXCBConnection(dpy);
4636 (void) __glXFlushRenderBuffer(gc, gc->pc);
4637 xcb_glx_get_tex_level_parameterfv_reply_t *reply =
4638 xcb_glx_get_tex_level_parameterfv_reply(c,
4639 xcb_glx_get_tex_level_parameterfv
4640 (c, gc->currentContextTag,
4641 target, level, pname),
4642 NULL);
4643 if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 0)
4644 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4645 else
4646 (void) memcpy(params,
4647 xcb_glx_get_tex_level_parameterfv_data(reply),
4648 xcb_glx_get_tex_level_parameterfv_data_length(reply)
4649 * sizeof(GLfloat));
4650 free(reply);
4651 #else
4652 GLubyte const *pc =
4653 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv,
4654 cmdlen);
4655 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4656 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4657 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4658 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4659 UnlockDisplay(dpy);
4660 SyncHandle();
4661 #endif /* USE_XCB */
4662 }
4663 return;
4664 }
4665
4666 #define X_GLsop_GetTexLevelParameteriv 139
4667 void
4668 __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
4669 GLint * params)
4670 {
4671 struct glx_context *const gc = __glXGetCurrentContext();
4672 Display *const dpy = gc->currentDpy;
4673 #ifndef USE_XCB
4674 const GLuint cmdlen = 12;
4675 #endif
4676 if (__builtin_expect(dpy != NULL, 1)) {
4677 #ifdef USE_XCB
4678 xcb_connection_t *c = XGetXCBConnection(dpy);
4679 (void) __glXFlushRenderBuffer(gc, gc->pc);
4680 xcb_glx_get_tex_level_parameteriv_reply_t *reply =
4681 xcb_glx_get_tex_level_parameteriv_reply(c,
4682 xcb_glx_get_tex_level_parameteriv
4683 (c, gc->currentContextTag,
4684 target, level, pname),
4685 NULL);
4686 if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 0)
4687 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
4688 else
4689 (void) memcpy(params,
4690 xcb_glx_get_tex_level_parameteriv_data(reply),
4691 xcb_glx_get_tex_level_parameteriv_data_length(reply)
4692 * sizeof(GLint));
4693 free(reply);
4694 #else
4695 GLubyte const *pc =
4696 __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv,
4697 cmdlen);
4698 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
4699 (void) memcpy((void *) (pc + 4), (void *) (&level), 4);
4700 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
4701 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
4702 UnlockDisplay(dpy);
4703 SyncHandle();
4704 #endif /* USE_XCB */
4705 }
4706 return;
4707 }
4708
4709 #define X_GLsop_IsList 141
4710 GLboolean
4711 __indirect_glIsList(GLuint list)
4712 {
4713 struct glx_context *const gc = __glXGetCurrentContext();
4714 Display *const dpy = gc->currentDpy;
4715 GLboolean retval = (GLboolean) 0;
4716 #ifndef USE_XCB
4717 const GLuint cmdlen = 4;
4718 #endif
4719 if (__builtin_expect(dpy != NULL, 1)) {
4720 #ifdef USE_XCB
4721 xcb_connection_t *c = XGetXCBConnection(dpy);
4722 (void) __glXFlushRenderBuffer(gc, gc->pc);
4723 xcb_glx_is_list_reply_t *reply =
4724 xcb_glx_is_list_reply(c,
4725 xcb_glx_is_list(c, gc->currentContextTag,
4726 list), NULL);
4727 retval = reply->ret_val;
4728 free(reply);
4729 #else
4730 GLubyte const *pc =
4731 __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen);
4732 (void) memcpy((void *) (pc + 0), (void *) (&list), 4);
4733 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
4734 UnlockDisplay(dpy);
4735 SyncHandle();
4736 #endif /* USE_XCB */
4737 }
4738 return retval;
4739 }
4740
4741 #define X_GLrop_DepthRange 174
4742 void
4743 __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
4744 {
4745 struct glx_context *const gc = __glXGetCurrentContext();
4746 const GLuint cmdlen = 20;
4747 emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
4748 (void) memcpy((void *) (gc->pc + 4), (void *) (&zNear), 8);
4749 (void) memcpy((void *) (gc->pc + 12), (void *) (&zFar), 8);
4750 gc->pc += cmdlen;
4751 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4752 (void) __glXFlushRenderBuffer(gc, gc->pc);
4753 }
4754 }
4755
4756 #define X_GLrop_Frustum 175
4757 void
4758 __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
4759 GLdouble top, GLdouble zNear, GLdouble zFar)
4760 {
4761 struct glx_context *const gc = __glXGetCurrentContext();
4762 const GLuint cmdlen = 52;
4763 emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
4764 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4765 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4766 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4767 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4768 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4769 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4770 gc->pc += cmdlen;
4771 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4772 (void) __glXFlushRenderBuffer(gc, gc->pc);
4773 }
4774 }
4775
4776 #define X_GLrop_LoadIdentity 176
4777 void
4778 __indirect_glLoadIdentity(void)
4779 {
4780 struct glx_context *const gc = __glXGetCurrentContext();
4781 const GLuint cmdlen = 4;
4782 emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
4783 gc->pc += cmdlen;
4784 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4785 (void) __glXFlushRenderBuffer(gc, gc->pc);
4786 }
4787 }
4788
4789 #define X_GLrop_LoadMatrixf 177
4790 void
4791 __indirect_glLoadMatrixf(const GLfloat * m)
4792 {
4793 struct glx_context *const gc = __glXGetCurrentContext();
4794 const GLuint cmdlen = 68;
4795 emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
4796 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4797 gc->pc += cmdlen;
4798 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4799 (void) __glXFlushRenderBuffer(gc, gc->pc);
4800 }
4801 }
4802
4803 #define X_GLrop_LoadMatrixd 178
4804 void
4805 __indirect_glLoadMatrixd(const GLdouble * m)
4806 {
4807 struct glx_context *const gc = __glXGetCurrentContext();
4808 const GLuint cmdlen = 132;
4809 emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
4810 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4811 gc->pc += cmdlen;
4812 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4813 (void) __glXFlushRenderBuffer(gc, gc->pc);
4814 }
4815 }
4816
4817 #define X_GLrop_MatrixMode 179
4818 void
4819 __indirect_glMatrixMode(GLenum mode)
4820 {
4821 struct glx_context *const gc = __glXGetCurrentContext();
4822 const GLuint cmdlen = 8;
4823 emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
4824 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
4825 gc->pc += cmdlen;
4826 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4827 (void) __glXFlushRenderBuffer(gc, gc->pc);
4828 }
4829 }
4830
4831 #define X_GLrop_MultMatrixf 180
4832 void
4833 __indirect_glMultMatrixf(const GLfloat * m)
4834 {
4835 struct glx_context *const gc = __glXGetCurrentContext();
4836 const GLuint cmdlen = 68;
4837 emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
4838 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
4839 gc->pc += cmdlen;
4840 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4841 (void) __glXFlushRenderBuffer(gc, gc->pc);
4842 }
4843 }
4844
4845 #define X_GLrop_MultMatrixd 181
4846 void
4847 __indirect_glMultMatrixd(const GLdouble * m)
4848 {
4849 struct glx_context *const gc = __glXGetCurrentContext();
4850 const GLuint cmdlen = 132;
4851 emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
4852 (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
4853 gc->pc += cmdlen;
4854 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4855 (void) __glXFlushRenderBuffer(gc, gc->pc);
4856 }
4857 }
4858
4859 #define X_GLrop_Ortho 182
4860 void
4861 __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
4862 GLdouble top, GLdouble zNear, GLdouble zFar)
4863 {
4864 struct glx_context *const gc = __glXGetCurrentContext();
4865 const GLuint cmdlen = 52;
4866 emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
4867 (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
4868 (void) memcpy((void *) (gc->pc + 12), (void *) (&right), 8);
4869 (void) memcpy((void *) (gc->pc + 20), (void *) (&bottom), 8);
4870 (void) memcpy((void *) (gc->pc + 28), (void *) (&top), 8);
4871 (void) memcpy((void *) (gc->pc + 36), (void *) (&zNear), 8);
4872 (void) memcpy((void *) (gc->pc + 44), (void *) (&zFar), 8);
4873 gc->pc += cmdlen;
4874 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4875 (void) __glXFlushRenderBuffer(gc, gc->pc);
4876 }
4877 }
4878
4879 #define X_GLrop_PopMatrix 183
4880 void
4881 __indirect_glPopMatrix(void)
4882 {
4883 struct glx_context *const gc = __glXGetCurrentContext();
4884 const GLuint cmdlen = 4;
4885 emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
4886 gc->pc += cmdlen;
4887 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4888 (void) __glXFlushRenderBuffer(gc, gc->pc);
4889 }
4890 }
4891
4892 #define X_GLrop_PushMatrix 184
4893 void
4894 __indirect_glPushMatrix(void)
4895 {
4896 struct glx_context *const gc = __glXGetCurrentContext();
4897 const GLuint cmdlen = 4;
4898 emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
4899 gc->pc += cmdlen;
4900 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4901 (void) __glXFlushRenderBuffer(gc, gc->pc);
4902 }
4903 }
4904
4905 #define X_GLrop_Rotated 185
4906 void
4907 __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4908 {
4909 struct glx_context *const gc = __glXGetCurrentContext();
4910 const GLuint cmdlen = 36;
4911 emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
4912 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 8);
4913 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
4914 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
4915 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
4916 gc->pc += cmdlen;
4917 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4918 (void) __glXFlushRenderBuffer(gc, gc->pc);
4919 }
4920 }
4921
4922 #define X_GLrop_Rotatef 186
4923 void
4924 __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
4925 {
4926 struct glx_context *const gc = __glXGetCurrentContext();
4927 const GLuint cmdlen = 20;
4928 emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
4929 (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 4);
4930 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
4931 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
4932 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
4933 gc->pc += cmdlen;
4934 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4935 (void) __glXFlushRenderBuffer(gc, gc->pc);
4936 }
4937 }
4938
4939 #define X_GLrop_Scaled 187
4940 void
4941 __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
4942 {
4943 struct glx_context *const gc = __glXGetCurrentContext();
4944 const GLuint cmdlen = 28;
4945 emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
4946 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4947 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4948 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4949 gc->pc += cmdlen;
4950 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4951 (void) __glXFlushRenderBuffer(gc, gc->pc);
4952 }
4953 }
4954
4955 #define X_GLrop_Scalef 188
4956 void
4957 __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
4958 {
4959 struct glx_context *const gc = __glXGetCurrentContext();
4960 const GLuint cmdlen = 16;
4961 emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
4962 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4963 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4964 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4965 gc->pc += cmdlen;
4966 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4967 (void) __glXFlushRenderBuffer(gc, gc->pc);
4968 }
4969 }
4970
4971 #define X_GLrop_Translated 189
4972 void
4973 __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
4974 {
4975 struct glx_context *const gc = __glXGetCurrentContext();
4976 const GLuint cmdlen = 28;
4977 emit_header(gc->pc, X_GLrop_Translated, cmdlen);
4978 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
4979 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
4980 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
4981 gc->pc += cmdlen;
4982 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4983 (void) __glXFlushRenderBuffer(gc, gc->pc);
4984 }
4985 }
4986
4987 #define X_GLrop_Translatef 190
4988 void
4989 __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
4990 {
4991 struct glx_context *const gc = __glXGetCurrentContext();
4992 const GLuint cmdlen = 16;
4993 emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
4994 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
4995 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
4996 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
4997 gc->pc += cmdlen;
4998 if (__builtin_expect(gc->pc > gc->limit, 0)) {
4999 (void) __glXFlushRenderBuffer(gc, gc->pc);
5000 }
5001 }
5002
5003 #define X_GLrop_Viewport 191
5004 void
5005 __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
5006 {
5007 struct glx_context *const gc = __glXGetCurrentContext();
5008 const GLuint cmdlen = 20;
5009 emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
5010 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
5011 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
5012 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
5013 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
5014 gc->pc += cmdlen;
5015 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5016 (void) __glXFlushRenderBuffer(gc, gc->pc);
5017 }
5018 }
5019
5020 #define X_GLrop_BindTexture 4117
5021 void
5022 __indirect_glBindTexture(GLenum target, GLuint texture)
5023 {
5024 struct glx_context *const gc = __glXGetCurrentContext();
5025 const GLuint cmdlen = 12;
5026 emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
5027 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5028 (void) memcpy((void *) (gc->pc + 8), (void *) (&texture), 4);
5029 gc->pc += cmdlen;
5030 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5031 (void) __glXFlushRenderBuffer(gc, gc->pc);
5032 }
5033 }
5034
5035 #define X_GLrop_Indexubv 194
5036 void
5037 __indirect_glIndexub(GLubyte c)
5038 {
5039 struct glx_context *const gc = __glXGetCurrentContext();
5040 const GLuint cmdlen = 8;
5041 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
5042 (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 1);
5043 gc->pc += cmdlen;
5044 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5045 (void) __glXFlushRenderBuffer(gc, gc->pc);
5046 }
5047 }
5048
5049 #define X_GLrop_Indexubv 194
5050 void
5051 __indirect_glIndexubv(const GLubyte *c)
5052 {
5053 struct glx_context *const gc = __glXGetCurrentContext();
5054 const GLuint cmdlen = 8;
5055 emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
5056 (void) memcpy((void *) (gc->pc + 4), (void *) (c), 1);
5057 gc->pc += cmdlen;
5058 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5059 (void) __glXFlushRenderBuffer(gc, gc->pc);
5060 }
5061 }
5062
5063 #define X_GLrop_PolygonOffset 192
5064 void
5065 __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
5066 {
5067 struct glx_context *const gc = __glXGetCurrentContext();
5068 const GLuint cmdlen = 12;
5069 emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
5070 (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
5071 (void) memcpy((void *) (gc->pc + 8), (void *) (&units), 4);
5072 gc->pc += cmdlen;
5073 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5074 (void) __glXFlushRenderBuffer(gc, gc->pc);
5075 }
5076 }
5077
5078 #define X_GLrop_CopyTexImage1D 4119
5079 void
5080 __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
5081 GLint x, GLint y, GLsizei width, GLint border)
5082 {
5083 struct glx_context *const gc = __glXGetCurrentContext();
5084 const GLuint cmdlen = 32;
5085 emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
5086 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5087 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5088 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5089 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5090 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5091 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5092 (void) memcpy((void *) (gc->pc + 28), (void *) (&border), 4);
5093 gc->pc += cmdlen;
5094 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5095 (void) __glXFlushRenderBuffer(gc, gc->pc);
5096 }
5097 }
5098
5099 #define X_GLrop_CopyTexImage2D 4120
5100 void
5101 __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
5102 GLint x, GLint y, GLsizei width, GLsizei height,
5103 GLint border)
5104 {
5105 struct glx_context *const gc = __glXGetCurrentContext();
5106 const GLuint cmdlen = 36;
5107 emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
5108 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5109 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5110 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
5111 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5112 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5113 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5114 (void) memcpy((void *) (gc->pc + 28), (void *) (&height), 4);
5115 (void) memcpy((void *) (gc->pc + 32), (void *) (&border), 4);
5116 gc->pc += cmdlen;
5117 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5118 (void) __glXFlushRenderBuffer(gc, gc->pc);
5119 }
5120 }
5121
5122 #define X_GLrop_CopyTexSubImage1D 4121
5123 void
5124 __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5125 GLint x, GLint y, GLsizei width)
5126 {
5127 struct glx_context *const gc = __glXGetCurrentContext();
5128 const GLuint cmdlen = 28;
5129 emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
5130 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5131 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5132 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5133 (void) memcpy((void *) (gc->pc + 16), (void *) (&x), 4);
5134 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 4);
5135 (void) memcpy((void *) (gc->pc + 24), (void *) (&width), 4);
5136 gc->pc += cmdlen;
5137 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5138 (void) __glXFlushRenderBuffer(gc, gc->pc);
5139 }
5140 }
5141
5142 #define X_GLrop_CopyTexSubImage2D 4122
5143 void
5144 __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5145 GLint yoffset, GLint x, GLint y, GLsizei width,
5146 GLsizei height)
5147 {
5148 struct glx_context *const gc = __glXGetCurrentContext();
5149 const GLuint cmdlen = 36;
5150 emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
5151 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5152 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
5153 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
5154 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
5155 (void) memcpy((void *) (gc->pc + 20), (void *) (&x), 4);
5156 (void) memcpy((void *) (gc->pc + 24), (void *) (&y), 4);
5157 (void) memcpy((void *) (gc->pc + 28), (void *) (&width), 4);
5158 (void) memcpy((void *) (gc->pc + 32), (void *) (&height), 4);
5159 gc->pc += cmdlen;
5160 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5161 (void) __glXFlushRenderBuffer(gc, gc->pc);
5162 }
5163 }
5164
5165 #define X_GLsop_DeleteTextures 144
5166 void
5167 __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
5168 {
5169 struct glx_context *const gc = __glXGetCurrentContext();
5170 Display *const dpy = gc->currentDpy;
5171 #ifndef USE_XCB
5172 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5173 #endif
5174 if (n < 0) {
5175 __glXSetError(gc, GL_INVALID_VALUE);
5176 return;
5177 }
5178 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5179 #ifdef USE_XCB
5180 xcb_connection_t *c = XGetXCBConnection(dpy);
5181 (void) __glXFlushRenderBuffer(gc, gc->pc);
5182 xcb_glx_delete_textures(c, gc->currentContextTag, n, textures);
5183 #else
5184 GLubyte const *pc =
5185 __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
5186 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5187 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5188 UnlockDisplay(dpy);
5189 SyncHandle();
5190 #endif /* USE_XCB */
5191 }
5192 return;
5193 }
5194
5195 #define X_GLvop_DeleteTexturesEXT 12
5196 void
5197 glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
5198 {
5199 struct glx_context *const gc = __glXGetCurrentContext();
5200
5201 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5202 if (gc->driContext) {
5203 CALL_DeleteTextures(GET_DISPATCH(), (n, textures));
5204 } else
5205 #endif
5206 {
5207 struct glx_context *const gc = __glXGetCurrentContext();
5208 Display *const dpy = gc->currentDpy;
5209 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
5210 if (n < 0) {
5211 __glXSetError(gc, GL_INVALID_VALUE);
5212 return;
5213 }
5214 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5215 GLubyte const *pc =
5216 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
5217 X_GLvop_DeleteTexturesEXT, cmdlen);
5218 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5219 (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
5220 UnlockDisplay(dpy);
5221 SyncHandle();
5222 }
5223 return;
5224 }
5225 }
5226
5227 #define X_GLsop_GenTextures 145
5228 void
5229 __indirect_glGenTextures(GLsizei n, GLuint * textures)
5230 {
5231 struct glx_context *const gc = __glXGetCurrentContext();
5232 Display *const dpy = gc->currentDpy;
5233 #ifndef USE_XCB
5234 const GLuint cmdlen = 4;
5235 #endif
5236 if (n < 0) {
5237 __glXSetError(gc, GL_INVALID_VALUE);
5238 return;
5239 }
5240 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5241 #ifdef USE_XCB
5242 xcb_connection_t *c = XGetXCBConnection(dpy);
5243 (void) __glXFlushRenderBuffer(gc, gc->pc);
5244 xcb_glx_gen_textures_reply_t *reply =
5245 xcb_glx_gen_textures_reply(c,
5246 xcb_glx_gen_textures(c,
5247 gc->
5248 currentContextTag,
5249 n), NULL);
5250 (void) memcpy(textures, xcb_glx_gen_textures_data(reply),
5251 xcb_glx_gen_textures_data_length(reply) *
5252 sizeof(GLuint));
5253 free(reply);
5254 #else
5255 GLubyte const *pc =
5256 __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen);
5257 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5258 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5259 UnlockDisplay(dpy);
5260 SyncHandle();
5261 #endif /* USE_XCB */
5262 }
5263 return;
5264 }
5265
5266 #define X_GLvop_GenTexturesEXT 13
5267 void
5268 glGenTexturesEXT(GLsizei n, GLuint * textures)
5269 {
5270 struct glx_context *const gc = __glXGetCurrentContext();
5271
5272 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5273 if (gc->driContext) {
5274 CALL_GenTextures(GET_DISPATCH(), (n, textures));
5275 } else
5276 #endif
5277 {
5278 struct glx_context *const gc = __glXGetCurrentContext();
5279 Display *const dpy = gc->currentDpy;
5280 const GLuint cmdlen = 4;
5281 if (n < 0) {
5282 __glXSetError(gc, GL_INVALID_VALUE);
5283 return;
5284 }
5285 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
5286 GLubyte const *pc =
5287 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5288 X_GLvop_GenTexturesEXT, cmdlen);
5289 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
5290 (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
5291 UnlockDisplay(dpy);
5292 SyncHandle();
5293 }
5294 return;
5295 }
5296 }
5297
5298 #define X_GLsop_IsTexture 146
5299 GLboolean
5300 __indirect_glIsTexture(GLuint texture)
5301 {
5302 struct glx_context *const gc = __glXGetCurrentContext();
5303 Display *const dpy = gc->currentDpy;
5304 GLboolean retval = (GLboolean) 0;
5305 #ifndef USE_XCB
5306 const GLuint cmdlen = 4;
5307 #endif
5308 if (__builtin_expect(dpy != NULL, 1)) {
5309 #ifdef USE_XCB
5310 xcb_connection_t *c = XGetXCBConnection(dpy);
5311 (void) __glXFlushRenderBuffer(gc, gc->pc);
5312 xcb_glx_is_texture_reply_t *reply =
5313 xcb_glx_is_texture_reply(c,
5314 xcb_glx_is_texture(c,
5315 gc->currentContextTag,
5316 texture), NULL);
5317 retval = reply->ret_val;
5318 free(reply);
5319 #else
5320 GLubyte const *pc =
5321 __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen);
5322 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5323 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5324 UnlockDisplay(dpy);
5325 SyncHandle();
5326 #endif /* USE_XCB */
5327 }
5328 return retval;
5329 }
5330
5331 #define X_GLvop_IsTextureEXT 14
5332 GLboolean
5333 glIsTextureEXT(GLuint texture)
5334 {
5335 struct glx_context *const gc = __glXGetCurrentContext();
5336
5337 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5338 if (gc->driContext) {
5339 return CALL_IsTexture(GET_DISPATCH(), (texture));
5340 } else
5341 #endif
5342 {
5343 struct glx_context *const gc = __glXGetCurrentContext();
5344 Display *const dpy = gc->currentDpy;
5345 GLboolean retval = (GLboolean) 0;
5346 const GLuint cmdlen = 4;
5347 if (__builtin_expect(dpy != NULL, 1)) {
5348 GLubyte const *pc =
5349 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5350 X_GLvop_IsTextureEXT, cmdlen);
5351 (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
5352 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
5353 UnlockDisplay(dpy);
5354 SyncHandle();
5355 }
5356 return retval;
5357 }
5358 }
5359
5360 #define X_GLrop_PrioritizeTextures 4118
5361 void
5362 __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures,
5363 const GLclampf * priorities)
5364 {
5365 struct glx_context *const gc = __glXGetCurrentContext();
5366 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
5367 if (n < 0) {
5368 __glXSetError(gc, GL_INVALID_VALUE);
5369 return;
5370 }
5371 if (__builtin_expect(n >= 0, 1)) {
5372 emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
5373 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
5374 (void) memcpy((void *) (gc->pc + 8), (void *) (textures), (n * 4));
5375 (void) memcpy((void *) (gc->pc + 8 + (n * 4)), (void *) (priorities),
5376 (n * 4));
5377 gc->pc += cmdlen;
5378 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5379 (void) __glXFlushRenderBuffer(gc, gc->pc);
5380 }
5381 }
5382 }
5383
5384 static void
5385 __glx_TexSubImage_1D2D(unsigned opcode, unsigned dim, GLenum target,
5386 GLint level, GLint xoffset, GLint yoffset,
5387 GLsizei width, GLsizei height, GLenum format,
5388 GLenum type, const GLvoid * pixels)
5389 {
5390 struct glx_context *const gc = __glXGetCurrentContext();
5391 const GLuint compsize =
5392 (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
5393 target) : 0;
5394 const GLuint cmdlen = 60 + __GLX_PAD(compsize);
5395 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5396 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5397 if ((gc->pc + cmdlen) > gc->bufEnd) {
5398 (void) __glXFlushRenderBuffer(gc, gc->pc);
5399 }
5400 emit_header(gc->pc, opcode, cmdlen);
5401 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5402 (void) memcpy((void *) (gc->pc + 28), (void *) (&level), 4);
5403 (void) memcpy((void *) (gc->pc + 32), (void *) (&xoffset), 4);
5404 (void) memcpy((void *) (gc->pc + 36), (void *) (&yoffset), 4);
5405 (void) memcpy((void *) (gc->pc + 40), (void *) (&width), 4);
5406 (void) memcpy((void *) (gc->pc + 44), (void *) (&height), 4);
5407 (void) memcpy((void *) (gc->pc + 48), (void *) (&format), 4);
5408 (void) memcpy((void *) (gc->pc + 52), (void *) (&type), 4);
5409 (void) memset((void *) (gc->pc + 56), 0, 4);
5410 if (compsize > 0) {
5411 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5412 pixels, gc->pc + 60, gc->pc + 4);
5413 } else {
5414 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5415 default_pixel_store_2D_size);
5416 }
5417 gc->pc += cmdlen;
5418 if (gc->pc > gc->limit) {
5419 (void) __glXFlushRenderBuffer(gc, gc->pc);
5420 }
5421 } else {
5422 const GLint op = opcode;
5423 const GLuint cmdlenLarge = cmdlen + 4;
5424 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5425 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5426 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5427 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5428 (void) memcpy((void *) (pc + 32), (void *) (&level), 4);
5429 (void) memcpy((void *) (pc + 36), (void *) (&xoffset), 4);
5430 (void) memcpy((void *) (pc + 40), (void *) (&yoffset), 4);
5431 (void) memcpy((void *) (pc + 44), (void *) (&width), 4);
5432 (void) memcpy((void *) (pc + 48), (void *) (&height), 4);
5433 (void) memcpy((void *) (pc + 52), (void *) (&format), 4);
5434 (void) memcpy((void *) (pc + 56), (void *) (&type), 4);
5435 (void) memset((void *) (pc + 60), 0, 4);
5436 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5437 type, pixels, pc + 64, pc + 8);
5438 }
5439 }
5440 }
5441
5442 #define X_GLrop_TexSubImage1D 4099
5443 void
5444 __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset,
5445 GLsizei width, GLenum format, GLenum type,
5446 const GLvoid * pixels)
5447 {
5448 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset,
5449 1, width, 1, format, type, pixels);
5450 }
5451
5452 #define X_GLrop_TexSubImage2D 4100
5453 void
5454 __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset,
5455 GLint yoffset, GLsizei width, GLsizei height,
5456 GLenum format, GLenum type, const GLvoid * pixels)
5457 {
5458 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset,
5459 yoffset, width, height, format, type, pixels);
5460 }
5461
5462 #define X_GLrop_BlendColor 4096
5463 void
5464 __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue,
5465 GLclampf alpha)
5466 {
5467 struct glx_context *const gc = __glXGetCurrentContext();
5468 const GLuint cmdlen = 20;
5469 emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
5470 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
5471 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
5472 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
5473 (void) memcpy((void *) (gc->pc + 16), (void *) (&alpha), 4);
5474 gc->pc += cmdlen;
5475 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5476 (void) __glXFlushRenderBuffer(gc, gc->pc);
5477 }
5478 }
5479
5480 #define X_GLrop_BlendEquation 4097
5481 void
5482 __indirect_glBlendEquation(GLenum mode)
5483 {
5484 struct glx_context *const gc = __glXGetCurrentContext();
5485 const GLuint cmdlen = 8;
5486 emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
5487 (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
5488 gc->pc += cmdlen;
5489 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5490 (void) __glXFlushRenderBuffer(gc, gc->pc);
5491 }
5492 }
5493
5494 #define X_GLrop_ColorTable 2053
5495 void
5496 __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width,
5497 GLenum format, GLenum type, const GLvoid * table)
5498 {
5499 struct glx_context *const gc = __glXGetCurrentContext();
5500 const GLuint compsize =
5501 (table != NULL) ? __glImageSize(width, 1, 1, format, type,
5502 target) : 0;
5503 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5504 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5505 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5506 if ((gc->pc + cmdlen) > gc->bufEnd) {
5507 (void) __glXFlushRenderBuffer(gc, gc->pc);
5508 }
5509 emit_header(gc->pc, X_GLrop_ColorTable, cmdlen);
5510 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5511 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5512 4);
5513 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5514 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5515 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5516 if (compsize > 0) {
5517 (*gc->fillImage) (gc, 1, width, 1, 1, format, type, table,
5518 gc->pc + 44, gc->pc + 4);
5519 } else {
5520 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5521 default_pixel_store_1D_size);
5522 }
5523 gc->pc += cmdlen;
5524 if (gc->pc > gc->limit) {
5525 (void) __glXFlushRenderBuffer(gc, gc->pc);
5526 }
5527 } else {
5528 const GLint op = X_GLrop_ColorTable;
5529 const GLuint cmdlenLarge = cmdlen + 4;
5530 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5531 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5532 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5533 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5534 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5535 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5536 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5537 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5538 __glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type,
5539 table, pc + 48, pc + 8);
5540 }
5541 }
5542 }
5543
5544 #define X_GLrop_ColorTableParameterfv 2054
5545 void
5546 __indirect_glColorTableParameterfv(GLenum target, GLenum pname,
5547 const GLfloat * params)
5548 {
5549 struct glx_context *const gc = __glXGetCurrentContext();
5550 const GLuint compsize = __glColorTableParameterfv_size(pname);
5551 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5552 emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
5553 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5554 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5555 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5556 gc->pc += cmdlen;
5557 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5558 (void) __glXFlushRenderBuffer(gc, gc->pc);
5559 }
5560 }
5561
5562 #define X_GLrop_ColorTableParameteriv 2055
5563 void
5564 __indirect_glColorTableParameteriv(GLenum target, GLenum pname,
5565 const GLint * params)
5566 {
5567 struct glx_context *const gc = __glXGetCurrentContext();
5568 const GLuint compsize = __glColorTableParameteriv_size(pname);
5569 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5570 emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
5571 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5572 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5573 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5574 gc->pc += cmdlen;
5575 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5576 (void) __glXFlushRenderBuffer(gc, gc->pc);
5577 }
5578 }
5579
5580 #define X_GLrop_CopyColorTable 2056
5581 void
5582 __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x,
5583 GLint y, GLsizei width)
5584 {
5585 struct glx_context *const gc = __glXGetCurrentContext();
5586 const GLuint cmdlen = 24;
5587 emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
5588 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5589 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
5590 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5591 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5592 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5593 gc->pc += cmdlen;
5594 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5595 (void) __glXFlushRenderBuffer(gc, gc->pc);
5596 }
5597 }
5598
5599 #define X_GLsop_GetColorTable 147
5600 void
5601 __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
5602 GLvoid * table)
5603 {
5604 struct glx_context *const gc = __glXGetCurrentContext();
5605 const __GLXattribute *const state = gc->client_state_private;
5606 Display *const dpy = gc->currentDpy;
5607 #ifndef USE_XCB
5608 const GLuint cmdlen = 16;
5609 #endif
5610 if (__builtin_expect(dpy != NULL, 1)) {
5611 #ifdef USE_XCB
5612 xcb_connection_t *c = XGetXCBConnection(dpy);
5613 (void) __glXFlushRenderBuffer(gc, gc->pc);
5614 xcb_glx_get_color_table_reply_t *reply =
5615 xcb_glx_get_color_table_reply(c,
5616 xcb_glx_get_color_table(c,
5617 gc->
5618 currentContextTag,
5619 target,
5620 format,
5621 type,
5622 state->
5623 storePack.
5624 swapEndian),
5625 NULL);
5626 (void) memcpy(table, xcb_glx_get_color_table_data(reply),
5627 xcb_glx_get_color_table_data_length(reply) *
5628 sizeof(GLvoid));
5629 free(reply);
5630 #else
5631 GLubyte const *pc =
5632 __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen);
5633 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5634 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5635 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5636 *(int32_t *) (pc + 12) = 0;
5637 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5638 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5639 GL_TRUE);
5640 UnlockDisplay(dpy);
5641 SyncHandle();
5642 #endif /* USE_XCB */
5643 }
5644 return;
5645 }
5646
5647 #define X_GLvop_GetColorTableSGI 4098
5648 void
5649 glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
5650 {
5651 struct glx_context *const gc = __glXGetCurrentContext();
5652
5653 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5654 if (gc->driContext) {
5655 CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table));
5656 } else
5657 #endif
5658 {
5659 struct glx_context *const gc = __glXGetCurrentContext();
5660 const __GLXattribute *const state = gc->client_state_private;
5661 Display *const dpy = gc->currentDpy;
5662 const GLuint cmdlen = 16;
5663 if (__builtin_expect(dpy != NULL, 1)) {
5664 GLubyte const *pc =
5665 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5666 X_GLvop_GetColorTableSGI, cmdlen);
5667 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5668 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
5669 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
5670 *(int32_t *) (pc + 12) = 0;
5671 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
5672 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table,
5673 GL_TRUE);
5674 UnlockDisplay(dpy);
5675 SyncHandle();
5676 }
5677 return;
5678 }
5679 }
5680
5681 #define X_GLsop_GetColorTableParameterfv 148
5682 void
5683 __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
5684 GLfloat * params)
5685 {
5686 struct glx_context *const gc = __glXGetCurrentContext();
5687 Display *const dpy = gc->currentDpy;
5688 #ifndef USE_XCB
5689 const GLuint cmdlen = 8;
5690 #endif
5691 if (__builtin_expect(dpy != NULL, 1)) {
5692 #ifdef USE_XCB
5693 xcb_connection_t *c = XGetXCBConnection(dpy);
5694 (void) __glXFlushRenderBuffer(gc, gc->pc);
5695 xcb_glx_get_color_table_parameterfv_reply_t *reply =
5696 xcb_glx_get_color_table_parameterfv_reply(c,
5697 xcb_glx_get_color_table_parameterfv
5698 (c,
5699 gc->currentContextTag,
5700 target, pname), NULL);
5701 if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 0)
5702 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5703 else
5704 (void) memcpy(params,
5705 xcb_glx_get_color_table_parameterfv_data(reply),
5706 xcb_glx_get_color_table_parameterfv_data_length
5707 (reply) * sizeof(GLfloat));
5708 free(reply);
5709 #else
5710 GLubyte const *pc =
5711 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv,
5712 cmdlen);
5713 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5714 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5715 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5716 UnlockDisplay(dpy);
5717 SyncHandle();
5718 #endif /* USE_XCB */
5719 }
5720 return;
5721 }
5722
5723 #define X_GLvop_GetColorTableParameterfvSGI 4099
5724 void
5725 glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
5726 {
5727 struct glx_context *const gc = __glXGetCurrentContext();
5728
5729 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5730 if (gc->driContext) {
5731 CALL_GetColorTableParameterfv(GET_DISPATCH(),
5732 (target, pname, params));
5733 } else
5734 #endif
5735 {
5736 struct glx_context *const gc = __glXGetCurrentContext();
5737 Display *const dpy = gc->currentDpy;
5738 const GLuint cmdlen = 8;
5739 if (__builtin_expect(dpy != NULL, 1)) {
5740 GLubyte const *pc =
5741 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5742 X_GLvop_GetColorTableParameterfvSGI,
5743 cmdlen);
5744 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5745 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5746 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5747 UnlockDisplay(dpy);
5748 SyncHandle();
5749 }
5750 return;
5751 }
5752 }
5753
5754 #define X_GLsop_GetColorTableParameteriv 149
5755 void
5756 __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
5757 GLint * params)
5758 {
5759 struct glx_context *const gc = __glXGetCurrentContext();
5760 Display *const dpy = gc->currentDpy;
5761 #ifndef USE_XCB
5762 const GLuint cmdlen = 8;
5763 #endif
5764 if (__builtin_expect(dpy != NULL, 1)) {
5765 #ifdef USE_XCB
5766 xcb_connection_t *c = XGetXCBConnection(dpy);
5767 (void) __glXFlushRenderBuffer(gc, gc->pc);
5768 xcb_glx_get_color_table_parameteriv_reply_t *reply =
5769 xcb_glx_get_color_table_parameteriv_reply(c,
5770 xcb_glx_get_color_table_parameteriv
5771 (c,
5772 gc->currentContextTag,
5773 target, pname), NULL);
5774 if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 0)
5775 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
5776 else
5777 (void) memcpy(params,
5778 xcb_glx_get_color_table_parameteriv_data(reply),
5779 xcb_glx_get_color_table_parameteriv_data_length
5780 (reply) * sizeof(GLint));
5781 free(reply);
5782 #else
5783 GLubyte const *pc =
5784 __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv,
5785 cmdlen);
5786 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5787 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5788 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5789 UnlockDisplay(dpy);
5790 SyncHandle();
5791 #endif /* USE_XCB */
5792 }
5793 return;
5794 }
5795
5796 #define X_GLvop_GetColorTableParameterivSGI 4100
5797 void
5798 glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
5799 {
5800 struct glx_context *const gc = __glXGetCurrentContext();
5801
5802 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
5803 if (gc->driContext) {
5804 CALL_GetColorTableParameteriv(GET_DISPATCH(),
5805 (target, pname, params));
5806 } else
5807 #endif
5808 {
5809 struct glx_context *const gc = __glXGetCurrentContext();
5810 Display *const dpy = gc->currentDpy;
5811 const GLuint cmdlen = 8;
5812 if (__builtin_expect(dpy != NULL, 1)) {
5813 GLubyte const *pc =
5814 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
5815 X_GLvop_GetColorTableParameterivSGI,
5816 cmdlen);
5817 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
5818 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
5819 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
5820 UnlockDisplay(dpy);
5821 SyncHandle();
5822 }
5823 return;
5824 }
5825 }
5826
5827 #define X_GLrop_ColorSubTable 195
5828 void
5829 __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count,
5830 GLenum format, GLenum type, const GLvoid * data)
5831 {
5832 struct glx_context *const gc = __glXGetCurrentContext();
5833 const GLuint compsize =
5834 (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
5835 const GLuint cmdlen = 44 + __GLX_PAD(compsize);
5836 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5837 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5838 if ((gc->pc + cmdlen) > gc->bufEnd) {
5839 (void) __glXFlushRenderBuffer(gc, gc->pc);
5840 }
5841 emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen);
5842 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5843 (void) memcpy((void *) (gc->pc + 28), (void *) (&start), 4);
5844 (void) memcpy((void *) (gc->pc + 32), (void *) (&count), 4);
5845 (void) memcpy((void *) (gc->pc + 36), (void *) (&format), 4);
5846 (void) memcpy((void *) (gc->pc + 40), (void *) (&type), 4);
5847 if (compsize > 0) {
5848 (*gc->fillImage) (gc, 1, count, 1, 1, format, type, data,
5849 gc->pc + 44, gc->pc + 4);
5850 } else {
5851 (void) memcpy(gc->pc + 4, default_pixel_store_1D,
5852 default_pixel_store_1D_size);
5853 }
5854 gc->pc += cmdlen;
5855 if (gc->pc > gc->limit) {
5856 (void) __glXFlushRenderBuffer(gc, gc->pc);
5857 }
5858 } else {
5859 const GLint op = X_GLrop_ColorSubTable;
5860 const GLuint cmdlenLarge = cmdlen + 4;
5861 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5862 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5863 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5864 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5865 (void) memcpy((void *) (pc + 32), (void *) (&start), 4);
5866 (void) memcpy((void *) (pc + 36), (void *) (&count), 4);
5867 (void) memcpy((void *) (pc + 40), (void *) (&format), 4);
5868 (void) memcpy((void *) (pc + 44), (void *) (&type), 4);
5869 __glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type,
5870 data, pc + 48, pc + 8);
5871 }
5872 }
5873 }
5874
5875 #define X_GLrop_CopyColorSubTable 196
5876 void
5877 __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y,
5878 GLsizei width)
5879 {
5880 struct glx_context *const gc = __glXGetCurrentContext();
5881 const GLuint cmdlen = 24;
5882 emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
5883 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5884 (void) memcpy((void *) (gc->pc + 8), (void *) (&start), 4);
5885 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
5886 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
5887 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
5888 gc->pc += cmdlen;
5889 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5890 (void) __glXFlushRenderBuffer(gc, gc->pc);
5891 }
5892 }
5893
5894 static void
5895 __glx_ConvolutionFilter_1D2D(unsigned opcode, unsigned dim, GLenum target,
5896 GLenum internalformat, GLsizei width,
5897 GLsizei height, GLenum format, GLenum type,
5898 const GLvoid * image)
5899 {
5900 struct glx_context *const gc = __glXGetCurrentContext();
5901 const GLuint compsize =
5902 (image != NULL) ? __glImageSize(width, height, 1, format, type,
5903 target) : 0;
5904 const GLuint cmdlen = 48 + __GLX_PAD(compsize);
5905 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
5906 if (cmdlen <= gc->maxSmallRenderCommandSize) {
5907 if ((gc->pc + cmdlen) > gc->bufEnd) {
5908 (void) __glXFlushRenderBuffer(gc, gc->pc);
5909 }
5910 emit_header(gc->pc, opcode, cmdlen);
5911 (void) memcpy((void *) (gc->pc + 24), (void *) (&target), 4);
5912 (void) memcpy((void *) (gc->pc + 28), (void *) (&internalformat),
5913 4);
5914 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
5915 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
5916 (void) memcpy((void *) (gc->pc + 40), (void *) (&format), 4);
5917 (void) memcpy((void *) (gc->pc + 44), (void *) (&type), 4);
5918 if (compsize > 0) {
5919 (*gc->fillImage) (gc, dim, width, height, 1, format, type,
5920 image, gc->pc + 48, gc->pc + 4);
5921 } else {
5922 (void) memcpy(gc->pc + 4, default_pixel_store_2D,
5923 default_pixel_store_2D_size);
5924 }
5925 gc->pc += cmdlen;
5926 if (gc->pc > gc->limit) {
5927 (void) __glXFlushRenderBuffer(gc, gc->pc);
5928 }
5929 } else {
5930 const GLint op = opcode;
5931 const GLuint cmdlenLarge = cmdlen + 4;
5932 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
5933 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
5934 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
5935 (void) memcpy((void *) (pc + 28), (void *) (&target), 4);
5936 (void) memcpy((void *) (pc + 32), (void *) (&internalformat), 4);
5937 (void) memcpy((void *) (pc + 36), (void *) (&width), 4);
5938 (void) memcpy((void *) (pc + 40), (void *) (&height), 4);
5939 (void) memcpy((void *) (pc + 44), (void *) (&format), 4);
5940 (void) memcpy((void *) (pc + 48), (void *) (&type), 4);
5941 __glXSendLargeImage(gc, compsize, dim, width, height, 1, format,
5942 type, image, pc + 52, pc + 8);
5943 }
5944 }
5945 }
5946
5947 #define X_GLrop_ConvolutionFilter1D 4101
5948 void
5949 __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat,
5950 GLsizei width, GLenum format, GLenum type,
5951 const GLvoid * image)
5952 {
5953 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target,
5954 internalformat, width, 1, format, type,
5955 image);
5956 }
5957
5958 #define X_GLrop_ConvolutionFilter2D 4102
5959 void
5960 __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat,
5961 GLsizei width, GLsizei height, GLenum format,
5962 GLenum type, const GLvoid * image)
5963 {
5964 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target,
5965 internalformat, width, height, format, type,
5966 image);
5967 }
5968
5969 #define X_GLrop_ConvolutionParameterf 4103
5970 void
5971 __indirect_glConvolutionParameterf(GLenum target, GLenum pname,
5972 GLfloat params)
5973 {
5974 struct glx_context *const gc = __glXGetCurrentContext();
5975 const GLuint cmdlen = 16;
5976 emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
5977 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5978 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5979 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
5980 gc->pc += cmdlen;
5981 if (__builtin_expect(gc->pc > gc->limit, 0)) {
5982 (void) __glXFlushRenderBuffer(gc, gc->pc);
5983 }
5984 }
5985
5986 #define X_GLrop_ConvolutionParameterfv 4104
5987 void
5988 __indirect_glConvolutionParameterfv(GLenum target, GLenum pname,
5989 const GLfloat * params)
5990 {
5991 struct glx_context *const gc = __glXGetCurrentContext();
5992 const GLuint compsize = __glConvolutionParameterfv_size(pname);
5993 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
5994 emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
5995 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
5996 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
5997 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
5998 gc->pc += cmdlen;
5999 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6000 (void) __glXFlushRenderBuffer(gc, gc->pc);
6001 }
6002 }
6003
6004 #define X_GLrop_ConvolutionParameteri 4105
6005 void
6006 __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
6007 {
6008 struct glx_context *const gc = __glXGetCurrentContext();
6009 const GLuint cmdlen = 16;
6010 emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
6011 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6012 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
6013 (void) memcpy((void *) (gc->pc + 12), (void *) (&params), 4);
6014 gc->pc += cmdlen;
6015 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6016 (void) __glXFlushRenderBuffer(gc, gc->pc);
6017 }
6018 }
6019
6020 #define X_GLrop_ConvolutionParameteriv 4106
6021 void
6022 __indirect_glConvolutionParameteriv(GLenum target, GLenum pname,
6023 const GLint * params)
6024 {
6025 struct glx_context *const gc = __glXGetCurrentContext();
6026 const GLuint compsize = __glConvolutionParameteriv_size(pname);
6027 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
6028 emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
6029 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6030 (void) memcpy((void *) (gc->pc + 8), (void *) (&pname), 4);
6031 (void) memcpy((void *) (gc->pc + 12), (void *) (params), (compsize * 4));
6032 gc->pc += cmdlen;
6033 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6034 (void) __glXFlushRenderBuffer(gc, gc->pc);
6035 }
6036 }
6037
6038 #define X_GLrop_CopyConvolutionFilter1D 4107
6039 void
6040 __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat,
6041 GLint x, GLint y, GLsizei width)
6042 {
6043 struct glx_context *const gc = __glXGetCurrentContext();
6044 const GLuint cmdlen = 24;
6045 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
6046 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6047 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6048 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
6049 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
6050 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
6051 gc->pc += cmdlen;
6052 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6053 (void) __glXFlushRenderBuffer(gc, gc->pc);
6054 }
6055 }
6056
6057 #define X_GLrop_CopyConvolutionFilter2D 4108
6058 void
6059 __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat,
6060 GLint x, GLint y, GLsizei width,
6061 GLsizei height)
6062 {
6063 struct glx_context *const gc = __glXGetCurrentContext();
6064 const GLuint cmdlen = 28;
6065 emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
6066 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6067 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6068 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
6069 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
6070 (void) memcpy((void *) (gc->pc + 20), (void *) (&width), 4);
6071 (void) memcpy((void *) (gc->pc + 24), (void *) (&height), 4);
6072 gc->pc += cmdlen;
6073 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6074 (void) __glXFlushRenderBuffer(gc, gc->pc);
6075 }
6076 }
6077
6078 #define X_GLsop_GetConvolutionFilter 150
6079 void
6080 __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type,
6081 GLvoid * image)
6082 {
6083 struct glx_context *const gc = __glXGetCurrentContext();
6084 const __GLXattribute *const state = gc->client_state_private;
6085 Display *const dpy = gc->currentDpy;
6086 #ifndef USE_XCB
6087 const GLuint cmdlen = 16;
6088 #endif
6089 if (__builtin_expect(dpy != NULL, 1)) {
6090 #ifdef USE_XCB
6091 xcb_connection_t *c = XGetXCBConnection(dpy);
6092 (void) __glXFlushRenderBuffer(gc, gc->pc);
6093 xcb_glx_get_convolution_filter_reply_t *reply =
6094 xcb_glx_get_convolution_filter_reply(c,
6095 xcb_glx_get_convolution_filter
6096 (c, gc->currentContextTag,
6097 target, format, type,
6098 state->storePack.
6099 swapEndian), NULL);
6100 (void) memcpy(image, xcb_glx_get_convolution_filter_data(reply),
6101 xcb_glx_get_convolution_filter_data_length(reply) *
6102 sizeof(GLvoid));
6103 free(reply);
6104 #else
6105 GLubyte const *pc =
6106 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen);
6107 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6108 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6109 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6110 *(int32_t *) (pc + 12) = 0;
6111 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6112 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6113 GL_TRUE);
6114 UnlockDisplay(dpy);
6115 SyncHandle();
6116 #endif /* USE_XCB */
6117 }
6118 return;
6119 }
6120
6121 #define X_GLvop_GetConvolutionFilterEXT 1
6122 void
6123 gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
6124 GLvoid * image)
6125 {
6126 struct glx_context *const gc = __glXGetCurrentContext();
6127
6128 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6129 if (gc->driContext) {
6130 CALL_GetConvolutionFilter(GET_DISPATCH(),
6131 (target, format, type, image));
6132 } else
6133 #endif
6134 {
6135 struct glx_context *const gc = __glXGetCurrentContext();
6136 const __GLXattribute *const state = gc->client_state_private;
6137 Display *const dpy = gc->currentDpy;
6138 const GLuint cmdlen = 16;
6139 if (__builtin_expect(dpy != NULL, 1)) {
6140 GLubyte const *pc =
6141 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6142 X_GLvop_GetConvolutionFilterEXT,
6143 cmdlen);
6144 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6145 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6146 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6147 *(int32_t *) (pc + 12) = 0;
6148 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6149 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image,
6150 GL_TRUE);
6151 UnlockDisplay(dpy);
6152 SyncHandle();
6153 }
6154 return;
6155 }
6156 }
6157
6158 #define X_GLsop_GetConvolutionParameterfv 151
6159 void
6160 __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
6161 GLfloat * params)
6162 {
6163 struct glx_context *const gc = __glXGetCurrentContext();
6164 Display *const dpy = gc->currentDpy;
6165 #ifndef USE_XCB
6166 const GLuint cmdlen = 8;
6167 #endif
6168 if (__builtin_expect(dpy != NULL, 1)) {
6169 #ifdef USE_XCB
6170 xcb_connection_t *c = XGetXCBConnection(dpy);
6171 (void) __glXFlushRenderBuffer(gc, gc->pc);
6172 xcb_glx_get_convolution_parameterfv_reply_t *reply =
6173 xcb_glx_get_convolution_parameterfv_reply(c,
6174 xcb_glx_get_convolution_parameterfv
6175 (c,
6176 gc->currentContextTag,
6177 target, pname), NULL);
6178 if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 0)
6179 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6180 else
6181 (void) memcpy(params,
6182 xcb_glx_get_convolution_parameterfv_data(reply),
6183 xcb_glx_get_convolution_parameterfv_data_length
6184 (reply) * sizeof(GLfloat));
6185 free(reply);
6186 #else
6187 GLubyte const *pc =
6188 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv,
6189 cmdlen);
6190 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6191 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6192 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6193 UnlockDisplay(dpy);
6194 SyncHandle();
6195 #endif /* USE_XCB */
6196 }
6197 return;
6198 }
6199
6200 #define X_GLvop_GetConvolutionParameterfvEXT 2
6201 void
6202 gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
6203 {
6204 struct glx_context *const gc = __glXGetCurrentContext();
6205
6206 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6207 if (gc->driContext) {
6208 CALL_GetConvolutionParameterfv(GET_DISPATCH(),
6209 (target, pname, params));
6210 } else
6211 #endif
6212 {
6213 struct glx_context *const gc = __glXGetCurrentContext();
6214 Display *const dpy = gc->currentDpy;
6215 const GLuint cmdlen = 8;
6216 if (__builtin_expect(dpy != NULL, 1)) {
6217 GLubyte const *pc =
6218 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6219 X_GLvop_GetConvolutionParameterfvEXT,
6220 cmdlen);
6221 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6222 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6223 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6224 UnlockDisplay(dpy);
6225 SyncHandle();
6226 }
6227 return;
6228 }
6229 }
6230
6231 #define X_GLsop_GetConvolutionParameteriv 152
6232 void
6233 __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
6234 GLint * params)
6235 {
6236 struct glx_context *const gc = __glXGetCurrentContext();
6237 Display *const dpy = gc->currentDpy;
6238 #ifndef USE_XCB
6239 const GLuint cmdlen = 8;
6240 #endif
6241 if (__builtin_expect(dpy != NULL, 1)) {
6242 #ifdef USE_XCB
6243 xcb_connection_t *c = XGetXCBConnection(dpy);
6244 (void) __glXFlushRenderBuffer(gc, gc->pc);
6245 xcb_glx_get_convolution_parameteriv_reply_t *reply =
6246 xcb_glx_get_convolution_parameteriv_reply(c,
6247 xcb_glx_get_convolution_parameteriv
6248 (c,
6249 gc->currentContextTag,
6250 target, pname), NULL);
6251 if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 0)
6252 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6253 else
6254 (void) memcpy(params,
6255 xcb_glx_get_convolution_parameteriv_data(reply),
6256 xcb_glx_get_convolution_parameteriv_data_length
6257 (reply) * sizeof(GLint));
6258 free(reply);
6259 #else
6260 GLubyte const *pc =
6261 __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv,
6262 cmdlen);
6263 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6264 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6265 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6266 UnlockDisplay(dpy);
6267 SyncHandle();
6268 #endif /* USE_XCB */
6269 }
6270 return;
6271 }
6272
6273 #define X_GLvop_GetConvolutionParameterivEXT 3
6274 void
6275 gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
6276 {
6277 struct glx_context *const gc = __glXGetCurrentContext();
6278
6279 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6280 if (gc->driContext) {
6281 CALL_GetConvolutionParameteriv(GET_DISPATCH(),
6282 (target, pname, params));
6283 } else
6284 #endif
6285 {
6286 struct glx_context *const gc = __glXGetCurrentContext();
6287 Display *const dpy = gc->currentDpy;
6288 const GLuint cmdlen = 8;
6289 if (__builtin_expect(dpy != NULL, 1)) {
6290 GLubyte const *pc =
6291 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6292 X_GLvop_GetConvolutionParameterivEXT,
6293 cmdlen);
6294 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6295 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6296 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6297 UnlockDisplay(dpy);
6298 SyncHandle();
6299 }
6300 return;
6301 }
6302 }
6303
6304 #define X_GLsop_GetHistogram 154
6305 void
6306 __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
6307 GLenum type, GLvoid * values)
6308 {
6309 struct glx_context *const gc = __glXGetCurrentContext();
6310 const __GLXattribute *const state = gc->client_state_private;
6311 Display *const dpy = gc->currentDpy;
6312 #ifndef USE_XCB
6313 const GLuint cmdlen = 16;
6314 #endif
6315 if (__builtin_expect(dpy != NULL, 1)) {
6316 #ifdef USE_XCB
6317 xcb_connection_t *c = XGetXCBConnection(dpy);
6318 (void) __glXFlushRenderBuffer(gc, gc->pc);
6319 xcb_glx_get_histogram_reply_t *reply =
6320 xcb_glx_get_histogram_reply(c,
6321 xcb_glx_get_histogram(c,
6322 gc->
6323 currentContextTag,
6324 target, reset,
6325 format, type,
6326 state->
6327 storePack.
6328 swapEndian),
6329 NULL);
6330 (void) memcpy(values, xcb_glx_get_histogram_data(reply),
6331 xcb_glx_get_histogram_data_length(reply) *
6332 sizeof(GLvoid));
6333 free(reply);
6334 #else
6335 GLubyte const *pc =
6336 __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen);
6337 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6338 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6339 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6340 *(int32_t *) (pc + 12) = 0;
6341 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6342 *(int8_t *) (pc + 13) = reset;
6343 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6344 GL_TRUE);
6345 UnlockDisplay(dpy);
6346 SyncHandle();
6347 #endif /* USE_XCB */
6348 }
6349 return;
6350 }
6351
6352 #define X_GLvop_GetHistogramEXT 5
6353 void
6354 gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
6355 GLenum type, GLvoid * values)
6356 {
6357 struct glx_context *const gc = __glXGetCurrentContext();
6358
6359 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6360 if (gc->driContext) {
6361 CALL_GetHistogram(GET_DISPATCH(),
6362 (target, reset, format, type, values));
6363 } else
6364 #endif
6365 {
6366 struct glx_context *const gc = __glXGetCurrentContext();
6367 const __GLXattribute *const state = gc->client_state_private;
6368 Display *const dpy = gc->currentDpy;
6369 const GLuint cmdlen = 16;
6370 if (__builtin_expect(dpy != NULL, 1)) {
6371 GLubyte const *pc =
6372 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6373 X_GLvop_GetHistogramEXT, cmdlen);
6374 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6375 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6376 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6377 *(int32_t *) (pc + 12) = 0;
6378 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6379 *(int8_t *) (pc + 13) = reset;
6380 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
6381 GL_TRUE);
6382 UnlockDisplay(dpy);
6383 SyncHandle();
6384 }
6385 return;
6386 }
6387 }
6388
6389 #define X_GLsop_GetHistogramParameterfv 155
6390 void
6391 __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
6392 GLfloat * params)
6393 {
6394 struct glx_context *const gc = __glXGetCurrentContext();
6395 Display *const dpy = gc->currentDpy;
6396 #ifndef USE_XCB
6397 const GLuint cmdlen = 8;
6398 #endif
6399 if (__builtin_expect(dpy != NULL, 1)) {
6400 #ifdef USE_XCB
6401 xcb_connection_t *c = XGetXCBConnection(dpy);
6402 (void) __glXFlushRenderBuffer(gc, gc->pc);
6403 xcb_glx_get_histogram_parameterfv_reply_t *reply =
6404 xcb_glx_get_histogram_parameterfv_reply(c,
6405 xcb_glx_get_histogram_parameterfv
6406 (c, gc->currentContextTag,
6407 target, pname), NULL);
6408 if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 0)
6409 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6410 else
6411 (void) memcpy(params,
6412 xcb_glx_get_histogram_parameterfv_data(reply),
6413 xcb_glx_get_histogram_parameterfv_data_length(reply)
6414 * sizeof(GLfloat));
6415 free(reply);
6416 #else
6417 GLubyte const *pc =
6418 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv,
6419 cmdlen);
6420 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6421 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6422 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6423 UnlockDisplay(dpy);
6424 SyncHandle();
6425 #endif /* USE_XCB */
6426 }
6427 return;
6428 }
6429
6430 #define X_GLvop_GetHistogramParameterfvEXT 6
6431 void
6432 gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
6433 {
6434 struct glx_context *const gc = __glXGetCurrentContext();
6435
6436 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6437 if (gc->driContext) {
6438 CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params));
6439 } else
6440 #endif
6441 {
6442 struct glx_context *const gc = __glXGetCurrentContext();
6443 Display *const dpy = gc->currentDpy;
6444 const GLuint cmdlen = 8;
6445 if (__builtin_expect(dpy != NULL, 1)) {
6446 GLubyte const *pc =
6447 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6448 X_GLvop_GetHistogramParameterfvEXT,
6449 cmdlen);
6450 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6451 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6452 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6453 UnlockDisplay(dpy);
6454 SyncHandle();
6455 }
6456 return;
6457 }
6458 }
6459
6460 #define X_GLsop_GetHistogramParameteriv 156
6461 void
6462 __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
6463 GLint * params)
6464 {
6465 struct glx_context *const gc = __glXGetCurrentContext();
6466 Display *const dpy = gc->currentDpy;
6467 #ifndef USE_XCB
6468 const GLuint cmdlen = 8;
6469 #endif
6470 if (__builtin_expect(dpy != NULL, 1)) {
6471 #ifdef USE_XCB
6472 xcb_connection_t *c = XGetXCBConnection(dpy);
6473 (void) __glXFlushRenderBuffer(gc, gc->pc);
6474 xcb_glx_get_histogram_parameteriv_reply_t *reply =
6475 xcb_glx_get_histogram_parameteriv_reply(c,
6476 xcb_glx_get_histogram_parameteriv
6477 (c, gc->currentContextTag,
6478 target, pname), NULL);
6479 if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 0)
6480 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6481 else
6482 (void) memcpy(params,
6483 xcb_glx_get_histogram_parameteriv_data(reply),
6484 xcb_glx_get_histogram_parameteriv_data_length(reply)
6485 * sizeof(GLint));
6486 free(reply);
6487 #else
6488 GLubyte const *pc =
6489 __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv,
6490 cmdlen);
6491 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6492 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6493 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6494 UnlockDisplay(dpy);
6495 SyncHandle();
6496 #endif /* USE_XCB */
6497 }
6498 return;
6499 }
6500
6501 #define X_GLvop_GetHistogramParameterivEXT 7
6502 void
6503 gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
6504 {
6505 struct glx_context *const gc = __glXGetCurrentContext();
6506
6507 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6508 if (gc->driContext) {
6509 CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params));
6510 } else
6511 #endif
6512 {
6513 struct glx_context *const gc = __glXGetCurrentContext();
6514 Display *const dpy = gc->currentDpy;
6515 const GLuint cmdlen = 8;
6516 if (__builtin_expect(dpy != NULL, 1)) {
6517 GLubyte const *pc =
6518 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6519 X_GLvop_GetHistogramParameterivEXT,
6520 cmdlen);
6521 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6522 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6523 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6524 UnlockDisplay(dpy);
6525 SyncHandle();
6526 }
6527 return;
6528 }
6529 }
6530
6531 #define X_GLsop_GetMinmax 157
6532 void
6533 __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
6534 GLenum type, GLvoid * values)
6535 {
6536 struct glx_context *const gc = __glXGetCurrentContext();
6537 const __GLXattribute *const state = gc->client_state_private;
6538 Display *const dpy = gc->currentDpy;
6539 #ifndef USE_XCB
6540 const GLuint cmdlen = 16;
6541 #endif
6542 if (__builtin_expect(dpy != NULL, 1)) {
6543 #ifdef USE_XCB
6544 xcb_connection_t *c = XGetXCBConnection(dpy);
6545 (void) __glXFlushRenderBuffer(gc, gc->pc);
6546 xcb_glx_get_minmax_reply_t *reply =
6547 xcb_glx_get_minmax_reply(c,
6548 xcb_glx_get_minmax(c,
6549 gc->currentContextTag,
6550 target, reset, format,
6551 type,
6552 state->storePack.
6553 swapEndian), NULL);
6554 (void) memcpy(values, xcb_glx_get_minmax_data(reply),
6555 xcb_glx_get_minmax_data_length(reply) * sizeof(GLvoid));
6556 free(reply);
6557 #else
6558 GLubyte const *pc =
6559 __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen);
6560 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6561 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6562 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6563 *(int32_t *) (pc + 12) = 0;
6564 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6565 *(int8_t *) (pc + 13) = reset;
6566 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6567 GL_FALSE);
6568 UnlockDisplay(dpy);
6569 SyncHandle();
6570 #endif /* USE_XCB */
6571 }
6572 return;
6573 }
6574
6575 #define X_GLvop_GetMinmaxEXT 8
6576 void
6577 gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
6578 GLenum type, GLvoid * values)
6579 {
6580 struct glx_context *const gc = __glXGetCurrentContext();
6581
6582 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6583 if (gc->driContext) {
6584 CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values));
6585 } else
6586 #endif
6587 {
6588 struct glx_context *const gc = __glXGetCurrentContext();
6589 const __GLXattribute *const state = gc->client_state_private;
6590 Display *const dpy = gc->currentDpy;
6591 const GLuint cmdlen = 16;
6592 if (__builtin_expect(dpy != NULL, 1)) {
6593 GLubyte const *pc =
6594 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6595 X_GLvop_GetMinmaxEXT, cmdlen);
6596 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6597 (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
6598 (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
6599 *(int32_t *) (pc + 12) = 0;
6600 *(int8_t *) (pc + 12) = state->storePack.swapEndian;
6601 *(int8_t *) (pc + 13) = reset;
6602 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
6603 GL_FALSE);
6604 UnlockDisplay(dpy);
6605 SyncHandle();
6606 }
6607 return;
6608 }
6609 }
6610
6611 #define X_GLsop_GetMinmaxParameterfv 158
6612 void
6613 __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
6614 GLfloat * params)
6615 {
6616 struct glx_context *const gc = __glXGetCurrentContext();
6617 Display *const dpy = gc->currentDpy;
6618 #ifndef USE_XCB
6619 const GLuint cmdlen = 8;
6620 #endif
6621 if (__builtin_expect(dpy != NULL, 1)) {
6622 #ifdef USE_XCB
6623 xcb_connection_t *c = XGetXCBConnection(dpy);
6624 (void) __glXFlushRenderBuffer(gc, gc->pc);
6625 xcb_glx_get_minmax_parameterfv_reply_t *reply =
6626 xcb_glx_get_minmax_parameterfv_reply(c,
6627 xcb_glx_get_minmax_parameterfv
6628 (c, gc->currentContextTag,
6629 target, pname), NULL);
6630 if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 0)
6631 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6632 else
6633 (void) memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply),
6634 xcb_glx_get_minmax_parameterfv_data_length(reply) *
6635 sizeof(GLfloat));
6636 free(reply);
6637 #else
6638 GLubyte const *pc =
6639 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen);
6640 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6641 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6642 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6643 UnlockDisplay(dpy);
6644 SyncHandle();
6645 #endif /* USE_XCB */
6646 }
6647 return;
6648 }
6649
6650 #define X_GLvop_GetMinmaxParameterfvEXT 9
6651 void
6652 gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
6653 {
6654 struct glx_context *const gc = __glXGetCurrentContext();
6655
6656 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6657 if (gc->driContext) {
6658 CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params));
6659 } else
6660 #endif
6661 {
6662 struct glx_context *const gc = __glXGetCurrentContext();
6663 Display *const dpy = gc->currentDpy;
6664 const GLuint cmdlen = 8;
6665 if (__builtin_expect(dpy != NULL, 1)) {
6666 GLubyte const *pc =
6667 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6668 X_GLvop_GetMinmaxParameterfvEXT,
6669 cmdlen);
6670 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6671 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6672 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6673 UnlockDisplay(dpy);
6674 SyncHandle();
6675 }
6676 return;
6677 }
6678 }
6679
6680 #define X_GLsop_GetMinmaxParameteriv 159
6681 void
6682 __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
6683 {
6684 struct glx_context *const gc = __glXGetCurrentContext();
6685 Display *const dpy = gc->currentDpy;
6686 #ifndef USE_XCB
6687 const GLuint cmdlen = 8;
6688 #endif
6689 if (__builtin_expect(dpy != NULL, 1)) {
6690 #ifdef USE_XCB
6691 xcb_connection_t *c = XGetXCBConnection(dpy);
6692 (void) __glXFlushRenderBuffer(gc, gc->pc);
6693 xcb_glx_get_minmax_parameteriv_reply_t *reply =
6694 xcb_glx_get_minmax_parameteriv_reply(c,
6695 xcb_glx_get_minmax_parameteriv
6696 (c, gc->currentContextTag,
6697 target, pname), NULL);
6698 if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 0)
6699 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
6700 else
6701 (void) memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply),
6702 xcb_glx_get_minmax_parameteriv_data_length(reply) *
6703 sizeof(GLint));
6704 free(reply);
6705 #else
6706 GLubyte const *pc =
6707 __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen);
6708 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6709 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6710 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6711 UnlockDisplay(dpy);
6712 SyncHandle();
6713 #endif /* USE_XCB */
6714 }
6715 return;
6716 }
6717
6718 #define X_GLvop_GetMinmaxParameterivEXT 10
6719 void
6720 gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
6721 {
6722 struct glx_context *const gc = __glXGetCurrentContext();
6723
6724 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
6725 if (gc->driContext) {
6726 CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params));
6727 } else
6728 #endif
6729 {
6730 struct glx_context *const gc = __glXGetCurrentContext();
6731 Display *const dpy = gc->currentDpy;
6732 const GLuint cmdlen = 8;
6733 if (__builtin_expect(dpy != NULL, 1)) {
6734 GLubyte const *pc =
6735 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
6736 X_GLvop_GetMinmaxParameterivEXT,
6737 cmdlen);
6738 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
6739 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
6740 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
6741 UnlockDisplay(dpy);
6742 SyncHandle();
6743 }
6744 return;
6745 }
6746 }
6747
6748 #define X_GLrop_Histogram 4110
6749 void
6750 __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
6751 GLboolean sink)
6752 {
6753 struct glx_context *const gc = __glXGetCurrentContext();
6754 const GLuint cmdlen = 20;
6755 emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
6756 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6757 (void) memcpy((void *) (gc->pc + 8), (void *) (&width), 4);
6758 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
6759 (void) memcpy((void *) (gc->pc + 16), (void *) (&sink), 1);
6760 gc->pc += cmdlen;
6761 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6762 (void) __glXFlushRenderBuffer(gc, gc->pc);
6763 }
6764 }
6765
6766 #define X_GLrop_Minmax 4111
6767 void
6768 __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
6769 {
6770 struct glx_context *const gc = __glXGetCurrentContext();
6771 const GLuint cmdlen = 16;
6772 emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
6773 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6774 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
6775 (void) memcpy((void *) (gc->pc + 12), (void *) (&sink), 1);
6776 gc->pc += cmdlen;
6777 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6778 (void) __glXFlushRenderBuffer(gc, gc->pc);
6779 }
6780 }
6781
6782 #define X_GLrop_ResetHistogram 4112
6783 void
6784 __indirect_glResetHistogram(GLenum target)
6785 {
6786 struct glx_context *const gc = __glXGetCurrentContext();
6787 const GLuint cmdlen = 8;
6788 emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
6789 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6790 gc->pc += cmdlen;
6791 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6792 (void) __glXFlushRenderBuffer(gc, gc->pc);
6793 }
6794 }
6795
6796 #define X_GLrop_ResetMinmax 4113
6797 void
6798 __indirect_glResetMinmax(GLenum target)
6799 {
6800 struct glx_context *const gc = __glXGetCurrentContext();
6801 const GLuint cmdlen = 8;
6802 emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
6803 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6804 gc->pc += cmdlen;
6805 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6806 (void) __glXFlushRenderBuffer(gc, gc->pc);
6807 }
6808 }
6809
6810 static void
6811 __glx_TexImage_3D4D(unsigned opcode, unsigned dim, GLenum target, GLint level,
6812 GLint internalformat, GLsizei width, GLsizei height,
6813 GLsizei depth, GLsizei extent, GLint border,
6814 GLenum format, GLenum type, const GLvoid * pixels)
6815 {
6816 struct glx_context *const gc = __glXGetCurrentContext();
6817 const GLuint compsize =
6818 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6819 target) : 0;
6820 const GLuint cmdlen = 84 + __GLX_PAD(compsize);
6821 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6822 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6823 if ((gc->pc + cmdlen) > gc->bufEnd) {
6824 (void) __glXFlushRenderBuffer(gc, gc->pc);
6825 }
6826 emit_header(gc->pc, opcode, cmdlen);
6827 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6828 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6829 (void) memcpy((void *) (gc->pc + 48), (void *) (&internalformat),
6830 4);
6831 (void) memcpy((void *) (gc->pc + 52), (void *) (&width), 4);
6832 (void) memcpy((void *) (gc->pc + 56), (void *) (&height), 4);
6833 (void) memcpy((void *) (gc->pc + 60), (void *) (&depth), 4);
6834 (void) memcpy((void *) (gc->pc + 64), (void *) (&extent), 4);
6835 (void) memcpy((void *) (gc->pc + 68), (void *) (&border), 4);
6836 (void) memcpy((void *) (gc->pc + 72), (void *) (&format), 4);
6837 (void) memcpy((void *) (gc->pc + 76), (void *) (&type), 4);
6838 (void) memcpy((void *) (gc->pc + 80),
6839 (void *) ((pixels == NULL) ? one : zero), 4);
6840 if (compsize > 0) {
6841 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6842 pixels, gc->pc + 84, gc->pc + 4);
6843 } else {
6844 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6845 default_pixel_store_4D_size);
6846 }
6847 gc->pc += cmdlen;
6848 if (gc->pc > gc->limit) {
6849 (void) __glXFlushRenderBuffer(gc, gc->pc);
6850 }
6851 } else {
6852 const GLint op = opcode;
6853 const GLuint cmdlenLarge = cmdlen + 4;
6854 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6855 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6856 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6857 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6858 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6859 (void) memcpy((void *) (pc + 52), (void *) (&internalformat), 4);
6860 (void) memcpy((void *) (pc + 56), (void *) (&width), 4);
6861 (void) memcpy((void *) (pc + 60), (void *) (&height), 4);
6862 (void) memcpy((void *) (pc + 64), (void *) (&depth), 4);
6863 (void) memcpy((void *) (pc + 68), (void *) (&extent), 4);
6864 (void) memcpy((void *) (pc + 72), (void *) (&border), 4);
6865 (void) memcpy((void *) (pc + 76), (void *) (&format), 4);
6866 (void) memcpy((void *) (pc + 80), (void *) (&type), 4);
6867 (void) memcpy((void *) (pc + 84), zero, 4);
6868 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6869 format, type, pixels, pc + 88, pc + 8);
6870 }
6871 }
6872 }
6873
6874 #define X_GLrop_TexImage3D 4114
6875 void
6876 __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat,
6877 GLsizei width, GLsizei height, GLsizei depth,
6878 GLint border, GLenum format, GLenum type,
6879 const GLvoid * pixels)
6880 {
6881 __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat,
6882 width, height, depth, 1, border, format, type,
6883 pixels);
6884 }
6885
6886 static void
6887 __glx_TexSubImage_3D4D(unsigned opcode, unsigned dim, GLenum target,
6888 GLint level, GLint xoffset, GLint yoffset,
6889 GLint zoffset, GLint woffset, GLsizei width,
6890 GLsizei height, GLsizei depth, GLsizei extent,
6891 GLenum format, GLenum type, const GLvoid * pixels)
6892 {
6893 struct glx_context *const gc = __glXGetCurrentContext();
6894 const GLuint compsize =
6895 (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
6896 target) : 0;
6897 const GLuint cmdlen = 92 + __GLX_PAD(compsize);
6898 if (__builtin_expect(gc->currentDpy != NULL, 1)) {
6899 if (cmdlen <= gc->maxSmallRenderCommandSize) {
6900 if ((gc->pc + cmdlen) > gc->bufEnd) {
6901 (void) __glXFlushRenderBuffer(gc, gc->pc);
6902 }
6903 emit_header(gc->pc, opcode, cmdlen);
6904 (void) memcpy((void *) (gc->pc + 40), (void *) (&target), 4);
6905 (void) memcpy((void *) (gc->pc + 44), (void *) (&level), 4);
6906 (void) memcpy((void *) (gc->pc + 48), (void *) (&xoffset), 4);
6907 (void) memcpy((void *) (gc->pc + 52), (void *) (&yoffset), 4);
6908 (void) memcpy((void *) (gc->pc + 56), (void *) (&zoffset), 4);
6909 (void) memcpy((void *) (gc->pc + 60), (void *) (&woffset), 4);
6910 (void) memcpy((void *) (gc->pc + 64), (void *) (&width), 4);
6911 (void) memcpy((void *) (gc->pc + 68), (void *) (&height), 4);
6912 (void) memcpy((void *) (gc->pc + 72), (void *) (&depth), 4);
6913 (void) memcpy((void *) (gc->pc + 76), (void *) (&extent), 4);
6914 (void) memcpy((void *) (gc->pc + 80), (void *) (&format), 4);
6915 (void) memcpy((void *) (gc->pc + 84), (void *) (&type), 4);
6916 (void) memset((void *) (gc->pc + 88), 0, 4);
6917 if (compsize > 0) {
6918 (*gc->fillImage) (gc, dim, width, height, depth, format, type,
6919 pixels, gc->pc + 92, gc->pc + 4);
6920 } else {
6921 (void) memcpy(gc->pc + 4, default_pixel_store_4D,
6922 default_pixel_store_4D_size);
6923 }
6924 gc->pc += cmdlen;
6925 if (gc->pc > gc->limit) {
6926 (void) __glXFlushRenderBuffer(gc, gc->pc);
6927 }
6928 } else {
6929 const GLint op = opcode;
6930 const GLuint cmdlenLarge = cmdlen + 4;
6931 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
6932 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
6933 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
6934 (void) memcpy((void *) (pc + 44), (void *) (&target), 4);
6935 (void) memcpy((void *) (pc + 48), (void *) (&level), 4);
6936 (void) memcpy((void *) (pc + 52), (void *) (&xoffset), 4);
6937 (void) memcpy((void *) (pc + 56), (void *) (&yoffset), 4);
6938 (void) memcpy((void *) (pc + 60), (void *) (&zoffset), 4);
6939 (void) memcpy((void *) (pc + 64), (void *) (&woffset), 4);
6940 (void) memcpy((void *) (pc + 68), (void *) (&width), 4);
6941 (void) memcpy((void *) (pc + 72), (void *) (&height), 4);
6942 (void) memcpy((void *) (pc + 76), (void *) (&depth), 4);
6943 (void) memcpy((void *) (pc + 80), (void *) (&extent), 4);
6944 (void) memcpy((void *) (pc + 84), (void *) (&format), 4);
6945 (void) memcpy((void *) (pc + 88), (void *) (&type), 4);
6946 (void) memset((void *) (pc + 92), 0, 4);
6947 __glXSendLargeImage(gc, compsize, dim, width, height, depth,
6948 format, type, pixels, pc + 96, pc + 8);
6949 }
6950 }
6951 }
6952
6953 #define X_GLrop_TexSubImage3D 4115
6954 void
6955 __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6956 GLint yoffset, GLint zoffset, GLsizei width,
6957 GLsizei height, GLsizei depth, GLenum format,
6958 GLenum type, const GLvoid * pixels)
6959 {
6960 __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset,
6961 yoffset, zoffset, 1, width, height, depth, 1,
6962 format, type, pixels);
6963 }
6964
6965 #define X_GLrop_CopyTexSubImage3D 4123
6966 void
6967 __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
6968 GLint yoffset, GLint zoffset, GLint x, GLint y,
6969 GLsizei width, GLsizei height)
6970 {
6971 struct glx_context *const gc = __glXGetCurrentContext();
6972 const GLuint cmdlen = 40;
6973 emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
6974 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
6975 (void) memcpy((void *) (gc->pc + 8), (void *) (&level), 4);
6976 (void) memcpy((void *) (gc->pc + 12), (void *) (&xoffset), 4);
6977 (void) memcpy((void *) (gc->pc + 16), (void *) (&yoffset), 4);
6978 (void) memcpy((void *) (gc->pc + 20), (void *) (&zoffset), 4);
6979 (void) memcpy((void *) (gc->pc + 24), (void *) (&x), 4);
6980 (void) memcpy((void *) (gc->pc + 28), (void *) (&y), 4);
6981 (void) memcpy((void *) (gc->pc + 32), (void *) (&width), 4);
6982 (void) memcpy((void *) (gc->pc + 36), (void *) (&height), 4);
6983 gc->pc += cmdlen;
6984 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6985 (void) __glXFlushRenderBuffer(gc, gc->pc);
6986 }
6987 }
6988
6989 #define X_GLrop_ActiveTextureARB 197
6990 void
6991 __indirect_glActiveTextureARB(GLenum texture)
6992 {
6993 struct glx_context *const gc = __glXGetCurrentContext();
6994 const GLuint cmdlen = 8;
6995 emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
6996 (void) memcpy((void *) (gc->pc + 4), (void *) (&texture), 4);
6997 gc->pc += cmdlen;
6998 if (__builtin_expect(gc->pc > gc->limit, 0)) {
6999 (void) __glXFlushRenderBuffer(gc, gc->pc);
7000 }
7001 }
7002
7003 #define X_GLrop_MultiTexCoord1dvARB 198
7004 void
7005 __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
7006 {
7007 struct glx_context *const gc = __glXGetCurrentContext();
7008 const GLuint cmdlen = 16;
7009 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
7010 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7011 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
7012 gc->pc += cmdlen;
7013 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7014 (void) __glXFlushRenderBuffer(gc, gc->pc);
7015 }
7016 }
7017
7018 #define X_GLrop_MultiTexCoord1dvARB 198
7019 void
7020 __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
7021 {
7022 struct glx_context *const gc = __glXGetCurrentContext();
7023 const GLuint cmdlen = 16;
7024 emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
7025 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 8);
7026 (void) memcpy((void *) (gc->pc + 12), (void *) (&target), 4);
7027 gc->pc += cmdlen;
7028 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7029 (void) __glXFlushRenderBuffer(gc, gc->pc);
7030 }
7031 }
7032
7033 #define X_GLrop_MultiTexCoord1fvARB 199
7034 void
7035 __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
7036 {
7037 struct glx_context *const gc = __glXGetCurrentContext();
7038 const GLuint cmdlen = 12;
7039 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
7040 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7041 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7042 gc->pc += cmdlen;
7043 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7044 (void) __glXFlushRenderBuffer(gc, gc->pc);
7045 }
7046 }
7047
7048 #define X_GLrop_MultiTexCoord1fvARB 199
7049 void
7050 __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
7051 {
7052 struct glx_context *const gc = __glXGetCurrentContext();
7053 const GLuint cmdlen = 12;
7054 emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
7055 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7056 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7057 gc->pc += cmdlen;
7058 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7059 (void) __glXFlushRenderBuffer(gc, gc->pc);
7060 }
7061 }
7062
7063 #define X_GLrop_MultiTexCoord1ivARB 200
7064 void
7065 __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
7066 {
7067 struct glx_context *const gc = __glXGetCurrentContext();
7068 const GLuint cmdlen = 12;
7069 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
7070 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7071 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7072 gc->pc += cmdlen;
7073 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7074 (void) __glXFlushRenderBuffer(gc, gc->pc);
7075 }
7076 }
7077
7078 #define X_GLrop_MultiTexCoord1ivARB 200
7079 void
7080 __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
7081 {
7082 struct glx_context *const gc = __glXGetCurrentContext();
7083 const GLuint cmdlen = 12;
7084 emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
7085 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7086 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7087 gc->pc += cmdlen;
7088 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7089 (void) __glXFlushRenderBuffer(gc, gc->pc);
7090 }
7091 }
7092
7093 #define X_GLrop_MultiTexCoord1svARB 201
7094 void
7095 __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
7096 {
7097 struct glx_context *const gc = __glXGetCurrentContext();
7098 const GLuint cmdlen = 12;
7099 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7100 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7101 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7102 gc->pc += cmdlen;
7103 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7104 (void) __glXFlushRenderBuffer(gc, gc->pc);
7105 }
7106 }
7107
7108 #define X_GLrop_MultiTexCoord1svARB 201
7109 void
7110 __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
7111 {
7112 struct glx_context *const gc = __glXGetCurrentContext();
7113 const GLuint cmdlen = 12;
7114 emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
7115 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7116 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7117 gc->pc += cmdlen;
7118 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7119 (void) __glXFlushRenderBuffer(gc, gc->pc);
7120 }
7121 }
7122
7123 #define X_GLrop_MultiTexCoord2dvARB 202
7124 void
7125 __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
7126 {
7127 struct glx_context *const gc = __glXGetCurrentContext();
7128 const GLuint cmdlen = 24;
7129 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7130 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7131 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7132 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
7133 gc->pc += cmdlen;
7134 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7135 (void) __glXFlushRenderBuffer(gc, gc->pc);
7136 }
7137 }
7138
7139 #define X_GLrop_MultiTexCoord2dvARB 202
7140 void
7141 __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
7142 {
7143 struct glx_context *const gc = __glXGetCurrentContext();
7144 const GLuint cmdlen = 24;
7145 emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
7146 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 16);
7147 (void) memcpy((void *) (gc->pc + 20), (void *) (&target), 4);
7148 gc->pc += cmdlen;
7149 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7150 (void) __glXFlushRenderBuffer(gc, gc->pc);
7151 }
7152 }
7153
7154 #define X_GLrop_MultiTexCoord2fvARB 203
7155 void
7156 __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
7157 {
7158 struct glx_context *const gc = __glXGetCurrentContext();
7159 const GLuint cmdlen = 16;
7160 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7161 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7162 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7163 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7164 gc->pc += cmdlen;
7165 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7166 (void) __glXFlushRenderBuffer(gc, gc->pc);
7167 }
7168 }
7169
7170 #define X_GLrop_MultiTexCoord2fvARB 203
7171 void
7172 __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
7173 {
7174 struct glx_context *const gc = __glXGetCurrentContext();
7175 const GLuint cmdlen = 16;
7176 emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
7177 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7178 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7179 gc->pc += cmdlen;
7180 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7181 (void) __glXFlushRenderBuffer(gc, gc->pc);
7182 }
7183 }
7184
7185 #define X_GLrop_MultiTexCoord2ivARB 204
7186 void
7187 __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
7188 {
7189 struct glx_context *const gc = __glXGetCurrentContext();
7190 const GLuint cmdlen = 16;
7191 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7192 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7193 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7194 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7195 gc->pc += cmdlen;
7196 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7197 (void) __glXFlushRenderBuffer(gc, gc->pc);
7198 }
7199 }
7200
7201 #define X_GLrop_MultiTexCoord2ivARB 204
7202 void
7203 __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
7204 {
7205 struct glx_context *const gc = __glXGetCurrentContext();
7206 const GLuint cmdlen = 16;
7207 emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
7208 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7209 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7210 gc->pc += cmdlen;
7211 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7212 (void) __glXFlushRenderBuffer(gc, gc->pc);
7213 }
7214 }
7215
7216 #define X_GLrop_MultiTexCoord2svARB 205
7217 void
7218 __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
7219 {
7220 struct glx_context *const gc = __glXGetCurrentContext();
7221 const GLuint cmdlen = 12;
7222 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7223 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7224 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7225 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
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_MultiTexCoord2svARB 205
7233 void
7234 __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
7235 {
7236 struct glx_context *const gc = __glXGetCurrentContext();
7237 const GLuint cmdlen = 12;
7238 emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
7239 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7240 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
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_MultiTexCoord3dvARB 206
7248 void
7249 __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t,
7250 GLdouble r)
7251 {
7252 struct glx_context *const gc = __glXGetCurrentContext();
7253 const GLuint cmdlen = 32;
7254 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7255 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7256 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7257 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7258 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
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_MultiTexCoord3dvARB 206
7266 void
7267 __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
7268 {
7269 struct glx_context *const gc = __glXGetCurrentContext();
7270 const GLuint cmdlen = 32;
7271 emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
7272 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 24);
7273 (void) memcpy((void *) (gc->pc + 28), (void *) (&target), 4);
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_MultiTexCoord3fvARB 207
7281 void
7282 __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t,
7283 GLfloat r)
7284 {
7285 struct glx_context *const gc = __glXGetCurrentContext();
7286 const GLuint cmdlen = 20;
7287 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7288 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7289 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7290 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7291 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7292 gc->pc += cmdlen;
7293 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7294 (void) __glXFlushRenderBuffer(gc, gc->pc);
7295 }
7296 }
7297
7298 #define X_GLrop_MultiTexCoord3fvARB 207
7299 void
7300 __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
7301 {
7302 struct glx_context *const gc = __glXGetCurrentContext();
7303 const GLuint cmdlen = 20;
7304 emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
7305 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7306 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7307 gc->pc += cmdlen;
7308 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7309 (void) __glXFlushRenderBuffer(gc, gc->pc);
7310 }
7311 }
7312
7313 #define X_GLrop_MultiTexCoord3ivARB 208
7314 void
7315 __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
7316 {
7317 struct glx_context *const gc = __glXGetCurrentContext();
7318 const GLuint cmdlen = 20;
7319 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7320 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7321 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7322 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7323 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7324 gc->pc += cmdlen;
7325 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7326 (void) __glXFlushRenderBuffer(gc, gc->pc);
7327 }
7328 }
7329
7330 #define X_GLrop_MultiTexCoord3ivARB 208
7331 void
7332 __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
7333 {
7334 struct glx_context *const gc = __glXGetCurrentContext();
7335 const GLuint cmdlen = 20;
7336 emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
7337 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7338 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
7339 gc->pc += cmdlen;
7340 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7341 (void) __glXFlushRenderBuffer(gc, gc->pc);
7342 }
7343 }
7344
7345 #define X_GLrop_MultiTexCoord3svARB 209
7346 void
7347 __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t,
7348 GLshort r)
7349 {
7350 struct glx_context *const gc = __glXGetCurrentContext();
7351 const GLuint cmdlen = 16;
7352 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7353 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7354 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7355 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7356 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7357 gc->pc += cmdlen;
7358 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7359 (void) __glXFlushRenderBuffer(gc, gc->pc);
7360 }
7361 }
7362
7363 #define X_GLrop_MultiTexCoord3svARB 209
7364 void
7365 __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
7366 {
7367 struct glx_context *const gc = __glXGetCurrentContext();
7368 const GLuint cmdlen = 16;
7369 emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
7370 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7371 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
7372 gc->pc += cmdlen;
7373 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7374 (void) __glXFlushRenderBuffer(gc, gc->pc);
7375 }
7376 }
7377
7378 #define X_GLrop_MultiTexCoord4dvARB 210
7379 void
7380 __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t,
7381 GLdouble r, GLdouble q)
7382 {
7383 struct glx_context *const gc = __glXGetCurrentContext();
7384 const GLuint cmdlen = 40;
7385 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7386 (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
7387 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 8);
7388 (void) memcpy((void *) (gc->pc + 20), (void *) (&r), 8);
7389 (void) memcpy((void *) (gc->pc + 28), (void *) (&q), 8);
7390 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7391 gc->pc += cmdlen;
7392 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7393 (void) __glXFlushRenderBuffer(gc, gc->pc);
7394 }
7395 }
7396
7397 #define X_GLrop_MultiTexCoord4dvARB 210
7398 void
7399 __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
7400 {
7401 struct glx_context *const gc = __glXGetCurrentContext();
7402 const GLuint cmdlen = 40;
7403 emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
7404 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
7405 (void) memcpy((void *) (gc->pc + 36), (void *) (&target), 4);
7406 gc->pc += cmdlen;
7407 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7408 (void) __glXFlushRenderBuffer(gc, gc->pc);
7409 }
7410 }
7411
7412 #define X_GLrop_MultiTexCoord4fvARB 211
7413 void
7414 __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t,
7415 GLfloat r, GLfloat q)
7416 {
7417 struct glx_context *const gc = __glXGetCurrentContext();
7418 const GLuint cmdlen = 24;
7419 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7420 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7421 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7422 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7423 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7424 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
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_GLrop_MultiTexCoord4fvARB 211
7432 void
7433 __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
7434 {
7435 struct glx_context *const gc = __glXGetCurrentContext();
7436 const GLuint cmdlen = 24;
7437 emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
7438 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7439 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7440 gc->pc += cmdlen;
7441 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7442 (void) __glXFlushRenderBuffer(gc, gc->pc);
7443 }
7444 }
7445
7446 #define X_GLrop_MultiTexCoord4ivARB 212
7447 void
7448 __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r,
7449 GLint q)
7450 {
7451 struct glx_context *const gc = __glXGetCurrentContext();
7452 const GLuint cmdlen = 24;
7453 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7454 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7455 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 4);
7456 (void) memcpy((void *) (gc->pc + 12), (void *) (&t), 4);
7457 (void) memcpy((void *) (gc->pc + 16), (void *) (&r), 4);
7458 (void) memcpy((void *) (gc->pc + 20), (void *) (&q), 4);
7459 gc->pc += cmdlen;
7460 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7461 (void) __glXFlushRenderBuffer(gc, gc->pc);
7462 }
7463 }
7464
7465 #define X_GLrop_MultiTexCoord4ivARB 212
7466 void
7467 __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
7468 {
7469 struct glx_context *const gc = __glXGetCurrentContext();
7470 const GLuint cmdlen = 24;
7471 emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
7472 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7473 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7474 gc->pc += cmdlen;
7475 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7476 (void) __glXFlushRenderBuffer(gc, gc->pc);
7477 }
7478 }
7479
7480 #define X_GLrop_MultiTexCoord4svARB 213
7481 void
7482 __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t,
7483 GLshort r, GLshort q)
7484 {
7485 struct glx_context *const gc = __glXGetCurrentContext();
7486 const GLuint cmdlen = 16;
7487 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7488 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7489 (void) memcpy((void *) (gc->pc + 8), (void *) (&s), 2);
7490 (void) memcpy((void *) (gc->pc + 10), (void *) (&t), 2);
7491 (void) memcpy((void *) (gc->pc + 12), (void *) (&r), 2);
7492 (void) memcpy((void *) (gc->pc + 14), (void *) (&q), 2);
7493 gc->pc += cmdlen;
7494 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7495 (void) __glXFlushRenderBuffer(gc, gc->pc);
7496 }
7497 }
7498
7499 #define X_GLrop_MultiTexCoord4svARB 213
7500 void
7501 __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
7502 {
7503 struct glx_context *const gc = __glXGetCurrentContext();
7504 const GLuint cmdlen = 16;
7505 emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
7506 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7507 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7508 gc->pc += cmdlen;
7509 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7510 (void) __glXFlushRenderBuffer(gc, gc->pc);
7511 }
7512 }
7513
7514 #define X_GLrop_SampleCoverageARB 229
7515 void
7516 __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
7517 {
7518 struct glx_context *const gc = __glXGetCurrentContext();
7519 const GLuint cmdlen = 12;
7520 emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen);
7521 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
7522 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
7523 gc->pc += cmdlen;
7524 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7525 (void) __glXFlushRenderBuffer(gc, gc->pc);
7526 }
7527 }
7528
7529 #define X_GLvop_GetProgramStringARB 1308
7530 void
7531 __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
7532 {
7533 struct glx_context *const gc = __glXGetCurrentContext();
7534 Display *const dpy = gc->currentDpy;
7535 const GLuint cmdlen = 8;
7536 if (__builtin_expect(dpy != NULL, 1)) {
7537 GLubyte const *pc =
7538 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7539 X_GLvop_GetProgramStringARB, cmdlen);
7540 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7541 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7542 (void) __glXReadReply(dpy, 1, string, GL_TRUE);
7543 UnlockDisplay(dpy);
7544 SyncHandle();
7545 }
7546 return;
7547 }
7548
7549 #define X_GLvop_GetProgramivARB 1307
7550 void
7551 __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
7552 {
7553 struct glx_context *const gc = __glXGetCurrentContext();
7554 Display *const dpy = gc->currentDpy;
7555 const GLuint cmdlen = 8;
7556 if (__builtin_expect(dpy != NULL, 1)) {
7557 GLubyte const *pc =
7558 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
7559 X_GLvop_GetProgramivARB, cmdlen);
7560 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
7561 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
7562 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
7563 UnlockDisplay(dpy);
7564 SyncHandle();
7565 }
7566 return;
7567 }
7568
7569 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7570 void
7571 __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x,
7572 GLdouble y, GLdouble z, GLdouble w)
7573 {
7574 struct glx_context *const gc = __glXGetCurrentContext();
7575 const GLuint cmdlen = 44;
7576 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7577 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7578 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7579 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7580 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7581 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7582 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7583 gc->pc += cmdlen;
7584 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7585 (void) __glXFlushRenderBuffer(gc, gc->pc);
7586 }
7587 }
7588
7589 #define X_GLrop_ProgramEnvParameter4dvARB 4185
7590 void
7591 __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index,
7592 const GLdouble * params)
7593 {
7594 struct glx_context *const gc = __glXGetCurrentContext();
7595 const GLuint cmdlen = 44;
7596 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
7597 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7598 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7599 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7600 gc->pc += cmdlen;
7601 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7602 (void) __glXFlushRenderBuffer(gc, gc->pc);
7603 }
7604 }
7605
7606 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7607 void
7608 __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x,
7609 GLfloat y, GLfloat z, GLfloat w)
7610 {
7611 struct glx_context *const gc = __glXGetCurrentContext();
7612 const GLuint cmdlen = 28;
7613 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7614 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7615 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7616 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7617 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7618 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7619 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7620 gc->pc += cmdlen;
7621 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7622 (void) __glXFlushRenderBuffer(gc, gc->pc);
7623 }
7624 }
7625
7626 #define X_GLrop_ProgramEnvParameter4fvARB 4184
7627 void
7628 __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index,
7629 const GLfloat * params)
7630 {
7631 struct glx_context *const gc = __glXGetCurrentContext();
7632 const GLuint cmdlen = 28;
7633 emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
7634 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7635 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7636 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7637 gc->pc += cmdlen;
7638 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7639 (void) __glXFlushRenderBuffer(gc, gc->pc);
7640 }
7641 }
7642
7643 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7644 void
7645 __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index,
7646 GLdouble x, GLdouble y, GLdouble z,
7647 GLdouble w)
7648 {
7649 struct glx_context *const gc = __glXGetCurrentContext();
7650 const GLuint cmdlen = 44;
7651 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7652 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7653 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7654 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 8);
7655 (void) memcpy((void *) (gc->pc + 20), (void *) (&y), 8);
7656 (void) memcpy((void *) (gc->pc + 28), (void *) (&z), 8);
7657 (void) memcpy((void *) (gc->pc + 36), (void *) (&w), 8);
7658 gc->pc += cmdlen;
7659 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7660 (void) __glXFlushRenderBuffer(gc, gc->pc);
7661 }
7662 }
7663
7664 #define X_GLrop_ProgramLocalParameter4dvARB 4216
7665 void
7666 __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index,
7667 const GLdouble * params)
7668 {
7669 struct glx_context *const gc = __glXGetCurrentContext();
7670 const GLuint cmdlen = 44;
7671 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
7672 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7673 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7674 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 32);
7675 gc->pc += cmdlen;
7676 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7677 (void) __glXFlushRenderBuffer(gc, gc->pc);
7678 }
7679 }
7680
7681 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7682 void
7683 __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index,
7684 GLfloat x, GLfloat y, GLfloat z,
7685 GLfloat w)
7686 {
7687 struct glx_context *const gc = __glXGetCurrentContext();
7688 const GLuint cmdlen = 28;
7689 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7690 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7691 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7692 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
7693 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
7694 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
7695 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
7696 gc->pc += cmdlen;
7697 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7698 (void) __glXFlushRenderBuffer(gc, gc->pc);
7699 }
7700 }
7701
7702 #define X_GLrop_ProgramLocalParameter4fvARB 4215
7703 void
7704 __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index,
7705 const GLfloat * params)
7706 {
7707 struct glx_context *const gc = __glXGetCurrentContext();
7708 const GLuint cmdlen = 28;
7709 emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
7710 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7711 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
7712 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
7713 gc->pc += cmdlen;
7714 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7715 (void) __glXFlushRenderBuffer(gc, gc->pc);
7716 }
7717 }
7718
7719 #define X_GLrop_ProgramStringARB 4217
7720 void
7721 __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len,
7722 const GLvoid * string)
7723 {
7724 struct glx_context *const gc = __glXGetCurrentContext();
7725 const GLuint cmdlen = 16 + __GLX_PAD(len);
7726 if (len < 0) {
7727 __glXSetError(gc, GL_INVALID_VALUE);
7728 return;
7729 }
7730 if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
7731 if (cmdlen <= gc->maxSmallRenderCommandSize) {
7732 if ((gc->pc + cmdlen) > gc->bufEnd) {
7733 (void) __glXFlushRenderBuffer(gc, gc->pc);
7734 }
7735 emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen);
7736 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
7737 (void) memcpy((void *) (gc->pc + 8), (void *) (&format), 4);
7738 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
7739 (void) memcpy((void *) (gc->pc + 16), (void *) (string), len);
7740 gc->pc += cmdlen;
7741 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7742 (void) __glXFlushRenderBuffer(gc, gc->pc);
7743 }
7744 } else {
7745 const GLint op = X_GLrop_ProgramStringARB;
7746 const GLuint cmdlenLarge = cmdlen + 4;
7747 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
7748 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
7749 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
7750 (void) memcpy((void *) (pc + 8), (void *) (&target), 4);
7751 (void) memcpy((void *) (pc + 12), (void *) (&format), 4);
7752 (void) memcpy((void *) (pc + 16), (void *) (&len), 4);
7753 __glXSendLargeCommand(gc, pc, 20, string, len);
7754 }
7755 }
7756 }
7757
7758 #define X_GLrop_VertexAttrib1dvARB 4197
7759 void
7760 __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
7761 {
7762 struct glx_context *const gc = __glXGetCurrentContext();
7763 const GLuint cmdlen = 16;
7764 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7765 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7766 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7767 gc->pc += cmdlen;
7768 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7769 (void) __glXFlushRenderBuffer(gc, gc->pc);
7770 }
7771 }
7772
7773 #define X_GLrop_VertexAttrib1dvARB 4197
7774 void
7775 __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
7776 {
7777 struct glx_context *const gc = __glXGetCurrentContext();
7778 const GLuint cmdlen = 16;
7779 emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
7780 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7781 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7782 gc->pc += cmdlen;
7783 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7784 (void) __glXFlushRenderBuffer(gc, gc->pc);
7785 }
7786 }
7787
7788 #define X_GLrop_VertexAttrib1fvARB 4193
7789 void
7790 __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
7791 {
7792 struct glx_context *const gc = __glXGetCurrentContext();
7793 const GLuint cmdlen = 12;
7794 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7795 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7796 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7797 gc->pc += cmdlen;
7798 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7799 (void) __glXFlushRenderBuffer(gc, gc->pc);
7800 }
7801 }
7802
7803 #define X_GLrop_VertexAttrib1fvARB 4193
7804 void
7805 __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
7806 {
7807 struct glx_context *const gc = __glXGetCurrentContext();
7808 const GLuint cmdlen = 12;
7809 emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
7810 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7811 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
7812 gc->pc += cmdlen;
7813 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7814 (void) __glXFlushRenderBuffer(gc, gc->pc);
7815 }
7816 }
7817
7818 #define X_GLrop_VertexAttrib1svARB 4189
7819 void
7820 __indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
7821 {
7822 struct glx_context *const gc = __glXGetCurrentContext();
7823 const GLuint cmdlen = 12;
7824 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7825 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7826 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7827 gc->pc += cmdlen;
7828 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7829 (void) __glXFlushRenderBuffer(gc, gc->pc);
7830 }
7831 }
7832
7833 #define X_GLrop_VertexAttrib1svARB 4189
7834 void
7835 __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
7836 {
7837 struct glx_context *const gc = __glXGetCurrentContext();
7838 const GLuint cmdlen = 12;
7839 emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
7840 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7841 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
7842 gc->pc += cmdlen;
7843 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7844 (void) __glXFlushRenderBuffer(gc, gc->pc);
7845 }
7846 }
7847
7848 #define X_GLrop_VertexAttrib2dvARB 4198
7849 void
7850 __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
7851 {
7852 struct glx_context *const gc = __glXGetCurrentContext();
7853 const GLuint cmdlen = 24;
7854 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7855 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7856 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7857 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
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_VertexAttrib2dvARB 4198
7865 void
7866 __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
7867 {
7868 struct glx_context *const gc = __glXGetCurrentContext();
7869 const GLuint cmdlen = 24;
7870 emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
7871 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7872 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
7873 gc->pc += cmdlen;
7874 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7875 (void) __glXFlushRenderBuffer(gc, gc->pc);
7876 }
7877 }
7878
7879 #define X_GLrop_VertexAttrib2fvARB 4194
7880 void
7881 __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
7882 {
7883 struct glx_context *const gc = __glXGetCurrentContext();
7884 const GLuint cmdlen = 16;
7885 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7886 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7887 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7888 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7889 gc->pc += cmdlen;
7890 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7891 (void) __glXFlushRenderBuffer(gc, gc->pc);
7892 }
7893 }
7894
7895 #define X_GLrop_VertexAttrib2fvARB 4194
7896 void
7897 __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
7898 {
7899 struct glx_context *const gc = __glXGetCurrentContext();
7900 const GLuint cmdlen = 16;
7901 emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
7902 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7903 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
7904 gc->pc += cmdlen;
7905 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7906 (void) __glXFlushRenderBuffer(gc, gc->pc);
7907 }
7908 }
7909
7910 #define X_GLrop_VertexAttrib2svARB 4190
7911 void
7912 __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
7913 {
7914 struct glx_context *const gc = __glXGetCurrentContext();
7915 const GLuint cmdlen = 12;
7916 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7917 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7918 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
7919 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
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_VertexAttrib2svARB 4190
7927 void
7928 __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
7929 {
7930 struct glx_context *const gc = __glXGetCurrentContext();
7931 const GLuint cmdlen = 12;
7932 emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
7933 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7934 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
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_VertexAttrib3dvARB 4199
7942 void
7943 __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y,
7944 GLdouble z)
7945 {
7946 struct glx_context *const gc = __glXGetCurrentContext();
7947 const GLuint cmdlen = 32;
7948 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7949 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7950 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
7951 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
7952 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
7953 gc->pc += cmdlen;
7954 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7955 (void) __glXFlushRenderBuffer(gc, gc->pc);
7956 }
7957 }
7958
7959 #define X_GLrop_VertexAttrib3dvARB 4199
7960 void
7961 __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
7962 {
7963 struct glx_context *const gc = __glXGetCurrentContext();
7964 const GLuint cmdlen = 32;
7965 emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
7966 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7967 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
7968 gc->pc += cmdlen;
7969 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7970 (void) __glXFlushRenderBuffer(gc, gc->pc);
7971 }
7972 }
7973
7974 #define X_GLrop_VertexAttrib3fvARB 4195
7975 void
7976 __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
7977 {
7978 struct glx_context *const gc = __glXGetCurrentContext();
7979 const GLuint cmdlen = 20;
7980 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7981 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7982 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
7983 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
7984 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
7985 gc->pc += cmdlen;
7986 if (__builtin_expect(gc->pc > gc->limit, 0)) {
7987 (void) __glXFlushRenderBuffer(gc, gc->pc);
7988 }
7989 }
7990
7991 #define X_GLrop_VertexAttrib3fvARB 4195
7992 void
7993 __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
7994 {
7995 struct glx_context *const gc = __glXGetCurrentContext();
7996 const GLuint cmdlen = 20;
7997 emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
7998 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
7999 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
8000 gc->pc += cmdlen;
8001 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8002 (void) __glXFlushRenderBuffer(gc, gc->pc);
8003 }
8004 }
8005
8006 #define X_GLrop_VertexAttrib3svARB 4191
8007 void
8008 __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
8009 {
8010 struct glx_context *const gc = __glXGetCurrentContext();
8011 const GLuint cmdlen = 16;
8012 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
8013 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8014 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
8015 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
8016 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
8017 gc->pc += cmdlen;
8018 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8019 (void) __glXFlushRenderBuffer(gc, gc->pc);
8020 }
8021 }
8022
8023 #define X_GLrop_VertexAttrib3svARB 4191
8024 void
8025 __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
8026 {
8027 struct glx_context *const gc = __glXGetCurrentContext();
8028 const GLuint cmdlen = 16;
8029 emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
8030 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8031 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
8032 gc->pc += cmdlen;
8033 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8034 (void) __glXFlushRenderBuffer(gc, gc->pc);
8035 }
8036 }
8037
8038 #define X_GLrop_VertexAttrib4NbvARB 4235
8039 void
8040 __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte *v)
8041 {
8042 struct glx_context *const gc = __glXGetCurrentContext();
8043 const GLuint cmdlen = 12;
8044 emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
8045 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8046 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8047 gc->pc += cmdlen;
8048 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8049 (void) __glXFlushRenderBuffer(gc, gc->pc);
8050 }
8051 }
8052
8053 #define X_GLrop_VertexAttrib4NivARB 4237
8054 void
8055 __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
8056 {
8057 struct glx_context *const gc = __glXGetCurrentContext();
8058 const GLuint cmdlen = 24;
8059 emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
8060 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8061 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8062 gc->pc += cmdlen;
8063 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8064 (void) __glXFlushRenderBuffer(gc, gc->pc);
8065 }
8066 }
8067
8068 #define X_GLrop_VertexAttrib4NsvARB 4236
8069 void
8070 __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
8071 {
8072 struct glx_context *const gc = __glXGetCurrentContext();
8073 const GLuint cmdlen = 16;
8074 emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
8075 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8076 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8077 gc->pc += cmdlen;
8078 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8079 (void) __glXFlushRenderBuffer(gc, gc->pc);
8080 }
8081 }
8082
8083 #define X_GLrop_VertexAttrib4NubvARB 4201
8084 void
8085 __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
8086 GLubyte z, GLubyte w)
8087 {
8088 struct glx_context *const gc = __glXGetCurrentContext();
8089 const GLuint cmdlen = 12;
8090 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
8091 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8092 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
8093 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
8094 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
8095 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
8096 gc->pc += cmdlen;
8097 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8098 (void) __glXFlushRenderBuffer(gc, gc->pc);
8099 }
8100 }
8101
8102 #define X_GLrop_VertexAttrib4NubvARB 4201
8103 void
8104 __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte *v)
8105 {
8106 struct glx_context *const gc = __glXGetCurrentContext();
8107 const GLuint cmdlen = 12;
8108 emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
8109 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8110 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8111 gc->pc += cmdlen;
8112 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8113 (void) __glXFlushRenderBuffer(gc, gc->pc);
8114 }
8115 }
8116
8117 #define X_GLrop_VertexAttrib4NuivARB 4239
8118 void
8119 __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
8120 {
8121 struct glx_context *const gc = __glXGetCurrentContext();
8122 const GLuint cmdlen = 24;
8123 emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
8124 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8125 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8126 gc->pc += cmdlen;
8127 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8128 (void) __glXFlushRenderBuffer(gc, gc->pc);
8129 }
8130 }
8131
8132 #define X_GLrop_VertexAttrib4NusvARB 4238
8133 void
8134 __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
8135 {
8136 struct glx_context *const gc = __glXGetCurrentContext();
8137 const GLuint cmdlen = 16;
8138 emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
8139 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8140 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8141 gc->pc += cmdlen;
8142 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8143 (void) __glXFlushRenderBuffer(gc, gc->pc);
8144 }
8145 }
8146
8147 #define X_GLrop_VertexAttrib4bvARB 4230
8148 void
8149 __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte *v)
8150 {
8151 struct glx_context *const gc = __glXGetCurrentContext();
8152 const GLuint cmdlen = 12;
8153 emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
8154 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8155 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8156 gc->pc += cmdlen;
8157 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8158 (void) __glXFlushRenderBuffer(gc, gc->pc);
8159 }
8160 }
8161
8162 #define X_GLrop_VertexAttrib4dvARB 4200
8163 void
8164 __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y,
8165 GLdouble z, GLdouble w)
8166 {
8167 struct glx_context *const gc = __glXGetCurrentContext();
8168 const GLuint cmdlen = 40;
8169 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8170 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8171 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
8172 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
8173 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
8174 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
8175 gc->pc += cmdlen;
8176 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8177 (void) __glXFlushRenderBuffer(gc, gc->pc);
8178 }
8179 }
8180
8181 #define X_GLrop_VertexAttrib4dvARB 4200
8182 void
8183 __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
8184 {
8185 struct glx_context *const gc = __glXGetCurrentContext();
8186 const GLuint cmdlen = 40;
8187 emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
8188 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8189 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
8190 gc->pc += cmdlen;
8191 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8192 (void) __glXFlushRenderBuffer(gc, gc->pc);
8193 }
8194 }
8195
8196 #define X_GLrop_VertexAttrib4fvARB 4196
8197 void
8198 __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
8199 GLfloat w)
8200 {
8201 struct glx_context *const gc = __glXGetCurrentContext();
8202 const GLuint cmdlen = 24;
8203 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8204 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8205 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
8206 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
8207 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
8208 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
8209 gc->pc += cmdlen;
8210 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8211 (void) __glXFlushRenderBuffer(gc, gc->pc);
8212 }
8213 }
8214
8215 #define X_GLrop_VertexAttrib4fvARB 4196
8216 void
8217 __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
8218 {
8219 struct glx_context *const gc = __glXGetCurrentContext();
8220 const GLuint cmdlen = 24;
8221 emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
8222 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8223 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8224 gc->pc += cmdlen;
8225 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8226 (void) __glXFlushRenderBuffer(gc, gc->pc);
8227 }
8228 }
8229
8230 #define X_GLrop_VertexAttrib4ivARB 4231
8231 void
8232 __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
8233 {
8234 struct glx_context *const gc = __glXGetCurrentContext();
8235 const GLuint cmdlen = 24;
8236 emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
8237 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8238 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8239 gc->pc += cmdlen;
8240 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8241 (void) __glXFlushRenderBuffer(gc, gc->pc);
8242 }
8243 }
8244
8245 #define X_GLrop_VertexAttrib4svARB 4192
8246 void
8247 __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z,
8248 GLshort w)
8249 {
8250 struct glx_context *const gc = __glXGetCurrentContext();
8251 const GLuint cmdlen = 16;
8252 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8253 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8254 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
8255 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
8256 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
8257 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
8258 gc->pc += cmdlen;
8259 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8260 (void) __glXFlushRenderBuffer(gc, gc->pc);
8261 }
8262 }
8263
8264 #define X_GLrop_VertexAttrib4svARB 4192
8265 void
8266 __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
8267 {
8268 struct glx_context *const gc = __glXGetCurrentContext();
8269 const GLuint cmdlen = 16;
8270 emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
8271 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8272 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8273 gc->pc += cmdlen;
8274 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8275 (void) __glXFlushRenderBuffer(gc, gc->pc);
8276 }
8277 }
8278
8279 #define X_GLrop_VertexAttrib4ubvARB 4232
8280 void
8281 __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte *v)
8282 {
8283 struct glx_context *const gc = __glXGetCurrentContext();
8284 const GLuint cmdlen = 12;
8285 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
8286 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8287 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
8288 gc->pc += cmdlen;
8289 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8290 (void) __glXFlushRenderBuffer(gc, gc->pc);
8291 }
8292 }
8293
8294 #define X_GLrop_VertexAttrib4uivARB 4234
8295 void
8296 __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
8297 {
8298 struct glx_context *const gc = __glXGetCurrentContext();
8299 const GLuint cmdlen = 24;
8300 emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
8301 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8302 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
8303 gc->pc += cmdlen;
8304 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8305 (void) __glXFlushRenderBuffer(gc, gc->pc);
8306 }
8307 }
8308
8309 #define X_GLrop_VertexAttrib4usvARB 4233
8310 void
8311 __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
8312 {
8313 struct glx_context *const gc = __glXGetCurrentContext();
8314 const GLuint cmdlen = 16;
8315 emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
8316 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
8317 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
8318 gc->pc += cmdlen;
8319 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8320 (void) __glXFlushRenderBuffer(gc, gc->pc);
8321 }
8322 }
8323
8324 #define X_GLrop_BeginQueryARB 231
8325 void
8326 __indirect_glBeginQueryARB(GLenum target, GLuint id)
8327 {
8328 struct glx_context *const gc = __glXGetCurrentContext();
8329 const GLuint cmdlen = 12;
8330 emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
8331 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8332 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
8333 gc->pc += cmdlen;
8334 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8335 (void) __glXFlushRenderBuffer(gc, gc->pc);
8336 }
8337 }
8338
8339 #define X_GLsop_DeleteQueriesARB 161
8340 void
8341 __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
8342 {
8343 struct glx_context *const gc = __glXGetCurrentContext();
8344 Display *const dpy = gc->currentDpy;
8345 #ifndef USE_XCB
8346 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8347 #endif
8348 if (n < 0) {
8349 __glXSetError(gc, GL_INVALID_VALUE);
8350 return;
8351 }
8352 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8353 #ifdef USE_XCB
8354 xcb_connection_t *c = XGetXCBConnection(dpy);
8355 (void) __glXFlushRenderBuffer(gc, gc->pc);
8356 xcb_glx_delete_queries_arb(c, gc->currentContextTag, n, ids);
8357 #else
8358 GLubyte const *pc =
8359 __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
8360 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8361 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8362 UnlockDisplay(dpy);
8363 SyncHandle();
8364 #endif /* USE_XCB */
8365 }
8366 return;
8367 }
8368
8369 #define X_GLrop_EndQueryARB 232
8370 void
8371 __indirect_glEndQueryARB(GLenum target)
8372 {
8373 struct glx_context *const gc = __glXGetCurrentContext();
8374 const GLuint cmdlen = 8;
8375 emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
8376 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8377 gc->pc += cmdlen;
8378 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8379 (void) __glXFlushRenderBuffer(gc, gc->pc);
8380 }
8381 }
8382
8383 #define X_GLsop_GenQueriesARB 162
8384 void
8385 __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
8386 {
8387 struct glx_context *const gc = __glXGetCurrentContext();
8388 Display *const dpy = gc->currentDpy;
8389 #ifndef USE_XCB
8390 const GLuint cmdlen = 4;
8391 #endif
8392 if (n < 0) {
8393 __glXSetError(gc, GL_INVALID_VALUE);
8394 return;
8395 }
8396 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8397 #ifdef USE_XCB
8398 xcb_connection_t *c = XGetXCBConnection(dpy);
8399 (void) __glXFlushRenderBuffer(gc, gc->pc);
8400 xcb_glx_gen_queries_arb_reply_t *reply =
8401 xcb_glx_gen_queries_arb_reply(c,
8402 xcb_glx_gen_queries_arb(c,
8403 gc->
8404 currentContextTag,
8405 n), NULL);
8406 (void) memcpy(ids, xcb_glx_gen_queries_arb_data(reply),
8407 xcb_glx_gen_queries_arb_data_length(reply) *
8408 sizeof(GLuint));
8409 free(reply);
8410 #else
8411 GLubyte const *pc =
8412 __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
8413 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8414 (void) __glXReadReply(dpy, 4, ids, GL_TRUE);
8415 UnlockDisplay(dpy);
8416 SyncHandle();
8417 #endif /* USE_XCB */
8418 }
8419 return;
8420 }
8421
8422 #define X_GLsop_GetQueryObjectivARB 165
8423 void
8424 __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
8425 {
8426 struct glx_context *const gc = __glXGetCurrentContext();
8427 Display *const dpy = gc->currentDpy;
8428 #ifndef USE_XCB
8429 const GLuint cmdlen = 8;
8430 #endif
8431 if (__builtin_expect(dpy != NULL, 1)) {
8432 #ifdef USE_XCB
8433 xcb_connection_t *c = XGetXCBConnection(dpy);
8434 (void) __glXFlushRenderBuffer(gc, gc->pc);
8435 xcb_glx_get_query_objectiv_arb_reply_t *reply =
8436 xcb_glx_get_query_objectiv_arb_reply(c,
8437 xcb_glx_get_query_objectiv_arb
8438 (c, gc->currentContextTag,
8439 id, pname), NULL);
8440 if (xcb_glx_get_query_objectiv_arb_data_length(reply) == 0)
8441 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8442 else
8443 (void) memcpy(params, xcb_glx_get_query_objectiv_arb_data(reply),
8444 xcb_glx_get_query_objectiv_arb_data_length(reply) *
8445 sizeof(GLint));
8446 free(reply);
8447 #else
8448 GLubyte const *pc =
8449 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
8450 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8451 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8452 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8453 UnlockDisplay(dpy);
8454 SyncHandle();
8455 #endif /* USE_XCB */
8456 }
8457 return;
8458 }
8459
8460 #define X_GLsop_GetQueryObjectuivARB 166
8461 void
8462 __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
8463 {
8464 struct glx_context *const gc = __glXGetCurrentContext();
8465 Display *const dpy = gc->currentDpy;
8466 #ifndef USE_XCB
8467 const GLuint cmdlen = 8;
8468 #endif
8469 if (__builtin_expect(dpy != NULL, 1)) {
8470 #ifdef USE_XCB
8471 xcb_connection_t *c = XGetXCBConnection(dpy);
8472 (void) __glXFlushRenderBuffer(gc, gc->pc);
8473 xcb_glx_get_query_objectuiv_arb_reply_t *reply =
8474 xcb_glx_get_query_objectuiv_arb_reply(c,
8475 xcb_glx_get_query_objectuiv_arb
8476 (c, gc->currentContextTag,
8477 id, pname), NULL);
8478 if (xcb_glx_get_query_objectuiv_arb_data_length(reply) == 0)
8479 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8480 else
8481 (void) memcpy(params, xcb_glx_get_query_objectuiv_arb_data(reply),
8482 xcb_glx_get_query_objectuiv_arb_data_length(reply) *
8483 sizeof(GLuint));
8484 free(reply);
8485 #else
8486 GLubyte const *pc =
8487 __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
8488 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8489 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8490 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8491 UnlockDisplay(dpy);
8492 SyncHandle();
8493 #endif /* USE_XCB */
8494 }
8495 return;
8496 }
8497
8498 #define X_GLsop_GetQueryivARB 164
8499 void
8500 __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
8501 {
8502 struct glx_context *const gc = __glXGetCurrentContext();
8503 Display *const dpy = gc->currentDpy;
8504 #ifndef USE_XCB
8505 const GLuint cmdlen = 8;
8506 #endif
8507 if (__builtin_expect(dpy != NULL, 1)) {
8508 #ifdef USE_XCB
8509 xcb_connection_t *c = XGetXCBConnection(dpy);
8510 (void) __glXFlushRenderBuffer(gc, gc->pc);
8511 xcb_glx_get_queryiv_arb_reply_t *reply =
8512 xcb_glx_get_queryiv_arb_reply(c,
8513 xcb_glx_get_queryiv_arb(c,
8514 gc->
8515 currentContextTag,
8516 target,
8517 pname),
8518 NULL);
8519 if (xcb_glx_get_queryiv_arb_data_length(reply) == 0)
8520 (void) memcpy(params, &reply->datum, sizeof(reply->datum));
8521 else
8522 (void) memcpy(params, xcb_glx_get_queryiv_arb_data(reply),
8523 xcb_glx_get_queryiv_arb_data_length(reply) *
8524 sizeof(GLint));
8525 free(reply);
8526 #else
8527 GLubyte const *pc =
8528 __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen);
8529 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
8530 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
8531 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
8532 UnlockDisplay(dpy);
8533 SyncHandle();
8534 #endif /* USE_XCB */
8535 }
8536 return;
8537 }
8538
8539 #define X_GLsop_IsQueryARB 163
8540 GLboolean
8541 __indirect_glIsQueryARB(GLuint id)
8542 {
8543 struct glx_context *const gc = __glXGetCurrentContext();
8544 Display *const dpy = gc->currentDpy;
8545 GLboolean retval = (GLboolean) 0;
8546 #ifndef USE_XCB
8547 const GLuint cmdlen = 4;
8548 #endif
8549 if (__builtin_expect(dpy != NULL, 1)) {
8550 #ifdef USE_XCB
8551 xcb_connection_t *c = XGetXCBConnection(dpy);
8552 (void) __glXFlushRenderBuffer(gc, gc->pc);
8553 xcb_glx_is_query_arb_reply_t *reply =
8554 xcb_glx_is_query_arb_reply(c,
8555 xcb_glx_is_query_arb(c,
8556 gc->
8557 currentContextTag,
8558 id), NULL);
8559 retval = reply->ret_val;
8560 free(reply);
8561 #else
8562 GLubyte const *pc =
8563 __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
8564 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
8565 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
8566 UnlockDisplay(dpy);
8567 SyncHandle();
8568 #endif /* USE_XCB */
8569 }
8570 return retval;
8571 }
8572
8573 #define X_GLrop_DrawBuffersARB 233
8574 void
8575 __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
8576 {
8577 struct glx_context *const gc = __glXGetCurrentContext();
8578 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
8579 if (n < 0) {
8580 __glXSetError(gc, GL_INVALID_VALUE);
8581 return;
8582 }
8583 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
8584 if (cmdlen <= gc->maxSmallRenderCommandSize) {
8585 if ((gc->pc + cmdlen) > gc->bufEnd) {
8586 (void) __glXFlushRenderBuffer(gc, gc->pc);
8587 }
8588 emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
8589 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
8590 (void) memcpy((void *) (gc->pc + 8), (void *) (bufs), (n * 4));
8591 gc->pc += cmdlen;
8592 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8593 (void) __glXFlushRenderBuffer(gc, gc->pc);
8594 }
8595 } else {
8596 const GLint op = X_GLrop_DrawBuffersARB;
8597 const GLuint cmdlenLarge = cmdlen + 4;
8598 GLubyte *const pc = __glXFlushRenderBuffer(gc, gc->pc);
8599 (void) memcpy((void *) (pc + 0), (void *) (&cmdlenLarge), 4);
8600 (void) memcpy((void *) (pc + 4), (void *) (&op), 4);
8601 (void) memcpy((void *) (pc + 8), (void *) (&n), 4);
8602 __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
8603 }
8604 }
8605 }
8606
8607 #define X_GLrop_RenderbufferStorageMultisample 4331
8608 void
8609 __indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples,
8610 GLenum internalformat,
8611 GLsizei width, GLsizei height)
8612 {
8613 struct glx_context *const gc = __glXGetCurrentContext();
8614 const GLuint cmdlen = 24;
8615 emit_header(gc->pc, X_GLrop_RenderbufferStorageMultisample, cmdlen);
8616 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8617 (void) memcpy((void *) (gc->pc + 8), (void *) (&samples), 4);
8618 (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4);
8619 (void) memcpy((void *) (gc->pc + 16), (void *) (&width), 4);
8620 (void) memcpy((void *) (gc->pc + 20), (void *) (&height), 4);
8621 gc->pc += cmdlen;
8622 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8623 (void) __glXFlushRenderBuffer(gc, gc->pc);
8624 }
8625 }
8626
8627 #define X_GLrop_SampleMaskSGIS 2048
8628 void
8629 __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
8630 {
8631 struct glx_context *const gc = __glXGetCurrentContext();
8632 const GLuint cmdlen = 12;
8633 emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
8634 (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
8635 (void) memcpy((void *) (gc->pc + 8), (void *) (&invert), 1);
8636 gc->pc += cmdlen;
8637 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8638 (void) __glXFlushRenderBuffer(gc, gc->pc);
8639 }
8640 }
8641
8642 #define X_GLrop_SamplePatternSGIS 2049
8643 void
8644 __indirect_glSamplePatternSGIS(GLenum pattern)
8645 {
8646 struct glx_context *const gc = __glXGetCurrentContext();
8647 const GLuint cmdlen = 8;
8648 emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
8649 (void) memcpy((void *) (gc->pc + 4), (void *) (&pattern), 4);
8650 gc->pc += cmdlen;
8651 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8652 (void) __glXFlushRenderBuffer(gc, gc->pc);
8653 }
8654 }
8655
8656 #define X_GLrop_PointParameterfEXT 2065
8657 void
8658 __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
8659 {
8660 struct glx_context *const gc = __glXGetCurrentContext();
8661 const GLuint cmdlen = 12;
8662 emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
8663 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8664 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
8665 gc->pc += cmdlen;
8666 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8667 (void) __glXFlushRenderBuffer(gc, gc->pc);
8668 }
8669 }
8670
8671 #define X_GLrop_PointParameterfvEXT 2066
8672 void
8673 __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
8674 {
8675 struct glx_context *const gc = __glXGetCurrentContext();
8676 const GLuint compsize = __glPointParameterfvEXT_size(pname);
8677 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
8678 emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
8679 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
8680 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
8681 gc->pc += cmdlen;
8682 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8683 (void) __glXFlushRenderBuffer(gc, gc->pc);
8684 }
8685 }
8686
8687 #define X_GLrop_SecondaryColor3bvEXT 4126
8688 void
8689 __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
8690 {
8691 struct glx_context *const gc = __glXGetCurrentContext();
8692 const GLuint cmdlen = 8;
8693 emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
8694 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8695 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8696 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8697 gc->pc += cmdlen;
8698 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8699 (void) __glXFlushRenderBuffer(gc, gc->pc);
8700 }
8701 }
8702
8703 #define X_GLrop_SecondaryColor3bvEXT 4126
8704 void
8705 __indirect_glSecondaryColor3bvEXT(const GLbyte *v)
8706 {
8707 generic_3_byte(X_GLrop_SecondaryColor3bvEXT, v);
8708 }
8709
8710 #define X_GLrop_SecondaryColor3dvEXT 4130
8711 void
8712 __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
8713 {
8714 struct glx_context *const gc = __glXGetCurrentContext();
8715 const GLuint cmdlen = 28;
8716 emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
8717 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
8718 (void) memcpy((void *) (gc->pc + 12), (void *) (&green), 8);
8719 (void) memcpy((void *) (gc->pc + 20), (void *) (&blue), 8);
8720 gc->pc += cmdlen;
8721 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8722 (void) __glXFlushRenderBuffer(gc, gc->pc);
8723 }
8724 }
8725
8726 #define X_GLrop_SecondaryColor3dvEXT 4130
8727 void
8728 __indirect_glSecondaryColor3dvEXT(const GLdouble * v)
8729 {
8730 generic_24_byte(X_GLrop_SecondaryColor3dvEXT, v);
8731 }
8732
8733 #define X_GLrop_SecondaryColor3fvEXT 4129
8734 void
8735 __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
8736 {
8737 struct glx_context *const gc = __glXGetCurrentContext();
8738 const GLuint cmdlen = 16;
8739 emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
8740 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8741 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8742 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8743 gc->pc += cmdlen;
8744 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8745 (void) __glXFlushRenderBuffer(gc, gc->pc);
8746 }
8747 }
8748
8749 #define X_GLrop_SecondaryColor3fvEXT 4129
8750 void
8751 __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
8752 {
8753 generic_12_byte(X_GLrop_SecondaryColor3fvEXT, v);
8754 }
8755
8756 #define X_GLrop_SecondaryColor3ivEXT 4128
8757 void
8758 __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
8759 {
8760 struct glx_context *const gc = __glXGetCurrentContext();
8761 const GLuint cmdlen = 16;
8762 emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
8763 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8764 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8765 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
8766 gc->pc += cmdlen;
8767 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8768 (void) __glXFlushRenderBuffer(gc, gc->pc);
8769 }
8770 }
8771
8772 #define X_GLrop_SecondaryColor3ivEXT 4128
8773 void
8774 __indirect_glSecondaryColor3ivEXT(const GLint * v)
8775 {
8776 generic_12_byte(X_GLrop_SecondaryColor3ivEXT, v);
8777 }
8778
8779 #define X_GLrop_SecondaryColor3svEXT 4127
8780 void
8781 __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
8782 {
8783 struct glx_context *const gc = __glXGetCurrentContext();
8784 const GLuint cmdlen = 12;
8785 emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
8786 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8787 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8788 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8789 gc->pc += cmdlen;
8790 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8791 (void) __glXFlushRenderBuffer(gc, gc->pc);
8792 }
8793 }
8794
8795 #define X_GLrop_SecondaryColor3svEXT 4127
8796 void
8797 __indirect_glSecondaryColor3svEXT(const GLshort * v)
8798 {
8799 generic_6_byte(X_GLrop_SecondaryColor3svEXT, v);
8800 }
8801
8802 #define X_GLrop_SecondaryColor3ubvEXT 4131
8803 void
8804 __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
8805 {
8806 struct glx_context *const gc = __glXGetCurrentContext();
8807 const GLuint cmdlen = 8;
8808 emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
8809 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
8810 (void) memcpy((void *) (gc->pc + 5), (void *) (&green), 1);
8811 (void) memcpy((void *) (gc->pc + 6), (void *) (&blue), 1);
8812 gc->pc += cmdlen;
8813 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8814 (void) __glXFlushRenderBuffer(gc, gc->pc);
8815 }
8816 }
8817
8818 #define X_GLrop_SecondaryColor3ubvEXT 4131
8819 void
8820 __indirect_glSecondaryColor3ubvEXT(const GLubyte *v)
8821 {
8822 generic_3_byte(X_GLrop_SecondaryColor3ubvEXT, v);
8823 }
8824
8825 #define X_GLrop_SecondaryColor3uivEXT 4133
8826 void
8827 __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
8828 {
8829 struct glx_context *const gc = __glXGetCurrentContext();
8830 const GLuint cmdlen = 16;
8831 emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
8832 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
8833 (void) memcpy((void *) (gc->pc + 8), (void *) (&green), 4);
8834 (void) memcpy((void *) (gc->pc + 12), (void *) (&blue), 4);
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_GLrop_SecondaryColor3uivEXT 4133
8842 void
8843 __indirect_glSecondaryColor3uivEXT(const GLuint * v)
8844 {
8845 generic_12_byte(X_GLrop_SecondaryColor3uivEXT, v);
8846 }
8847
8848 #define X_GLrop_SecondaryColor3usvEXT 4132
8849 void
8850 __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
8851 {
8852 struct glx_context *const gc = __glXGetCurrentContext();
8853 const GLuint cmdlen = 12;
8854 emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
8855 (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
8856 (void) memcpy((void *) (gc->pc + 6), (void *) (&green), 2);
8857 (void) memcpy((void *) (gc->pc + 8), (void *) (&blue), 2);
8858 gc->pc += cmdlen;
8859 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8860 (void) __glXFlushRenderBuffer(gc, gc->pc);
8861 }
8862 }
8863
8864 #define X_GLrop_SecondaryColor3usvEXT 4132
8865 void
8866 __indirect_glSecondaryColor3usvEXT(const GLushort * v)
8867 {
8868 generic_6_byte(X_GLrop_SecondaryColor3usvEXT, v);
8869 }
8870
8871 #define X_GLrop_FogCoorddvEXT 4125
8872 void
8873 __indirect_glFogCoorddEXT(GLdouble coord)
8874 {
8875 struct glx_context *const gc = __glXGetCurrentContext();
8876 const GLuint cmdlen = 12;
8877 emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
8878 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 8);
8879 gc->pc += cmdlen;
8880 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8881 (void) __glXFlushRenderBuffer(gc, gc->pc);
8882 }
8883 }
8884
8885 #define X_GLrop_FogCoorddvEXT 4125
8886 void
8887 __indirect_glFogCoorddvEXT(const GLdouble * coord)
8888 {
8889 generic_8_byte(X_GLrop_FogCoorddvEXT, coord);
8890 }
8891
8892 #define X_GLrop_FogCoordfvEXT 4124
8893 void
8894 __indirect_glFogCoordfEXT(GLfloat coord)
8895 {
8896 struct glx_context *const gc = __glXGetCurrentContext();
8897 const GLuint cmdlen = 8;
8898 emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
8899 (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
8900 gc->pc += cmdlen;
8901 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8902 (void) __glXFlushRenderBuffer(gc, gc->pc);
8903 }
8904 }
8905
8906 #define X_GLrop_FogCoordfvEXT 4124
8907 void
8908 __indirect_glFogCoordfvEXT(const GLfloat * coord)
8909 {
8910 generic_4_byte(X_GLrop_FogCoordfvEXT, coord);
8911 }
8912
8913 #define X_GLrop_BlendFuncSeparateEXT 4134
8914 void
8915 __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
8916 GLenum sfactorAlpha, GLenum dfactorAlpha)
8917 {
8918 struct glx_context *const gc = __glXGetCurrentContext();
8919 const GLuint cmdlen = 20;
8920 emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
8921 (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactorRGB), 4);
8922 (void) memcpy((void *) (gc->pc + 8), (void *) (&dfactorRGB), 4);
8923 (void) memcpy((void *) (gc->pc + 12), (void *) (&sfactorAlpha), 4);
8924 (void) memcpy((void *) (gc->pc + 16), (void *) (&dfactorAlpha), 4);
8925 gc->pc += cmdlen;
8926 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8927 (void) __glXFlushRenderBuffer(gc, gc->pc);
8928 }
8929 }
8930
8931 #define X_GLrop_WindowPos3fvMESA 230
8932 void
8933 __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
8934 {
8935 struct glx_context *const gc = __glXGetCurrentContext();
8936 const GLuint cmdlen = 16;
8937 emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
8938 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
8939 (void) memcpy((void *) (gc->pc + 8), (void *) (&y), 4);
8940 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 4);
8941 gc->pc += cmdlen;
8942 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8943 (void) __glXFlushRenderBuffer(gc, gc->pc);
8944 }
8945 }
8946
8947 #define X_GLrop_WindowPos3fvMESA 230
8948 void
8949 __indirect_glWindowPos3fvMESA(const GLfloat * v)
8950 {
8951 generic_12_byte(X_GLrop_WindowPos3fvMESA, v);
8952 }
8953
8954 #define X_GLvop_AreProgramsResidentNV 1293
8955 GLboolean
8956 __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids,
8957 GLboolean * residences)
8958 {
8959 struct glx_context *const gc = __glXGetCurrentContext();
8960 Display *const dpy = gc->currentDpy;
8961 GLboolean retval = (GLboolean) 0;
8962 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
8963 if (n < 0) {
8964 __glXSetError(gc, GL_INVALID_VALUE);
8965 return 0;
8966 }
8967 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
8968 GLubyte const *pc =
8969 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
8970 X_GLvop_AreProgramsResidentNV, cmdlen);
8971 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
8972 (void) memcpy((void *) (pc + 4), (void *) (ids), (n * 4));
8973 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE);
8974 UnlockDisplay(dpy);
8975 SyncHandle();
8976 }
8977 return retval;
8978 }
8979
8980 #define X_GLrop_BindProgramNV 4180
8981 void
8982 __indirect_glBindProgramNV(GLenum target, GLuint program)
8983 {
8984 struct glx_context *const gc = __glXGetCurrentContext();
8985 const GLuint cmdlen = 12;
8986 emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
8987 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
8988 (void) memcpy((void *) (gc->pc + 8), (void *) (&program), 4);
8989 gc->pc += cmdlen;
8990 if (__builtin_expect(gc->pc > gc->limit, 0)) {
8991 (void) __glXFlushRenderBuffer(gc, gc->pc);
8992 }
8993 }
8994
8995 #define X_GLvop_DeleteProgramsNV 1294
8996 void
8997 __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
8998 {
8999 struct glx_context *const gc = __glXGetCurrentContext();
9000 Display *const dpy = gc->currentDpy;
9001 const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
9002 if (n < 0) {
9003 __glXSetError(gc, GL_INVALID_VALUE);
9004 return;
9005 }
9006 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
9007 GLubyte const *pc =
9008 __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
9009 X_GLvop_DeleteProgramsNV, cmdlen);
9010 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
9011 (void) memcpy((void *) (pc + 4), (void *) (programs), (n * 4));
9012 UnlockDisplay(dpy);
9013 SyncHandle();
9014 }
9015 return;
9016 }
9017
9018 #define X_GLrop_ExecuteProgramNV 4181
9019 void
9020 __indirect_glExecuteProgramNV(GLenum target, GLuint id,
9021 const GLfloat * params)
9022 {
9023 struct glx_context *const gc = __glXGetCurrentContext();
9024 const GLuint cmdlen = 28;
9025 emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
9026 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9027 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
9028 (void) memcpy((void *) (gc->pc + 12), (void *) (params), 16);
9029 gc->pc += cmdlen;
9030 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9031 (void) __glXFlushRenderBuffer(gc, gc->pc);
9032 }
9033 }
9034
9035 #define X_GLvop_GenProgramsNV 1295
9036 void
9037 __indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
9038 {
9039 struct glx_context *const gc = __glXGetCurrentContext();
9040 Display *const dpy = gc->currentDpy;
9041 const GLuint cmdlen = 4;
9042 if (n < 0) {
9043 __glXSetError(gc, GL_INVALID_VALUE);
9044 return;
9045 }
9046 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
9047 GLubyte const *pc =
9048 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9049 X_GLvop_GenProgramsNV, cmdlen);
9050 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
9051 (void) __glXReadReply(dpy, 4, programs, GL_TRUE);
9052 UnlockDisplay(dpy);
9053 SyncHandle();
9054 }
9055 return;
9056 }
9057
9058 #define X_GLvop_GetProgramParameterdvNV 1297
9059 void
9060 __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index,
9061 GLenum pname, GLdouble * params)
9062 {
9063 struct glx_context *const gc = __glXGetCurrentContext();
9064 Display *const dpy = gc->currentDpy;
9065 const GLuint cmdlen = 12;
9066 if (__builtin_expect(dpy != NULL, 1)) {
9067 GLubyte const *pc =
9068 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9069 X_GLvop_GetProgramParameterdvNV, cmdlen);
9070 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9071 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
9072 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9073 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
9074 UnlockDisplay(dpy);
9075 SyncHandle();
9076 }
9077 return;
9078 }
9079
9080 #define X_GLvop_GetProgramParameterfvNV 1296
9081 void
9082 __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
9083 GLenum pname, GLfloat * params)
9084 {
9085 struct glx_context *const gc = __glXGetCurrentContext();
9086 Display *const dpy = gc->currentDpy;
9087 const GLuint cmdlen = 12;
9088 if (__builtin_expect(dpy != NULL, 1)) {
9089 GLubyte const *pc =
9090 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9091 X_GLvop_GetProgramParameterfvNV, cmdlen);
9092 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9093 (void) memcpy((void *) (pc + 4), (void *) (&index), 4);
9094 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9095 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9096 UnlockDisplay(dpy);
9097 SyncHandle();
9098 }
9099 return;
9100 }
9101
9102 #define X_GLvop_GetProgramStringNV 1299
9103 void
9104 __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
9105 {
9106 struct glx_context *const gc = __glXGetCurrentContext();
9107 Display *const dpy = gc->currentDpy;
9108 const GLuint cmdlen = 8;
9109 if (__builtin_expect(dpy != NULL, 1)) {
9110 GLubyte const *pc =
9111 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9112 X_GLvop_GetProgramStringNV, cmdlen);
9113 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9114 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9115 (void) __glXReadReply(dpy, 1, program, GL_TRUE);
9116 UnlockDisplay(dpy);
9117 SyncHandle();
9118 }
9119 return;
9120 }
9121
9122 #define X_GLvop_GetProgramivNV 1298
9123 void
9124 __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
9125 {
9126 struct glx_context *const gc = __glXGetCurrentContext();
9127 Display *const dpy = gc->currentDpy;
9128 const GLuint cmdlen = 8;
9129 if (__builtin_expect(dpy != NULL, 1)) {
9130 GLubyte const *pc =
9131 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9132 X_GLvop_GetProgramivNV, cmdlen);
9133 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
9134 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9135 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9136 UnlockDisplay(dpy);
9137 SyncHandle();
9138 }
9139 return;
9140 }
9141
9142 #define X_GLvop_GetTrackMatrixivNV 1300
9143 void
9144 __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname,
9145 GLint * params)
9146 {
9147 struct glx_context *const gc = __glXGetCurrentContext();
9148 Display *const dpy = gc->currentDpy;
9149 const GLuint cmdlen = 12;
9150 if (__builtin_expect(dpy != NULL, 1)) {
9151 GLubyte const *pc =
9152 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9153 X_GLvop_GetTrackMatrixivNV, cmdlen);
9154 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
9155 (void) memcpy((void *) (pc + 4), (void *) (&address), 4);
9156 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
9157 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9158 UnlockDisplay(dpy);
9159 SyncHandle();
9160 }
9161 return;
9162 }
9163
9164 #define X_GLvop_GetVertexAttribdvNV 1301
9165 void
9166 __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname,
9167 GLdouble * params)
9168 {
9169 struct glx_context *const gc = __glXGetCurrentContext();
9170 Display *const dpy = gc->currentDpy;
9171 const GLuint cmdlen = 8;
9172 if (__builtin_expect(dpy != NULL, 1)) {
9173 GLubyte const *pc =
9174 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9175 X_GLvop_GetVertexAttribdvNV, cmdlen);
9176 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9177 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9178 (void) __glXReadReply(dpy, 8, params, GL_FALSE);
9179 UnlockDisplay(dpy);
9180 SyncHandle();
9181 }
9182 return;
9183 }
9184
9185 #define X_GLvop_GetVertexAttribfvNV 1302
9186 void
9187 __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
9188 {
9189 struct glx_context *const gc = __glXGetCurrentContext();
9190 Display *const dpy = gc->currentDpy;
9191 const GLuint cmdlen = 8;
9192 if (__builtin_expect(dpy != NULL, 1)) {
9193 GLubyte const *pc =
9194 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9195 X_GLvop_GetVertexAttribfvNV, cmdlen);
9196 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9197 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9198 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9199 UnlockDisplay(dpy);
9200 SyncHandle();
9201 }
9202 return;
9203 }
9204
9205 #define X_GLvop_GetVertexAttribivNV 1303
9206 void
9207 __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
9208 {
9209 struct glx_context *const gc = __glXGetCurrentContext();
9210 Display *const dpy = gc->currentDpy;
9211 const GLuint cmdlen = 8;
9212 if (__builtin_expect(dpy != NULL, 1)) {
9213 GLubyte const *pc =
9214 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9215 X_GLvop_GetVertexAttribivNV, cmdlen);
9216 (void) memcpy((void *) (pc + 0), (void *) (&index), 4);
9217 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
9218 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
9219 UnlockDisplay(dpy);
9220 SyncHandle();
9221 }
9222 return;
9223 }
9224
9225 #define X_GLvop_IsProgramNV 1304
9226 GLboolean
9227 __indirect_glIsProgramNV(GLuint program)
9228 {
9229 struct glx_context *const gc = __glXGetCurrentContext();
9230 Display *const dpy = gc->currentDpy;
9231 GLboolean retval = (GLboolean) 0;
9232 const GLuint cmdlen = 4;
9233 if (__builtin_expect(dpy != NULL, 1)) {
9234 GLubyte const *pc =
9235 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
9236 X_GLvop_IsProgramNV, cmdlen);
9237 (void) memcpy((void *) (pc + 0), (void *) (&program), 4);
9238 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
9239 UnlockDisplay(dpy);
9240 SyncHandle();
9241 }
9242 return retval;
9243 }
9244
9245 #define X_GLrop_LoadProgramNV 4183
9246 void
9247 __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len,
9248 const GLubyte *program)
9249 {
9250 struct glx_context *const gc = __glXGetCurrentContext();
9251 const GLuint cmdlen = 16 + __GLX_PAD(len);
9252 if (len < 0) {
9253 __glXSetError(gc, GL_INVALID_VALUE);
9254 return;
9255 }
9256 if (__builtin_expect(len >= 0, 1)) {
9257 emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
9258 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9259 (void) memcpy((void *) (gc->pc + 8), (void *) (&id), 4);
9260 (void) memcpy((void *) (gc->pc + 12), (void *) (&len), 4);
9261 (void) memcpy((void *) (gc->pc + 16), (void *) (program), len);
9262 gc->pc += cmdlen;
9263 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9264 (void) __glXFlushRenderBuffer(gc, gc->pc);
9265 }
9266 }
9267 }
9268
9269 #define X_GLrop_ProgramParameters4dvNV 4187
9270 void
9271 __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num,
9272 const GLdouble * params)
9273 {
9274 struct glx_context *const gc = __glXGetCurrentContext();
9275 const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
9276 if (num < 0) {
9277 __glXSetError(gc, GL_INVALID_VALUE);
9278 return;
9279 }
9280 if (__builtin_expect(num >= 0, 1)) {
9281 emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
9282 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9283 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9284 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9285 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 32));
9286 gc->pc += cmdlen;
9287 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9288 (void) __glXFlushRenderBuffer(gc, gc->pc);
9289 }
9290 }
9291 }
9292
9293 #define X_GLrop_ProgramParameters4fvNV 4186
9294 void
9295 __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num,
9296 const GLfloat * params)
9297 {
9298 struct glx_context *const gc = __glXGetCurrentContext();
9299 const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
9300 if (num < 0) {
9301 __glXSetError(gc, GL_INVALID_VALUE);
9302 return;
9303 }
9304 if (__builtin_expect(num >= 0, 1)) {
9305 emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
9306 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9307 (void) memcpy((void *) (gc->pc + 8), (void *) (&index), 4);
9308 (void) memcpy((void *) (gc->pc + 12), (void *) (&num), 4);
9309 (void) memcpy((void *) (gc->pc + 16), (void *) (params), (num * 16));
9310 gc->pc += cmdlen;
9311 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9312 (void) __glXFlushRenderBuffer(gc, gc->pc);
9313 }
9314 }
9315 }
9316
9317 #define X_GLrop_RequestResidentProgramsNV 4182
9318 void
9319 __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
9320 {
9321 struct glx_context *const gc = __glXGetCurrentContext();
9322 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
9323 if (n < 0) {
9324 __glXSetError(gc, GL_INVALID_VALUE);
9325 return;
9326 }
9327 if (__builtin_expect(n >= 0, 1)) {
9328 emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen);
9329 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
9330 (void) memcpy((void *) (gc->pc + 8), (void *) (ids), (n * 4));
9331 gc->pc += cmdlen;
9332 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9333 (void) __glXFlushRenderBuffer(gc, gc->pc);
9334 }
9335 }
9336 }
9337
9338 #define X_GLrop_TrackMatrixNV 4188
9339 void
9340 __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix,
9341 GLenum transform)
9342 {
9343 struct glx_context *const gc = __glXGetCurrentContext();
9344 const GLuint cmdlen = 20;
9345 emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
9346 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
9347 (void) memcpy((void *) (gc->pc + 8), (void *) (&address), 4);
9348 (void) memcpy((void *) (gc->pc + 12), (void *) (&matrix), 4);
9349 (void) memcpy((void *) (gc->pc + 16), (void *) (&transform), 4);
9350 gc->pc += cmdlen;
9351 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9352 (void) __glXFlushRenderBuffer(gc, gc->pc);
9353 }
9354 }
9355
9356 #define X_GLrop_VertexAttrib1dvNV 4273
9357 void
9358 __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
9359 {
9360 struct glx_context *const gc = __glXGetCurrentContext();
9361 const GLuint cmdlen = 16;
9362 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9363 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9364 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9365 gc->pc += cmdlen;
9366 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9367 (void) __glXFlushRenderBuffer(gc, gc->pc);
9368 }
9369 }
9370
9371 #define X_GLrop_VertexAttrib1dvNV 4273
9372 void
9373 __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
9374 {
9375 struct glx_context *const gc = __glXGetCurrentContext();
9376 const GLuint cmdlen = 16;
9377 emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
9378 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9379 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9380 gc->pc += cmdlen;
9381 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9382 (void) __glXFlushRenderBuffer(gc, gc->pc);
9383 }
9384 }
9385
9386 #define X_GLrop_VertexAttrib1fvNV 4269
9387 void
9388 __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
9389 {
9390 struct glx_context *const gc = __glXGetCurrentContext();
9391 const GLuint cmdlen = 12;
9392 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9393 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9394 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9395 gc->pc += cmdlen;
9396 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9397 (void) __glXFlushRenderBuffer(gc, gc->pc);
9398 }
9399 }
9400
9401 #define X_GLrop_VertexAttrib1fvNV 4269
9402 void
9403 __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
9404 {
9405 struct glx_context *const gc = __glXGetCurrentContext();
9406 const GLuint cmdlen = 12;
9407 emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
9408 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9409 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9410 gc->pc += cmdlen;
9411 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9412 (void) __glXFlushRenderBuffer(gc, gc->pc);
9413 }
9414 }
9415
9416 #define X_GLrop_VertexAttrib1svNV 4265
9417 void
9418 __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
9419 {
9420 struct glx_context *const gc = __glXGetCurrentContext();
9421 const GLuint cmdlen = 12;
9422 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9423 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9424 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9425 gc->pc += cmdlen;
9426 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9427 (void) __glXFlushRenderBuffer(gc, gc->pc);
9428 }
9429 }
9430
9431 #define X_GLrop_VertexAttrib1svNV 4265
9432 void
9433 __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
9434 {
9435 struct glx_context *const gc = __glXGetCurrentContext();
9436 const GLuint cmdlen = 12;
9437 emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
9438 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9439 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 2);
9440 gc->pc += cmdlen;
9441 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9442 (void) __glXFlushRenderBuffer(gc, gc->pc);
9443 }
9444 }
9445
9446 #define X_GLrop_VertexAttrib2dvNV 4274
9447 void
9448 __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
9449 {
9450 struct glx_context *const gc = __glXGetCurrentContext();
9451 const GLuint cmdlen = 24;
9452 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9453 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9454 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9455 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9456 gc->pc += cmdlen;
9457 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9458 (void) __glXFlushRenderBuffer(gc, gc->pc);
9459 }
9460 }
9461
9462 #define X_GLrop_VertexAttrib2dvNV 4274
9463 void
9464 __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
9465 {
9466 struct glx_context *const gc = __glXGetCurrentContext();
9467 const GLuint cmdlen = 24;
9468 emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
9469 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9470 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9471 gc->pc += cmdlen;
9472 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9473 (void) __glXFlushRenderBuffer(gc, gc->pc);
9474 }
9475 }
9476
9477 #define X_GLrop_VertexAttrib2fvNV 4270
9478 void
9479 __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
9480 {
9481 struct glx_context *const gc = __glXGetCurrentContext();
9482 const GLuint cmdlen = 16;
9483 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9484 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9485 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9486 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9487 gc->pc += cmdlen;
9488 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9489 (void) __glXFlushRenderBuffer(gc, gc->pc);
9490 }
9491 }
9492
9493 #define X_GLrop_VertexAttrib2fvNV 4270
9494 void
9495 __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
9496 {
9497 struct glx_context *const gc = __glXGetCurrentContext();
9498 const GLuint cmdlen = 16;
9499 emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
9500 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9501 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9502 gc->pc += cmdlen;
9503 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9504 (void) __glXFlushRenderBuffer(gc, gc->pc);
9505 }
9506 }
9507
9508 #define X_GLrop_VertexAttrib2svNV 4266
9509 void
9510 __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
9511 {
9512 struct glx_context *const gc = __glXGetCurrentContext();
9513 const GLuint cmdlen = 12;
9514 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9515 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9516 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9517 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
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_VertexAttrib2svNV 4266
9525 void
9526 __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
9527 {
9528 struct glx_context *const gc = __glXGetCurrentContext();
9529 const GLuint cmdlen = 12;
9530 emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
9531 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9532 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9533 gc->pc += cmdlen;
9534 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9535 (void) __glXFlushRenderBuffer(gc, gc->pc);
9536 }
9537 }
9538
9539 #define X_GLrop_VertexAttrib3dvNV 4275
9540 void
9541 __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y,
9542 GLdouble z)
9543 {
9544 struct glx_context *const gc = __glXGetCurrentContext();
9545 const GLuint cmdlen = 32;
9546 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9547 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9548 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9549 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9550 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9551 gc->pc += cmdlen;
9552 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9553 (void) __glXFlushRenderBuffer(gc, gc->pc);
9554 }
9555 }
9556
9557 #define X_GLrop_VertexAttrib3dvNV 4275
9558 void
9559 __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
9560 {
9561 struct glx_context *const gc = __glXGetCurrentContext();
9562 const GLuint cmdlen = 32;
9563 emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
9564 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9565 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 24);
9566 gc->pc += cmdlen;
9567 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9568 (void) __glXFlushRenderBuffer(gc, gc->pc);
9569 }
9570 }
9571
9572 #define X_GLrop_VertexAttrib3fvNV 4271
9573 void
9574 __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
9575 {
9576 struct glx_context *const gc = __glXGetCurrentContext();
9577 const GLuint cmdlen = 20;
9578 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9579 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9580 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9581 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9582 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9583 gc->pc += cmdlen;
9584 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9585 (void) __glXFlushRenderBuffer(gc, gc->pc);
9586 }
9587 }
9588
9589 #define X_GLrop_VertexAttrib3fvNV 4271
9590 void
9591 __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
9592 {
9593 struct glx_context *const gc = __glXGetCurrentContext();
9594 const GLuint cmdlen = 20;
9595 emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
9596 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9597 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 12);
9598 gc->pc += cmdlen;
9599 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9600 (void) __glXFlushRenderBuffer(gc, gc->pc);
9601 }
9602 }
9603
9604 #define X_GLrop_VertexAttrib3svNV 4267
9605 void
9606 __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
9607 {
9608 struct glx_context *const gc = __glXGetCurrentContext();
9609 const GLuint cmdlen = 16;
9610 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9611 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9612 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9613 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9614 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9615 gc->pc += cmdlen;
9616 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9617 (void) __glXFlushRenderBuffer(gc, gc->pc);
9618 }
9619 }
9620
9621 #define X_GLrop_VertexAttrib3svNV 4267
9622 void
9623 __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
9624 {
9625 struct glx_context *const gc = __glXGetCurrentContext();
9626 const GLuint cmdlen = 16;
9627 emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
9628 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9629 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 6);
9630 gc->pc += cmdlen;
9631 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9632 (void) __glXFlushRenderBuffer(gc, gc->pc);
9633 }
9634 }
9635
9636 #define X_GLrop_VertexAttrib4dvNV 4276
9637 void
9638 __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y,
9639 GLdouble z, GLdouble w)
9640 {
9641 struct glx_context *const gc = __glXGetCurrentContext();
9642 const GLuint cmdlen = 40;
9643 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9644 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9645 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 8);
9646 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 8);
9647 (void) memcpy((void *) (gc->pc + 24), (void *) (&z), 8);
9648 (void) memcpy((void *) (gc->pc + 32), (void *) (&w), 8);
9649 gc->pc += cmdlen;
9650 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9651 (void) __glXFlushRenderBuffer(gc, gc->pc);
9652 }
9653 }
9654
9655 #define X_GLrop_VertexAttrib4dvNV 4276
9656 void
9657 __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
9658 {
9659 struct glx_context *const gc = __glXGetCurrentContext();
9660 const GLuint cmdlen = 40;
9661 emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
9662 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9663 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 32);
9664 gc->pc += cmdlen;
9665 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9666 (void) __glXFlushRenderBuffer(gc, gc->pc);
9667 }
9668 }
9669
9670 #define X_GLrop_VertexAttrib4fvNV 4272
9671 void
9672 __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z,
9673 GLfloat w)
9674 {
9675 struct glx_context *const gc = __glXGetCurrentContext();
9676 const GLuint cmdlen = 24;
9677 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9678 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9679 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 4);
9680 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 4);
9681 (void) memcpy((void *) (gc->pc + 16), (void *) (&z), 4);
9682 (void) memcpy((void *) (gc->pc + 20), (void *) (&w), 4);
9683 gc->pc += cmdlen;
9684 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9685 (void) __glXFlushRenderBuffer(gc, gc->pc);
9686 }
9687 }
9688
9689 #define X_GLrop_VertexAttrib4fvNV 4272
9690 void
9691 __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
9692 {
9693 struct glx_context *const gc = __glXGetCurrentContext();
9694 const GLuint cmdlen = 24;
9695 emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
9696 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9697 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 16);
9698 gc->pc += cmdlen;
9699 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9700 (void) __glXFlushRenderBuffer(gc, gc->pc);
9701 }
9702 }
9703
9704 #define X_GLrop_VertexAttrib4svNV 4268
9705 void
9706 __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z,
9707 GLshort w)
9708 {
9709 struct glx_context *const gc = __glXGetCurrentContext();
9710 const GLuint cmdlen = 16;
9711 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9712 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9713 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 2);
9714 (void) memcpy((void *) (gc->pc + 10), (void *) (&y), 2);
9715 (void) memcpy((void *) (gc->pc + 12), (void *) (&z), 2);
9716 (void) memcpy((void *) (gc->pc + 14), (void *) (&w), 2);
9717 gc->pc += cmdlen;
9718 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9719 (void) __glXFlushRenderBuffer(gc, gc->pc);
9720 }
9721 }
9722
9723 #define X_GLrop_VertexAttrib4svNV 4268
9724 void
9725 __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
9726 {
9727 struct glx_context *const gc = __glXGetCurrentContext();
9728 const GLuint cmdlen = 16;
9729 emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
9730 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9731 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 8);
9732 gc->pc += cmdlen;
9733 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9734 (void) __glXFlushRenderBuffer(gc, gc->pc);
9735 }
9736 }
9737
9738 #define X_GLrop_VertexAttrib4ubvNV 4277
9739 void
9740 __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
9741 GLubyte w)
9742 {
9743 struct glx_context *const gc = __glXGetCurrentContext();
9744 const GLuint cmdlen = 12;
9745 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9746 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9747 (void) memcpy((void *) (gc->pc + 8), (void *) (&x), 1);
9748 (void) memcpy((void *) (gc->pc + 9), (void *) (&y), 1);
9749 (void) memcpy((void *) (gc->pc + 10), (void *) (&z), 1);
9750 (void) memcpy((void *) (gc->pc + 11), (void *) (&w), 1);
9751 gc->pc += cmdlen;
9752 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9753 (void) __glXFlushRenderBuffer(gc, gc->pc);
9754 }
9755 }
9756
9757 #define X_GLrop_VertexAttrib4ubvNV 4277
9758 void
9759 __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte *v)
9760 {
9761 struct glx_context *const gc = __glXGetCurrentContext();
9762 const GLuint cmdlen = 12;
9763 emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
9764 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9765 (void) memcpy((void *) (gc->pc + 8), (void *) (v), 4);
9766 gc->pc += cmdlen;
9767 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9768 (void) __glXFlushRenderBuffer(gc, gc->pc);
9769 }
9770 }
9771
9772 #define X_GLrop_VertexAttribs1dvNV 4210
9773 void
9774 __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
9775 {
9776 struct glx_context *const gc = __glXGetCurrentContext();
9777 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9778 if (n < 0) {
9779 __glXSetError(gc, GL_INVALID_VALUE);
9780 return;
9781 }
9782 if (__builtin_expect(n >= 0, 1)) {
9783 emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen);
9784 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9785 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9786 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9787 gc->pc += cmdlen;
9788 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9789 (void) __glXFlushRenderBuffer(gc, gc->pc);
9790 }
9791 }
9792 }
9793
9794 #define X_GLrop_VertexAttribs1fvNV 4206
9795 void
9796 __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
9797 {
9798 struct glx_context *const gc = __glXGetCurrentContext();
9799 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9800 if (n < 0) {
9801 __glXSetError(gc, GL_INVALID_VALUE);
9802 return;
9803 }
9804 if (__builtin_expect(n >= 0, 1)) {
9805 emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen);
9806 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9807 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9808 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9809 gc->pc += cmdlen;
9810 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9811 (void) __glXFlushRenderBuffer(gc, gc->pc);
9812 }
9813 }
9814 }
9815
9816 #define X_GLrop_VertexAttribs1svNV 4202
9817 void
9818 __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
9819 {
9820 struct glx_context *const gc = __glXGetCurrentContext();
9821 const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
9822 if (n < 0) {
9823 __glXSetError(gc, GL_INVALID_VALUE);
9824 return;
9825 }
9826 if (__builtin_expect(n >= 0, 1)) {
9827 emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen);
9828 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9829 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9830 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 2));
9831 gc->pc += cmdlen;
9832 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9833 (void) __glXFlushRenderBuffer(gc, gc->pc);
9834 }
9835 }
9836 }
9837
9838 #define X_GLrop_VertexAttribs2dvNV 4211
9839 void
9840 __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
9841 {
9842 struct glx_context *const gc = __glXGetCurrentContext();
9843 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9844 if (n < 0) {
9845 __glXSetError(gc, GL_INVALID_VALUE);
9846 return;
9847 }
9848 if (__builtin_expect(n >= 0, 1)) {
9849 emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
9850 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9851 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9852 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
9853 gc->pc += cmdlen;
9854 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9855 (void) __glXFlushRenderBuffer(gc, gc->pc);
9856 }
9857 }
9858 }
9859
9860 #define X_GLrop_VertexAttribs2fvNV 4207
9861 void
9862 __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
9863 {
9864 struct glx_context *const gc = __glXGetCurrentContext();
9865 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
9866 if (n < 0) {
9867 __glXSetError(gc, GL_INVALID_VALUE);
9868 return;
9869 }
9870 if (__builtin_expect(n >= 0, 1)) {
9871 emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
9872 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9873 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9874 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
9875 gc->pc += cmdlen;
9876 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9877 (void) __glXFlushRenderBuffer(gc, gc->pc);
9878 }
9879 }
9880 }
9881
9882 #define X_GLrop_VertexAttribs2svNV 4203
9883 void
9884 __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
9885 {
9886 struct glx_context *const gc = __glXGetCurrentContext();
9887 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
9888 if (n < 0) {
9889 __glXSetError(gc, GL_INVALID_VALUE);
9890 return;
9891 }
9892 if (__builtin_expect(n >= 0, 1)) {
9893 emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
9894 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9895 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9896 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
9897 gc->pc += cmdlen;
9898 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9899 (void) __glXFlushRenderBuffer(gc, gc->pc);
9900 }
9901 }
9902 }
9903
9904 #define X_GLrop_VertexAttribs3dvNV 4212
9905 void
9906 __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
9907 {
9908 struct glx_context *const gc = __glXGetCurrentContext();
9909 const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
9910 if (n < 0) {
9911 __glXSetError(gc, GL_INVALID_VALUE);
9912 return;
9913 }
9914 if (__builtin_expect(n >= 0, 1)) {
9915 emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
9916 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9917 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9918 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 24));
9919 gc->pc += cmdlen;
9920 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9921 (void) __glXFlushRenderBuffer(gc, gc->pc);
9922 }
9923 }
9924 }
9925
9926 #define X_GLrop_VertexAttribs3fvNV 4208
9927 void
9928 __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
9929 {
9930 struct glx_context *const gc = __glXGetCurrentContext();
9931 const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
9932 if (n < 0) {
9933 __glXSetError(gc, GL_INVALID_VALUE);
9934 return;
9935 }
9936 if (__builtin_expect(n >= 0, 1)) {
9937 emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
9938 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9939 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9940 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 12));
9941 gc->pc += cmdlen;
9942 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9943 (void) __glXFlushRenderBuffer(gc, gc->pc);
9944 }
9945 }
9946 }
9947
9948 #define X_GLrop_VertexAttribs3svNV 4204
9949 void
9950 __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
9951 {
9952 struct glx_context *const gc = __glXGetCurrentContext();
9953 const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
9954 if (n < 0) {
9955 __glXSetError(gc, GL_INVALID_VALUE);
9956 return;
9957 }
9958 if (__builtin_expect(n >= 0, 1)) {
9959 emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
9960 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9961 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9962 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 6));
9963 gc->pc += cmdlen;
9964 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9965 (void) __glXFlushRenderBuffer(gc, gc->pc);
9966 }
9967 }
9968 }
9969
9970 #define X_GLrop_VertexAttribs4dvNV 4213
9971 void
9972 __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
9973 {
9974 struct glx_context *const gc = __glXGetCurrentContext();
9975 const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
9976 if (n < 0) {
9977 __glXSetError(gc, GL_INVALID_VALUE);
9978 return;
9979 }
9980 if (__builtin_expect(n >= 0, 1)) {
9981 emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
9982 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
9983 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
9984 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 32));
9985 gc->pc += cmdlen;
9986 if (__builtin_expect(gc->pc > gc->limit, 0)) {
9987 (void) __glXFlushRenderBuffer(gc, gc->pc);
9988 }
9989 }
9990 }
9991
9992 #define X_GLrop_VertexAttribs4fvNV 4209
9993 void
9994 __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
9995 {
9996 struct glx_context *const gc = __glXGetCurrentContext();
9997 const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
9998 if (n < 0) {
9999 __glXSetError(gc, GL_INVALID_VALUE);
10000 return;
10001 }
10002 if (__builtin_expect(n >= 0, 1)) {
10003 emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
10004 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
10005 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
10006 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 16));
10007 gc->pc += cmdlen;
10008 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10009 (void) __glXFlushRenderBuffer(gc, gc->pc);
10010 }
10011 }
10012 }
10013
10014 #define X_GLrop_VertexAttribs4svNV 4205
10015 void
10016 __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
10017 {
10018 struct glx_context *const gc = __glXGetCurrentContext();
10019 const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
10020 if (n < 0) {
10021 __glXSetError(gc, GL_INVALID_VALUE);
10022 return;
10023 }
10024 if (__builtin_expect(n >= 0, 1)) {
10025 emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
10026 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
10027 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
10028 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 8));
10029 gc->pc += cmdlen;
10030 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10031 (void) __glXFlushRenderBuffer(gc, gc->pc);
10032 }
10033 }
10034 }
10035
10036 #define X_GLrop_VertexAttribs4ubvNV 4214
10037 void
10038 __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
10039 {
10040 struct glx_context *const gc = __glXGetCurrentContext();
10041 const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
10042 if (n < 0) {
10043 __glXSetError(gc, GL_INVALID_VALUE);
10044 return;
10045 }
10046 if (__builtin_expect(n >= 0, 1)) {
10047 emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
10048 (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
10049 (void) memcpy((void *) (gc->pc + 8), (void *) (&n), 4);
10050 (void) memcpy((void *) (gc->pc + 12), (void *) (v), (n * 4));
10051 gc->pc += cmdlen;
10052 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10053 (void) __glXFlushRenderBuffer(gc, gc->pc);
10054 }
10055 }
10056 }
10057
10058 #define X_GLrop_PointParameteriNV 4221
10059 void
10060 __indirect_glPointParameteriNV(GLenum pname, GLint param)
10061 {
10062 struct glx_context *const gc = __glXGetCurrentContext();
10063 const GLuint cmdlen = 12;
10064 emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
10065 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
10066 (void) memcpy((void *) (gc->pc + 8), (void *) (&param), 4);
10067 gc->pc += cmdlen;
10068 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10069 (void) __glXFlushRenderBuffer(gc, gc->pc);
10070 }
10071 }
10072
10073 #define X_GLrop_PointParameterivNV 4222
10074 void
10075 __indirect_glPointParameterivNV(GLenum pname, const GLint * params)
10076 {
10077 struct glx_context *const gc = __glXGetCurrentContext();
10078 const GLuint compsize = __glPointParameterivNV_size(pname);
10079 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
10080 emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
10081 (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
10082 (void) memcpy((void *) (gc->pc + 8), (void *) (params), (compsize * 4));
10083 gc->pc += cmdlen;
10084 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10085 (void) __glXFlushRenderBuffer(gc, gc->pc);
10086 }
10087 }
10088
10089 #define X_GLrop_ActiveStencilFaceEXT 4220
10090 void
10091 __indirect_glActiveStencilFaceEXT(GLenum face)
10092 {
10093 struct glx_context *const gc = __glXGetCurrentContext();
10094 const GLuint cmdlen = 8;
10095 emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
10096 (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
10097 gc->pc += cmdlen;
10098 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10099 (void) __glXFlushRenderBuffer(gc, gc->pc);
10100 }
10101 }
10102
10103 #define X_GLvop_GetProgramNamedParameterdvNV 1311
10104 void
10105 __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
10106 const GLubyte *name,
10107 GLdouble * params)
10108 {
10109 struct glx_context *const gc = __glXGetCurrentContext();
10110 Display *const dpy = gc->currentDpy;
10111 const GLuint cmdlen = 8 + __GLX_PAD(len);
10112 if (len < 0) {
10113 __glXSetError(gc, GL_INVALID_VALUE);
10114 return;
10115 }
10116 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
10117 GLubyte const *pc =
10118 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10119 X_GLvop_GetProgramNamedParameterdvNV,
10120 cmdlen);
10121 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
10122 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
10123 (void) memcpy((void *) (pc + 8), (void *) (name), len);
10124 (void) __glXReadReply(dpy, 8, params, GL_TRUE);
10125 UnlockDisplay(dpy);
10126 SyncHandle();
10127 }
10128 return;
10129 }
10130
10131 #define X_GLvop_GetProgramNamedParameterfvNV 1310
10132 void
10133 __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
10134 const GLubyte *name,
10135 GLfloat * params)
10136 {
10137 struct glx_context *const gc = __glXGetCurrentContext();
10138 Display *const dpy = gc->currentDpy;
10139 const GLuint cmdlen = 8 + __GLX_PAD(len);
10140 if (len < 0) {
10141 __glXSetError(gc, GL_INVALID_VALUE);
10142 return;
10143 }
10144 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
10145 GLubyte const *pc =
10146 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10147 X_GLvop_GetProgramNamedParameterfvNV,
10148 cmdlen);
10149 (void) memcpy((void *) (pc + 0), (void *) (&id), 4);
10150 (void) memcpy((void *) (pc + 4), (void *) (&len), 4);
10151 (void) memcpy((void *) (pc + 8), (void *) (name), len);
10152 (void) __glXReadReply(dpy, 4, params, GL_TRUE);
10153 UnlockDisplay(dpy);
10154 SyncHandle();
10155 }
10156 return;
10157 }
10158
10159 #define X_GLrop_ProgramNamedParameter4dvNV 4219
10160 void
10161 __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
10162 const GLubyte *name, GLdouble x,
10163 GLdouble y, GLdouble z, GLdouble w)
10164 {
10165 struct glx_context *const gc = __glXGetCurrentContext();
10166 const GLuint cmdlen = 44 + __GLX_PAD(len);
10167 if (len < 0) {
10168 __glXSetError(gc, GL_INVALID_VALUE);
10169 return;
10170 }
10171 if (__builtin_expect(len >= 0, 1)) {
10172 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
10173 (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
10174 (void) memcpy((void *) (gc->pc + 12), (void *) (&y), 8);
10175 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 8);
10176 (void) memcpy((void *) (gc->pc + 28), (void *) (&w), 8);
10177 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
10178 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
10179 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
10180 gc->pc += cmdlen;
10181 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10182 (void) __glXFlushRenderBuffer(gc, gc->pc);
10183 }
10184 }
10185 }
10186
10187 #define X_GLrop_ProgramNamedParameter4dvNV 4219
10188 void
10189 __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
10190 const GLubyte *name,
10191 const GLdouble * v)
10192 {
10193 struct glx_context *const gc = __glXGetCurrentContext();
10194 const GLuint cmdlen = 44 + __GLX_PAD(len);
10195 if (len < 0) {
10196 __glXSetError(gc, GL_INVALID_VALUE);
10197 return;
10198 }
10199 if (__builtin_expect(len >= 0, 1)) {
10200 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
10201 (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
10202 (void) memcpy((void *) (gc->pc + 36), (void *) (&id), 4);
10203 (void) memcpy((void *) (gc->pc + 40), (void *) (&len), 4);
10204 (void) memcpy((void *) (gc->pc + 44), (void *) (name), len);
10205 gc->pc += cmdlen;
10206 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10207 (void) __glXFlushRenderBuffer(gc, gc->pc);
10208 }
10209 }
10210 }
10211
10212 #define X_GLrop_ProgramNamedParameter4fvNV 4218
10213 void
10214 __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
10215 const GLubyte *name, GLfloat x,
10216 GLfloat y, GLfloat z, GLfloat w)
10217 {
10218 struct glx_context *const gc = __glXGetCurrentContext();
10219 const GLuint cmdlen = 28 + __GLX_PAD(len);
10220 if (len < 0) {
10221 __glXSetError(gc, GL_INVALID_VALUE);
10222 return;
10223 }
10224 if (__builtin_expect(len >= 0, 1)) {
10225 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
10226 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
10227 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
10228 (void) memcpy((void *) (gc->pc + 12), (void *) (&x), 4);
10229 (void) memcpy((void *) (gc->pc + 16), (void *) (&y), 4);
10230 (void) memcpy((void *) (gc->pc + 20), (void *) (&z), 4);
10231 (void) memcpy((void *) (gc->pc + 24), (void *) (&w), 4);
10232 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
10233 gc->pc += cmdlen;
10234 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10235 (void) __glXFlushRenderBuffer(gc, gc->pc);
10236 }
10237 }
10238 }
10239
10240 #define X_GLrop_ProgramNamedParameter4fvNV 4218
10241 void
10242 __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
10243 const GLubyte *name,
10244 const GLfloat * v)
10245 {
10246 struct glx_context *const gc = __glXGetCurrentContext();
10247 const GLuint cmdlen = 28 + __GLX_PAD(len);
10248 if (len < 0) {
10249 __glXSetError(gc, GL_INVALID_VALUE);
10250 return;
10251 }
10252 if (__builtin_expect(len >= 0, 1)) {
10253 emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
10254 (void) memcpy((void *) (gc->pc + 4), (void *) (&id), 4);
10255 (void) memcpy((void *) (gc->pc + 8), (void *) (&len), 4);
10256 (void) memcpy((void *) (gc->pc + 12), (void *) (v), 16);
10257 (void) memcpy((void *) (gc->pc + 28), (void *) (name), len);
10258 gc->pc += cmdlen;
10259 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10260 (void) __glXFlushRenderBuffer(gc, gc->pc);
10261 }
10262 }
10263 }
10264
10265 #define X_GLrop_BlendEquationSeparateEXT 4228
10266 void
10267 __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
10268 {
10269 struct glx_context *const gc = __glXGetCurrentContext();
10270 const GLuint cmdlen = 12;
10271 emit_header(gc->pc, X_GLrop_BlendEquationSeparateEXT, cmdlen);
10272 (void) memcpy((void *) (gc->pc + 4), (void *) (&modeRGB), 4);
10273 (void) memcpy((void *) (gc->pc + 8), (void *) (&modeA), 4);
10274 gc->pc += cmdlen;
10275 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10276 (void) __glXFlushRenderBuffer(gc, gc->pc);
10277 }
10278 }
10279
10280 #define X_GLrop_BindFramebufferEXT 4319
10281 void
10282 __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
10283 {
10284 struct glx_context *const gc = __glXGetCurrentContext();
10285 const GLuint cmdlen = 12;
10286 emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
10287 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10288 (void) memcpy((void *) (gc->pc + 8), (void *) (&framebuffer), 4);
10289 gc->pc += cmdlen;
10290 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10291 (void) __glXFlushRenderBuffer(gc, gc->pc);
10292 }
10293 }
10294
10295 #define X_GLrop_BindRenderbufferEXT 4316
10296 void
10297 __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
10298 {
10299 struct glx_context *const gc = __glXGetCurrentContext();
10300 const GLuint cmdlen = 12;
10301 emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
10302 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10303 (void) memcpy((void *) (gc->pc + 8), (void *) (&renderbuffer), 4);
10304 gc->pc += cmdlen;
10305 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10306 (void) __glXFlushRenderBuffer(gc, gc->pc);
10307 }
10308 }
10309
10310 #define X_GLvop_CheckFramebufferStatusEXT 1427
10311 GLenum
10312 __indirect_glCheckFramebufferStatusEXT(GLenum target)
10313 {
10314 struct glx_context *const gc = __glXGetCurrentContext();
10315 Display *const dpy = gc->currentDpy;
10316 GLenum retval = (GLenum) 0;
10317 const GLuint cmdlen = 4;
10318 if (__builtin_expect(dpy != NULL, 1)) {
10319 GLubyte const *pc =
10320 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10321 X_GLvop_CheckFramebufferStatusEXT,
10322 cmdlen);
10323 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10324 retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10325 UnlockDisplay(dpy);
10326 SyncHandle();
10327 }
10328 return retval;
10329 }
10330
10331 #define X_GLrop_DeleteFramebuffersEXT 4320
10332 void
10333 __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
10334 {
10335 struct glx_context *const gc = __glXGetCurrentContext();
10336 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10337 if (n < 0) {
10338 __glXSetError(gc, GL_INVALID_VALUE);
10339 return;
10340 }
10341 if (__builtin_expect(n >= 0, 1)) {
10342 emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
10343 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10344 (void) memcpy((void *) (gc->pc + 8), (void *) (framebuffers),
10345 (n * 4));
10346 gc->pc += cmdlen;
10347 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10348 (void) __glXFlushRenderBuffer(gc, gc->pc);
10349 }
10350 }
10351 }
10352
10353 #define X_GLrop_DeleteRenderbuffersEXT 4317
10354 void
10355 __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
10356 {
10357 struct glx_context *const gc = __glXGetCurrentContext();
10358 const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
10359 if (n < 0) {
10360 __glXSetError(gc, GL_INVALID_VALUE);
10361 return;
10362 }
10363 if (__builtin_expect(n >= 0, 1)) {
10364 emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
10365 (void) memcpy((void *) (gc->pc + 4), (void *) (&n), 4);
10366 (void) memcpy((void *) (gc->pc + 8), (void *) (renderbuffers),
10367 (n * 4));
10368 gc->pc += cmdlen;
10369 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10370 (void) __glXFlushRenderBuffer(gc, gc->pc);
10371 }
10372 }
10373 }
10374
10375 #define X_GLrop_FramebufferRenderbufferEXT 4324
10376 void
10377 __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
10378 GLenum renderbuffertarget,
10379 GLuint renderbuffer)
10380 {
10381 struct glx_context *const gc = __glXGetCurrentContext();
10382 const GLuint cmdlen = 20;
10383 emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
10384 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10385 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10386 (void) memcpy((void *) (gc->pc + 12), (void *) (&renderbuffertarget), 4);
10387 (void) memcpy((void *) (gc->pc + 16), (void *) (&renderbuffer), 4);
10388 gc->pc += cmdlen;
10389 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10390 (void) __glXFlushRenderBuffer(gc, gc->pc);
10391 }
10392 }
10393
10394 #define X_GLrop_FramebufferTexture1DEXT 4321
10395 void
10396 __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
10397 GLenum textarget, GLuint texture,
10398 GLint level)
10399 {
10400 struct glx_context *const gc = __glXGetCurrentContext();
10401 const GLuint cmdlen = 24;
10402 emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
10403 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10404 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10405 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10406 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10407 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10408 gc->pc += cmdlen;
10409 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10410 (void) __glXFlushRenderBuffer(gc, gc->pc);
10411 }
10412 }
10413
10414 #define X_GLrop_FramebufferTexture2DEXT 4322
10415 void
10416 __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
10417 GLenum textarget, GLuint texture,
10418 GLint level)
10419 {
10420 struct glx_context *const gc = __glXGetCurrentContext();
10421 const GLuint cmdlen = 24;
10422 emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
10423 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10424 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10425 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10426 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10427 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10428 gc->pc += cmdlen;
10429 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10430 (void) __glXFlushRenderBuffer(gc, gc->pc);
10431 }
10432 }
10433
10434 #define X_GLrop_FramebufferTexture3DEXT 4323
10435 void
10436 __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
10437 GLenum textarget, GLuint texture,
10438 GLint level, GLint zoffset)
10439 {
10440 struct glx_context *const gc = __glXGetCurrentContext();
10441 const GLuint cmdlen = 28;
10442 emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
10443 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10444 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10445 (void) memcpy((void *) (gc->pc + 12), (void *) (&textarget), 4);
10446 (void) memcpy((void *) (gc->pc + 16), (void *) (&texture), 4);
10447 (void) memcpy((void *) (gc->pc + 20), (void *) (&level), 4);
10448 (void) memcpy((void *) (gc->pc + 24), (void *) (&zoffset), 4);
10449 gc->pc += cmdlen;
10450 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10451 (void) __glXFlushRenderBuffer(gc, gc->pc);
10452 }
10453 }
10454
10455 #define X_GLvop_GenFramebuffersEXT 1426
10456 void
10457 __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
10458 {
10459 struct glx_context *const gc = __glXGetCurrentContext();
10460 Display *const dpy = gc->currentDpy;
10461 const GLuint cmdlen = 4;
10462 if (n < 0) {
10463 __glXSetError(gc, GL_INVALID_VALUE);
10464 return;
10465 }
10466 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10467 GLubyte const *pc =
10468 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10469 X_GLvop_GenFramebuffersEXT, cmdlen);
10470 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10471 (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
10472 UnlockDisplay(dpy);
10473 SyncHandle();
10474 }
10475 return;
10476 }
10477
10478 #define X_GLvop_GenRenderbuffersEXT 1423
10479 void
10480 __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
10481 {
10482 struct glx_context *const gc = __glXGetCurrentContext();
10483 Display *const dpy = gc->currentDpy;
10484 const GLuint cmdlen = 4;
10485 if (n < 0) {
10486 __glXSetError(gc, GL_INVALID_VALUE);
10487 return;
10488 }
10489 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
10490 GLubyte const *pc =
10491 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10492 X_GLvop_GenRenderbuffersEXT, cmdlen);
10493 (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
10494 (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
10495 UnlockDisplay(dpy);
10496 SyncHandle();
10497 }
10498 return;
10499 }
10500
10501 #define X_GLrop_GenerateMipmapEXT 4325
10502 void
10503 __indirect_glGenerateMipmapEXT(GLenum target)
10504 {
10505 struct glx_context *const gc = __glXGetCurrentContext();
10506 const GLuint cmdlen = 8;
10507 emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
10508 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10509 gc->pc += cmdlen;
10510 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10511 (void) __glXFlushRenderBuffer(gc, gc->pc);
10512 }
10513 }
10514
10515 #define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
10516 void
10517 __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target,
10518 GLenum attachment,
10519 GLenum pname,
10520 GLint * params)
10521 {
10522 struct glx_context *const gc = __glXGetCurrentContext();
10523 Display *const dpy = gc->currentDpy;
10524 const GLuint cmdlen = 12;
10525 if (__builtin_expect(dpy != NULL, 1)) {
10526 GLubyte const *pc =
10527 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10528 X_GLvop_GetFramebufferAttachmentParameterivEXT,
10529 cmdlen);
10530 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10531 (void) memcpy((void *) (pc + 4), (void *) (&attachment), 4);
10532 (void) memcpy((void *) (pc + 8), (void *) (&pname), 4);
10533 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10534 UnlockDisplay(dpy);
10535 SyncHandle();
10536 }
10537 return;
10538 }
10539
10540 #define X_GLvop_GetRenderbufferParameterivEXT 1424
10541 void
10542 __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname,
10543 GLint * params)
10544 {
10545 struct glx_context *const gc = __glXGetCurrentContext();
10546 Display *const dpy = gc->currentDpy;
10547 const GLuint cmdlen = 8;
10548 if (__builtin_expect(dpy != NULL, 1)) {
10549 GLubyte const *pc =
10550 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10551 X_GLvop_GetRenderbufferParameterivEXT,
10552 cmdlen);
10553 (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
10554 (void) memcpy((void *) (pc + 4), (void *) (&pname), 4);
10555 (void) __glXReadReply(dpy, 4, params, GL_FALSE);
10556 UnlockDisplay(dpy);
10557 SyncHandle();
10558 }
10559 return;
10560 }
10561
10562 #define X_GLvop_IsFramebufferEXT 1425
10563 GLboolean
10564 __indirect_glIsFramebufferEXT(GLuint framebuffer)
10565 {
10566 struct glx_context *const gc = __glXGetCurrentContext();
10567 Display *const dpy = gc->currentDpy;
10568 GLboolean retval = (GLboolean) 0;
10569 const GLuint cmdlen = 4;
10570 if (__builtin_expect(dpy != NULL, 1)) {
10571 GLubyte const *pc =
10572 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10573 X_GLvop_IsFramebufferEXT, cmdlen);
10574 (void) memcpy((void *) (pc + 0), (void *) (&framebuffer), 4);
10575 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10576 UnlockDisplay(dpy);
10577 SyncHandle();
10578 }
10579 return retval;
10580 }
10581
10582 #define X_GLvop_IsRenderbufferEXT 1422
10583 GLboolean
10584 __indirect_glIsRenderbufferEXT(GLuint renderbuffer)
10585 {
10586 struct glx_context *const gc = __glXGetCurrentContext();
10587 Display *const dpy = gc->currentDpy;
10588 GLboolean retval = (GLboolean) 0;
10589 const GLuint cmdlen = 4;
10590 if (__builtin_expect(dpy != NULL, 1)) {
10591 GLubyte const *pc =
10592 __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
10593 X_GLvop_IsRenderbufferEXT, cmdlen);
10594 (void) memcpy((void *) (pc + 0), (void *) (&renderbuffer), 4);
10595 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
10596 UnlockDisplay(dpy);
10597 SyncHandle();
10598 }
10599 return retval;
10600 }
10601
10602 #define X_GLrop_RenderbufferStorageEXT 4318
10603 void
10604 __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
10605 GLsizei width, GLsizei height)
10606 {
10607 struct glx_context *const gc = __glXGetCurrentContext();
10608 const GLuint cmdlen = 20;
10609 emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
10610 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10611 (void) memcpy((void *) (gc->pc + 8), (void *) (&internalformat), 4);
10612 (void) memcpy((void *) (gc->pc + 12), (void *) (&width), 4);
10613 (void) memcpy((void *) (gc->pc + 16), (void *) (&height), 4);
10614 gc->pc += cmdlen;
10615 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10616 (void) __glXFlushRenderBuffer(gc, gc->pc);
10617 }
10618 }
10619
10620 #define X_GLrop_BlitFramebufferEXT 4330
10621 void
10622 __indirect_glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1,
10623 GLint srcY1, GLint dstX0, GLint dstY0,
10624 GLint dstX1, GLint dstY1, GLbitfield mask,
10625 GLenum filter)
10626 {
10627 struct glx_context *const gc = __glXGetCurrentContext();
10628 const GLuint cmdlen = 44;
10629 emit_header(gc->pc, X_GLrop_BlitFramebufferEXT, cmdlen);
10630 (void) memcpy((void *) (gc->pc + 4), (void *) (&srcX0), 4);
10631 (void) memcpy((void *) (gc->pc + 8), (void *) (&srcY0), 4);
10632 (void) memcpy((void *) (gc->pc + 12), (void *) (&srcX1), 4);
10633 (void) memcpy((void *) (gc->pc + 16), (void *) (&srcY1), 4);
10634 (void) memcpy((void *) (gc->pc + 20), (void *) (&dstX0), 4);
10635 (void) memcpy((void *) (gc->pc + 24), (void *) (&dstY0), 4);
10636 (void) memcpy((void *) (gc->pc + 28), (void *) (&dstX1), 4);
10637 (void) memcpy((void *) (gc->pc + 32), (void *) (&dstY1), 4);
10638 (void) memcpy((void *) (gc->pc + 36), (void *) (&mask), 4);
10639 (void) memcpy((void *) (gc->pc + 40), (void *) (&filter), 4);
10640 gc->pc += cmdlen;
10641 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10642 (void) __glXFlushRenderBuffer(gc, gc->pc);
10643 }
10644 }
10645
10646 #define X_GLrop_FramebufferTextureLayerEXT 237
10647 void
10648 __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment,
10649 GLuint texture, GLint level,
10650 GLint layer)
10651 {
10652 struct glx_context *const gc = __glXGetCurrentContext();
10653 const GLuint cmdlen = 24;
10654 emit_header(gc->pc, X_GLrop_FramebufferTextureLayerEXT, cmdlen);
10655 (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
10656 (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4);
10657 (void) memcpy((void *) (gc->pc + 12), (void *) (&texture), 4);
10658 (void) memcpy((void *) (gc->pc + 16), (void *) (&level), 4);
10659 (void) memcpy((void *) (gc->pc + 20), (void *) (&layer), 4);
10660 gc->pc += cmdlen;
10661 if (__builtin_expect(gc->pc > gc->limit, 0)) {
10662 (void) __glXFlushRenderBuffer(gc, gc->pc);
10663 }
10664 }
10665
10666
10667 # undef FASTCALL
10668 # undef NOINLINE