Imported Upstream version 1.15.1
[deb_xorg-server.git] / glx / indirect_dispatch.c
CommitLineData
a09e091a
JB
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 <inttypes.h>
29#include "glxserver.h"
30#include "indirect_size.h"
31#include "indirect_size_get.h"
32#include "indirect_dispatch.h"
33#include "glxbyteorder.h"
34#include "indirect_util.h"
35#include "singlesize.h"
36
37#define __GLX_PAD(x) (((x) + 3) & ~3)
38
39typedef struct {
40 __GLX_PIXEL_3D_HDR;
41} __GLXpixel3DHeader;
42
43extern GLboolean __glXErrorOccured(void);
44extern void __glXClearErrorOccured(void);
45
46static const unsigned dummy_answer[2] = { 0, 0 };
47
48int
49__glXDisp_NewList(__GLXclientState * cl, GLbyte * pc)
50{
51 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
52 int error;
53 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
54
55 pc += __GLX_SINGLE_HDR_SIZE;
56 if (cx != NULL) {
57 glNewList(*(GLuint *) (pc + 0), *(GLenum *) (pc + 4));
58 error = Success;
59 }
60
61 return error;
62}
63
64int
65__glXDisp_EndList(__GLXclientState * cl, GLbyte * pc)
66{
67 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
68 int error;
69 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
70
71 pc += __GLX_SINGLE_HDR_SIZE;
72 if (cx != NULL) {
73 glEndList();
74 error = Success;
75 }
76
77 return error;
78}
79
80void
81__glXDisp_CallList(GLbyte * pc)
82{
83 glCallList(*(GLuint *) (pc + 0));
84}
85
86void
87__glXDisp_CallLists(GLbyte * pc)
88{
89 const GLsizei n = *(GLsizei *) (pc + 0);
90 const GLenum type = *(GLenum *) (pc + 4);
91 const GLvoid *lists = (const GLvoid *) (pc + 8);
92
93 lists = (const GLvoid *) (pc + 8);
94
95 glCallLists(n, type, lists);
96}
97
98int
99__glXDisp_DeleteLists(__GLXclientState * cl, GLbyte * pc)
100{
101 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
102 int error;
103 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
104
105 pc += __GLX_SINGLE_HDR_SIZE;
106 if (cx != NULL) {
107 glDeleteLists(*(GLuint *) (pc + 0), *(GLsizei *) (pc + 4));
108 error = Success;
109 }
110
111 return error;
112}
113
114int
115__glXDisp_GenLists(__GLXclientState * cl, GLbyte * pc)
116{
117 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
118 int error;
119 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
120
121 pc += __GLX_SINGLE_HDR_SIZE;
122 if (cx != NULL) {
123 GLuint retval;
124
125 retval = glGenLists(*(GLsizei *) (pc + 0));
126 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
127 error = Success;
128 }
129
130 return error;
131}
132
133void
134__glXDisp_ListBase(GLbyte * pc)
135{
136 glListBase(*(GLuint *) (pc + 0));
137}
138
139void
140__glXDisp_Begin(GLbyte * pc)
141{
142 glBegin(*(GLenum *) (pc + 0));
143}
144
145void
146__glXDisp_Bitmap(GLbyte * pc)
147{
148 const GLubyte *const bitmap = (const GLubyte *) ((pc + 44));
149 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
150
151 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
152 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
153 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
154 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
155 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
156
157 glBitmap(*(GLsizei *) (pc + 20),
158 *(GLsizei *) (pc + 24),
159 *(GLfloat *) (pc + 28),
160 *(GLfloat *) (pc + 32),
161 *(GLfloat *) (pc + 36), *(GLfloat *) (pc + 40), bitmap);
162}
163
164void
165__glXDisp_Color3bv(GLbyte * pc)
166{
167 glColor3bv((const GLbyte *) (pc + 0));
168}
169
170void
171__glXDisp_Color3dv(GLbyte * pc)
172{
173#ifdef __GLX_ALIGN64
174 if ((unsigned long) (pc) & 7) {
175 (void) memmove(pc - 4, pc, 24);
176 pc -= 4;
177 }
178#endif
179
180 glColor3dv((const GLdouble *) (pc + 0));
181}
182
183void
184__glXDisp_Color3fv(GLbyte * pc)
185{
186 glColor3fv((const GLfloat *) (pc + 0));
187}
188
189void
190__glXDisp_Color3iv(GLbyte * pc)
191{
192 glColor3iv((const GLint *) (pc + 0));
193}
194
195void
196__glXDisp_Color3sv(GLbyte * pc)
197{
198 glColor3sv((const GLshort *) (pc + 0));
199}
200
201void
202__glXDisp_Color3ubv(GLbyte * pc)
203{
204 glColor3ubv((const GLubyte *) (pc + 0));
205}
206
207void
208__glXDisp_Color3uiv(GLbyte * pc)
209{
210 glColor3uiv((const GLuint *) (pc + 0));
211}
212
213void
214__glXDisp_Color3usv(GLbyte * pc)
215{
216 glColor3usv((const GLushort *) (pc + 0));
217}
218
219void
220__glXDisp_Color4bv(GLbyte * pc)
221{
222 glColor4bv((const GLbyte *) (pc + 0));
223}
224
225void
226__glXDisp_Color4dv(GLbyte * pc)
227{
228#ifdef __GLX_ALIGN64
229 if ((unsigned long) (pc) & 7) {
230 (void) memmove(pc - 4, pc, 32);
231 pc -= 4;
232 }
233#endif
234
235 glColor4dv((const GLdouble *) (pc + 0));
236}
237
238void
239__glXDisp_Color4fv(GLbyte * pc)
240{
241 glColor4fv((const GLfloat *) (pc + 0));
242}
243
244void
245__glXDisp_Color4iv(GLbyte * pc)
246{
247 glColor4iv((const GLint *) (pc + 0));
248}
249
250void
251__glXDisp_Color4sv(GLbyte * pc)
252{
253 glColor4sv((const GLshort *) (pc + 0));
254}
255
256void
257__glXDisp_Color4ubv(GLbyte * pc)
258{
259 glColor4ubv((const GLubyte *) (pc + 0));
260}
261
262void
263__glXDisp_Color4uiv(GLbyte * pc)
264{
265 glColor4uiv((const GLuint *) (pc + 0));
266}
267
268void
269__glXDisp_Color4usv(GLbyte * pc)
270{
271 glColor4usv((const GLushort *) (pc + 0));
272}
273
274void
275__glXDisp_EdgeFlagv(GLbyte * pc)
276{
277 glEdgeFlagv((const GLboolean *) (pc + 0));
278}
279
280void
281__glXDisp_End(GLbyte * pc)
282{
283 glEnd();
284}
285
286void
287__glXDisp_Indexdv(GLbyte * pc)
288{
289#ifdef __GLX_ALIGN64
290 if ((unsigned long) (pc) & 7) {
291 (void) memmove(pc - 4, pc, 8);
292 pc -= 4;
293 }
294#endif
295
296 glIndexdv((const GLdouble *) (pc + 0));
297}
298
299void
300__glXDisp_Indexfv(GLbyte * pc)
301{
302 glIndexfv((const GLfloat *) (pc + 0));
303}
304
305void
306__glXDisp_Indexiv(GLbyte * pc)
307{
308 glIndexiv((const GLint *) (pc + 0));
309}
310
311void
312__glXDisp_Indexsv(GLbyte * pc)
313{
314 glIndexsv((const GLshort *) (pc + 0));
315}
316
317void
318__glXDisp_Normal3bv(GLbyte * pc)
319{
320 glNormal3bv((const GLbyte *) (pc + 0));
321}
322
323void
324__glXDisp_Normal3dv(GLbyte * pc)
325{
326#ifdef __GLX_ALIGN64
327 if ((unsigned long) (pc) & 7) {
328 (void) memmove(pc - 4, pc, 24);
329 pc -= 4;
330 }
331#endif
332
333 glNormal3dv((const GLdouble *) (pc + 0));
334}
335
336void
337__glXDisp_Normal3fv(GLbyte * pc)
338{
339 glNormal3fv((const GLfloat *) (pc + 0));
340}
341
342void
343__glXDisp_Normal3iv(GLbyte * pc)
344{
345 glNormal3iv((const GLint *) (pc + 0));
346}
347
348void
349__glXDisp_Normal3sv(GLbyte * pc)
350{
351 glNormal3sv((const GLshort *) (pc + 0));
352}
353
354void
355__glXDisp_RasterPos2dv(GLbyte * pc)
356{
357#ifdef __GLX_ALIGN64
358 if ((unsigned long) (pc) & 7) {
359 (void) memmove(pc - 4, pc, 16);
360 pc -= 4;
361 }
362#endif
363
364 glRasterPos2dv((const GLdouble *) (pc + 0));
365}
366
367void
368__glXDisp_RasterPos2fv(GLbyte * pc)
369{
370 glRasterPos2fv((const GLfloat *) (pc + 0));
371}
372
373void
374__glXDisp_RasterPos2iv(GLbyte * pc)
375{
376 glRasterPos2iv((const GLint *) (pc + 0));
377}
378
379void
380__glXDisp_RasterPos2sv(GLbyte * pc)
381{
382 glRasterPos2sv((const GLshort *) (pc + 0));
383}
384
385void
386__glXDisp_RasterPos3dv(GLbyte * pc)
387{
388#ifdef __GLX_ALIGN64
389 if ((unsigned long) (pc) & 7) {
390 (void) memmove(pc - 4, pc, 24);
391 pc -= 4;
392 }
393#endif
394
395 glRasterPos3dv((const GLdouble *) (pc + 0));
396}
397
398void
399__glXDisp_RasterPos3fv(GLbyte * pc)
400{
401 glRasterPos3fv((const GLfloat *) (pc + 0));
402}
403
404void
405__glXDisp_RasterPos3iv(GLbyte * pc)
406{
407 glRasterPos3iv((const GLint *) (pc + 0));
408}
409
410void
411__glXDisp_RasterPos3sv(GLbyte * pc)
412{
413 glRasterPos3sv((const GLshort *) (pc + 0));
414}
415
416void
417__glXDisp_RasterPos4dv(GLbyte * pc)
418{
419#ifdef __GLX_ALIGN64
420 if ((unsigned long) (pc) & 7) {
421 (void) memmove(pc - 4, pc, 32);
422 pc -= 4;
423 }
424#endif
425
426 glRasterPos4dv((const GLdouble *) (pc + 0));
427}
428
429void
430__glXDisp_RasterPos4fv(GLbyte * pc)
431{
432 glRasterPos4fv((const GLfloat *) (pc + 0));
433}
434
435void
436__glXDisp_RasterPos4iv(GLbyte * pc)
437{
438 glRasterPos4iv((const GLint *) (pc + 0));
439}
440
441void
442__glXDisp_RasterPos4sv(GLbyte * pc)
443{
444 glRasterPos4sv((const GLshort *) (pc + 0));
445}
446
447void
448__glXDisp_Rectdv(GLbyte * pc)
449{
450#ifdef __GLX_ALIGN64
451 if ((unsigned long) (pc) & 7) {
452 (void) memmove(pc - 4, pc, 32);
453 pc -= 4;
454 }
455#endif
456
457 glRectdv((const GLdouble *) (pc + 0), (const GLdouble *) (pc + 16));
458}
459
460void
461__glXDisp_Rectfv(GLbyte * pc)
462{
463 glRectfv((const GLfloat *) (pc + 0), (const GLfloat *) (pc + 8));
464}
465
466void
467__glXDisp_Rectiv(GLbyte * pc)
468{
469 glRectiv((const GLint *) (pc + 0), (const GLint *) (pc + 8));
470}
471
472void
473__glXDisp_Rectsv(GLbyte * pc)
474{
475 glRectsv((const GLshort *) (pc + 0), (const GLshort *) (pc + 4));
476}
477
478void
479__glXDisp_TexCoord1dv(GLbyte * pc)
480{
481#ifdef __GLX_ALIGN64
482 if ((unsigned long) (pc) & 7) {
483 (void) memmove(pc - 4, pc, 8);
484 pc -= 4;
485 }
486#endif
487
488 glTexCoord1dv((const GLdouble *) (pc + 0));
489}
490
491void
492__glXDisp_TexCoord1fv(GLbyte * pc)
493{
494 glTexCoord1fv((const GLfloat *) (pc + 0));
495}
496
497void
498__glXDisp_TexCoord1iv(GLbyte * pc)
499{
500 glTexCoord1iv((const GLint *) (pc + 0));
501}
502
503void
504__glXDisp_TexCoord1sv(GLbyte * pc)
505{
506 glTexCoord1sv((const GLshort *) (pc + 0));
507}
508
509void
510__glXDisp_TexCoord2dv(GLbyte * pc)
511{
512#ifdef __GLX_ALIGN64
513 if ((unsigned long) (pc) & 7) {
514 (void) memmove(pc - 4, pc, 16);
515 pc -= 4;
516 }
517#endif
518
519 glTexCoord2dv((const GLdouble *) (pc + 0));
520}
521
522void
523__glXDisp_TexCoord2fv(GLbyte * pc)
524{
525 glTexCoord2fv((const GLfloat *) (pc + 0));
526}
527
528void
529__glXDisp_TexCoord2iv(GLbyte * pc)
530{
531 glTexCoord2iv((const GLint *) (pc + 0));
532}
533
534void
535__glXDisp_TexCoord2sv(GLbyte * pc)
536{
537 glTexCoord2sv((const GLshort *) (pc + 0));
538}
539
540void
541__glXDisp_TexCoord3dv(GLbyte * pc)
542{
543#ifdef __GLX_ALIGN64
544 if ((unsigned long) (pc) & 7) {
545 (void) memmove(pc - 4, pc, 24);
546 pc -= 4;
547 }
548#endif
549
550 glTexCoord3dv((const GLdouble *) (pc + 0));
551}
552
553void
554__glXDisp_TexCoord3fv(GLbyte * pc)
555{
556 glTexCoord3fv((const GLfloat *) (pc + 0));
557}
558
559void
560__glXDisp_TexCoord3iv(GLbyte * pc)
561{
562 glTexCoord3iv((const GLint *) (pc + 0));
563}
564
565void
566__glXDisp_TexCoord3sv(GLbyte * pc)
567{
568 glTexCoord3sv((const GLshort *) (pc + 0));
569}
570
571void
572__glXDisp_TexCoord4dv(GLbyte * pc)
573{
574#ifdef __GLX_ALIGN64
575 if ((unsigned long) (pc) & 7) {
576 (void) memmove(pc - 4, pc, 32);
577 pc -= 4;
578 }
579#endif
580
581 glTexCoord4dv((const GLdouble *) (pc + 0));
582}
583
584void
585__glXDisp_TexCoord4fv(GLbyte * pc)
586{
587 glTexCoord4fv((const GLfloat *) (pc + 0));
588}
589
590void
591__glXDisp_TexCoord4iv(GLbyte * pc)
592{
593 glTexCoord4iv((const GLint *) (pc + 0));
594}
595
596void
597__glXDisp_TexCoord4sv(GLbyte * pc)
598{
599 glTexCoord4sv((const GLshort *) (pc + 0));
600}
601
602void
603__glXDisp_Vertex2dv(GLbyte * pc)
604{
605#ifdef __GLX_ALIGN64
606 if ((unsigned long) (pc) & 7) {
607 (void) memmove(pc - 4, pc, 16);
608 pc -= 4;
609 }
610#endif
611
612 glVertex2dv((const GLdouble *) (pc + 0));
613}
614
615void
616__glXDisp_Vertex2fv(GLbyte * pc)
617{
618 glVertex2fv((const GLfloat *) (pc + 0));
619}
620
621void
622__glXDisp_Vertex2iv(GLbyte * pc)
623{
624 glVertex2iv((const GLint *) (pc + 0));
625}
626
627void
628__glXDisp_Vertex2sv(GLbyte * pc)
629{
630 glVertex2sv((const GLshort *) (pc + 0));
631}
632
633void
634__glXDisp_Vertex3dv(GLbyte * pc)
635{
636#ifdef __GLX_ALIGN64
637 if ((unsigned long) (pc) & 7) {
638 (void) memmove(pc - 4, pc, 24);
639 pc -= 4;
640 }
641#endif
642
643 glVertex3dv((const GLdouble *) (pc + 0));
644}
645
646void
647__glXDisp_Vertex3fv(GLbyte * pc)
648{
649 glVertex3fv((const GLfloat *) (pc + 0));
650}
651
652void
653__glXDisp_Vertex3iv(GLbyte * pc)
654{
655 glVertex3iv((const GLint *) (pc + 0));
656}
657
658void
659__glXDisp_Vertex3sv(GLbyte * pc)
660{
661 glVertex3sv((const GLshort *) (pc + 0));
662}
663
664void
665__glXDisp_Vertex4dv(GLbyte * pc)
666{
667#ifdef __GLX_ALIGN64
668 if ((unsigned long) (pc) & 7) {
669 (void) memmove(pc - 4, pc, 32);
670 pc -= 4;
671 }
672#endif
673
674 glVertex4dv((const GLdouble *) (pc + 0));
675}
676
677void
678__glXDisp_Vertex4fv(GLbyte * pc)
679{
680 glVertex4fv((const GLfloat *) (pc + 0));
681}
682
683void
684__glXDisp_Vertex4iv(GLbyte * pc)
685{
686 glVertex4iv((const GLint *) (pc + 0));
687}
688
689void
690__glXDisp_Vertex4sv(GLbyte * pc)
691{
692 glVertex4sv((const GLshort *) (pc + 0));
693}
694
695void
696__glXDisp_ClipPlane(GLbyte * pc)
697{
698#ifdef __GLX_ALIGN64
699 if ((unsigned long) (pc) & 7) {
700 (void) memmove(pc - 4, pc, 36);
701 pc -= 4;
702 }
703#endif
704
705 glClipPlane(*(GLenum *) (pc + 32), (const GLdouble *) (pc + 0));
706}
707
708void
709__glXDisp_ColorMaterial(GLbyte * pc)
710{
711 glColorMaterial(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
712}
713
714void
715__glXDisp_CullFace(GLbyte * pc)
716{
717 glCullFace(*(GLenum *) (pc + 0));
718}
719
720void
721__glXDisp_Fogf(GLbyte * pc)
722{
723 glFogf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
724}
725
726void
727__glXDisp_Fogfv(GLbyte * pc)
728{
729 const GLenum pname = *(GLenum *) (pc + 0);
730 const GLfloat *params;
731
732 params = (const GLfloat *) (pc + 4);
733
734 glFogfv(pname, params);
735}
736
737void
738__glXDisp_Fogi(GLbyte * pc)
739{
740 glFogi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
741}
742
743void
744__glXDisp_Fogiv(GLbyte * pc)
745{
746 const GLenum pname = *(GLenum *) (pc + 0);
747 const GLint *params;
748
749 params = (const GLint *) (pc + 4);
750
751 glFogiv(pname, params);
752}
753
754void
755__glXDisp_FrontFace(GLbyte * pc)
756{
757 glFrontFace(*(GLenum *) (pc + 0));
758}
759
760void
761__glXDisp_Hint(GLbyte * pc)
762{
763 glHint(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
764}
765
766void
767__glXDisp_Lightf(GLbyte * pc)
768{
769 glLightf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
770}
771
772void
773__glXDisp_Lightfv(GLbyte * pc)
774{
775 const GLenum pname = *(GLenum *) (pc + 4);
776 const GLfloat *params;
777
778 params = (const GLfloat *) (pc + 8);
779
780 glLightfv(*(GLenum *) (pc + 0), pname, params);
781}
782
783void
784__glXDisp_Lighti(GLbyte * pc)
785{
786 glLighti(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
787}
788
789void
790__glXDisp_Lightiv(GLbyte * pc)
791{
792 const GLenum pname = *(GLenum *) (pc + 4);
793 const GLint *params;
794
795 params = (const GLint *) (pc + 8);
796
797 glLightiv(*(GLenum *) (pc + 0), pname, params);
798}
799
800void
801__glXDisp_LightModelf(GLbyte * pc)
802{
803 glLightModelf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
804}
805
806void
807__glXDisp_LightModelfv(GLbyte * pc)
808{
809 const GLenum pname = *(GLenum *) (pc + 0);
810 const GLfloat *params;
811
812 params = (const GLfloat *) (pc + 4);
813
814 glLightModelfv(pname, params);
815}
816
817void
818__glXDisp_LightModeli(GLbyte * pc)
819{
820 glLightModeli(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
821}
822
823void
824__glXDisp_LightModeliv(GLbyte * pc)
825{
826 const GLenum pname = *(GLenum *) (pc + 0);
827 const GLint *params;
828
829 params = (const GLint *) (pc + 4);
830
831 glLightModeliv(pname, params);
832}
833
834void
835__glXDisp_LineStipple(GLbyte * pc)
836{
837 glLineStipple(*(GLint *) (pc + 0), *(GLushort *) (pc + 4));
838}
839
840void
841__glXDisp_LineWidth(GLbyte * pc)
842{
843 glLineWidth(*(GLfloat *) (pc + 0));
844}
845
846void
847__glXDisp_Materialf(GLbyte * pc)
848{
849 glMaterialf(*(GLenum *) (pc + 0),
850 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
851}
852
853void
854__glXDisp_Materialfv(GLbyte * pc)
855{
856 const GLenum pname = *(GLenum *) (pc + 4);
857 const GLfloat *params;
858
859 params = (const GLfloat *) (pc + 8);
860
861 glMaterialfv(*(GLenum *) (pc + 0), pname, params);
862}
863
864void
865__glXDisp_Materiali(GLbyte * pc)
866{
867 glMateriali(*(GLenum *) (pc + 0),
868 *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
869}
870
871void
872__glXDisp_Materialiv(GLbyte * pc)
873{
874 const GLenum pname = *(GLenum *) (pc + 4);
875 const GLint *params;
876
877 params = (const GLint *) (pc + 8);
878
879 glMaterialiv(*(GLenum *) (pc + 0), pname, params);
880}
881
882void
883__glXDisp_PointSize(GLbyte * pc)
884{
885 glPointSize(*(GLfloat *) (pc + 0));
886}
887
888void
889__glXDisp_PolygonMode(GLbyte * pc)
890{
891 glPolygonMode(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
892}
893
894void
895__glXDisp_PolygonStipple(GLbyte * pc)
896{
897 const GLubyte *const mask = (const GLubyte *) ((pc + 20));
898 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
899
900 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
901 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
902 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
903 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
904 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
905
906 glPolygonStipple(mask);
907}
908
909void
910__glXDisp_Scissor(GLbyte * pc)
911{
912 glScissor(*(GLint *) (pc + 0),
913 *(GLint *) (pc + 4),
914 *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12));
915}
916
917void
918__glXDisp_ShadeModel(GLbyte * pc)
919{
920 glShadeModel(*(GLenum *) (pc + 0));
921}
922
923void
924__glXDisp_TexParameterf(GLbyte * pc)
925{
926 glTexParameterf(*(GLenum *) (pc + 0),
927 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
928}
929
930void
931__glXDisp_TexParameterfv(GLbyte * pc)
932{
933 const GLenum pname = *(GLenum *) (pc + 4);
934 const GLfloat *params;
935
936 params = (const GLfloat *) (pc + 8);
937
938 glTexParameterfv(*(GLenum *) (pc + 0), pname, params);
939}
940
941void
942__glXDisp_TexParameteri(GLbyte * pc)
943{
944 glTexParameteri(*(GLenum *) (pc + 0),
945 *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
946}
947
948void
949__glXDisp_TexParameteriv(GLbyte * pc)
950{
951 const GLenum pname = *(GLenum *) (pc + 4);
952 const GLint *params;
953
954 params = (const GLint *) (pc + 8);
955
956 glTexParameteriv(*(GLenum *) (pc + 0), pname, params);
957}
958
959void
960__glXDisp_TexImage1D(GLbyte * pc)
961{
962 const GLvoid *const pixels = (const GLvoid *) ((pc + 52));
963 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
964
965 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
966 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
967 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
968 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
969 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
970 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
971
972 glTexImage1D(*(GLenum *) (pc + 20),
973 *(GLint *) (pc + 24),
974 *(GLint *) (pc + 28),
975 *(GLsizei *) (pc + 32),
976 *(GLint *) (pc + 40),
977 *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels);
978}
979
980void
981__glXDisp_TexImage2D(GLbyte * pc)
982{
983 const GLvoid *const pixels = (const GLvoid *) ((pc + 52));
984 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
985
986 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
987 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
988 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
989 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
990 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
991 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
992
993 glTexImage2D(*(GLenum *) (pc + 20),
994 *(GLint *) (pc + 24),
995 *(GLint *) (pc + 28),
996 *(GLsizei *) (pc + 32),
997 *(GLsizei *) (pc + 36),
998 *(GLint *) (pc + 40),
999 *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels);
1000}
1001
1002void
1003__glXDisp_TexEnvf(GLbyte * pc)
1004{
1005 glTexEnvf(*(GLenum *) (pc + 0),
1006 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
1007}
1008
1009void
1010__glXDisp_TexEnvfv(GLbyte * pc)
1011{
1012 const GLenum pname = *(GLenum *) (pc + 4);
1013 const GLfloat *params;
1014
1015 params = (const GLfloat *) (pc + 8);
1016
1017 glTexEnvfv(*(GLenum *) (pc + 0), pname, params);
1018}
1019
1020void
1021__glXDisp_TexEnvi(GLbyte * pc)
1022{
1023 glTexEnvi(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
1024}
1025
1026void
1027__glXDisp_TexEnviv(GLbyte * pc)
1028{
1029 const GLenum pname = *(GLenum *) (pc + 4);
1030 const GLint *params;
1031
1032 params = (const GLint *) (pc + 8);
1033
1034 glTexEnviv(*(GLenum *) (pc + 0), pname, params);
1035}
1036
1037void
1038__glXDisp_TexGend(GLbyte * pc)
1039{
1040#ifdef __GLX_ALIGN64
1041 if ((unsigned long) (pc) & 7) {
1042 (void) memmove(pc - 4, pc, 16);
1043 pc -= 4;
1044 }
1045#endif
1046
1047 glTexGend(*(GLenum *) (pc + 8),
1048 *(GLenum *) (pc + 12), *(GLdouble *) (pc + 0));
1049}
1050
1051void
1052__glXDisp_TexGendv(GLbyte * pc)
1053{
1054 const GLenum pname = *(GLenum *) (pc + 4);
1055 const GLdouble *params;
1056
1057#ifdef __GLX_ALIGN64
1058 const GLuint compsize = __glTexGendv_size(pname);
1059 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
1060
1061 if ((unsigned long) (pc) & 7) {
1062 (void) memmove(pc - 4, pc, cmdlen);
1063 pc -= 4;
1064 }
1065#endif
1066
1067 params = (const GLdouble *) (pc + 8);
1068
1069 glTexGendv(*(GLenum *) (pc + 0), pname, params);
1070}
1071
1072void
1073__glXDisp_TexGenf(GLbyte * pc)
1074{
1075 glTexGenf(*(GLenum *) (pc + 0),
1076 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
1077}
1078
1079void
1080__glXDisp_TexGenfv(GLbyte * pc)
1081{
1082 const GLenum pname = *(GLenum *) (pc + 4);
1083 const GLfloat *params;
1084
1085 params = (const GLfloat *) (pc + 8);
1086
1087 glTexGenfv(*(GLenum *) (pc + 0), pname, params);
1088}
1089
1090void
1091__glXDisp_TexGeni(GLbyte * pc)
1092{
1093 glTexGeni(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
1094}
1095
1096void
1097__glXDisp_TexGeniv(GLbyte * pc)
1098{
1099 const GLenum pname = *(GLenum *) (pc + 4);
1100 const GLint *params;
1101
1102 params = (const GLint *) (pc + 8);
1103
1104 glTexGeniv(*(GLenum *) (pc + 0), pname, params);
1105}
1106
1107void
1108__glXDisp_InitNames(GLbyte * pc)
1109{
1110 glInitNames();
1111}
1112
1113void
1114__glXDisp_LoadName(GLbyte * pc)
1115{
1116 glLoadName(*(GLuint *) (pc + 0));
1117}
1118
1119void
1120__glXDisp_PassThrough(GLbyte * pc)
1121{
1122 glPassThrough(*(GLfloat *) (pc + 0));
1123}
1124
1125void
1126__glXDisp_PopName(GLbyte * pc)
1127{
1128 glPopName();
1129}
1130
1131void
1132__glXDisp_PushName(GLbyte * pc)
1133{
1134 glPushName(*(GLuint *) (pc + 0));
1135}
1136
1137void
1138__glXDisp_DrawBuffer(GLbyte * pc)
1139{
1140 glDrawBuffer(*(GLenum *) (pc + 0));
1141}
1142
1143void
1144__glXDisp_Clear(GLbyte * pc)
1145{
1146 glClear(*(GLbitfield *) (pc + 0));
1147}
1148
1149void
1150__glXDisp_ClearAccum(GLbyte * pc)
1151{
1152 glClearAccum(*(GLfloat *) (pc + 0),
1153 *(GLfloat *) (pc + 4),
1154 *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12));
1155}
1156
1157void
1158__glXDisp_ClearIndex(GLbyte * pc)
1159{
1160 glClearIndex(*(GLfloat *) (pc + 0));
1161}
1162
1163void
1164__glXDisp_ClearColor(GLbyte * pc)
1165{
1166 glClearColor(*(GLclampf *) (pc + 0),
1167 *(GLclampf *) (pc + 4),
1168 *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12));
1169}
1170
1171void
1172__glXDisp_ClearStencil(GLbyte * pc)
1173{
1174 glClearStencil(*(GLint *) (pc + 0));
1175}
1176
1177void
1178__glXDisp_ClearDepth(GLbyte * pc)
1179{
1180#ifdef __GLX_ALIGN64
1181 if ((unsigned long) (pc) & 7) {
1182 (void) memmove(pc - 4, pc, 8);
1183 pc -= 4;
1184 }
1185#endif
1186
1187 glClearDepth(*(GLclampd *) (pc + 0));
1188}
1189
1190void
1191__glXDisp_StencilMask(GLbyte * pc)
1192{
1193 glStencilMask(*(GLuint *) (pc + 0));
1194}
1195
1196void
1197__glXDisp_ColorMask(GLbyte * pc)
1198{
1199 glColorMask(*(GLboolean *) (pc + 0),
1200 *(GLboolean *) (pc + 1),
1201 *(GLboolean *) (pc + 2), *(GLboolean *) (pc + 3));
1202}
1203
1204void
1205__glXDisp_DepthMask(GLbyte * pc)
1206{
1207 glDepthMask(*(GLboolean *) (pc + 0));
1208}
1209
1210void
1211__glXDisp_IndexMask(GLbyte * pc)
1212{
1213 glIndexMask(*(GLuint *) (pc + 0));
1214}
1215
1216void
1217__glXDisp_Accum(GLbyte * pc)
1218{
1219 glAccum(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
1220}
1221
1222void
1223__glXDisp_Disable(GLbyte * pc)
1224{
1225 glDisable(*(GLenum *) (pc + 0));
1226}
1227
1228void
1229__glXDisp_Enable(GLbyte * pc)
1230{
1231 glEnable(*(GLenum *) (pc + 0));
1232}
1233
1234void
1235__glXDisp_PopAttrib(GLbyte * pc)
1236{
1237 glPopAttrib();
1238}
1239
1240void
1241__glXDisp_PushAttrib(GLbyte * pc)
1242{
1243 glPushAttrib(*(GLbitfield *) (pc + 0));
1244}
1245
1246void
1247__glXDisp_MapGrid1d(GLbyte * pc)
1248{
1249#ifdef __GLX_ALIGN64
1250 if ((unsigned long) (pc) & 7) {
1251 (void) memmove(pc - 4, pc, 20);
1252 pc -= 4;
1253 }
1254#endif
1255
1256 glMapGrid1d(*(GLint *) (pc + 16),
1257 *(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8));
1258}
1259
1260void
1261__glXDisp_MapGrid1f(GLbyte * pc)
1262{
1263 glMapGrid1f(*(GLint *) (pc + 0),
1264 *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8));
1265}
1266
1267void
1268__glXDisp_MapGrid2d(GLbyte * pc)
1269{
1270#ifdef __GLX_ALIGN64
1271 if ((unsigned long) (pc) & 7) {
1272 (void) memmove(pc - 4, pc, 40);
1273 pc -= 4;
1274 }
1275#endif
1276
1277 glMapGrid2d(*(GLint *) (pc + 32),
1278 *(GLdouble *) (pc + 0),
1279 *(GLdouble *) (pc + 8),
1280 *(GLint *) (pc + 36),
1281 *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24));
1282}
1283
1284void
1285__glXDisp_MapGrid2f(GLbyte * pc)
1286{
1287 glMapGrid2f(*(GLint *) (pc + 0),
1288 *(GLfloat *) (pc + 4),
1289 *(GLfloat *) (pc + 8),
1290 *(GLint *) (pc + 12),
1291 *(GLfloat *) (pc + 16), *(GLfloat *) (pc + 20));
1292}
1293
1294void
1295__glXDisp_EvalCoord1dv(GLbyte * pc)
1296{
1297#ifdef __GLX_ALIGN64
1298 if ((unsigned long) (pc) & 7) {
1299 (void) memmove(pc - 4, pc, 8);
1300 pc -= 4;
1301 }
1302#endif
1303
1304 glEvalCoord1dv((const GLdouble *) (pc + 0));
1305}
1306
1307void
1308__glXDisp_EvalCoord1fv(GLbyte * pc)
1309{
1310 glEvalCoord1fv((const GLfloat *) (pc + 0));
1311}
1312
1313void
1314__glXDisp_EvalCoord2dv(GLbyte * pc)
1315{
1316#ifdef __GLX_ALIGN64
1317 if ((unsigned long) (pc) & 7) {
1318 (void) memmove(pc - 4, pc, 16);
1319 pc -= 4;
1320 }
1321#endif
1322
1323 glEvalCoord2dv((const GLdouble *) (pc + 0));
1324}
1325
1326void
1327__glXDisp_EvalCoord2fv(GLbyte * pc)
1328{
1329 glEvalCoord2fv((const GLfloat *) (pc + 0));
1330}
1331
1332void
1333__glXDisp_EvalMesh1(GLbyte * pc)
1334{
1335 glEvalMesh1(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8));
1336}
1337
1338void
1339__glXDisp_EvalPoint1(GLbyte * pc)
1340{
1341 glEvalPoint1(*(GLint *) (pc + 0));
1342}
1343
1344void
1345__glXDisp_EvalMesh2(GLbyte * pc)
1346{
1347 glEvalMesh2(*(GLenum *) (pc + 0),
1348 *(GLint *) (pc + 4),
1349 *(GLint *) (pc + 8),
1350 *(GLint *) (pc + 12), *(GLint *) (pc + 16));
1351}
1352
1353void
1354__glXDisp_EvalPoint2(GLbyte * pc)
1355{
1356 glEvalPoint2(*(GLint *) (pc + 0), *(GLint *) (pc + 4));
1357}
1358
1359void
1360__glXDisp_AlphaFunc(GLbyte * pc)
1361{
1362 glAlphaFunc(*(GLenum *) (pc + 0), *(GLclampf *) (pc + 4));
1363}
1364
1365void
1366__glXDisp_BlendFunc(GLbyte * pc)
1367{
1368 glBlendFunc(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
1369}
1370
1371void
1372__glXDisp_LogicOp(GLbyte * pc)
1373{
1374 glLogicOp(*(GLenum *) (pc + 0));
1375}
1376
1377void
1378__glXDisp_StencilFunc(GLbyte * pc)
1379{
1380 glStencilFunc(*(GLenum *) (pc + 0),
1381 *(GLint *) (pc + 4), *(GLuint *) (pc + 8));
1382}
1383
1384void
1385__glXDisp_StencilOp(GLbyte * pc)
1386{
1387 glStencilOp(*(GLenum *) (pc + 0),
1388 *(GLenum *) (pc + 4), *(GLenum *) (pc + 8));
1389}
1390
1391void
1392__glXDisp_DepthFunc(GLbyte * pc)
1393{
1394 glDepthFunc(*(GLenum *) (pc + 0));
1395}
1396
1397void
1398__glXDisp_PixelZoom(GLbyte * pc)
1399{
1400 glPixelZoom(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4));
1401}
1402
1403void
1404__glXDisp_PixelTransferf(GLbyte * pc)
1405{
1406 glPixelTransferf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
1407}
1408
1409void
1410__glXDisp_PixelTransferi(GLbyte * pc)
1411{
1412 glPixelTransferi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
1413}
1414
1415int
1416__glXDisp_PixelStoref(__GLXclientState * cl, GLbyte * pc)
1417{
1418 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1419 int error;
1420 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1421
1422 pc += __GLX_SINGLE_HDR_SIZE;
1423 if (cx != NULL) {
1424 glPixelStoref(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
1425 error = Success;
1426 }
1427
1428 return error;
1429}
1430
1431int
1432__glXDisp_PixelStorei(__GLXclientState * cl, GLbyte * pc)
1433{
1434 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1435 int error;
1436 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1437
1438 pc += __GLX_SINGLE_HDR_SIZE;
1439 if (cx != NULL) {
1440 glPixelStorei(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
1441 error = Success;
1442 }
1443
1444 return error;
1445}
1446
1447void
1448__glXDisp_PixelMapfv(GLbyte * pc)
1449{
1450 const GLsizei mapsize = *(GLsizei *) (pc + 4);
1451
1452 glPixelMapfv(*(GLenum *) (pc + 0), mapsize, (const GLfloat *) (pc + 8));
1453}
1454
1455void
1456__glXDisp_PixelMapuiv(GLbyte * pc)
1457{
1458 const GLsizei mapsize = *(GLsizei *) (pc + 4);
1459
1460 glPixelMapuiv(*(GLenum *) (pc + 0), mapsize, (const GLuint *) (pc + 8));
1461}
1462
1463void
1464__glXDisp_PixelMapusv(GLbyte * pc)
1465{
1466 const GLsizei mapsize = *(GLsizei *) (pc + 4);
1467
1468 glPixelMapusv(*(GLenum *) (pc + 0), mapsize, (const GLushort *) (pc + 8));
1469}
1470
1471void
1472__glXDisp_ReadBuffer(GLbyte * pc)
1473{
1474 glReadBuffer(*(GLenum *) (pc + 0));
1475}
1476
1477void
1478__glXDisp_CopyPixels(GLbyte * pc)
1479{
1480 glCopyPixels(*(GLint *) (pc + 0),
1481 *(GLint *) (pc + 4),
1482 *(GLsizei *) (pc + 8),
1483 *(GLsizei *) (pc + 12), *(GLenum *) (pc + 16));
1484}
1485
1486void
1487__glXDisp_DrawPixels(GLbyte * pc)
1488{
1489 const GLvoid *const pixels = (const GLvoid *) ((pc + 36));
1490 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
1491
1492 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
1493 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
1494 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
1495 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
1496 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
1497 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
1498
1499 glDrawPixels(*(GLsizei *) (pc + 20),
1500 *(GLsizei *) (pc + 24),
1501 *(GLenum *) (pc + 28), *(GLenum *) (pc + 32), pixels);
1502}
1503
1504int
1505__glXDisp_GetBooleanv(__GLXclientState * cl, GLbyte * pc)
1506{
1507 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1508 int error;
1509 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1510
1511 pc += __GLX_SINGLE_HDR_SIZE;
1512 if (cx != NULL) {
1513 const GLenum pname = *(GLenum *) (pc + 0);
1514
1515 const GLuint compsize = __glGetBooleanv_size(pname);
1516 GLboolean answerBuffer[200];
1517 GLboolean *params =
1518 __glXGetAnswerBuffer(cl, compsize, answerBuffer,
1519 sizeof(answerBuffer), 1);
1520
1521 if (params == NULL)
1522 return BadAlloc;
1523 __glXClearErrorOccured();
1524
1525 glGetBooleanv(pname, params);
1526 __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0);
1527 error = Success;
1528 }
1529
1530 return error;
1531}
1532
1533int
1534__glXDisp_GetClipPlane(__GLXclientState * cl, GLbyte * pc)
1535{
1536 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1537 int error;
1538 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1539
1540 pc += __GLX_SINGLE_HDR_SIZE;
1541 if (cx != NULL) {
1542 GLdouble equation[4];
1543
1544 glGetClipPlane(*(GLenum *) (pc + 0), equation);
1545 __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0);
1546 error = Success;
1547 }
1548
1549 return error;
1550}
1551
1552int
1553__glXDisp_GetDoublev(__GLXclientState * cl, GLbyte * pc)
1554{
1555 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1556 int error;
1557 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1558
1559 pc += __GLX_SINGLE_HDR_SIZE;
1560 if (cx != NULL) {
1561 const GLenum pname = *(GLenum *) (pc + 0);
1562
1563 const GLuint compsize = __glGetDoublev_size(pname);
1564 GLdouble answerBuffer[200];
1565 GLdouble *params =
1566 __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
1567 sizeof(answerBuffer), 8);
1568
1569 if (params == NULL)
1570 return BadAlloc;
1571 __glXClearErrorOccured();
1572
1573 glGetDoublev(pname, params);
1574 __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
1575 error = Success;
1576 }
1577
1578 return error;
1579}
1580
1581int
1582__glXDisp_GetError(__GLXclientState * cl, GLbyte * pc)
1583{
1584 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1585 int error;
1586 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1587
1588 pc += __GLX_SINGLE_HDR_SIZE;
1589 if (cx != NULL) {
1590 GLenum retval;
1591
1592 retval = glGetError();
1593 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
1594 error = Success;
1595 }
1596
1597 return error;
1598}
1599
1600int
1601__glXDisp_GetFloatv(__GLXclientState * cl, GLbyte * pc)
1602{
1603 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1604 int error;
1605 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1606
1607 pc += __GLX_SINGLE_HDR_SIZE;
1608 if (cx != NULL) {
1609 const GLenum pname = *(GLenum *) (pc + 0);
1610
1611 const GLuint compsize = __glGetFloatv_size(pname);
1612 GLfloat answerBuffer[200];
1613 GLfloat *params =
1614 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1615 sizeof(answerBuffer), 4);
1616
1617 if (params == NULL)
1618 return BadAlloc;
1619 __glXClearErrorOccured();
1620
1621 glGetFloatv(pname, params);
1622 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1623 error = Success;
1624 }
1625
1626 return error;
1627}
1628
1629int
1630__glXDisp_GetIntegerv(__GLXclientState * cl, GLbyte * pc)
1631{
1632 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1633 int error;
1634 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1635
1636 pc += __GLX_SINGLE_HDR_SIZE;
1637 if (cx != NULL) {
1638 const GLenum pname = *(GLenum *) (pc + 0);
1639
1640 const GLuint compsize = __glGetIntegerv_size(pname);
1641 GLint answerBuffer[200];
1642 GLint *params =
1643 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1644 sizeof(answerBuffer), 4);
1645
1646 if (params == NULL)
1647 return BadAlloc;
1648 __glXClearErrorOccured();
1649
1650 glGetIntegerv(pname, params);
1651 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1652 error = Success;
1653 }
1654
1655 return error;
1656}
1657
1658int
1659__glXDisp_GetLightfv(__GLXclientState * cl, GLbyte * pc)
1660{
1661 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1662 int error;
1663 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1664
1665 pc += __GLX_SINGLE_HDR_SIZE;
1666 if (cx != NULL) {
1667 const GLenum pname = *(GLenum *) (pc + 4);
1668
1669 const GLuint compsize = __glGetLightfv_size(pname);
1670 GLfloat answerBuffer[200];
1671 GLfloat *params =
1672 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1673 sizeof(answerBuffer), 4);
1674
1675 if (params == NULL)
1676 return BadAlloc;
1677 __glXClearErrorOccured();
1678
1679 glGetLightfv(*(GLenum *) (pc + 0), pname, params);
1680 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1681 error = Success;
1682 }
1683
1684 return error;
1685}
1686
1687int
1688__glXDisp_GetLightiv(__GLXclientState * cl, GLbyte * pc)
1689{
1690 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1691 int error;
1692 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1693
1694 pc += __GLX_SINGLE_HDR_SIZE;
1695 if (cx != NULL) {
1696 const GLenum pname = *(GLenum *) (pc + 4);
1697
1698 const GLuint compsize = __glGetLightiv_size(pname);
1699 GLint answerBuffer[200];
1700 GLint *params =
1701 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1702 sizeof(answerBuffer), 4);
1703
1704 if (params == NULL)
1705 return BadAlloc;
1706 __glXClearErrorOccured();
1707
1708 glGetLightiv(*(GLenum *) (pc + 0), pname, params);
1709 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1710 error = Success;
1711 }
1712
1713 return error;
1714}
1715
1716int
1717__glXDisp_GetMapdv(__GLXclientState * cl, GLbyte * pc)
1718{
1719 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1720 int error;
1721 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1722
1723 pc += __GLX_SINGLE_HDR_SIZE;
1724 if (cx != NULL) {
1725 const GLenum target = *(GLenum *) (pc + 0);
1726 const GLenum query = *(GLenum *) (pc + 4);
1727
1728 const GLuint compsize = __glGetMapdv_size(target, query);
1729 GLdouble answerBuffer[200];
1730 GLdouble *v =
1731 __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
1732 sizeof(answerBuffer), 8);
1733
1734 if (v == NULL)
1735 return BadAlloc;
1736 __glXClearErrorOccured();
1737
1738 glGetMapdv(target, query, v);
1739 __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0);
1740 error = Success;
1741 }
1742
1743 return error;
1744}
1745
1746int
1747__glXDisp_GetMapfv(__GLXclientState * cl, GLbyte * pc)
1748{
1749 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1750 int error;
1751 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1752
1753 pc += __GLX_SINGLE_HDR_SIZE;
1754 if (cx != NULL) {
1755 const GLenum target = *(GLenum *) (pc + 0);
1756 const GLenum query = *(GLenum *) (pc + 4);
1757
1758 const GLuint compsize = __glGetMapfv_size(target, query);
1759 GLfloat answerBuffer[200];
1760 GLfloat *v =
1761 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1762 sizeof(answerBuffer), 4);
1763
1764 if (v == NULL)
1765 return BadAlloc;
1766 __glXClearErrorOccured();
1767
1768 glGetMapfv(target, query, v);
1769 __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
1770 error = Success;
1771 }
1772
1773 return error;
1774}
1775
1776int
1777__glXDisp_GetMapiv(__GLXclientState * cl, GLbyte * pc)
1778{
1779 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1780 int error;
1781 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1782
1783 pc += __GLX_SINGLE_HDR_SIZE;
1784 if (cx != NULL) {
1785 const GLenum target = *(GLenum *) (pc + 0);
1786 const GLenum query = *(GLenum *) (pc + 4);
1787
1788 const GLuint compsize = __glGetMapiv_size(target, query);
1789 GLint answerBuffer[200];
1790 GLint *v =
1791 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1792 sizeof(answerBuffer), 4);
1793
1794 if (v == NULL)
1795 return BadAlloc;
1796 __glXClearErrorOccured();
1797
1798 glGetMapiv(target, query, v);
1799 __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
1800 error = Success;
1801 }
1802
1803 return error;
1804}
1805
1806int
1807__glXDisp_GetMaterialfv(__GLXclientState * cl, GLbyte * pc)
1808{
1809 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1810 int error;
1811 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1812
1813 pc += __GLX_SINGLE_HDR_SIZE;
1814 if (cx != NULL) {
1815 const GLenum pname = *(GLenum *) (pc + 4);
1816
1817 const GLuint compsize = __glGetMaterialfv_size(pname);
1818 GLfloat answerBuffer[200];
1819 GLfloat *params =
1820 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1821 sizeof(answerBuffer), 4);
1822
1823 if (params == NULL)
1824 return BadAlloc;
1825 __glXClearErrorOccured();
1826
1827 glGetMaterialfv(*(GLenum *) (pc + 0), pname, params);
1828 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1829 error = Success;
1830 }
1831
1832 return error;
1833}
1834
1835int
1836__glXDisp_GetMaterialiv(__GLXclientState * cl, GLbyte * pc)
1837{
1838 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1839 int error;
1840 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1841
1842 pc += __GLX_SINGLE_HDR_SIZE;
1843 if (cx != NULL) {
1844 const GLenum pname = *(GLenum *) (pc + 4);
1845
1846 const GLuint compsize = __glGetMaterialiv_size(pname);
1847 GLint answerBuffer[200];
1848 GLint *params =
1849 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1850 sizeof(answerBuffer), 4);
1851
1852 if (params == NULL)
1853 return BadAlloc;
1854 __glXClearErrorOccured();
1855
1856 glGetMaterialiv(*(GLenum *) (pc + 0), pname, params);
1857 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1858 error = Success;
1859 }
1860
1861 return error;
1862}
1863
1864int
1865__glXDisp_GetPixelMapfv(__GLXclientState * cl, GLbyte * pc)
1866{
1867 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1868 int error;
1869 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1870
1871 pc += __GLX_SINGLE_HDR_SIZE;
1872 if (cx != NULL) {
1873 const GLenum map = *(GLenum *) (pc + 0);
1874
1875 const GLuint compsize = __glGetPixelMapfv_size(map);
1876 GLfloat answerBuffer[200];
1877 GLfloat *values =
1878 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1879 sizeof(answerBuffer), 4);
1880
1881 if (values == NULL)
1882 return BadAlloc;
1883 __glXClearErrorOccured();
1884
1885 glGetPixelMapfv(map, values);
1886 __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
1887 error = Success;
1888 }
1889
1890 return error;
1891}
1892
1893int
1894__glXDisp_GetPixelMapuiv(__GLXclientState * cl, GLbyte * pc)
1895{
1896 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1897 int error;
1898 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1899
1900 pc += __GLX_SINGLE_HDR_SIZE;
1901 if (cx != NULL) {
1902 const GLenum map = *(GLenum *) (pc + 0);
1903
1904 const GLuint compsize = __glGetPixelMapuiv_size(map);
1905 GLuint answerBuffer[200];
1906 GLuint *values =
1907 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1908 sizeof(answerBuffer), 4);
1909
1910 if (values == NULL)
1911 return BadAlloc;
1912 __glXClearErrorOccured();
1913
1914 glGetPixelMapuiv(map, values);
1915 __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
1916 error = Success;
1917 }
1918
1919 return error;
1920}
1921
1922int
1923__glXDisp_GetPixelMapusv(__GLXclientState * cl, GLbyte * pc)
1924{
1925 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1926 int error;
1927 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1928
1929 pc += __GLX_SINGLE_HDR_SIZE;
1930 if (cx != NULL) {
1931 const GLenum map = *(GLenum *) (pc + 0);
1932
1933 const GLuint compsize = __glGetPixelMapusv_size(map);
1934 GLushort answerBuffer[200];
1935 GLushort *values =
1936 __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer,
1937 sizeof(answerBuffer), 2);
1938
1939 if (values == NULL)
1940 return BadAlloc;
1941 __glXClearErrorOccured();
1942
1943 glGetPixelMapusv(map, values);
1944 __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0);
1945 error = Success;
1946 }
1947
1948 return error;
1949}
1950
1951int
1952__glXDisp_GetTexEnvfv(__GLXclientState * cl, GLbyte * pc)
1953{
1954 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1955 int error;
1956 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1957
1958 pc += __GLX_SINGLE_HDR_SIZE;
1959 if (cx != NULL) {
1960 const GLenum pname = *(GLenum *) (pc + 4);
1961
1962 const GLuint compsize = __glGetTexEnvfv_size(pname);
1963 GLfloat answerBuffer[200];
1964 GLfloat *params =
1965 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1966 sizeof(answerBuffer), 4);
1967
1968 if (params == NULL)
1969 return BadAlloc;
1970 __glXClearErrorOccured();
1971
1972 glGetTexEnvfv(*(GLenum *) (pc + 0), pname, params);
1973 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
1974 error = Success;
1975 }
1976
1977 return error;
1978}
1979
1980int
1981__glXDisp_GetTexEnviv(__GLXclientState * cl, GLbyte * pc)
1982{
1983 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1984 int error;
1985 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
1986
1987 pc += __GLX_SINGLE_HDR_SIZE;
1988 if (cx != NULL) {
1989 const GLenum pname = *(GLenum *) (pc + 4);
1990
1991 const GLuint compsize = __glGetTexEnviv_size(pname);
1992 GLint answerBuffer[200];
1993 GLint *params =
1994 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1995 sizeof(answerBuffer), 4);
1996
1997 if (params == NULL)
1998 return BadAlloc;
1999 __glXClearErrorOccured();
2000
2001 glGetTexEnviv(*(GLenum *) (pc + 0), pname, params);
2002 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2003 error = Success;
2004 }
2005
2006 return error;
2007}
2008
2009int
2010__glXDisp_GetTexGendv(__GLXclientState * cl, GLbyte * pc)
2011{
2012 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2013 int error;
2014 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2015
2016 pc += __GLX_SINGLE_HDR_SIZE;
2017 if (cx != NULL) {
2018 const GLenum pname = *(GLenum *) (pc + 4);
2019
2020 const GLuint compsize = __glGetTexGendv_size(pname);
2021 GLdouble answerBuffer[200];
2022 GLdouble *params =
2023 __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
2024 sizeof(answerBuffer), 8);
2025
2026 if (params == NULL)
2027 return BadAlloc;
2028 __glXClearErrorOccured();
2029
2030 glGetTexGendv(*(GLenum *) (pc + 0), pname, params);
2031 __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
2032 error = Success;
2033 }
2034
2035 return error;
2036}
2037
2038int
2039__glXDisp_GetTexGenfv(__GLXclientState * cl, GLbyte * pc)
2040{
2041 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2042 int error;
2043 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2044
2045 pc += __GLX_SINGLE_HDR_SIZE;
2046 if (cx != NULL) {
2047 const GLenum pname = *(GLenum *) (pc + 4);
2048
2049 const GLuint compsize = __glGetTexGenfv_size(pname);
2050 GLfloat answerBuffer[200];
2051 GLfloat *params =
2052 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2053 sizeof(answerBuffer), 4);
2054
2055 if (params == NULL)
2056 return BadAlloc;
2057 __glXClearErrorOccured();
2058
2059 glGetTexGenfv(*(GLenum *) (pc + 0), pname, params);
2060 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2061 error = Success;
2062 }
2063
2064 return error;
2065}
2066
2067int
2068__glXDisp_GetTexGeniv(__GLXclientState * cl, GLbyte * pc)
2069{
2070 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2071 int error;
2072 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2073
2074 pc += __GLX_SINGLE_HDR_SIZE;
2075 if (cx != NULL) {
2076 const GLenum pname = *(GLenum *) (pc + 4);
2077
2078 const GLuint compsize = __glGetTexGeniv_size(pname);
2079 GLint answerBuffer[200];
2080 GLint *params =
2081 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2082 sizeof(answerBuffer), 4);
2083
2084 if (params == NULL)
2085 return BadAlloc;
2086 __glXClearErrorOccured();
2087
2088 glGetTexGeniv(*(GLenum *) (pc + 0), pname, params);
2089 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2090 error = Success;
2091 }
2092
2093 return error;
2094}
2095
2096int
2097__glXDisp_GetTexParameterfv(__GLXclientState * cl, GLbyte * pc)
2098{
2099 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2100 int error;
2101 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2102
2103 pc += __GLX_SINGLE_HDR_SIZE;
2104 if (cx != NULL) {
2105 const GLenum pname = *(GLenum *) (pc + 4);
2106
2107 const GLuint compsize = __glGetTexParameterfv_size(pname);
2108 GLfloat answerBuffer[200];
2109 GLfloat *params =
2110 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2111 sizeof(answerBuffer), 4);
2112
2113 if (params == NULL)
2114 return BadAlloc;
2115 __glXClearErrorOccured();
2116
2117 glGetTexParameterfv(*(GLenum *) (pc + 0), pname, params);
2118 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2119 error = Success;
2120 }
2121
2122 return error;
2123}
2124
2125int
2126__glXDisp_GetTexParameteriv(__GLXclientState * cl, GLbyte * pc)
2127{
2128 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2129 int error;
2130 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2131
2132 pc += __GLX_SINGLE_HDR_SIZE;
2133 if (cx != NULL) {
2134 const GLenum pname = *(GLenum *) (pc + 4);
2135
2136 const GLuint compsize = __glGetTexParameteriv_size(pname);
2137 GLint answerBuffer[200];
2138 GLint *params =
2139 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2140 sizeof(answerBuffer), 4);
2141
2142 if (params == NULL)
2143 return BadAlloc;
2144 __glXClearErrorOccured();
2145
2146 glGetTexParameteriv(*(GLenum *) (pc + 0), pname, params);
2147 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2148 error = Success;
2149 }
2150
2151 return error;
2152}
2153
2154int
2155__glXDisp_GetTexLevelParameterfv(__GLXclientState * cl, GLbyte * pc)
2156{
2157 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2158 int error;
2159 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2160
2161 pc += __GLX_SINGLE_HDR_SIZE;
2162 if (cx != NULL) {
2163 const GLenum pname = *(GLenum *) (pc + 8);
2164
2165 const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
2166 GLfloat answerBuffer[200];
2167 GLfloat *params =
2168 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2169 sizeof(answerBuffer), 4);
2170
2171 if (params == NULL)
2172 return BadAlloc;
2173 __glXClearErrorOccured();
2174
2175 glGetTexLevelParameterfv(*(GLenum *) (pc + 0),
2176 *(GLint *) (pc + 4), pname, params);
2177 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2178 error = Success;
2179 }
2180
2181 return error;
2182}
2183
2184int
2185__glXDisp_GetTexLevelParameteriv(__GLXclientState * cl, GLbyte * pc)
2186{
2187 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2188 int error;
2189 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2190
2191 pc += __GLX_SINGLE_HDR_SIZE;
2192 if (cx != NULL) {
2193 const GLenum pname = *(GLenum *) (pc + 8);
2194
2195 const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
2196 GLint answerBuffer[200];
2197 GLint *params =
2198 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2199 sizeof(answerBuffer), 4);
2200
2201 if (params == NULL)
2202 return BadAlloc;
2203 __glXClearErrorOccured();
2204
2205 glGetTexLevelParameteriv(*(GLenum *) (pc + 0),
2206 *(GLint *) (pc + 4), pname, params);
2207 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2208 error = Success;
2209 }
2210
2211 return error;
2212}
2213
2214int
2215__glXDisp_IsEnabled(__GLXclientState * cl, GLbyte * pc)
2216{
2217 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2218 int error;
2219 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2220
2221 pc += __GLX_SINGLE_HDR_SIZE;
2222 if (cx != NULL) {
2223 GLboolean retval;
2224
2225 retval = glIsEnabled(*(GLenum *) (pc + 0));
2226 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2227 error = Success;
2228 }
2229
2230 return error;
2231}
2232
2233int
2234__glXDisp_IsList(__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 GLboolean retval;
2243
2244 retval = glIsList(*(GLuint *) (pc + 0));
2245 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2246 error = Success;
2247 }
2248
2249 return error;
2250}
2251
2252void
2253__glXDisp_DepthRange(GLbyte * pc)
2254{
2255#ifdef __GLX_ALIGN64
2256 if ((unsigned long) (pc) & 7) {
2257 (void) memmove(pc - 4, pc, 16);
2258 pc -= 4;
2259 }
2260#endif
2261
2262 glDepthRange(*(GLclampd *) (pc + 0), *(GLclampd *) (pc + 8));
2263}
2264
2265void
2266__glXDisp_Frustum(GLbyte * pc)
2267{
2268#ifdef __GLX_ALIGN64
2269 if ((unsigned long) (pc) & 7) {
2270 (void) memmove(pc - 4, pc, 48);
2271 pc -= 4;
2272 }
2273#endif
2274
2275 glFrustum(*(GLdouble *) (pc + 0),
2276 *(GLdouble *) (pc + 8),
2277 *(GLdouble *) (pc + 16),
2278 *(GLdouble *) (pc + 24),
2279 *(GLdouble *) (pc + 32), *(GLdouble *) (pc + 40));
2280}
2281
2282void
2283__glXDisp_LoadIdentity(GLbyte * pc)
2284{
2285 glLoadIdentity();
2286}
2287
2288void
2289__glXDisp_LoadMatrixf(GLbyte * pc)
2290{
2291 glLoadMatrixf((const GLfloat *) (pc + 0));
2292}
2293
2294void
2295__glXDisp_LoadMatrixd(GLbyte * pc)
2296{
2297#ifdef __GLX_ALIGN64
2298 if ((unsigned long) (pc) & 7) {
2299 (void) memmove(pc - 4, pc, 128);
2300 pc -= 4;
2301 }
2302#endif
2303
2304 glLoadMatrixd((const GLdouble *) (pc + 0));
2305}
2306
2307void
2308__glXDisp_MatrixMode(GLbyte * pc)
2309{
2310 glMatrixMode(*(GLenum *) (pc + 0));
2311}
2312
2313void
2314__glXDisp_MultMatrixf(GLbyte * pc)
2315{
2316 glMultMatrixf((const GLfloat *) (pc + 0));
2317}
2318
2319void
2320__glXDisp_MultMatrixd(GLbyte * pc)
2321{
2322#ifdef __GLX_ALIGN64
2323 if ((unsigned long) (pc) & 7) {
2324 (void) memmove(pc - 4, pc, 128);
2325 pc -= 4;
2326 }
2327#endif
2328
2329 glMultMatrixd((const GLdouble *) (pc + 0));
2330}
2331
2332void
2333__glXDisp_Ortho(GLbyte * pc)
2334{
2335#ifdef __GLX_ALIGN64
2336 if ((unsigned long) (pc) & 7) {
2337 (void) memmove(pc - 4, pc, 48);
2338 pc -= 4;
2339 }
2340#endif
2341
2342 glOrtho(*(GLdouble *) (pc + 0),
2343 *(GLdouble *) (pc + 8),
2344 *(GLdouble *) (pc + 16),
2345 *(GLdouble *) (pc + 24),
2346 *(GLdouble *) (pc + 32), *(GLdouble *) (pc + 40));
2347}
2348
2349void
2350__glXDisp_PopMatrix(GLbyte * pc)
2351{
2352 glPopMatrix();
2353}
2354
2355void
2356__glXDisp_PushMatrix(GLbyte * pc)
2357{
2358 glPushMatrix();
2359}
2360
2361void
2362__glXDisp_Rotated(GLbyte * pc)
2363{
2364#ifdef __GLX_ALIGN64
2365 if ((unsigned long) (pc) & 7) {
2366 (void) memmove(pc - 4, pc, 32);
2367 pc -= 4;
2368 }
2369#endif
2370
2371 glRotated(*(GLdouble *) (pc + 0),
2372 *(GLdouble *) (pc + 8),
2373 *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24));
2374}
2375
2376void
2377__glXDisp_Rotatef(GLbyte * pc)
2378{
2379 glRotatef(*(GLfloat *) (pc + 0),
2380 *(GLfloat *) (pc + 4),
2381 *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12));
2382}
2383
2384void
2385__glXDisp_Scaled(GLbyte * pc)
2386{
2387#ifdef __GLX_ALIGN64
2388 if ((unsigned long) (pc) & 7) {
2389 (void) memmove(pc - 4, pc, 24);
2390 pc -= 4;
2391 }
2392#endif
2393
2394 glScaled(*(GLdouble *) (pc + 0),
2395 *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16));
2396}
2397
2398void
2399__glXDisp_Scalef(GLbyte * pc)
2400{
2401 glScalef(*(GLfloat *) (pc + 0),
2402 *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8));
2403}
2404
2405void
2406__glXDisp_Translated(GLbyte * pc)
2407{
2408#ifdef __GLX_ALIGN64
2409 if ((unsigned long) (pc) & 7) {
2410 (void) memmove(pc - 4, pc, 24);
2411 pc -= 4;
2412 }
2413#endif
2414
2415 glTranslated(*(GLdouble *) (pc + 0),
2416 *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16));
2417}
2418
2419void
2420__glXDisp_Translatef(GLbyte * pc)
2421{
2422 glTranslatef(*(GLfloat *) (pc + 0),
2423 *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8));
2424}
2425
2426void
2427__glXDisp_Viewport(GLbyte * pc)
2428{
2429 glViewport(*(GLint *) (pc + 0),
2430 *(GLint *) (pc + 4),
2431 *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12));
2432}
2433
2434void
2435__glXDisp_BindTexture(GLbyte * pc)
2436{
2437 glBindTexture(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
2438}
2439
2440void
2441__glXDisp_Indexubv(GLbyte * pc)
2442{
2443 glIndexubv((const GLubyte *) (pc + 0));
2444}
2445
2446void
2447__glXDisp_PolygonOffset(GLbyte * pc)
2448{
2449 glPolygonOffset(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4));
2450}
2451
2452int
2453__glXDisp_AreTexturesResident(__GLXclientState * cl, GLbyte * pc)
2454{
2455 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2456 int error;
2457 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2458
2459 pc += __GLX_SINGLE_HDR_SIZE;
2460 if (cx != NULL) {
2461 const GLsizei n = *(GLsizei *) (pc + 0);
2462
2463 GLboolean retval;
2464 GLboolean answerBuffer[200];
2465 GLboolean *residences =
2466 __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
2467 retval =
2468 glAreTexturesResident(n, (const GLuint *) (pc + 4), residences);
2469 __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
2470 error = Success;
2471 }
2472
2473 return error;
2474}
2475
2476int
2477__glXDisp_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc)
2478{
2479 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2480 int error;
2481 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2482
2483 pc += __GLX_VENDPRIV_HDR_SIZE;
2484 if (cx != NULL) {
2485 const GLsizei n = *(GLsizei *) (pc + 0);
2486
2487 GLboolean retval;
2488 GLboolean answerBuffer[200];
2489 GLboolean *residences =
2490 __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
2491 retval =
2492 glAreTexturesResident(n, (const GLuint *) (pc + 4), residences);
2493 __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
2494 error = Success;
2495 }
2496
2497 return error;
2498}
2499
2500void
2501__glXDisp_CopyTexImage1D(GLbyte * pc)
2502{
2503 glCopyTexImage1D(*(GLenum *) (pc + 0),
2504 *(GLint *) (pc + 4),
2505 *(GLenum *) (pc + 8),
2506 *(GLint *) (pc + 12),
2507 *(GLint *) (pc + 16),
2508 *(GLsizei *) (pc + 20), *(GLint *) (pc + 24));
2509}
2510
2511void
2512__glXDisp_CopyTexImage2D(GLbyte * pc)
2513{
2514 glCopyTexImage2D(*(GLenum *) (pc + 0),
2515 *(GLint *) (pc + 4),
2516 *(GLenum *) (pc + 8),
2517 *(GLint *) (pc + 12),
2518 *(GLint *) (pc + 16),
2519 *(GLsizei *) (pc + 20),
2520 *(GLsizei *) (pc + 24), *(GLint *) (pc + 28));
2521}
2522
2523void
2524__glXDisp_CopyTexSubImage1D(GLbyte * pc)
2525{
2526 glCopyTexSubImage1D(*(GLenum *) (pc + 0),
2527 *(GLint *) (pc + 4),
2528 *(GLint *) (pc + 8),
2529 *(GLint *) (pc + 12),
2530 *(GLint *) (pc + 16), *(GLsizei *) (pc + 20));
2531}
2532
2533void
2534__glXDisp_CopyTexSubImage2D(GLbyte * pc)
2535{
2536 glCopyTexSubImage2D(*(GLenum *) (pc + 0),
2537 *(GLint *) (pc + 4),
2538 *(GLint *) (pc + 8),
2539 *(GLint *) (pc + 12),
2540 *(GLint *) (pc + 16),
2541 *(GLint *) (pc + 20),
2542 *(GLsizei *) (pc + 24), *(GLsizei *) (pc + 28));
2543}
2544
2545int
2546__glXDisp_DeleteTextures(__GLXclientState * cl, GLbyte * pc)
2547{
2548 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2549 int error;
2550 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2551
2552 pc += __GLX_SINGLE_HDR_SIZE;
2553 if (cx != NULL) {
2554 const GLsizei n = *(GLsizei *) (pc + 0);
2555
2556 glDeleteTextures(n, (const GLuint *) (pc + 4));
2557 error = Success;
2558 }
2559
2560 return error;
2561}
2562
2563int
2564__glXDisp_DeleteTexturesEXT(__GLXclientState * cl, GLbyte * pc)
2565{
2566 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2567 int error;
2568 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2569
2570 pc += __GLX_VENDPRIV_HDR_SIZE;
2571 if (cx != NULL) {
2572 const GLsizei n = *(GLsizei *) (pc + 0);
2573
2574 glDeleteTextures(n, (const GLuint *) (pc + 4));
2575 error = Success;
2576 }
2577
2578 return error;
2579}
2580
2581int
2582__glXDisp_GenTextures(__GLXclientState * cl, GLbyte * pc)
2583{
2584 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2585 int error;
2586 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2587
2588 pc += __GLX_SINGLE_HDR_SIZE;
2589 if (cx != NULL) {
2590 const GLsizei n = *(GLsizei *) (pc + 0);
2591
2592 GLuint answerBuffer[200];
2593 GLuint *textures =
2594 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
2595 4);
2596 glGenTextures(n, textures);
2597 __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
2598 error = Success;
2599 }
2600
2601 return error;
2602}
2603
2604int
2605__glXDisp_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc)
2606{
2607 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2608 int error;
2609 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2610
2611 pc += __GLX_VENDPRIV_HDR_SIZE;
2612 if (cx != NULL) {
2613 const GLsizei n = *(GLsizei *) (pc + 0);
2614
2615 GLuint answerBuffer[200];
2616 GLuint *textures =
2617 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
2618 4);
2619 glGenTextures(n, textures);
2620 __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
2621 error = Success;
2622 }
2623
2624 return error;
2625}
2626
2627int
2628__glXDisp_IsTexture(__GLXclientState * cl, GLbyte * pc)
2629{
2630 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2631 int error;
2632 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2633
2634 pc += __GLX_SINGLE_HDR_SIZE;
2635 if (cx != NULL) {
2636 GLboolean retval;
2637
2638 retval = glIsTexture(*(GLuint *) (pc + 0));
2639 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2640 error = Success;
2641 }
2642
2643 return error;
2644}
2645
2646int
2647__glXDisp_IsTextureEXT(__GLXclientState * cl, GLbyte * pc)
2648{
2649 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2650 int error;
2651 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2652
2653 pc += __GLX_VENDPRIV_HDR_SIZE;
2654 if (cx != NULL) {
2655 GLboolean retval;
2656
2657 retval = glIsTexture(*(GLuint *) (pc + 0));
2658 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2659 error = Success;
2660 }
2661
2662 return error;
2663}
2664
2665void
2666__glXDisp_PrioritizeTextures(GLbyte * pc)
2667{
2668 const GLsizei n = *(GLsizei *) (pc + 0);
2669
2670 glPrioritizeTextures(n,
2671 (const GLuint *) (pc + 4),
2672 (const GLclampf *) (pc + 4));
2673}
2674
2675void
2676__glXDisp_TexSubImage1D(GLbyte * pc)
2677{
2678 const GLvoid *const pixels = (const GLvoid *) ((pc + 56));
2679 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
2680
2681 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
2682 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
2683 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
2684 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
2685 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
2686 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
2687
2688 glTexSubImage1D(*(GLenum *) (pc + 20),
2689 *(GLint *) (pc + 24),
2690 *(GLint *) (pc + 28),
2691 *(GLsizei *) (pc + 36),
2692 *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels);
2693}
2694
2695void
2696__glXDisp_TexSubImage2D(GLbyte * pc)
2697{
2698 const GLvoid *const pixels = (const GLvoid *) ((pc + 56));
2699 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
2700
2701 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
2702 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
2703 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
2704 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
2705 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
2706 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
2707
2708 glTexSubImage2D(*(GLenum *) (pc + 20),
2709 *(GLint *) (pc + 24),
2710 *(GLint *) (pc + 28),
2711 *(GLint *) (pc + 32),
2712 *(GLsizei *) (pc + 36),
2713 *(GLsizei *) (pc + 40),
2714 *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels);
2715}
2716
2717void
2718__glXDisp_BlendColor(GLbyte * pc)
2719{
2720 glBlendColor(*(GLclampf *) (pc + 0),
2721 *(GLclampf *) (pc + 4),
2722 *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12));
2723}
2724
2725void
2726__glXDisp_BlendEquation(GLbyte * pc)
2727{
2728 glBlendEquation(*(GLenum *) (pc + 0));
2729}
2730
2731void
2732__glXDisp_ColorTable(GLbyte * pc)
2733{
2734 const GLvoid *const table = (const GLvoid *) ((pc + 40));
2735 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
2736
2737 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
2738 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
2739 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
2740 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
2741 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
2742 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
2743
2744 glColorTable(*(GLenum *) (pc + 20),
2745 *(GLenum *) (pc + 24),
2746 *(GLsizei *) (pc + 28),
2747 *(GLenum *) (pc + 32), *(GLenum *) (pc + 36), table);
2748}
2749
2750void
2751__glXDisp_ColorTableParameterfv(GLbyte * pc)
2752{
2753 const GLenum pname = *(GLenum *) (pc + 4);
2754 const GLfloat *params;
2755
2756 params = (const GLfloat *) (pc + 8);
2757
2758 glColorTableParameterfv(*(GLenum *) (pc + 0), pname, params);
2759}
2760
2761void
2762__glXDisp_ColorTableParameteriv(GLbyte * pc)
2763{
2764 const GLenum pname = *(GLenum *) (pc + 4);
2765 const GLint *params;
2766
2767 params = (const GLint *) (pc + 8);
2768
2769 glColorTableParameteriv(*(GLenum *) (pc + 0), pname, params);
2770}
2771
2772void
2773__glXDisp_CopyColorTable(GLbyte * pc)
2774{
2775 glCopyColorTable(*(GLenum *) (pc + 0),
2776 *(GLenum *) (pc + 4),
2777 *(GLint *) (pc + 8),
2778 *(GLint *) (pc + 12), *(GLsizei *) (pc + 16));
2779}
2780
2781int
2782__glXDisp_GetColorTableParameterfv(__GLXclientState * cl, GLbyte * pc)
2783{
2784 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2785 int error;
2786 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2787
2788 pc += __GLX_SINGLE_HDR_SIZE;
2789 if (cx != NULL) {
2790 const GLenum pname = *(GLenum *) (pc + 4);
2791
2792 const GLuint compsize = __glGetColorTableParameterfv_size(pname);
2793 GLfloat answerBuffer[200];
2794 GLfloat *params =
2795 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2796 sizeof(answerBuffer), 4);
2797
2798 if (params == NULL)
2799 return BadAlloc;
2800 __glXClearErrorOccured();
2801
2802 glGetColorTableParameterfv(*(GLenum *) (pc + 0), pname, params);
2803 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2804 error = Success;
2805 }
2806
2807 return error;
2808}
2809
2810int
2811__glXDisp_GetColorTableParameterfvSGI(__GLXclientState * cl, GLbyte * pc)
2812{
2813 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2814 int error;
2815 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2816
2817 pc += __GLX_VENDPRIV_HDR_SIZE;
2818 if (cx != NULL) {
2819 const GLenum pname = *(GLenum *) (pc + 4);
2820
2821 const GLuint compsize = __glGetColorTableParameterfv_size(pname);
2822 GLfloat answerBuffer[200];
2823 GLfloat *params =
2824 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2825 sizeof(answerBuffer), 4);
2826
2827 if (params == NULL)
2828 return BadAlloc;
2829 __glXClearErrorOccured();
2830
2831 glGetColorTableParameterfv(*(GLenum *) (pc + 0), pname, params);
2832 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2833 error = Success;
2834 }
2835
2836 return error;
2837}
2838
2839int
2840__glXDisp_GetColorTableParameteriv(__GLXclientState * cl, GLbyte * pc)
2841{
2842 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2843 int error;
2844 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2845
2846 pc += __GLX_SINGLE_HDR_SIZE;
2847 if (cx != NULL) {
2848 const GLenum pname = *(GLenum *) (pc + 4);
2849
2850 const GLuint compsize = __glGetColorTableParameteriv_size(pname);
2851 GLint answerBuffer[200];
2852 GLint *params =
2853 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2854 sizeof(answerBuffer), 4);
2855
2856 if (params == NULL)
2857 return BadAlloc;
2858 __glXClearErrorOccured();
2859
2860 glGetColorTableParameteriv(*(GLenum *) (pc + 0), pname, params);
2861 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2862 error = Success;
2863 }
2864
2865 return error;
2866}
2867
2868int
2869__glXDisp_GetColorTableParameterivSGI(__GLXclientState * cl, GLbyte * pc)
2870{
2871 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2872 int error;
2873 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
2874
2875 pc += __GLX_VENDPRIV_HDR_SIZE;
2876 if (cx != NULL) {
2877 const GLenum pname = *(GLenum *) (pc + 4);
2878
2879 const GLuint compsize = __glGetColorTableParameteriv_size(pname);
2880 GLint answerBuffer[200];
2881 GLint *params =
2882 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2883 sizeof(answerBuffer), 4);
2884
2885 if (params == NULL)
2886 return BadAlloc;
2887 __glXClearErrorOccured();
2888
2889 glGetColorTableParameteriv(*(GLenum *) (pc + 0), pname, params);
2890 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
2891 error = Success;
2892 }
2893
2894 return error;
2895}
2896
2897void
2898__glXDisp_ColorSubTable(GLbyte * pc)
2899{
2900 const GLvoid *const data = (const GLvoid *) ((pc + 40));
2901 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
2902
2903 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
2904 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
2905 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
2906 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
2907 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
2908 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
2909
2910 glColorSubTable(*(GLenum *) (pc + 20),
2911 *(GLsizei *) (pc + 24),
2912 *(GLsizei *) (pc + 28),
2913 *(GLenum *) (pc + 32), *(GLenum *) (pc + 36), data);
2914}
2915
2916void
2917__glXDisp_CopyColorSubTable(GLbyte * pc)
2918{
2919 glCopyColorSubTable(*(GLenum *) (pc + 0),
2920 *(GLsizei *) (pc + 4),
2921 *(GLint *) (pc + 8),
2922 *(GLint *) (pc + 12), *(GLsizei *) (pc + 16));
2923}
2924
2925void
2926__glXDisp_ConvolutionFilter1D(GLbyte * pc)
2927{
2928 const GLvoid *const image = (const GLvoid *) ((pc + 44));
2929 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
2930
2931 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
2932 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
2933 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
2934 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
2935 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
2936 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
2937
2938 glConvolutionFilter1D(*(GLenum *) (pc + 20),
2939 *(GLenum *) (pc + 24),
2940 *(GLsizei *) (pc + 28),
2941 *(GLenum *) (pc + 36), *(GLenum *) (pc + 40), image);
2942}
2943
2944void
2945__glXDisp_ConvolutionFilter2D(GLbyte * pc)
2946{
2947 const GLvoid *const image = (const GLvoid *) ((pc + 44));
2948 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
2949
2950 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
2951 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
2952 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
2953 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
2954 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
2955 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
2956
2957 glConvolutionFilter2D(*(GLenum *) (pc + 20),
2958 *(GLenum *) (pc + 24),
2959 *(GLsizei *) (pc + 28),
2960 *(GLsizei *) (pc + 32),
2961 *(GLenum *) (pc + 36), *(GLenum *) (pc + 40), image);
2962}
2963
2964void
2965__glXDisp_ConvolutionParameterf(GLbyte * pc)
2966{
2967 glConvolutionParameterf(*(GLenum *) (pc + 0),
2968 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
2969}
2970
2971void
2972__glXDisp_ConvolutionParameterfv(GLbyte * pc)
2973{
2974 const GLenum pname = *(GLenum *) (pc + 4);
2975 const GLfloat *params;
2976
2977 params = (const GLfloat *) (pc + 8);
2978
2979 glConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params);
2980}
2981
2982void
2983__glXDisp_ConvolutionParameteri(GLbyte * pc)
2984{
2985 glConvolutionParameteri(*(GLenum *) (pc + 0),
2986 *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
2987}
2988
2989void
2990__glXDisp_ConvolutionParameteriv(GLbyte * pc)
2991{
2992 const GLenum pname = *(GLenum *) (pc + 4);
2993 const GLint *params;
2994
2995 params = (const GLint *) (pc + 8);
2996
2997 glConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params);
2998}
2999
3000void
3001__glXDisp_CopyConvolutionFilter1D(GLbyte * pc)
3002{
3003 glCopyConvolutionFilter1D(*(GLenum *) (pc + 0),
3004 *(GLenum *) (pc + 4),
3005 *(GLint *) (pc + 8),
3006 *(GLint *) (pc + 12), *(GLsizei *) (pc + 16));
3007}
3008
3009void
3010__glXDisp_CopyConvolutionFilter2D(GLbyte * pc)
3011{
3012 glCopyConvolutionFilter2D(*(GLenum *) (pc + 0),
3013 *(GLenum *) (pc + 4),
3014 *(GLint *) (pc + 8),
3015 *(GLint *) (pc + 12),
3016 *(GLsizei *) (pc + 16), *(GLsizei *) (pc + 20));
3017}
3018
3019int
3020__glXDisp_GetConvolutionParameterfv(__GLXclientState * cl, GLbyte * pc)
3021{
3022 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3023 int error;
3024 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3025
3026 pc += __GLX_SINGLE_HDR_SIZE;
3027 if (cx != NULL) {
3028 const GLenum pname = *(GLenum *) (pc + 4);
3029
3030 const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
3031 GLfloat answerBuffer[200];
3032 GLfloat *params =
3033 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3034 sizeof(answerBuffer), 4);
3035
3036 if (params == NULL)
3037 return BadAlloc;
3038 __glXClearErrorOccured();
3039
3040 glGetConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params);
3041 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3042 error = Success;
3043 }
3044
3045 return error;
3046}
3047
3048int
3049__glXDisp_GetConvolutionParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
3050{
3051 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3052 int error;
3053 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3054
3055 pc += __GLX_VENDPRIV_HDR_SIZE;
3056 if (cx != NULL) {
3057 const GLenum pname = *(GLenum *) (pc + 4);
3058
3059 const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
3060 GLfloat answerBuffer[200];
3061 GLfloat *params =
3062 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3063 sizeof(answerBuffer), 4);
3064
3065 if (params == NULL)
3066 return BadAlloc;
3067 __glXClearErrorOccured();
3068
3069 glGetConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params);
3070 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3071 error = Success;
3072 }
3073
3074 return error;
3075}
3076
3077int
3078__glXDisp_GetConvolutionParameteriv(__GLXclientState * cl, GLbyte * pc)
3079{
3080 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3081 int error;
3082 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3083
3084 pc += __GLX_SINGLE_HDR_SIZE;
3085 if (cx != NULL) {
3086 const GLenum pname = *(GLenum *) (pc + 4);
3087
3088 const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
3089 GLint answerBuffer[200];
3090 GLint *params =
3091 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3092 sizeof(answerBuffer), 4);
3093
3094 if (params == NULL)
3095 return BadAlloc;
3096 __glXClearErrorOccured();
3097
3098 glGetConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params);
3099 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3100 error = Success;
3101 }
3102
3103 return error;
3104}
3105
3106int
3107__glXDisp_GetConvolutionParameterivEXT(__GLXclientState * cl, GLbyte * pc)
3108{
3109 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3110 int error;
3111 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3112
3113 pc += __GLX_VENDPRIV_HDR_SIZE;
3114 if (cx != NULL) {
3115 const GLenum pname = *(GLenum *) (pc + 4);
3116
3117 const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
3118 GLint answerBuffer[200];
3119 GLint *params =
3120 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3121 sizeof(answerBuffer), 4);
3122
3123 if (params == NULL)
3124 return BadAlloc;
3125 __glXClearErrorOccured();
3126
3127 glGetConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params);
3128 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3129 error = Success;
3130 }
3131
3132 return error;
3133}
3134
3135int
3136__glXDisp_GetHistogramParameterfv(__GLXclientState * cl, GLbyte * pc)
3137{
3138 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3139 int error;
3140 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3141
3142 pc += __GLX_SINGLE_HDR_SIZE;
3143 if (cx != NULL) {
3144 const GLenum pname = *(GLenum *) (pc + 4);
3145
3146 const GLuint compsize = __glGetHistogramParameterfv_size(pname);
3147 GLfloat answerBuffer[200];
3148 GLfloat *params =
3149 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3150 sizeof(answerBuffer), 4);
3151
3152 if (params == NULL)
3153 return BadAlloc;
3154 __glXClearErrorOccured();
3155
3156 glGetHistogramParameterfv(*(GLenum *) (pc + 0), pname, params);
3157 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3158 error = Success;
3159 }
3160
3161 return error;
3162}
3163
3164int
3165__glXDisp_GetHistogramParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
3166{
3167 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3168 int error;
3169 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3170
3171 pc += __GLX_VENDPRIV_HDR_SIZE;
3172 if (cx != NULL) {
3173 const GLenum pname = *(GLenum *) (pc + 4);
3174
3175 const GLuint compsize = __glGetHistogramParameterfv_size(pname);
3176 GLfloat answerBuffer[200];
3177 GLfloat *params =
3178 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3179 sizeof(answerBuffer), 4);
3180
3181 if (params == NULL)
3182 return BadAlloc;
3183 __glXClearErrorOccured();
3184
3185 glGetHistogramParameterfv(*(GLenum *) (pc + 0), pname, params);
3186 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3187 error = Success;
3188 }
3189
3190 return error;
3191}
3192
3193int
3194__glXDisp_GetHistogramParameteriv(__GLXclientState * cl, GLbyte * pc)
3195{
3196 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3197 int error;
3198 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3199
3200 pc += __GLX_SINGLE_HDR_SIZE;
3201 if (cx != NULL) {
3202 const GLenum pname = *(GLenum *) (pc + 4);
3203
3204 const GLuint compsize = __glGetHistogramParameteriv_size(pname);
3205 GLint answerBuffer[200];
3206 GLint *params =
3207 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3208 sizeof(answerBuffer), 4);
3209
3210 if (params == NULL)
3211 return BadAlloc;
3212 __glXClearErrorOccured();
3213
3214 glGetHistogramParameteriv(*(GLenum *) (pc + 0), pname, params);
3215 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3216 error = Success;
3217 }
3218
3219 return error;
3220}
3221
3222int
3223__glXDisp_GetHistogramParameterivEXT(__GLXclientState * cl, GLbyte * pc)
3224{
3225 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3226 int error;
3227 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3228
3229 pc += __GLX_VENDPRIV_HDR_SIZE;
3230 if (cx != NULL) {
3231 const GLenum pname = *(GLenum *) (pc + 4);
3232
3233 const GLuint compsize = __glGetHistogramParameteriv_size(pname);
3234 GLint answerBuffer[200];
3235 GLint *params =
3236 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3237 sizeof(answerBuffer), 4);
3238
3239 if (params == NULL)
3240 return BadAlloc;
3241 __glXClearErrorOccured();
3242
3243 glGetHistogramParameteriv(*(GLenum *) (pc + 0), pname, params);
3244 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3245 error = Success;
3246 }
3247
3248 return error;
3249}
3250
3251int
3252__glXDisp_GetMinmaxParameterfv(__GLXclientState * cl, GLbyte * pc)
3253{
3254 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3255 int error;
3256 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3257
3258 pc += __GLX_SINGLE_HDR_SIZE;
3259 if (cx != NULL) {
3260 const GLenum pname = *(GLenum *) (pc + 4);
3261
3262 const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
3263 GLfloat answerBuffer[200];
3264 GLfloat *params =
3265 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3266 sizeof(answerBuffer), 4);
3267
3268 if (params == NULL)
3269 return BadAlloc;
3270 __glXClearErrorOccured();
3271
3272 glGetMinmaxParameterfv(*(GLenum *) (pc + 0), pname, params);
3273 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3274 error = Success;
3275 }
3276
3277 return error;
3278}
3279
3280int
3281__glXDisp_GetMinmaxParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
3282{
3283 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3284 int error;
3285 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3286
3287 pc += __GLX_VENDPRIV_HDR_SIZE;
3288 if (cx != NULL) {
3289 const GLenum pname = *(GLenum *) (pc + 4);
3290
3291 const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
3292 GLfloat answerBuffer[200];
3293 GLfloat *params =
3294 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3295 sizeof(answerBuffer), 4);
3296
3297 if (params == NULL)
3298 return BadAlloc;
3299 __glXClearErrorOccured();
3300
3301 glGetMinmaxParameterfv(*(GLenum *) (pc + 0), pname, params);
3302 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3303 error = Success;
3304 }
3305
3306 return error;
3307}
3308
3309int
3310__glXDisp_GetMinmaxParameteriv(__GLXclientState * cl, GLbyte * pc)
3311{
3312 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3313 int error;
3314 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3315
3316 pc += __GLX_SINGLE_HDR_SIZE;
3317 if (cx != NULL) {
3318 const GLenum pname = *(GLenum *) (pc + 4);
3319
3320 const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
3321 GLint answerBuffer[200];
3322 GLint *params =
3323 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3324 sizeof(answerBuffer), 4);
3325
3326 if (params == NULL)
3327 return BadAlloc;
3328 __glXClearErrorOccured();
3329
3330 glGetMinmaxParameteriv(*(GLenum *) (pc + 0), pname, params);
3331 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3332 error = Success;
3333 }
3334
3335 return error;
3336}
3337
3338int
3339__glXDisp_GetMinmaxParameterivEXT(__GLXclientState * cl, GLbyte * pc)
3340{
3341 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3342 int error;
3343 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3344
3345 pc += __GLX_VENDPRIV_HDR_SIZE;
3346 if (cx != NULL) {
3347 const GLenum pname = *(GLenum *) (pc + 4);
3348
3349 const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
3350 GLint answerBuffer[200];
3351 GLint *params =
3352 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3353 sizeof(answerBuffer), 4);
3354
3355 if (params == NULL)
3356 return BadAlloc;
3357 __glXClearErrorOccured();
3358
3359 glGetMinmaxParameteriv(*(GLenum *) (pc + 0), pname, params);
3360 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3361 error = Success;
3362 }
3363
3364 return error;
3365}
3366
3367void
3368__glXDisp_Histogram(GLbyte * pc)
3369{
3370 glHistogram(*(GLenum *) (pc + 0),
3371 *(GLsizei *) (pc + 4),
3372 *(GLenum *) (pc + 8), *(GLboolean *) (pc + 12));
3373}
3374
3375void
3376__glXDisp_Minmax(GLbyte * pc)
3377{
3378 glMinmax(*(GLenum *) (pc + 0),
3379 *(GLenum *) (pc + 4), *(GLboolean *) (pc + 8));
3380}
3381
3382void
3383__glXDisp_ResetHistogram(GLbyte * pc)
3384{
3385 glResetHistogram(*(GLenum *) (pc + 0));
3386}
3387
3388void
3389__glXDisp_ResetMinmax(GLbyte * pc)
3390{
3391 glResetMinmax(*(GLenum *) (pc + 0));
3392}
3393
3394void
3395__glXDisp_TexImage3D(GLbyte * pc)
3396{
3397 const CARD32 ptr_is_null = *(CARD32 *) (pc + 76);
3398 const GLvoid *const pixels =
3399 (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80));
3400 __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc);
3401
3402 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
3403 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
3404 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
3405 glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight);
3406 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
3407 glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages);
3408 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
3409 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
3410
3411 glTexImage3D(*(GLenum *) (pc + 36),
3412 *(GLint *) (pc + 40),
3413 *(GLint *) (pc + 44),
3414 *(GLsizei *) (pc + 48),
3415 *(GLsizei *) (pc + 52),
3416 *(GLsizei *) (pc + 56),
3417 *(GLint *) (pc + 64),
3418 *(GLenum *) (pc + 68), *(GLenum *) (pc + 72), pixels);
3419}
3420
3421void
3422__glXDisp_TexSubImage3D(GLbyte * pc)
3423{
3424 const GLvoid *const pixels = (const GLvoid *) ((pc + 88));
3425 __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc);
3426
3427 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
3428 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
3429 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
3430 glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight);
3431 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
3432 glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages);
3433 glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
3434 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
3435
3436 glTexSubImage3D(*(GLenum *) (pc + 36),
3437 *(GLint *) (pc + 40),
3438 *(GLint *) (pc + 44),
3439 *(GLint *) (pc + 48),
3440 *(GLint *) (pc + 52),
3441 *(GLsizei *) (pc + 60),
3442 *(GLsizei *) (pc + 64),
3443 *(GLsizei *) (pc + 68),
3444 *(GLenum *) (pc + 76), *(GLenum *) (pc + 80), pixels);
3445}
3446
3447void
3448__glXDisp_CopyTexSubImage3D(GLbyte * pc)
3449{
3450 glCopyTexSubImage3D(*(GLenum *) (pc + 0),
3451 *(GLint *) (pc + 4),
3452 *(GLint *) (pc + 8),
3453 *(GLint *) (pc + 12),
3454 *(GLint *) (pc + 16),
3455 *(GLint *) (pc + 20),
3456 *(GLint *) (pc + 24),
3457 *(GLsizei *) (pc + 28), *(GLsizei *) (pc + 32));
3458}
3459
3460void
3461__glXDisp_ActiveTexture(GLbyte * pc)
3462{
3463 glActiveTextureARB(*(GLenum *) (pc + 0));
3464}
3465
3466void
3467__glXDisp_MultiTexCoord1dv(GLbyte * pc)
3468{
3469#ifdef __GLX_ALIGN64
3470 if ((unsigned long) (pc) & 7) {
3471 (void) memmove(pc - 4, pc, 12);
3472 pc -= 4;
3473 }
3474#endif
3475
3476 glMultiTexCoord1dvARB(*(GLenum *) (pc + 8), (const GLdouble *) (pc + 0));
3477}
3478
3479void
3480__glXDisp_MultiTexCoord1fvARB(GLbyte * pc)
3481{
3482 glMultiTexCoord1fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
3483}
3484
3485void
3486__glXDisp_MultiTexCoord1iv(GLbyte * pc)
3487{
3488 glMultiTexCoord1ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
3489}
3490
3491void
3492__glXDisp_MultiTexCoord1sv(GLbyte * pc)
3493{
3494 glMultiTexCoord1svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
3495}
3496
3497void
3498__glXDisp_MultiTexCoord2dv(GLbyte * pc)
3499{
3500#ifdef __GLX_ALIGN64
3501 if ((unsigned long) (pc) & 7) {
3502 (void) memmove(pc - 4, pc, 20);
3503 pc -= 4;
3504 }
3505#endif
3506
3507 glMultiTexCoord2dvARB(*(GLenum *) (pc + 16), (const GLdouble *) (pc + 0));
3508}
3509
3510void
3511__glXDisp_MultiTexCoord2fvARB(GLbyte * pc)
3512{
3513 glMultiTexCoord2fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
3514}
3515
3516void
3517__glXDisp_MultiTexCoord2iv(GLbyte * pc)
3518{
3519 glMultiTexCoord2ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
3520}
3521
3522void
3523__glXDisp_MultiTexCoord2sv(GLbyte * pc)
3524{
3525 glMultiTexCoord2svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
3526}
3527
3528void
3529__glXDisp_MultiTexCoord3dv(GLbyte * pc)
3530{
3531#ifdef __GLX_ALIGN64
3532 if ((unsigned long) (pc) & 7) {
3533 (void) memmove(pc - 4, pc, 28);
3534 pc -= 4;
3535 }
3536#endif
3537
3538 glMultiTexCoord3dvARB(*(GLenum *) (pc + 24), (const GLdouble *) (pc + 0));
3539}
3540
3541void
3542__glXDisp_MultiTexCoord3fvARB(GLbyte * pc)
3543{
3544 glMultiTexCoord3fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
3545}
3546
3547void
3548__glXDisp_MultiTexCoord3iv(GLbyte * pc)
3549{
3550 glMultiTexCoord3ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
3551}
3552
3553void
3554__glXDisp_MultiTexCoord3sv(GLbyte * pc)
3555{
3556 glMultiTexCoord3svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
3557}
3558
3559void
3560__glXDisp_MultiTexCoord4dv(GLbyte * pc)
3561{
3562#ifdef __GLX_ALIGN64
3563 if ((unsigned long) (pc) & 7) {
3564 (void) memmove(pc - 4, pc, 36);
3565 pc -= 4;
3566 }
3567#endif
3568
3569 glMultiTexCoord4dvARB(*(GLenum *) (pc + 32), (const GLdouble *) (pc + 0));
3570}
3571
3572void
3573__glXDisp_MultiTexCoord4fvARB(GLbyte * pc)
3574{
3575 glMultiTexCoord4fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
3576}
3577
3578void
3579__glXDisp_MultiTexCoord4iv(GLbyte * pc)
3580{
3581 glMultiTexCoord4ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
3582}
3583
3584void
3585__glXDisp_MultiTexCoord4sv(GLbyte * pc)
3586{
3587 glMultiTexCoord4svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
3588}
3589
3590void
3591__glXDisp_CompressedTexImage1D(GLbyte * pc)
3592{
3593 PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D =
3594 __glGetProcAddress("glCompressedTexImage1D");
3595 const GLsizei imageSize = *(GLsizei *) (pc + 20);
3596
3597 CompressedTexImage1D(*(GLenum *) (pc + 0),
3598 *(GLint *) (pc + 4),
3599 *(GLenum *) (pc + 8),
3600 *(GLsizei *) (pc + 12),
3601 *(GLint *) (pc + 16),
3602 imageSize, (const GLvoid *) (pc + 24));
3603}
3604
3605void
3606__glXDisp_CompressedTexImage2D(GLbyte * pc)
3607{
3608 PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D =
3609 __glGetProcAddress("glCompressedTexImage2D");
3610 const GLsizei imageSize = *(GLsizei *) (pc + 24);
3611
3612 CompressedTexImage2D(*(GLenum *) (pc + 0),
3613 *(GLint *) (pc + 4),
3614 *(GLenum *) (pc + 8),
3615 *(GLsizei *) (pc + 12),
3616 *(GLsizei *) (pc + 16),
3617 *(GLint *) (pc + 20),
3618 imageSize, (const GLvoid *) (pc + 28));
3619}
3620
3621void
3622__glXDisp_CompressedTexImage3D(GLbyte * pc)
3623{
3624 PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D =
3625 __glGetProcAddress("glCompressedTexImage3D");
3626 const GLsizei imageSize = *(GLsizei *) (pc + 28);
3627
3628 CompressedTexImage3D(*(GLenum *) (pc + 0),
3629 *(GLint *) (pc + 4),
3630 *(GLenum *) (pc + 8),
3631 *(GLsizei *) (pc + 12),
3632 *(GLsizei *) (pc + 16),
3633 *(GLsizei *) (pc + 20),
3634 *(GLint *) (pc + 24),
3635 imageSize, (const GLvoid *) (pc + 32));
3636}
3637
3638void
3639__glXDisp_CompressedTexSubImage1D(GLbyte * pc)
3640{
3641 PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D =
3642 __glGetProcAddress("glCompressedTexSubImage1D");
3643 const GLsizei imageSize = *(GLsizei *) (pc + 20);
3644
3645 CompressedTexSubImage1D(*(GLenum *) (pc + 0),
3646 *(GLint *) (pc + 4),
3647 *(GLint *) (pc + 8),
3648 *(GLsizei *) (pc + 12),
3649 *(GLenum *) (pc + 16),
3650 imageSize, (const GLvoid *) (pc + 24));
3651}
3652
3653void
3654__glXDisp_CompressedTexSubImage2D(GLbyte * pc)
3655{
3656 PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D =
3657 __glGetProcAddress("glCompressedTexSubImage2D");
3658 const GLsizei imageSize = *(GLsizei *) (pc + 28);
3659
3660 CompressedTexSubImage2D(*(GLenum *) (pc + 0),
3661 *(GLint *) (pc + 4),
3662 *(GLint *) (pc + 8),
3663 *(GLint *) (pc + 12),
3664 *(GLsizei *) (pc + 16),
3665 *(GLsizei *) (pc + 20),
3666 *(GLenum *) (pc + 24),
3667 imageSize, (const GLvoid *) (pc + 32));
3668}
3669
3670void
3671__glXDisp_CompressedTexSubImage3D(GLbyte * pc)
3672{
3673 PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D =
3674 __glGetProcAddress("glCompressedTexSubImage3D");
3675 const GLsizei imageSize = *(GLsizei *) (pc + 36);
3676
3677 CompressedTexSubImage3D(*(GLenum *) (pc + 0),
3678 *(GLint *) (pc + 4),
3679 *(GLint *) (pc + 8),
3680 *(GLint *) (pc + 12),
3681 *(GLint *) (pc + 16),
3682 *(GLsizei *) (pc + 20),
3683 *(GLsizei *) (pc + 24),
3684 *(GLsizei *) (pc + 28),
3685 *(GLenum *) (pc + 32),
3686 imageSize, (const GLvoid *) (pc + 40));
3687}
3688
3689void
3690__glXDisp_SampleCoverage(GLbyte * pc)
3691{
3692 PFNGLSAMPLECOVERAGEPROC SampleCoverage =
3693 __glGetProcAddress("glSampleCoverage");
3694 SampleCoverage(*(GLclampf *) (pc + 0), *(GLboolean *) (pc + 4));
3695}
3696
3697void
3698__glXDisp_BlendFuncSeparate(GLbyte * pc)
3699{
3700 PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate =
3701 __glGetProcAddress("glBlendFuncSeparate");
3702 BlendFuncSeparate(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
3703 *(GLenum *) (pc + 8), *(GLenum *) (pc + 12));
3704}
3705
3706void
3707__glXDisp_FogCoorddv(GLbyte * pc)
3708{
3709 PFNGLFOGCOORDDVPROC FogCoorddv = __glGetProcAddress("glFogCoorddv");
3710
3711#ifdef __GLX_ALIGN64
3712 if ((unsigned long) (pc) & 7) {
3713 (void) memmove(pc - 4, pc, 8);
3714 pc -= 4;
3715 }
3716#endif
3717
3718 FogCoorddv((const GLdouble *) (pc + 0));
3719}
3720
3721void
3722__glXDisp_PointParameterf(GLbyte * pc)
3723{
3724 PFNGLPOINTPARAMETERFPROC PointParameterf =
3725 __glGetProcAddress("glPointParameterf");
3726 PointParameterf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
3727}
3728
3729void
3730__glXDisp_PointParameterfv(GLbyte * pc)
3731{
3732 PFNGLPOINTPARAMETERFVPROC PointParameterfv =
3733 __glGetProcAddress("glPointParameterfv");
3734 const GLenum pname = *(GLenum *) (pc + 0);
3735 const GLfloat *params;
3736
3737 params = (const GLfloat *) (pc + 4);
3738
3739 PointParameterfv(pname, params);
3740}
3741
3742void
3743__glXDisp_PointParameteri(GLbyte * pc)
3744{
3745 PFNGLPOINTPARAMETERIPROC PointParameteri =
3746 __glGetProcAddress("glPointParameteri");
3747 PointParameteri(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
3748}
3749
3750void
3751__glXDisp_PointParameteriv(GLbyte * pc)
3752{
3753 PFNGLPOINTPARAMETERIVPROC PointParameteriv =
3754 __glGetProcAddress("glPointParameteriv");
3755 const GLenum pname = *(GLenum *) (pc + 0);
3756 const GLint *params;
3757
3758 params = (const GLint *) (pc + 4);
3759
3760 PointParameteriv(pname, params);
3761}
3762
3763void
3764__glXDisp_SecondaryColor3bv(GLbyte * pc)
3765{
3766 PFNGLSECONDARYCOLOR3BVPROC SecondaryColor3bv =
3767 __glGetProcAddress("glSecondaryColor3bv");
3768 SecondaryColor3bv((const GLbyte *) (pc + 0));
3769}
3770
3771void
3772__glXDisp_SecondaryColor3dv(GLbyte * pc)
3773{
3774 PFNGLSECONDARYCOLOR3DVPROC SecondaryColor3dv =
3775 __glGetProcAddress("glSecondaryColor3dv");
3776#ifdef __GLX_ALIGN64
3777 if ((unsigned long) (pc) & 7) {
3778 (void) memmove(pc - 4, pc, 24);
3779 pc -= 4;
3780 }
3781#endif
3782
3783 SecondaryColor3dv((const GLdouble *) (pc + 0));
3784}
3785
3786void
3787__glXDisp_SecondaryColor3iv(GLbyte * pc)
3788{
3789 PFNGLSECONDARYCOLOR3IVPROC SecondaryColor3iv =
3790 __glGetProcAddress("glSecondaryColor3iv");
3791 SecondaryColor3iv((const GLint *) (pc + 0));
3792}
3793
3794void
3795__glXDisp_SecondaryColor3sv(GLbyte * pc)
3796{
3797 PFNGLSECONDARYCOLOR3SVPROC SecondaryColor3sv =
3798 __glGetProcAddress("glSecondaryColor3sv");
3799 SecondaryColor3sv((const GLshort *) (pc + 0));
3800}
3801
3802void
3803__glXDisp_SecondaryColor3ubv(GLbyte * pc)
3804{
3805 PFNGLSECONDARYCOLOR3UBVPROC SecondaryColor3ubv =
3806 __glGetProcAddress("glSecondaryColor3ubv");
3807 SecondaryColor3ubv((const GLubyte *) (pc + 0));
3808}
3809
3810void
3811__glXDisp_SecondaryColor3uiv(GLbyte * pc)
3812{
3813 PFNGLSECONDARYCOLOR3UIVPROC SecondaryColor3uiv =
3814 __glGetProcAddress("glSecondaryColor3uiv");
3815 SecondaryColor3uiv((const GLuint *) (pc + 0));
3816}
3817
3818void
3819__glXDisp_SecondaryColor3usv(GLbyte * pc)
3820{
3821 PFNGLSECONDARYCOLOR3USVPROC SecondaryColor3usv =
3822 __glGetProcAddress("glSecondaryColor3usv");
3823 SecondaryColor3usv((const GLushort *) (pc + 0));
3824}
3825
3826void
3827__glXDisp_WindowPos3fv(GLbyte * pc)
3828{
3829 PFNGLWINDOWPOS3FVPROC WindowPos3fv = __glGetProcAddress("glWindowPos3fv");
3830
3831 WindowPos3fv((const GLfloat *) (pc + 0));
3832}
3833
3834void
3835__glXDisp_BeginQuery(GLbyte * pc)
3836{
3837 PFNGLBEGINQUERYPROC BeginQuery = __glGetProcAddress("glBeginQuery");
3838
3839 BeginQuery(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
3840}
3841
3842int
3843__glXDisp_DeleteQueries(__GLXclientState * cl, GLbyte * pc)
3844{
3845 PFNGLDELETEQUERIESPROC DeleteQueries =
3846 __glGetProcAddress("glDeleteQueries");
3847 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3848 int error;
3849 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3850
3851 pc += __GLX_SINGLE_HDR_SIZE;
3852 if (cx != NULL) {
3853 const GLsizei n = *(GLsizei *) (pc + 0);
3854
3855 DeleteQueries(n, (const GLuint *) (pc + 4));
3856 error = Success;
3857 }
3858
3859 return error;
3860}
3861
3862void
3863__glXDisp_EndQuery(GLbyte * pc)
3864{
3865 PFNGLENDQUERYPROC EndQuery = __glGetProcAddress("glEndQuery");
3866
3867 EndQuery(*(GLenum *) (pc + 0));
3868}
3869
3870int
3871__glXDisp_GenQueries(__GLXclientState * cl, GLbyte * pc)
3872{
3873 PFNGLGENQUERIESPROC GenQueries = __glGetProcAddress("glGenQueries");
3874 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3875 int error;
3876 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3877
3878 pc += __GLX_SINGLE_HDR_SIZE;
3879 if (cx != NULL) {
3880 const GLsizei n = *(GLsizei *) (pc + 0);
3881
3882 GLuint answerBuffer[200];
3883 GLuint *ids =
3884 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
3885 4);
3886 GenQueries(n, ids);
3887 __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0);
3888 error = Success;
3889 }
3890
3891 return error;
3892}
3893
3894int
3895__glXDisp_GetQueryObjectiv(__GLXclientState * cl, GLbyte * pc)
3896{
3897 PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv =
3898 __glGetProcAddress("glGetQueryObjectiv");
3899 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3900 int error;
3901 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3902
3903 pc += __GLX_SINGLE_HDR_SIZE;
3904 if (cx != NULL) {
3905 const GLenum pname = *(GLenum *) (pc + 4);
3906
3907 const GLuint compsize = __glGetQueryObjectiv_size(pname);
3908 GLint answerBuffer[200];
3909 GLint *params =
3910 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3911 sizeof(answerBuffer), 4);
3912
3913 if (params == NULL)
3914 return BadAlloc;
3915 __glXClearErrorOccured();
3916
3917 GetQueryObjectiv(*(GLuint *) (pc + 0), pname, params);
3918 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3919 error = Success;
3920 }
3921
3922 return error;
3923}
3924
3925int
3926__glXDisp_GetQueryObjectuiv(__GLXclientState * cl, GLbyte * pc)
3927{
3928 PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv =
3929 __glGetProcAddress("glGetQueryObjectuiv");
3930 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3931 int error;
3932 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3933
3934 pc += __GLX_SINGLE_HDR_SIZE;
3935 if (cx != NULL) {
3936 const GLenum pname = *(GLenum *) (pc + 4);
3937
3938 const GLuint compsize = __glGetQueryObjectuiv_size(pname);
3939 GLuint answerBuffer[200];
3940 GLuint *params =
3941 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3942 sizeof(answerBuffer), 4);
3943
3944 if (params == NULL)
3945 return BadAlloc;
3946 __glXClearErrorOccured();
3947
3948 GetQueryObjectuiv(*(GLuint *) (pc + 0), pname, params);
3949 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3950 error = Success;
3951 }
3952
3953 return error;
3954}
3955
3956int
3957__glXDisp_GetQueryiv(__GLXclientState * cl, GLbyte * pc)
3958{
3959 PFNGLGETQUERYIVPROC GetQueryiv = __glGetProcAddress("glGetQueryiv");
3960 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3961 int error;
3962 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3963
3964 pc += __GLX_SINGLE_HDR_SIZE;
3965 if (cx != NULL) {
3966 const GLenum pname = *(GLenum *) (pc + 4);
3967
3968 const GLuint compsize = __glGetQueryiv_size(pname);
3969 GLint answerBuffer[200];
3970 GLint *params =
3971 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3972 sizeof(answerBuffer), 4);
3973
3974 if (params == NULL)
3975 return BadAlloc;
3976 __glXClearErrorOccured();
3977
3978 GetQueryiv(*(GLenum *) (pc + 0), pname, params);
3979 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
3980 error = Success;
3981 }
3982
3983 return error;
3984}
3985
3986int
3987__glXDisp_IsQuery(__GLXclientState * cl, GLbyte * pc)
3988{
3989 PFNGLISQUERYPROC IsQuery = __glGetProcAddress("glIsQuery");
3990 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3991 int error;
3992 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
3993
3994 pc += __GLX_SINGLE_HDR_SIZE;
3995 if (cx != NULL) {
3996 GLboolean retval;
3997
3998 retval = IsQuery(*(GLuint *) (pc + 0));
3999 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
4000 error = Success;
4001 }
4002
4003 return error;
4004}
4005
4006void
4007__glXDisp_BlendEquationSeparate(GLbyte * pc)
4008{
4009 PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate =
4010 __glGetProcAddress("glBlendEquationSeparate");
4011 BlendEquationSeparate(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
4012}
4013
4014void
4015__glXDisp_DrawBuffers(GLbyte * pc)
4016{
4017 PFNGLDRAWBUFFERSPROC DrawBuffers = __glGetProcAddress("glDrawBuffers");
4018 const GLsizei n = *(GLsizei *) (pc + 0);
4019
4020 DrawBuffers(n, (const GLenum *) (pc + 4));
4021}
4022
4023void
4024__glXDisp_VertexAttrib1dv(GLbyte * pc)
4025{
4026 PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv =
4027 __glGetProcAddress("glVertexAttrib1dv");
4028#ifdef __GLX_ALIGN64
4029 if ((unsigned long) (pc) & 7) {
4030 (void) memmove(pc - 4, pc, 12);
4031 pc -= 4;
4032 }
4033#endif
4034
4035 VertexAttrib1dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
4036}
4037
4038void
4039__glXDisp_VertexAttrib1sv(GLbyte * pc)
4040{
4041 PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv =
4042 __glGetProcAddress("glVertexAttrib1sv");
4043 VertexAttrib1sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4044}
4045
4046void
4047__glXDisp_VertexAttrib2dv(GLbyte * pc)
4048{
4049 PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv =
4050 __glGetProcAddress("glVertexAttrib2dv");
4051#ifdef __GLX_ALIGN64
4052 if ((unsigned long) (pc) & 7) {
4053 (void) memmove(pc - 4, pc, 20);
4054 pc -= 4;
4055 }
4056#endif
4057
4058 VertexAttrib2dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
4059}
4060
4061void
4062__glXDisp_VertexAttrib2sv(GLbyte * pc)
4063{
4064 PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv =
4065 __glGetProcAddress("glVertexAttrib2sv");
4066 VertexAttrib2sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4067}
4068
4069void
4070__glXDisp_VertexAttrib3dv(GLbyte * pc)
4071{
4072 PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv =
4073 __glGetProcAddress("glVertexAttrib3dv");
4074#ifdef __GLX_ALIGN64
4075 if ((unsigned long) (pc) & 7) {
4076 (void) memmove(pc - 4, pc, 28);
4077 pc -= 4;
4078 }
4079#endif
4080
4081 VertexAttrib3dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
4082}
4083
4084void
4085__glXDisp_VertexAttrib3sv(GLbyte * pc)
4086{
4087 PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv =
4088 __glGetProcAddress("glVertexAttrib3sv");
4089 VertexAttrib3sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4090}
4091
4092void
4093__glXDisp_VertexAttrib4Nbv(GLbyte * pc)
4094{
4095 PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv =
4096 __glGetProcAddress("glVertexAttrib4Nbv");
4097 VertexAttrib4Nbv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4));
4098}
4099
4100void
4101__glXDisp_VertexAttrib4Niv(GLbyte * pc)
4102{
4103 PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv =
4104 __glGetProcAddress("glVertexAttrib4Niv");
4105 VertexAttrib4Niv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4));
4106}
4107
4108void
4109__glXDisp_VertexAttrib4Nsv(GLbyte * pc)
4110{
4111 PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv =
4112 __glGetProcAddress("glVertexAttrib4Nsv");
4113 VertexAttrib4Nsv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4114}
4115
4116void
4117__glXDisp_VertexAttrib4Nubv(GLbyte * pc)
4118{
4119 PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv =
4120 __glGetProcAddress("glVertexAttrib4Nubv");
4121 VertexAttrib4Nubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4));
4122}
4123
4124void
4125__glXDisp_VertexAttrib4Nuiv(GLbyte * pc)
4126{
4127 PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv =
4128 __glGetProcAddress("glVertexAttrib4Nuiv");
4129 VertexAttrib4Nuiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4));
4130}
4131
4132void
4133__glXDisp_VertexAttrib4Nusv(GLbyte * pc)
4134{
4135 PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv =
4136 __glGetProcAddress("glVertexAttrib4Nusv");
4137 VertexAttrib4Nusv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4));
4138}
4139
4140void
4141__glXDisp_VertexAttrib4bv(GLbyte * pc)
4142{
4143 PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv =
4144 __glGetProcAddress("glVertexAttrib4bv");
4145 VertexAttrib4bv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4));
4146}
4147
4148void
4149__glXDisp_VertexAttrib4dv(GLbyte * pc)
4150{
4151 PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv =
4152 __glGetProcAddress("glVertexAttrib4dv");
4153#ifdef __GLX_ALIGN64
4154 if ((unsigned long) (pc) & 7) {
4155 (void) memmove(pc - 4, pc, 36);
4156 pc -= 4;
4157 }
4158#endif
4159
4160 VertexAttrib4dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
4161}
4162
4163void
4164__glXDisp_VertexAttrib4iv(GLbyte * pc)
4165{
4166 PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv =
4167 __glGetProcAddress("glVertexAttrib4iv");
4168 VertexAttrib4iv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4));
4169}
4170
4171void
4172__glXDisp_VertexAttrib4sv(GLbyte * pc)
4173{
4174 PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv =
4175 __glGetProcAddress("glVertexAttrib4sv");
4176 VertexAttrib4sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4177}
4178
4179void
4180__glXDisp_VertexAttrib4ubv(GLbyte * pc)
4181{
4182 PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv =
4183 __glGetProcAddress("glVertexAttrib4ubv");
4184 VertexAttrib4ubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4));
4185}
4186
4187void
4188__glXDisp_VertexAttrib4uiv(GLbyte * pc)
4189{
4190 PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv =
4191 __glGetProcAddress("glVertexAttrib4uiv");
4192 VertexAttrib4uiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4));
4193}
4194
4195void
4196__glXDisp_VertexAttrib4usv(GLbyte * pc)
4197{
4198 PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv =
4199 __glGetProcAddress("glVertexAttrib4usv");
4200 VertexAttrib4usv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4));
4201}
4202
4203void
4204__glXDisp_ClampColor(GLbyte * pc)
4205{
4206 PFNGLCLAMPCOLORPROC ClampColor = __glGetProcAddress("glClampColor");
4207
4208 ClampColor(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
4209}
4210
4211void
4212__glXDisp_BindProgramARB(GLbyte * pc)
4213{
4214 PFNGLBINDPROGRAMARBPROC BindProgramARB =
4215 __glGetProcAddress("glBindProgramARB");
4216 BindProgramARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
4217}
4218
4219int
4220__glXDisp_DeleteProgramsARB(__GLXclientState * cl, GLbyte * pc)
4221{
4222 PFNGLDELETEPROGRAMSARBPROC DeleteProgramsARB =
4223 __glGetProcAddress("glDeleteProgramsARB");
4224 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4225 int error;
4226 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4227
4228 pc += __GLX_VENDPRIV_HDR_SIZE;
4229 if (cx != NULL) {
4230 const GLsizei n = *(GLsizei *) (pc + 0);
4231
4232 DeleteProgramsARB(n, (const GLuint *) (pc + 4));
4233 error = Success;
4234 }
4235
4236 return error;
4237}
4238
4239int
4240__glXDisp_GenProgramsARB(__GLXclientState * cl, GLbyte * pc)
4241{
4242 PFNGLGENPROGRAMSARBPROC GenProgramsARB =
4243 __glGetProcAddress("glGenProgramsARB");
4244 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4245 int error;
4246 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4247
4248 pc += __GLX_VENDPRIV_HDR_SIZE;
4249 if (cx != NULL) {
4250 const GLsizei n = *(GLsizei *) (pc + 0);
4251
4252 GLuint answerBuffer[200];
4253 GLuint *programs =
4254 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
4255 4);
4256 GenProgramsARB(n, programs);
4257 __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0);
4258 error = Success;
4259 }
4260
4261 return error;
4262}
4263
4264int
4265__glXDisp_GetProgramEnvParameterdvARB(__GLXclientState * cl, GLbyte * pc)
4266{
4267 PFNGLGETPROGRAMENVPARAMETERDVARBPROC GetProgramEnvParameterdvARB =
4268 __glGetProcAddress("glGetProgramEnvParameterdvARB");
4269 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4270 int error;
4271 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4272
4273 pc += __GLX_VENDPRIV_HDR_SIZE;
4274 if (cx != NULL) {
4275 GLdouble params[4];
4276
4277 GetProgramEnvParameterdvARB(*(GLenum *) (pc + 0),
4278 *(GLuint *) (pc + 4), params);
4279 __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
4280 error = Success;
4281 }
4282
4283 return error;
4284}
4285
4286int
4287__glXDisp_GetProgramEnvParameterfvARB(__GLXclientState * cl, GLbyte * pc)
4288{
4289 PFNGLGETPROGRAMENVPARAMETERFVARBPROC GetProgramEnvParameterfvARB =
4290 __glGetProcAddress("glGetProgramEnvParameterfvARB");
4291 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4292 int error;
4293 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4294
4295 pc += __GLX_VENDPRIV_HDR_SIZE;
4296 if (cx != NULL) {
4297 GLfloat params[4];
4298
4299 GetProgramEnvParameterfvARB(*(GLenum *) (pc + 0),
4300 *(GLuint *) (pc + 4), params);
4301 __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
4302 error = Success;
4303 }
4304
4305 return error;
4306}
4307
4308int
4309__glXDisp_GetProgramLocalParameterdvARB(__GLXclientState * cl, GLbyte * pc)
4310{
4311 PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC GetProgramLocalParameterdvARB =
4312 __glGetProcAddress("glGetProgramLocalParameterdvARB");
4313 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4314 int error;
4315 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4316
4317 pc += __GLX_VENDPRIV_HDR_SIZE;
4318 if (cx != NULL) {
4319 GLdouble params[4];
4320
4321 GetProgramLocalParameterdvARB(*(GLenum *) (pc + 0),
4322 *(GLuint *) (pc + 4), params);
4323 __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
4324 error = Success;
4325 }
4326
4327 return error;
4328}
4329
4330int
4331__glXDisp_GetProgramLocalParameterfvARB(__GLXclientState * cl, GLbyte * pc)
4332{
4333 PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC GetProgramLocalParameterfvARB =
4334 __glGetProcAddress("glGetProgramLocalParameterfvARB");
4335 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4336 int error;
4337 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4338
4339 pc += __GLX_VENDPRIV_HDR_SIZE;
4340 if (cx != NULL) {
4341 GLfloat params[4];
4342
4343 GetProgramLocalParameterfvARB(*(GLenum *) (pc + 0),
4344 *(GLuint *) (pc + 4), params);
4345 __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
4346 error = Success;
4347 }
4348
4349 return error;
4350}
4351
4352int
4353__glXDisp_GetProgramivARB(__GLXclientState * cl, GLbyte * pc)
4354{
4355 PFNGLGETPROGRAMIVARBPROC GetProgramivARB =
4356 __glGetProcAddress("glGetProgramivARB");
4357 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4358 int error;
4359 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4360
4361 pc += __GLX_VENDPRIV_HDR_SIZE;
4362 if (cx != NULL) {
4363 const GLenum pname = *(GLenum *) (pc + 4);
4364
4365 const GLuint compsize = __glGetProgramivARB_size(pname);
4366 GLint answerBuffer[200];
4367 GLint *params =
4368 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
4369 sizeof(answerBuffer), 4);
4370
4371 if (params == NULL)
4372 return BadAlloc;
4373 __glXClearErrorOccured();
4374
4375 GetProgramivARB(*(GLenum *) (pc + 0), pname, params);
4376 __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
4377 error = Success;
4378 }
4379
4380 return error;
4381}
4382
4383int
4384__glXDisp_IsProgramARB(__GLXclientState * cl, GLbyte * pc)
4385{
4386 PFNGLISPROGRAMARBPROC IsProgramARB = __glGetProcAddress("glIsProgramARB");
4387 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4388 int error;
4389 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4390
4391 pc += __GLX_VENDPRIV_HDR_SIZE;
4392 if (cx != NULL) {
4393 GLboolean retval;
4394
4395 retval = IsProgramARB(*(GLuint *) (pc + 0));
4396 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
4397 error = Success;
4398 }
4399
4400 return error;
4401}
4402
4403void
4404__glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc)
4405{
4406 PFNGLPROGRAMENVPARAMETER4DVARBPROC ProgramEnvParameter4dvARB =
4407 __glGetProcAddress("glProgramEnvParameter4dvARB");
4408#ifdef __GLX_ALIGN64
4409 if ((unsigned long) (pc) & 7) {
4410 (void) memmove(pc - 4, pc, 40);
4411 pc -= 4;
4412 }
4413#endif
4414
4415 ProgramEnvParameter4dvARB(*(GLenum *) (pc + 0),
4416 *(GLuint *) (pc + 4),
4417 (const GLdouble *) (pc + 8));
4418}
4419
4420void
4421__glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc)
4422{
4423 PFNGLPROGRAMENVPARAMETER4FVARBPROC ProgramEnvParameter4fvARB =
4424 __glGetProcAddress("glProgramEnvParameter4fvARB");
4425 ProgramEnvParameter4fvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4),
4426 (const GLfloat *) (pc + 8));
4427}
4428
4429void
4430__glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc)
4431{
4432 PFNGLPROGRAMLOCALPARAMETER4DVARBPROC ProgramLocalParameter4dvARB =
4433 __glGetProcAddress("glProgramLocalParameter4dvARB");
4434#ifdef __GLX_ALIGN64
4435 if ((unsigned long) (pc) & 7) {
4436 (void) memmove(pc - 4, pc, 40);
4437 pc -= 4;
4438 }
4439#endif
4440
4441 ProgramLocalParameter4dvARB(*(GLenum *) (pc + 0),
4442 *(GLuint *) (pc + 4),
4443 (const GLdouble *) (pc + 8));
4444}
4445
4446void
4447__glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc)
4448{
4449 PFNGLPROGRAMLOCALPARAMETER4FVARBPROC ProgramLocalParameter4fvARB =
4450 __glGetProcAddress("glProgramLocalParameter4fvARB");
4451 ProgramLocalParameter4fvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4),
4452 (const GLfloat *) (pc + 8));
4453}
4454
4455void
4456__glXDisp_ProgramStringARB(GLbyte * pc)
4457{
4458 PFNGLPROGRAMSTRINGARBPROC ProgramStringARB =
4459 __glGetProcAddress("glProgramStringARB");
4460 const GLsizei len = *(GLsizei *) (pc + 8);
4461
4462 ProgramStringARB(*(GLenum *) (pc + 0),
4463 *(GLenum *) (pc + 4), len, (const GLvoid *) (pc + 12));
4464}
4465
4466void
4467__glXDisp_VertexAttrib1fvARB(GLbyte * pc)
4468{
4469 PFNGLVERTEXATTRIB1FVARBPROC VertexAttrib1fvARB =
4470 __glGetProcAddress("glVertexAttrib1fvARB");
4471 VertexAttrib1fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4472}
4473
4474void
4475__glXDisp_VertexAttrib2fvARB(GLbyte * pc)
4476{
4477 PFNGLVERTEXATTRIB2FVARBPROC VertexAttrib2fvARB =
4478 __glGetProcAddress("glVertexAttrib2fvARB");
4479 VertexAttrib2fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4480}
4481
4482void
4483__glXDisp_VertexAttrib3fvARB(GLbyte * pc)
4484{
4485 PFNGLVERTEXATTRIB3FVARBPROC VertexAttrib3fvARB =
4486 __glGetProcAddress("glVertexAttrib3fvARB");
4487 VertexAttrib3fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4488}
4489
4490void
4491__glXDisp_VertexAttrib4fvARB(GLbyte * pc)
4492{
4493 PFNGLVERTEXATTRIB4FVARBPROC VertexAttrib4fvARB =
4494 __glGetProcAddress("glVertexAttrib4fvARB");
4495 VertexAttrib4fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4496}
4497
4498void
4499__glXDisp_BindFramebuffer(GLbyte * pc)
4500{
4501 PFNGLBINDFRAMEBUFFERPROC BindFramebuffer =
4502 __glGetProcAddress("glBindFramebuffer");
4503 BindFramebuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
4504}
4505
4506void
4507__glXDisp_BindRenderbuffer(GLbyte * pc)
4508{
4509 PFNGLBINDRENDERBUFFERPROC BindRenderbuffer =
4510 __glGetProcAddress("glBindRenderbuffer");
4511 BindRenderbuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
4512}
4513
4514void
4515__glXDisp_BlitFramebuffer(GLbyte * pc)
4516{
4517 PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer =
4518 __glGetProcAddress("glBlitFramebuffer");
4519 BlitFramebuffer(*(GLint *) (pc + 0), *(GLint *) (pc + 4),
4520 *(GLint *) (pc + 8), *(GLint *) (pc + 12),
4521 *(GLint *) (pc + 16), *(GLint *) (pc + 20),
4522 *(GLint *) (pc + 24), *(GLint *) (pc + 28),
4523 *(GLbitfield *) (pc + 32), *(GLenum *) (pc + 36));
4524}
4525
4526int
4527__glXDisp_CheckFramebufferStatus(__GLXclientState * cl, GLbyte * pc)
4528{
4529 PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus =
4530 __glGetProcAddress("glCheckFramebufferStatus");
4531 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4532 int error;
4533 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4534
4535 pc += __GLX_VENDPRIV_HDR_SIZE;
4536 if (cx != NULL) {
4537 GLenum retval;
4538
4539 retval = CheckFramebufferStatus(*(GLenum *) (pc + 0));
4540 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
4541 error = Success;
4542 }
4543
4544 return error;
4545}
4546
4547void
4548__glXDisp_DeleteFramebuffers(GLbyte * pc)
4549{
4550 PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers =
4551 __glGetProcAddress("glDeleteFramebuffers");
4552 const GLsizei n = *(GLsizei *) (pc + 0);
4553
4554 DeleteFramebuffers(n, (const GLuint *) (pc + 4));
4555}
4556
4557void
4558__glXDisp_DeleteRenderbuffers(GLbyte * pc)
4559{
4560 PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers =
4561 __glGetProcAddress("glDeleteRenderbuffers");
4562 const GLsizei n = *(GLsizei *) (pc + 0);
4563
4564 DeleteRenderbuffers(n, (const GLuint *) (pc + 4));
4565}
4566
4567void
4568__glXDisp_FramebufferRenderbuffer(GLbyte * pc)
4569{
4570 PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer =
4571 __glGetProcAddress("glFramebufferRenderbuffer");
4572 FramebufferRenderbuffer(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
4573 *(GLenum *) (pc + 8), *(GLuint *) (pc + 12));
4574}
4575
4576void
4577__glXDisp_FramebufferTexture1D(GLbyte * pc)
4578{
4579 PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D =
4580 __glGetProcAddress("glFramebufferTexture1D");
4581 FramebufferTexture1D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
4582 *(GLenum *) (pc + 8), *(GLuint *) (pc + 12),
4583 *(GLint *) (pc + 16));
4584}
4585
4586void
4587__glXDisp_FramebufferTexture2D(GLbyte * pc)
4588{
4589 PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D =
4590 __glGetProcAddress("glFramebufferTexture2D");
4591 FramebufferTexture2D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
4592 *(GLenum *) (pc + 8), *(GLuint *) (pc + 12),
4593 *(GLint *) (pc + 16));
4594}
4595
4596void
4597__glXDisp_FramebufferTexture3D(GLbyte * pc)
4598{
4599 PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D =
4600 __glGetProcAddress("glFramebufferTexture3D");
4601 FramebufferTexture3D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
4602 *(GLenum *) (pc + 8), *(GLuint *) (pc + 12),
4603 *(GLint *) (pc + 16), *(GLint *) (pc + 20));
4604}
4605
4606void
4607__glXDisp_FramebufferTextureLayer(GLbyte * pc)
4608{
4609 PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer =
4610 __glGetProcAddress("glFramebufferTextureLayer");
4611 FramebufferTextureLayer(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
4612 *(GLuint *) (pc + 8), *(GLint *) (pc + 12),
4613 *(GLint *) (pc + 16));
4614}
4615
4616int
4617__glXDisp_GenFramebuffers(__GLXclientState * cl, GLbyte * pc)
4618{
4619 PFNGLGENFRAMEBUFFERSPROC GenFramebuffers =
4620 __glGetProcAddress("glGenFramebuffers");
4621 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4622 int error;
4623 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4624
4625 pc += __GLX_VENDPRIV_HDR_SIZE;
4626 if (cx != NULL) {
4627 const GLsizei n = *(GLsizei *) (pc + 0);
4628
4629 GLuint answerBuffer[200];
4630 GLuint *framebuffers =
4631 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
4632 4);
4633 GenFramebuffers(n, framebuffers);
4634 __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0);
4635 error = Success;
4636 }
4637
4638 return error;
4639}
4640
4641int
4642__glXDisp_GenRenderbuffers(__GLXclientState * cl, GLbyte * pc)
4643{
4644 PFNGLGENRENDERBUFFERSPROC GenRenderbuffers =
4645 __glGetProcAddress("glGenRenderbuffers");
4646 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4647 int error;
4648 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4649
4650 pc += __GLX_VENDPRIV_HDR_SIZE;
4651 if (cx != NULL) {
4652 const GLsizei n = *(GLsizei *) (pc + 0);
4653
4654 GLuint answerBuffer[200];
4655 GLuint *renderbuffers =
4656 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
4657 4);
4658 GenRenderbuffers(n, renderbuffers);
4659 __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
4660 error = Success;
4661 }
4662
4663 return error;
4664}
4665
4666void
4667__glXDisp_GenerateMipmap(GLbyte * pc)
4668{
4669 PFNGLGENERATEMIPMAPPROC GenerateMipmap =
4670 __glGetProcAddress("glGenerateMipmap");
4671 GenerateMipmap(*(GLenum *) (pc + 0));
4672}
4673
4674int
4675__glXDisp_GetFramebufferAttachmentParameteriv(__GLXclientState * cl,
4676 GLbyte * pc)
4677{
4678 PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC
4679 GetFramebufferAttachmentParameteriv =
4680 __glGetProcAddress("glGetFramebufferAttachmentParameteriv");
4681 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4682 int error;
4683 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4684
4685 pc += __GLX_VENDPRIV_HDR_SIZE;
4686 if (cx != NULL) {
4687 GLint params[1];
4688
4689 GetFramebufferAttachmentParameteriv(*(GLenum *) (pc + 0),
4690 *(GLenum *) (pc + 4),
4691 *(GLenum *) (pc + 8), params);
4692 __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
4693 error = Success;
4694 }
4695
4696 return error;
4697}
4698
4699int
4700__glXDisp_GetRenderbufferParameteriv(__GLXclientState * cl, GLbyte * pc)
4701{
4702 PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv =
4703 __glGetProcAddress("glGetRenderbufferParameteriv");
4704 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4705 int error;
4706 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4707
4708 pc += __GLX_VENDPRIV_HDR_SIZE;
4709 if (cx != NULL) {
4710 GLint params[1];
4711
4712 GetRenderbufferParameteriv(*(GLenum *) (pc + 0),
4713 *(GLenum *) (pc + 4), params);
4714 __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
4715 error = Success;
4716 }
4717
4718 return error;
4719}
4720
4721int
4722__glXDisp_IsFramebuffer(__GLXclientState * cl, GLbyte * pc)
4723{
4724 PFNGLISFRAMEBUFFERPROC IsFramebuffer =
4725 __glGetProcAddress("glIsFramebuffer");
4726 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4727 int error;
4728 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4729
4730 pc += __GLX_VENDPRIV_HDR_SIZE;
4731 if (cx != NULL) {
4732 GLboolean retval;
4733
4734 retval = IsFramebuffer(*(GLuint *) (pc + 0));
4735 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
4736 error = Success;
4737 }
4738
4739 return error;
4740}
4741
4742int
4743__glXDisp_IsRenderbuffer(__GLXclientState * cl, GLbyte * pc)
4744{
4745 PFNGLISRENDERBUFFERPROC IsRenderbuffer =
4746 __glGetProcAddress("glIsRenderbuffer");
4747 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4748 int error;
4749 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
4750
4751 pc += __GLX_VENDPRIV_HDR_SIZE;
4752 if (cx != NULL) {
4753 GLboolean retval;
4754
4755 retval = IsRenderbuffer(*(GLuint *) (pc + 0));
4756 __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
4757 error = Success;
4758 }
4759
4760 return error;
4761}
4762
4763void
4764__glXDisp_RenderbufferStorage(GLbyte * pc)
4765{
4766 PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage =
4767 __glGetProcAddress("glRenderbufferStorage");
4768 RenderbufferStorage(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
4769 *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12));
4770}
4771
4772void
4773__glXDisp_RenderbufferStorageMultisample(GLbyte * pc)
4774{
4775 PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample =
4776 __glGetProcAddress("glRenderbufferStorageMultisample");
4777 RenderbufferStorageMultisample(*(GLenum *) (pc + 0), *(GLsizei *) (pc + 4),
4778 *(GLenum *) (pc + 8), *(GLsizei *) (pc + 12),
4779 *(GLsizei *) (pc + 16));
4780}
4781
4782void
4783__glXDisp_SecondaryColor3fvEXT(GLbyte * pc)
4784{
4785 PFNGLSECONDARYCOLOR3FVEXTPROC SecondaryColor3fvEXT =
4786 __glGetProcAddress("glSecondaryColor3fvEXT");
4787 SecondaryColor3fvEXT((const GLfloat *) (pc + 0));
4788}
4789
4790void
4791__glXDisp_FogCoordfvEXT(GLbyte * pc)
4792{
4793 PFNGLFOGCOORDFVEXTPROC FogCoordfvEXT =
4794 __glGetProcAddress("glFogCoordfvEXT");
4795 FogCoordfvEXT((const GLfloat *) (pc + 0));
4796}
4797
4798void
4799__glXDisp_VertexAttrib1dvNV(GLbyte * pc)
4800{
4801 PFNGLVERTEXATTRIB1DVNVPROC VertexAttrib1dvNV =
4802 __glGetProcAddress("glVertexAttrib1dvNV");
4803#ifdef __GLX_ALIGN64
4804 if ((unsigned long) (pc) & 7) {
4805 (void) memmove(pc - 4, pc, 12);
4806 pc -= 4;
4807 }
4808#endif
4809
4810 VertexAttrib1dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
4811}
4812
4813void
4814__glXDisp_VertexAttrib1fvNV(GLbyte * pc)
4815{
4816 PFNGLVERTEXATTRIB1FVNVPROC VertexAttrib1fvNV =
4817 __glGetProcAddress("glVertexAttrib1fvNV");
4818 VertexAttrib1fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4819}
4820
4821void
4822__glXDisp_VertexAttrib1svNV(GLbyte * pc)
4823{
4824 PFNGLVERTEXATTRIB1SVNVPROC VertexAttrib1svNV =
4825 __glGetProcAddress("glVertexAttrib1svNV");
4826 VertexAttrib1svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4827}
4828
4829void
4830__glXDisp_VertexAttrib2dvNV(GLbyte * pc)
4831{
4832 PFNGLVERTEXATTRIB2DVNVPROC VertexAttrib2dvNV =
4833 __glGetProcAddress("glVertexAttrib2dvNV");
4834#ifdef __GLX_ALIGN64
4835 if ((unsigned long) (pc) & 7) {
4836 (void) memmove(pc - 4, pc, 20);
4837 pc -= 4;
4838 }
4839#endif
4840
4841 VertexAttrib2dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
4842}
4843
4844void
4845__glXDisp_VertexAttrib2fvNV(GLbyte * pc)
4846{
4847 PFNGLVERTEXATTRIB2FVNVPROC VertexAttrib2fvNV =
4848 __glGetProcAddress("glVertexAttrib2fvNV");
4849 VertexAttrib2fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4850}
4851
4852void
4853__glXDisp_VertexAttrib2svNV(GLbyte * pc)
4854{
4855 PFNGLVERTEXATTRIB2SVNVPROC VertexAttrib2svNV =
4856 __glGetProcAddress("glVertexAttrib2svNV");
4857 VertexAttrib2svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4858}
4859
4860void
4861__glXDisp_VertexAttrib3dvNV(GLbyte * pc)
4862{
4863 PFNGLVERTEXATTRIB3DVNVPROC VertexAttrib3dvNV =
4864 __glGetProcAddress("glVertexAttrib3dvNV");
4865#ifdef __GLX_ALIGN64
4866 if ((unsigned long) (pc) & 7) {
4867 (void) memmove(pc - 4, pc, 28);
4868 pc -= 4;
4869 }
4870#endif
4871
4872 VertexAttrib3dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
4873}
4874
4875void
4876__glXDisp_VertexAttrib3fvNV(GLbyte * pc)
4877{
4878 PFNGLVERTEXATTRIB3FVNVPROC VertexAttrib3fvNV =
4879 __glGetProcAddress("glVertexAttrib3fvNV");
4880 VertexAttrib3fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4881}
4882
4883void
4884__glXDisp_VertexAttrib3svNV(GLbyte * pc)
4885{
4886 PFNGLVERTEXATTRIB3SVNVPROC VertexAttrib3svNV =
4887 __glGetProcAddress("glVertexAttrib3svNV");
4888 VertexAttrib3svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4889}
4890
4891void
4892__glXDisp_VertexAttrib4dvNV(GLbyte * pc)
4893{
4894 PFNGLVERTEXATTRIB4DVNVPROC VertexAttrib4dvNV =
4895 __glGetProcAddress("glVertexAttrib4dvNV");
4896#ifdef __GLX_ALIGN64
4897 if ((unsigned long) (pc) & 7) {
4898 (void) memmove(pc - 4, pc, 36);
4899 pc -= 4;
4900 }
4901#endif
4902
4903 VertexAttrib4dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
4904}
4905
4906void
4907__glXDisp_VertexAttrib4fvNV(GLbyte * pc)
4908{
4909 PFNGLVERTEXATTRIB4FVNVPROC VertexAttrib4fvNV =
4910 __glGetProcAddress("glVertexAttrib4fvNV");
4911 VertexAttrib4fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4912}
4913
4914void
4915__glXDisp_VertexAttrib4svNV(GLbyte * pc)
4916{
4917 PFNGLVERTEXATTRIB4SVNVPROC VertexAttrib4svNV =
4918 __glGetProcAddress("glVertexAttrib4svNV");
4919 VertexAttrib4svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4920}
4921
4922void
4923__glXDisp_VertexAttrib4ubvNV(GLbyte * pc)
4924{
4925 PFNGLVERTEXATTRIB4UBVNVPROC VertexAttrib4ubvNV =
4926 __glGetProcAddress("glVertexAttrib4ubvNV");
4927 VertexAttrib4ubvNV(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4));
4928}
4929
4930void
4931__glXDisp_VertexAttribs1dvNV(GLbyte * pc)
4932{
4933 PFNGLVERTEXATTRIBS1DVNVPROC VertexAttribs1dvNV =
4934 __glGetProcAddress("glVertexAttribs1dvNV");
4935 const GLsizei n = *(GLsizei *) (pc + 4);
4936
4937#ifdef __GLX_ALIGN64
4938 const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
4939
4940 if ((unsigned long) (pc) & 7) {
4941 (void) memmove(pc - 4, pc, cmdlen);
4942 pc -= 4;
4943 }
4944#endif
4945
4946 VertexAttribs1dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8));
4947}
4948
4949void
4950__glXDisp_VertexAttribs1fvNV(GLbyte * pc)
4951{
4952 PFNGLVERTEXATTRIBS1FVNVPROC VertexAttribs1fvNV =
4953 __glGetProcAddress("glVertexAttribs1fvNV");
4954 const GLsizei n = *(GLsizei *) (pc + 4);
4955
4956 VertexAttribs1fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8));
4957}
4958
4959void
4960__glXDisp_VertexAttribs1svNV(GLbyte * pc)
4961{
4962 PFNGLVERTEXATTRIBS1SVNVPROC VertexAttribs1svNV =
4963 __glGetProcAddress("glVertexAttribs1svNV");
4964 const GLsizei n = *(GLsizei *) (pc + 4);
4965
4966 VertexAttribs1svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8));
4967}
4968
4969void
4970__glXDisp_VertexAttribs2dvNV(GLbyte * pc)
4971{
4972 PFNGLVERTEXATTRIBS2DVNVPROC VertexAttribs2dvNV =
4973 __glGetProcAddress("glVertexAttribs2dvNV");
4974 const GLsizei n = *(GLsizei *) (pc + 4);
4975
4976#ifdef __GLX_ALIGN64
4977 const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
4978
4979 if ((unsigned long) (pc) & 7) {
4980 (void) memmove(pc - 4, pc, cmdlen);
4981 pc -= 4;
4982 }
4983#endif
4984
4985 VertexAttribs2dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8));
4986}
4987
4988void
4989__glXDisp_VertexAttribs2fvNV(GLbyte * pc)
4990{
4991 PFNGLVERTEXATTRIBS2FVNVPROC VertexAttribs2fvNV =
4992 __glGetProcAddress("glVertexAttribs2fvNV");
4993 const GLsizei n = *(GLsizei *) (pc + 4);
4994
4995 VertexAttribs2fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8));
4996}
4997
4998void
4999__glXDisp_VertexAttribs2svNV(GLbyte * pc)
5000{
5001 PFNGLVERTEXATTRIBS2SVNVPROC VertexAttribs2svNV =
5002 __glGetProcAddress("glVertexAttribs2svNV");
5003 const GLsizei n = *(GLsizei *) (pc + 4);
5004
5005 VertexAttribs2svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8));
5006}
5007
5008void
5009__glXDisp_VertexAttribs3dvNV(GLbyte * pc)
5010{
5011 PFNGLVERTEXATTRIBS3DVNVPROC VertexAttribs3dvNV =
5012 __glGetProcAddress("glVertexAttribs3dvNV");
5013 const GLsizei n = *(GLsizei *) (pc + 4);
5014
5015#ifdef __GLX_ALIGN64
5016 const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
5017
5018 if ((unsigned long) (pc) & 7) {
5019 (void) memmove(pc - 4, pc, cmdlen);
5020 pc -= 4;
5021 }
5022#endif
5023
5024 VertexAttribs3dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8));
5025}
5026
5027void
5028__glXDisp_VertexAttribs3fvNV(GLbyte * pc)
5029{
5030 PFNGLVERTEXATTRIBS3FVNVPROC VertexAttribs3fvNV =
5031 __glGetProcAddress("glVertexAttribs3fvNV");
5032 const GLsizei n = *(GLsizei *) (pc + 4);
5033
5034 VertexAttribs3fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8));
5035}
5036
5037void
5038__glXDisp_VertexAttribs3svNV(GLbyte * pc)
5039{
5040 PFNGLVERTEXATTRIBS3SVNVPROC VertexAttribs3svNV =
5041 __glGetProcAddress("glVertexAttribs3svNV");
5042 const GLsizei n = *(GLsizei *) (pc + 4);
5043
5044 VertexAttribs3svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8));
5045}
5046
5047void
5048__glXDisp_VertexAttribs4dvNV(GLbyte * pc)
5049{
5050 PFNGLVERTEXATTRIBS4DVNVPROC VertexAttribs4dvNV =
5051 __glGetProcAddress("glVertexAttribs4dvNV");
5052 const GLsizei n = *(GLsizei *) (pc + 4);
5053
5054#ifdef __GLX_ALIGN64
5055 const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
5056
5057 if ((unsigned long) (pc) & 7) {
5058 (void) memmove(pc - 4, pc, cmdlen);
5059 pc -= 4;
5060 }
5061#endif
5062
5063 VertexAttribs4dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8));
5064}
5065
5066void
5067__glXDisp_VertexAttribs4fvNV(GLbyte * pc)
5068{
5069 PFNGLVERTEXATTRIBS4FVNVPROC VertexAttribs4fvNV =
5070 __glGetProcAddress("glVertexAttribs4fvNV");
5071 const GLsizei n = *(GLsizei *) (pc + 4);
5072
5073 VertexAttribs4fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8));
5074}
5075
5076void
5077__glXDisp_VertexAttribs4svNV(GLbyte * pc)
5078{
5079 PFNGLVERTEXATTRIBS4SVNVPROC VertexAttribs4svNV =
5080 __glGetProcAddress("glVertexAttribs4svNV");
5081 const GLsizei n = *(GLsizei *) (pc + 4);
5082
5083 VertexAttribs4svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8));
5084}
5085
5086void
5087__glXDisp_VertexAttribs4ubvNV(GLbyte * pc)
5088{
5089 PFNGLVERTEXATTRIBS4UBVNVPROC VertexAttribs4ubvNV =
5090 __glGetProcAddress("glVertexAttribs4ubvNV");
5091 const GLsizei n = *(GLsizei *) (pc + 4);
5092
5093 VertexAttribs4ubvNV(*(GLuint *) (pc + 0), n, (const GLubyte *) (pc + 8));
5094}
5095
5096void
5097__glXDisp_ActiveStencilFaceEXT(GLbyte * pc)
5098{
5099 PFNGLACTIVESTENCILFACEEXTPROC ActiveStencilFaceEXT =
5100 __glGetProcAddress("glActiveStencilFaceEXT");
5101 ActiveStencilFaceEXT(*(GLenum *) (pc + 0));
5102}