Imported Upstream version 1.15.1
[deb_xorg-server.git] / glx / indirect_dispatch.c
1 /* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
2
3 /*
4 * (C) Copyright IBM Corporation 2005
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sub license,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the next
15 * paragraph) shall be included in all copies or substantial portions of the
16 * Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21 * IBM,
22 * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 */
27
28 #include <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
39 typedef struct {
40 __GLX_PIXEL_3D_HDR;
41 } __GLXpixel3DHeader;
42
43 extern GLboolean __glXErrorOccured(void);
44 extern void __glXClearErrorOccured(void);
45
46 static const unsigned dummy_answer[2] = { 0, 0 };
47
48 int
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
64 int
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
80 void
81 __glXDisp_CallList(GLbyte * pc)
82 {
83 glCallList(*(GLuint *) (pc + 0));
84 }
85
86 void
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
98 int
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
114 int
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
133 void
134 __glXDisp_ListBase(GLbyte * pc)
135 {
136 glListBase(*(GLuint *) (pc + 0));
137 }
138
139 void
140 __glXDisp_Begin(GLbyte * pc)
141 {
142 glBegin(*(GLenum *) (pc + 0));
143 }
144
145 void
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
164 void
165 __glXDisp_Color3bv(GLbyte * pc)
166 {
167 glColor3bv((const GLbyte *) (pc + 0));
168 }
169
170 void
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
183 void
184 __glXDisp_Color3fv(GLbyte * pc)
185 {
186 glColor3fv((const GLfloat *) (pc + 0));
187 }
188
189 void
190 __glXDisp_Color3iv(GLbyte * pc)
191 {
192 glColor3iv((const GLint *) (pc + 0));
193 }
194
195 void
196 __glXDisp_Color3sv(GLbyte * pc)
197 {
198 glColor3sv((const GLshort *) (pc + 0));
199 }
200
201 void
202 __glXDisp_Color3ubv(GLbyte * pc)
203 {
204 glColor3ubv((const GLubyte *) (pc + 0));
205 }
206
207 void
208 __glXDisp_Color3uiv(GLbyte * pc)
209 {
210 glColor3uiv((const GLuint *) (pc + 0));
211 }
212
213 void
214 __glXDisp_Color3usv(GLbyte * pc)
215 {
216 glColor3usv((const GLushort *) (pc + 0));
217 }
218
219 void
220 __glXDisp_Color4bv(GLbyte * pc)
221 {
222 glColor4bv((const GLbyte *) (pc + 0));
223 }
224
225 void
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
238 void
239 __glXDisp_Color4fv(GLbyte * pc)
240 {
241 glColor4fv((const GLfloat *) (pc + 0));
242 }
243
244 void
245 __glXDisp_Color4iv(GLbyte * pc)
246 {
247 glColor4iv((const GLint *) (pc + 0));
248 }
249
250 void
251 __glXDisp_Color4sv(GLbyte * pc)
252 {
253 glColor4sv((const GLshort *) (pc + 0));
254 }
255
256 void
257 __glXDisp_Color4ubv(GLbyte * pc)
258 {
259 glColor4ubv((const GLubyte *) (pc + 0));
260 }
261
262 void
263 __glXDisp_Color4uiv(GLbyte * pc)
264 {
265 glColor4uiv((const GLuint *) (pc + 0));
266 }
267
268 void
269 __glXDisp_Color4usv(GLbyte * pc)
270 {
271 glColor4usv((const GLushort *) (pc + 0));
272 }
273
274 void
275 __glXDisp_EdgeFlagv(GLbyte * pc)
276 {
277 glEdgeFlagv((const GLboolean *) (pc + 0));
278 }
279
280 void
281 __glXDisp_End(GLbyte * pc)
282 {
283 glEnd();
284 }
285
286 void
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
299 void
300 __glXDisp_Indexfv(GLbyte * pc)
301 {
302 glIndexfv((const GLfloat *) (pc + 0));
303 }
304
305 void
306 __glXDisp_Indexiv(GLbyte * pc)
307 {
308 glIndexiv((const GLint *) (pc + 0));
309 }
310
311 void
312 __glXDisp_Indexsv(GLbyte * pc)
313 {
314 glIndexsv((const GLshort *) (pc + 0));
315 }
316
317 void
318 __glXDisp_Normal3bv(GLbyte * pc)
319 {
320 glNormal3bv((const GLbyte *) (pc + 0));
321 }
322
323 void
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
336 void
337 __glXDisp_Normal3fv(GLbyte * pc)
338 {
339 glNormal3fv((const GLfloat *) (pc + 0));
340 }
341
342 void
343 __glXDisp_Normal3iv(GLbyte * pc)
344 {
345 glNormal3iv((const GLint *) (pc + 0));
346 }
347
348 void
349 __glXDisp_Normal3sv(GLbyte * pc)
350 {
351 glNormal3sv((const GLshort *) (pc + 0));
352 }
353
354 void
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
367 void
368 __glXDisp_RasterPos2fv(GLbyte * pc)
369 {
370 glRasterPos2fv((const GLfloat *) (pc + 0));
371 }
372
373 void
374 __glXDisp_RasterPos2iv(GLbyte * pc)
375 {
376 glRasterPos2iv((const GLint *) (pc + 0));
377 }
378
379 void
380 __glXDisp_RasterPos2sv(GLbyte * pc)
381 {
382 glRasterPos2sv((const GLshort *) (pc + 0));
383 }
384
385 void
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
398 void
399 __glXDisp_RasterPos3fv(GLbyte * pc)
400 {
401 glRasterPos3fv((const GLfloat *) (pc + 0));
402 }
403
404 void
405 __glXDisp_RasterPos3iv(GLbyte * pc)
406 {
407 glRasterPos3iv((const GLint *) (pc + 0));
408 }
409
410 void
411 __glXDisp_RasterPos3sv(GLbyte * pc)
412 {
413 glRasterPos3sv((const GLshort *) (pc + 0));
414 }
415
416 void
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
429 void
430 __glXDisp_RasterPos4fv(GLbyte * pc)
431 {
432 glRasterPos4fv((const GLfloat *) (pc + 0));
433 }
434
435 void
436 __glXDisp_RasterPos4iv(GLbyte * pc)
437 {
438 glRasterPos4iv((const GLint *) (pc + 0));
439 }
440
441 void
442 __glXDisp_RasterPos4sv(GLbyte * pc)
443 {
444 glRasterPos4sv((const GLshort *) (pc + 0));
445 }
446
447 void
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
460 void
461 __glXDisp_Rectfv(GLbyte * pc)
462 {
463 glRectfv((const GLfloat *) (pc + 0), (const GLfloat *) (pc + 8));
464 }
465
466 void
467 __glXDisp_Rectiv(GLbyte * pc)
468 {
469 glRectiv((const GLint *) (pc + 0), (const GLint *) (pc + 8));
470 }
471
472 void
473 __glXDisp_Rectsv(GLbyte * pc)
474 {
475 glRectsv((const GLshort *) (pc + 0), (const GLshort *) (pc + 4));
476 }
477
478 void
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
491 void
492 __glXDisp_TexCoord1fv(GLbyte * pc)
493 {
494 glTexCoord1fv((const GLfloat *) (pc + 0));
495 }
496
497 void
498 __glXDisp_TexCoord1iv(GLbyte * pc)
499 {
500 glTexCoord1iv((const GLint *) (pc + 0));
501 }
502
503 void
504 __glXDisp_TexCoord1sv(GLbyte * pc)
505 {
506 glTexCoord1sv((const GLshort *) (pc + 0));
507 }
508
509 void
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
522 void
523 __glXDisp_TexCoord2fv(GLbyte * pc)
524 {
525 glTexCoord2fv((const GLfloat *) (pc + 0));
526 }
527
528 void
529 __glXDisp_TexCoord2iv(GLbyte * pc)
530 {
531 glTexCoord2iv((const GLint *) (pc + 0));
532 }
533
534 void
535 __glXDisp_TexCoord2sv(GLbyte * pc)
536 {
537 glTexCoord2sv((const GLshort *) (pc + 0));
538 }
539
540 void
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
553 void
554 __glXDisp_TexCoord3fv(GLbyte * pc)
555 {
556 glTexCoord3fv((const GLfloat *) (pc + 0));
557 }
558
559 void
560 __glXDisp_TexCoord3iv(GLbyte * pc)
561 {
562 glTexCoord3iv((const GLint *) (pc + 0));
563 }
564
565 void
566 __glXDisp_TexCoord3sv(GLbyte * pc)
567 {
568 glTexCoord3sv((const GLshort *) (pc + 0));
569 }
570
571 void
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
584 void
585 __glXDisp_TexCoord4fv(GLbyte * pc)
586 {
587 glTexCoord4fv((const GLfloat *) (pc + 0));
588 }
589
590 void
591 __glXDisp_TexCoord4iv(GLbyte * pc)
592 {
593 glTexCoord4iv((const GLint *) (pc + 0));
594 }
595
596 void
597 __glXDisp_TexCoord4sv(GLbyte * pc)
598 {
599 glTexCoord4sv((const GLshort *) (pc + 0));
600 }
601
602 void
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
615 void
616 __glXDisp_Vertex2fv(GLbyte * pc)
617 {
618 glVertex2fv((const GLfloat *) (pc + 0));
619 }
620
621 void
622 __glXDisp_Vertex2iv(GLbyte * pc)
623 {
624 glVertex2iv((const GLint *) (pc + 0));
625 }
626
627 void
628 __glXDisp_Vertex2sv(GLbyte * pc)
629 {
630 glVertex2sv((const GLshort *) (pc + 0));
631 }
632
633 void
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
646 void
647 __glXDisp_Vertex3fv(GLbyte * pc)
648 {
649 glVertex3fv((const GLfloat *) (pc + 0));
650 }
651
652 void
653 __glXDisp_Vertex3iv(GLbyte * pc)
654 {
655 glVertex3iv((const GLint *) (pc + 0));
656 }
657
658 void
659 __glXDisp_Vertex3sv(GLbyte * pc)
660 {
661 glVertex3sv((const GLshort *) (pc + 0));
662 }
663
664 void
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
677 void
678 __glXDisp_Vertex4fv(GLbyte * pc)
679 {
680 glVertex4fv((const GLfloat *) (pc + 0));
681 }
682
683 void
684 __glXDisp_Vertex4iv(GLbyte * pc)
685 {
686 glVertex4iv((const GLint *) (pc + 0));
687 }
688
689 void
690 __glXDisp_Vertex4sv(GLbyte * pc)
691 {
692 glVertex4sv((const GLshort *) (pc + 0));
693 }
694
695 void
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
708 void
709 __glXDisp_ColorMaterial(GLbyte * pc)
710 {
711 glColorMaterial(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
712 }
713
714 void
715 __glXDisp_CullFace(GLbyte * pc)
716 {
717 glCullFace(*(GLenum *) (pc + 0));
718 }
719
720 void
721 __glXDisp_Fogf(GLbyte * pc)
722 {
723 glFogf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
724 }
725
726 void
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
737 void
738 __glXDisp_Fogi(GLbyte * pc)
739 {
740 glFogi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
741 }
742
743 void
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
754 void
755 __glXDisp_FrontFace(GLbyte * pc)
756 {
757 glFrontFace(*(GLenum *) (pc + 0));
758 }
759
760 void
761 __glXDisp_Hint(GLbyte * pc)
762 {
763 glHint(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
764 }
765
766 void
767 __glXDisp_Lightf(GLbyte * pc)
768 {
769 glLightf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
770 }
771
772 void
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
783 void
784 __glXDisp_Lighti(GLbyte * pc)
785 {
786 glLighti(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
787 }
788
789 void
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
800 void
801 __glXDisp_LightModelf(GLbyte * pc)
802 {
803 glLightModelf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
804 }
805
806 void
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
817 void
818 __glXDisp_LightModeli(GLbyte * pc)
819 {
820 glLightModeli(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
821 }
822
823 void
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
834 void
835 __glXDisp_LineStipple(GLbyte * pc)
836 {
837 glLineStipple(*(GLint *) (pc + 0), *(GLushort *) (pc + 4));
838 }
839
840 void
841 __glXDisp_LineWidth(GLbyte * pc)
842 {
843 glLineWidth(*(GLfloat *) (pc + 0));
844 }
845
846 void
847 __glXDisp_Materialf(GLbyte * pc)
848 {
849 glMaterialf(*(GLenum *) (pc + 0),
850 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
851 }
852
853 void
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
864 void
865 __glXDisp_Materiali(GLbyte * pc)
866 {
867 glMateriali(*(GLenum *) (pc + 0),
868 *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
869 }
870
871 void
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
882 void
883 __glXDisp_PointSize(GLbyte * pc)
884 {
885 glPointSize(*(GLfloat *) (pc + 0));
886 }
887
888 void
889 __glXDisp_PolygonMode(GLbyte * pc)
890 {
891 glPolygonMode(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
892 }
893
894 void
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
909 void
910 __glXDisp_Scissor(GLbyte * pc)
911 {
912 glScissor(*(GLint *) (pc + 0),
913 *(GLint *) (pc + 4),
914 *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12));
915 }
916
917 void
918 __glXDisp_ShadeModel(GLbyte * pc)
919 {
920 glShadeModel(*(GLenum *) (pc + 0));
921 }
922
923 void
924 __glXDisp_TexParameterf(GLbyte * pc)
925 {
926 glTexParameterf(*(GLenum *) (pc + 0),
927 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
928 }
929
930 void
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
941 void
942 __glXDisp_TexParameteri(GLbyte * pc)
943 {
944 glTexParameteri(*(GLenum *) (pc + 0),
945 *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
946 }
947
948 void
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
959 void
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
980 void
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
1002 void
1003 __glXDisp_TexEnvf(GLbyte * pc)
1004 {
1005 glTexEnvf(*(GLenum *) (pc + 0),
1006 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
1007 }
1008
1009 void
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
1020 void
1021 __glXDisp_TexEnvi(GLbyte * pc)
1022 {
1023 glTexEnvi(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
1024 }
1025
1026 void
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
1037 void
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
1051 void
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
1072 void
1073 __glXDisp_TexGenf(GLbyte * pc)
1074 {
1075 glTexGenf(*(GLenum *) (pc + 0),
1076 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
1077 }
1078
1079 void
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
1090 void
1091 __glXDisp_TexGeni(GLbyte * pc)
1092 {
1093 glTexGeni(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
1094 }
1095
1096 void
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
1107 void
1108 __glXDisp_InitNames(GLbyte * pc)
1109 {
1110 glInitNames();
1111 }
1112
1113 void
1114 __glXDisp_LoadName(GLbyte * pc)
1115 {
1116 glLoadName(*(GLuint *) (pc + 0));
1117 }
1118
1119 void
1120 __glXDisp_PassThrough(GLbyte * pc)
1121 {
1122 glPassThrough(*(GLfloat *) (pc + 0));
1123 }
1124
1125 void
1126 __glXDisp_PopName(GLbyte * pc)
1127 {
1128 glPopName();
1129 }
1130
1131 void
1132 __glXDisp_PushName(GLbyte * pc)
1133 {
1134 glPushName(*(GLuint *) (pc + 0));
1135 }
1136
1137 void
1138 __glXDisp_DrawBuffer(GLbyte * pc)
1139 {
1140 glDrawBuffer(*(GLenum *) (pc + 0));
1141 }
1142
1143 void
1144 __glXDisp_Clear(GLbyte * pc)
1145 {
1146 glClear(*(GLbitfield *) (pc + 0));
1147 }
1148
1149 void
1150 __glXDisp_ClearAccum(GLbyte * pc)
1151 {
1152 glClearAccum(*(GLfloat *) (pc + 0),
1153 *(GLfloat *) (pc + 4),
1154 *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12));
1155 }
1156
1157 void
1158 __glXDisp_ClearIndex(GLbyte * pc)
1159 {
1160 glClearIndex(*(GLfloat *) (pc + 0));
1161 }
1162
1163 void
1164 __glXDisp_ClearColor(GLbyte * pc)
1165 {
1166 glClearColor(*(GLclampf *) (pc + 0),
1167 *(GLclampf *) (pc + 4),
1168 *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12));
1169 }
1170
1171 void
1172 __glXDisp_ClearStencil(GLbyte * pc)
1173 {
1174 glClearStencil(*(GLint *) (pc + 0));
1175 }
1176
1177 void
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
1190 void
1191 __glXDisp_StencilMask(GLbyte * pc)
1192 {
1193 glStencilMask(*(GLuint *) (pc + 0));
1194 }
1195
1196 void
1197 __glXDisp_ColorMask(GLbyte * pc)
1198 {
1199 glColorMask(*(GLboolean *) (pc + 0),
1200 *(GLboolean *) (pc + 1),
1201 *(GLboolean *) (pc + 2), *(GLboolean *) (pc + 3));
1202 }
1203
1204 void
1205 __glXDisp_DepthMask(GLbyte * pc)
1206 {
1207 glDepthMask(*(GLboolean *) (pc + 0));
1208 }
1209
1210 void
1211 __glXDisp_IndexMask(GLbyte * pc)
1212 {
1213 glIndexMask(*(GLuint *) (pc + 0));
1214 }
1215
1216 void
1217 __glXDisp_Accum(GLbyte * pc)
1218 {
1219 glAccum(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
1220 }
1221
1222 void
1223 __glXDisp_Disable(GLbyte * pc)
1224 {
1225 glDisable(*(GLenum *) (pc + 0));
1226 }
1227
1228 void
1229 __glXDisp_Enable(GLbyte * pc)
1230 {
1231 glEnable(*(GLenum *) (pc + 0));
1232 }
1233
1234 void
1235 __glXDisp_PopAttrib(GLbyte * pc)
1236 {
1237 glPopAttrib();
1238 }
1239
1240 void
1241 __glXDisp_PushAttrib(GLbyte * pc)
1242 {
1243 glPushAttrib(*(GLbitfield *) (pc + 0));
1244 }
1245
1246 void
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
1260 void
1261 __glXDisp_MapGrid1f(GLbyte * pc)
1262 {
1263 glMapGrid1f(*(GLint *) (pc + 0),
1264 *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8));
1265 }
1266
1267 void
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
1284 void
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
1294 void
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
1307 void
1308 __glXDisp_EvalCoord1fv(GLbyte * pc)
1309 {
1310 glEvalCoord1fv((const GLfloat *) (pc + 0));
1311 }
1312
1313 void
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
1326 void
1327 __glXDisp_EvalCoord2fv(GLbyte * pc)
1328 {
1329 glEvalCoord2fv((const GLfloat *) (pc + 0));
1330 }
1331
1332 void
1333 __glXDisp_EvalMesh1(GLbyte * pc)
1334 {
1335 glEvalMesh1(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8));
1336 }
1337
1338 void
1339 __glXDisp_EvalPoint1(GLbyte * pc)
1340 {
1341 glEvalPoint1(*(GLint *) (pc + 0));
1342 }
1343
1344 void
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
1353 void
1354 __glXDisp_EvalPoint2(GLbyte * pc)
1355 {
1356 glEvalPoint2(*(GLint *) (pc + 0), *(GLint *) (pc + 4));
1357 }
1358
1359 void
1360 __glXDisp_AlphaFunc(GLbyte * pc)
1361 {
1362 glAlphaFunc(*(GLenum *) (pc + 0), *(GLclampf *) (pc + 4));
1363 }
1364
1365 void
1366 __glXDisp_BlendFunc(GLbyte * pc)
1367 {
1368 glBlendFunc(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
1369 }
1370
1371 void
1372 __glXDisp_LogicOp(GLbyte * pc)
1373 {
1374 glLogicOp(*(GLenum *) (pc + 0));
1375 }
1376
1377 void
1378 __glXDisp_StencilFunc(GLbyte * pc)
1379 {
1380 glStencilFunc(*(GLenum *) (pc + 0),
1381 *(GLint *) (pc + 4), *(GLuint *) (pc + 8));
1382 }
1383
1384 void
1385 __glXDisp_StencilOp(GLbyte * pc)
1386 {
1387 glStencilOp(*(GLenum *) (pc + 0),
1388 *(GLenum *) (pc + 4), *(GLenum *) (pc + 8));
1389 }
1390
1391 void
1392 __glXDisp_DepthFunc(GLbyte * pc)
1393 {
1394 glDepthFunc(*(GLenum *) (pc + 0));
1395 }
1396
1397 void
1398 __glXDisp_PixelZoom(GLbyte * pc)
1399 {
1400 glPixelZoom(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4));
1401 }
1402
1403 void
1404 __glXDisp_PixelTransferf(GLbyte * pc)
1405 {
1406 glPixelTransferf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
1407 }
1408
1409 void
1410 __glXDisp_PixelTransferi(GLbyte * pc)
1411 {
1412 glPixelTransferi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
1413 }
1414
1415 int
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
1431 int
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
1447 void
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
1455 void
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
1463 void
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
1471 void
1472 __glXDisp_ReadBuffer(GLbyte * pc)
1473 {
1474 glReadBuffer(*(GLenum *) (pc + 0));
1475 }
1476
1477 void
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
1486 void
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
1504 int
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
1533 int
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
1552 int
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
1581 int
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
1600 int
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
1629 int
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
1658 int
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
1687 int
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
1716 int
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
1746 int
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
1776 int
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
1806 int
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
1835 int
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
1864 int
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
1893 int
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
1922 int
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
1951 int
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
1980 int
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
2009 int
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
2038 int
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
2067 int
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
2096 int
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
2125 int
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
2154 int
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
2184 int
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
2214 int
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
2233 int
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
2252 void
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
2265 void
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
2282 void
2283 __glXDisp_LoadIdentity(GLbyte * pc)
2284 {
2285 glLoadIdentity();
2286 }
2287
2288 void
2289 __glXDisp_LoadMatrixf(GLbyte * pc)
2290 {
2291 glLoadMatrixf((const GLfloat *) (pc + 0));
2292 }
2293
2294 void
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
2307 void
2308 __glXDisp_MatrixMode(GLbyte * pc)
2309 {
2310 glMatrixMode(*(GLenum *) (pc + 0));
2311 }
2312
2313 void
2314 __glXDisp_MultMatrixf(GLbyte * pc)
2315 {
2316 glMultMatrixf((const GLfloat *) (pc + 0));
2317 }
2318
2319 void
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
2332 void
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
2349 void
2350 __glXDisp_PopMatrix(GLbyte * pc)
2351 {
2352 glPopMatrix();
2353 }
2354
2355 void
2356 __glXDisp_PushMatrix(GLbyte * pc)
2357 {
2358 glPushMatrix();
2359 }
2360
2361 void
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
2376 void
2377 __glXDisp_Rotatef(GLbyte * pc)
2378 {
2379 glRotatef(*(GLfloat *) (pc + 0),
2380 *(GLfloat *) (pc + 4),
2381 *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12));
2382 }
2383
2384 void
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
2398 void
2399 __glXDisp_Scalef(GLbyte * pc)
2400 {
2401 glScalef(*(GLfloat *) (pc + 0),
2402 *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8));
2403 }
2404
2405 void
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
2419 void
2420 __glXDisp_Translatef(GLbyte * pc)
2421 {
2422 glTranslatef(*(GLfloat *) (pc + 0),
2423 *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8));
2424 }
2425
2426 void
2427 __glXDisp_Viewport(GLbyte * pc)
2428 {
2429 glViewport(*(GLint *) (pc + 0),
2430 *(GLint *) (pc + 4),
2431 *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12));
2432 }
2433
2434 void
2435 __glXDisp_BindTexture(GLbyte * pc)
2436 {
2437 glBindTexture(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
2438 }
2439
2440 void
2441 __glXDisp_Indexubv(GLbyte * pc)
2442 {
2443 glIndexubv((const GLubyte *) (pc + 0));
2444 }
2445
2446 void
2447 __glXDisp_PolygonOffset(GLbyte * pc)
2448 {
2449 glPolygonOffset(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4));
2450 }
2451
2452 int
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
2476 int
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
2500 void
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
2511 void
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
2523 void
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
2533 void
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
2545 int
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
2563 int
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
2581 int
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
2604 int
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
2627 int
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
2646 int
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
2665 void
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
2675 void
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
2695 void
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
2717 void
2718 __glXDisp_BlendColor(GLbyte * pc)
2719 {
2720 glBlendColor(*(GLclampf *) (pc + 0),
2721 *(GLclampf *) (pc + 4),
2722 *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12));
2723 }
2724
2725 void
2726 __glXDisp_BlendEquation(GLbyte * pc)
2727 {
2728 glBlendEquation(*(GLenum *) (pc + 0));
2729 }
2730
2731 void
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
2750 void
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
2761 void
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
2772 void
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
2781 int
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
2810 int
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
2839 int
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
2868 int
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
2897 void
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
2916 void
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
2925 void
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
2944 void
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
2964 void
2965 __glXDisp_ConvolutionParameterf(GLbyte * pc)
2966 {
2967 glConvolutionParameterf(*(GLenum *) (pc + 0),
2968 *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
2969 }
2970
2971 void
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
2982 void
2983 __glXDisp_ConvolutionParameteri(GLbyte * pc)
2984 {
2985 glConvolutionParameteri(*(GLenum *) (pc + 0),
2986 *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
2987 }
2988
2989 void
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
3000 void
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
3009 void
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
3019 int
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
3048 int
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
3077 int
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
3106 int
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
3135 int
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
3164 int
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
3193 int
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
3222 int
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
3251 int
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
3280 int
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
3309 int
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
3338 int
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
3367 void
3368 __glXDisp_Histogram(GLbyte * pc)
3369 {
3370 glHistogram(*(GLenum *) (pc + 0),
3371 *(GLsizei *) (pc + 4),
3372 *(GLenum *) (pc + 8), *(GLboolean *) (pc + 12));
3373 }
3374
3375 void
3376 __glXDisp_Minmax(GLbyte * pc)
3377 {
3378 glMinmax(*(GLenum *) (pc + 0),
3379 *(GLenum *) (pc + 4), *(GLboolean *) (pc + 8));
3380 }
3381
3382 void
3383 __glXDisp_ResetHistogram(GLbyte * pc)
3384 {
3385 glResetHistogram(*(GLenum *) (pc + 0));
3386 }
3387
3388 void
3389 __glXDisp_ResetMinmax(GLbyte * pc)
3390 {
3391 glResetMinmax(*(GLenum *) (pc + 0));
3392 }
3393
3394 void
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
3421 void
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
3447 void
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
3460 void
3461 __glXDisp_ActiveTexture(GLbyte * pc)
3462 {
3463 glActiveTextureARB(*(GLenum *) (pc + 0));
3464 }
3465
3466 void
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
3479 void
3480 __glXDisp_MultiTexCoord1fvARB(GLbyte * pc)
3481 {
3482 glMultiTexCoord1fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
3483 }
3484
3485 void
3486 __glXDisp_MultiTexCoord1iv(GLbyte * pc)
3487 {
3488 glMultiTexCoord1ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
3489 }
3490
3491 void
3492 __glXDisp_MultiTexCoord1sv(GLbyte * pc)
3493 {
3494 glMultiTexCoord1svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
3495 }
3496
3497 void
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
3510 void
3511 __glXDisp_MultiTexCoord2fvARB(GLbyte * pc)
3512 {
3513 glMultiTexCoord2fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
3514 }
3515
3516 void
3517 __glXDisp_MultiTexCoord2iv(GLbyte * pc)
3518 {
3519 glMultiTexCoord2ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
3520 }
3521
3522 void
3523 __glXDisp_MultiTexCoord2sv(GLbyte * pc)
3524 {
3525 glMultiTexCoord2svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
3526 }
3527
3528 void
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
3541 void
3542 __glXDisp_MultiTexCoord3fvARB(GLbyte * pc)
3543 {
3544 glMultiTexCoord3fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
3545 }
3546
3547 void
3548 __glXDisp_MultiTexCoord3iv(GLbyte * pc)
3549 {
3550 glMultiTexCoord3ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
3551 }
3552
3553 void
3554 __glXDisp_MultiTexCoord3sv(GLbyte * pc)
3555 {
3556 glMultiTexCoord3svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
3557 }
3558
3559 void
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
3572 void
3573 __glXDisp_MultiTexCoord4fvARB(GLbyte * pc)
3574 {
3575 glMultiTexCoord4fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
3576 }
3577
3578 void
3579 __glXDisp_MultiTexCoord4iv(GLbyte * pc)
3580 {
3581 glMultiTexCoord4ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
3582 }
3583
3584 void
3585 __glXDisp_MultiTexCoord4sv(GLbyte * pc)
3586 {
3587 glMultiTexCoord4svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
3588 }
3589
3590 void
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
3605 void
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
3621 void
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
3638 void
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
3653 void
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
3670 void
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
3689 void
3690 __glXDisp_SampleCoverage(GLbyte * pc)
3691 {
3692 PFNGLSAMPLECOVERAGEPROC SampleCoverage =
3693 __glGetProcAddress("glSampleCoverage");
3694 SampleCoverage(*(GLclampf *) (pc + 0), *(GLboolean *) (pc + 4));
3695 }
3696
3697 void
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
3706 void
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
3721 void
3722 __glXDisp_PointParameterf(GLbyte * pc)
3723 {
3724 PFNGLPOINTPARAMETERFPROC PointParameterf =
3725 __glGetProcAddress("glPointParameterf");
3726 PointParameterf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
3727 }
3728
3729 void
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
3742 void
3743 __glXDisp_PointParameteri(GLbyte * pc)
3744 {
3745 PFNGLPOINTPARAMETERIPROC PointParameteri =
3746 __glGetProcAddress("glPointParameteri");
3747 PointParameteri(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
3748 }
3749
3750 void
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
3763 void
3764 __glXDisp_SecondaryColor3bv(GLbyte * pc)
3765 {
3766 PFNGLSECONDARYCOLOR3BVPROC SecondaryColor3bv =
3767 __glGetProcAddress("glSecondaryColor3bv");
3768 SecondaryColor3bv((const GLbyte *) (pc + 0));
3769 }
3770
3771 void
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
3786 void
3787 __glXDisp_SecondaryColor3iv(GLbyte * pc)
3788 {
3789 PFNGLSECONDARYCOLOR3IVPROC SecondaryColor3iv =
3790 __glGetProcAddress("glSecondaryColor3iv");
3791 SecondaryColor3iv((const GLint *) (pc + 0));
3792 }
3793
3794 void
3795 __glXDisp_SecondaryColor3sv(GLbyte * pc)
3796 {
3797 PFNGLSECONDARYCOLOR3SVPROC SecondaryColor3sv =
3798 __glGetProcAddress("glSecondaryColor3sv");
3799 SecondaryColor3sv((const GLshort *) (pc + 0));
3800 }
3801
3802 void
3803 __glXDisp_SecondaryColor3ubv(GLbyte * pc)
3804 {
3805 PFNGLSECONDARYCOLOR3UBVPROC SecondaryColor3ubv =
3806 __glGetProcAddress("glSecondaryColor3ubv");
3807 SecondaryColor3ubv((const GLubyte *) (pc + 0));
3808 }
3809
3810 void
3811 __glXDisp_SecondaryColor3uiv(GLbyte * pc)
3812 {
3813 PFNGLSECONDARYCOLOR3UIVPROC SecondaryColor3uiv =
3814 __glGetProcAddress("glSecondaryColor3uiv");
3815 SecondaryColor3uiv((const GLuint *) (pc + 0));
3816 }
3817
3818 void
3819 __glXDisp_SecondaryColor3usv(GLbyte * pc)
3820 {
3821 PFNGLSECONDARYCOLOR3USVPROC SecondaryColor3usv =
3822 __glGetProcAddress("glSecondaryColor3usv");
3823 SecondaryColor3usv((const GLushort *) (pc + 0));
3824 }
3825
3826 void
3827 __glXDisp_WindowPos3fv(GLbyte * pc)
3828 {
3829 PFNGLWINDOWPOS3FVPROC WindowPos3fv = __glGetProcAddress("glWindowPos3fv");
3830
3831 WindowPos3fv((const GLfloat *) (pc + 0));
3832 }
3833
3834 void
3835 __glXDisp_BeginQuery(GLbyte * pc)
3836 {
3837 PFNGLBEGINQUERYPROC BeginQuery = __glGetProcAddress("glBeginQuery");
3838
3839 BeginQuery(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
3840 }
3841
3842 int
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
3862 void
3863 __glXDisp_EndQuery(GLbyte * pc)
3864 {
3865 PFNGLENDQUERYPROC EndQuery = __glGetProcAddress("glEndQuery");
3866
3867 EndQuery(*(GLenum *) (pc + 0));
3868 }
3869
3870 int
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
3894 int
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
3925 int
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
3956 int
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
3986 int
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
4006 void
4007 __glXDisp_BlendEquationSeparate(GLbyte * pc)
4008 {
4009 PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate =
4010 __glGetProcAddress("glBlendEquationSeparate");
4011 BlendEquationSeparate(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
4012 }
4013
4014 void
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
4023 void
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
4038 void
4039 __glXDisp_VertexAttrib1sv(GLbyte * pc)
4040 {
4041 PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv =
4042 __glGetProcAddress("glVertexAttrib1sv");
4043 VertexAttrib1sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4044 }
4045
4046 void
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
4061 void
4062 __glXDisp_VertexAttrib2sv(GLbyte * pc)
4063 {
4064 PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv =
4065 __glGetProcAddress("glVertexAttrib2sv");
4066 VertexAttrib2sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4067 }
4068
4069 void
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
4084 void
4085 __glXDisp_VertexAttrib3sv(GLbyte * pc)
4086 {
4087 PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv =
4088 __glGetProcAddress("glVertexAttrib3sv");
4089 VertexAttrib3sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4090 }
4091
4092 void
4093 __glXDisp_VertexAttrib4Nbv(GLbyte * pc)
4094 {
4095 PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv =
4096 __glGetProcAddress("glVertexAttrib4Nbv");
4097 VertexAttrib4Nbv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4));
4098 }
4099
4100 void
4101 __glXDisp_VertexAttrib4Niv(GLbyte * pc)
4102 {
4103 PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv =
4104 __glGetProcAddress("glVertexAttrib4Niv");
4105 VertexAttrib4Niv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4));
4106 }
4107
4108 void
4109 __glXDisp_VertexAttrib4Nsv(GLbyte * pc)
4110 {
4111 PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv =
4112 __glGetProcAddress("glVertexAttrib4Nsv");
4113 VertexAttrib4Nsv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4114 }
4115
4116 void
4117 __glXDisp_VertexAttrib4Nubv(GLbyte * pc)
4118 {
4119 PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv =
4120 __glGetProcAddress("glVertexAttrib4Nubv");
4121 VertexAttrib4Nubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4));
4122 }
4123
4124 void
4125 __glXDisp_VertexAttrib4Nuiv(GLbyte * pc)
4126 {
4127 PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv =
4128 __glGetProcAddress("glVertexAttrib4Nuiv");
4129 VertexAttrib4Nuiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4));
4130 }
4131
4132 void
4133 __glXDisp_VertexAttrib4Nusv(GLbyte * pc)
4134 {
4135 PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv =
4136 __glGetProcAddress("glVertexAttrib4Nusv");
4137 VertexAttrib4Nusv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4));
4138 }
4139
4140 void
4141 __glXDisp_VertexAttrib4bv(GLbyte * pc)
4142 {
4143 PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv =
4144 __glGetProcAddress("glVertexAttrib4bv");
4145 VertexAttrib4bv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4));
4146 }
4147
4148 void
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
4163 void
4164 __glXDisp_VertexAttrib4iv(GLbyte * pc)
4165 {
4166 PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv =
4167 __glGetProcAddress("glVertexAttrib4iv");
4168 VertexAttrib4iv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4));
4169 }
4170
4171 void
4172 __glXDisp_VertexAttrib4sv(GLbyte * pc)
4173 {
4174 PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv =
4175 __glGetProcAddress("glVertexAttrib4sv");
4176 VertexAttrib4sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4177 }
4178
4179 void
4180 __glXDisp_VertexAttrib4ubv(GLbyte * pc)
4181 {
4182 PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv =
4183 __glGetProcAddress("glVertexAttrib4ubv");
4184 VertexAttrib4ubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4));
4185 }
4186
4187 void
4188 __glXDisp_VertexAttrib4uiv(GLbyte * pc)
4189 {
4190 PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv =
4191 __glGetProcAddress("glVertexAttrib4uiv");
4192 VertexAttrib4uiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4));
4193 }
4194
4195 void
4196 __glXDisp_VertexAttrib4usv(GLbyte * pc)
4197 {
4198 PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv =
4199 __glGetProcAddress("glVertexAttrib4usv");
4200 VertexAttrib4usv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4));
4201 }
4202
4203 void
4204 __glXDisp_ClampColor(GLbyte * pc)
4205 {
4206 PFNGLCLAMPCOLORPROC ClampColor = __glGetProcAddress("glClampColor");
4207
4208 ClampColor(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
4209 }
4210
4211 void
4212 __glXDisp_BindProgramARB(GLbyte * pc)
4213 {
4214 PFNGLBINDPROGRAMARBPROC BindProgramARB =
4215 __glGetProcAddress("glBindProgramARB");
4216 BindProgramARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
4217 }
4218
4219 int
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
4239 int
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
4264 int
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
4286 int
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
4308 int
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
4330 int
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
4352 int
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
4383 int
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
4403 void
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
4420 void
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
4429 void
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
4446 void
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
4455 void
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
4466 void
4467 __glXDisp_VertexAttrib1fvARB(GLbyte * pc)
4468 {
4469 PFNGLVERTEXATTRIB1FVARBPROC VertexAttrib1fvARB =
4470 __glGetProcAddress("glVertexAttrib1fvARB");
4471 VertexAttrib1fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4472 }
4473
4474 void
4475 __glXDisp_VertexAttrib2fvARB(GLbyte * pc)
4476 {
4477 PFNGLVERTEXATTRIB2FVARBPROC VertexAttrib2fvARB =
4478 __glGetProcAddress("glVertexAttrib2fvARB");
4479 VertexAttrib2fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4480 }
4481
4482 void
4483 __glXDisp_VertexAttrib3fvARB(GLbyte * pc)
4484 {
4485 PFNGLVERTEXATTRIB3FVARBPROC VertexAttrib3fvARB =
4486 __glGetProcAddress("glVertexAttrib3fvARB");
4487 VertexAttrib3fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4488 }
4489
4490 void
4491 __glXDisp_VertexAttrib4fvARB(GLbyte * pc)
4492 {
4493 PFNGLVERTEXATTRIB4FVARBPROC VertexAttrib4fvARB =
4494 __glGetProcAddress("glVertexAttrib4fvARB");
4495 VertexAttrib4fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4496 }
4497
4498 void
4499 __glXDisp_BindFramebuffer(GLbyte * pc)
4500 {
4501 PFNGLBINDFRAMEBUFFERPROC BindFramebuffer =
4502 __glGetProcAddress("glBindFramebuffer");
4503 BindFramebuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
4504 }
4505
4506 void
4507 __glXDisp_BindRenderbuffer(GLbyte * pc)
4508 {
4509 PFNGLBINDRENDERBUFFERPROC BindRenderbuffer =
4510 __glGetProcAddress("glBindRenderbuffer");
4511 BindRenderbuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
4512 }
4513
4514 void
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
4526 int
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
4547 void
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
4557 void
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
4567 void
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
4576 void
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
4586 void
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
4596 void
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
4606 void
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
4616 int
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
4641 int
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
4666 void
4667 __glXDisp_GenerateMipmap(GLbyte * pc)
4668 {
4669 PFNGLGENERATEMIPMAPPROC GenerateMipmap =
4670 __glGetProcAddress("glGenerateMipmap");
4671 GenerateMipmap(*(GLenum *) (pc + 0));
4672 }
4673
4674 int
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
4699 int
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
4721 int
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
4742 int
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
4763 void
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
4772 void
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
4782 void
4783 __glXDisp_SecondaryColor3fvEXT(GLbyte * pc)
4784 {
4785 PFNGLSECONDARYCOLOR3FVEXTPROC SecondaryColor3fvEXT =
4786 __glGetProcAddress("glSecondaryColor3fvEXT");
4787 SecondaryColor3fvEXT((const GLfloat *) (pc + 0));
4788 }
4789
4790 void
4791 __glXDisp_FogCoordfvEXT(GLbyte * pc)
4792 {
4793 PFNGLFOGCOORDFVEXTPROC FogCoordfvEXT =
4794 __glGetProcAddress("glFogCoordfvEXT");
4795 FogCoordfvEXT((const GLfloat *) (pc + 0));
4796 }
4797
4798 void
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
4813 void
4814 __glXDisp_VertexAttrib1fvNV(GLbyte * pc)
4815 {
4816 PFNGLVERTEXATTRIB1FVNVPROC VertexAttrib1fvNV =
4817 __glGetProcAddress("glVertexAttrib1fvNV");
4818 VertexAttrib1fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4819 }
4820
4821 void
4822 __glXDisp_VertexAttrib1svNV(GLbyte * pc)
4823 {
4824 PFNGLVERTEXATTRIB1SVNVPROC VertexAttrib1svNV =
4825 __glGetProcAddress("glVertexAttrib1svNV");
4826 VertexAttrib1svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4827 }
4828
4829 void
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
4844 void
4845 __glXDisp_VertexAttrib2fvNV(GLbyte * pc)
4846 {
4847 PFNGLVERTEXATTRIB2FVNVPROC VertexAttrib2fvNV =
4848 __glGetProcAddress("glVertexAttrib2fvNV");
4849 VertexAttrib2fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4850 }
4851
4852 void
4853 __glXDisp_VertexAttrib2svNV(GLbyte * pc)
4854 {
4855 PFNGLVERTEXATTRIB2SVNVPROC VertexAttrib2svNV =
4856 __glGetProcAddress("glVertexAttrib2svNV");
4857 VertexAttrib2svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4858 }
4859
4860 void
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
4875 void
4876 __glXDisp_VertexAttrib3fvNV(GLbyte * pc)
4877 {
4878 PFNGLVERTEXATTRIB3FVNVPROC VertexAttrib3fvNV =
4879 __glGetProcAddress("glVertexAttrib3fvNV");
4880 VertexAttrib3fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4881 }
4882
4883 void
4884 __glXDisp_VertexAttrib3svNV(GLbyte * pc)
4885 {
4886 PFNGLVERTEXATTRIB3SVNVPROC VertexAttrib3svNV =
4887 __glGetProcAddress("glVertexAttrib3svNV");
4888 VertexAttrib3svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4889 }
4890
4891 void
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
4906 void
4907 __glXDisp_VertexAttrib4fvNV(GLbyte * pc)
4908 {
4909 PFNGLVERTEXATTRIB4FVNVPROC VertexAttrib4fvNV =
4910 __glGetProcAddress("glVertexAttrib4fvNV");
4911 VertexAttrib4fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
4912 }
4913
4914 void
4915 __glXDisp_VertexAttrib4svNV(GLbyte * pc)
4916 {
4917 PFNGLVERTEXATTRIB4SVNVPROC VertexAttrib4svNV =
4918 __glGetProcAddress("glVertexAttrib4svNV");
4919 VertexAttrib4svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
4920 }
4921
4922 void
4923 __glXDisp_VertexAttrib4ubvNV(GLbyte * pc)
4924 {
4925 PFNGLVERTEXATTRIB4UBVNVPROC VertexAttrib4ubvNV =
4926 __glGetProcAddress("glVertexAttrib4ubvNV");
4927 VertexAttrib4ubvNV(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4));
4928 }
4929
4930 void
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
4949 void
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
4959 void
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
4969 void
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
4988 void
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
4998 void
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
5008 void
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
5027 void
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
5037 void
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
5047 void
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
5066 void
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
5076 void
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
5086 void
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
5096 void
5097 __glXDisp_ActiveStencilFaceEXT(GLbyte * pc)
5098 {
5099 PFNGLACTIVESTENCILFACEEXTPROC ActiveStencilFaceEXT =
5100 __glGetProcAddress("glActiveStencilFaceEXT");
5101 ActiveStencilFaceEXT(*(GLenum *) (pc + 0));
5102 }