Add mouse and keyboard configuration file
[profile/ivi/xorg-x11-server.git] / glx / indirect_dispatch.c
1 /* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
2
3 /*
4  * (C) Copyright IBM Corporation 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 #include <X11/Xmd.h>
29 #include <GL/gl.h>
30 #include <GL/glxproto.h>
31 #include <inttypes.h>
32 #include "indirect_size.h"
33 #include "indirect_size_get.h"
34 #include "indirect_dispatch.h"
35 #include "glxserver.h"
36 #include "glxbyteorder.h"
37 #include "indirect_util.h"
38 #include "singlesize.h"
39 #include "glapi.h"
40 #include "glapitable.h"
41 #include "glthread.h"
42 #include "dispatch.h"
43
44 #define __GLX_PAD(x)  (((x) + 3) & ~3)
45
46 typedef struct {
47     __GLX_PIXEL_3D_HDR;
48 } __GLXpixel3DHeader;
49
50 extern GLboolean __glXErrorOccured( void );
51 extern void __glXClearErrorOccured( void );
52
53 static const unsigned dummy_answer[2] = {0, 0};
54
55 int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc)
56 {
57     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
58     int error;
59     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
60
61     pc += __GLX_SINGLE_HDR_SIZE;
62     if ( cx != NULL ) {
63         CALL_NewList( GET_DISPATCH(), (
64             *(GLuint   *)(pc +  0),
65             *(GLenum   *)(pc +  4)
66         ) );
67         error = Success;
68     }
69
70     return error;
71 }
72
73 int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc)
74 {
75     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
76     int error;
77     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
78
79     pc += __GLX_SINGLE_HDR_SIZE;
80     if ( cx != NULL ) {
81         CALL_EndList( GET_DISPATCH(), () );
82         error = Success;
83     }
84
85     return error;
86 }
87
88 void __glXDisp_CallList(GLbyte * pc)
89 {
90     CALL_CallList( GET_DISPATCH(), (
91         *(GLuint   *)(pc +  0)
92     ) );
93 }
94
95 void __glXDisp_CallLists(GLbyte * pc)
96 {
97     const GLsizei n = *(GLsizei  *)(pc +  0);
98     const GLenum type = *(GLenum   *)(pc +  4);
99     const GLvoid * lists =  (const GLvoid *)(pc +  8);
100
101     CALL_CallLists( GET_DISPATCH(), (
102         n,
103         type,
104         lists
105     ) );
106 }
107
108 int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc)
109 {
110     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
111     int error;
112     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
113
114     pc += __GLX_SINGLE_HDR_SIZE;
115     if ( cx != NULL ) {
116         CALL_DeleteLists( GET_DISPATCH(), (
117             *(GLuint   *)(pc +  0),
118             *(GLsizei  *)(pc +  4)
119         ) );
120         error = Success;
121     }
122
123     return error;
124 }
125
126 int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc)
127 {
128     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
129     int error;
130     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
131
132     pc += __GLX_SINGLE_HDR_SIZE;
133     if ( cx != NULL ) {
134         GLuint retval;
135         retval = CALL_GenLists( GET_DISPATCH(), (
136             *(GLsizei  *)(pc +  0)
137         ) );
138         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
139         error = Success;
140     }
141
142     return error;
143 }
144
145 void __glXDisp_ListBase(GLbyte * pc)
146 {
147     CALL_ListBase( GET_DISPATCH(), (
148         *(GLuint   *)(pc +  0)
149     ) );
150 }
151
152 void __glXDisp_Begin(GLbyte * pc)
153 {
154     CALL_Begin( GET_DISPATCH(), (
155         *(GLenum   *)(pc +  0)
156     ) );
157 }
158
159 void __glXDisp_Bitmap(GLbyte * pc)
160 {
161     const GLubyte * const bitmap = (const GLubyte *) (pc + 44);
162     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
163
164     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
165     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
166     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
167     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
168     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
169
170     CALL_Bitmap( GET_DISPATCH(), (
171         *(GLsizei  *)(pc + 20),
172         *(GLsizei  *)(pc + 24),
173         *(GLfloat  *)(pc + 28),
174         *(GLfloat  *)(pc + 32),
175         *(GLfloat  *)(pc + 36),
176         *(GLfloat  *)(pc + 40),
177         bitmap
178     ) );
179 }
180
181 void __glXDisp_Color3bv(GLbyte * pc)
182 {
183     CALL_Color3bv( GET_DISPATCH(), (
184          (const GLbyte *)(pc +  0)
185     ) );
186 }
187
188 void __glXDisp_Color3dv(GLbyte * pc)
189 {
190 #ifdef __GLX_ALIGN64
191     if ((unsigned long)(pc) & 7) {
192         (void) memmove(pc-4, pc, 24);
193         pc -= 4;
194     }
195 #endif
196
197     CALL_Color3dv( GET_DISPATCH(), (
198          (const GLdouble *)(pc +  0)
199     ) );
200 }
201
202 void __glXDisp_Color3fv(GLbyte * pc)
203 {
204     CALL_Color3fv( GET_DISPATCH(), (
205          (const GLfloat *)(pc +  0)
206     ) );
207 }
208
209 void __glXDisp_Color3iv(GLbyte * pc)
210 {
211     CALL_Color3iv( GET_DISPATCH(), (
212          (const GLint *)(pc +  0)
213     ) );
214 }
215
216 void __glXDisp_Color3sv(GLbyte * pc)
217 {
218     CALL_Color3sv( GET_DISPATCH(), (
219          (const GLshort *)(pc +  0)
220     ) );
221 }
222
223 void __glXDisp_Color3ubv(GLbyte * pc)
224 {
225     CALL_Color3ubv( GET_DISPATCH(), (
226          (const GLubyte *)(pc +  0)
227     ) );
228 }
229
230 void __glXDisp_Color3uiv(GLbyte * pc)
231 {
232     CALL_Color3uiv( GET_DISPATCH(), (
233          (const GLuint *)(pc +  0)
234     ) );
235 }
236
237 void __glXDisp_Color3usv(GLbyte * pc)
238 {
239     CALL_Color3usv( GET_DISPATCH(), (
240          (const GLushort *)(pc +  0)
241     ) );
242 }
243
244 void __glXDisp_Color4bv(GLbyte * pc)
245 {
246     CALL_Color4bv( GET_DISPATCH(), (
247          (const GLbyte *)(pc +  0)
248     ) );
249 }
250
251 void __glXDisp_Color4dv(GLbyte * pc)
252 {
253 #ifdef __GLX_ALIGN64
254     if ((unsigned long)(pc) & 7) {
255         (void) memmove(pc-4, pc, 32);
256         pc -= 4;
257     }
258 #endif
259
260     CALL_Color4dv( GET_DISPATCH(), (
261          (const GLdouble *)(pc +  0)
262     ) );
263 }
264
265 void __glXDisp_Color4fv(GLbyte * pc)
266 {
267     CALL_Color4fv( GET_DISPATCH(), (
268          (const GLfloat *)(pc +  0)
269     ) );
270 }
271
272 void __glXDisp_Color4iv(GLbyte * pc)
273 {
274     CALL_Color4iv( GET_DISPATCH(), (
275          (const GLint *)(pc +  0)
276     ) );
277 }
278
279 void __glXDisp_Color4sv(GLbyte * pc)
280 {
281     CALL_Color4sv( GET_DISPATCH(), (
282          (const GLshort *)(pc +  0)
283     ) );
284 }
285
286 void __glXDisp_Color4ubv(GLbyte * pc)
287 {
288     CALL_Color4ubv( GET_DISPATCH(), (
289          (const GLubyte *)(pc +  0)
290     ) );
291 }
292
293 void __glXDisp_Color4uiv(GLbyte * pc)
294 {
295     CALL_Color4uiv( GET_DISPATCH(), (
296          (const GLuint *)(pc +  0)
297     ) );
298 }
299
300 void __glXDisp_Color4usv(GLbyte * pc)
301 {
302     CALL_Color4usv( GET_DISPATCH(), (
303          (const GLushort *)(pc +  0)
304     ) );
305 }
306
307 void __glXDisp_EdgeFlagv(GLbyte * pc)
308 {
309     CALL_EdgeFlagv( GET_DISPATCH(), (
310          (const GLboolean *)(pc +  0)
311     ) );
312 }
313
314 void __glXDisp_End(GLbyte * pc)
315 {
316     CALL_End( GET_DISPATCH(), () );
317 }
318
319 void __glXDisp_Indexdv(GLbyte * pc)
320 {
321 #ifdef __GLX_ALIGN64
322     if ((unsigned long)(pc) & 7) {
323         (void) memmove(pc-4, pc, 8);
324         pc -= 4;
325     }
326 #endif
327
328     CALL_Indexdv( GET_DISPATCH(), (
329          (const GLdouble *)(pc +  0)
330     ) );
331 }
332
333 void __glXDisp_Indexfv(GLbyte * pc)
334 {
335     CALL_Indexfv( GET_DISPATCH(), (
336          (const GLfloat *)(pc +  0)
337     ) );
338 }
339
340 void __glXDisp_Indexiv(GLbyte * pc)
341 {
342     CALL_Indexiv( GET_DISPATCH(), (
343          (const GLint *)(pc +  0)
344     ) );
345 }
346
347 void __glXDisp_Indexsv(GLbyte * pc)
348 {
349     CALL_Indexsv( GET_DISPATCH(), (
350          (const GLshort *)(pc +  0)
351     ) );
352 }
353
354 void __glXDisp_Normal3bv(GLbyte * pc)
355 {
356     CALL_Normal3bv( GET_DISPATCH(), (
357          (const GLbyte *)(pc +  0)
358     ) );
359 }
360
361 void __glXDisp_Normal3dv(GLbyte * pc)
362 {
363 #ifdef __GLX_ALIGN64
364     if ((unsigned long)(pc) & 7) {
365         (void) memmove(pc-4, pc, 24);
366         pc -= 4;
367     }
368 #endif
369
370     CALL_Normal3dv( GET_DISPATCH(), (
371          (const GLdouble *)(pc +  0)
372     ) );
373 }
374
375 void __glXDisp_Normal3fv(GLbyte * pc)
376 {
377     CALL_Normal3fv( GET_DISPATCH(), (
378          (const GLfloat *)(pc +  0)
379     ) );
380 }
381
382 void __glXDisp_Normal3iv(GLbyte * pc)
383 {
384     CALL_Normal3iv( GET_DISPATCH(), (
385          (const GLint *)(pc +  0)
386     ) );
387 }
388
389 void __glXDisp_Normal3sv(GLbyte * pc)
390 {
391     CALL_Normal3sv( GET_DISPATCH(), (
392          (const GLshort *)(pc +  0)
393     ) );
394 }
395
396 void __glXDisp_RasterPos2dv(GLbyte * pc)
397 {
398 #ifdef __GLX_ALIGN64
399     if ((unsigned long)(pc) & 7) {
400         (void) memmove(pc-4, pc, 16);
401         pc -= 4;
402     }
403 #endif
404
405     CALL_RasterPos2dv( GET_DISPATCH(), (
406          (const GLdouble *)(pc +  0)
407     ) );
408 }
409
410 void __glXDisp_RasterPos2fv(GLbyte * pc)
411 {
412     CALL_RasterPos2fv( GET_DISPATCH(), (
413          (const GLfloat *)(pc +  0)
414     ) );
415 }
416
417 void __glXDisp_RasterPos2iv(GLbyte * pc)
418 {
419     CALL_RasterPos2iv( GET_DISPATCH(), (
420          (const GLint *)(pc +  0)
421     ) );
422 }
423
424 void __glXDisp_RasterPos2sv(GLbyte * pc)
425 {
426     CALL_RasterPos2sv( GET_DISPATCH(), (
427          (const GLshort *)(pc +  0)
428     ) );
429 }
430
431 void __glXDisp_RasterPos3dv(GLbyte * pc)
432 {
433 #ifdef __GLX_ALIGN64
434     if ((unsigned long)(pc) & 7) {
435         (void) memmove(pc-4, pc, 24);
436         pc -= 4;
437     }
438 #endif
439
440     CALL_RasterPos3dv( GET_DISPATCH(), (
441          (const GLdouble *)(pc +  0)
442     ) );
443 }
444
445 void __glXDisp_RasterPos3fv(GLbyte * pc)
446 {
447     CALL_RasterPos3fv( GET_DISPATCH(), (
448          (const GLfloat *)(pc +  0)
449     ) );
450 }
451
452 void __glXDisp_RasterPos3iv(GLbyte * pc)
453 {
454     CALL_RasterPos3iv( GET_DISPATCH(), (
455          (const GLint *)(pc +  0)
456     ) );
457 }
458
459 void __glXDisp_RasterPos3sv(GLbyte * pc)
460 {
461     CALL_RasterPos3sv( GET_DISPATCH(), (
462          (const GLshort *)(pc +  0)
463     ) );
464 }
465
466 void __glXDisp_RasterPos4dv(GLbyte * pc)
467 {
468 #ifdef __GLX_ALIGN64
469     if ((unsigned long)(pc) & 7) {
470         (void) memmove(pc-4, pc, 32);
471         pc -= 4;
472     }
473 #endif
474
475     CALL_RasterPos4dv( GET_DISPATCH(), (
476          (const GLdouble *)(pc +  0)
477     ) );
478 }
479
480 void __glXDisp_RasterPos4fv(GLbyte * pc)
481 {
482     CALL_RasterPos4fv( GET_DISPATCH(), (
483          (const GLfloat *)(pc +  0)
484     ) );
485 }
486
487 void __glXDisp_RasterPos4iv(GLbyte * pc)
488 {
489     CALL_RasterPos4iv( GET_DISPATCH(), (
490          (const GLint *)(pc +  0)
491     ) );
492 }
493
494 void __glXDisp_RasterPos4sv(GLbyte * pc)
495 {
496     CALL_RasterPos4sv( GET_DISPATCH(), (
497          (const GLshort *)(pc +  0)
498     ) );
499 }
500
501 void __glXDisp_Rectdv(GLbyte * pc)
502 {
503 #ifdef __GLX_ALIGN64
504     if ((unsigned long)(pc) & 7) {
505         (void) memmove(pc-4, pc, 32);
506         pc -= 4;
507     }
508 #endif
509
510     CALL_Rectdv( GET_DISPATCH(), (
511          (const GLdouble *)(pc +  0),
512          (const GLdouble *)(pc + 16)
513     ) );
514 }
515
516 void __glXDisp_Rectfv(GLbyte * pc)
517 {
518     CALL_Rectfv( GET_DISPATCH(), (
519          (const GLfloat *)(pc +  0),
520          (const GLfloat *)(pc +  8)
521     ) );
522 }
523
524 void __glXDisp_Rectiv(GLbyte * pc)
525 {
526     CALL_Rectiv( GET_DISPATCH(), (
527          (const GLint *)(pc +  0),
528          (const GLint *)(pc +  8)
529     ) );
530 }
531
532 void __glXDisp_Rectsv(GLbyte * pc)
533 {
534     CALL_Rectsv( GET_DISPATCH(), (
535          (const GLshort *)(pc +  0),
536          (const GLshort *)(pc +  4)
537     ) );
538 }
539
540 void __glXDisp_TexCoord1dv(GLbyte * pc)
541 {
542 #ifdef __GLX_ALIGN64
543     if ((unsigned long)(pc) & 7) {
544         (void) memmove(pc-4, pc, 8);
545         pc -= 4;
546     }
547 #endif
548
549     CALL_TexCoord1dv( GET_DISPATCH(), (
550          (const GLdouble *)(pc +  0)
551     ) );
552 }
553
554 void __glXDisp_TexCoord1fv(GLbyte * pc)
555 {
556     CALL_TexCoord1fv( GET_DISPATCH(), (
557          (const GLfloat *)(pc +  0)
558     ) );
559 }
560
561 void __glXDisp_TexCoord1iv(GLbyte * pc)
562 {
563     CALL_TexCoord1iv( GET_DISPATCH(), (
564          (const GLint *)(pc +  0)
565     ) );
566 }
567
568 void __glXDisp_TexCoord1sv(GLbyte * pc)
569 {
570     CALL_TexCoord1sv( GET_DISPATCH(), (
571          (const GLshort *)(pc +  0)
572     ) );
573 }
574
575 void __glXDisp_TexCoord2dv(GLbyte * pc)
576 {
577 #ifdef __GLX_ALIGN64
578     if ((unsigned long)(pc) & 7) {
579         (void) memmove(pc-4, pc, 16);
580         pc -= 4;
581     }
582 #endif
583
584     CALL_TexCoord2dv( GET_DISPATCH(), (
585          (const GLdouble *)(pc +  0)
586     ) );
587 }
588
589 void __glXDisp_TexCoord2fv(GLbyte * pc)
590 {
591     CALL_TexCoord2fv( GET_DISPATCH(), (
592          (const GLfloat *)(pc +  0)
593     ) );
594 }
595
596 void __glXDisp_TexCoord2iv(GLbyte * pc)
597 {
598     CALL_TexCoord2iv( GET_DISPATCH(), (
599          (const GLint *)(pc +  0)
600     ) );
601 }
602
603 void __glXDisp_TexCoord2sv(GLbyte * pc)
604 {
605     CALL_TexCoord2sv( GET_DISPATCH(), (
606          (const GLshort *)(pc +  0)
607     ) );
608 }
609
610 void __glXDisp_TexCoord3dv(GLbyte * pc)
611 {
612 #ifdef __GLX_ALIGN64
613     if ((unsigned long)(pc) & 7) {
614         (void) memmove(pc-4, pc, 24);
615         pc -= 4;
616     }
617 #endif
618
619     CALL_TexCoord3dv( GET_DISPATCH(), (
620          (const GLdouble *)(pc +  0)
621     ) );
622 }
623
624 void __glXDisp_TexCoord3fv(GLbyte * pc)
625 {
626     CALL_TexCoord3fv( GET_DISPATCH(), (
627          (const GLfloat *)(pc +  0)
628     ) );
629 }
630
631 void __glXDisp_TexCoord3iv(GLbyte * pc)
632 {
633     CALL_TexCoord3iv( GET_DISPATCH(), (
634          (const GLint *)(pc +  0)
635     ) );
636 }
637
638 void __glXDisp_TexCoord3sv(GLbyte * pc)
639 {
640     CALL_TexCoord3sv( GET_DISPATCH(), (
641          (const GLshort *)(pc +  0)
642     ) );
643 }
644
645 void __glXDisp_TexCoord4dv(GLbyte * pc)
646 {
647 #ifdef __GLX_ALIGN64
648     if ((unsigned long)(pc) & 7) {
649         (void) memmove(pc-4, pc, 32);
650         pc -= 4;
651     }
652 #endif
653
654     CALL_TexCoord4dv( GET_DISPATCH(), (
655          (const GLdouble *)(pc +  0)
656     ) );
657 }
658
659 void __glXDisp_TexCoord4fv(GLbyte * pc)
660 {
661     CALL_TexCoord4fv( GET_DISPATCH(), (
662          (const GLfloat *)(pc +  0)
663     ) );
664 }
665
666 void __glXDisp_TexCoord4iv(GLbyte * pc)
667 {
668     CALL_TexCoord4iv( GET_DISPATCH(), (
669          (const GLint *)(pc +  0)
670     ) );
671 }
672
673 void __glXDisp_TexCoord4sv(GLbyte * pc)
674 {
675     CALL_TexCoord4sv( GET_DISPATCH(), (
676          (const GLshort *)(pc +  0)
677     ) );
678 }
679
680 void __glXDisp_Vertex2dv(GLbyte * pc)
681 {
682 #ifdef __GLX_ALIGN64
683     if ((unsigned long)(pc) & 7) {
684         (void) memmove(pc-4, pc, 16);
685         pc -= 4;
686     }
687 #endif
688
689     CALL_Vertex2dv( GET_DISPATCH(), (
690          (const GLdouble *)(pc +  0)
691     ) );
692 }
693
694 void __glXDisp_Vertex2fv(GLbyte * pc)
695 {
696     CALL_Vertex2fv( GET_DISPATCH(), (
697          (const GLfloat *)(pc +  0)
698     ) );
699 }
700
701 void __glXDisp_Vertex2iv(GLbyte * pc)
702 {
703     CALL_Vertex2iv( GET_DISPATCH(), (
704          (const GLint *)(pc +  0)
705     ) );
706 }
707
708 void __glXDisp_Vertex2sv(GLbyte * pc)
709 {
710     CALL_Vertex2sv( GET_DISPATCH(), (
711          (const GLshort *)(pc +  0)
712     ) );
713 }
714
715 void __glXDisp_Vertex3dv(GLbyte * pc)
716 {
717 #ifdef __GLX_ALIGN64
718     if ((unsigned long)(pc) & 7) {
719         (void) memmove(pc-4, pc, 24);
720         pc -= 4;
721     }
722 #endif
723
724     CALL_Vertex3dv( GET_DISPATCH(), (
725          (const GLdouble *)(pc +  0)
726     ) );
727 }
728
729 void __glXDisp_Vertex3fv(GLbyte * pc)
730 {
731     CALL_Vertex3fv( GET_DISPATCH(), (
732          (const GLfloat *)(pc +  0)
733     ) );
734 }
735
736 void __glXDisp_Vertex3iv(GLbyte * pc)
737 {
738     CALL_Vertex3iv( GET_DISPATCH(), (
739          (const GLint *)(pc +  0)
740     ) );
741 }
742
743 void __glXDisp_Vertex3sv(GLbyte * pc)
744 {
745     CALL_Vertex3sv( GET_DISPATCH(), (
746          (const GLshort *)(pc +  0)
747     ) );
748 }
749
750 void __glXDisp_Vertex4dv(GLbyte * pc)
751 {
752 #ifdef __GLX_ALIGN64
753     if ((unsigned long)(pc) & 7) {
754         (void) memmove(pc-4, pc, 32);
755         pc -= 4;
756     }
757 #endif
758
759     CALL_Vertex4dv( GET_DISPATCH(), (
760          (const GLdouble *)(pc +  0)
761     ) );
762 }
763
764 void __glXDisp_Vertex4fv(GLbyte * pc)
765 {
766     CALL_Vertex4fv( GET_DISPATCH(), (
767          (const GLfloat *)(pc +  0)
768     ) );
769 }
770
771 void __glXDisp_Vertex4iv(GLbyte * pc)
772 {
773     CALL_Vertex4iv( GET_DISPATCH(), (
774          (const GLint *)(pc +  0)
775     ) );
776 }
777
778 void __glXDisp_Vertex4sv(GLbyte * pc)
779 {
780     CALL_Vertex4sv( GET_DISPATCH(), (
781          (const GLshort *)(pc +  0)
782     ) );
783 }
784
785 void __glXDisp_ClipPlane(GLbyte * pc)
786 {
787 #ifdef __GLX_ALIGN64
788     if ((unsigned long)(pc) & 7) {
789         (void) memmove(pc-4, pc, 36);
790         pc -= 4;
791     }
792 #endif
793
794     CALL_ClipPlane( GET_DISPATCH(), (
795         *(GLenum   *)(pc + 32),
796          (const GLdouble *)(pc +  0)
797     ) );
798 }
799
800 void __glXDisp_ColorMaterial(GLbyte * pc)
801 {
802     CALL_ColorMaterial( GET_DISPATCH(), (
803         *(GLenum   *)(pc +  0),
804         *(GLenum   *)(pc +  4)
805     ) );
806 }
807
808 void __glXDisp_CullFace(GLbyte * pc)
809 {
810     CALL_CullFace( GET_DISPATCH(), (
811         *(GLenum   *)(pc +  0)
812     ) );
813 }
814
815 void __glXDisp_Fogf(GLbyte * pc)
816 {
817     CALL_Fogf( GET_DISPATCH(), (
818         *(GLenum   *)(pc +  0),
819         *(GLfloat  *)(pc +  4)
820     ) );
821 }
822
823 void __glXDisp_Fogfv(GLbyte * pc)
824 {
825     const GLenum pname = *(GLenum   *)(pc +  0);
826     const GLfloat * params;
827
828     params = (const GLfloat *) (pc + 4);
829
830     CALL_Fogfv( GET_DISPATCH(), (
831         pname,
832         params
833     ) );
834 }
835
836 void __glXDisp_Fogi(GLbyte * pc)
837 {
838     CALL_Fogi( GET_DISPATCH(), (
839         *(GLenum   *)(pc +  0),
840         *(GLint    *)(pc +  4)
841     ) );
842 }
843
844 void __glXDisp_Fogiv(GLbyte * pc)
845 {
846     const GLenum pname = *(GLenum   *)(pc +  0);
847     const GLint * params;
848
849     params = (const GLint *) (pc + 4);
850
851     CALL_Fogiv( GET_DISPATCH(), (
852         pname,
853         params
854     ) );
855 }
856
857 void __glXDisp_FrontFace(GLbyte * pc)
858 {
859     CALL_FrontFace( GET_DISPATCH(), (
860         *(GLenum   *)(pc +  0)
861     ) );
862 }
863
864 void __glXDisp_Hint(GLbyte * pc)
865 {
866     CALL_Hint( GET_DISPATCH(), (
867         *(GLenum   *)(pc +  0),
868         *(GLenum   *)(pc +  4)
869     ) );
870 }
871
872 void __glXDisp_Lightf(GLbyte * pc)
873 {
874     CALL_Lightf( GET_DISPATCH(), (
875         *(GLenum   *)(pc +  0),
876         *(GLenum   *)(pc +  4),
877         *(GLfloat  *)(pc +  8)
878     ) );
879 }
880
881 void __glXDisp_Lightfv(GLbyte * pc)
882 {
883     const GLenum pname = *(GLenum   *)(pc +  4);
884     const GLfloat * params;
885
886     params = (const GLfloat *) (pc + 8);
887
888     CALL_Lightfv( GET_DISPATCH(), (
889         *(GLenum   *)(pc +  0),
890         pname,
891         params
892     ) );
893 }
894
895 void __glXDisp_Lighti(GLbyte * pc)
896 {
897     CALL_Lighti( GET_DISPATCH(), (
898         *(GLenum   *)(pc +  0),
899         *(GLenum   *)(pc +  4),
900         *(GLint    *)(pc +  8)
901     ) );
902 }
903
904 void __glXDisp_Lightiv(GLbyte * pc)
905 {
906     const GLenum pname = *(GLenum   *)(pc +  4);
907     const GLint * params;
908
909     params = (const GLint *) (pc + 8);
910
911     CALL_Lightiv( GET_DISPATCH(), (
912         *(GLenum   *)(pc +  0),
913         pname,
914         params
915     ) );
916 }
917
918 void __glXDisp_LightModelf(GLbyte * pc)
919 {
920     CALL_LightModelf( GET_DISPATCH(), (
921         *(GLenum   *)(pc +  0),
922         *(GLfloat  *)(pc +  4)
923     ) );
924 }
925
926 void __glXDisp_LightModelfv(GLbyte * pc)
927 {
928     const GLenum pname = *(GLenum   *)(pc +  0);
929     const GLfloat * params;
930
931     params = (const GLfloat *) (pc + 4);
932
933     CALL_LightModelfv( GET_DISPATCH(), (
934         pname,
935         params
936     ) );
937 }
938
939 void __glXDisp_LightModeli(GLbyte * pc)
940 {
941     CALL_LightModeli( GET_DISPATCH(), (
942         *(GLenum   *)(pc +  0),
943         *(GLint    *)(pc +  4)
944     ) );
945 }
946
947 void __glXDisp_LightModeliv(GLbyte * pc)
948 {
949     const GLenum pname = *(GLenum   *)(pc +  0);
950     const GLint * params;
951
952     params = (const GLint *) (pc + 4);
953
954     CALL_LightModeliv( GET_DISPATCH(), (
955         pname,
956         params
957     ) );
958 }
959
960 void __glXDisp_LineStipple(GLbyte * pc)
961 {
962     CALL_LineStipple( GET_DISPATCH(), (
963         *(GLint    *)(pc +  0),
964         *(GLushort *)(pc +  4)
965     ) );
966 }
967
968 void __glXDisp_LineWidth(GLbyte * pc)
969 {
970     CALL_LineWidth( GET_DISPATCH(), (
971         *(GLfloat  *)(pc +  0)
972     ) );
973 }
974
975 void __glXDisp_Materialf(GLbyte * pc)
976 {
977     CALL_Materialf( GET_DISPATCH(), (
978         *(GLenum   *)(pc +  0),
979         *(GLenum   *)(pc +  4),
980         *(GLfloat  *)(pc +  8)
981     ) );
982 }
983
984 void __glXDisp_Materialfv(GLbyte * pc)
985 {
986     const GLenum pname = *(GLenum   *)(pc +  4);
987     const GLfloat * params;
988
989     params = (const GLfloat *) (pc + 8);
990
991     CALL_Materialfv( GET_DISPATCH(), (
992         *(GLenum   *)(pc +  0),
993         pname,
994         params
995     ) );
996 }
997
998 void __glXDisp_Materiali(GLbyte * pc)
999 {
1000     CALL_Materiali( GET_DISPATCH(), (
1001         *(GLenum   *)(pc +  0),
1002         *(GLenum   *)(pc +  4),
1003         *(GLint    *)(pc +  8)
1004     ) );
1005 }
1006
1007 void __glXDisp_Materialiv(GLbyte * pc)
1008 {
1009     const GLenum pname = *(GLenum   *)(pc +  4);
1010     const GLint * params;
1011
1012     params = (const GLint *) (pc + 8);
1013
1014     CALL_Materialiv( GET_DISPATCH(), (
1015         *(GLenum   *)(pc +  0),
1016         pname,
1017         params
1018     ) );
1019 }
1020
1021 void __glXDisp_PointSize(GLbyte * pc)
1022 {
1023     CALL_PointSize( GET_DISPATCH(), (
1024         *(GLfloat  *)(pc +  0)
1025     ) );
1026 }
1027
1028 void __glXDisp_PolygonMode(GLbyte * pc)
1029 {
1030     CALL_PolygonMode( GET_DISPATCH(), (
1031         *(GLenum   *)(pc +  0),
1032         *(GLenum   *)(pc +  4)
1033     ) );
1034 }
1035
1036 void __glXDisp_PolygonStipple(GLbyte * pc)
1037 {
1038     const GLubyte * const mask = (const GLubyte *) (pc + 20);
1039     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
1040
1041     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
1042     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
1043     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
1044     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
1045     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
1046
1047     CALL_PolygonStipple( GET_DISPATCH(), (
1048         mask
1049     ) );
1050 }
1051
1052 void __glXDisp_Scissor(GLbyte * pc)
1053 {
1054     CALL_Scissor( GET_DISPATCH(), (
1055         *(GLint    *)(pc +  0),
1056         *(GLint    *)(pc +  4),
1057         *(GLsizei  *)(pc +  8),
1058         *(GLsizei  *)(pc + 12)
1059     ) );
1060 }
1061
1062 void __glXDisp_ShadeModel(GLbyte * pc)
1063 {
1064     CALL_ShadeModel( GET_DISPATCH(), (
1065         *(GLenum   *)(pc +  0)
1066     ) );
1067 }
1068
1069 void __glXDisp_TexParameterf(GLbyte * pc)
1070 {
1071     CALL_TexParameterf( GET_DISPATCH(), (
1072         *(GLenum   *)(pc +  0),
1073         *(GLenum   *)(pc +  4),
1074         *(GLfloat  *)(pc +  8)
1075     ) );
1076 }
1077
1078 void __glXDisp_TexParameterfv(GLbyte * pc)
1079 {
1080     const GLenum pname = *(GLenum   *)(pc +  4);
1081     const GLfloat * params;
1082
1083     params = (const GLfloat *) (pc + 8);
1084
1085     CALL_TexParameterfv( GET_DISPATCH(), (
1086         *(GLenum   *)(pc +  0),
1087         pname,
1088         params
1089     ) );
1090 }
1091
1092 void __glXDisp_TexParameteri(GLbyte * pc)
1093 {
1094     CALL_TexParameteri( GET_DISPATCH(), (
1095         *(GLenum   *)(pc +  0),
1096         *(GLenum   *)(pc +  4),
1097         *(GLint    *)(pc +  8)
1098     ) );
1099 }
1100
1101 void __glXDisp_TexParameteriv(GLbyte * pc)
1102 {
1103     const GLenum pname = *(GLenum   *)(pc +  4);
1104     const GLint * params;
1105
1106     params = (const GLint *) (pc + 8);
1107
1108     CALL_TexParameteriv( GET_DISPATCH(), (
1109         *(GLenum   *)(pc +  0),
1110         pname,
1111         params
1112     ) );
1113 }
1114
1115 void __glXDisp_TexImage1D(GLbyte * pc)
1116 {
1117     const GLvoid * const pixels = (const GLvoid *) (pc + 52);
1118     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
1119
1120     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
1121     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
1122     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
1123     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
1124     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
1125     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
1126
1127     CALL_TexImage1D( GET_DISPATCH(), (
1128         *(GLenum   *)(pc + 20),
1129         *(GLint    *)(pc + 24),
1130         *(GLint    *)(pc + 28),
1131         *(GLsizei  *)(pc + 32),
1132         *(GLint    *)(pc + 40),
1133         *(GLenum   *)(pc + 44),
1134         *(GLenum   *)(pc + 48),
1135         pixels
1136     ) );
1137 }
1138
1139 void __glXDisp_TexImage2D(GLbyte * pc)
1140 {
1141     const GLvoid * const pixels = (const GLvoid *) (pc + 52);
1142     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
1143
1144     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
1145     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
1146     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
1147     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
1148     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
1149     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
1150
1151     CALL_TexImage2D( GET_DISPATCH(), (
1152         *(GLenum   *)(pc + 20),
1153         *(GLint    *)(pc + 24),
1154         *(GLint    *)(pc + 28),
1155         *(GLsizei  *)(pc + 32),
1156         *(GLsizei  *)(pc + 36),
1157         *(GLint    *)(pc + 40),
1158         *(GLenum   *)(pc + 44),
1159         *(GLenum   *)(pc + 48),
1160         pixels
1161     ) );
1162 }
1163
1164 void __glXDisp_TexEnvf(GLbyte * pc)
1165 {
1166     CALL_TexEnvf( GET_DISPATCH(), (
1167         *(GLenum   *)(pc +  0),
1168         *(GLenum   *)(pc +  4),
1169         *(GLfloat  *)(pc +  8)
1170     ) );
1171 }
1172
1173 void __glXDisp_TexEnvfv(GLbyte * pc)
1174 {
1175     const GLenum pname = *(GLenum   *)(pc +  4);
1176     const GLfloat * params;
1177
1178     params = (const GLfloat *) (pc + 8);
1179
1180     CALL_TexEnvfv( GET_DISPATCH(), (
1181         *(GLenum   *)(pc +  0),
1182         pname,
1183         params
1184     ) );
1185 }
1186
1187 void __glXDisp_TexEnvi(GLbyte * pc)
1188 {
1189     CALL_TexEnvi( GET_DISPATCH(), (
1190         *(GLenum   *)(pc +  0),
1191         *(GLenum   *)(pc +  4),
1192         *(GLint    *)(pc +  8)
1193     ) );
1194 }
1195
1196 void __glXDisp_TexEnviv(GLbyte * pc)
1197 {
1198     const GLenum pname = *(GLenum   *)(pc +  4);
1199     const GLint * params;
1200
1201     params = (const GLint *) (pc + 8);
1202
1203     CALL_TexEnviv( GET_DISPATCH(), (
1204         *(GLenum   *)(pc +  0),
1205         pname,
1206         params
1207     ) );
1208 }
1209
1210 void __glXDisp_TexGend(GLbyte * pc)
1211 {
1212 #ifdef __GLX_ALIGN64
1213     if ((unsigned long)(pc) & 7) {
1214         (void) memmove(pc-4, pc, 16);
1215         pc -= 4;
1216     }
1217 #endif
1218
1219     CALL_TexGend( GET_DISPATCH(), (
1220         *(GLenum   *)(pc +  8),
1221         *(GLenum   *)(pc + 12),
1222         *(GLdouble *)(pc +  0)
1223     ) );
1224 }
1225
1226 void __glXDisp_TexGendv(GLbyte * pc)
1227 {
1228     const GLenum pname = *(GLenum   *)(pc +  4);
1229     const GLdouble * params;
1230
1231 #ifdef __GLX_ALIGN64
1232     const GLuint compsize = __glTexGendv_size(pname);
1233     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
1234     if ((unsigned long)(pc) & 7) {
1235         (void) memmove(pc-4, pc, cmdlen);
1236         pc -= 4;
1237     }
1238 #endif
1239
1240     params = (const GLdouble *) (pc + 8);
1241
1242     CALL_TexGendv( GET_DISPATCH(), (
1243         *(GLenum   *)(pc +  0),
1244         pname,
1245         params
1246     ) );
1247 }
1248
1249 void __glXDisp_TexGenf(GLbyte * pc)
1250 {
1251     CALL_TexGenf( GET_DISPATCH(), (
1252         *(GLenum   *)(pc +  0),
1253         *(GLenum   *)(pc +  4),
1254         *(GLfloat  *)(pc +  8)
1255     ) );
1256 }
1257
1258 void __glXDisp_TexGenfv(GLbyte * pc)
1259 {
1260     const GLenum pname = *(GLenum   *)(pc +  4);
1261     const GLfloat * params;
1262
1263     params = (const GLfloat *) (pc + 8);
1264
1265     CALL_TexGenfv( GET_DISPATCH(), (
1266         *(GLenum   *)(pc +  0),
1267         pname,
1268         params
1269     ) );
1270 }
1271
1272 void __glXDisp_TexGeni(GLbyte * pc)
1273 {
1274     CALL_TexGeni( GET_DISPATCH(), (
1275         *(GLenum   *)(pc +  0),
1276         *(GLenum   *)(pc +  4),
1277         *(GLint    *)(pc +  8)
1278     ) );
1279 }
1280
1281 void __glXDisp_TexGeniv(GLbyte * pc)
1282 {
1283     const GLenum pname = *(GLenum   *)(pc +  4);
1284     const GLint * params;
1285
1286     params = (const GLint *) (pc + 8);
1287
1288     CALL_TexGeniv( GET_DISPATCH(), (
1289         *(GLenum   *)(pc +  0),
1290         pname,
1291         params
1292     ) );
1293 }
1294
1295 void __glXDisp_InitNames(GLbyte * pc)
1296 {
1297     CALL_InitNames( GET_DISPATCH(), () );
1298 }
1299
1300 void __glXDisp_LoadName(GLbyte * pc)
1301 {
1302     CALL_LoadName( GET_DISPATCH(), (
1303         *(GLuint   *)(pc +  0)
1304     ) );
1305 }
1306
1307 void __glXDisp_PassThrough(GLbyte * pc)
1308 {
1309     CALL_PassThrough( GET_DISPATCH(), (
1310         *(GLfloat  *)(pc +  0)
1311     ) );
1312 }
1313
1314 void __glXDisp_PopName(GLbyte * pc)
1315 {
1316     CALL_PopName( GET_DISPATCH(), () );
1317 }
1318
1319 void __glXDisp_PushName(GLbyte * pc)
1320 {
1321     CALL_PushName( GET_DISPATCH(), (
1322         *(GLuint   *)(pc +  0)
1323     ) );
1324 }
1325
1326 void __glXDisp_DrawBuffer(GLbyte * pc)
1327 {
1328     CALL_DrawBuffer( GET_DISPATCH(), (
1329         *(GLenum   *)(pc +  0)
1330     ) );
1331 }
1332
1333 void __glXDisp_Clear(GLbyte * pc)
1334 {
1335     CALL_Clear( GET_DISPATCH(), (
1336         *(GLbitfield *)(pc +  0)
1337     ) );
1338 }
1339
1340 void __glXDisp_ClearAccum(GLbyte * pc)
1341 {
1342     CALL_ClearAccum( GET_DISPATCH(), (
1343         *(GLfloat  *)(pc +  0),
1344         *(GLfloat  *)(pc +  4),
1345         *(GLfloat  *)(pc +  8),
1346         *(GLfloat  *)(pc + 12)
1347     ) );
1348 }
1349
1350 void __glXDisp_ClearIndex(GLbyte * pc)
1351 {
1352     CALL_ClearIndex( GET_DISPATCH(), (
1353         *(GLfloat  *)(pc +  0)
1354     ) );
1355 }
1356
1357 void __glXDisp_ClearColor(GLbyte * pc)
1358 {
1359     CALL_ClearColor( GET_DISPATCH(), (
1360         *(GLclampf *)(pc +  0),
1361         *(GLclampf *)(pc +  4),
1362         *(GLclampf *)(pc +  8),
1363         *(GLclampf *)(pc + 12)
1364     ) );
1365 }
1366
1367 void __glXDisp_ClearStencil(GLbyte * pc)
1368 {
1369     CALL_ClearStencil( GET_DISPATCH(), (
1370         *(GLint    *)(pc +  0)
1371     ) );
1372 }
1373
1374 void __glXDisp_ClearDepth(GLbyte * pc)
1375 {
1376 #ifdef __GLX_ALIGN64
1377     if ((unsigned long)(pc) & 7) {
1378         (void) memmove(pc-4, pc, 8);
1379         pc -= 4;
1380     }
1381 #endif
1382
1383     CALL_ClearDepth( GET_DISPATCH(), (
1384         *(GLclampd *)(pc +  0)
1385     ) );
1386 }
1387
1388 void __glXDisp_StencilMask(GLbyte * pc)
1389 {
1390     CALL_StencilMask( GET_DISPATCH(), (
1391         *(GLuint   *)(pc +  0)
1392     ) );
1393 }
1394
1395 void __glXDisp_ColorMask(GLbyte * pc)
1396 {
1397     CALL_ColorMask( GET_DISPATCH(), (
1398         *(GLboolean *)(pc +  0),
1399         *(GLboolean *)(pc +  1),
1400         *(GLboolean *)(pc +  2),
1401         *(GLboolean *)(pc +  3)
1402     ) );
1403 }
1404
1405 void __glXDisp_DepthMask(GLbyte * pc)
1406 {
1407     CALL_DepthMask( GET_DISPATCH(), (
1408         *(GLboolean *)(pc +  0)
1409     ) );
1410 }
1411
1412 void __glXDisp_IndexMask(GLbyte * pc)
1413 {
1414     CALL_IndexMask( GET_DISPATCH(), (
1415         *(GLuint   *)(pc +  0)
1416     ) );
1417 }
1418
1419 void __glXDisp_Accum(GLbyte * pc)
1420 {
1421     CALL_Accum( GET_DISPATCH(), (
1422         *(GLenum   *)(pc +  0),
1423         *(GLfloat  *)(pc +  4)
1424     ) );
1425 }
1426
1427 void __glXDisp_Disable(GLbyte * pc)
1428 {
1429     CALL_Disable( GET_DISPATCH(), (
1430         *(GLenum   *)(pc +  0)
1431     ) );
1432 }
1433
1434 void __glXDisp_Enable(GLbyte * pc)
1435 {
1436     CALL_Enable( GET_DISPATCH(), (
1437         *(GLenum   *)(pc +  0)
1438     ) );
1439 }
1440
1441 void __glXDisp_PopAttrib(GLbyte * pc)
1442 {
1443     CALL_PopAttrib( GET_DISPATCH(), () );
1444 }
1445
1446 void __glXDisp_PushAttrib(GLbyte * pc)
1447 {
1448     CALL_PushAttrib( GET_DISPATCH(), (
1449         *(GLbitfield *)(pc +  0)
1450     ) );
1451 }
1452
1453 void __glXDisp_MapGrid1d(GLbyte * pc)
1454 {
1455 #ifdef __GLX_ALIGN64
1456     if ((unsigned long)(pc) & 7) {
1457         (void) memmove(pc-4, pc, 20);
1458         pc -= 4;
1459     }
1460 #endif
1461
1462     CALL_MapGrid1d( GET_DISPATCH(), (
1463         *(GLint    *)(pc + 16),
1464         *(GLdouble *)(pc +  0),
1465         *(GLdouble *)(pc +  8)
1466     ) );
1467 }
1468
1469 void __glXDisp_MapGrid1f(GLbyte * pc)
1470 {
1471     CALL_MapGrid1f( GET_DISPATCH(), (
1472         *(GLint    *)(pc +  0),
1473         *(GLfloat  *)(pc +  4),
1474         *(GLfloat  *)(pc +  8)
1475     ) );
1476 }
1477
1478 void __glXDisp_MapGrid2d(GLbyte * pc)
1479 {
1480 #ifdef __GLX_ALIGN64
1481     if ((unsigned long)(pc) & 7) {
1482         (void) memmove(pc-4, pc, 40);
1483         pc -= 4;
1484     }
1485 #endif
1486
1487     CALL_MapGrid2d( GET_DISPATCH(), (
1488         *(GLint    *)(pc + 32),
1489         *(GLdouble *)(pc +  0),
1490         *(GLdouble *)(pc +  8),
1491         *(GLint    *)(pc + 36),
1492         *(GLdouble *)(pc + 16),
1493         *(GLdouble *)(pc + 24)
1494     ) );
1495 }
1496
1497 void __glXDisp_MapGrid2f(GLbyte * pc)
1498 {
1499     CALL_MapGrid2f( GET_DISPATCH(), (
1500         *(GLint    *)(pc +  0),
1501         *(GLfloat  *)(pc +  4),
1502         *(GLfloat  *)(pc +  8),
1503         *(GLint    *)(pc + 12),
1504         *(GLfloat  *)(pc + 16),
1505         *(GLfloat  *)(pc + 20)
1506     ) );
1507 }
1508
1509 void __glXDisp_EvalCoord1dv(GLbyte * pc)
1510 {
1511 #ifdef __GLX_ALIGN64
1512     if ((unsigned long)(pc) & 7) {
1513         (void) memmove(pc-4, pc, 8);
1514         pc -= 4;
1515     }
1516 #endif
1517
1518     CALL_EvalCoord1dv( GET_DISPATCH(), (
1519          (const GLdouble *)(pc +  0)
1520     ) );
1521 }
1522
1523 void __glXDisp_EvalCoord1fv(GLbyte * pc)
1524 {
1525     CALL_EvalCoord1fv( GET_DISPATCH(), (
1526          (const GLfloat *)(pc +  0)
1527     ) );
1528 }
1529
1530 void __glXDisp_EvalCoord2dv(GLbyte * pc)
1531 {
1532 #ifdef __GLX_ALIGN64
1533     if ((unsigned long)(pc) & 7) {
1534         (void) memmove(pc-4, pc, 16);
1535         pc -= 4;
1536     }
1537 #endif
1538
1539     CALL_EvalCoord2dv( GET_DISPATCH(), (
1540          (const GLdouble *)(pc +  0)
1541     ) );
1542 }
1543
1544 void __glXDisp_EvalCoord2fv(GLbyte * pc)
1545 {
1546     CALL_EvalCoord2fv( GET_DISPATCH(), (
1547          (const GLfloat *)(pc +  0)
1548     ) );
1549 }
1550
1551 void __glXDisp_EvalMesh1(GLbyte * pc)
1552 {
1553     CALL_EvalMesh1( GET_DISPATCH(), (
1554         *(GLenum   *)(pc +  0),
1555         *(GLint    *)(pc +  4),
1556         *(GLint    *)(pc +  8)
1557     ) );
1558 }
1559
1560 void __glXDisp_EvalPoint1(GLbyte * pc)
1561 {
1562     CALL_EvalPoint1( GET_DISPATCH(), (
1563         *(GLint    *)(pc +  0)
1564     ) );
1565 }
1566
1567 void __glXDisp_EvalMesh2(GLbyte * pc)
1568 {
1569     CALL_EvalMesh2( GET_DISPATCH(), (
1570         *(GLenum   *)(pc +  0),
1571         *(GLint    *)(pc +  4),
1572         *(GLint    *)(pc +  8),
1573         *(GLint    *)(pc + 12),
1574         *(GLint    *)(pc + 16)
1575     ) );
1576 }
1577
1578 void __glXDisp_EvalPoint2(GLbyte * pc)
1579 {
1580     CALL_EvalPoint2( GET_DISPATCH(), (
1581         *(GLint    *)(pc +  0),
1582         *(GLint    *)(pc +  4)
1583     ) );
1584 }
1585
1586 void __glXDisp_AlphaFunc(GLbyte * pc)
1587 {
1588     CALL_AlphaFunc( GET_DISPATCH(), (
1589         *(GLenum   *)(pc +  0),
1590         *(GLclampf *)(pc +  4)
1591     ) );
1592 }
1593
1594 void __glXDisp_BlendFunc(GLbyte * pc)
1595 {
1596     CALL_BlendFunc( GET_DISPATCH(), (
1597         *(GLenum   *)(pc +  0),
1598         *(GLenum   *)(pc +  4)
1599     ) );
1600 }
1601
1602 void __glXDisp_LogicOp(GLbyte * pc)
1603 {
1604     CALL_LogicOp( GET_DISPATCH(), (
1605         *(GLenum   *)(pc +  0)
1606     ) );
1607 }
1608
1609 void __glXDisp_StencilFunc(GLbyte * pc)
1610 {
1611     CALL_StencilFunc( GET_DISPATCH(), (
1612         *(GLenum   *)(pc +  0),
1613         *(GLint    *)(pc +  4),
1614         *(GLuint   *)(pc +  8)
1615     ) );
1616 }
1617
1618 void __glXDisp_StencilOp(GLbyte * pc)
1619 {
1620     CALL_StencilOp( GET_DISPATCH(), (
1621         *(GLenum   *)(pc +  0),
1622         *(GLenum   *)(pc +  4),
1623         *(GLenum   *)(pc +  8)
1624     ) );
1625 }
1626
1627 void __glXDisp_DepthFunc(GLbyte * pc)
1628 {
1629     CALL_DepthFunc( GET_DISPATCH(), (
1630         *(GLenum   *)(pc +  0)
1631     ) );
1632 }
1633
1634 void __glXDisp_PixelZoom(GLbyte * pc)
1635 {
1636     CALL_PixelZoom( GET_DISPATCH(), (
1637         *(GLfloat  *)(pc +  0),
1638         *(GLfloat  *)(pc +  4)
1639     ) );
1640 }
1641
1642 void __glXDisp_PixelTransferf(GLbyte * pc)
1643 {
1644     CALL_PixelTransferf( GET_DISPATCH(), (
1645         *(GLenum   *)(pc +  0),
1646         *(GLfloat  *)(pc +  4)
1647     ) );
1648 }
1649
1650 void __glXDisp_PixelTransferi(GLbyte * pc)
1651 {
1652     CALL_PixelTransferi( GET_DISPATCH(), (
1653         *(GLenum   *)(pc +  0),
1654         *(GLint    *)(pc +  4)
1655     ) );
1656 }
1657
1658 int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc)
1659 {
1660     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1661     int error;
1662     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1663
1664     pc += __GLX_SINGLE_HDR_SIZE;
1665     if ( cx != NULL ) {
1666         CALL_PixelStoref( GET_DISPATCH(), (
1667             *(GLenum   *)(pc +  0),
1668             *(GLfloat  *)(pc +  4)
1669         ) );
1670         error = Success;
1671     }
1672
1673     return error;
1674 }
1675
1676 int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc)
1677 {
1678     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1679     int error;
1680     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1681
1682     pc += __GLX_SINGLE_HDR_SIZE;
1683     if ( cx != NULL ) {
1684         CALL_PixelStorei( GET_DISPATCH(), (
1685             *(GLenum   *)(pc +  0),
1686             *(GLint    *)(pc +  4)
1687         ) );
1688         error = Success;
1689     }
1690
1691     return error;
1692 }
1693
1694 void __glXDisp_PixelMapfv(GLbyte * pc)
1695 {
1696     const GLsizei mapsize = *(GLsizei  *)(pc +  4);
1697
1698     CALL_PixelMapfv( GET_DISPATCH(), (
1699         *(GLenum   *)(pc +  0),
1700         mapsize,
1701          (const GLfloat *)(pc +  8)
1702     ) );
1703 }
1704
1705 void __glXDisp_PixelMapuiv(GLbyte * pc)
1706 {
1707     const GLsizei mapsize = *(GLsizei  *)(pc +  4);
1708
1709     CALL_PixelMapuiv( GET_DISPATCH(), (
1710         *(GLenum   *)(pc +  0),
1711         mapsize,
1712          (const GLuint *)(pc +  8)
1713     ) );
1714 }
1715
1716 void __glXDisp_PixelMapusv(GLbyte * pc)
1717 {
1718     const GLsizei mapsize = *(GLsizei  *)(pc +  4);
1719
1720     CALL_PixelMapusv( GET_DISPATCH(), (
1721         *(GLenum   *)(pc +  0),
1722         mapsize,
1723          (const GLushort *)(pc +  8)
1724     ) );
1725 }
1726
1727 void __glXDisp_ReadBuffer(GLbyte * pc)
1728 {
1729     CALL_ReadBuffer( GET_DISPATCH(), (
1730         *(GLenum   *)(pc +  0)
1731     ) );
1732 }
1733
1734 void __glXDisp_CopyPixels(GLbyte * pc)
1735 {
1736     CALL_CopyPixels( GET_DISPATCH(), (
1737         *(GLint    *)(pc +  0),
1738         *(GLint    *)(pc +  4),
1739         *(GLsizei  *)(pc +  8),
1740         *(GLsizei  *)(pc + 12),
1741         *(GLenum   *)(pc + 16)
1742     ) );
1743 }
1744
1745 void __glXDisp_DrawPixels(GLbyte * pc)
1746 {
1747     const GLvoid * const pixels = (const GLvoid *) (pc + 36);
1748     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
1749
1750     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
1751     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
1752     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
1753     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
1754     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
1755     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
1756
1757     CALL_DrawPixels( GET_DISPATCH(), (
1758         *(GLsizei  *)(pc + 20),
1759         *(GLsizei  *)(pc + 24),
1760         *(GLenum   *)(pc + 28),
1761         *(GLenum   *)(pc + 32),
1762         pixels
1763     ) );
1764 }
1765
1766 int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc)
1767 {
1768     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1769     int error;
1770     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1771
1772     pc += __GLX_SINGLE_HDR_SIZE;
1773     if ( cx != NULL ) {
1774         const GLenum pname = *(GLenum   *)(pc +  0);
1775
1776         const GLuint compsize = __glGetBooleanv_size(pname);
1777         GLboolean answerBuffer[200];
1778         GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1);
1779
1780         if (params == NULL) return BadAlloc;
1781         __glXClearErrorOccured();
1782
1783         CALL_GetBooleanv( GET_DISPATCH(), (
1784             pname,
1785             params
1786         ) );
1787         __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0);
1788         error = Success;
1789     }
1790
1791     return error;
1792 }
1793
1794 int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
1795 {
1796     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1797     int error;
1798     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1799
1800     pc += __GLX_SINGLE_HDR_SIZE;
1801     if ( cx != NULL ) {
1802         GLdouble equation[4];
1803         CALL_GetClipPlane( GET_DISPATCH(), (
1804             *(GLenum   *)(pc +  0),
1805             equation
1806         ) );
1807         __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0);
1808         error = Success;
1809     }
1810
1811     return error;
1812 }
1813
1814 int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc)
1815 {
1816     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1817     int error;
1818     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1819
1820     pc += __GLX_SINGLE_HDR_SIZE;
1821     if ( cx != NULL ) {
1822         const GLenum pname = *(GLenum   *)(pc +  0);
1823
1824         const GLuint compsize = __glGetDoublev_size(pname);
1825         GLdouble answerBuffer[200];
1826         GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
1827
1828         if (params == NULL) return BadAlloc;
1829         __glXClearErrorOccured();
1830
1831         CALL_GetDoublev( GET_DISPATCH(), (
1832             pname,
1833             params
1834         ) );
1835         __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
1836         error = Success;
1837     }
1838
1839     return error;
1840 }
1841
1842 int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc)
1843 {
1844     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1845     int error;
1846     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1847
1848     pc += __GLX_SINGLE_HDR_SIZE;
1849     if ( cx != NULL ) {
1850         GLenum retval;
1851         retval = CALL_GetError( GET_DISPATCH(), () );
1852         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
1853         error = Success;
1854     }
1855
1856     return error;
1857 }
1858
1859 int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc)
1860 {
1861     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1862     int error;
1863     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1864
1865     pc += __GLX_SINGLE_HDR_SIZE;
1866     if ( cx != NULL ) {
1867         const GLenum pname = *(GLenum   *)(pc +  0);
1868
1869         const GLuint compsize = __glGetFloatv_size(pname);
1870         GLfloat answerBuffer[200];
1871         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
1872
1873         if (params == NULL) return BadAlloc;
1874         __glXClearErrorOccured();
1875
1876         CALL_GetFloatv( GET_DISPATCH(), (
1877             pname,
1878             params
1879         ) );
1880         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1881         error = Success;
1882     }
1883
1884     return error;
1885 }
1886
1887 int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc)
1888 {
1889     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1890     int error;
1891     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1892
1893     pc += __GLX_SINGLE_HDR_SIZE;
1894     if ( cx != NULL ) {
1895         const GLenum pname = *(GLenum   *)(pc +  0);
1896
1897         const GLuint compsize = __glGetIntegerv_size(pname);
1898         GLint answerBuffer[200];
1899         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
1900
1901         if (params == NULL) return BadAlloc;
1902         __glXClearErrorOccured();
1903
1904         CALL_GetIntegerv( GET_DISPATCH(), (
1905             pname,
1906             params
1907         ) );
1908         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1909         error = Success;
1910     }
1911
1912     return error;
1913 }
1914
1915 int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc)
1916 {
1917     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1918     int error;
1919     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1920
1921     pc += __GLX_SINGLE_HDR_SIZE;
1922     if ( cx != NULL ) {
1923         const GLenum pname = *(GLenum   *)(pc +  4);
1924
1925         const GLuint compsize = __glGetLightfv_size(pname);
1926         GLfloat answerBuffer[200];
1927         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
1928
1929         if (params == NULL) return BadAlloc;
1930         __glXClearErrorOccured();
1931
1932         CALL_GetLightfv( GET_DISPATCH(), (
1933             *(GLenum   *)(pc +  0),
1934             pname,
1935             params
1936         ) );
1937         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1938         error = Success;
1939     }
1940
1941     return error;
1942 }
1943
1944 int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc)
1945 {
1946     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1947     int error;
1948     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1949
1950     pc += __GLX_SINGLE_HDR_SIZE;
1951     if ( cx != NULL ) {
1952         const GLenum pname = *(GLenum   *)(pc +  4);
1953
1954         const GLuint compsize = __glGetLightiv_size(pname);
1955         GLint answerBuffer[200];
1956         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
1957
1958         if (params == NULL) return BadAlloc;
1959         __glXClearErrorOccured();
1960
1961         CALL_GetLightiv( GET_DISPATCH(), (
1962             *(GLenum   *)(pc +  0),
1963             pname,
1964             params
1965         ) );
1966         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1967         error = Success;
1968     }
1969
1970     return error;
1971 }
1972
1973 int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc)
1974 {
1975     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1976     int error;
1977     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
1978
1979     pc += __GLX_SINGLE_HDR_SIZE;
1980     if ( cx != NULL ) {
1981         const GLenum target = *(GLenum   *)(pc +  0);
1982         const GLenum query = *(GLenum   *)(pc +  4);
1983
1984         const GLuint compsize = __glGetMapdv_size(target,query);
1985         GLdouble answerBuffer[200];
1986         GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
1987
1988         if (v == NULL) return BadAlloc;
1989         __glXClearErrorOccured();
1990
1991         CALL_GetMapdv( GET_DISPATCH(), (
1992             target,
1993             query,
1994             v
1995         ) );
1996         __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0);
1997         error = Success;
1998     }
1999
2000     return error;
2001 }
2002
2003 int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc)
2004 {
2005     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2006     int error;
2007     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2008
2009     pc += __GLX_SINGLE_HDR_SIZE;
2010     if ( cx != NULL ) {
2011         const GLenum target = *(GLenum   *)(pc +  0);
2012         const GLenum query = *(GLenum   *)(pc +  4);
2013
2014         const GLuint compsize = __glGetMapfv_size(target,query);
2015         GLfloat answerBuffer[200];
2016         GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2017
2018         if (v == NULL) return BadAlloc;
2019         __glXClearErrorOccured();
2020
2021         CALL_GetMapfv( GET_DISPATCH(), (
2022             target,
2023             query,
2024             v
2025         ) );
2026         __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
2027         error = Success;
2028     }
2029
2030     return error;
2031 }
2032
2033 int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc)
2034 {
2035     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2036     int error;
2037     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2038
2039     pc += __GLX_SINGLE_HDR_SIZE;
2040     if ( cx != NULL ) {
2041         const GLenum target = *(GLenum   *)(pc +  0);
2042         const GLenum query = *(GLenum   *)(pc +  4);
2043
2044         const GLuint compsize = __glGetMapiv_size(target,query);
2045         GLint answerBuffer[200];
2046         GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2047
2048         if (v == NULL) return BadAlloc;
2049         __glXClearErrorOccured();
2050
2051         CALL_GetMapiv( GET_DISPATCH(), (
2052             target,
2053             query,
2054             v
2055         ) );
2056         __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
2057         error = Success;
2058     }
2059
2060     return error;
2061 }
2062
2063 int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc)
2064 {
2065     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2066     int error;
2067     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2068
2069     pc += __GLX_SINGLE_HDR_SIZE;
2070     if ( cx != NULL ) {
2071         const GLenum pname = *(GLenum   *)(pc +  4);
2072
2073         const GLuint compsize = __glGetMaterialfv_size(pname);
2074         GLfloat answerBuffer[200];
2075         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2076
2077         if (params == NULL) return BadAlloc;
2078         __glXClearErrorOccured();
2079
2080         CALL_GetMaterialfv( GET_DISPATCH(), (
2081             *(GLenum   *)(pc +  0),
2082             pname,
2083             params
2084         ) );
2085         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2086         error = Success;
2087     }
2088
2089     return error;
2090 }
2091
2092 int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc)
2093 {
2094     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2095     int error;
2096     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2097
2098     pc += __GLX_SINGLE_HDR_SIZE;
2099     if ( cx != NULL ) {
2100         const GLenum pname = *(GLenum   *)(pc +  4);
2101
2102         const GLuint compsize = __glGetMaterialiv_size(pname);
2103         GLint answerBuffer[200];
2104         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2105
2106         if (params == NULL) return BadAlloc;
2107         __glXClearErrorOccured();
2108
2109         CALL_GetMaterialiv( GET_DISPATCH(), (
2110             *(GLenum   *)(pc +  0),
2111             pname,
2112             params
2113         ) );
2114         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2115         error = Success;
2116     }
2117
2118     return error;
2119 }
2120
2121 int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc)
2122 {
2123     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2124     int error;
2125     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2126
2127     pc += __GLX_SINGLE_HDR_SIZE;
2128     if ( cx != NULL ) {
2129         const GLenum map = *(GLenum   *)(pc +  0);
2130
2131         const GLuint compsize = __glGetPixelMapfv_size(map);
2132         GLfloat answerBuffer[200];
2133         GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2134
2135         if (values == NULL) return BadAlloc;
2136         __glXClearErrorOccured();
2137
2138         CALL_GetPixelMapfv( GET_DISPATCH(), (
2139             map,
2140             values
2141         ) );
2142         __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
2143         error = Success;
2144     }
2145
2146     return error;
2147 }
2148
2149 int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc)
2150 {
2151     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2152     int error;
2153     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2154
2155     pc += __GLX_SINGLE_HDR_SIZE;
2156     if ( cx != NULL ) {
2157         const GLenum map = *(GLenum   *)(pc +  0);
2158
2159         const GLuint compsize = __glGetPixelMapuiv_size(map);
2160         GLuint answerBuffer[200];
2161         GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2162
2163         if (values == NULL) return BadAlloc;
2164         __glXClearErrorOccured();
2165
2166         CALL_GetPixelMapuiv( GET_DISPATCH(), (
2167             map,
2168             values
2169         ) );
2170         __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
2171         error = Success;
2172     }
2173
2174     return error;
2175 }
2176
2177 int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc)
2178 {
2179     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2180     int error;
2181     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2182
2183     pc += __GLX_SINGLE_HDR_SIZE;
2184     if ( cx != NULL ) {
2185         const GLenum map = *(GLenum   *)(pc +  0);
2186
2187         const GLuint compsize = __glGetPixelMapusv_size(map);
2188         GLushort answerBuffer[200];
2189         GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2);
2190
2191         if (values == NULL) return BadAlloc;
2192         __glXClearErrorOccured();
2193
2194         CALL_GetPixelMapusv( GET_DISPATCH(), (
2195             map,
2196             values
2197         ) );
2198         __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0);
2199         error = Success;
2200     }
2201
2202     return error;
2203 }
2204
2205 int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc)
2206 {
2207     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2208     int error;
2209     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2210
2211     pc += __GLX_SINGLE_HDR_SIZE;
2212     if ( cx != NULL ) {
2213         const GLenum pname = *(GLenum   *)(pc +  4);
2214
2215         const GLuint compsize = __glGetTexEnvfv_size(pname);
2216         GLfloat answerBuffer[200];
2217         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2218
2219         if (params == NULL) return BadAlloc;
2220         __glXClearErrorOccured();
2221
2222         CALL_GetTexEnvfv( GET_DISPATCH(), (
2223             *(GLenum   *)(pc +  0),
2224             pname,
2225             params
2226         ) );
2227         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2228         error = Success;
2229     }
2230
2231     return error;
2232 }
2233
2234 int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc)
2235 {
2236     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2237     int error;
2238     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2239
2240     pc += __GLX_SINGLE_HDR_SIZE;
2241     if ( cx != NULL ) {
2242         const GLenum pname = *(GLenum   *)(pc +  4);
2243
2244         const GLuint compsize = __glGetTexEnviv_size(pname);
2245         GLint answerBuffer[200];
2246         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2247
2248         if (params == NULL) return BadAlloc;
2249         __glXClearErrorOccured();
2250
2251         CALL_GetTexEnviv( GET_DISPATCH(), (
2252             *(GLenum   *)(pc +  0),
2253             pname,
2254             params
2255         ) );
2256         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2257         error = Success;
2258     }
2259
2260     return error;
2261 }
2262
2263 int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc)
2264 {
2265     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2266     int error;
2267     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2268
2269     pc += __GLX_SINGLE_HDR_SIZE;
2270     if ( cx != NULL ) {
2271         const GLenum pname = *(GLenum   *)(pc +  4);
2272
2273         const GLuint compsize = __glGetTexGendv_size(pname);
2274         GLdouble answerBuffer[200];
2275         GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
2276
2277         if (params == NULL) return BadAlloc;
2278         __glXClearErrorOccured();
2279
2280         CALL_GetTexGendv( GET_DISPATCH(), (
2281             *(GLenum   *)(pc +  0),
2282             pname,
2283             params
2284         ) );
2285         __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
2286         error = Success;
2287     }
2288
2289     return error;
2290 }
2291
2292 int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc)
2293 {
2294     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2295     int error;
2296     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2297
2298     pc += __GLX_SINGLE_HDR_SIZE;
2299     if ( cx != NULL ) {
2300         const GLenum pname = *(GLenum   *)(pc +  4);
2301
2302         const GLuint compsize = __glGetTexGenfv_size(pname);
2303         GLfloat answerBuffer[200];
2304         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2305
2306         if (params == NULL) return BadAlloc;
2307         __glXClearErrorOccured();
2308
2309         CALL_GetTexGenfv( GET_DISPATCH(), (
2310             *(GLenum   *)(pc +  0),
2311             pname,
2312             params
2313         ) );
2314         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2315         error = Success;
2316     }
2317
2318     return error;
2319 }
2320
2321 int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc)
2322 {
2323     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2324     int error;
2325     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2326
2327     pc += __GLX_SINGLE_HDR_SIZE;
2328     if ( cx != NULL ) {
2329         const GLenum pname = *(GLenum   *)(pc +  4);
2330
2331         const GLuint compsize = __glGetTexGeniv_size(pname);
2332         GLint answerBuffer[200];
2333         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2334
2335         if (params == NULL) return BadAlloc;
2336         __glXClearErrorOccured();
2337
2338         CALL_GetTexGeniv( GET_DISPATCH(), (
2339             *(GLenum   *)(pc +  0),
2340             pname,
2341             params
2342         ) );
2343         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2344         error = Success;
2345     }
2346
2347     return error;
2348 }
2349
2350 int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc)
2351 {
2352     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2353     int error;
2354     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2355
2356     pc += __GLX_SINGLE_HDR_SIZE;
2357     if ( cx != NULL ) {
2358         const GLenum pname = *(GLenum   *)(pc +  4);
2359
2360         const GLuint compsize = __glGetTexParameterfv_size(pname);
2361         GLfloat answerBuffer[200];
2362         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2363
2364         if (params == NULL) return BadAlloc;
2365         __glXClearErrorOccured();
2366
2367         CALL_GetTexParameterfv( GET_DISPATCH(), (
2368             *(GLenum   *)(pc +  0),
2369             pname,
2370             params
2371         ) );
2372         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2373         error = Success;
2374     }
2375
2376     return error;
2377 }
2378
2379 int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc)
2380 {
2381     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2382     int error;
2383     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2384
2385     pc += __GLX_SINGLE_HDR_SIZE;
2386     if ( cx != NULL ) {
2387         const GLenum pname = *(GLenum   *)(pc +  4);
2388
2389         const GLuint compsize = __glGetTexParameteriv_size(pname);
2390         GLint answerBuffer[200];
2391         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2392
2393         if (params == NULL) return BadAlloc;
2394         __glXClearErrorOccured();
2395
2396         CALL_GetTexParameteriv( GET_DISPATCH(), (
2397             *(GLenum   *)(pc +  0),
2398             pname,
2399             params
2400         ) );
2401         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2402         error = Success;
2403     }
2404
2405     return error;
2406 }
2407
2408 int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc)
2409 {
2410     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2411     int error;
2412     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2413
2414     pc += __GLX_SINGLE_HDR_SIZE;
2415     if ( cx != NULL ) {
2416         const GLenum pname = *(GLenum   *)(pc +  8);
2417
2418         const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
2419         GLfloat answerBuffer[200];
2420         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2421
2422         if (params == NULL) return BadAlloc;
2423         __glXClearErrorOccured();
2424
2425         CALL_GetTexLevelParameterfv( GET_DISPATCH(), (
2426             *(GLenum   *)(pc +  0),
2427             *(GLint    *)(pc +  4),
2428             pname,
2429             params
2430         ) );
2431         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2432         error = Success;
2433     }
2434
2435     return error;
2436 }
2437
2438 int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc)
2439 {
2440     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2441     int error;
2442     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2443
2444     pc += __GLX_SINGLE_HDR_SIZE;
2445     if ( cx != NULL ) {
2446         const GLenum pname = *(GLenum   *)(pc +  8);
2447
2448         const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
2449         GLint answerBuffer[200];
2450         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2451
2452         if (params == NULL) return BadAlloc;
2453         __glXClearErrorOccured();
2454
2455         CALL_GetTexLevelParameteriv( GET_DISPATCH(), (
2456             *(GLenum   *)(pc +  0),
2457             *(GLint    *)(pc +  4),
2458             pname,
2459             params
2460         ) );
2461         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2462         error = Success;
2463     }
2464
2465     return error;
2466 }
2467
2468 int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc)
2469 {
2470     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2471     int error;
2472     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2473
2474     pc += __GLX_SINGLE_HDR_SIZE;
2475     if ( cx != NULL ) {
2476         GLboolean retval;
2477         retval = CALL_IsEnabled( GET_DISPATCH(), (
2478             *(GLenum   *)(pc +  0)
2479         ) );
2480         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2481         error = Success;
2482     }
2483
2484     return error;
2485 }
2486
2487 int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc)
2488 {
2489     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2490     int error;
2491     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2492
2493     pc += __GLX_SINGLE_HDR_SIZE;
2494     if ( cx != NULL ) {
2495         GLboolean retval;
2496         retval = CALL_IsList( GET_DISPATCH(), (
2497             *(GLuint   *)(pc +  0)
2498         ) );
2499         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2500         error = Success;
2501     }
2502
2503     return error;
2504 }
2505
2506 void __glXDisp_DepthRange(GLbyte * pc)
2507 {
2508 #ifdef __GLX_ALIGN64
2509     if ((unsigned long)(pc) & 7) {
2510         (void) memmove(pc-4, pc, 16);
2511         pc -= 4;
2512     }
2513 #endif
2514
2515     CALL_DepthRange( GET_DISPATCH(), (
2516         *(GLclampd *)(pc +  0),
2517         *(GLclampd *)(pc +  8)
2518     ) );
2519 }
2520
2521 void __glXDisp_Frustum(GLbyte * pc)
2522 {
2523 #ifdef __GLX_ALIGN64
2524     if ((unsigned long)(pc) & 7) {
2525         (void) memmove(pc-4, pc, 48);
2526         pc -= 4;
2527     }
2528 #endif
2529
2530     CALL_Frustum( GET_DISPATCH(), (
2531         *(GLdouble *)(pc +  0),
2532         *(GLdouble *)(pc +  8),
2533         *(GLdouble *)(pc + 16),
2534         *(GLdouble *)(pc + 24),
2535         *(GLdouble *)(pc + 32),
2536         *(GLdouble *)(pc + 40)
2537     ) );
2538 }
2539
2540 void __glXDisp_LoadIdentity(GLbyte * pc)
2541 {
2542     CALL_LoadIdentity( GET_DISPATCH(), () );
2543 }
2544
2545 void __glXDisp_LoadMatrixf(GLbyte * pc)
2546 {
2547     CALL_LoadMatrixf( GET_DISPATCH(), (
2548          (const GLfloat *)(pc +  0)
2549     ) );
2550 }
2551
2552 void __glXDisp_LoadMatrixd(GLbyte * pc)
2553 {
2554 #ifdef __GLX_ALIGN64
2555     if ((unsigned long)(pc) & 7) {
2556         (void) memmove(pc-4, pc, 128);
2557         pc -= 4;
2558     }
2559 #endif
2560
2561     CALL_LoadMatrixd( GET_DISPATCH(), (
2562          (const GLdouble *)(pc +  0)
2563     ) );
2564 }
2565
2566 void __glXDisp_MatrixMode(GLbyte * pc)
2567 {
2568     CALL_MatrixMode( GET_DISPATCH(), (
2569         *(GLenum   *)(pc +  0)
2570     ) );
2571 }
2572
2573 void __glXDisp_MultMatrixf(GLbyte * pc)
2574 {
2575     CALL_MultMatrixf( GET_DISPATCH(), (
2576          (const GLfloat *)(pc +  0)
2577     ) );
2578 }
2579
2580 void __glXDisp_MultMatrixd(GLbyte * pc)
2581 {
2582 #ifdef __GLX_ALIGN64
2583     if ((unsigned long)(pc) & 7) {
2584         (void) memmove(pc-4, pc, 128);
2585         pc -= 4;
2586     }
2587 #endif
2588
2589     CALL_MultMatrixd( GET_DISPATCH(), (
2590          (const GLdouble *)(pc +  0)
2591     ) );
2592 }
2593
2594 void __glXDisp_Ortho(GLbyte * pc)
2595 {
2596 #ifdef __GLX_ALIGN64
2597     if ((unsigned long)(pc) & 7) {
2598         (void) memmove(pc-4, pc, 48);
2599         pc -= 4;
2600     }
2601 #endif
2602
2603     CALL_Ortho( GET_DISPATCH(), (
2604         *(GLdouble *)(pc +  0),
2605         *(GLdouble *)(pc +  8),
2606         *(GLdouble *)(pc + 16),
2607         *(GLdouble *)(pc + 24),
2608         *(GLdouble *)(pc + 32),
2609         *(GLdouble *)(pc + 40)
2610     ) );
2611 }
2612
2613 void __glXDisp_PopMatrix(GLbyte * pc)
2614 {
2615     CALL_PopMatrix( GET_DISPATCH(), () );
2616 }
2617
2618 void __glXDisp_PushMatrix(GLbyte * pc)
2619 {
2620     CALL_PushMatrix( GET_DISPATCH(), () );
2621 }
2622
2623 void __glXDisp_Rotated(GLbyte * pc)
2624 {
2625 #ifdef __GLX_ALIGN64
2626     if ((unsigned long)(pc) & 7) {
2627         (void) memmove(pc-4, pc, 32);
2628         pc -= 4;
2629     }
2630 #endif
2631
2632     CALL_Rotated( GET_DISPATCH(), (
2633         *(GLdouble *)(pc +  0),
2634         *(GLdouble *)(pc +  8),
2635         *(GLdouble *)(pc + 16),
2636         *(GLdouble *)(pc + 24)
2637     ) );
2638 }
2639
2640 void __glXDisp_Rotatef(GLbyte * pc)
2641 {
2642     CALL_Rotatef( GET_DISPATCH(), (
2643         *(GLfloat  *)(pc +  0),
2644         *(GLfloat  *)(pc +  4),
2645         *(GLfloat  *)(pc +  8),
2646         *(GLfloat  *)(pc + 12)
2647     ) );
2648 }
2649
2650 void __glXDisp_Scaled(GLbyte * pc)
2651 {
2652 #ifdef __GLX_ALIGN64
2653     if ((unsigned long)(pc) & 7) {
2654         (void) memmove(pc-4, pc, 24);
2655         pc -= 4;
2656     }
2657 #endif
2658
2659     CALL_Scaled( GET_DISPATCH(), (
2660         *(GLdouble *)(pc +  0),
2661         *(GLdouble *)(pc +  8),
2662         *(GLdouble *)(pc + 16)
2663     ) );
2664 }
2665
2666 void __glXDisp_Scalef(GLbyte * pc)
2667 {
2668     CALL_Scalef( GET_DISPATCH(), (
2669         *(GLfloat  *)(pc +  0),
2670         *(GLfloat  *)(pc +  4),
2671         *(GLfloat  *)(pc +  8)
2672     ) );
2673 }
2674
2675 void __glXDisp_Translated(GLbyte * pc)
2676 {
2677 #ifdef __GLX_ALIGN64
2678     if ((unsigned long)(pc) & 7) {
2679         (void) memmove(pc-4, pc, 24);
2680         pc -= 4;
2681     }
2682 #endif
2683
2684     CALL_Translated( GET_DISPATCH(), (
2685         *(GLdouble *)(pc +  0),
2686         *(GLdouble *)(pc +  8),
2687         *(GLdouble *)(pc + 16)
2688     ) );
2689 }
2690
2691 void __glXDisp_Translatef(GLbyte * pc)
2692 {
2693     CALL_Translatef( GET_DISPATCH(), (
2694         *(GLfloat  *)(pc +  0),
2695         *(GLfloat  *)(pc +  4),
2696         *(GLfloat  *)(pc +  8)
2697     ) );
2698 }
2699
2700 void __glXDisp_Viewport(GLbyte * pc)
2701 {
2702     CALL_Viewport( GET_DISPATCH(), (
2703         *(GLint    *)(pc +  0),
2704         *(GLint    *)(pc +  4),
2705         *(GLsizei  *)(pc +  8),
2706         *(GLsizei  *)(pc + 12)
2707     ) );
2708 }
2709
2710 void __glXDisp_BindTexture(GLbyte * pc)
2711 {
2712     CALL_BindTexture( GET_DISPATCH(), (
2713         *(GLenum   *)(pc +  0),
2714         *(GLuint   *)(pc +  4)
2715     ) );
2716 }
2717
2718 void __glXDisp_Indexubv(GLbyte * pc)
2719 {
2720     CALL_Indexubv( GET_DISPATCH(), (
2721          (const GLubyte *)(pc +  0)
2722     ) );
2723 }
2724
2725 void __glXDisp_PolygonOffset(GLbyte * pc)
2726 {
2727     CALL_PolygonOffset( GET_DISPATCH(), (
2728         *(GLfloat  *)(pc +  0),
2729         *(GLfloat  *)(pc +  4)
2730     ) );
2731 }
2732
2733 int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
2734 {
2735     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2736     int error;
2737     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2738
2739     pc += __GLX_SINGLE_HDR_SIZE;
2740     if ( cx != NULL ) {
2741         const GLsizei n = *(GLsizei  *)(pc +  0);
2742
2743         GLboolean retval;
2744         GLboolean answerBuffer[200];
2745         GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
2746         retval = CALL_AreTexturesResident( GET_DISPATCH(), (
2747             n,
2748              (const GLuint *)(pc +  4),
2749             residences
2750         ) );
2751         __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
2752         error = Success;
2753     }
2754
2755     return error;
2756 }
2757
2758 int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
2759 {
2760     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
2761     int error;
2762     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2763
2764     pc += __GLX_VENDPRIV_HDR_SIZE;
2765     if ( cx != NULL ) {
2766         const GLsizei n = *(GLsizei  *)(pc +  0);
2767
2768         GLboolean retval;
2769         GLboolean answerBuffer[200];
2770         GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
2771         retval = CALL_AreTexturesResident( GET_DISPATCH(), (
2772             n,
2773              (const GLuint *)(pc +  4),
2774             residences
2775         ) );
2776         __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
2777         error = Success;
2778     }
2779
2780     return error;
2781 }
2782
2783 void __glXDisp_CopyTexImage1D(GLbyte * pc)
2784 {
2785     CALL_CopyTexImage1D( GET_DISPATCH(), (
2786         *(GLenum   *)(pc +  0),
2787         *(GLint    *)(pc +  4),
2788         *(GLenum   *)(pc +  8),
2789         *(GLint    *)(pc + 12),
2790         *(GLint    *)(pc + 16),
2791         *(GLsizei  *)(pc + 20),
2792         *(GLint    *)(pc + 24)
2793     ) );
2794 }
2795
2796 void __glXDisp_CopyTexImage2D(GLbyte * pc)
2797 {
2798     CALL_CopyTexImage2D( GET_DISPATCH(), (
2799         *(GLenum   *)(pc +  0),
2800         *(GLint    *)(pc +  4),
2801         *(GLenum   *)(pc +  8),
2802         *(GLint    *)(pc + 12),
2803         *(GLint    *)(pc + 16),
2804         *(GLsizei  *)(pc + 20),
2805         *(GLsizei  *)(pc + 24),
2806         *(GLint    *)(pc + 28)
2807     ) );
2808 }
2809
2810 void __glXDisp_CopyTexSubImage1D(GLbyte * pc)
2811 {
2812     CALL_CopyTexSubImage1D( GET_DISPATCH(), (
2813         *(GLenum   *)(pc +  0),
2814         *(GLint    *)(pc +  4),
2815         *(GLint    *)(pc +  8),
2816         *(GLint    *)(pc + 12),
2817         *(GLint    *)(pc + 16),
2818         *(GLsizei  *)(pc + 20)
2819     ) );
2820 }
2821
2822 void __glXDisp_CopyTexSubImage2D(GLbyte * pc)
2823 {
2824     CALL_CopyTexSubImage2D( GET_DISPATCH(), (
2825         *(GLenum   *)(pc +  0),
2826         *(GLint    *)(pc +  4),
2827         *(GLint    *)(pc +  8),
2828         *(GLint    *)(pc + 12),
2829         *(GLint    *)(pc + 16),
2830         *(GLint    *)(pc + 20),
2831         *(GLsizei  *)(pc + 24),
2832         *(GLsizei  *)(pc + 28)
2833     ) );
2834 }
2835
2836 int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
2837 {
2838     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2839     int error;
2840     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2841
2842     pc += __GLX_SINGLE_HDR_SIZE;
2843     if ( cx != NULL ) {
2844         const GLsizei n = *(GLsizei  *)(pc +  0);
2845
2846         CALL_DeleteTextures( GET_DISPATCH(), (
2847             n,
2848              (const GLuint *)(pc +  4)
2849         ) );
2850         error = Success;
2851     }
2852
2853     return error;
2854 }
2855
2856 int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
2857 {
2858     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
2859     int error;
2860     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2861
2862     pc += __GLX_VENDPRIV_HDR_SIZE;
2863     if ( cx != NULL ) {
2864         const GLsizei n = *(GLsizei  *)(pc +  0);
2865
2866         CALL_DeleteTextures( GET_DISPATCH(), (
2867             n,
2868              (const GLuint *)(pc +  4)
2869         ) );
2870         error = Success;
2871     }
2872
2873     return error;
2874 }
2875
2876 int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc)
2877 {
2878     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2879     int error;
2880     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2881
2882     pc += __GLX_SINGLE_HDR_SIZE;
2883     if ( cx != NULL ) {
2884         const GLsizei n = *(GLsizei  *)(pc +  0);
2885
2886         GLuint answerBuffer[200];
2887         GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
2888         CALL_GenTextures( GET_DISPATCH(), (
2889             n,
2890             textures
2891         ) );
2892         __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
2893         error = Success;
2894     }
2895
2896     return error;
2897 }
2898
2899 int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
2900 {
2901     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
2902     int error;
2903     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2904
2905     pc += __GLX_VENDPRIV_HDR_SIZE;
2906     if ( cx != NULL ) {
2907         const GLsizei n = *(GLsizei  *)(pc +  0);
2908
2909         GLuint answerBuffer[200];
2910         GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
2911         CALL_GenTextures( GET_DISPATCH(), (
2912             n,
2913             textures
2914         ) );
2915         __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
2916         error = Success;
2917     }
2918
2919     return error;
2920 }
2921
2922 int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc)
2923 {
2924     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2925     int error;
2926     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2927
2928     pc += __GLX_SINGLE_HDR_SIZE;
2929     if ( cx != NULL ) {
2930         GLboolean retval;
2931         retval = CALL_IsTexture( GET_DISPATCH(), (
2932             *(GLuint   *)(pc +  0)
2933         ) );
2934         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2935         error = Success;
2936     }
2937
2938     return error;
2939 }
2940
2941 int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
2942 {
2943     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
2944     int error;
2945     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
2946
2947     pc += __GLX_VENDPRIV_HDR_SIZE;
2948     if ( cx != NULL ) {
2949         GLboolean retval;
2950         retval = CALL_IsTexture( GET_DISPATCH(), (
2951             *(GLuint   *)(pc +  0)
2952         ) );
2953         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2954         error = Success;
2955     }
2956
2957     return error;
2958 }
2959
2960 void __glXDisp_PrioritizeTextures(GLbyte * pc)
2961 {
2962     const GLsizei n = *(GLsizei  *)(pc +  0);
2963
2964     CALL_PrioritizeTextures( GET_DISPATCH(), (
2965         n,
2966          (const GLuint *)(pc +  4),
2967          (const GLclampf *)(pc +  4)
2968     ) );
2969 }
2970
2971 void __glXDisp_TexSubImage1D(GLbyte * pc)
2972 {
2973     const GLvoid * const pixels = (const GLvoid *) (pc + 56);
2974     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
2975
2976     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
2977     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
2978     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
2979     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
2980     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
2981     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
2982
2983     CALL_TexSubImage1D( GET_DISPATCH(), (
2984         *(GLenum   *)(pc + 20),
2985         *(GLint    *)(pc + 24),
2986         *(GLint    *)(pc + 28),
2987         *(GLsizei  *)(pc + 36),
2988         *(GLenum   *)(pc + 44),
2989         *(GLenum   *)(pc + 48),
2990         pixels
2991     ) );
2992 }
2993
2994 void __glXDisp_TexSubImage2D(GLbyte * pc)
2995 {
2996     const GLvoid * const pixels = (const GLvoid *) (pc + 56);
2997     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
2998
2999     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3000     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3001     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
3002     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
3003     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
3004     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
3005
3006     CALL_TexSubImage2D( GET_DISPATCH(), (
3007         *(GLenum   *)(pc + 20),
3008         *(GLint    *)(pc + 24),
3009         *(GLint    *)(pc + 28),
3010         *(GLint    *)(pc + 32),
3011         *(GLsizei  *)(pc + 36),
3012         *(GLsizei  *)(pc + 40),
3013         *(GLenum   *)(pc + 44),
3014         *(GLenum   *)(pc + 48),
3015         pixels
3016     ) );
3017 }
3018
3019 void __glXDisp_BlendColor(GLbyte * pc)
3020 {
3021     CALL_BlendColor( GET_DISPATCH(), (
3022         *(GLclampf *)(pc +  0),
3023         *(GLclampf *)(pc +  4),
3024         *(GLclampf *)(pc +  8),
3025         *(GLclampf *)(pc + 12)
3026     ) );
3027 }
3028
3029 void __glXDisp_BlendEquation(GLbyte * pc)
3030 {
3031     CALL_BlendEquation( GET_DISPATCH(), (
3032         *(GLenum   *)(pc +  0)
3033     ) );
3034 }
3035
3036 void __glXDisp_ColorTable(GLbyte * pc)
3037 {
3038     const GLvoid * const table = (const GLvoid *) (pc + 40);
3039     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3040
3041     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3042     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3043     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
3044     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
3045     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
3046     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
3047
3048     CALL_ColorTable( GET_DISPATCH(), (
3049         *(GLenum   *)(pc + 20),
3050         *(GLenum   *)(pc + 24),
3051         *(GLsizei  *)(pc + 28),
3052         *(GLenum   *)(pc + 32),
3053         *(GLenum   *)(pc + 36),
3054         table
3055     ) );
3056 }
3057
3058 void __glXDisp_ColorTableParameterfv(GLbyte * pc)
3059 {
3060     const GLenum pname = *(GLenum   *)(pc +  4);
3061     const GLfloat * params;
3062
3063     params = (const GLfloat *) (pc + 8);
3064
3065     CALL_ColorTableParameterfv( GET_DISPATCH(), (
3066         *(GLenum   *)(pc +  0),
3067         pname,
3068         params
3069     ) );
3070 }
3071
3072 void __glXDisp_ColorTableParameteriv(GLbyte * pc)
3073 {
3074     const GLenum pname = *(GLenum   *)(pc +  4);
3075     const GLint * params;
3076
3077     params = (const GLint *) (pc + 8);
3078
3079     CALL_ColorTableParameteriv( GET_DISPATCH(), (
3080         *(GLenum   *)(pc +  0),
3081         pname,
3082         params
3083     ) );
3084 }
3085
3086 void __glXDisp_CopyColorTable(GLbyte * pc)
3087 {
3088     CALL_CopyColorTable( GET_DISPATCH(), (
3089         *(GLenum   *)(pc +  0),
3090         *(GLenum   *)(pc +  4),
3091         *(GLint    *)(pc +  8),
3092         *(GLint    *)(pc + 12),
3093         *(GLsizei  *)(pc + 16)
3094     ) );
3095 }
3096
3097 int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
3098 {
3099     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3100     int error;
3101     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3102
3103     pc += __GLX_SINGLE_HDR_SIZE;
3104     if ( cx != NULL ) {
3105         const GLenum pname = *(GLenum   *)(pc +  4);
3106
3107         const GLuint compsize = __glGetColorTableParameterfv_size(pname);
3108         GLfloat answerBuffer[200];
3109         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3110
3111         if (params == NULL) return BadAlloc;
3112         __glXClearErrorOccured();
3113
3114         CALL_GetColorTableParameterfv( GET_DISPATCH(), (
3115             *(GLenum   *)(pc +  0),
3116             pname,
3117             params
3118         ) );
3119         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3120         error = Success;
3121     }
3122
3123     return error;
3124 }
3125
3126 int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
3127 {
3128     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3129     int error;
3130     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3131
3132     pc += __GLX_VENDPRIV_HDR_SIZE;
3133     if ( cx != NULL ) {
3134         const GLenum pname = *(GLenum   *)(pc +  4);
3135
3136         const GLuint compsize = __glGetColorTableParameterfv_size(pname);
3137         GLfloat answerBuffer[200];
3138         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3139
3140         if (params == NULL) return BadAlloc;
3141         __glXClearErrorOccured();
3142
3143         CALL_GetColorTableParameterfv( GET_DISPATCH(), (
3144             *(GLenum   *)(pc +  0),
3145             pname,
3146             params
3147         ) );
3148         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3149         error = Success;
3150     }
3151
3152     return error;
3153 }
3154
3155 int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
3156 {
3157     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3158     int error;
3159     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3160
3161     pc += __GLX_SINGLE_HDR_SIZE;
3162     if ( cx != NULL ) {
3163         const GLenum pname = *(GLenum   *)(pc +  4);
3164
3165         const GLuint compsize = __glGetColorTableParameteriv_size(pname);
3166         GLint answerBuffer[200];
3167         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3168
3169         if (params == NULL) return BadAlloc;
3170         __glXClearErrorOccured();
3171
3172         CALL_GetColorTableParameteriv( GET_DISPATCH(), (
3173             *(GLenum   *)(pc +  0),
3174             pname,
3175             params
3176         ) );
3177         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3178         error = Success;
3179     }
3180
3181     return error;
3182 }
3183
3184 int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
3185 {
3186     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3187     int error;
3188     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3189
3190     pc += __GLX_VENDPRIV_HDR_SIZE;
3191     if ( cx != NULL ) {
3192         const GLenum pname = *(GLenum   *)(pc +  4);
3193
3194         const GLuint compsize = __glGetColorTableParameteriv_size(pname);
3195         GLint answerBuffer[200];
3196         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3197
3198         if (params == NULL) return BadAlloc;
3199         __glXClearErrorOccured();
3200
3201         CALL_GetColorTableParameteriv( GET_DISPATCH(), (
3202             *(GLenum   *)(pc +  0),
3203             pname,
3204             params
3205         ) );
3206         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3207         error = Success;
3208     }
3209
3210     return error;
3211 }
3212
3213 void __glXDisp_ColorSubTable(GLbyte * pc)
3214 {
3215     const GLvoid * const data = (const GLvoid *) (pc + 40);
3216     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3217
3218     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3219     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3220     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
3221     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
3222     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
3223     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
3224
3225     CALL_ColorSubTable( GET_DISPATCH(), (
3226         *(GLenum   *)(pc + 20),
3227         *(GLsizei  *)(pc + 24),
3228         *(GLsizei  *)(pc + 28),
3229         *(GLenum   *)(pc + 32),
3230         *(GLenum   *)(pc + 36),
3231         data
3232     ) );
3233 }
3234
3235 void __glXDisp_CopyColorSubTable(GLbyte * pc)
3236 {
3237     CALL_CopyColorSubTable( GET_DISPATCH(), (
3238         *(GLenum   *)(pc +  0),
3239         *(GLsizei  *)(pc +  4),
3240         *(GLint    *)(pc +  8),
3241         *(GLint    *)(pc + 12),
3242         *(GLsizei  *)(pc + 16)
3243     ) );
3244 }
3245
3246 void __glXDisp_ConvolutionFilter1D(GLbyte * pc)
3247 {
3248     const GLvoid * const image = (const GLvoid *) (pc + 44);
3249     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3250
3251     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3252     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3253     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
3254     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
3255     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
3256     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
3257
3258     CALL_ConvolutionFilter1D( GET_DISPATCH(), (
3259         *(GLenum   *)(pc + 20),
3260         *(GLenum   *)(pc + 24),
3261         *(GLsizei  *)(pc + 28),
3262         *(GLenum   *)(pc + 36),
3263         *(GLenum   *)(pc + 40),
3264         image
3265     ) );
3266 }
3267
3268 void __glXDisp_ConvolutionFilter2D(GLbyte * pc)
3269 {
3270     const GLvoid * const image = (const GLvoid *) (pc + 44);
3271     __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3272
3273     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3274     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3275     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
3276     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
3277     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
3278     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
3279
3280     CALL_ConvolutionFilter2D( GET_DISPATCH(), (
3281         *(GLenum   *)(pc + 20),
3282         *(GLenum   *)(pc + 24),
3283         *(GLsizei  *)(pc + 28),
3284         *(GLsizei  *)(pc + 32),
3285         *(GLenum   *)(pc + 36),
3286         *(GLenum   *)(pc + 40),
3287         image
3288     ) );
3289 }
3290
3291 void __glXDisp_ConvolutionParameterf(GLbyte * pc)
3292 {
3293     CALL_ConvolutionParameterf( GET_DISPATCH(), (
3294         *(GLenum   *)(pc +  0),
3295         *(GLenum   *)(pc +  4),
3296         *(GLfloat  *)(pc +  8)
3297     ) );
3298 }
3299
3300 void __glXDisp_ConvolutionParameterfv(GLbyte * pc)
3301 {
3302     const GLenum pname = *(GLenum   *)(pc +  4);
3303     const GLfloat * params;
3304
3305     params = (const GLfloat *) (pc + 8);
3306
3307     CALL_ConvolutionParameterfv( GET_DISPATCH(), (
3308         *(GLenum   *)(pc +  0),
3309         pname,
3310         params
3311     ) );
3312 }
3313
3314 void __glXDisp_ConvolutionParameteri(GLbyte * pc)
3315 {
3316     CALL_ConvolutionParameteri( GET_DISPATCH(), (
3317         *(GLenum   *)(pc +  0),
3318         *(GLenum   *)(pc +  4),
3319         *(GLint    *)(pc +  8)
3320     ) );
3321 }
3322
3323 void __glXDisp_ConvolutionParameteriv(GLbyte * pc)
3324 {
3325     const GLenum pname = *(GLenum   *)(pc +  4);
3326     const GLint * params;
3327
3328     params = (const GLint *) (pc + 8);
3329
3330     CALL_ConvolutionParameteriv( GET_DISPATCH(), (
3331         *(GLenum   *)(pc +  0),
3332         pname,
3333         params
3334     ) );
3335 }
3336
3337 void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc)
3338 {
3339     CALL_CopyConvolutionFilter1D( GET_DISPATCH(), (
3340         *(GLenum   *)(pc +  0),
3341         *(GLenum   *)(pc +  4),
3342         *(GLint    *)(pc +  8),
3343         *(GLint    *)(pc + 12),
3344         *(GLsizei  *)(pc + 16)
3345     ) );
3346 }
3347
3348 void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc)
3349 {
3350     CALL_CopyConvolutionFilter2D( GET_DISPATCH(), (
3351         *(GLenum   *)(pc +  0),
3352         *(GLenum   *)(pc +  4),
3353         *(GLint    *)(pc +  8),
3354         *(GLint    *)(pc + 12),
3355         *(GLsizei  *)(pc + 16),
3356         *(GLsizei  *)(pc + 20)
3357     ) );
3358 }
3359
3360 int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
3361 {
3362     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3363     int error;
3364     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3365
3366     pc += __GLX_SINGLE_HDR_SIZE;
3367     if ( cx != NULL ) {
3368         const GLenum pname = *(GLenum   *)(pc +  4);
3369
3370         const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
3371         GLfloat answerBuffer[200];
3372         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3373
3374         if (params == NULL) return BadAlloc;
3375         __glXClearErrorOccured();
3376
3377         CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
3378             *(GLenum   *)(pc +  0),
3379             pname,
3380             params
3381         ) );
3382         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3383         error = Success;
3384     }
3385
3386     return error;
3387 }
3388
3389 int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
3390 {
3391     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3392     int error;
3393     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3394
3395     pc += __GLX_VENDPRIV_HDR_SIZE;
3396     if ( cx != NULL ) {
3397         const GLenum pname = *(GLenum   *)(pc +  4);
3398
3399         const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
3400         GLfloat answerBuffer[200];
3401         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3402
3403         if (params == NULL) return BadAlloc;
3404         __glXClearErrorOccured();
3405
3406         CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
3407             *(GLenum   *)(pc +  0),
3408             pname,
3409             params
3410         ) );
3411         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3412         error = Success;
3413     }
3414
3415     return error;
3416 }
3417
3418 int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
3419 {
3420     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3421     int error;
3422     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3423
3424     pc += __GLX_SINGLE_HDR_SIZE;
3425     if ( cx != NULL ) {
3426         const GLenum pname = *(GLenum   *)(pc +  4);
3427
3428         const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
3429         GLint answerBuffer[200];
3430         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3431
3432         if (params == NULL) return BadAlloc;
3433         __glXClearErrorOccured();
3434
3435         CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
3436             *(GLenum   *)(pc +  0),
3437             pname,
3438             params
3439         ) );
3440         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3441         error = Success;
3442     }
3443
3444     return error;
3445 }
3446
3447 int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
3448 {
3449     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3450     int error;
3451     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3452
3453     pc += __GLX_VENDPRIV_HDR_SIZE;
3454     if ( cx != NULL ) {
3455         const GLenum pname = *(GLenum   *)(pc +  4);
3456
3457         const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
3458         GLint answerBuffer[200];
3459         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3460
3461         if (params == NULL) return BadAlloc;
3462         __glXClearErrorOccured();
3463
3464         CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
3465             *(GLenum   *)(pc +  0),
3466             pname,
3467             params
3468         ) );
3469         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3470         error = Success;
3471     }
3472
3473     return error;
3474 }
3475
3476 int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
3477 {
3478     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3479     int error;
3480     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3481
3482     pc += __GLX_SINGLE_HDR_SIZE;
3483     if ( cx != NULL ) {
3484         const GLenum pname = *(GLenum   *)(pc +  4);
3485
3486         const GLuint compsize = __glGetHistogramParameterfv_size(pname);
3487         GLfloat answerBuffer[200];
3488         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3489
3490         if (params == NULL) return BadAlloc;
3491         __glXClearErrorOccured();
3492
3493         CALL_GetHistogramParameterfv( GET_DISPATCH(), (
3494             *(GLenum   *)(pc +  0),
3495             pname,
3496             params
3497         ) );
3498         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3499         error = Success;
3500     }
3501
3502     return error;
3503 }
3504
3505 int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
3506 {
3507     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3508     int error;
3509     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3510
3511     pc += __GLX_VENDPRIV_HDR_SIZE;
3512     if ( cx != NULL ) {
3513         const GLenum pname = *(GLenum   *)(pc +  4);
3514
3515         const GLuint compsize = __glGetHistogramParameterfv_size(pname);
3516         GLfloat answerBuffer[200];
3517         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3518
3519         if (params == NULL) return BadAlloc;
3520         __glXClearErrorOccured();
3521
3522         CALL_GetHistogramParameterfv( GET_DISPATCH(), (
3523             *(GLenum   *)(pc +  0),
3524             pname,
3525             params
3526         ) );
3527         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3528         error = Success;
3529     }
3530
3531     return error;
3532 }
3533
3534 int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
3535 {
3536     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3537     int error;
3538     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3539
3540     pc += __GLX_SINGLE_HDR_SIZE;
3541     if ( cx != NULL ) {
3542         const GLenum pname = *(GLenum   *)(pc +  4);
3543
3544         const GLuint compsize = __glGetHistogramParameteriv_size(pname);
3545         GLint answerBuffer[200];
3546         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3547
3548         if (params == NULL) return BadAlloc;
3549         __glXClearErrorOccured();
3550
3551         CALL_GetHistogramParameteriv( GET_DISPATCH(), (
3552             *(GLenum   *)(pc +  0),
3553             pname,
3554             params
3555         ) );
3556         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3557         error = Success;
3558     }
3559
3560     return error;
3561 }
3562
3563 int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
3564 {
3565     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3566     int error;
3567     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3568
3569     pc += __GLX_VENDPRIV_HDR_SIZE;
3570     if ( cx != NULL ) {
3571         const GLenum pname = *(GLenum   *)(pc +  4);
3572
3573         const GLuint compsize = __glGetHistogramParameteriv_size(pname);
3574         GLint answerBuffer[200];
3575         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3576
3577         if (params == NULL) return BadAlloc;
3578         __glXClearErrorOccured();
3579
3580         CALL_GetHistogramParameteriv( GET_DISPATCH(), (
3581             *(GLenum   *)(pc +  0),
3582             pname,
3583             params
3584         ) );
3585         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3586         error = Success;
3587     }
3588
3589     return error;
3590 }
3591
3592 int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
3593 {
3594     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3595     int error;
3596     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3597
3598     pc += __GLX_SINGLE_HDR_SIZE;
3599     if ( cx != NULL ) {
3600         const GLenum pname = *(GLenum   *)(pc +  4);
3601
3602         const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
3603         GLfloat answerBuffer[200];
3604         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3605
3606         if (params == NULL) return BadAlloc;
3607         __glXClearErrorOccured();
3608
3609         CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
3610             *(GLenum   *)(pc +  0),
3611             pname,
3612             params
3613         ) );
3614         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3615         error = Success;
3616     }
3617
3618     return error;
3619 }
3620
3621 int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
3622 {
3623     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3624     int error;
3625     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3626
3627     pc += __GLX_VENDPRIV_HDR_SIZE;
3628     if ( cx != NULL ) {
3629         const GLenum pname = *(GLenum   *)(pc +  4);
3630
3631         const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
3632         GLfloat answerBuffer[200];
3633         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3634
3635         if (params == NULL) return BadAlloc;
3636         __glXClearErrorOccured();
3637
3638         CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
3639             *(GLenum   *)(pc +  0),
3640             pname,
3641             params
3642         ) );
3643         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3644         error = Success;
3645     }
3646
3647     return error;
3648 }
3649
3650 int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
3651 {
3652     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3653     int error;
3654     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3655
3656     pc += __GLX_SINGLE_HDR_SIZE;
3657     if ( cx != NULL ) {
3658         const GLenum pname = *(GLenum   *)(pc +  4);
3659
3660         const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
3661         GLint answerBuffer[200];
3662         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3663
3664         if (params == NULL) return BadAlloc;
3665         __glXClearErrorOccured();
3666
3667         CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
3668             *(GLenum   *)(pc +  0),
3669             pname,
3670             params
3671         ) );
3672         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3673         error = Success;
3674     }
3675
3676     return error;
3677 }
3678
3679 int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
3680 {
3681     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3682     int error;
3683     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
3684
3685     pc += __GLX_VENDPRIV_HDR_SIZE;
3686     if ( cx != NULL ) {
3687         const GLenum pname = *(GLenum   *)(pc +  4);
3688
3689         const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
3690         GLint answerBuffer[200];
3691         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3692
3693         if (params == NULL) return BadAlloc;
3694         __glXClearErrorOccured();
3695
3696         CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
3697             *(GLenum   *)(pc +  0),
3698             pname,
3699             params
3700         ) );
3701         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3702         error = Success;
3703     }
3704
3705     return error;
3706 }
3707
3708 void __glXDisp_Histogram(GLbyte * pc)
3709 {
3710     CALL_Histogram( GET_DISPATCH(), (
3711         *(GLenum   *)(pc +  0),
3712         *(GLsizei  *)(pc +  4),
3713         *(GLenum   *)(pc +  8),
3714         *(GLboolean *)(pc + 12)
3715     ) );
3716 }
3717
3718 void __glXDisp_Minmax(GLbyte * pc)
3719 {
3720     CALL_Minmax( GET_DISPATCH(), (
3721         *(GLenum   *)(pc +  0),
3722         *(GLenum   *)(pc +  4),
3723         *(GLboolean *)(pc +  8)
3724     ) );
3725 }
3726
3727 void __glXDisp_ResetHistogram(GLbyte * pc)
3728 {
3729     CALL_ResetHistogram( GET_DISPATCH(), (
3730         *(GLenum   *)(pc +  0)
3731     ) );
3732 }
3733
3734 void __glXDisp_ResetMinmax(GLbyte * pc)
3735 {
3736     CALL_ResetMinmax( GET_DISPATCH(), (
3737         *(GLenum   *)(pc +  0)
3738     ) );
3739 }
3740
3741 void __glXDisp_TexImage3D(GLbyte * pc)
3742 {
3743     const CARD32 ptr_is_null = *(CARD32 *)(pc + 76);
3744     const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80));
3745     __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
3746
3747     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3748     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3749     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
3750     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) );
3751     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
3752     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES,  (GLint) hdr->skipImages) );
3753     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
3754     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
3755
3756     CALL_TexImage3D( GET_DISPATCH(), (
3757         *(GLenum   *)(pc + 36),
3758         *(GLint    *)(pc + 40),
3759         *(GLint    *)(pc + 44),
3760         *(GLsizei  *)(pc + 48),
3761         *(GLsizei  *)(pc + 52),
3762         *(GLsizei  *)(pc + 56),
3763         *(GLint    *)(pc + 64),
3764         *(GLenum   *)(pc + 68),
3765         *(GLenum   *)(pc + 72),
3766         pixels
3767     ) );
3768 }
3769
3770 void __glXDisp_TexSubImage3D(GLbyte * pc)
3771 {
3772     const GLvoid * const pixels = (const GLvoid *) (pc + 88);
3773     __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
3774
3775     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3776     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3777     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
3778     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) );
3779     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
3780     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES,  (GLint) hdr->skipImages) );
3781     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
3782     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
3783
3784     CALL_TexSubImage3D( GET_DISPATCH(), (
3785         *(GLenum   *)(pc + 36),
3786         *(GLint    *)(pc + 40),
3787         *(GLint    *)(pc + 44),
3788         *(GLint    *)(pc + 48),
3789         *(GLint    *)(pc + 52),
3790         *(GLsizei  *)(pc + 60),
3791         *(GLsizei  *)(pc + 64),
3792         *(GLsizei  *)(pc + 68),
3793         *(GLenum   *)(pc + 76),
3794         *(GLenum   *)(pc + 80),
3795         pixels
3796     ) );
3797 }
3798
3799 void __glXDisp_CopyTexSubImage3D(GLbyte * pc)
3800 {
3801     CALL_CopyTexSubImage3D( GET_DISPATCH(), (
3802         *(GLenum   *)(pc +  0),
3803         *(GLint    *)(pc +  4),
3804         *(GLint    *)(pc +  8),
3805         *(GLint    *)(pc + 12),
3806         *(GLint    *)(pc + 16),
3807         *(GLint    *)(pc + 20),
3808         *(GLint    *)(pc + 24),
3809         *(GLsizei  *)(pc + 28),
3810         *(GLsizei  *)(pc + 32)
3811     ) );
3812 }
3813
3814 void __glXDisp_ActiveTextureARB(GLbyte * pc)
3815 {
3816     CALL_ActiveTextureARB( GET_DISPATCH(), (
3817         *(GLenum   *)(pc +  0)
3818     ) );
3819 }
3820
3821 void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc)
3822 {
3823 #ifdef __GLX_ALIGN64
3824     if ((unsigned long)(pc) & 7) {
3825         (void) memmove(pc-4, pc, 12);
3826         pc -= 4;
3827     }
3828 #endif
3829
3830     CALL_MultiTexCoord1dvARB( GET_DISPATCH(), (
3831         *(GLenum   *)(pc +  8),
3832          (const GLdouble *)(pc +  0)
3833     ) );
3834 }
3835
3836 void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc)
3837 {
3838     CALL_MultiTexCoord1fvARB( GET_DISPATCH(), (
3839         *(GLenum   *)(pc +  0),
3840          (const GLfloat *)(pc +  4)
3841     ) );
3842 }
3843
3844 void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc)
3845 {
3846     CALL_MultiTexCoord1ivARB( GET_DISPATCH(), (
3847         *(GLenum   *)(pc +  0),
3848          (const GLint *)(pc +  4)
3849     ) );
3850 }
3851
3852 void __glXDisp_MultiTexCoord1svARB(GLbyte * pc)
3853 {
3854     CALL_MultiTexCoord1svARB( GET_DISPATCH(), (
3855         *(GLenum   *)(pc +  0),
3856          (const GLshort *)(pc +  4)
3857     ) );
3858 }
3859
3860 void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc)
3861 {
3862 #ifdef __GLX_ALIGN64
3863     if ((unsigned long)(pc) & 7) {
3864         (void) memmove(pc-4, pc, 20);
3865         pc -= 4;
3866     }
3867 #endif
3868
3869     CALL_MultiTexCoord2dvARB( GET_DISPATCH(), (
3870         *(GLenum   *)(pc + 16),
3871          (const GLdouble *)(pc +  0)
3872     ) );
3873 }
3874
3875 void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc)
3876 {
3877     CALL_MultiTexCoord2fvARB( GET_DISPATCH(), (
3878         *(GLenum   *)(pc +  0),
3879          (const GLfloat *)(pc +  4)
3880     ) );
3881 }
3882
3883 void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc)
3884 {
3885     CALL_MultiTexCoord2ivARB( GET_DISPATCH(), (
3886         *(GLenum   *)(pc +  0),
3887          (const GLint *)(pc +  4)
3888     ) );
3889 }
3890
3891 void __glXDisp_MultiTexCoord2svARB(GLbyte * pc)
3892 {
3893     CALL_MultiTexCoord2svARB( GET_DISPATCH(), (
3894         *(GLenum   *)(pc +  0),
3895          (const GLshort *)(pc +  4)
3896     ) );
3897 }
3898
3899 void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc)
3900 {
3901 #ifdef __GLX_ALIGN64
3902     if ((unsigned long)(pc) & 7) {
3903         (void) memmove(pc-4, pc, 28);
3904         pc -= 4;
3905     }
3906 #endif
3907
3908     CALL_MultiTexCoord3dvARB( GET_DISPATCH(), (
3909         *(GLenum   *)(pc + 24),
3910          (const GLdouble *)(pc +  0)
3911     ) );
3912 }
3913
3914 void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc)
3915 {
3916     CALL_MultiTexCoord3fvARB( GET_DISPATCH(), (
3917         *(GLenum   *)(pc +  0),
3918          (const GLfloat *)(pc +  4)
3919     ) );
3920 }
3921
3922 void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc)
3923 {
3924     CALL_MultiTexCoord3ivARB( GET_DISPATCH(), (
3925         *(GLenum   *)(pc +  0),
3926          (const GLint *)(pc +  4)
3927     ) );
3928 }
3929
3930 void __glXDisp_MultiTexCoord3svARB(GLbyte * pc)
3931 {
3932     CALL_MultiTexCoord3svARB( GET_DISPATCH(), (
3933         *(GLenum   *)(pc +  0),
3934          (const GLshort *)(pc +  4)
3935     ) );
3936 }
3937
3938 void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc)
3939 {
3940 #ifdef __GLX_ALIGN64
3941     if ((unsigned long)(pc) & 7) {
3942         (void) memmove(pc-4, pc, 36);
3943         pc -= 4;
3944     }
3945 #endif
3946
3947     CALL_MultiTexCoord4dvARB( GET_DISPATCH(), (
3948         *(GLenum   *)(pc + 32),
3949          (const GLdouble *)(pc +  0)
3950     ) );
3951 }
3952
3953 void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc)
3954 {
3955     CALL_MultiTexCoord4fvARB( GET_DISPATCH(), (
3956         *(GLenum   *)(pc +  0),
3957          (const GLfloat *)(pc +  4)
3958     ) );
3959 }
3960
3961 void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc)
3962 {
3963     CALL_MultiTexCoord4ivARB( GET_DISPATCH(), (
3964         *(GLenum   *)(pc +  0),
3965          (const GLint *)(pc +  4)
3966     ) );
3967 }
3968
3969 void __glXDisp_MultiTexCoord4svARB(GLbyte * pc)
3970 {
3971     CALL_MultiTexCoord4svARB( GET_DISPATCH(), (
3972         *(GLenum   *)(pc +  0),
3973          (const GLshort *)(pc +  4)
3974     ) );
3975 }
3976
3977 void __glXDisp_SampleCoverageARB(GLbyte * pc)
3978 {
3979     CALL_SampleCoverageARB( GET_DISPATCH(), (
3980         *(GLclampf *)(pc +  0),
3981         *(GLboolean *)(pc +  4)
3982     ) );
3983 }
3984
3985 void __glXDisp_CompressedTexImage1DARB(GLbyte * pc)
3986 {
3987     const GLsizei imageSize = *(GLsizei  *)(pc + 20);
3988
3989     CALL_CompressedTexImage1DARB( GET_DISPATCH(), (
3990         *(GLenum   *)(pc +  0),
3991         *(GLint    *)(pc +  4),
3992         *(GLenum   *)(pc +  8),
3993         *(GLsizei  *)(pc + 12),
3994         *(GLint    *)(pc + 16),
3995         imageSize,
3996          (const GLvoid *)(pc + 24)
3997     ) );
3998 }
3999
4000 void __glXDisp_CompressedTexImage2DARB(GLbyte * pc)
4001 {
4002     const GLsizei imageSize = *(GLsizei  *)(pc + 24);
4003
4004     CALL_CompressedTexImage2DARB( GET_DISPATCH(), (
4005         *(GLenum   *)(pc +  0),
4006         *(GLint    *)(pc +  4),
4007         *(GLenum   *)(pc +  8),
4008         *(GLsizei  *)(pc + 12),
4009         *(GLsizei  *)(pc + 16),
4010         *(GLint    *)(pc + 20),
4011         imageSize,
4012          (const GLvoid *)(pc + 28)
4013     ) );
4014 }
4015
4016 void __glXDisp_CompressedTexImage3DARB(GLbyte * pc)
4017 {
4018     const GLsizei imageSize = *(GLsizei  *)(pc + 28);
4019
4020     CALL_CompressedTexImage3DARB( GET_DISPATCH(), (
4021         *(GLenum   *)(pc +  0),
4022         *(GLint    *)(pc +  4),
4023         *(GLenum   *)(pc +  8),
4024         *(GLsizei  *)(pc + 12),
4025         *(GLsizei  *)(pc + 16),
4026         *(GLsizei  *)(pc + 20),
4027         *(GLint    *)(pc + 24),
4028         imageSize,
4029          (const GLvoid *)(pc + 32)
4030     ) );
4031 }
4032
4033 void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc)
4034 {
4035     const GLsizei imageSize = *(GLsizei  *)(pc + 20);
4036
4037     CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), (
4038         *(GLenum   *)(pc +  0),
4039         *(GLint    *)(pc +  4),
4040         *(GLint    *)(pc +  8),
4041         *(GLsizei  *)(pc + 12),
4042         *(GLenum   *)(pc + 16),
4043         imageSize,
4044          (const GLvoid *)(pc + 24)
4045     ) );
4046 }
4047
4048 void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc)
4049 {
4050     const GLsizei imageSize = *(GLsizei  *)(pc + 28);
4051
4052     CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), (
4053         *(GLenum   *)(pc +  0),
4054         *(GLint    *)(pc +  4),
4055         *(GLint    *)(pc +  8),
4056         *(GLint    *)(pc + 12),
4057         *(GLsizei  *)(pc + 16),
4058         *(GLsizei  *)(pc + 20),
4059         *(GLenum   *)(pc + 24),
4060         imageSize,
4061          (const GLvoid *)(pc + 32)
4062     ) );
4063 }
4064
4065 void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc)
4066 {
4067     const GLsizei imageSize = *(GLsizei  *)(pc + 36);
4068
4069     CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), (
4070         *(GLenum   *)(pc +  0),
4071         *(GLint    *)(pc +  4),
4072         *(GLint    *)(pc +  8),
4073         *(GLint    *)(pc + 12),
4074         *(GLint    *)(pc + 16),
4075         *(GLsizei  *)(pc + 20),
4076         *(GLsizei  *)(pc + 24),
4077         *(GLsizei  *)(pc + 28),
4078         *(GLenum   *)(pc + 32),
4079         imageSize,
4080          (const GLvoid *)(pc + 40)
4081     ) );
4082 }
4083
4084 int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc)
4085 {
4086     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4087     int error;
4088     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4089
4090     pc += __GLX_VENDPRIV_HDR_SIZE;
4091     if ( cx != NULL ) {
4092         GLdouble params[4];
4093         CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), (
4094             *(GLenum   *)(pc +  0),
4095             *(GLuint   *)(pc +  4),
4096             params
4097         ) );
4098         __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
4099         error = Success;
4100     }
4101
4102     return error;
4103 }
4104
4105 int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc)
4106 {
4107     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4108     int error;
4109     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4110
4111     pc += __GLX_VENDPRIV_HDR_SIZE;
4112     if ( cx != NULL ) {
4113         GLfloat params[4];
4114         CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), (
4115             *(GLenum   *)(pc +  0),
4116             *(GLuint   *)(pc +  4),
4117             params
4118         ) );
4119         __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
4120         error = Success;
4121     }
4122
4123     return error;
4124 }
4125
4126 int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc)
4127 {
4128     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4129     int error;
4130     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4131
4132     pc += __GLX_VENDPRIV_HDR_SIZE;
4133     if ( cx != NULL ) {
4134         GLdouble params[4];
4135         CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), (
4136             *(GLenum   *)(pc +  0),
4137             *(GLuint   *)(pc +  4),
4138             params
4139         ) );
4140         __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
4141         error = Success;
4142     }
4143
4144     return error;
4145 }
4146
4147 int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc)
4148 {
4149     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4150     int error;
4151     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4152
4153     pc += __GLX_VENDPRIV_HDR_SIZE;
4154     if ( cx != NULL ) {
4155         GLfloat params[4];
4156         CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), (
4157             *(GLenum   *)(pc +  0),
4158             *(GLuint   *)(pc +  4),
4159             params
4160         ) );
4161         __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
4162         error = Success;
4163     }
4164
4165     return error;
4166 }
4167
4168 int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc)
4169 {
4170     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4171     int error;
4172     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4173
4174     pc += __GLX_VENDPRIV_HDR_SIZE;
4175     if ( cx != NULL ) {
4176         const GLenum pname = *(GLenum   *)(pc +  4);
4177
4178         const GLuint compsize = __glGetProgramivARB_size(pname);
4179         GLint answerBuffer[200];
4180         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4181
4182         if (params == NULL) return BadAlloc;
4183         __glXClearErrorOccured();
4184
4185         CALL_GetProgramivARB( GET_DISPATCH(), (
4186             *(GLenum   *)(pc +  0),
4187             pname,
4188             params
4189         ) );
4190         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
4191         error = Success;
4192     }
4193
4194     return error;
4195 }
4196
4197 int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc)
4198 {
4199     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4200     int error;
4201     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4202
4203     pc += __GLX_VENDPRIV_HDR_SIZE;
4204     if ( cx != NULL ) {
4205         const GLenum pname = *(GLenum   *)(pc +  4);
4206
4207         const GLuint compsize = __glGetVertexAttribdvARB_size(pname);
4208         GLdouble answerBuffer[200];
4209         GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
4210
4211         if (params == NULL) return BadAlloc;
4212         __glXClearErrorOccured();
4213
4214         CALL_GetVertexAttribdvARB( GET_DISPATCH(), (
4215             *(GLuint   *)(pc +  0),
4216             pname,
4217             params
4218         ) );
4219         __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
4220         error = Success;
4221     }
4222
4223     return error;
4224 }
4225
4226 int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc)
4227 {
4228     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4229     int error;
4230     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4231
4232     pc += __GLX_VENDPRIV_HDR_SIZE;
4233     if ( cx != NULL ) {
4234         const GLenum pname = *(GLenum   *)(pc +  4);
4235
4236         const GLuint compsize = __glGetVertexAttribfvARB_size(pname);
4237         GLfloat answerBuffer[200];
4238         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4239
4240         if (params == NULL) return BadAlloc;
4241         __glXClearErrorOccured();
4242
4243         CALL_GetVertexAttribfvARB( GET_DISPATCH(), (
4244             *(GLuint   *)(pc +  0),
4245             pname,
4246             params
4247         ) );
4248         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
4249         error = Success;
4250     }
4251
4252     return error;
4253 }
4254
4255 int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc)
4256 {
4257     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4258     int error;
4259     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4260
4261     pc += __GLX_VENDPRIV_HDR_SIZE;
4262     if ( cx != NULL ) {
4263         const GLenum pname = *(GLenum   *)(pc +  4);
4264
4265         const GLuint compsize = __glGetVertexAttribivARB_size(pname);
4266         GLint answerBuffer[200];
4267         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4268
4269         if (params == NULL) return BadAlloc;
4270         __glXClearErrorOccured();
4271
4272         CALL_GetVertexAttribivARB( GET_DISPATCH(), (
4273             *(GLuint   *)(pc +  0),
4274             pname,
4275             params
4276         ) );
4277         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
4278         error = Success;
4279     }
4280
4281     return error;
4282 }
4283
4284 void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc)
4285 {
4286 #ifdef __GLX_ALIGN64
4287     if ((unsigned long)(pc) & 7) {
4288         (void) memmove(pc-4, pc, 40);
4289         pc -= 4;
4290     }
4291 #endif
4292
4293     CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), (
4294         *(GLenum   *)(pc +  0),
4295         *(GLuint   *)(pc +  4),
4296          (const GLdouble *)(pc +  8)
4297     ) );
4298 }
4299
4300 void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc)
4301 {
4302     CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), (
4303         *(GLenum   *)(pc +  0),
4304         *(GLuint   *)(pc +  4),
4305          (const GLfloat *)(pc +  8)
4306     ) );
4307 }
4308
4309 void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc)
4310 {
4311 #ifdef __GLX_ALIGN64
4312     if ((unsigned long)(pc) & 7) {
4313         (void) memmove(pc-4, pc, 40);
4314         pc -= 4;
4315     }
4316 #endif
4317
4318     CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), (
4319         *(GLenum   *)(pc +  0),
4320         *(GLuint   *)(pc +  4),
4321          (const GLdouble *)(pc +  8)
4322     ) );
4323 }
4324
4325 void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc)
4326 {
4327     CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), (
4328         *(GLenum   *)(pc +  0),
4329         *(GLuint   *)(pc +  4),
4330          (const GLfloat *)(pc +  8)
4331     ) );
4332 }
4333
4334 void __glXDisp_ProgramStringARB(GLbyte * pc)
4335 {
4336     const GLsizei len = *(GLsizei  *)(pc +  8);
4337
4338     CALL_ProgramStringARB( GET_DISPATCH(), (
4339         *(GLenum   *)(pc +  0),
4340         *(GLenum   *)(pc +  4),
4341         len,
4342          (const GLvoid *)(pc + 12)
4343     ) );
4344 }
4345
4346 void __glXDisp_VertexAttrib1dvARB(GLbyte * pc)
4347 {
4348 #ifdef __GLX_ALIGN64
4349     if ((unsigned long)(pc) & 7) {
4350         (void) memmove(pc-4, pc, 12);
4351         pc -= 4;
4352     }
4353 #endif
4354
4355     CALL_VertexAttrib1dvARB( GET_DISPATCH(), (
4356         *(GLuint   *)(pc +  0),
4357          (const GLdouble *)(pc +  4)
4358     ) );
4359 }
4360
4361 void __glXDisp_VertexAttrib1fvARB(GLbyte * pc)
4362 {
4363     CALL_VertexAttrib1fvARB( GET_DISPATCH(), (
4364         *(GLuint   *)(pc +  0),
4365          (const GLfloat *)(pc +  4)
4366     ) );
4367 }
4368
4369 void __glXDisp_VertexAttrib1svARB(GLbyte * pc)
4370 {
4371     CALL_VertexAttrib1svARB( GET_DISPATCH(), (
4372         *(GLuint   *)(pc +  0),
4373          (const GLshort *)(pc +  4)
4374     ) );
4375 }
4376
4377 void __glXDisp_VertexAttrib2dvARB(GLbyte * pc)
4378 {
4379 #ifdef __GLX_ALIGN64
4380     if ((unsigned long)(pc) & 7) {
4381         (void) memmove(pc-4, pc, 20);
4382         pc -= 4;
4383     }
4384 #endif
4385
4386     CALL_VertexAttrib2dvARB( GET_DISPATCH(), (
4387         *(GLuint   *)(pc +  0),
4388          (const GLdouble *)(pc +  4)
4389     ) );
4390 }
4391
4392 void __glXDisp_VertexAttrib2fvARB(GLbyte * pc)
4393 {
4394     CALL_VertexAttrib2fvARB( GET_DISPATCH(), (
4395         *(GLuint   *)(pc +  0),
4396          (const GLfloat *)(pc +  4)
4397     ) );
4398 }
4399
4400 void __glXDisp_VertexAttrib2svARB(GLbyte * pc)
4401 {
4402     CALL_VertexAttrib2svARB( GET_DISPATCH(), (
4403         *(GLuint   *)(pc +  0),
4404          (const GLshort *)(pc +  4)
4405     ) );
4406 }
4407
4408 void __glXDisp_VertexAttrib3dvARB(GLbyte * pc)
4409 {
4410 #ifdef __GLX_ALIGN64
4411     if ((unsigned long)(pc) & 7) {
4412         (void) memmove(pc-4, pc, 28);
4413         pc -= 4;
4414     }
4415 #endif
4416
4417     CALL_VertexAttrib3dvARB( GET_DISPATCH(), (
4418         *(GLuint   *)(pc +  0),
4419          (const GLdouble *)(pc +  4)
4420     ) );
4421 }
4422
4423 void __glXDisp_VertexAttrib3fvARB(GLbyte * pc)
4424 {
4425     CALL_VertexAttrib3fvARB( GET_DISPATCH(), (
4426         *(GLuint   *)(pc +  0),
4427          (const GLfloat *)(pc +  4)
4428     ) );
4429 }
4430
4431 void __glXDisp_VertexAttrib3svARB(GLbyte * pc)
4432 {
4433     CALL_VertexAttrib3svARB( GET_DISPATCH(), (
4434         *(GLuint   *)(pc +  0),
4435          (const GLshort *)(pc +  4)
4436     ) );
4437 }
4438
4439 void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc)
4440 {
4441     CALL_VertexAttrib4NbvARB( GET_DISPATCH(), (
4442         *(GLuint   *)(pc +  0),
4443          (const GLbyte *)(pc +  4)
4444     ) );
4445 }
4446
4447 void __glXDisp_VertexAttrib4NivARB(GLbyte * pc)
4448 {
4449     CALL_VertexAttrib4NivARB( GET_DISPATCH(), (
4450         *(GLuint   *)(pc +  0),
4451          (const GLint *)(pc +  4)
4452     ) );
4453 }
4454
4455 void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc)
4456 {
4457     CALL_VertexAttrib4NsvARB( GET_DISPATCH(), (
4458         *(GLuint   *)(pc +  0),
4459          (const GLshort *)(pc +  4)
4460     ) );
4461 }
4462
4463 void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc)
4464 {
4465     CALL_VertexAttrib4NubvARB( GET_DISPATCH(), (
4466         *(GLuint   *)(pc +  0),
4467          (const GLubyte *)(pc +  4)
4468     ) );
4469 }
4470
4471 void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc)
4472 {
4473     CALL_VertexAttrib4NuivARB( GET_DISPATCH(), (
4474         *(GLuint   *)(pc +  0),
4475          (const GLuint *)(pc +  4)
4476     ) );
4477 }
4478
4479 void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc)
4480 {
4481     CALL_VertexAttrib4NusvARB( GET_DISPATCH(), (
4482         *(GLuint   *)(pc +  0),
4483          (const GLushort *)(pc +  4)
4484     ) );
4485 }
4486
4487 void __glXDisp_VertexAttrib4bvARB(GLbyte * pc)
4488 {
4489     CALL_VertexAttrib4bvARB( GET_DISPATCH(), (
4490         *(GLuint   *)(pc +  0),
4491          (const GLbyte *)(pc +  4)
4492     ) );
4493 }
4494
4495 void __glXDisp_VertexAttrib4dvARB(GLbyte * pc)
4496 {
4497 #ifdef __GLX_ALIGN64
4498     if ((unsigned long)(pc) & 7) {
4499         (void) memmove(pc-4, pc, 36);
4500         pc -= 4;
4501     }
4502 #endif
4503
4504     CALL_VertexAttrib4dvARB( GET_DISPATCH(), (
4505         *(GLuint   *)(pc +  0),
4506          (const GLdouble *)(pc +  4)
4507     ) );
4508 }
4509
4510 void __glXDisp_VertexAttrib4fvARB(GLbyte * pc)
4511 {
4512     CALL_VertexAttrib4fvARB( GET_DISPATCH(), (
4513         *(GLuint   *)(pc +  0),
4514          (const GLfloat *)(pc +  4)
4515     ) );
4516 }
4517
4518 void __glXDisp_VertexAttrib4ivARB(GLbyte * pc)
4519 {
4520     CALL_VertexAttrib4ivARB( GET_DISPATCH(), (
4521         *(GLuint   *)(pc +  0),
4522          (const GLint *)(pc +  4)
4523     ) );
4524 }
4525
4526 void __glXDisp_VertexAttrib4svARB(GLbyte * pc)
4527 {
4528     CALL_VertexAttrib4svARB( GET_DISPATCH(), (
4529         *(GLuint   *)(pc +  0),
4530          (const GLshort *)(pc +  4)
4531     ) );
4532 }
4533
4534 void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc)
4535 {
4536     CALL_VertexAttrib4ubvARB( GET_DISPATCH(), (
4537         *(GLuint   *)(pc +  0),
4538          (const GLubyte *)(pc +  4)
4539     ) );
4540 }
4541
4542 void __glXDisp_VertexAttrib4uivARB(GLbyte * pc)
4543 {
4544     CALL_VertexAttrib4uivARB( GET_DISPATCH(), (
4545         *(GLuint   *)(pc +  0),
4546          (const GLuint *)(pc +  4)
4547     ) );
4548 }
4549
4550 void __glXDisp_VertexAttrib4usvARB(GLbyte * pc)
4551 {
4552     CALL_VertexAttrib4usvARB( GET_DISPATCH(), (
4553         *(GLuint   *)(pc +  0),
4554          (const GLushort *)(pc +  4)
4555     ) );
4556 }
4557
4558 void __glXDisp_BeginQueryARB(GLbyte * pc)
4559 {
4560     CALL_BeginQueryARB( GET_DISPATCH(), (
4561         *(GLenum   *)(pc +  0),
4562         *(GLuint   *)(pc +  4)
4563     ) );
4564 }
4565
4566 int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc)
4567 {
4568     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4569     int error;
4570     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4571
4572     pc += __GLX_SINGLE_HDR_SIZE;
4573     if ( cx != NULL ) {
4574         const GLsizei n = *(GLsizei  *)(pc +  0);
4575
4576         CALL_DeleteQueriesARB( GET_DISPATCH(), (
4577             n,
4578              (const GLuint *)(pc +  4)
4579         ) );
4580         error = Success;
4581     }
4582
4583     return error;
4584 }
4585
4586 void __glXDisp_EndQueryARB(GLbyte * pc)
4587 {
4588     CALL_EndQueryARB( GET_DISPATCH(), (
4589         *(GLenum   *)(pc +  0)
4590     ) );
4591 }
4592
4593 int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc)
4594 {
4595     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4596     int error;
4597     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4598
4599     pc += __GLX_SINGLE_HDR_SIZE;
4600     if ( cx != NULL ) {
4601         const GLsizei n = *(GLsizei  *)(pc +  0);
4602
4603         GLuint answerBuffer[200];
4604         GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
4605         CALL_GenQueriesARB( GET_DISPATCH(), (
4606             n,
4607             ids
4608         ) );
4609         __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0);
4610         error = Success;
4611     }
4612
4613     return error;
4614 }
4615
4616 int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc)
4617 {
4618     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4619     int error;
4620     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4621
4622     pc += __GLX_SINGLE_HDR_SIZE;
4623     if ( cx != NULL ) {
4624         const GLenum pname = *(GLenum   *)(pc +  4);
4625
4626         const GLuint compsize = __glGetQueryObjectivARB_size(pname);
4627         GLint answerBuffer[200];
4628         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4629
4630         if (params == NULL) return BadAlloc;
4631         __glXClearErrorOccured();
4632
4633         CALL_GetQueryObjectivARB( GET_DISPATCH(), (
4634             *(GLuint   *)(pc +  0),
4635             pname,
4636             params
4637         ) );
4638         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
4639         error = Success;
4640     }
4641
4642     return error;
4643 }
4644
4645 int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc)
4646 {
4647     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4648     int error;
4649     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4650
4651     pc += __GLX_SINGLE_HDR_SIZE;
4652     if ( cx != NULL ) {
4653         const GLenum pname = *(GLenum   *)(pc +  4);
4654
4655         const GLuint compsize = __glGetQueryObjectuivARB_size(pname);
4656         GLuint answerBuffer[200];
4657         GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4658
4659         if (params == NULL) return BadAlloc;
4660         __glXClearErrorOccured();
4661
4662         CALL_GetQueryObjectuivARB( GET_DISPATCH(), (
4663             *(GLuint   *)(pc +  0),
4664             pname,
4665             params
4666         ) );
4667         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
4668         error = Success;
4669     }
4670
4671     return error;
4672 }
4673
4674 int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc)
4675 {
4676     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4677     int error;
4678     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4679
4680     pc += __GLX_SINGLE_HDR_SIZE;
4681     if ( cx != NULL ) {
4682         const GLenum pname = *(GLenum   *)(pc +  4);
4683
4684         const GLuint compsize = __glGetQueryivARB_size(pname);
4685         GLint answerBuffer[200];
4686         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4687
4688         if (params == NULL) return BadAlloc;
4689         __glXClearErrorOccured();
4690
4691         CALL_GetQueryivARB( GET_DISPATCH(), (
4692             *(GLenum   *)(pc +  0),
4693             pname,
4694             params
4695         ) );
4696         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
4697         error = Success;
4698     }
4699
4700     return error;
4701 }
4702
4703 int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc)
4704 {
4705     xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4706     int error;
4707     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4708
4709     pc += __GLX_SINGLE_HDR_SIZE;
4710     if ( cx != NULL ) {
4711         GLboolean retval;
4712         retval = CALL_IsQueryARB( GET_DISPATCH(), (
4713             *(GLuint   *)(pc +  0)
4714         ) );
4715         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
4716         error = Success;
4717     }
4718
4719     return error;
4720 }
4721
4722 void __glXDisp_DrawBuffersARB(GLbyte * pc)
4723 {
4724     const GLsizei n = *(GLsizei  *)(pc +  0);
4725
4726     CALL_DrawBuffersARB( GET_DISPATCH(), (
4727         n,
4728          (const GLenum *)(pc +  4)
4729     ) );
4730 }
4731
4732 void __glXDisp_SampleMaskSGIS(GLbyte * pc)
4733 {
4734     CALL_SampleMaskSGIS( GET_DISPATCH(), (
4735         *(GLclampf *)(pc +  0),
4736         *(GLboolean *)(pc +  4)
4737     ) );
4738 }
4739
4740 void __glXDisp_SamplePatternSGIS(GLbyte * pc)
4741 {
4742     CALL_SamplePatternSGIS( GET_DISPATCH(), (
4743         *(GLenum   *)(pc +  0)
4744     ) );
4745 }
4746
4747 void __glXDisp_PointParameterfEXT(GLbyte * pc)
4748 {
4749     CALL_PointParameterfEXT( GET_DISPATCH(), (
4750         *(GLenum   *)(pc +  0),
4751         *(GLfloat  *)(pc +  4)
4752     ) );
4753 }
4754
4755 void __glXDisp_PointParameterfvEXT(GLbyte * pc)
4756 {
4757     const GLenum pname = *(GLenum   *)(pc +  0);
4758     const GLfloat * params;
4759
4760     params = (const GLfloat *) (pc + 4);
4761
4762     CALL_PointParameterfvEXT( GET_DISPATCH(), (
4763         pname,
4764         params
4765     ) );
4766 }
4767
4768 void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc)
4769 {
4770     CALL_SecondaryColor3bvEXT( GET_DISPATCH(), (
4771          (const GLbyte *)(pc +  0)
4772     ) );
4773 }
4774
4775 void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc)
4776 {
4777 #ifdef __GLX_ALIGN64
4778     if ((unsigned long)(pc) & 7) {
4779         (void) memmove(pc-4, pc, 24);
4780         pc -= 4;
4781     }
4782 #endif
4783
4784     CALL_SecondaryColor3dvEXT( GET_DISPATCH(), (
4785          (const GLdouble *)(pc +  0)
4786     ) );
4787 }
4788
4789 void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc)
4790 {
4791     CALL_SecondaryColor3fvEXT( GET_DISPATCH(), (
4792          (const GLfloat *)(pc +  0)
4793     ) );
4794 }
4795
4796 void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc)
4797 {
4798     CALL_SecondaryColor3ivEXT( GET_DISPATCH(), (
4799          (const GLint *)(pc +  0)
4800     ) );
4801 }
4802
4803 void __glXDisp_SecondaryColor3svEXT(GLbyte * pc)
4804 {
4805     CALL_SecondaryColor3svEXT( GET_DISPATCH(), (
4806          (const GLshort *)(pc +  0)
4807     ) );
4808 }
4809
4810 void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc)
4811 {
4812     CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), (
4813          (const GLubyte *)(pc +  0)
4814     ) );
4815 }
4816
4817 void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc)
4818 {
4819     CALL_SecondaryColor3uivEXT( GET_DISPATCH(), (
4820          (const GLuint *)(pc +  0)
4821     ) );
4822 }
4823
4824 void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc)
4825 {
4826     CALL_SecondaryColor3usvEXT( GET_DISPATCH(), (
4827          (const GLushort *)(pc +  0)
4828     ) );
4829 }
4830
4831 void __glXDisp_FogCoorddvEXT(GLbyte * pc)
4832 {
4833 #ifdef __GLX_ALIGN64
4834     if ((unsigned long)(pc) & 7) {
4835         (void) memmove(pc-4, pc, 8);
4836         pc -= 4;
4837     }
4838 #endif
4839
4840     CALL_FogCoorddvEXT( GET_DISPATCH(), (
4841          (const GLdouble *)(pc +  0)
4842     ) );
4843 }
4844
4845 void __glXDisp_FogCoordfvEXT(GLbyte * pc)
4846 {
4847     CALL_FogCoordfvEXT( GET_DISPATCH(), (
4848          (const GLfloat *)(pc +  0)
4849     ) );
4850 }
4851
4852 void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc)
4853 {
4854     CALL_BlendFuncSeparateEXT( GET_DISPATCH(), (
4855         *(GLenum   *)(pc +  0),
4856         *(GLenum   *)(pc +  4),
4857         *(GLenum   *)(pc +  8),
4858         *(GLenum   *)(pc + 12)
4859     ) );
4860 }
4861
4862 void __glXDisp_WindowPos3fvMESA(GLbyte * pc)
4863 {
4864     CALL_WindowPos3fvMESA( GET_DISPATCH(), (
4865          (const GLfloat *)(pc +  0)
4866     ) );
4867 }
4868
4869 int __glXDisp_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc)
4870 {
4871     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4872     int error;
4873     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4874
4875     pc += __GLX_VENDPRIV_HDR_SIZE;
4876     if ( cx != NULL ) {
4877         const GLsizei n = *(GLsizei  *)(pc +  0);
4878
4879         GLboolean retval;
4880         GLboolean answerBuffer[200];
4881         GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
4882         retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), (
4883             n,
4884              (const GLuint *)(pc +  4),
4885             residences
4886         ) );
4887         __glXSendReply(cl->client, residences, n, 1, GL_FALSE, retval);
4888         error = Success;
4889     }
4890
4891     return error;
4892 }
4893
4894 void __glXDisp_BindProgramNV(GLbyte * pc)
4895 {
4896     CALL_BindProgramNV( GET_DISPATCH(), (
4897         *(GLenum   *)(pc +  0),
4898         *(GLuint   *)(pc +  4)
4899     ) );
4900 }
4901
4902 int __glXDisp_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc)
4903 {
4904     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4905     int error;
4906     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4907
4908     pc += __GLX_VENDPRIV_HDR_SIZE;
4909     if ( cx != NULL ) {
4910         const GLsizei n = *(GLsizei  *)(pc +  0);
4911
4912         CALL_DeleteProgramsNV( GET_DISPATCH(), (
4913             n,
4914              (const GLuint *)(pc +  4)
4915         ) );
4916         error = Success;
4917     }
4918
4919     return error;
4920 }
4921
4922 void __glXDisp_ExecuteProgramNV(GLbyte * pc)
4923 {
4924     CALL_ExecuteProgramNV( GET_DISPATCH(), (
4925         *(GLenum   *)(pc +  0),
4926         *(GLuint   *)(pc +  4),
4927          (const GLfloat *)(pc +  8)
4928     ) );
4929 }
4930
4931 int __glXDisp_GenProgramsNV(__GLXclientState *cl, GLbyte *pc)
4932 {
4933     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4934     int error;
4935     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4936
4937     pc += __GLX_VENDPRIV_HDR_SIZE;
4938     if ( cx != NULL ) {
4939         const GLsizei n = *(GLsizei  *)(pc +  0);
4940
4941         GLuint answerBuffer[200];
4942         GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
4943         CALL_GenProgramsNV( GET_DISPATCH(), (
4944             n,
4945             programs
4946         ) );
4947         __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0);
4948         error = Success;
4949     }
4950
4951     return error;
4952 }
4953
4954 int __glXDisp_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc)
4955 {
4956     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4957     int error;
4958     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4959
4960     pc += __GLX_VENDPRIV_HDR_SIZE;
4961     if ( cx != NULL ) {
4962         GLdouble params[4];
4963         CALL_GetProgramParameterdvNV( GET_DISPATCH(), (
4964             *(GLenum   *)(pc +  0),
4965             *(GLuint   *)(pc +  4),
4966             *(GLenum   *)(pc +  8),
4967             params
4968         ) );
4969         __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
4970         error = Success;
4971     }
4972
4973     return error;
4974 }
4975
4976 int __glXDisp_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc)
4977 {
4978     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4979     int error;
4980     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
4981
4982     pc += __GLX_VENDPRIV_HDR_SIZE;
4983     if ( cx != NULL ) {
4984         GLfloat params[4];
4985         CALL_GetProgramParameterfvNV( GET_DISPATCH(), (
4986             *(GLenum   *)(pc +  0),
4987             *(GLuint   *)(pc +  4),
4988             *(GLenum   *)(pc +  8),
4989             params
4990         ) );
4991         __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
4992         error = Success;
4993     }
4994
4995     return error;
4996 }
4997
4998 int __glXDisp_GetProgramivNV(__GLXclientState *cl, GLbyte *pc)
4999 {
5000     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5001     int error;
5002     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5003
5004     pc += __GLX_VENDPRIV_HDR_SIZE;
5005     if ( cx != NULL ) {
5006         const GLenum pname = *(GLenum   *)(pc +  4);
5007
5008         const GLuint compsize = __glGetProgramivNV_size(pname);
5009         GLint answerBuffer[200];
5010         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
5011
5012         if (params == NULL) return BadAlloc;
5013         __glXClearErrorOccured();
5014
5015         CALL_GetProgramivNV( GET_DISPATCH(), (
5016             *(GLuint   *)(pc +  0),
5017             pname,
5018             params
5019         ) );
5020         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
5021         error = Success;
5022     }
5023
5024     return error;
5025 }
5026
5027 int __glXDisp_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc)
5028 {
5029     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5030     int error;
5031     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5032
5033     pc += __GLX_VENDPRIV_HDR_SIZE;
5034     if ( cx != NULL ) {
5035         GLint params[1];
5036         CALL_GetTrackMatrixivNV( GET_DISPATCH(), (
5037             *(GLenum   *)(pc +  0),
5038             *(GLuint   *)(pc +  4),
5039             *(GLenum   *)(pc +  8),
5040             params
5041         ) );
5042         __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
5043         error = Success;
5044     }
5045
5046     return error;
5047 }
5048
5049 int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc)
5050 {
5051     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5052     int error;
5053     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5054
5055     pc += __GLX_VENDPRIV_HDR_SIZE;
5056     if ( cx != NULL ) {
5057         const GLenum pname = *(GLenum   *)(pc +  4);
5058
5059         const GLuint compsize = __glGetVertexAttribdvNV_size(pname);
5060         GLdouble answerBuffer[200];
5061         GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
5062
5063         if (params == NULL) return BadAlloc;
5064         __glXClearErrorOccured();
5065
5066         CALL_GetVertexAttribdvNV( GET_DISPATCH(), (
5067             *(GLuint   *)(pc +  0),
5068             pname,
5069             params
5070         ) );
5071         __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
5072         error = Success;
5073     }
5074
5075     return error;
5076 }
5077
5078 int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc)
5079 {
5080     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5081     int error;
5082     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5083
5084     pc += __GLX_VENDPRIV_HDR_SIZE;
5085     if ( cx != NULL ) {
5086         const GLenum pname = *(GLenum   *)(pc +  4);
5087
5088         const GLuint compsize = __glGetVertexAttribfvNV_size(pname);
5089         GLfloat answerBuffer[200];
5090         GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
5091
5092         if (params == NULL) return BadAlloc;
5093         __glXClearErrorOccured();
5094
5095         CALL_GetVertexAttribfvNV( GET_DISPATCH(), (
5096             *(GLuint   *)(pc +  0),
5097             pname,
5098             params
5099         ) );
5100         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
5101         error = Success;
5102     }
5103
5104     return error;
5105 }
5106
5107 int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc)
5108 {
5109     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5110     int error;
5111     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5112
5113     pc += __GLX_VENDPRIV_HDR_SIZE;
5114     if ( cx != NULL ) {
5115         const GLenum pname = *(GLenum   *)(pc +  4);
5116
5117         const GLuint compsize = __glGetVertexAttribivNV_size(pname);
5118         GLint answerBuffer[200];
5119         GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
5120
5121         if (params == NULL) return BadAlloc;
5122         __glXClearErrorOccured();
5123
5124         CALL_GetVertexAttribivNV( GET_DISPATCH(), (
5125             *(GLuint   *)(pc +  0),
5126             pname,
5127             params
5128         ) );
5129         __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
5130         error = Success;
5131     }
5132
5133     return error;
5134 }
5135
5136 int __glXDisp_IsProgramNV(__GLXclientState *cl, GLbyte *pc)
5137 {
5138     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5139     int error;
5140     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5141
5142     pc += __GLX_VENDPRIV_HDR_SIZE;
5143     if ( cx != NULL ) {
5144         GLboolean retval;
5145         retval = CALL_IsProgramNV( GET_DISPATCH(), (
5146             *(GLuint   *)(pc +  0)
5147         ) );
5148         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
5149         error = Success;
5150     }
5151
5152     return error;
5153 }
5154
5155 void __glXDisp_LoadProgramNV(GLbyte * pc)
5156 {
5157     const GLsizei len = *(GLsizei  *)(pc +  8);
5158
5159     CALL_LoadProgramNV( GET_DISPATCH(), (
5160         *(GLenum   *)(pc +  0),
5161         *(GLuint   *)(pc +  4),
5162         len,
5163          (const GLubyte *)(pc + 12)
5164     ) );
5165 }
5166
5167 void __glXDisp_ProgramParameters4dvNV(GLbyte * pc)
5168 {
5169     const GLuint num = *(GLuint   *)(pc +  8);
5170
5171 #ifdef __GLX_ALIGN64
5172     const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
5173     if ((unsigned long)(pc) & 7) {
5174         (void) memmove(pc-4, pc, cmdlen);
5175         pc -= 4;
5176     }
5177 #endif
5178
5179     CALL_ProgramParameters4dvNV( GET_DISPATCH(), (
5180         *(GLenum   *)(pc +  0),
5181         *(GLuint   *)(pc +  4),
5182         num,
5183          (const GLdouble *)(pc + 12)
5184     ) );
5185 }
5186
5187 void __glXDisp_ProgramParameters4fvNV(GLbyte * pc)
5188 {
5189     const GLuint num = *(GLuint   *)(pc +  8);
5190
5191     CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
5192         *(GLenum   *)(pc +  0),
5193         *(GLuint   *)(pc +  4),
5194         num,
5195          (const GLfloat *)(pc + 12)
5196     ) );
5197 }
5198
5199 void __glXDisp_RequestResidentProgramsNV(GLbyte * pc)
5200 {
5201     const GLsizei n = *(GLsizei  *)(pc +  0);
5202
5203     CALL_RequestResidentProgramsNV( GET_DISPATCH(), (
5204         n,
5205          (const GLuint *)(pc +  4)
5206     ) );
5207 }
5208
5209 void __glXDisp_TrackMatrixNV(GLbyte * pc)
5210 {
5211     CALL_TrackMatrixNV( GET_DISPATCH(), (
5212         *(GLenum   *)(pc +  0),
5213         *(GLuint   *)(pc +  4),
5214         *(GLenum   *)(pc +  8),
5215         *(GLenum   *)(pc + 12)
5216     ) );
5217 }
5218
5219 void __glXDisp_VertexAttrib1dvNV(GLbyte * pc)
5220 {
5221 #ifdef __GLX_ALIGN64
5222     if ((unsigned long)(pc) & 7) {
5223         (void) memmove(pc-4, pc, 12);
5224         pc -= 4;
5225     }
5226 #endif
5227
5228     CALL_VertexAttrib1dvNV( GET_DISPATCH(), (
5229         *(GLuint   *)(pc +  0),
5230          (const GLdouble *)(pc +  4)
5231     ) );
5232 }
5233
5234 void __glXDisp_VertexAttrib1fvNV(GLbyte * pc)
5235 {
5236     CALL_VertexAttrib1fvNV( GET_DISPATCH(), (
5237         *(GLuint   *)(pc +  0),
5238          (const GLfloat *)(pc +  4)
5239     ) );
5240 }
5241
5242 void __glXDisp_VertexAttrib1svNV(GLbyte * pc)
5243 {
5244     CALL_VertexAttrib1svNV( GET_DISPATCH(), (
5245         *(GLuint   *)(pc +  0),
5246          (const GLshort *)(pc +  4)
5247     ) );
5248 }
5249
5250 void __glXDisp_VertexAttrib2dvNV(GLbyte * pc)
5251 {
5252 #ifdef __GLX_ALIGN64
5253     if ((unsigned long)(pc) & 7) {
5254         (void) memmove(pc-4, pc, 20);
5255         pc -= 4;
5256     }
5257 #endif
5258
5259     CALL_VertexAttrib2dvNV( GET_DISPATCH(), (
5260         *(GLuint   *)(pc +  0),
5261          (const GLdouble *)(pc +  4)
5262     ) );
5263 }
5264
5265 void __glXDisp_VertexAttrib2fvNV(GLbyte * pc)
5266 {
5267     CALL_VertexAttrib2fvNV( GET_DISPATCH(), (
5268         *(GLuint   *)(pc +  0),
5269          (const GLfloat *)(pc +  4)
5270     ) );
5271 }
5272
5273 void __glXDisp_VertexAttrib2svNV(GLbyte * pc)
5274 {
5275     CALL_VertexAttrib2svNV( GET_DISPATCH(), (
5276         *(GLuint   *)(pc +  0),
5277          (const GLshort *)(pc +  4)
5278     ) );
5279 }
5280
5281 void __glXDisp_VertexAttrib3dvNV(GLbyte * pc)
5282 {
5283 #ifdef __GLX_ALIGN64
5284     if ((unsigned long)(pc) & 7) {
5285         (void) memmove(pc-4, pc, 28);
5286         pc -= 4;
5287     }
5288 #endif
5289
5290     CALL_VertexAttrib3dvNV( GET_DISPATCH(), (
5291         *(GLuint   *)(pc +  0),
5292          (const GLdouble *)(pc +  4)
5293     ) );
5294 }
5295
5296 void __glXDisp_VertexAttrib3fvNV(GLbyte * pc)
5297 {
5298     CALL_VertexAttrib3fvNV( GET_DISPATCH(), (
5299         *(GLuint   *)(pc +  0),
5300          (const GLfloat *)(pc +  4)
5301     ) );
5302 }
5303
5304 void __glXDisp_VertexAttrib3svNV(GLbyte * pc)
5305 {
5306     CALL_VertexAttrib3svNV( GET_DISPATCH(), (
5307         *(GLuint   *)(pc +  0),
5308          (const GLshort *)(pc +  4)
5309     ) );
5310 }
5311
5312 void __glXDisp_VertexAttrib4dvNV(GLbyte * pc)
5313 {
5314 #ifdef __GLX_ALIGN64
5315     if ((unsigned long)(pc) & 7) {
5316         (void) memmove(pc-4, pc, 36);
5317         pc -= 4;
5318     }
5319 #endif
5320
5321     CALL_VertexAttrib4dvNV( GET_DISPATCH(), (
5322         *(GLuint   *)(pc +  0),
5323          (const GLdouble *)(pc +  4)
5324     ) );
5325 }
5326
5327 void __glXDisp_VertexAttrib4fvNV(GLbyte * pc)
5328 {
5329     CALL_VertexAttrib4fvNV( GET_DISPATCH(), (
5330         *(GLuint   *)(pc +  0),
5331          (const GLfloat *)(pc +  4)
5332     ) );
5333 }
5334
5335 void __glXDisp_VertexAttrib4svNV(GLbyte * pc)
5336 {
5337     CALL_VertexAttrib4svNV( GET_DISPATCH(), (
5338         *(GLuint   *)(pc +  0),
5339          (const GLshort *)(pc +  4)
5340     ) );
5341 }
5342
5343 void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc)
5344 {
5345     CALL_VertexAttrib4ubvNV( GET_DISPATCH(), (
5346         *(GLuint   *)(pc +  0),
5347          (const GLubyte *)(pc +  4)
5348     ) );
5349 }
5350
5351 void __glXDisp_VertexAttribs1dvNV(GLbyte * pc)
5352 {
5353     const GLsizei n = *(GLsizei  *)(pc +  4);
5354
5355 #ifdef __GLX_ALIGN64
5356     const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
5357     if ((unsigned long)(pc) & 7) {
5358         (void) memmove(pc-4, pc, cmdlen);
5359         pc -= 4;
5360     }
5361 #endif
5362
5363     CALL_VertexAttribs1dvNV( GET_DISPATCH(), (
5364         *(GLuint   *)(pc +  0),
5365         n,
5366          (const GLdouble *)(pc +  8)
5367     ) );
5368 }
5369
5370 void __glXDisp_VertexAttribs1fvNV(GLbyte * pc)
5371 {
5372     const GLsizei n = *(GLsizei  *)(pc +  4);
5373
5374     CALL_VertexAttribs1fvNV( GET_DISPATCH(), (
5375         *(GLuint   *)(pc +  0),
5376         n,
5377          (const GLfloat *)(pc +  8)
5378     ) );
5379 }
5380
5381 void __glXDisp_VertexAttribs1svNV(GLbyte * pc)
5382 {
5383     const GLsizei n = *(GLsizei  *)(pc +  4);
5384
5385     CALL_VertexAttribs1svNV( GET_DISPATCH(), (
5386         *(GLuint   *)(pc +  0),
5387         n,
5388          (const GLshort *)(pc +  8)
5389     ) );
5390 }
5391
5392 void __glXDisp_VertexAttribs2dvNV(GLbyte * pc)
5393 {
5394     const GLsizei n = *(GLsizei  *)(pc +  4);
5395
5396 #ifdef __GLX_ALIGN64
5397     const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
5398     if ((unsigned long)(pc) & 7) {
5399         (void) memmove(pc-4, pc, cmdlen);
5400         pc -= 4;
5401     }
5402 #endif
5403
5404     CALL_VertexAttribs2dvNV( GET_DISPATCH(), (
5405         *(GLuint   *)(pc +  0),
5406         n,
5407          (const GLdouble *)(pc +  8)
5408     ) );
5409 }
5410
5411 void __glXDisp_VertexAttribs2fvNV(GLbyte * pc)
5412 {
5413     const GLsizei n = *(GLsizei  *)(pc +  4);
5414
5415     CALL_VertexAttribs2fvNV( GET_DISPATCH(), (
5416         *(GLuint   *)(pc +  0),
5417         n,
5418          (const GLfloat *)(pc +  8)
5419     ) );
5420 }
5421
5422 void __glXDisp_VertexAttribs2svNV(GLbyte * pc)
5423 {
5424     const GLsizei n = *(GLsizei  *)(pc +  4);
5425
5426     CALL_VertexAttribs2svNV( GET_DISPATCH(), (
5427         *(GLuint   *)(pc +  0),
5428         n,
5429          (const GLshort *)(pc +  8)
5430     ) );
5431 }
5432
5433 void __glXDisp_VertexAttribs3dvNV(GLbyte * pc)
5434 {
5435     const GLsizei n = *(GLsizei  *)(pc +  4);
5436
5437 #ifdef __GLX_ALIGN64
5438     const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
5439     if ((unsigned long)(pc) & 7) {
5440         (void) memmove(pc-4, pc, cmdlen);
5441         pc -= 4;
5442     }
5443 #endif
5444
5445     CALL_VertexAttribs3dvNV( GET_DISPATCH(), (
5446         *(GLuint   *)(pc +  0),
5447         n,
5448          (const GLdouble *)(pc +  8)
5449     ) );
5450 }
5451
5452 void __glXDisp_VertexAttribs3fvNV(GLbyte * pc)
5453 {
5454     const GLsizei n = *(GLsizei  *)(pc +  4);
5455
5456     CALL_VertexAttribs3fvNV( GET_DISPATCH(), (
5457         *(GLuint   *)(pc +  0),
5458         n,
5459          (const GLfloat *)(pc +  8)
5460     ) );
5461 }
5462
5463 void __glXDisp_VertexAttribs3svNV(GLbyte * pc)
5464 {
5465     const GLsizei n = *(GLsizei  *)(pc +  4);
5466
5467     CALL_VertexAttribs3svNV( GET_DISPATCH(), (
5468         *(GLuint   *)(pc +  0),
5469         n,
5470          (const GLshort *)(pc +  8)
5471     ) );
5472 }
5473
5474 void __glXDisp_VertexAttribs4dvNV(GLbyte * pc)
5475 {
5476     const GLsizei n = *(GLsizei  *)(pc +  4);
5477
5478 #ifdef __GLX_ALIGN64
5479     const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
5480     if ((unsigned long)(pc) & 7) {
5481         (void) memmove(pc-4, pc, cmdlen);
5482         pc -= 4;
5483     }
5484 #endif
5485
5486     CALL_VertexAttribs4dvNV( GET_DISPATCH(), (
5487         *(GLuint   *)(pc +  0),
5488         n,
5489          (const GLdouble *)(pc +  8)
5490     ) );
5491 }
5492
5493 void __glXDisp_VertexAttribs4fvNV(GLbyte * pc)
5494 {
5495     const GLsizei n = *(GLsizei  *)(pc +  4);
5496
5497     CALL_VertexAttribs4fvNV( GET_DISPATCH(), (
5498         *(GLuint   *)(pc +  0),
5499         n,
5500          (const GLfloat *)(pc +  8)
5501     ) );
5502 }
5503
5504 void __glXDisp_VertexAttribs4svNV(GLbyte * pc)
5505 {
5506     const GLsizei n = *(GLsizei  *)(pc +  4);
5507
5508     CALL_VertexAttribs4svNV( GET_DISPATCH(), (
5509         *(GLuint   *)(pc +  0),
5510         n,
5511          (const GLshort *)(pc +  8)
5512     ) );
5513 }
5514
5515 void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc)
5516 {
5517     const GLsizei n = *(GLsizei  *)(pc +  4);
5518
5519     CALL_VertexAttribs4ubvNV( GET_DISPATCH(), (
5520         *(GLuint   *)(pc +  0),
5521         n,
5522          (const GLubyte *)(pc +  8)
5523     ) );
5524 }
5525
5526 void __glXDisp_PointParameteriNV(GLbyte * pc)
5527 {
5528     CALL_PointParameteriNV( GET_DISPATCH(), (
5529         *(GLenum   *)(pc +  0),
5530         *(GLint    *)(pc +  4)
5531     ) );
5532 }
5533
5534 void __glXDisp_PointParameterivNV(GLbyte * pc)
5535 {
5536     const GLenum pname = *(GLenum   *)(pc +  0);
5537     const GLint * params;
5538
5539     params = (const GLint *) (pc + 4);
5540
5541     CALL_PointParameterivNV( GET_DISPATCH(), (
5542         pname,
5543         params
5544     ) );
5545 }
5546
5547 void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc)
5548 {
5549     CALL_ActiveStencilFaceEXT( GET_DISPATCH(), (
5550         *(GLenum   *)(pc +  0)
5551     ) );
5552 }
5553
5554 int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc)
5555 {
5556     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5557     int error;
5558     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5559
5560     pc += __GLX_VENDPRIV_HDR_SIZE;
5561     if ( cx != NULL ) {
5562         const GLsizei len = *(GLsizei  *)(pc +  4);
5563
5564         GLdouble params[4];
5565         CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), (
5566             *(GLuint   *)(pc +  0),
5567             len,
5568              (const GLubyte *)(pc +  8),
5569             params
5570         ) );
5571         __glXSendReply(cl->client, params, 4, 8, GL_TRUE, 0);
5572         error = Success;
5573     }
5574
5575     return error;
5576 }
5577
5578 int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc)
5579 {
5580     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5581     int error;
5582     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5583
5584     pc += __GLX_VENDPRIV_HDR_SIZE;
5585     if ( cx != NULL ) {
5586         const GLsizei len = *(GLsizei  *)(pc +  4);
5587
5588         GLfloat params[4];
5589         CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), (
5590             *(GLuint   *)(pc +  0),
5591             len,
5592              (const GLubyte *)(pc +  8),
5593             params
5594         ) );
5595         __glXSendReply(cl->client, params, 4, 4, GL_TRUE, 0);
5596         error = Success;
5597     }
5598
5599     return error;
5600 }
5601
5602 void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc)
5603 {
5604     const GLsizei len = *(GLsizei  *)(pc + 36);
5605
5606 #ifdef __GLX_ALIGN64
5607     const GLuint cmdlen = 44 + __GLX_PAD(len) - 4;
5608     if ((unsigned long)(pc) & 7) {
5609         (void) memmove(pc-4, pc, cmdlen);
5610         pc -= 4;
5611     }
5612 #endif
5613
5614     CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), (
5615         *(GLuint   *)(pc + 32),
5616         len,
5617          (const GLubyte *)(pc + 40),
5618          (const GLdouble *)(pc +  0)
5619     ) );
5620 }
5621
5622 void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc)
5623 {
5624     const GLsizei len = *(GLsizei  *)(pc +  4);
5625
5626     CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), (
5627         *(GLuint   *)(pc +  0),
5628         len,
5629          (const GLubyte *)(pc + 24),
5630          (const GLfloat *)(pc +  8)
5631     ) );
5632 }
5633
5634 void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc)
5635 {
5636     CALL_BlendEquationSeparateEXT( GET_DISPATCH(), (
5637         *(GLenum   *)(pc +  0),
5638         *(GLenum   *)(pc +  4)
5639     ) );
5640 }
5641
5642 void __glXDisp_BindFramebufferEXT(GLbyte * pc)
5643 {
5644     CALL_BindFramebufferEXT( GET_DISPATCH(), (
5645         *(GLenum   *)(pc +  0),
5646         *(GLuint   *)(pc +  4)
5647     ) );
5648 }
5649
5650 void __glXDisp_BindRenderbufferEXT(GLbyte * pc)
5651 {
5652     CALL_BindRenderbufferEXT( GET_DISPATCH(), (
5653         *(GLenum   *)(pc +  0),
5654         *(GLuint   *)(pc +  4)
5655     ) );
5656 }
5657
5658 int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc)
5659 {
5660     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5661     int error;
5662     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5663
5664     pc += __GLX_VENDPRIV_HDR_SIZE;
5665     if ( cx != NULL ) {
5666         GLenum retval;
5667         retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), (
5668             *(GLenum   *)(pc +  0)
5669         ) );
5670         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
5671         error = Success;
5672     }
5673
5674     return error;
5675 }
5676
5677 void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc)
5678 {
5679     const GLsizei n = *(GLsizei  *)(pc +  0);
5680
5681     CALL_DeleteFramebuffersEXT( GET_DISPATCH(), (
5682         n,
5683          (const GLuint *)(pc +  4)
5684     ) );
5685 }
5686
5687 void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc)
5688 {
5689     const GLsizei n = *(GLsizei  *)(pc +  0);
5690
5691     CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), (
5692         n,
5693          (const GLuint *)(pc +  4)
5694     ) );
5695 }
5696
5697 void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc)
5698 {
5699     CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), (
5700         *(GLenum   *)(pc +  0),
5701         *(GLenum   *)(pc +  4),
5702         *(GLenum   *)(pc +  8),
5703         *(GLuint   *)(pc + 12)
5704     ) );
5705 }
5706
5707 void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc)
5708 {
5709     CALL_FramebufferTexture1DEXT( GET_DISPATCH(), (
5710         *(GLenum   *)(pc +  0),
5711         *(GLenum   *)(pc +  4),
5712         *(GLenum   *)(pc +  8),
5713         *(GLuint   *)(pc + 12),
5714         *(GLint    *)(pc + 16)
5715     ) );
5716 }
5717
5718 void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc)
5719 {
5720     CALL_FramebufferTexture2DEXT( GET_DISPATCH(), (
5721         *(GLenum   *)(pc +  0),
5722         *(GLenum   *)(pc +  4),
5723         *(GLenum   *)(pc +  8),
5724         *(GLuint   *)(pc + 12),
5725         *(GLint    *)(pc + 16)
5726     ) );
5727 }
5728
5729 void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc)
5730 {
5731     CALL_FramebufferTexture3DEXT( GET_DISPATCH(), (
5732         *(GLenum   *)(pc +  0),
5733         *(GLenum   *)(pc +  4),
5734         *(GLenum   *)(pc +  8),
5735         *(GLuint   *)(pc + 12),
5736         *(GLint    *)(pc + 16),
5737         *(GLint    *)(pc + 20)
5738     ) );
5739 }
5740
5741 int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc)
5742 {
5743     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5744     int error;
5745     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5746
5747     pc += __GLX_VENDPRIV_HDR_SIZE;
5748     if ( cx != NULL ) {
5749         const GLsizei n = *(GLsizei  *)(pc +  0);
5750
5751         GLuint answerBuffer[200];
5752         GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
5753         CALL_GenFramebuffersEXT( GET_DISPATCH(), (
5754             n,
5755             framebuffers
5756         ) );
5757         __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0);
5758         error = Success;
5759     }
5760
5761     return error;
5762 }
5763
5764 int __glXDisp_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc)
5765 {
5766     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5767     int error;
5768     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5769
5770     pc += __GLX_VENDPRIV_HDR_SIZE;
5771     if ( cx != NULL ) {
5772         const GLsizei n = *(GLsizei  *)(pc +  0);
5773
5774         GLuint answerBuffer[200];
5775         GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
5776         CALL_GenRenderbuffersEXT( GET_DISPATCH(), (
5777             n,
5778             renderbuffers
5779         ) );
5780         __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
5781         error = Success;
5782     }
5783
5784     return error;
5785 }
5786
5787 void __glXDisp_GenerateMipmapEXT(GLbyte * pc)
5788 {
5789     CALL_GenerateMipmapEXT( GET_DISPATCH(), (
5790         *(GLenum   *)(pc +  0)
5791     ) );
5792 }
5793
5794 int __glXDisp_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc)
5795 {
5796     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5797     int error;
5798     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5799
5800     pc += __GLX_VENDPRIV_HDR_SIZE;
5801     if ( cx != NULL ) {
5802         GLint params[1];
5803         CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), (
5804             *(GLenum   *)(pc +  0),
5805             *(GLenum   *)(pc +  4),
5806             *(GLenum   *)(pc +  8),
5807             params
5808         ) );
5809         __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
5810         error = Success;
5811     }
5812
5813     return error;
5814 }
5815
5816 int __glXDisp_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc)
5817 {
5818     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5819     int error;
5820     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5821
5822     pc += __GLX_VENDPRIV_HDR_SIZE;
5823     if ( cx != NULL ) {
5824         GLint params[1];
5825         CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), (
5826             *(GLenum   *)(pc +  0),
5827             *(GLenum   *)(pc +  4),
5828             params
5829         ) );
5830         __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
5831         error = Success;
5832     }
5833
5834     return error;
5835 }
5836
5837 int __glXDisp_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc)
5838 {
5839     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5840     int error;
5841     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5842
5843     pc += __GLX_VENDPRIV_HDR_SIZE;
5844     if ( cx != NULL ) {
5845         GLboolean retval;
5846         retval = CALL_IsFramebufferEXT( GET_DISPATCH(), (
5847             *(GLuint   *)(pc +  0)
5848         ) );
5849         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
5850         error = Success;
5851     }
5852
5853     return error;
5854 }
5855
5856 int __glXDisp_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc)
5857 {
5858     xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5859     int error;
5860     __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
5861
5862     pc += __GLX_VENDPRIV_HDR_SIZE;
5863     if ( cx != NULL ) {
5864         GLboolean retval;
5865         retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), (
5866             *(GLuint   *)(pc +  0)
5867         ) );
5868         __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
5869         error = Success;
5870     }
5871
5872     return error;
5873 }
5874
5875 void __glXDisp_RenderbufferStorageEXT(GLbyte * pc)
5876 {
5877     CALL_RenderbufferStorageEXT( GET_DISPATCH(), (
5878         *(GLenum   *)(pc +  0),
5879         *(GLenum   *)(pc +  4),
5880         *(GLsizei  *)(pc +  8),
5881         *(GLsizei  *)(pc + 12)
5882     ) );
5883 }
5884