Imported Upstream version 1.15.1
[deb_xorg-server.git] / glx / indirect_dispatch_swap.c
CommitLineData
a09e091a
JB
1/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
2
3/*
4 * (C) Copyright IBM Corporation 2005
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sub license,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the next
15 * paragraph) shall be included in all copies or substantial portions of the
16 * Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21 * IBM,
22 * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 */
27
28#include <inttypes.h>
29#include "glxserver.h"
30#include "indirect_size.h"
31#include "indirect_size_get.h"
32#include "indirect_dispatch.h"
33#include "glxbyteorder.h"
34#include "indirect_util.h"
35#include "singlesize.h"
36
37#define __GLX_PAD(x) (((x) + 3) & ~3)
38
39typedef struct {
40 __GLX_PIXEL_3D_HDR;
41} __GLXpixel3DHeader;
42
43extern GLboolean __glXErrorOccured(void);
44extern void __glXClearErrorOccured(void);
45
46static const unsigned dummy_answer[2] = { 0, 0 };
47
48static GLsizei
49bswap_CARD32(const void *src)
50{
51 union {
52 uint32_t dst;
53 GLsizei ret;
54 } x;
55
56 x.dst = bswap_32(*(uint32_t *) src);
57 return x.ret;
58}
59
60static GLshort
61bswap_CARD16(const void *src)
62{
63 union {
64 uint16_t dst;
65 GLshort ret;
66 } x;
67
68 x.dst = bswap_16(*(uint16_t *) src);
69 return x.ret;
70}
71
72static GLenum
73bswap_ENUM(const void *src)
74{
75 union {
76 uint32_t dst;
77 GLenum ret;
78 } x;
79
80 x.dst = bswap_32(*(uint32_t *) src);
81 return x.ret;
82}
83
84static GLsync
85bswap_CARD64(const void *src)
86{
87 union {
88 uint64_t dst;
89 GLsync ret;
90 } x;
91
92 x.dst = bswap_64(*(uint64_t *) src);
93 return x.ret;
94}
95
96static GLdouble
97bswap_FLOAT64(const void *src)
98{
99 union {
100 uint64_t dst;
101 GLdouble ret;
102 } x;
103
104 x.dst = bswap_64(*(uint64_t *) src);
105 return x.ret;
106}
107
108static GLfloat
109bswap_FLOAT32(const void *src)
110{
111 union {
112 uint32_t dst;
113 GLfloat ret;
114 } x;
115
116 x.dst = bswap_32(*(uint32_t *) src);
117 return x.ret;
118}
119
120static void *
121bswap_16_array(uint16_t * src, unsigned count)
122{
123 unsigned i;
124
125 for (i = 0; i < count; i++) {
126 uint16_t temp = bswap_16(src[i]);
127
128 src[i] = temp;
129 }
130
131 return src;
132}
133
134static void *
135bswap_32_array(uint32_t * src, unsigned count)
136{
137 unsigned i;
138
139 for (i = 0; i < count; i++) {
140 uint32_t temp = bswap_32(src[i]);
141
142 src[i] = temp;
143 }
144
145 return src;
146}
147
148static void *
149bswap_64_array(uint64_t * src, unsigned count)
150{
151 unsigned i;
152
153 for (i = 0; i < count; i++) {
154 uint64_t temp = bswap_64(src[i]);
155
156 src[i] = temp;
157 }
158
159 return src;
160}
161
162int
163__glXDispSwap_NewList(__GLXclientState * cl, GLbyte * pc)
164{
165 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
166 int error;
167 __GLXcontext *const cx =
168 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
169
170 pc += __GLX_SINGLE_HDR_SIZE;
171 if (cx != NULL) {
172 glNewList((GLuint) bswap_CARD32(pc + 0), (GLenum) bswap_ENUM(pc + 4));
173 error = Success;
174 }
175
176 return error;
177}
178
179int
180__glXDispSwap_EndList(__GLXclientState * cl, GLbyte * pc)
181{
182 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
183 int error;
184 __GLXcontext *const cx =
185 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
186
187 pc += __GLX_SINGLE_HDR_SIZE;
188 if (cx != NULL) {
189 glEndList();
190 error = Success;
191 }
192
193 return error;
194}
195
196void
197__glXDispSwap_CallList(GLbyte * pc)
198{
199 glCallList((GLuint) bswap_CARD32(pc + 0));
200}
201
202void
203__glXDispSwap_CallLists(GLbyte * pc)
204{
205 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
206 const GLenum type = (GLenum) bswap_ENUM(pc + 4);
207 const GLvoid *lists;
208
209 switch (type) {
210 case GL_BYTE:
211 case GL_UNSIGNED_BYTE:
212 case GL_2_BYTES:
213 case GL_3_BYTES:
214 case GL_4_BYTES:
215 lists = (const GLvoid *) (pc + 8);
216 break;
217 case GL_SHORT:
218 case GL_UNSIGNED_SHORT:
219 lists = (const GLvoid *) bswap_16_array((uint16_t *) (pc + 8), n);
220 break;
221 case GL_INT:
222 case GL_UNSIGNED_INT:
223 case GL_FLOAT:
224 lists = (const GLvoid *) bswap_32_array((uint32_t *) (pc + 8), n);
225 break;
226 default:
227 return;
228 }
229
230 glCallLists(n, type, lists);
231}
232
233int
234__glXDispSwap_DeleteLists(__GLXclientState * cl, GLbyte * pc)
235{
236 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
237 int error;
238 __GLXcontext *const cx =
239 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
240
241 pc += __GLX_SINGLE_HDR_SIZE;
242 if (cx != NULL) {
243 glDeleteLists((GLuint) bswap_CARD32(pc + 0),
244 (GLsizei) bswap_CARD32(pc + 4));
245 error = Success;
246 }
247
248 return error;
249}
250
251int
252__glXDispSwap_GenLists(__GLXclientState * cl, GLbyte * pc)
253{
254 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
255 int error;
256 __GLXcontext *const cx =
257 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
258
259 pc += __GLX_SINGLE_HDR_SIZE;
260 if (cx != NULL) {
261 GLuint retval;
262
263 retval = glGenLists((GLsizei) bswap_CARD32(pc + 0));
264 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
265 error = Success;
266 }
267
268 return error;
269}
270
271void
272__glXDispSwap_ListBase(GLbyte * pc)
273{
274 glListBase((GLuint) bswap_CARD32(pc + 0));
275}
276
277void
278__glXDispSwap_Begin(GLbyte * pc)
279{
280 glBegin((GLenum) bswap_ENUM(pc + 0));
281}
282
283void
284__glXDispSwap_Bitmap(GLbyte * pc)
285{
286 const GLubyte *const bitmap = (const GLubyte *) ((pc + 44));
287 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
288
289 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
290 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
291 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
292 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
293 (GLint) bswap_CARD32(&hdr->skipPixels));
294 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
295
296 glBitmap((GLsizei) bswap_CARD32(pc + 20),
297 (GLsizei) bswap_CARD32(pc + 24),
298 (GLfloat) bswap_FLOAT32(pc + 28),
299 (GLfloat) bswap_FLOAT32(pc + 32),
300 (GLfloat) bswap_FLOAT32(pc + 36),
301 (GLfloat) bswap_FLOAT32(pc + 40), bitmap);
302}
303
304void
305__glXDispSwap_Color3bv(GLbyte * pc)
306{
307 glColor3bv((const GLbyte *) (pc + 0));
308}
309
310void
311__glXDispSwap_Color3dv(GLbyte * pc)
312{
313#ifdef __GLX_ALIGN64
314 if ((unsigned long) (pc) & 7) {
315 (void) memmove(pc - 4, pc, 24);
316 pc -= 4;
317 }
318#endif
319
320 glColor3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
321}
322
323void
324__glXDispSwap_Color3fv(GLbyte * pc)
325{
326 glColor3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
327}
328
329void
330__glXDispSwap_Color3iv(GLbyte * pc)
331{
332 glColor3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
333}
334
335void
336__glXDispSwap_Color3sv(GLbyte * pc)
337{
338 glColor3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
339}
340
341void
342__glXDispSwap_Color3ubv(GLbyte * pc)
343{
344 glColor3ubv((const GLubyte *) (pc + 0));
345}
346
347void
348__glXDispSwap_Color3uiv(GLbyte * pc)
349{
350 glColor3uiv((const GLuint *) bswap_32_array((uint32_t *) (pc + 0), 3));
351}
352
353void
354__glXDispSwap_Color3usv(GLbyte * pc)
355{
356 glColor3usv((const GLushort *) bswap_16_array((uint16_t *) (pc + 0), 3));
357}
358
359void
360__glXDispSwap_Color4bv(GLbyte * pc)
361{
362 glColor4bv((const GLbyte *) (pc + 0));
363}
364
365void
366__glXDispSwap_Color4dv(GLbyte * pc)
367{
368#ifdef __GLX_ALIGN64
369 if ((unsigned long) (pc) & 7) {
370 (void) memmove(pc - 4, pc, 32);
371 pc -= 4;
372 }
373#endif
374
375 glColor4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
376}
377
378void
379__glXDispSwap_Color4fv(GLbyte * pc)
380{
381 glColor4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4));
382}
383
384void
385__glXDispSwap_Color4iv(GLbyte * pc)
386{
387 glColor4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4));
388}
389
390void
391__glXDispSwap_Color4sv(GLbyte * pc)
392{
393 glColor4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4));
394}
395
396void
397__glXDispSwap_Color4ubv(GLbyte * pc)
398{
399 glColor4ubv((const GLubyte *) (pc + 0));
400}
401
402void
403__glXDispSwap_Color4uiv(GLbyte * pc)
404{
405 glColor4uiv((const GLuint *) bswap_32_array((uint32_t *) (pc + 0), 4));
406}
407
408void
409__glXDispSwap_Color4usv(GLbyte * pc)
410{
411 glColor4usv((const GLushort *) bswap_16_array((uint16_t *) (pc + 0), 4));
412}
413
414void
415__glXDispSwap_EdgeFlagv(GLbyte * pc)
416{
417 glEdgeFlagv((const GLboolean *) (pc + 0));
418}
419
420void
421__glXDispSwap_End(GLbyte * pc)
422{
423 glEnd();
424}
425
426void
427__glXDispSwap_Indexdv(GLbyte * pc)
428{
429#ifdef __GLX_ALIGN64
430 if ((unsigned long) (pc) & 7) {
431 (void) memmove(pc - 4, pc, 8);
432 pc -= 4;
433 }
434#endif
435
436 glIndexdv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1));
437}
438
439void
440__glXDispSwap_Indexfv(GLbyte * pc)
441{
442 glIndexfv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1));
443}
444
445void
446__glXDispSwap_Indexiv(GLbyte * pc)
447{
448 glIndexiv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 1));
449}
450
451void
452__glXDispSwap_Indexsv(GLbyte * pc)
453{
454 glIndexsv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 1));
455}
456
457void
458__glXDispSwap_Normal3bv(GLbyte * pc)
459{
460 glNormal3bv((const GLbyte *) (pc + 0));
461}
462
463void
464__glXDispSwap_Normal3dv(GLbyte * pc)
465{
466#ifdef __GLX_ALIGN64
467 if ((unsigned long) (pc) & 7) {
468 (void) memmove(pc - 4, pc, 24);
469 pc -= 4;
470 }
471#endif
472
473 glNormal3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
474}
475
476void
477__glXDispSwap_Normal3fv(GLbyte * pc)
478{
479 glNormal3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
480}
481
482void
483__glXDispSwap_Normal3iv(GLbyte * pc)
484{
485 glNormal3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
486}
487
488void
489__glXDispSwap_Normal3sv(GLbyte * pc)
490{
491 glNormal3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
492}
493
494void
495__glXDispSwap_RasterPos2dv(GLbyte * pc)
496{
497#ifdef __GLX_ALIGN64
498 if ((unsigned long) (pc) & 7) {
499 (void) memmove(pc - 4, pc, 16);
500 pc -= 4;
501 }
502#endif
503
504 glRasterPos2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2));
505}
506
507void
508__glXDispSwap_RasterPos2fv(GLbyte * pc)
509{
510 glRasterPos2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2));
511}
512
513void
514__glXDispSwap_RasterPos2iv(GLbyte * pc)
515{
516 glRasterPos2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2));
517}
518
519void
520__glXDispSwap_RasterPos2sv(GLbyte * pc)
521{
522 glRasterPos2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2));
523}
524
525void
526__glXDispSwap_RasterPos3dv(GLbyte * pc)
527{
528#ifdef __GLX_ALIGN64
529 if ((unsigned long) (pc) & 7) {
530 (void) memmove(pc - 4, pc, 24);
531 pc -= 4;
532 }
533#endif
534
535 glRasterPos3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
536}
537
538void
539__glXDispSwap_RasterPos3fv(GLbyte * pc)
540{
541 glRasterPos3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
542}
543
544void
545__glXDispSwap_RasterPos3iv(GLbyte * pc)
546{
547 glRasterPos3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
548}
549
550void
551__glXDispSwap_RasterPos3sv(GLbyte * pc)
552{
553 glRasterPos3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
554}
555
556void
557__glXDispSwap_RasterPos4dv(GLbyte * pc)
558{
559#ifdef __GLX_ALIGN64
560 if ((unsigned long) (pc) & 7) {
561 (void) memmove(pc - 4, pc, 32);
562 pc -= 4;
563 }
564#endif
565
566 glRasterPos4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
567}
568
569void
570__glXDispSwap_RasterPos4fv(GLbyte * pc)
571{
572 glRasterPos4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4));
573}
574
575void
576__glXDispSwap_RasterPos4iv(GLbyte * pc)
577{
578 glRasterPos4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4));
579}
580
581void
582__glXDispSwap_RasterPos4sv(GLbyte * pc)
583{
584 glRasterPos4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4));
585}
586
587void
588__glXDispSwap_Rectdv(GLbyte * pc)
589{
590#ifdef __GLX_ALIGN64
591 if ((unsigned long) (pc) & 7) {
592 (void) memmove(pc - 4, pc, 32);
593 pc -= 4;
594 }
595#endif
596
597 glRectdv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2),
598 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 16), 2));
599}
600
601void
602__glXDispSwap_Rectfv(GLbyte * pc)
603{
604 glRectfv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2),
605 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 2));
606}
607
608void
609__glXDispSwap_Rectiv(GLbyte * pc)
610{
611 glRectiv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2),
612 (const GLint *) bswap_32_array((uint32_t *) (pc + 8), 2));
613}
614
615void
616__glXDispSwap_Rectsv(GLbyte * pc)
617{
618 glRectsv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2),
619 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2));
620}
621
622void
623__glXDispSwap_TexCoord1dv(GLbyte * pc)
624{
625#ifdef __GLX_ALIGN64
626 if ((unsigned long) (pc) & 7) {
627 (void) memmove(pc - 4, pc, 8);
628 pc -= 4;
629 }
630#endif
631
632 glTexCoord1dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1));
633}
634
635void
636__glXDispSwap_TexCoord1fv(GLbyte * pc)
637{
638 glTexCoord1fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1));
639}
640
641void
642__glXDispSwap_TexCoord1iv(GLbyte * pc)
643{
644 glTexCoord1iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 1));
645}
646
647void
648__glXDispSwap_TexCoord1sv(GLbyte * pc)
649{
650 glTexCoord1sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 1));
651}
652
653void
654__glXDispSwap_TexCoord2dv(GLbyte * pc)
655{
656#ifdef __GLX_ALIGN64
657 if ((unsigned long) (pc) & 7) {
658 (void) memmove(pc - 4, pc, 16);
659 pc -= 4;
660 }
661#endif
662
663 glTexCoord2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2));
664}
665
666void
667__glXDispSwap_TexCoord2fv(GLbyte * pc)
668{
669 glTexCoord2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2));
670}
671
672void
673__glXDispSwap_TexCoord2iv(GLbyte * pc)
674{
675 glTexCoord2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2));
676}
677
678void
679__glXDispSwap_TexCoord2sv(GLbyte * pc)
680{
681 glTexCoord2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2));
682}
683
684void
685__glXDispSwap_TexCoord3dv(GLbyte * pc)
686{
687#ifdef __GLX_ALIGN64
688 if ((unsigned long) (pc) & 7) {
689 (void) memmove(pc - 4, pc, 24);
690 pc -= 4;
691 }
692#endif
693
694 glTexCoord3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
695}
696
697void
698__glXDispSwap_TexCoord3fv(GLbyte * pc)
699{
700 glTexCoord3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
701}
702
703void
704__glXDispSwap_TexCoord3iv(GLbyte * pc)
705{
706 glTexCoord3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
707}
708
709void
710__glXDispSwap_TexCoord3sv(GLbyte * pc)
711{
712 glTexCoord3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
713}
714
715void
716__glXDispSwap_TexCoord4dv(GLbyte * pc)
717{
718#ifdef __GLX_ALIGN64
719 if ((unsigned long) (pc) & 7) {
720 (void) memmove(pc - 4, pc, 32);
721 pc -= 4;
722 }
723#endif
724
725 glTexCoord4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
726}
727
728void
729__glXDispSwap_TexCoord4fv(GLbyte * pc)
730{
731 glTexCoord4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4));
732}
733
734void
735__glXDispSwap_TexCoord4iv(GLbyte * pc)
736{
737 glTexCoord4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4));
738}
739
740void
741__glXDispSwap_TexCoord4sv(GLbyte * pc)
742{
743 glTexCoord4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4));
744}
745
746void
747__glXDispSwap_Vertex2dv(GLbyte * pc)
748{
749#ifdef __GLX_ALIGN64
750 if ((unsigned long) (pc) & 7) {
751 (void) memmove(pc - 4, pc, 16);
752 pc -= 4;
753 }
754#endif
755
756 glVertex2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2));
757}
758
759void
760__glXDispSwap_Vertex2fv(GLbyte * pc)
761{
762 glVertex2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2));
763}
764
765void
766__glXDispSwap_Vertex2iv(GLbyte * pc)
767{
768 glVertex2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2));
769}
770
771void
772__glXDispSwap_Vertex2sv(GLbyte * pc)
773{
774 glVertex2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2));
775}
776
777void
778__glXDispSwap_Vertex3dv(GLbyte * pc)
779{
780#ifdef __GLX_ALIGN64
781 if ((unsigned long) (pc) & 7) {
782 (void) memmove(pc - 4, pc, 24);
783 pc -= 4;
784 }
785#endif
786
787 glVertex3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
788}
789
790void
791__glXDispSwap_Vertex3fv(GLbyte * pc)
792{
793 glVertex3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
794}
795
796void
797__glXDispSwap_Vertex3iv(GLbyte * pc)
798{
799 glVertex3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
800}
801
802void
803__glXDispSwap_Vertex3sv(GLbyte * pc)
804{
805 glVertex3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
806}
807
808void
809__glXDispSwap_Vertex4dv(GLbyte * pc)
810{
811#ifdef __GLX_ALIGN64
812 if ((unsigned long) (pc) & 7) {
813 (void) memmove(pc - 4, pc, 32);
814 pc -= 4;
815 }
816#endif
817
818 glVertex4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
819}
820
821void
822__glXDispSwap_Vertex4fv(GLbyte * pc)
823{
824 glVertex4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4));
825}
826
827void
828__glXDispSwap_Vertex4iv(GLbyte * pc)
829{
830 glVertex4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4));
831}
832
833void
834__glXDispSwap_Vertex4sv(GLbyte * pc)
835{
836 glVertex4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4));
837}
838
839void
840__glXDispSwap_ClipPlane(GLbyte * pc)
841{
842#ifdef __GLX_ALIGN64
843 if ((unsigned long) (pc) & 7) {
844 (void) memmove(pc - 4, pc, 36);
845 pc -= 4;
846 }
847#endif
848
849 glClipPlane((GLenum) bswap_ENUM(pc + 32),
850 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
851}
852
853void
854__glXDispSwap_ColorMaterial(GLbyte * pc)
855{
856 glColorMaterial((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
857}
858
859void
860__glXDispSwap_CullFace(GLbyte * pc)
861{
862 glCullFace((GLenum) bswap_ENUM(pc + 0));
863}
864
865void
866__glXDispSwap_Fogf(GLbyte * pc)
867{
868 glFogf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4));
869}
870
871void
872__glXDispSwap_Fogfv(GLbyte * pc)
873{
874 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
875 const GLfloat *params;
876
877 params =
878 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
879 __glFogfv_size(pname));
880
881 glFogfv(pname, params);
882}
883
884void
885__glXDispSwap_Fogi(GLbyte * pc)
886{
887 glFogi((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4));
888}
889
890void
891__glXDispSwap_Fogiv(GLbyte * pc)
892{
893 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
894 const GLint *params;
895
896 params =
897 (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
898 __glFogiv_size(pname));
899
900 glFogiv(pname, params);
901}
902
903void
904__glXDispSwap_FrontFace(GLbyte * pc)
905{
906 glFrontFace((GLenum) bswap_ENUM(pc + 0));
907}
908
909void
910__glXDispSwap_Hint(GLbyte * pc)
911{
912 glHint((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
913}
914
915void
916__glXDispSwap_Lightf(GLbyte * pc)
917{
918 glLightf((GLenum) bswap_ENUM(pc + 0),
919 (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
920}
921
922void
923__glXDispSwap_Lightfv(GLbyte * pc)
924{
925 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
926 const GLfloat *params;
927
928 params =
929 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
930 __glLightfv_size(pname));
931
932 glLightfv((GLenum) bswap_ENUM(pc + 0), pname, params);
933}
934
935void
936__glXDispSwap_Lighti(GLbyte * pc)
937{
938 glLighti((GLenum) bswap_ENUM(pc + 0),
939 (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
940}
941
942void
943__glXDispSwap_Lightiv(GLbyte * pc)
944{
945 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
946 const GLint *params;
947
948 params =
949 (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
950 __glLightiv_size(pname));
951
952 glLightiv((GLenum) bswap_ENUM(pc + 0), pname, params);
953}
954
955void
956__glXDispSwap_LightModelf(GLbyte * pc)
957{
958 glLightModelf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4));
959}
960
961void
962__glXDispSwap_LightModelfv(GLbyte * pc)
963{
964 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
965 const GLfloat *params;
966
967 params =
968 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
969 __glLightModelfv_size(pname));
970
971 glLightModelfv(pname, params);
972}
973
974void
975__glXDispSwap_LightModeli(GLbyte * pc)
976{
977 glLightModeli((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4));
978}
979
980void
981__glXDispSwap_LightModeliv(GLbyte * pc)
982{
983 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
984 const GLint *params;
985
986 params =
987 (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
988 __glLightModeliv_size(pname));
989
990 glLightModeliv(pname, params);
991}
992
993void
994__glXDispSwap_LineStipple(GLbyte * pc)
995{
996 glLineStipple((GLint) bswap_CARD32(pc + 0),
997 (GLushort) bswap_CARD16(pc + 4));
998}
999
1000void
1001__glXDispSwap_LineWidth(GLbyte * pc)
1002{
1003 glLineWidth((GLfloat) bswap_FLOAT32(pc + 0));
1004}
1005
1006void
1007__glXDispSwap_Materialf(GLbyte * pc)
1008{
1009 glMaterialf((GLenum) bswap_ENUM(pc + 0),
1010 (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
1011}
1012
1013void
1014__glXDispSwap_Materialfv(GLbyte * pc)
1015{
1016 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1017 const GLfloat *params;
1018
1019 params =
1020 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
1021 __glMaterialfv_size(pname));
1022
1023 glMaterialfv((GLenum) bswap_ENUM(pc + 0), pname, params);
1024}
1025
1026void
1027__glXDispSwap_Materiali(GLbyte * pc)
1028{
1029 glMateriali((GLenum) bswap_ENUM(pc + 0),
1030 (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
1031}
1032
1033void
1034__glXDispSwap_Materialiv(GLbyte * pc)
1035{
1036 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1037 const GLint *params;
1038
1039 params =
1040 (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
1041 __glMaterialiv_size(pname));
1042
1043 glMaterialiv((GLenum) bswap_ENUM(pc + 0), pname, params);
1044}
1045
1046void
1047__glXDispSwap_PointSize(GLbyte * pc)
1048{
1049 glPointSize((GLfloat) bswap_FLOAT32(pc + 0));
1050}
1051
1052void
1053__glXDispSwap_PolygonMode(GLbyte * pc)
1054{
1055 glPolygonMode((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
1056}
1057
1058void
1059__glXDispSwap_PolygonStipple(GLbyte * pc)
1060{
1061 const GLubyte *const mask = (const GLubyte *) ((pc + 20));
1062 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
1063
1064 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
1065 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
1066 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
1067 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
1068 (GLint) bswap_CARD32(&hdr->skipPixels));
1069 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
1070
1071 glPolygonStipple(mask);
1072}
1073
1074void
1075__glXDispSwap_Scissor(GLbyte * pc)
1076{
1077 glScissor((GLint) bswap_CARD32(pc + 0),
1078 (GLint) bswap_CARD32(pc + 4),
1079 (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12));
1080}
1081
1082void
1083__glXDispSwap_ShadeModel(GLbyte * pc)
1084{
1085 glShadeModel((GLenum) bswap_ENUM(pc + 0));
1086}
1087
1088void
1089__glXDispSwap_TexParameterf(GLbyte * pc)
1090{
1091 glTexParameterf((GLenum) bswap_ENUM(pc + 0),
1092 (GLenum) bswap_ENUM(pc + 4),
1093 (GLfloat) bswap_FLOAT32(pc + 8));
1094}
1095
1096void
1097__glXDispSwap_TexParameterfv(GLbyte * pc)
1098{
1099 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1100 const GLfloat *params;
1101
1102 params =
1103 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
1104 __glTexParameterfv_size(pname));
1105
1106 glTexParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
1107}
1108
1109void
1110__glXDispSwap_TexParameteri(GLbyte * pc)
1111{
1112 glTexParameteri((GLenum) bswap_ENUM(pc + 0),
1113 (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
1114}
1115
1116void
1117__glXDispSwap_TexParameteriv(GLbyte * pc)
1118{
1119 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1120 const GLint *params;
1121
1122 params =
1123 (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
1124 __glTexParameteriv_size(pname));
1125
1126 glTexParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
1127}
1128
1129void
1130__glXDispSwap_TexImage1D(GLbyte * pc)
1131{
1132 const GLvoid *const pixels = (const GLvoid *) ((pc + 52));
1133 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
1134
1135 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
1136 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
1137 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
1138 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
1139 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
1140 (GLint) bswap_CARD32(&hdr->skipPixels));
1141 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
1142
1143 glTexImage1D((GLenum) bswap_ENUM(pc + 20),
1144 (GLint) bswap_CARD32(pc + 24),
1145 (GLint) bswap_CARD32(pc + 28),
1146 (GLsizei) bswap_CARD32(pc + 32),
1147 (GLint) bswap_CARD32(pc + 40),
1148 (GLenum) bswap_ENUM(pc + 44),
1149 (GLenum) bswap_ENUM(pc + 48), pixels);
1150}
1151
1152void
1153__glXDispSwap_TexImage2D(GLbyte * pc)
1154{
1155 const GLvoid *const pixels = (const GLvoid *) ((pc + 52));
1156 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
1157
1158 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
1159 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
1160 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
1161 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
1162 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
1163 (GLint) bswap_CARD32(&hdr->skipPixels));
1164 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
1165
1166 glTexImage2D((GLenum) bswap_ENUM(pc + 20),
1167 (GLint) bswap_CARD32(pc + 24),
1168 (GLint) bswap_CARD32(pc + 28),
1169 (GLsizei) bswap_CARD32(pc + 32),
1170 (GLsizei) bswap_CARD32(pc + 36),
1171 (GLint) bswap_CARD32(pc + 40),
1172 (GLenum) bswap_ENUM(pc + 44),
1173 (GLenum) bswap_ENUM(pc + 48), pixels);
1174}
1175
1176void
1177__glXDispSwap_TexEnvf(GLbyte * pc)
1178{
1179 glTexEnvf((GLenum) bswap_ENUM(pc + 0),
1180 (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
1181}
1182
1183void
1184__glXDispSwap_TexEnvfv(GLbyte * pc)
1185{
1186 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1187 const GLfloat *params;
1188
1189 params =
1190 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
1191 __glTexEnvfv_size(pname));
1192
1193 glTexEnvfv((GLenum) bswap_ENUM(pc + 0), pname, params);
1194}
1195
1196void
1197__glXDispSwap_TexEnvi(GLbyte * pc)
1198{
1199 glTexEnvi((GLenum) bswap_ENUM(pc + 0),
1200 (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
1201}
1202
1203void
1204__glXDispSwap_TexEnviv(GLbyte * pc)
1205{
1206 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1207 const GLint *params;
1208
1209 params =
1210 (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
1211 __glTexEnviv_size(pname));
1212
1213 glTexEnviv((GLenum) bswap_ENUM(pc + 0), pname, params);
1214}
1215
1216void
1217__glXDispSwap_TexGend(GLbyte * pc)
1218{
1219#ifdef __GLX_ALIGN64
1220 if ((unsigned long) (pc) & 7) {
1221 (void) memmove(pc - 4, pc, 16);
1222 pc -= 4;
1223 }
1224#endif
1225
1226 glTexGend((GLenum) bswap_ENUM(pc + 8),
1227 (GLenum) bswap_ENUM(pc + 12), (GLdouble) bswap_FLOAT64(pc + 0));
1228}
1229
1230void
1231__glXDispSwap_TexGendv(GLbyte * pc)
1232{
1233 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1234 const GLdouble *params;
1235
1236#ifdef __GLX_ALIGN64
1237 const GLuint compsize = __glTexGendv_size(pname);
1238 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
1239
1240 if ((unsigned long) (pc) & 7) {
1241 (void) memmove(pc - 4, pc, cmdlen);
1242 pc -= 4;
1243 }
1244#endif
1245
1246 params =
1247 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
1248 __glTexGendv_size(pname));
1249
1250 glTexGendv((GLenum) bswap_ENUM(pc + 0), pname, params);
1251}
1252
1253void
1254__glXDispSwap_TexGenf(GLbyte * pc)
1255{
1256 glTexGenf((GLenum) bswap_ENUM(pc + 0),
1257 (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
1258}
1259
1260void
1261__glXDispSwap_TexGenfv(GLbyte * pc)
1262{
1263 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1264 const GLfloat *params;
1265
1266 params =
1267 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
1268 __glTexGenfv_size(pname));
1269
1270 glTexGenfv((GLenum) bswap_ENUM(pc + 0), pname, params);
1271}
1272
1273void
1274__glXDispSwap_TexGeni(GLbyte * pc)
1275{
1276 glTexGeni((GLenum) bswap_ENUM(pc + 0),
1277 (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
1278}
1279
1280void
1281__glXDispSwap_TexGeniv(GLbyte * pc)
1282{
1283 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1284 const GLint *params;
1285
1286 params =
1287 (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
1288 __glTexGeniv_size(pname));
1289
1290 glTexGeniv((GLenum) bswap_ENUM(pc + 0), pname, params);
1291}
1292
1293void
1294__glXDispSwap_InitNames(GLbyte * pc)
1295{
1296 glInitNames();
1297}
1298
1299void
1300__glXDispSwap_LoadName(GLbyte * pc)
1301{
1302 glLoadName((GLuint) bswap_CARD32(pc + 0));
1303}
1304
1305void
1306__glXDispSwap_PassThrough(GLbyte * pc)
1307{
1308 glPassThrough((GLfloat) bswap_FLOAT32(pc + 0));
1309}
1310
1311void
1312__glXDispSwap_PopName(GLbyte * pc)
1313{
1314 glPopName();
1315}
1316
1317void
1318__glXDispSwap_PushName(GLbyte * pc)
1319{
1320 glPushName((GLuint) bswap_CARD32(pc + 0));
1321}
1322
1323void
1324__glXDispSwap_DrawBuffer(GLbyte * pc)
1325{
1326 glDrawBuffer((GLenum) bswap_ENUM(pc + 0));
1327}
1328
1329void
1330__glXDispSwap_Clear(GLbyte * pc)
1331{
1332 glClear((GLbitfield) bswap_CARD32(pc + 0));
1333}
1334
1335void
1336__glXDispSwap_ClearAccum(GLbyte * pc)
1337{
1338 glClearAccum((GLfloat) bswap_FLOAT32(pc + 0),
1339 (GLfloat) bswap_FLOAT32(pc + 4),
1340 (GLfloat) bswap_FLOAT32(pc + 8),
1341 (GLfloat) bswap_FLOAT32(pc + 12));
1342}
1343
1344void
1345__glXDispSwap_ClearIndex(GLbyte * pc)
1346{
1347 glClearIndex((GLfloat) bswap_FLOAT32(pc + 0));
1348}
1349
1350void
1351__glXDispSwap_ClearColor(GLbyte * pc)
1352{
1353 glClearColor((GLclampf) bswap_FLOAT32(pc + 0),
1354 (GLclampf) bswap_FLOAT32(pc + 4),
1355 (GLclampf) bswap_FLOAT32(pc + 8),
1356 (GLclampf) bswap_FLOAT32(pc + 12));
1357}
1358
1359void
1360__glXDispSwap_ClearStencil(GLbyte * pc)
1361{
1362 glClearStencil((GLint) bswap_CARD32(pc + 0));
1363}
1364
1365void
1366__glXDispSwap_ClearDepth(GLbyte * pc)
1367{
1368#ifdef __GLX_ALIGN64
1369 if ((unsigned long) (pc) & 7) {
1370 (void) memmove(pc - 4, pc, 8);
1371 pc -= 4;
1372 }
1373#endif
1374
1375 glClearDepth((GLclampd) bswap_FLOAT64(pc + 0));
1376}
1377
1378void
1379__glXDispSwap_StencilMask(GLbyte * pc)
1380{
1381 glStencilMask((GLuint) bswap_CARD32(pc + 0));
1382}
1383
1384void
1385__glXDispSwap_ColorMask(GLbyte * pc)
1386{
1387 glColorMask(*(GLboolean *) (pc + 0),
1388 *(GLboolean *) (pc + 1),
1389 *(GLboolean *) (pc + 2), *(GLboolean *) (pc + 3));
1390}
1391
1392void
1393__glXDispSwap_DepthMask(GLbyte * pc)
1394{
1395 glDepthMask(*(GLboolean *) (pc + 0));
1396}
1397
1398void
1399__glXDispSwap_IndexMask(GLbyte * pc)
1400{
1401 glIndexMask((GLuint) bswap_CARD32(pc + 0));
1402}
1403
1404void
1405__glXDispSwap_Accum(GLbyte * pc)
1406{
1407 glAccum((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4));
1408}
1409
1410void
1411__glXDispSwap_Disable(GLbyte * pc)
1412{
1413 glDisable((GLenum) bswap_ENUM(pc + 0));
1414}
1415
1416void
1417__glXDispSwap_Enable(GLbyte * pc)
1418{
1419 glEnable((GLenum) bswap_ENUM(pc + 0));
1420}
1421
1422void
1423__glXDispSwap_PopAttrib(GLbyte * pc)
1424{
1425 glPopAttrib();
1426}
1427
1428void
1429__glXDispSwap_PushAttrib(GLbyte * pc)
1430{
1431 glPushAttrib((GLbitfield) bswap_CARD32(pc + 0));
1432}
1433
1434void
1435__glXDispSwap_MapGrid1d(GLbyte * pc)
1436{
1437#ifdef __GLX_ALIGN64
1438 if ((unsigned long) (pc) & 7) {
1439 (void) memmove(pc - 4, pc, 20);
1440 pc -= 4;
1441 }
1442#endif
1443
1444 glMapGrid1d((GLint) bswap_CARD32(pc + 16),
1445 (GLdouble) bswap_FLOAT64(pc + 0),
1446 (GLdouble) bswap_FLOAT64(pc + 8));
1447}
1448
1449void
1450__glXDispSwap_MapGrid1f(GLbyte * pc)
1451{
1452 glMapGrid1f((GLint) bswap_CARD32(pc + 0),
1453 (GLfloat) bswap_FLOAT32(pc + 4),
1454 (GLfloat) bswap_FLOAT32(pc + 8));
1455}
1456
1457void
1458__glXDispSwap_MapGrid2d(GLbyte * pc)
1459{
1460#ifdef __GLX_ALIGN64
1461 if ((unsigned long) (pc) & 7) {
1462 (void) memmove(pc - 4, pc, 40);
1463 pc -= 4;
1464 }
1465#endif
1466
1467 glMapGrid2d((GLint) bswap_CARD32(pc + 32),
1468 (GLdouble) bswap_FLOAT64(pc + 0),
1469 (GLdouble) bswap_FLOAT64(pc + 8),
1470 (GLint) bswap_CARD32(pc + 36),
1471 (GLdouble) bswap_FLOAT64(pc + 16),
1472 (GLdouble) bswap_FLOAT64(pc + 24));
1473}
1474
1475void
1476__glXDispSwap_MapGrid2f(GLbyte * pc)
1477{
1478 glMapGrid2f((GLint) bswap_CARD32(pc + 0),
1479 (GLfloat) bswap_FLOAT32(pc + 4),
1480 (GLfloat) bswap_FLOAT32(pc + 8),
1481 (GLint) bswap_CARD32(pc + 12),
1482 (GLfloat) bswap_FLOAT32(pc + 16),
1483 (GLfloat) bswap_FLOAT32(pc + 20));
1484}
1485
1486void
1487__glXDispSwap_EvalCoord1dv(GLbyte * pc)
1488{
1489#ifdef __GLX_ALIGN64
1490 if ((unsigned long) (pc) & 7) {
1491 (void) memmove(pc - 4, pc, 8);
1492 pc -= 4;
1493 }
1494#endif
1495
1496 glEvalCoord1dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1));
1497}
1498
1499void
1500__glXDispSwap_EvalCoord1fv(GLbyte * pc)
1501{
1502 glEvalCoord1fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1));
1503}
1504
1505void
1506__glXDispSwap_EvalCoord2dv(GLbyte * pc)
1507{
1508#ifdef __GLX_ALIGN64
1509 if ((unsigned long) (pc) & 7) {
1510 (void) memmove(pc - 4, pc, 16);
1511 pc -= 4;
1512 }
1513#endif
1514
1515 glEvalCoord2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2));
1516}
1517
1518void
1519__glXDispSwap_EvalCoord2fv(GLbyte * pc)
1520{
1521 glEvalCoord2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2));
1522}
1523
1524void
1525__glXDispSwap_EvalMesh1(GLbyte * pc)
1526{
1527 glEvalMesh1((GLenum) bswap_ENUM(pc + 0),
1528 (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8));
1529}
1530
1531void
1532__glXDispSwap_EvalPoint1(GLbyte * pc)
1533{
1534 glEvalPoint1((GLint) bswap_CARD32(pc + 0));
1535}
1536
1537void
1538__glXDispSwap_EvalMesh2(GLbyte * pc)
1539{
1540 glEvalMesh2((GLenum) bswap_ENUM(pc + 0),
1541 (GLint) bswap_CARD32(pc + 4),
1542 (GLint) bswap_CARD32(pc + 8),
1543 (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16));
1544}
1545
1546void
1547__glXDispSwap_EvalPoint2(GLbyte * pc)
1548{
1549 glEvalPoint2((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4));
1550}
1551
1552void
1553__glXDispSwap_AlphaFunc(GLbyte * pc)
1554{
1555 glAlphaFunc((GLenum) bswap_ENUM(pc + 0), (GLclampf) bswap_FLOAT32(pc + 4));
1556}
1557
1558void
1559__glXDispSwap_BlendFunc(GLbyte * pc)
1560{
1561 glBlendFunc((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
1562}
1563
1564void
1565__glXDispSwap_LogicOp(GLbyte * pc)
1566{
1567 glLogicOp((GLenum) bswap_ENUM(pc + 0));
1568}
1569
1570void
1571__glXDispSwap_StencilFunc(GLbyte * pc)
1572{
1573 glStencilFunc((GLenum) bswap_ENUM(pc + 0),
1574 (GLint) bswap_CARD32(pc + 4), (GLuint) bswap_CARD32(pc + 8));
1575}
1576
1577void
1578__glXDispSwap_StencilOp(GLbyte * pc)
1579{
1580 glStencilOp((GLenum) bswap_ENUM(pc + 0),
1581 (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8));
1582}
1583
1584void
1585__glXDispSwap_DepthFunc(GLbyte * pc)
1586{
1587 glDepthFunc((GLenum) bswap_ENUM(pc + 0));
1588}
1589
1590void
1591__glXDispSwap_PixelZoom(GLbyte * pc)
1592{
1593 glPixelZoom((GLfloat) bswap_FLOAT32(pc + 0),
1594 (GLfloat) bswap_FLOAT32(pc + 4));
1595}
1596
1597void
1598__glXDispSwap_PixelTransferf(GLbyte * pc)
1599{
1600 glPixelTransferf((GLenum) bswap_ENUM(pc + 0),
1601 (GLfloat) bswap_FLOAT32(pc + 4));
1602}
1603
1604void
1605__glXDispSwap_PixelTransferi(GLbyte * pc)
1606{
1607 glPixelTransferi((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4));
1608}
1609
1610int
1611__glXDispSwap_PixelStoref(__GLXclientState * cl, GLbyte * pc)
1612{
1613 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1614 int error;
1615 __GLXcontext *const cx =
1616 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1617
1618 pc += __GLX_SINGLE_HDR_SIZE;
1619 if (cx != NULL) {
1620 glPixelStoref((GLenum) bswap_ENUM(pc + 0),
1621 (GLfloat) bswap_FLOAT32(pc + 4));
1622 error = Success;
1623 }
1624
1625 return error;
1626}
1627
1628int
1629__glXDispSwap_PixelStorei(__GLXclientState * cl, GLbyte * pc)
1630{
1631 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1632 int error;
1633 __GLXcontext *const cx =
1634 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1635
1636 pc += __GLX_SINGLE_HDR_SIZE;
1637 if (cx != NULL) {
1638 glPixelStorei((GLenum) bswap_ENUM(pc + 0),
1639 (GLint) bswap_CARD32(pc + 4));
1640 error = Success;
1641 }
1642
1643 return error;
1644}
1645
1646void
1647__glXDispSwap_PixelMapfv(GLbyte * pc)
1648{
1649 const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4);
1650
1651 glPixelMapfv((GLenum) bswap_ENUM(pc + 0),
1652 mapsize,
1653 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 0));
1654}
1655
1656void
1657__glXDispSwap_PixelMapuiv(GLbyte * pc)
1658{
1659 const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4);
1660
1661 glPixelMapuiv((GLenum) bswap_ENUM(pc + 0),
1662 mapsize,
1663 (const GLuint *) bswap_32_array((uint32_t *) (pc + 8), 0));
1664}
1665
1666void
1667__glXDispSwap_PixelMapusv(GLbyte * pc)
1668{
1669 const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4);
1670
1671 glPixelMapusv((GLenum) bswap_ENUM(pc + 0),
1672 mapsize,
1673 (const GLushort *) bswap_16_array((uint16_t *) (pc + 8), 0));
1674}
1675
1676void
1677__glXDispSwap_ReadBuffer(GLbyte * pc)
1678{
1679 glReadBuffer((GLenum) bswap_ENUM(pc + 0));
1680}
1681
1682void
1683__glXDispSwap_CopyPixels(GLbyte * pc)
1684{
1685 glCopyPixels((GLint) bswap_CARD32(pc + 0),
1686 (GLint) bswap_CARD32(pc + 4),
1687 (GLsizei) bswap_CARD32(pc + 8),
1688 (GLsizei) bswap_CARD32(pc + 12), (GLenum) bswap_ENUM(pc + 16));
1689}
1690
1691void
1692__glXDispSwap_DrawPixels(GLbyte * pc)
1693{
1694 const GLvoid *const pixels = (const GLvoid *) ((pc + 36));
1695 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
1696
1697 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
1698 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
1699 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
1700 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
1701 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
1702 (GLint) bswap_CARD32(&hdr->skipPixels));
1703 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
1704
1705 glDrawPixels((GLsizei) bswap_CARD32(pc + 20),
1706 (GLsizei) bswap_CARD32(pc + 24),
1707 (GLenum) bswap_ENUM(pc + 28),
1708 (GLenum) bswap_ENUM(pc + 32), pixels);
1709}
1710
1711int
1712__glXDispSwap_GetBooleanv(__GLXclientState * cl, GLbyte * pc)
1713{
1714 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1715 int error;
1716 __GLXcontext *const cx =
1717 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1718
1719 pc += __GLX_SINGLE_HDR_SIZE;
1720 if (cx != NULL) {
1721 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
1722
1723 const GLuint compsize = __glGetBooleanv_size(pname);
1724 GLboolean answerBuffer[200];
1725 GLboolean *params =
1726 __glXGetAnswerBuffer(cl, compsize, answerBuffer,
1727 sizeof(answerBuffer), 1);
1728
1729 if (params == NULL)
1730 return BadAlloc;
1731 __glXClearErrorOccured();
1732
1733 glGetBooleanv(pname, params);
1734 __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0);
1735 error = Success;
1736 }
1737
1738 return error;
1739}
1740
1741int
1742__glXDispSwap_GetClipPlane(__GLXclientState * cl, GLbyte * pc)
1743{
1744 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1745 int error;
1746 __GLXcontext *const cx =
1747 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1748
1749 pc += __GLX_SINGLE_HDR_SIZE;
1750 if (cx != NULL) {
1751 GLdouble equation[4];
1752
1753 glGetClipPlane((GLenum) bswap_ENUM(pc + 0), equation);
1754 (void) bswap_64_array((uint64_t *) equation, 4);
1755 __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0);
1756 error = Success;
1757 }
1758
1759 return error;
1760}
1761
1762int
1763__glXDispSwap_GetDoublev(__GLXclientState * cl, GLbyte * pc)
1764{
1765 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1766 int error;
1767 __GLXcontext *const cx =
1768 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1769
1770 pc += __GLX_SINGLE_HDR_SIZE;
1771 if (cx != NULL) {
1772 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
1773
1774 const GLuint compsize = __glGetDoublev_size(pname);
1775 GLdouble answerBuffer[200];
1776 GLdouble *params =
1777 __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
1778 sizeof(answerBuffer), 8);
1779
1780 if (params == NULL)
1781 return BadAlloc;
1782 __glXClearErrorOccured();
1783
1784 glGetDoublev(pname, params);
1785 (void) bswap_64_array((uint64_t *) params, compsize);
1786 __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
1787 error = Success;
1788 }
1789
1790 return error;
1791}
1792
1793int
1794__glXDispSwap_GetError(__GLXclientState * cl, GLbyte * pc)
1795{
1796 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1797 int error;
1798 __GLXcontext *const cx =
1799 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1800
1801 pc += __GLX_SINGLE_HDR_SIZE;
1802 if (cx != NULL) {
1803 GLenum retval;
1804
1805 retval = glGetError();
1806 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
1807 error = Success;
1808 }
1809
1810 return error;
1811}
1812
1813int
1814__glXDispSwap_GetFloatv(__GLXclientState * cl, GLbyte * pc)
1815{
1816 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1817 int error;
1818 __GLXcontext *const cx =
1819 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1820
1821 pc += __GLX_SINGLE_HDR_SIZE;
1822 if (cx != NULL) {
1823 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
1824
1825 const GLuint compsize = __glGetFloatv_size(pname);
1826 GLfloat answerBuffer[200];
1827 GLfloat *params =
1828 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1829 sizeof(answerBuffer), 4);
1830
1831 if (params == NULL)
1832 return BadAlloc;
1833 __glXClearErrorOccured();
1834
1835 glGetFloatv(pname, params);
1836 (void) bswap_32_array((uint32_t *) params, compsize);
1837 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
1838 error = Success;
1839 }
1840
1841 return error;
1842}
1843
1844int
1845__glXDispSwap_GetIntegerv(__GLXclientState * cl, GLbyte * pc)
1846{
1847 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1848 int error;
1849 __GLXcontext *const cx =
1850 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1851
1852 pc += __GLX_SINGLE_HDR_SIZE;
1853 if (cx != NULL) {
1854 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
1855
1856 const GLuint compsize = __glGetIntegerv_size(pname);
1857 GLint answerBuffer[200];
1858 GLint *params =
1859 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1860 sizeof(answerBuffer), 4);
1861
1862 if (params == NULL)
1863 return BadAlloc;
1864 __glXClearErrorOccured();
1865
1866 glGetIntegerv(pname, params);
1867 (void) bswap_32_array((uint32_t *) params, compsize);
1868 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
1869 error = Success;
1870 }
1871
1872 return error;
1873}
1874
1875int
1876__glXDispSwap_GetLightfv(__GLXclientState * cl, GLbyte * pc)
1877{
1878 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1879 int error;
1880 __GLXcontext *const cx =
1881 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1882
1883 pc += __GLX_SINGLE_HDR_SIZE;
1884 if (cx != NULL) {
1885 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1886
1887 const GLuint compsize = __glGetLightfv_size(pname);
1888 GLfloat answerBuffer[200];
1889 GLfloat *params =
1890 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1891 sizeof(answerBuffer), 4);
1892
1893 if (params == NULL)
1894 return BadAlloc;
1895 __glXClearErrorOccured();
1896
1897 glGetLightfv((GLenum) bswap_ENUM(pc + 0), pname, params);
1898 (void) bswap_32_array((uint32_t *) params, compsize);
1899 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
1900 error = Success;
1901 }
1902
1903 return error;
1904}
1905
1906int
1907__glXDispSwap_GetLightiv(__GLXclientState * cl, GLbyte * pc)
1908{
1909 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1910 int error;
1911 __GLXcontext *const cx =
1912 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1913
1914 pc += __GLX_SINGLE_HDR_SIZE;
1915 if (cx != NULL) {
1916 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
1917
1918 const GLuint compsize = __glGetLightiv_size(pname);
1919 GLint answerBuffer[200];
1920 GLint *params =
1921 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1922 sizeof(answerBuffer), 4);
1923
1924 if (params == NULL)
1925 return BadAlloc;
1926 __glXClearErrorOccured();
1927
1928 glGetLightiv((GLenum) bswap_ENUM(pc + 0), pname, params);
1929 (void) bswap_32_array((uint32_t *) params, compsize);
1930 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
1931 error = Success;
1932 }
1933
1934 return error;
1935}
1936
1937int
1938__glXDispSwap_GetMapdv(__GLXclientState * cl, GLbyte * pc)
1939{
1940 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1941 int error;
1942 __GLXcontext *const cx =
1943 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1944
1945 pc += __GLX_SINGLE_HDR_SIZE;
1946 if (cx != NULL) {
1947 const GLenum target = (GLenum) bswap_ENUM(pc + 0);
1948 const GLenum query = (GLenum) bswap_ENUM(pc + 4);
1949
1950 const GLuint compsize = __glGetMapdv_size(target, query);
1951 GLdouble answerBuffer[200];
1952 GLdouble *v =
1953 __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
1954 sizeof(answerBuffer), 8);
1955
1956 if (v == NULL)
1957 return BadAlloc;
1958 __glXClearErrorOccured();
1959
1960 glGetMapdv(target, query, v);
1961 (void) bswap_64_array((uint64_t *) v, compsize);
1962 __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0);
1963 error = Success;
1964 }
1965
1966 return error;
1967}
1968
1969int
1970__glXDispSwap_GetMapfv(__GLXclientState * cl, GLbyte * pc)
1971{
1972 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
1973 int error;
1974 __GLXcontext *const cx =
1975 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
1976
1977 pc += __GLX_SINGLE_HDR_SIZE;
1978 if (cx != NULL) {
1979 const GLenum target = (GLenum) bswap_ENUM(pc + 0);
1980 const GLenum query = (GLenum) bswap_ENUM(pc + 4);
1981
1982 const GLuint compsize = __glGetMapfv_size(target, query);
1983 GLfloat answerBuffer[200];
1984 GLfloat *v =
1985 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
1986 sizeof(answerBuffer), 4);
1987
1988 if (v == NULL)
1989 return BadAlloc;
1990 __glXClearErrorOccured();
1991
1992 glGetMapfv(target, query, v);
1993 (void) bswap_32_array((uint32_t *) v, compsize);
1994 __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
1995 error = Success;
1996 }
1997
1998 return error;
1999}
2000
2001int
2002__glXDispSwap_GetMapiv(__GLXclientState * cl, GLbyte * pc)
2003{
2004 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2005 int error;
2006 __GLXcontext *const cx =
2007 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2008
2009 pc += __GLX_SINGLE_HDR_SIZE;
2010 if (cx != NULL) {
2011 const GLenum target = (GLenum) bswap_ENUM(pc + 0);
2012 const GLenum query = (GLenum) bswap_ENUM(pc + 4);
2013
2014 const GLuint compsize = __glGetMapiv_size(target, query);
2015 GLint answerBuffer[200];
2016 GLint *v =
2017 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2018 sizeof(answerBuffer), 4);
2019
2020 if (v == NULL)
2021 return BadAlloc;
2022 __glXClearErrorOccured();
2023
2024 glGetMapiv(target, query, v);
2025 (void) bswap_32_array((uint32_t *) v, compsize);
2026 __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
2027 error = Success;
2028 }
2029
2030 return error;
2031}
2032
2033int
2034__glXDispSwap_GetMaterialfv(__GLXclientState * cl, GLbyte * pc)
2035{
2036 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2037 int error;
2038 __GLXcontext *const cx =
2039 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2040
2041 pc += __GLX_SINGLE_HDR_SIZE;
2042 if (cx != NULL) {
2043 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
2044
2045 const GLuint compsize = __glGetMaterialfv_size(pname);
2046 GLfloat answerBuffer[200];
2047 GLfloat *params =
2048 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2049 sizeof(answerBuffer), 4);
2050
2051 if (params == NULL)
2052 return BadAlloc;
2053 __glXClearErrorOccured();
2054
2055 glGetMaterialfv((GLenum) bswap_ENUM(pc + 0), pname, params);
2056 (void) bswap_32_array((uint32_t *) params, compsize);
2057 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2058 error = Success;
2059 }
2060
2061 return error;
2062}
2063
2064int
2065__glXDispSwap_GetMaterialiv(__GLXclientState * cl, GLbyte * pc)
2066{
2067 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2068 int error;
2069 __GLXcontext *const cx =
2070 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2071
2072 pc += __GLX_SINGLE_HDR_SIZE;
2073 if (cx != NULL) {
2074 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
2075
2076 const GLuint compsize = __glGetMaterialiv_size(pname);
2077 GLint answerBuffer[200];
2078 GLint *params =
2079 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2080 sizeof(answerBuffer), 4);
2081
2082 if (params == NULL)
2083 return BadAlloc;
2084 __glXClearErrorOccured();
2085
2086 glGetMaterialiv((GLenum) bswap_ENUM(pc + 0), pname, params);
2087 (void) bswap_32_array((uint32_t *) params, compsize);
2088 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2089 error = Success;
2090 }
2091
2092 return error;
2093}
2094
2095int
2096__glXDispSwap_GetPixelMapfv(__GLXclientState * cl, GLbyte * pc)
2097{
2098 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2099 int error;
2100 __GLXcontext *const cx =
2101 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2102
2103 pc += __GLX_SINGLE_HDR_SIZE;
2104 if (cx != NULL) {
2105 const GLenum map = (GLenum) bswap_ENUM(pc + 0);
2106
2107 const GLuint compsize = __glGetPixelMapfv_size(map);
2108 GLfloat answerBuffer[200];
2109 GLfloat *values =
2110 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2111 sizeof(answerBuffer), 4);
2112
2113 if (values == NULL)
2114 return BadAlloc;
2115 __glXClearErrorOccured();
2116
2117 glGetPixelMapfv(map, values);
2118 (void) bswap_32_array((uint32_t *) values, compsize);
2119 __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
2120 error = Success;
2121 }
2122
2123 return error;
2124}
2125
2126int
2127__glXDispSwap_GetPixelMapuiv(__GLXclientState * cl, GLbyte * pc)
2128{
2129 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2130 int error;
2131 __GLXcontext *const cx =
2132 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2133
2134 pc += __GLX_SINGLE_HDR_SIZE;
2135 if (cx != NULL) {
2136 const GLenum map = (GLenum) bswap_ENUM(pc + 0);
2137
2138 const GLuint compsize = __glGetPixelMapuiv_size(map);
2139 GLuint answerBuffer[200];
2140 GLuint *values =
2141 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2142 sizeof(answerBuffer), 4);
2143
2144 if (values == NULL)
2145 return BadAlloc;
2146 __glXClearErrorOccured();
2147
2148 glGetPixelMapuiv(map, values);
2149 (void) bswap_32_array((uint32_t *) values, compsize);
2150 __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
2151 error = Success;
2152 }
2153
2154 return error;
2155}
2156
2157int
2158__glXDispSwap_GetPixelMapusv(__GLXclientState * cl, GLbyte * pc)
2159{
2160 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2161 int error;
2162 __GLXcontext *const cx =
2163 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2164
2165 pc += __GLX_SINGLE_HDR_SIZE;
2166 if (cx != NULL) {
2167 const GLenum map = (GLenum) bswap_ENUM(pc + 0);
2168
2169 const GLuint compsize = __glGetPixelMapusv_size(map);
2170 GLushort answerBuffer[200];
2171 GLushort *values =
2172 __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer,
2173 sizeof(answerBuffer), 2);
2174
2175 if (values == NULL)
2176 return BadAlloc;
2177 __glXClearErrorOccured();
2178
2179 glGetPixelMapusv(map, values);
2180 (void) bswap_16_array((uint16_t *) values, compsize);
2181 __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0);
2182 error = Success;
2183 }
2184
2185 return error;
2186}
2187
2188int
2189__glXDispSwap_GetTexEnvfv(__GLXclientState * cl, GLbyte * pc)
2190{
2191 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2192 int error;
2193 __GLXcontext *const cx =
2194 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2195
2196 pc += __GLX_SINGLE_HDR_SIZE;
2197 if (cx != NULL) {
2198 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
2199
2200 const GLuint compsize = __glGetTexEnvfv_size(pname);
2201 GLfloat answerBuffer[200];
2202 GLfloat *params =
2203 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2204 sizeof(answerBuffer), 4);
2205
2206 if (params == NULL)
2207 return BadAlloc;
2208 __glXClearErrorOccured();
2209
2210 glGetTexEnvfv((GLenum) bswap_ENUM(pc + 0), pname, params);
2211 (void) bswap_32_array((uint32_t *) params, compsize);
2212 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2213 error = Success;
2214 }
2215
2216 return error;
2217}
2218
2219int
2220__glXDispSwap_GetTexEnviv(__GLXclientState * cl, GLbyte * pc)
2221{
2222 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2223 int error;
2224 __GLXcontext *const cx =
2225 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2226
2227 pc += __GLX_SINGLE_HDR_SIZE;
2228 if (cx != NULL) {
2229 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
2230
2231 const GLuint compsize = __glGetTexEnviv_size(pname);
2232 GLint answerBuffer[200];
2233 GLint *params =
2234 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2235 sizeof(answerBuffer), 4);
2236
2237 if (params == NULL)
2238 return BadAlloc;
2239 __glXClearErrorOccured();
2240
2241 glGetTexEnviv((GLenum) bswap_ENUM(pc + 0), pname, params);
2242 (void) bswap_32_array((uint32_t *) params, compsize);
2243 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2244 error = Success;
2245 }
2246
2247 return error;
2248}
2249
2250int
2251__glXDispSwap_GetTexGendv(__GLXclientState * cl, GLbyte * pc)
2252{
2253 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2254 int error;
2255 __GLXcontext *const cx =
2256 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2257
2258 pc += __GLX_SINGLE_HDR_SIZE;
2259 if (cx != NULL) {
2260 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
2261
2262 const GLuint compsize = __glGetTexGendv_size(pname);
2263 GLdouble answerBuffer[200];
2264 GLdouble *params =
2265 __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
2266 sizeof(answerBuffer), 8);
2267
2268 if (params == NULL)
2269 return BadAlloc;
2270 __glXClearErrorOccured();
2271
2272 glGetTexGendv((GLenum) bswap_ENUM(pc + 0), pname, params);
2273 (void) bswap_64_array((uint64_t *) params, compsize);
2274 __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
2275 error = Success;
2276 }
2277
2278 return error;
2279}
2280
2281int
2282__glXDispSwap_GetTexGenfv(__GLXclientState * cl, GLbyte * pc)
2283{
2284 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2285 int error;
2286 __GLXcontext *const cx =
2287 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2288
2289 pc += __GLX_SINGLE_HDR_SIZE;
2290 if (cx != NULL) {
2291 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
2292
2293 const GLuint compsize = __glGetTexGenfv_size(pname);
2294 GLfloat answerBuffer[200];
2295 GLfloat *params =
2296 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2297 sizeof(answerBuffer), 4);
2298
2299 if (params == NULL)
2300 return BadAlloc;
2301 __glXClearErrorOccured();
2302
2303 glGetTexGenfv((GLenum) bswap_ENUM(pc + 0), pname, params);
2304 (void) bswap_32_array((uint32_t *) params, compsize);
2305 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2306 error = Success;
2307 }
2308
2309 return error;
2310}
2311
2312int
2313__glXDispSwap_GetTexGeniv(__GLXclientState * cl, GLbyte * pc)
2314{
2315 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2316 int error;
2317 __GLXcontext *const cx =
2318 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2319
2320 pc += __GLX_SINGLE_HDR_SIZE;
2321 if (cx != NULL) {
2322 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
2323
2324 const GLuint compsize = __glGetTexGeniv_size(pname);
2325 GLint answerBuffer[200];
2326 GLint *params =
2327 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2328 sizeof(answerBuffer), 4);
2329
2330 if (params == NULL)
2331 return BadAlloc;
2332 __glXClearErrorOccured();
2333
2334 glGetTexGeniv((GLenum) bswap_ENUM(pc + 0), pname, params);
2335 (void) bswap_32_array((uint32_t *) params, compsize);
2336 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2337 error = Success;
2338 }
2339
2340 return error;
2341}
2342
2343int
2344__glXDispSwap_GetTexParameterfv(__GLXclientState * cl, GLbyte * pc)
2345{
2346 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2347 int error;
2348 __GLXcontext *const cx =
2349 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2350
2351 pc += __GLX_SINGLE_HDR_SIZE;
2352 if (cx != NULL) {
2353 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
2354
2355 const GLuint compsize = __glGetTexParameterfv_size(pname);
2356 GLfloat answerBuffer[200];
2357 GLfloat *params =
2358 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2359 sizeof(answerBuffer), 4);
2360
2361 if (params == NULL)
2362 return BadAlloc;
2363 __glXClearErrorOccured();
2364
2365 glGetTexParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
2366 (void) bswap_32_array((uint32_t *) params, compsize);
2367 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2368 error = Success;
2369 }
2370
2371 return error;
2372}
2373
2374int
2375__glXDispSwap_GetTexParameteriv(__GLXclientState * cl, GLbyte * pc)
2376{
2377 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2378 int error;
2379 __GLXcontext *const cx =
2380 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2381
2382 pc += __GLX_SINGLE_HDR_SIZE;
2383 if (cx != NULL) {
2384 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
2385
2386 const GLuint compsize = __glGetTexParameteriv_size(pname);
2387 GLint answerBuffer[200];
2388 GLint *params =
2389 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2390 sizeof(answerBuffer), 4);
2391
2392 if (params == NULL)
2393 return BadAlloc;
2394 __glXClearErrorOccured();
2395
2396 glGetTexParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
2397 (void) bswap_32_array((uint32_t *) params, compsize);
2398 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2399 error = Success;
2400 }
2401
2402 return error;
2403}
2404
2405int
2406__glXDispSwap_GetTexLevelParameterfv(__GLXclientState * cl, GLbyte * pc)
2407{
2408 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2409 int error;
2410 __GLXcontext *const cx =
2411 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2412
2413 pc += __GLX_SINGLE_HDR_SIZE;
2414 if (cx != NULL) {
2415 const GLenum pname = (GLenum) bswap_ENUM(pc + 8);
2416
2417 const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
2418 GLfloat answerBuffer[200];
2419 GLfloat *params =
2420 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2421 sizeof(answerBuffer), 4);
2422
2423 if (params == NULL)
2424 return BadAlloc;
2425 __glXClearErrorOccured();
2426
2427 glGetTexLevelParameterfv((GLenum) bswap_ENUM(pc + 0),
2428 (GLint) bswap_CARD32(pc + 4), pname, params);
2429 (void) bswap_32_array((uint32_t *) params, compsize);
2430 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2431 error = Success;
2432 }
2433
2434 return error;
2435}
2436
2437int
2438__glXDispSwap_GetTexLevelParameteriv(__GLXclientState * cl, GLbyte * pc)
2439{
2440 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2441 int error;
2442 __GLXcontext *const cx =
2443 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2444
2445 pc += __GLX_SINGLE_HDR_SIZE;
2446 if (cx != NULL) {
2447 const GLenum pname = (GLenum) bswap_ENUM(pc + 8);
2448
2449 const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
2450 GLint answerBuffer[200];
2451 GLint *params =
2452 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
2453 sizeof(answerBuffer), 4);
2454
2455 if (params == NULL)
2456 return BadAlloc;
2457 __glXClearErrorOccured();
2458
2459 glGetTexLevelParameteriv((GLenum) bswap_ENUM(pc + 0),
2460 (GLint) bswap_CARD32(pc + 4), pname, params);
2461 (void) bswap_32_array((uint32_t *) params, compsize);
2462 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2463 error = Success;
2464 }
2465
2466 return error;
2467}
2468
2469int
2470__glXDispSwap_IsEnabled(__GLXclientState * cl, GLbyte * pc)
2471{
2472 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2473 int error;
2474 __GLXcontext *const cx =
2475 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2476
2477 pc += __GLX_SINGLE_HDR_SIZE;
2478 if (cx != NULL) {
2479 GLboolean retval;
2480
2481 retval = glIsEnabled((GLenum) bswap_ENUM(pc + 0));
2482 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2483 error = Success;
2484 }
2485
2486 return error;
2487}
2488
2489int
2490__glXDispSwap_IsList(__GLXclientState * cl, GLbyte * pc)
2491{
2492 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2493 int error;
2494 __GLXcontext *const cx =
2495 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2496
2497 pc += __GLX_SINGLE_HDR_SIZE;
2498 if (cx != NULL) {
2499 GLboolean retval;
2500
2501 retval = glIsList((GLuint) bswap_CARD32(pc + 0));
2502 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2503 error = Success;
2504 }
2505
2506 return error;
2507}
2508
2509void
2510__glXDispSwap_DepthRange(GLbyte * pc)
2511{
2512#ifdef __GLX_ALIGN64
2513 if ((unsigned long) (pc) & 7) {
2514 (void) memmove(pc - 4, pc, 16);
2515 pc -= 4;
2516 }
2517#endif
2518
2519 glDepthRange((GLclampd) bswap_FLOAT64(pc + 0),
2520 (GLclampd) bswap_FLOAT64(pc + 8));
2521}
2522
2523void
2524__glXDispSwap_Frustum(GLbyte * pc)
2525{
2526#ifdef __GLX_ALIGN64
2527 if ((unsigned long) (pc) & 7) {
2528 (void) memmove(pc - 4, pc, 48);
2529 pc -= 4;
2530 }
2531#endif
2532
2533 glFrustum((GLdouble) bswap_FLOAT64(pc + 0),
2534 (GLdouble) bswap_FLOAT64(pc + 8),
2535 (GLdouble) bswap_FLOAT64(pc + 16),
2536 (GLdouble) bswap_FLOAT64(pc + 24),
2537 (GLdouble) bswap_FLOAT64(pc + 32),
2538 (GLdouble) bswap_FLOAT64(pc + 40));
2539}
2540
2541void
2542__glXDispSwap_LoadIdentity(GLbyte * pc)
2543{
2544 glLoadIdentity();
2545}
2546
2547void
2548__glXDispSwap_LoadMatrixf(GLbyte * pc)
2549{
2550 glLoadMatrixf((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 16));
2551}
2552
2553void
2554__glXDispSwap_LoadMatrixd(GLbyte * pc)
2555{
2556#ifdef __GLX_ALIGN64
2557 if ((unsigned long) (pc) & 7) {
2558 (void) memmove(pc - 4, pc, 128);
2559 pc -= 4;
2560 }
2561#endif
2562
2563 glLoadMatrixd((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 16));
2564}
2565
2566void
2567__glXDispSwap_MatrixMode(GLbyte * pc)
2568{
2569 glMatrixMode((GLenum) bswap_ENUM(pc + 0));
2570}
2571
2572void
2573__glXDispSwap_MultMatrixf(GLbyte * pc)
2574{
2575 glMultMatrixf((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 16));
2576}
2577
2578void
2579__glXDispSwap_MultMatrixd(GLbyte * pc)
2580{
2581#ifdef __GLX_ALIGN64
2582 if ((unsigned long) (pc) & 7) {
2583 (void) memmove(pc - 4, pc, 128);
2584 pc -= 4;
2585 }
2586#endif
2587
2588 glMultMatrixd((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 16));
2589}
2590
2591void
2592__glXDispSwap_Ortho(GLbyte * pc)
2593{
2594#ifdef __GLX_ALIGN64
2595 if ((unsigned long) (pc) & 7) {
2596 (void) memmove(pc - 4, pc, 48);
2597 pc -= 4;
2598 }
2599#endif
2600
2601 glOrtho((GLdouble) bswap_FLOAT64(pc + 0),
2602 (GLdouble) bswap_FLOAT64(pc + 8),
2603 (GLdouble) bswap_FLOAT64(pc + 16),
2604 (GLdouble) bswap_FLOAT64(pc + 24),
2605 (GLdouble) bswap_FLOAT64(pc + 32),
2606 (GLdouble) bswap_FLOAT64(pc + 40));
2607}
2608
2609void
2610__glXDispSwap_PopMatrix(GLbyte * pc)
2611{
2612 glPopMatrix();
2613}
2614
2615void
2616__glXDispSwap_PushMatrix(GLbyte * pc)
2617{
2618 glPushMatrix();
2619}
2620
2621void
2622__glXDispSwap_Rotated(GLbyte * pc)
2623{
2624#ifdef __GLX_ALIGN64
2625 if ((unsigned long) (pc) & 7) {
2626 (void) memmove(pc - 4, pc, 32);
2627 pc -= 4;
2628 }
2629#endif
2630
2631 glRotated((GLdouble) bswap_FLOAT64(pc + 0),
2632 (GLdouble) bswap_FLOAT64(pc + 8),
2633 (GLdouble) bswap_FLOAT64(pc + 16),
2634 (GLdouble) bswap_FLOAT64(pc + 24));
2635}
2636
2637void
2638__glXDispSwap_Rotatef(GLbyte * pc)
2639{
2640 glRotatef((GLfloat) bswap_FLOAT32(pc + 0),
2641 (GLfloat) bswap_FLOAT32(pc + 4),
2642 (GLfloat) bswap_FLOAT32(pc + 8),
2643 (GLfloat) bswap_FLOAT32(pc + 12));
2644}
2645
2646void
2647__glXDispSwap_Scaled(GLbyte * pc)
2648{
2649#ifdef __GLX_ALIGN64
2650 if ((unsigned long) (pc) & 7) {
2651 (void) memmove(pc - 4, pc, 24);
2652 pc -= 4;
2653 }
2654#endif
2655
2656 glScaled((GLdouble) bswap_FLOAT64(pc + 0),
2657 (GLdouble) bswap_FLOAT64(pc + 8),
2658 (GLdouble) bswap_FLOAT64(pc + 16));
2659}
2660
2661void
2662__glXDispSwap_Scalef(GLbyte * pc)
2663{
2664 glScalef((GLfloat) bswap_FLOAT32(pc + 0),
2665 (GLfloat) bswap_FLOAT32(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
2666}
2667
2668void
2669__glXDispSwap_Translated(GLbyte * pc)
2670{
2671#ifdef __GLX_ALIGN64
2672 if ((unsigned long) (pc) & 7) {
2673 (void) memmove(pc - 4, pc, 24);
2674 pc -= 4;
2675 }
2676#endif
2677
2678 glTranslated((GLdouble) bswap_FLOAT64(pc + 0),
2679 (GLdouble) bswap_FLOAT64(pc + 8),
2680 (GLdouble) bswap_FLOAT64(pc + 16));
2681}
2682
2683void
2684__glXDispSwap_Translatef(GLbyte * pc)
2685{
2686 glTranslatef((GLfloat) bswap_FLOAT32(pc + 0),
2687 (GLfloat) bswap_FLOAT32(pc + 4),
2688 (GLfloat) bswap_FLOAT32(pc + 8));
2689}
2690
2691void
2692__glXDispSwap_Viewport(GLbyte * pc)
2693{
2694 glViewport((GLint) bswap_CARD32(pc + 0),
2695 (GLint) bswap_CARD32(pc + 4),
2696 (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12));
2697}
2698
2699void
2700__glXDispSwap_BindTexture(GLbyte * pc)
2701{
2702 glBindTexture((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4));
2703}
2704
2705void
2706__glXDispSwap_Indexubv(GLbyte * pc)
2707{
2708 glIndexubv((const GLubyte *) (pc + 0));
2709}
2710
2711void
2712__glXDispSwap_PolygonOffset(GLbyte * pc)
2713{
2714 glPolygonOffset((GLfloat) bswap_FLOAT32(pc + 0),
2715 (GLfloat) bswap_FLOAT32(pc + 4));
2716}
2717
2718int
2719__glXDispSwap_AreTexturesResident(__GLXclientState * cl, GLbyte * pc)
2720{
2721 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2722 int error;
2723 __GLXcontext *const cx =
2724 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2725
2726 pc += __GLX_SINGLE_HDR_SIZE;
2727 if (cx != NULL) {
2728 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
2729
2730 GLboolean retval;
2731 GLboolean answerBuffer[200];
2732 GLboolean *residences =
2733 __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
2734 retval =
2735 glAreTexturesResident(n,
2736 (const GLuint *)
2737 bswap_32_array((uint32_t *) (pc + 4), 0),
2738 residences);
2739 __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
2740 error = Success;
2741 }
2742
2743 return error;
2744}
2745
2746int
2747__glXDispSwap_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc)
2748{
2749 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2750 int error;
2751 __GLXcontext *const cx =
2752 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2753
2754 pc += __GLX_VENDPRIV_HDR_SIZE;
2755 if (cx != NULL) {
2756 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
2757
2758 GLboolean retval;
2759 GLboolean answerBuffer[200];
2760 GLboolean *residences =
2761 __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
2762 retval =
2763 glAreTexturesResident(n,
2764 (const GLuint *)
2765 bswap_32_array((uint32_t *) (pc + 4), 0),
2766 residences);
2767 __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
2768 error = Success;
2769 }
2770
2771 return error;
2772}
2773
2774void
2775__glXDispSwap_CopyTexImage1D(GLbyte * pc)
2776{
2777 glCopyTexImage1D((GLenum) bswap_ENUM(pc + 0),
2778 (GLint) bswap_CARD32(pc + 4),
2779 (GLenum) bswap_ENUM(pc + 8),
2780 (GLint) bswap_CARD32(pc + 12),
2781 (GLint) bswap_CARD32(pc + 16),
2782 (GLsizei) bswap_CARD32(pc + 20),
2783 (GLint) bswap_CARD32(pc + 24));
2784}
2785
2786void
2787__glXDispSwap_CopyTexImage2D(GLbyte * pc)
2788{
2789 glCopyTexImage2D((GLenum) bswap_ENUM(pc + 0),
2790 (GLint) bswap_CARD32(pc + 4),
2791 (GLenum) bswap_ENUM(pc + 8),
2792 (GLint) bswap_CARD32(pc + 12),
2793 (GLint) bswap_CARD32(pc + 16),
2794 (GLsizei) bswap_CARD32(pc + 20),
2795 (GLsizei) bswap_CARD32(pc + 24),
2796 (GLint) bswap_CARD32(pc + 28));
2797}
2798
2799void
2800__glXDispSwap_CopyTexSubImage1D(GLbyte * pc)
2801{
2802 glCopyTexSubImage1D((GLenum) bswap_ENUM(pc + 0),
2803 (GLint) bswap_CARD32(pc + 4),
2804 (GLint) bswap_CARD32(pc + 8),
2805 (GLint) bswap_CARD32(pc + 12),
2806 (GLint) bswap_CARD32(pc + 16),
2807 (GLsizei) bswap_CARD32(pc + 20));
2808}
2809
2810void
2811__glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
2812{
2813 glCopyTexSubImage2D((GLenum) bswap_ENUM(pc + 0),
2814 (GLint) bswap_CARD32(pc + 4),
2815 (GLint) bswap_CARD32(pc + 8),
2816 (GLint) bswap_CARD32(pc + 12),
2817 (GLint) bswap_CARD32(pc + 16),
2818 (GLint) bswap_CARD32(pc + 20),
2819 (GLsizei) bswap_CARD32(pc + 24),
2820 (GLsizei) bswap_CARD32(pc + 28));
2821}
2822
2823int
2824__glXDispSwap_DeleteTextures(__GLXclientState * cl, GLbyte * pc)
2825{
2826 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2827 int error;
2828 __GLXcontext *const cx =
2829 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2830
2831 pc += __GLX_SINGLE_HDR_SIZE;
2832 if (cx != NULL) {
2833 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
2834
2835 glDeleteTextures(n,
2836 (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
2837 0));
2838 error = Success;
2839 }
2840
2841 return error;
2842}
2843
2844int
2845__glXDispSwap_DeleteTexturesEXT(__GLXclientState * cl, GLbyte * pc)
2846{
2847 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2848 int error;
2849 __GLXcontext *const cx =
2850 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2851
2852 pc += __GLX_VENDPRIV_HDR_SIZE;
2853 if (cx != NULL) {
2854 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
2855
2856 glDeleteTextures(n,
2857 (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
2858 0));
2859 error = Success;
2860 }
2861
2862 return error;
2863}
2864
2865int
2866__glXDispSwap_GenTextures(__GLXclientState * cl, GLbyte * pc)
2867{
2868 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2869 int error;
2870 __GLXcontext *const cx =
2871 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2872
2873 pc += __GLX_SINGLE_HDR_SIZE;
2874 if (cx != NULL) {
2875 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
2876
2877 GLuint answerBuffer[200];
2878 GLuint *textures =
2879 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
2880 4);
2881 glGenTextures(n, textures);
2882 (void) bswap_32_array((uint32_t *) textures, n);
2883 __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
2884 error = Success;
2885 }
2886
2887 return error;
2888}
2889
2890int
2891__glXDispSwap_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc)
2892{
2893 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2894 int error;
2895 __GLXcontext *const cx =
2896 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2897
2898 pc += __GLX_VENDPRIV_HDR_SIZE;
2899 if (cx != NULL) {
2900 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
2901
2902 GLuint answerBuffer[200];
2903 GLuint *textures =
2904 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
2905 4);
2906 glGenTextures(n, textures);
2907 (void) bswap_32_array((uint32_t *) textures, n);
2908 __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
2909 error = Success;
2910 }
2911
2912 return error;
2913}
2914
2915int
2916__glXDispSwap_IsTexture(__GLXclientState * cl, GLbyte * pc)
2917{
2918 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
2919 int error;
2920 __GLXcontext *const cx =
2921 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2922
2923 pc += __GLX_SINGLE_HDR_SIZE;
2924 if (cx != NULL) {
2925 GLboolean retval;
2926
2927 retval = glIsTexture((GLuint) bswap_CARD32(pc + 0));
2928 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2929 error = Success;
2930 }
2931
2932 return error;
2933}
2934
2935int
2936__glXDispSwap_IsTextureEXT(__GLXclientState * cl, GLbyte * pc)
2937{
2938 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
2939 int error;
2940 __GLXcontext *const cx =
2941 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
2942
2943 pc += __GLX_VENDPRIV_HDR_SIZE;
2944 if (cx != NULL) {
2945 GLboolean retval;
2946
2947 retval = glIsTexture((GLuint) bswap_CARD32(pc + 0));
2948 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2949 error = Success;
2950 }
2951
2952 return error;
2953}
2954
2955void
2956__glXDispSwap_PrioritizeTextures(GLbyte * pc)
2957{
2958 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
2959
2960 glPrioritizeTextures(n,
2961 (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
2962 0),
2963 (const GLclampf *)
2964 bswap_32_array((uint32_t *) (pc + 4), 0));
2965}
2966
2967void
2968__glXDispSwap_TexSubImage1D(GLbyte * pc)
2969{
2970 const GLvoid *const pixels = (const GLvoid *) ((pc + 56));
2971 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
2972
2973 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
2974 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
2975 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
2976 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
2977 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
2978 (GLint) bswap_CARD32(&hdr->skipPixels));
2979 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
2980
2981 glTexSubImage1D((GLenum) bswap_ENUM(pc + 20),
2982 (GLint) bswap_CARD32(pc + 24),
2983 (GLint) bswap_CARD32(pc + 28),
2984 (GLsizei) bswap_CARD32(pc + 36),
2985 (GLenum) bswap_ENUM(pc + 44),
2986 (GLenum) bswap_ENUM(pc + 48), pixels);
2987}
2988
2989void
2990__glXDispSwap_TexSubImage2D(GLbyte * pc)
2991{
2992 const GLvoid *const pixels = (const GLvoid *) ((pc + 56));
2993 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
2994
2995 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
2996 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
2997 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
2998 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
2999 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
3000 (GLint) bswap_CARD32(&hdr->skipPixels));
3001 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
3002
3003 glTexSubImage2D((GLenum) bswap_ENUM(pc + 20),
3004 (GLint) bswap_CARD32(pc + 24),
3005 (GLint) bswap_CARD32(pc + 28),
3006 (GLint) bswap_CARD32(pc + 32),
3007 (GLsizei) bswap_CARD32(pc + 36),
3008 (GLsizei) bswap_CARD32(pc + 40),
3009 (GLenum) bswap_ENUM(pc + 44),
3010 (GLenum) bswap_ENUM(pc + 48), pixels);
3011}
3012
3013void
3014__glXDispSwap_BlendColor(GLbyte * pc)
3015{
3016 glBlendColor((GLclampf) bswap_FLOAT32(pc + 0),
3017 (GLclampf) bswap_FLOAT32(pc + 4),
3018 (GLclampf) bswap_FLOAT32(pc + 8),
3019 (GLclampf) bswap_FLOAT32(pc + 12));
3020}
3021
3022void
3023__glXDispSwap_BlendEquation(GLbyte * pc)
3024{
3025 glBlendEquation((GLenum) bswap_ENUM(pc + 0));
3026}
3027
3028void
3029__glXDispSwap_ColorTable(GLbyte * pc)
3030{
3031 const GLvoid *const table = (const GLvoid *) ((pc + 40));
3032 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
3033
3034 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
3035 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
3036 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
3037 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
3038 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
3039 (GLint) bswap_CARD32(&hdr->skipPixels));
3040 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
3041
3042 glColorTable((GLenum) bswap_ENUM(pc + 20),
3043 (GLenum) bswap_ENUM(pc + 24),
3044 (GLsizei) bswap_CARD32(pc + 28),
3045 (GLenum) bswap_ENUM(pc + 32),
3046 (GLenum) bswap_ENUM(pc + 36), table);
3047}
3048
3049void
3050__glXDispSwap_ColorTableParameterfv(GLbyte * pc)
3051{
3052 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3053 const GLfloat *params;
3054
3055 params =
3056 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
3057 __glColorTableParameterfv_size(pname));
3058
3059 glColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3060}
3061
3062void
3063__glXDispSwap_ColorTableParameteriv(GLbyte * pc)
3064{
3065 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3066 const GLint *params;
3067
3068 params =
3069 (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
3070 __glColorTableParameteriv_size(pname));
3071
3072 glColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3073}
3074
3075void
3076__glXDispSwap_CopyColorTable(GLbyte * pc)
3077{
3078 glCopyColorTable((GLenum) bswap_ENUM(pc + 0),
3079 (GLenum) bswap_ENUM(pc + 4),
3080 (GLint) bswap_CARD32(pc + 8),
3081 (GLint) bswap_CARD32(pc + 12),
3082 (GLsizei) bswap_CARD32(pc + 16));
3083}
3084
3085int
3086__glXDispSwap_GetColorTableParameterfv(__GLXclientState * cl, GLbyte * pc)
3087{
3088 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3089 int error;
3090 __GLXcontext *const cx =
3091 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3092
3093 pc += __GLX_SINGLE_HDR_SIZE;
3094 if (cx != NULL) {
3095 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3096
3097 const GLuint compsize = __glGetColorTableParameterfv_size(pname);
3098 GLfloat answerBuffer[200];
3099 GLfloat *params =
3100 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3101 sizeof(answerBuffer), 4);
3102
3103 if (params == NULL)
3104 return BadAlloc;
3105 __glXClearErrorOccured();
3106
3107 glGetColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3108 (void) bswap_32_array((uint32_t *) params, compsize);
3109 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3110 error = Success;
3111 }
3112
3113 return error;
3114}
3115
3116int
3117__glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState * cl, GLbyte * pc)
3118{
3119 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3120 int error;
3121 __GLXcontext *const cx =
3122 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3123
3124 pc += __GLX_VENDPRIV_HDR_SIZE;
3125 if (cx != NULL) {
3126 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3127
3128 const GLuint compsize = __glGetColorTableParameterfv_size(pname);
3129 GLfloat answerBuffer[200];
3130 GLfloat *params =
3131 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3132 sizeof(answerBuffer), 4);
3133
3134 if (params == NULL)
3135 return BadAlloc;
3136 __glXClearErrorOccured();
3137
3138 glGetColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3139 (void) bswap_32_array((uint32_t *) params, compsize);
3140 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3141 error = Success;
3142 }
3143
3144 return error;
3145}
3146
3147int
3148__glXDispSwap_GetColorTableParameteriv(__GLXclientState * cl, GLbyte * pc)
3149{
3150 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3151 int error;
3152 __GLXcontext *const cx =
3153 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3154
3155 pc += __GLX_SINGLE_HDR_SIZE;
3156 if (cx != NULL) {
3157 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3158
3159 const GLuint compsize = __glGetColorTableParameteriv_size(pname);
3160 GLint answerBuffer[200];
3161 GLint *params =
3162 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3163 sizeof(answerBuffer), 4);
3164
3165 if (params == NULL)
3166 return BadAlloc;
3167 __glXClearErrorOccured();
3168
3169 glGetColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3170 (void) bswap_32_array((uint32_t *) params, compsize);
3171 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3172 error = Success;
3173 }
3174
3175 return error;
3176}
3177
3178int
3179__glXDispSwap_GetColorTableParameterivSGI(__GLXclientState * cl, GLbyte * pc)
3180{
3181 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3182 int error;
3183 __GLXcontext *const cx =
3184 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3185
3186 pc += __GLX_VENDPRIV_HDR_SIZE;
3187 if (cx != NULL) {
3188 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3189
3190 const GLuint compsize = __glGetColorTableParameteriv_size(pname);
3191 GLint answerBuffer[200];
3192 GLint *params =
3193 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3194 sizeof(answerBuffer), 4);
3195
3196 if (params == NULL)
3197 return BadAlloc;
3198 __glXClearErrorOccured();
3199
3200 glGetColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3201 (void) bswap_32_array((uint32_t *) params, compsize);
3202 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3203 error = Success;
3204 }
3205
3206 return error;
3207}
3208
3209void
3210__glXDispSwap_ColorSubTable(GLbyte * pc)
3211{
3212 const GLvoid *const data = (const GLvoid *) ((pc + 40));
3213 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
3214
3215 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
3216 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
3217 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
3218 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
3219 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
3220 (GLint) bswap_CARD32(&hdr->skipPixels));
3221 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
3222
3223 glColorSubTable((GLenum) bswap_ENUM(pc + 20),
3224 (GLsizei) bswap_CARD32(pc + 24),
3225 (GLsizei) bswap_CARD32(pc + 28),
3226 (GLenum) bswap_ENUM(pc + 32),
3227 (GLenum) bswap_ENUM(pc + 36), data);
3228}
3229
3230void
3231__glXDispSwap_CopyColorSubTable(GLbyte * pc)
3232{
3233 glCopyColorSubTable((GLenum) bswap_ENUM(pc + 0),
3234 (GLsizei) bswap_CARD32(pc + 4),
3235 (GLint) bswap_CARD32(pc + 8),
3236 (GLint) bswap_CARD32(pc + 12),
3237 (GLsizei) bswap_CARD32(pc + 16));
3238}
3239
3240void
3241__glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
3242{
3243 const GLvoid *const image = (const GLvoid *) ((pc + 44));
3244 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
3245
3246 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
3247 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
3248 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
3249 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
3250 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
3251 (GLint) bswap_CARD32(&hdr->skipPixels));
3252 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
3253
3254 glConvolutionFilter1D((GLenum) bswap_ENUM(pc + 20),
3255 (GLenum) bswap_ENUM(pc + 24),
3256 (GLsizei) bswap_CARD32(pc + 28),
3257 (GLenum) bswap_ENUM(pc + 36),
3258 (GLenum) bswap_ENUM(pc + 40), image);
3259}
3260
3261void
3262__glXDispSwap_ConvolutionFilter2D(GLbyte * pc)
3263{
3264 const GLvoid *const image = (const GLvoid *) ((pc + 44));
3265 __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
3266
3267 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
3268 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
3269 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
3270 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
3271 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
3272 (GLint) bswap_CARD32(&hdr->skipPixels));
3273 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
3274
3275 glConvolutionFilter2D((GLenum) bswap_ENUM(pc + 20),
3276 (GLenum) bswap_ENUM(pc + 24),
3277 (GLsizei) bswap_CARD32(pc + 28),
3278 (GLsizei) bswap_CARD32(pc + 32),
3279 (GLenum) bswap_ENUM(pc + 36),
3280 (GLenum) bswap_ENUM(pc + 40), image);
3281}
3282
3283void
3284__glXDispSwap_ConvolutionParameterf(GLbyte * pc)
3285{
3286 glConvolutionParameterf((GLenum) bswap_ENUM(pc + 0),
3287 (GLenum) bswap_ENUM(pc + 4),
3288 (GLfloat) bswap_FLOAT32(pc + 8));
3289}
3290
3291void
3292__glXDispSwap_ConvolutionParameterfv(GLbyte * pc)
3293{
3294 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3295 const GLfloat *params;
3296
3297 params =
3298 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
3299 __glConvolutionParameterfv_size
3300 (pname));
3301
3302 glConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3303}
3304
3305void
3306__glXDispSwap_ConvolutionParameteri(GLbyte * pc)
3307{
3308 glConvolutionParameteri((GLenum) bswap_ENUM(pc + 0),
3309 (GLenum) bswap_ENUM(pc + 4),
3310 (GLint) bswap_CARD32(pc + 8));
3311}
3312
3313void
3314__glXDispSwap_ConvolutionParameteriv(GLbyte * pc)
3315{
3316 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3317 const GLint *params;
3318
3319 params =
3320 (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
3321 __glConvolutionParameteriv_size(pname));
3322
3323 glConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3324}
3325
3326void
3327__glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc)
3328{
3329 glCopyConvolutionFilter1D((GLenum) bswap_ENUM(pc + 0),
3330 (GLenum) bswap_ENUM(pc + 4),
3331 (GLint) bswap_CARD32(pc + 8),
3332 (GLint) bswap_CARD32(pc + 12),
3333 (GLsizei) bswap_CARD32(pc + 16));
3334}
3335
3336void
3337__glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc)
3338{
3339 glCopyConvolutionFilter2D((GLenum) bswap_ENUM(pc + 0),
3340 (GLenum) bswap_ENUM(pc + 4),
3341 (GLint) bswap_CARD32(pc + 8),
3342 (GLint) bswap_CARD32(pc + 12),
3343 (GLsizei) bswap_CARD32(pc + 16),
3344 (GLsizei) bswap_CARD32(pc + 20));
3345}
3346
3347int
3348__glXDispSwap_GetConvolutionParameterfv(__GLXclientState * cl, GLbyte * pc)
3349{
3350 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3351 int error;
3352 __GLXcontext *const cx =
3353 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3354
3355 pc += __GLX_SINGLE_HDR_SIZE;
3356 if (cx != NULL) {
3357 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3358
3359 const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
3360 GLfloat answerBuffer[200];
3361 GLfloat *params =
3362 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3363 sizeof(answerBuffer), 4);
3364
3365 if (params == NULL)
3366 return BadAlloc;
3367 __glXClearErrorOccured();
3368
3369 glGetConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3370 (void) bswap_32_array((uint32_t *) params, compsize);
3371 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3372 error = Success;
3373 }
3374
3375 return error;
3376}
3377
3378int
3379__glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
3380{
3381 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3382 int error;
3383 __GLXcontext *const cx =
3384 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3385
3386 pc += __GLX_VENDPRIV_HDR_SIZE;
3387 if (cx != NULL) {
3388 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3389
3390 const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
3391 GLfloat answerBuffer[200];
3392 GLfloat *params =
3393 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3394 sizeof(answerBuffer), 4);
3395
3396 if (params == NULL)
3397 return BadAlloc;
3398 __glXClearErrorOccured();
3399
3400 glGetConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3401 (void) bswap_32_array((uint32_t *) params, compsize);
3402 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3403 error = Success;
3404 }
3405
3406 return error;
3407}
3408
3409int
3410__glXDispSwap_GetConvolutionParameteriv(__GLXclientState * cl, GLbyte * pc)
3411{
3412 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3413 int error;
3414 __GLXcontext *const cx =
3415 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3416
3417 pc += __GLX_SINGLE_HDR_SIZE;
3418 if (cx != NULL) {
3419 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3420
3421 const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
3422 GLint answerBuffer[200];
3423 GLint *params =
3424 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3425 sizeof(answerBuffer), 4);
3426
3427 if (params == NULL)
3428 return BadAlloc;
3429 __glXClearErrorOccured();
3430
3431 glGetConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3432 (void) bswap_32_array((uint32_t *) params, compsize);
3433 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3434 error = Success;
3435 }
3436
3437 return error;
3438}
3439
3440int
3441__glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState * cl, GLbyte * pc)
3442{
3443 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3444 int error;
3445 __GLXcontext *const cx =
3446 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3447
3448 pc += __GLX_VENDPRIV_HDR_SIZE;
3449 if (cx != NULL) {
3450 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3451
3452 const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
3453 GLint answerBuffer[200];
3454 GLint *params =
3455 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3456 sizeof(answerBuffer), 4);
3457
3458 if (params == NULL)
3459 return BadAlloc;
3460 __glXClearErrorOccured();
3461
3462 glGetConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3463 (void) bswap_32_array((uint32_t *) params, compsize);
3464 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3465 error = Success;
3466 }
3467
3468 return error;
3469}
3470
3471int
3472__glXDispSwap_GetHistogramParameterfv(__GLXclientState * cl, GLbyte * pc)
3473{
3474 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3475 int error;
3476 __GLXcontext *const cx =
3477 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3478
3479 pc += __GLX_SINGLE_HDR_SIZE;
3480 if (cx != NULL) {
3481 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3482
3483 const GLuint compsize = __glGetHistogramParameterfv_size(pname);
3484 GLfloat answerBuffer[200];
3485 GLfloat *params =
3486 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3487 sizeof(answerBuffer), 4);
3488
3489 if (params == NULL)
3490 return BadAlloc;
3491 __glXClearErrorOccured();
3492
3493 glGetHistogramParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3494 (void) bswap_32_array((uint32_t *) params, compsize);
3495 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3496 error = Success;
3497 }
3498
3499 return error;
3500}
3501
3502int
3503__glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
3504{
3505 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3506 int error;
3507 __GLXcontext *const cx =
3508 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3509
3510 pc += __GLX_VENDPRIV_HDR_SIZE;
3511 if (cx != NULL) {
3512 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3513
3514 const GLuint compsize = __glGetHistogramParameterfv_size(pname);
3515 GLfloat answerBuffer[200];
3516 GLfloat *params =
3517 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3518 sizeof(answerBuffer), 4);
3519
3520 if (params == NULL)
3521 return BadAlloc;
3522 __glXClearErrorOccured();
3523
3524 glGetHistogramParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3525 (void) bswap_32_array((uint32_t *) params, compsize);
3526 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3527 error = Success;
3528 }
3529
3530 return error;
3531}
3532
3533int
3534__glXDispSwap_GetHistogramParameteriv(__GLXclientState * cl, GLbyte * pc)
3535{
3536 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3537 int error;
3538 __GLXcontext *const cx =
3539 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3540
3541 pc += __GLX_SINGLE_HDR_SIZE;
3542 if (cx != NULL) {
3543 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3544
3545 const GLuint compsize = __glGetHistogramParameteriv_size(pname);
3546 GLint answerBuffer[200];
3547 GLint *params =
3548 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3549 sizeof(answerBuffer), 4);
3550
3551 if (params == NULL)
3552 return BadAlloc;
3553 __glXClearErrorOccured();
3554
3555 glGetHistogramParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3556 (void) bswap_32_array((uint32_t *) params, compsize);
3557 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3558 error = Success;
3559 }
3560
3561 return error;
3562}
3563
3564int
3565__glXDispSwap_GetHistogramParameterivEXT(__GLXclientState * cl, GLbyte * pc)
3566{
3567 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3568 int error;
3569 __GLXcontext *const cx =
3570 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3571
3572 pc += __GLX_VENDPRIV_HDR_SIZE;
3573 if (cx != NULL) {
3574 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3575
3576 const GLuint compsize = __glGetHistogramParameteriv_size(pname);
3577 GLint answerBuffer[200];
3578 GLint *params =
3579 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3580 sizeof(answerBuffer), 4);
3581
3582 if (params == NULL)
3583 return BadAlloc;
3584 __glXClearErrorOccured();
3585
3586 glGetHistogramParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3587 (void) bswap_32_array((uint32_t *) params, compsize);
3588 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3589 error = Success;
3590 }
3591
3592 return error;
3593}
3594
3595int
3596__glXDispSwap_GetMinmaxParameterfv(__GLXclientState * cl, GLbyte * pc)
3597{
3598 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3599 int error;
3600 __GLXcontext *const cx =
3601 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3602
3603 pc += __GLX_SINGLE_HDR_SIZE;
3604 if (cx != NULL) {
3605 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3606
3607 const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
3608 GLfloat answerBuffer[200];
3609 GLfloat *params =
3610 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3611 sizeof(answerBuffer), 4);
3612
3613 if (params == NULL)
3614 return BadAlloc;
3615 __glXClearErrorOccured();
3616
3617 glGetMinmaxParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3618 (void) bswap_32_array((uint32_t *) params, compsize);
3619 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3620 error = Success;
3621 }
3622
3623 return error;
3624}
3625
3626int
3627__glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
3628{
3629 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3630 int error;
3631 __GLXcontext *const cx =
3632 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3633
3634 pc += __GLX_VENDPRIV_HDR_SIZE;
3635 if (cx != NULL) {
3636 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3637
3638 const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
3639 GLfloat answerBuffer[200];
3640 GLfloat *params =
3641 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3642 sizeof(answerBuffer), 4);
3643
3644 if (params == NULL)
3645 return BadAlloc;
3646 __glXClearErrorOccured();
3647
3648 glGetMinmaxParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
3649 (void) bswap_32_array((uint32_t *) params, compsize);
3650 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3651 error = Success;
3652 }
3653
3654 return error;
3655}
3656
3657int
3658__glXDispSwap_GetMinmaxParameteriv(__GLXclientState * cl, GLbyte * pc)
3659{
3660 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
3661 int error;
3662 __GLXcontext *const cx =
3663 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3664
3665 pc += __GLX_SINGLE_HDR_SIZE;
3666 if (cx != NULL) {
3667 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3668
3669 const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
3670 GLint answerBuffer[200];
3671 GLint *params =
3672 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3673 sizeof(answerBuffer), 4);
3674
3675 if (params == NULL)
3676 return BadAlloc;
3677 __glXClearErrorOccured();
3678
3679 glGetMinmaxParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3680 (void) bswap_32_array((uint32_t *) params, compsize);
3681 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3682 error = Success;
3683 }
3684
3685 return error;
3686}
3687
3688int
3689__glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState * cl, GLbyte * pc)
3690{
3691 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
3692 int error;
3693 __GLXcontext *const cx =
3694 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
3695
3696 pc += __GLX_VENDPRIV_HDR_SIZE;
3697 if (cx != NULL) {
3698 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
3699
3700 const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
3701 GLint answerBuffer[200];
3702 GLint *params =
3703 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
3704 sizeof(answerBuffer), 4);
3705
3706 if (params == NULL)
3707 return BadAlloc;
3708 __glXClearErrorOccured();
3709
3710 glGetMinmaxParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
3711 (void) bswap_32_array((uint32_t *) params, compsize);
3712 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3713 error = Success;
3714 }
3715
3716 return error;
3717}
3718
3719void
3720__glXDispSwap_Histogram(GLbyte * pc)
3721{
3722 glHistogram((GLenum) bswap_ENUM(pc + 0),
3723 (GLsizei) bswap_CARD32(pc + 4),
3724 (GLenum) bswap_ENUM(pc + 8), *(GLboolean *) (pc + 12));
3725}
3726
3727void
3728__glXDispSwap_Minmax(GLbyte * pc)
3729{
3730 glMinmax((GLenum) bswap_ENUM(pc + 0),
3731 (GLenum) bswap_ENUM(pc + 4), *(GLboolean *) (pc + 8));
3732}
3733
3734void
3735__glXDispSwap_ResetHistogram(GLbyte * pc)
3736{
3737 glResetHistogram((GLenum) bswap_ENUM(pc + 0));
3738}
3739
3740void
3741__glXDispSwap_ResetMinmax(GLbyte * pc)
3742{
3743 glResetMinmax((GLenum) bswap_ENUM(pc + 0));
3744}
3745
3746void
3747__glXDispSwap_TexImage3D(GLbyte * pc)
3748{
3749 const CARD32 ptr_is_null = *(CARD32 *) (pc + 76);
3750 const GLvoid *const pixels =
3751 (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80));
3752 __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc);
3753
3754 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
3755 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
3756 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
3757 glPixelStorei(GL_UNPACK_IMAGE_HEIGHT,
3758 (GLint) bswap_CARD32(&hdr->imageHeight));
3759 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
3760 glPixelStorei(GL_UNPACK_SKIP_IMAGES,
3761 (GLint) bswap_CARD32(&hdr->skipImages));
3762 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
3763 (GLint) bswap_CARD32(&hdr->skipPixels));
3764 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
3765
3766 glTexImage3D((GLenum) bswap_ENUM(pc + 36),
3767 (GLint) bswap_CARD32(pc + 40),
3768 (GLint) bswap_CARD32(pc + 44),
3769 (GLsizei) bswap_CARD32(pc + 48),
3770 (GLsizei) bswap_CARD32(pc + 52),
3771 (GLsizei) bswap_CARD32(pc + 56),
3772 (GLint) bswap_CARD32(pc + 64),
3773 (GLenum) bswap_ENUM(pc + 68),
3774 (GLenum) bswap_ENUM(pc + 72), pixels);
3775}
3776
3777void
3778__glXDispSwap_TexSubImage3D(GLbyte * pc)
3779{
3780 const GLvoid *const pixels = (const GLvoid *) ((pc + 88));
3781 __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc);
3782
3783 glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
3784 glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
3785 glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
3786 glPixelStorei(GL_UNPACK_IMAGE_HEIGHT,
3787 (GLint) bswap_CARD32(&hdr->imageHeight));
3788 glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
3789 glPixelStorei(GL_UNPACK_SKIP_IMAGES,
3790 (GLint) bswap_CARD32(&hdr->skipImages));
3791 glPixelStorei(GL_UNPACK_SKIP_PIXELS,
3792 (GLint) bswap_CARD32(&hdr->skipPixels));
3793 glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
3794
3795 glTexSubImage3D((GLenum) bswap_ENUM(pc + 36),
3796 (GLint) bswap_CARD32(pc + 40),
3797 (GLint) bswap_CARD32(pc + 44),
3798 (GLint) bswap_CARD32(pc + 48),
3799 (GLint) bswap_CARD32(pc + 52),
3800 (GLsizei) bswap_CARD32(pc + 60),
3801 (GLsizei) bswap_CARD32(pc + 64),
3802 (GLsizei) bswap_CARD32(pc + 68),
3803 (GLenum) bswap_ENUM(pc + 76),
3804 (GLenum) bswap_ENUM(pc + 80), pixels);
3805}
3806
3807void
3808__glXDispSwap_CopyTexSubImage3D(GLbyte * pc)
3809{
3810 glCopyTexSubImage3D((GLenum) bswap_ENUM(pc + 0),
3811 (GLint) bswap_CARD32(pc + 4),
3812 (GLint) bswap_CARD32(pc + 8),
3813 (GLint) bswap_CARD32(pc + 12),
3814 (GLint) bswap_CARD32(pc + 16),
3815 (GLint) bswap_CARD32(pc + 20),
3816 (GLint) bswap_CARD32(pc + 24),
3817 (GLsizei) bswap_CARD32(pc + 28),
3818 (GLsizei) bswap_CARD32(pc + 32));
3819}
3820
3821void
3822__glXDispSwap_ActiveTexture(GLbyte * pc)
3823{
3824 glActiveTextureARB((GLenum) bswap_ENUM(pc + 0));
3825}
3826
3827void
3828__glXDispSwap_MultiTexCoord1dv(GLbyte * pc)
3829{
3830#ifdef __GLX_ALIGN64
3831 if ((unsigned long) (pc) & 7) {
3832 (void) memmove(pc - 4, pc, 12);
3833 pc -= 4;
3834 }
3835#endif
3836
3837 glMultiTexCoord1dvARB((GLenum) bswap_ENUM(pc + 8),
3838 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0),
3839 1));
3840}
3841
3842void
3843__glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc)
3844{
3845 glMultiTexCoord1fvARB((GLenum) bswap_ENUM(pc + 0),
3846 (const GLfloat *)
3847 bswap_32_array((uint32_t *) (pc + 4), 1));
3848}
3849
3850void
3851__glXDispSwap_MultiTexCoord1iv(GLbyte * pc)
3852{
3853 glMultiTexCoord1ivARB((GLenum) bswap_ENUM(pc + 0),
3854 (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
3855 1));
3856}
3857
3858void
3859__glXDispSwap_MultiTexCoord1sv(GLbyte * pc)
3860{
3861 glMultiTexCoord1svARB((GLenum) bswap_ENUM(pc + 0),
3862 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
3863 1));
3864}
3865
3866void
3867__glXDispSwap_MultiTexCoord2dv(GLbyte * pc)
3868{
3869#ifdef __GLX_ALIGN64
3870 if ((unsigned long) (pc) & 7) {
3871 (void) memmove(pc - 4, pc, 20);
3872 pc -= 4;
3873 }
3874#endif
3875
3876 glMultiTexCoord2dvARB((GLenum) bswap_ENUM(pc + 16),
3877 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0),
3878 2));
3879}
3880
3881void
3882__glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc)
3883{
3884 glMultiTexCoord2fvARB((GLenum) bswap_ENUM(pc + 0),
3885 (const GLfloat *)
3886 bswap_32_array((uint32_t *) (pc + 4), 2));
3887}
3888
3889void
3890__glXDispSwap_MultiTexCoord2iv(GLbyte * pc)
3891{
3892 glMultiTexCoord2ivARB((GLenum) bswap_ENUM(pc + 0),
3893 (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
3894 2));
3895}
3896
3897void
3898__glXDispSwap_MultiTexCoord2sv(GLbyte * pc)
3899{
3900 glMultiTexCoord2svARB((GLenum) bswap_ENUM(pc + 0),
3901 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
3902 2));
3903}
3904
3905void
3906__glXDispSwap_MultiTexCoord3dv(GLbyte * pc)
3907{
3908#ifdef __GLX_ALIGN64
3909 if ((unsigned long) (pc) & 7) {
3910 (void) memmove(pc - 4, pc, 28);
3911 pc -= 4;
3912 }
3913#endif
3914
3915 glMultiTexCoord3dvARB((GLenum) bswap_ENUM(pc + 24),
3916 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0),
3917 3));
3918}
3919
3920void
3921__glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc)
3922{
3923 glMultiTexCoord3fvARB((GLenum) bswap_ENUM(pc + 0),
3924 (const GLfloat *)
3925 bswap_32_array((uint32_t *) (pc + 4), 3));
3926}
3927
3928void
3929__glXDispSwap_MultiTexCoord3iv(GLbyte * pc)
3930{
3931 glMultiTexCoord3ivARB((GLenum) bswap_ENUM(pc + 0),
3932 (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
3933 3));
3934}
3935
3936void
3937__glXDispSwap_MultiTexCoord3sv(GLbyte * pc)
3938{
3939 glMultiTexCoord3svARB((GLenum) bswap_ENUM(pc + 0),
3940 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
3941 3));
3942}
3943
3944void
3945__glXDispSwap_MultiTexCoord4dv(GLbyte * pc)
3946{
3947#ifdef __GLX_ALIGN64
3948 if ((unsigned long) (pc) & 7) {
3949 (void) memmove(pc - 4, pc, 36);
3950 pc -= 4;
3951 }
3952#endif
3953
3954 glMultiTexCoord4dvARB((GLenum) bswap_ENUM(pc + 32),
3955 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0),
3956 4));
3957}
3958
3959void
3960__glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc)
3961{
3962 glMultiTexCoord4fvARB((GLenum) bswap_ENUM(pc + 0),
3963 (const GLfloat *)
3964 bswap_32_array((uint32_t *) (pc + 4), 4));
3965}
3966
3967void
3968__glXDispSwap_MultiTexCoord4iv(GLbyte * pc)
3969{
3970 glMultiTexCoord4ivARB((GLenum) bswap_ENUM(pc + 0),
3971 (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
3972 4));
3973}
3974
3975void
3976__glXDispSwap_MultiTexCoord4sv(GLbyte * pc)
3977{
3978 glMultiTexCoord4svARB((GLenum) bswap_ENUM(pc + 0),
3979 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
3980 4));
3981}
3982
3983void
3984__glXDispSwap_CompressedTexImage1D(GLbyte * pc)
3985{
3986 PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D =
3987 __glGetProcAddress("glCompressedTexImage1D");
3988 const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 20);
3989
3990 CompressedTexImage1D((GLenum) bswap_ENUM(pc + 0),
3991 (GLint) bswap_CARD32(pc + 4),
3992 (GLenum) bswap_ENUM(pc + 8),
3993 (GLsizei) bswap_CARD32(pc + 12),
3994 (GLint) bswap_CARD32(pc + 16),
3995 imageSize, (const GLvoid *) (pc + 24));
3996}
3997
3998void
3999__glXDispSwap_CompressedTexImage2D(GLbyte * pc)
4000{
4001 PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D =
4002 __glGetProcAddress("glCompressedTexImage2D");
4003 const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 24);
4004
4005 CompressedTexImage2D((GLenum) bswap_ENUM(pc + 0),
4006 (GLint) bswap_CARD32(pc + 4),
4007 (GLenum) bswap_ENUM(pc + 8),
4008 (GLsizei) bswap_CARD32(pc + 12),
4009 (GLsizei) bswap_CARD32(pc + 16),
4010 (GLint) bswap_CARD32(pc + 20),
4011 imageSize, (const GLvoid *) (pc + 28));
4012}
4013
4014void
4015__glXDispSwap_CompressedTexImage3D(GLbyte * pc)
4016{
4017 PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D =
4018 __glGetProcAddress("glCompressedTexImage3D");
4019 const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 28);
4020
4021 CompressedTexImage3D((GLenum) bswap_ENUM(pc + 0),
4022 (GLint) bswap_CARD32(pc + 4),
4023 (GLenum) bswap_ENUM(pc + 8),
4024 (GLsizei) bswap_CARD32(pc + 12),
4025 (GLsizei) bswap_CARD32(pc + 16),
4026 (GLsizei) bswap_CARD32(pc + 20),
4027 (GLint) bswap_CARD32(pc + 24),
4028 imageSize, (const GLvoid *) (pc + 32));
4029}
4030
4031void
4032__glXDispSwap_CompressedTexSubImage1D(GLbyte * pc)
4033{
4034 PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D =
4035 __glGetProcAddress("glCompressedTexSubImage1D");
4036 const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 20);
4037
4038 CompressedTexSubImage1D((GLenum) bswap_ENUM(pc + 0),
4039 (GLint) bswap_CARD32(pc + 4),
4040 (GLint) bswap_CARD32(pc + 8),
4041 (GLsizei) bswap_CARD32(pc + 12),
4042 (GLenum) bswap_ENUM(pc + 16),
4043 imageSize, (const GLvoid *) (pc + 24));
4044}
4045
4046void
4047__glXDispSwap_CompressedTexSubImage2D(GLbyte * pc)
4048{
4049 PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D =
4050 __glGetProcAddress("glCompressedTexSubImage2D");
4051 const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 28);
4052
4053 CompressedTexSubImage2D((GLenum) bswap_ENUM(pc + 0),
4054 (GLint) bswap_CARD32(pc + 4),
4055 (GLint) bswap_CARD32(pc + 8),
4056 (GLint) bswap_CARD32(pc + 12),
4057 (GLsizei) bswap_CARD32(pc + 16),
4058 (GLsizei) bswap_CARD32(pc + 20),
4059 (GLenum) bswap_ENUM(pc + 24),
4060 imageSize, (const GLvoid *) (pc + 32));
4061}
4062
4063void
4064__glXDispSwap_CompressedTexSubImage3D(GLbyte * pc)
4065{
4066 PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D =
4067 __glGetProcAddress("glCompressedTexSubImage3D");
4068 const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 36);
4069
4070 CompressedTexSubImage3D((GLenum) bswap_ENUM(pc + 0),
4071 (GLint) bswap_CARD32(pc + 4),
4072 (GLint) bswap_CARD32(pc + 8),
4073 (GLint) bswap_CARD32(pc + 12),
4074 (GLint) bswap_CARD32(pc + 16),
4075 (GLsizei) bswap_CARD32(pc + 20),
4076 (GLsizei) bswap_CARD32(pc + 24),
4077 (GLsizei) bswap_CARD32(pc + 28),
4078 (GLenum) bswap_ENUM(pc + 32),
4079 imageSize, (const GLvoid *) (pc + 40));
4080}
4081
4082void
4083__glXDispSwap_SampleCoverage(GLbyte * pc)
4084{
4085 PFNGLSAMPLECOVERAGEPROC SampleCoverage =
4086 __glGetProcAddress("glSampleCoverage");
4087 SampleCoverage((GLclampf) bswap_FLOAT32(pc + 0), *(GLboolean *) (pc + 4));
4088}
4089
4090void
4091__glXDispSwap_BlendFuncSeparate(GLbyte * pc)
4092{
4093 PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate =
4094 __glGetProcAddress("glBlendFuncSeparate");
4095 BlendFuncSeparate((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4),
4096 (GLenum) bswap_ENUM(pc + 8),
4097 (GLenum) bswap_ENUM(pc + 12));
4098}
4099
4100void
4101__glXDispSwap_FogCoorddv(GLbyte * pc)
4102{
4103 PFNGLFOGCOORDDVPROC FogCoorddv = __glGetProcAddress("glFogCoorddv");
4104
4105#ifdef __GLX_ALIGN64
4106 if ((unsigned long) (pc) & 7) {
4107 (void) memmove(pc - 4, pc, 8);
4108 pc -= 4;
4109 }
4110#endif
4111
4112 FogCoorddv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1));
4113}
4114
4115void
4116__glXDispSwap_PointParameterf(GLbyte * pc)
4117{
4118 PFNGLPOINTPARAMETERFPROC PointParameterf =
4119 __glGetProcAddress("glPointParameterf");
4120 PointParameterf((GLenum) bswap_ENUM(pc + 0),
4121 (GLfloat) bswap_FLOAT32(pc + 4));
4122}
4123
4124void
4125__glXDispSwap_PointParameterfv(GLbyte * pc)
4126{
4127 PFNGLPOINTPARAMETERFVPROC PointParameterfv =
4128 __glGetProcAddress("glPointParameterfv");
4129 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
4130 const GLfloat *params;
4131
4132 params =
4133 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
4134 __glPointParameterfv_size(pname));
4135
4136 PointParameterfv(pname, params);
4137}
4138
4139void
4140__glXDispSwap_PointParameteri(GLbyte * pc)
4141{
4142 PFNGLPOINTPARAMETERIPROC PointParameteri =
4143 __glGetProcAddress("glPointParameteri");
4144 PointParameteri((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4));
4145}
4146
4147void
4148__glXDispSwap_PointParameteriv(GLbyte * pc)
4149{
4150 PFNGLPOINTPARAMETERIVPROC PointParameteriv =
4151 __glGetProcAddress("glPointParameteriv");
4152 const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
4153 const GLint *params;
4154
4155 params =
4156 (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
4157 __glPointParameteriv_size(pname));
4158
4159 PointParameteriv(pname, params);
4160}
4161
4162void
4163__glXDispSwap_SecondaryColor3bv(GLbyte * pc)
4164{
4165 PFNGLSECONDARYCOLOR3BVPROC SecondaryColor3bv =
4166 __glGetProcAddress("glSecondaryColor3bv");
4167 SecondaryColor3bv((const GLbyte *) (pc + 0));
4168}
4169
4170void
4171__glXDispSwap_SecondaryColor3dv(GLbyte * pc)
4172{
4173 PFNGLSECONDARYCOLOR3DVPROC SecondaryColor3dv =
4174 __glGetProcAddress("glSecondaryColor3dv");
4175#ifdef __GLX_ALIGN64
4176 if ((unsigned long) (pc) & 7) {
4177 (void) memmove(pc - 4, pc, 24);
4178 pc -= 4;
4179 }
4180#endif
4181
4182 SecondaryColor3dv((const GLdouble *)
4183 bswap_64_array((uint64_t *) (pc + 0), 3));
4184}
4185
4186void
4187__glXDispSwap_SecondaryColor3iv(GLbyte * pc)
4188{
4189 PFNGLSECONDARYCOLOR3IVPROC SecondaryColor3iv =
4190 __glGetProcAddress("glSecondaryColor3iv");
4191 SecondaryColor3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
4192}
4193
4194void
4195__glXDispSwap_SecondaryColor3sv(GLbyte * pc)
4196{
4197 PFNGLSECONDARYCOLOR3SVPROC SecondaryColor3sv =
4198 __glGetProcAddress("glSecondaryColor3sv");
4199 SecondaryColor3sv((const GLshort *)
4200 bswap_16_array((uint16_t *) (pc + 0), 3));
4201}
4202
4203void
4204__glXDispSwap_SecondaryColor3ubv(GLbyte * pc)
4205{
4206 PFNGLSECONDARYCOLOR3UBVPROC SecondaryColor3ubv =
4207 __glGetProcAddress("glSecondaryColor3ubv");
4208 SecondaryColor3ubv((const GLubyte *) (pc + 0));
4209}
4210
4211void
4212__glXDispSwap_SecondaryColor3uiv(GLbyte * pc)
4213{
4214 PFNGLSECONDARYCOLOR3UIVPROC SecondaryColor3uiv =
4215 __glGetProcAddress("glSecondaryColor3uiv");
4216 SecondaryColor3uiv((const GLuint *)
4217 bswap_32_array((uint32_t *) (pc + 0), 3));
4218}
4219
4220void
4221__glXDispSwap_SecondaryColor3usv(GLbyte * pc)
4222{
4223 PFNGLSECONDARYCOLOR3USVPROC SecondaryColor3usv =
4224 __glGetProcAddress("glSecondaryColor3usv");
4225 SecondaryColor3usv((const GLushort *)
4226 bswap_16_array((uint16_t *) (pc + 0), 3));
4227}
4228
4229void
4230__glXDispSwap_WindowPos3fv(GLbyte * pc)
4231{
4232 PFNGLWINDOWPOS3FVPROC WindowPos3fv = __glGetProcAddress("glWindowPos3fv");
4233
4234 WindowPos3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
4235}
4236
4237void
4238__glXDispSwap_BeginQuery(GLbyte * pc)
4239{
4240 PFNGLBEGINQUERYPROC BeginQuery = __glGetProcAddress("glBeginQuery");
4241
4242 BeginQuery((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4));
4243}
4244
4245int
4246__glXDispSwap_DeleteQueries(__GLXclientState * cl, GLbyte * pc)
4247{
4248 PFNGLDELETEQUERIESPROC DeleteQueries =
4249 __glGetProcAddress("glDeleteQueries");
4250 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
4251 int error;
4252 __GLXcontext *const cx =
4253 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4254
4255 pc += __GLX_SINGLE_HDR_SIZE;
4256 if (cx != NULL) {
4257 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
4258
4259 DeleteQueries(n,
4260 (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
4261 0));
4262 error = Success;
4263 }
4264
4265 return error;
4266}
4267
4268void
4269__glXDispSwap_EndQuery(GLbyte * pc)
4270{
4271 PFNGLENDQUERYPROC EndQuery = __glGetProcAddress("glEndQuery");
4272
4273 EndQuery((GLenum) bswap_ENUM(pc + 0));
4274}
4275
4276int
4277__glXDispSwap_GenQueries(__GLXclientState * cl, GLbyte * pc)
4278{
4279 PFNGLGENQUERIESPROC GenQueries = __glGetProcAddress("glGenQueries");
4280 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
4281 int error;
4282 __GLXcontext *const cx =
4283 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4284
4285 pc += __GLX_SINGLE_HDR_SIZE;
4286 if (cx != NULL) {
4287 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
4288
4289 GLuint answerBuffer[200];
4290 GLuint *ids =
4291 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
4292 4);
4293 GenQueries(n, ids);
4294 (void) bswap_32_array((uint32_t *) ids, n);
4295 __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0);
4296 error = Success;
4297 }
4298
4299 return error;
4300}
4301
4302int
4303__glXDispSwap_GetQueryObjectiv(__GLXclientState * cl, GLbyte * pc)
4304{
4305 PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv =
4306 __glGetProcAddress("glGetQueryObjectiv");
4307 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
4308 int error;
4309 __GLXcontext *const cx =
4310 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4311
4312 pc += __GLX_SINGLE_HDR_SIZE;
4313 if (cx != NULL) {
4314 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
4315
4316 const GLuint compsize = __glGetQueryObjectiv_size(pname);
4317 GLint answerBuffer[200];
4318 GLint *params =
4319 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
4320 sizeof(answerBuffer), 4);
4321
4322 if (params == NULL)
4323 return BadAlloc;
4324 __glXClearErrorOccured();
4325
4326 GetQueryObjectiv((GLuint) bswap_CARD32(pc + 0), pname, params);
4327 (void) bswap_32_array((uint32_t *) params, compsize);
4328 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4329 error = Success;
4330 }
4331
4332 return error;
4333}
4334
4335int
4336__glXDispSwap_GetQueryObjectuiv(__GLXclientState * cl, GLbyte * pc)
4337{
4338 PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv =
4339 __glGetProcAddress("glGetQueryObjectuiv");
4340 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
4341 int error;
4342 __GLXcontext *const cx =
4343 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4344
4345 pc += __GLX_SINGLE_HDR_SIZE;
4346 if (cx != NULL) {
4347 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
4348
4349 const GLuint compsize = __glGetQueryObjectuiv_size(pname);
4350 GLuint answerBuffer[200];
4351 GLuint *params =
4352 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
4353 sizeof(answerBuffer), 4);
4354
4355 if (params == NULL)
4356 return BadAlloc;
4357 __glXClearErrorOccured();
4358
4359 GetQueryObjectuiv((GLuint) bswap_CARD32(pc + 0), pname, params);
4360 (void) bswap_32_array((uint32_t *) params, compsize);
4361 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4362 error = Success;
4363 }
4364
4365 return error;
4366}
4367
4368int
4369__glXDispSwap_GetQueryiv(__GLXclientState * cl, GLbyte * pc)
4370{
4371 PFNGLGETQUERYIVPROC GetQueryiv = __glGetProcAddress("glGetQueryiv");
4372 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
4373 int error;
4374 __GLXcontext *const cx =
4375 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4376
4377 pc += __GLX_SINGLE_HDR_SIZE;
4378 if (cx != NULL) {
4379 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
4380
4381 const GLuint compsize = __glGetQueryiv_size(pname);
4382 GLint answerBuffer[200];
4383 GLint *params =
4384 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
4385 sizeof(answerBuffer), 4);
4386
4387 if (params == NULL)
4388 return BadAlloc;
4389 __glXClearErrorOccured();
4390
4391 GetQueryiv((GLenum) bswap_ENUM(pc + 0), pname, params);
4392 (void) bswap_32_array((uint32_t *) params, compsize);
4393 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4394 error = Success;
4395 }
4396
4397 return error;
4398}
4399
4400int
4401__glXDispSwap_IsQuery(__GLXclientState * cl, GLbyte * pc)
4402{
4403 PFNGLISQUERYPROC IsQuery = __glGetProcAddress("glIsQuery");
4404 xGLXSingleReq *const req = (xGLXSingleReq *) pc;
4405 int error;
4406 __GLXcontext *const cx =
4407 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4408
4409 pc += __GLX_SINGLE_HDR_SIZE;
4410 if (cx != NULL) {
4411 GLboolean retval;
4412
4413 retval = IsQuery((GLuint) bswap_CARD32(pc + 0));
4414 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
4415 error = Success;
4416 }
4417
4418 return error;
4419}
4420
4421void
4422__glXDispSwap_BlendEquationSeparate(GLbyte * pc)
4423{
4424 PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate =
4425 __glGetProcAddress("glBlendEquationSeparate");
4426 BlendEquationSeparate((GLenum) bswap_ENUM(pc + 0),
4427 (GLenum) bswap_ENUM(pc + 4));
4428}
4429
4430void
4431__glXDispSwap_DrawBuffers(GLbyte * pc)
4432{
4433 PFNGLDRAWBUFFERSPROC DrawBuffers = __glGetProcAddress("glDrawBuffers");
4434 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
4435
4436 DrawBuffers(n, (const GLenum *) bswap_32_array((uint32_t *) (pc + 4), 0));
4437}
4438
4439void
4440__glXDispSwap_VertexAttrib1dv(GLbyte * pc)
4441{
4442 PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv =
4443 __glGetProcAddress("glVertexAttrib1dv");
4444#ifdef __GLX_ALIGN64
4445 if ((unsigned long) (pc) & 7) {
4446 (void) memmove(pc - 4, pc, 12);
4447 pc -= 4;
4448 }
4449#endif
4450
4451 VertexAttrib1dv((GLuint) bswap_CARD32(pc + 0),
4452 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
4453 1));
4454}
4455
4456void
4457__glXDispSwap_VertexAttrib1sv(GLbyte * pc)
4458{
4459 PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv =
4460 __glGetProcAddress("glVertexAttrib1sv");
4461 VertexAttrib1sv((GLuint) bswap_CARD32(pc + 0),
4462 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 1));
4463}
4464
4465void
4466__glXDispSwap_VertexAttrib2dv(GLbyte * pc)
4467{
4468 PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv =
4469 __glGetProcAddress("glVertexAttrib2dv");
4470#ifdef __GLX_ALIGN64
4471 if ((unsigned long) (pc) & 7) {
4472 (void) memmove(pc - 4, pc, 20);
4473 pc -= 4;
4474 }
4475#endif
4476
4477 VertexAttrib2dv((GLuint) bswap_CARD32(pc + 0),
4478 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
4479 2));
4480}
4481
4482void
4483__glXDispSwap_VertexAttrib2sv(GLbyte * pc)
4484{
4485 PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv =
4486 __glGetProcAddress("glVertexAttrib2sv");
4487 VertexAttrib2sv((GLuint) bswap_CARD32(pc + 0),
4488 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2));
4489}
4490
4491void
4492__glXDispSwap_VertexAttrib3dv(GLbyte * pc)
4493{
4494 PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv =
4495 __glGetProcAddress("glVertexAttrib3dv");
4496#ifdef __GLX_ALIGN64
4497 if ((unsigned long) (pc) & 7) {
4498 (void) memmove(pc - 4, pc, 28);
4499 pc -= 4;
4500 }
4501#endif
4502
4503 VertexAttrib3dv((GLuint) bswap_CARD32(pc + 0),
4504 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
4505 3));
4506}
4507
4508void
4509__glXDispSwap_VertexAttrib3sv(GLbyte * pc)
4510{
4511 PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv =
4512 __glGetProcAddress("glVertexAttrib3sv");
4513 VertexAttrib3sv((GLuint) bswap_CARD32(pc + 0),
4514 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 3));
4515}
4516
4517void
4518__glXDispSwap_VertexAttrib4Nbv(GLbyte * pc)
4519{
4520 PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv =
4521 __glGetProcAddress("glVertexAttrib4Nbv");
4522 VertexAttrib4Nbv((GLuint) bswap_CARD32(pc + 0), (const GLbyte *) (pc + 4));
4523}
4524
4525void
4526__glXDispSwap_VertexAttrib4Niv(GLbyte * pc)
4527{
4528 PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv =
4529 __glGetProcAddress("glVertexAttrib4Niv");
4530 VertexAttrib4Niv((GLuint) bswap_CARD32(pc + 0),
4531 (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 4));
4532}
4533
4534void
4535__glXDispSwap_VertexAttrib4Nsv(GLbyte * pc)
4536{
4537 PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv =
4538 __glGetProcAddress("glVertexAttrib4Nsv");
4539 VertexAttrib4Nsv((GLuint) bswap_CARD32(pc + 0),
4540 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
4541 4));
4542}
4543
4544void
4545__glXDispSwap_VertexAttrib4Nubv(GLbyte * pc)
4546{
4547 PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv =
4548 __glGetProcAddress("glVertexAttrib4Nubv");
4549 VertexAttrib4Nubv((GLuint) bswap_CARD32(pc + 0),
4550 (const GLubyte *) (pc + 4));
4551}
4552
4553void
4554__glXDispSwap_VertexAttrib4Nuiv(GLbyte * pc)
4555{
4556 PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv =
4557 __glGetProcAddress("glVertexAttrib4Nuiv");
4558 VertexAttrib4Nuiv((GLuint) bswap_CARD32(pc + 0),
4559 (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
4560 4));
4561}
4562
4563void
4564__glXDispSwap_VertexAttrib4Nusv(GLbyte * pc)
4565{
4566 PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv =
4567 __glGetProcAddress("glVertexAttrib4Nusv");
4568 VertexAttrib4Nusv((GLuint) bswap_CARD32(pc + 0),
4569 (const GLushort *) bswap_16_array((uint16_t *) (pc + 4),
4570 4));
4571}
4572
4573void
4574__glXDispSwap_VertexAttrib4bv(GLbyte * pc)
4575{
4576 PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv =
4577 __glGetProcAddress("glVertexAttrib4bv");
4578 VertexAttrib4bv((GLuint) bswap_CARD32(pc + 0), (const GLbyte *) (pc + 4));
4579}
4580
4581void
4582__glXDispSwap_VertexAttrib4dv(GLbyte * pc)
4583{
4584 PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv =
4585 __glGetProcAddress("glVertexAttrib4dv");
4586#ifdef __GLX_ALIGN64
4587 if ((unsigned long) (pc) & 7) {
4588 (void) memmove(pc - 4, pc, 36);
4589 pc -= 4;
4590 }
4591#endif
4592
4593 VertexAttrib4dv((GLuint) bswap_CARD32(pc + 0),
4594 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
4595 4));
4596}
4597
4598void
4599__glXDispSwap_VertexAttrib4iv(GLbyte * pc)
4600{
4601 PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv =
4602 __glGetProcAddress("glVertexAttrib4iv");
4603 VertexAttrib4iv((GLuint) bswap_CARD32(pc + 0),
4604 (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 4));
4605}
4606
4607void
4608__glXDispSwap_VertexAttrib4sv(GLbyte * pc)
4609{
4610 PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv =
4611 __glGetProcAddress("glVertexAttrib4sv");
4612 VertexAttrib4sv((GLuint) bswap_CARD32(pc + 0),
4613 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 4));
4614}
4615
4616void
4617__glXDispSwap_VertexAttrib4ubv(GLbyte * pc)
4618{
4619 PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv =
4620 __glGetProcAddress("glVertexAttrib4ubv");
4621 VertexAttrib4ubv((GLuint) bswap_CARD32(pc + 0), (const GLubyte *) (pc + 4));
4622}
4623
4624void
4625__glXDispSwap_VertexAttrib4uiv(GLbyte * pc)
4626{
4627 PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv =
4628 __glGetProcAddress("glVertexAttrib4uiv");
4629 VertexAttrib4uiv((GLuint) bswap_CARD32(pc + 0),
4630 (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 4));
4631}
4632
4633void
4634__glXDispSwap_VertexAttrib4usv(GLbyte * pc)
4635{
4636 PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv =
4637 __glGetProcAddress("glVertexAttrib4usv");
4638 VertexAttrib4usv((GLuint) bswap_CARD32(pc + 0),
4639 (const GLushort *) bswap_16_array((uint16_t *) (pc + 4),
4640 4));
4641}
4642
4643void
4644__glXDispSwap_ClampColor(GLbyte * pc)
4645{
4646 PFNGLCLAMPCOLORPROC ClampColor = __glGetProcAddress("glClampColor");
4647
4648 ClampColor((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
4649}
4650
4651void
4652__glXDispSwap_BindProgramARB(GLbyte * pc)
4653{
4654 PFNGLBINDPROGRAMARBPROC BindProgramARB =
4655 __glGetProcAddress("glBindProgramARB");
4656 BindProgramARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4));
4657}
4658
4659int
4660__glXDispSwap_DeleteProgramsARB(__GLXclientState * cl, GLbyte * pc)
4661{
4662 PFNGLDELETEPROGRAMSARBPROC DeleteProgramsARB =
4663 __glGetProcAddress("glDeleteProgramsARB");
4664 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4665 int error;
4666 __GLXcontext *const cx =
4667 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4668
4669 pc += __GLX_VENDPRIV_HDR_SIZE;
4670 if (cx != NULL) {
4671 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
4672
4673 DeleteProgramsARB(n,
4674 (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
4675 0));
4676 error = Success;
4677 }
4678
4679 return error;
4680}
4681
4682int
4683__glXDispSwap_GenProgramsARB(__GLXclientState * cl, GLbyte * pc)
4684{
4685 PFNGLGENPROGRAMSARBPROC GenProgramsARB =
4686 __glGetProcAddress("glGenProgramsARB");
4687 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4688 int error;
4689 __GLXcontext *const cx =
4690 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4691
4692 pc += __GLX_VENDPRIV_HDR_SIZE;
4693 if (cx != NULL) {
4694 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
4695
4696 GLuint answerBuffer[200];
4697 GLuint *programs =
4698 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
4699 4);
4700 GenProgramsARB(n, programs);
4701 (void) bswap_32_array((uint32_t *) programs, n);
4702 __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0);
4703 error = Success;
4704 }
4705
4706 return error;
4707}
4708
4709int
4710__glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState * cl, GLbyte * pc)
4711{
4712 PFNGLGETPROGRAMENVPARAMETERDVARBPROC GetProgramEnvParameterdvARB =
4713 __glGetProcAddress("glGetProgramEnvParameterdvARB");
4714 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4715 int error;
4716 __GLXcontext *const cx =
4717 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4718
4719 pc += __GLX_VENDPRIV_HDR_SIZE;
4720 if (cx != NULL) {
4721 GLdouble params[4];
4722
4723 GetProgramEnvParameterdvARB((GLenum) bswap_ENUM(pc + 0),
4724 (GLuint) bswap_CARD32(pc + 4), params);
4725 (void) bswap_64_array((uint64_t *) params, 4);
4726 __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
4727 error = Success;
4728 }
4729
4730 return error;
4731}
4732
4733int
4734__glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState * cl, GLbyte * pc)
4735{
4736 PFNGLGETPROGRAMENVPARAMETERFVARBPROC GetProgramEnvParameterfvARB =
4737 __glGetProcAddress("glGetProgramEnvParameterfvARB");
4738 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4739 int error;
4740 __GLXcontext *const cx =
4741 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4742
4743 pc += __GLX_VENDPRIV_HDR_SIZE;
4744 if (cx != NULL) {
4745 GLfloat params[4];
4746
4747 GetProgramEnvParameterfvARB((GLenum) bswap_ENUM(pc + 0),
4748 (GLuint) bswap_CARD32(pc + 4), params);
4749 (void) bswap_32_array((uint32_t *) params, 4);
4750 __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
4751 error = Success;
4752 }
4753
4754 return error;
4755}
4756
4757int
4758__glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState * cl, GLbyte * pc)
4759{
4760 PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC GetProgramLocalParameterdvARB =
4761 __glGetProcAddress("glGetProgramLocalParameterdvARB");
4762 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4763 int error;
4764 __GLXcontext *const cx =
4765 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4766
4767 pc += __GLX_VENDPRIV_HDR_SIZE;
4768 if (cx != NULL) {
4769 GLdouble params[4];
4770
4771 GetProgramLocalParameterdvARB((GLenum) bswap_ENUM(pc + 0),
4772 (GLuint) bswap_CARD32(pc + 4), params);
4773 (void) bswap_64_array((uint64_t *) params, 4);
4774 __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
4775 error = Success;
4776 }
4777
4778 return error;
4779}
4780
4781int
4782__glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState * cl, GLbyte * pc)
4783{
4784 PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC GetProgramLocalParameterfvARB =
4785 __glGetProcAddress("glGetProgramLocalParameterfvARB");
4786 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4787 int error;
4788 __GLXcontext *const cx =
4789 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4790
4791 pc += __GLX_VENDPRIV_HDR_SIZE;
4792 if (cx != NULL) {
4793 GLfloat params[4];
4794
4795 GetProgramLocalParameterfvARB((GLenum) bswap_ENUM(pc + 0),
4796 (GLuint) bswap_CARD32(pc + 4), params);
4797 (void) bswap_32_array((uint32_t *) params, 4);
4798 __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
4799 error = Success;
4800 }
4801
4802 return error;
4803}
4804
4805int
4806__glXDispSwap_GetProgramivARB(__GLXclientState * cl, GLbyte * pc)
4807{
4808 PFNGLGETPROGRAMIVARBPROC GetProgramivARB =
4809 __glGetProcAddress("glGetProgramivARB");
4810 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4811 int error;
4812 __GLXcontext *const cx =
4813 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4814
4815 pc += __GLX_VENDPRIV_HDR_SIZE;
4816 if (cx != NULL) {
4817 const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
4818
4819 const GLuint compsize = __glGetProgramivARB_size(pname);
4820 GLint answerBuffer[200];
4821 GLint *params =
4822 __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
4823 sizeof(answerBuffer), 4);
4824
4825 if (params == NULL)
4826 return BadAlloc;
4827 __glXClearErrorOccured();
4828
4829 GetProgramivARB((GLenum) bswap_ENUM(pc + 0), pname, params);
4830 (void) bswap_32_array((uint32_t *) params, compsize);
4831 __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4832 error = Success;
4833 }
4834
4835 return error;
4836}
4837
4838int
4839__glXDispSwap_IsProgramARB(__GLXclientState * cl, GLbyte * pc)
4840{
4841 PFNGLISPROGRAMARBPROC IsProgramARB = __glGetProcAddress("glIsProgramARB");
4842 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
4843 int error;
4844 __GLXcontext *const cx =
4845 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
4846
4847 pc += __GLX_VENDPRIV_HDR_SIZE;
4848 if (cx != NULL) {
4849 GLboolean retval;
4850
4851 retval = IsProgramARB((GLuint) bswap_CARD32(pc + 0));
4852 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
4853 error = Success;
4854 }
4855
4856 return error;
4857}
4858
4859void
4860__glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc)
4861{
4862 PFNGLPROGRAMENVPARAMETER4DVARBPROC ProgramEnvParameter4dvARB =
4863 __glGetProcAddress("glProgramEnvParameter4dvARB");
4864#ifdef __GLX_ALIGN64
4865 if ((unsigned long) (pc) & 7) {
4866 (void) memmove(pc - 4, pc, 40);
4867 pc -= 4;
4868 }
4869#endif
4870
4871 ProgramEnvParameter4dvARB((GLenum) bswap_ENUM(pc + 0),
4872 (GLuint) bswap_CARD32(pc + 4),
4873 (const GLdouble *)
4874 bswap_64_array((uint64_t *) (pc + 8), 4));
4875}
4876
4877void
4878__glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc)
4879{
4880 PFNGLPROGRAMENVPARAMETER4FVARBPROC ProgramEnvParameter4fvARB =
4881 __glGetProcAddress("glProgramEnvParameter4fvARB");
4882 ProgramEnvParameter4fvARB((GLenum) bswap_ENUM(pc + 0),
4883 (GLuint) bswap_CARD32(pc + 4),
4884 (const GLfloat *)
4885 bswap_32_array((uint32_t *) (pc + 8), 4));
4886}
4887
4888void
4889__glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc)
4890{
4891 PFNGLPROGRAMLOCALPARAMETER4DVARBPROC ProgramLocalParameter4dvARB =
4892 __glGetProcAddress("glProgramLocalParameter4dvARB");
4893#ifdef __GLX_ALIGN64
4894 if ((unsigned long) (pc) & 7) {
4895 (void) memmove(pc - 4, pc, 40);
4896 pc -= 4;
4897 }
4898#endif
4899
4900 ProgramLocalParameter4dvARB((GLenum) bswap_ENUM(pc + 0),
4901 (GLuint) bswap_CARD32(pc + 4),
4902 (const GLdouble *)
4903 bswap_64_array((uint64_t *) (pc + 8), 4));
4904}
4905
4906void
4907__glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc)
4908{
4909 PFNGLPROGRAMLOCALPARAMETER4FVARBPROC ProgramLocalParameter4fvARB =
4910 __glGetProcAddress("glProgramLocalParameter4fvARB");
4911 ProgramLocalParameter4fvARB((GLenum) bswap_ENUM(pc + 0),
4912 (GLuint) bswap_CARD32(pc + 4),
4913 (const GLfloat *)
4914 bswap_32_array((uint32_t *) (pc + 8), 4));
4915}
4916
4917void
4918__glXDispSwap_ProgramStringARB(GLbyte * pc)
4919{
4920 PFNGLPROGRAMSTRINGARBPROC ProgramStringARB =
4921 __glGetProcAddress("glProgramStringARB");
4922 const GLsizei len = (GLsizei) bswap_CARD32(pc + 8);
4923
4924 ProgramStringARB((GLenum) bswap_ENUM(pc + 0),
4925 (GLenum) bswap_ENUM(pc + 4),
4926 len, (const GLvoid *) (pc + 12));
4927}
4928
4929void
4930__glXDispSwap_VertexAttrib1fvARB(GLbyte * pc)
4931{
4932 PFNGLVERTEXATTRIB1FVARBPROC VertexAttrib1fvARB =
4933 __glGetProcAddress("glVertexAttrib1fvARB");
4934 VertexAttrib1fvARB((GLuint) bswap_CARD32(pc + 0),
4935 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
4936 1));
4937}
4938
4939void
4940__glXDispSwap_VertexAttrib2fvARB(GLbyte * pc)
4941{
4942 PFNGLVERTEXATTRIB2FVARBPROC VertexAttrib2fvARB =
4943 __glGetProcAddress("glVertexAttrib2fvARB");
4944 VertexAttrib2fvARB((GLuint) bswap_CARD32(pc + 0),
4945 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
4946 2));
4947}
4948
4949void
4950__glXDispSwap_VertexAttrib3fvARB(GLbyte * pc)
4951{
4952 PFNGLVERTEXATTRIB3FVARBPROC VertexAttrib3fvARB =
4953 __glGetProcAddress("glVertexAttrib3fvARB");
4954 VertexAttrib3fvARB((GLuint) bswap_CARD32(pc + 0),
4955 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
4956 3));
4957}
4958
4959void
4960__glXDispSwap_VertexAttrib4fvARB(GLbyte * pc)
4961{
4962 PFNGLVERTEXATTRIB4FVARBPROC VertexAttrib4fvARB =
4963 __glGetProcAddress("glVertexAttrib4fvARB");
4964 VertexAttrib4fvARB((GLuint) bswap_CARD32(pc + 0),
4965 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
4966 4));
4967}
4968
4969void
4970__glXDispSwap_BindFramebuffer(GLbyte * pc)
4971{
4972 PFNGLBINDFRAMEBUFFERPROC BindFramebuffer =
4973 __glGetProcAddress("glBindFramebuffer");
4974 BindFramebuffer((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4));
4975}
4976
4977void
4978__glXDispSwap_BindRenderbuffer(GLbyte * pc)
4979{
4980 PFNGLBINDRENDERBUFFERPROC BindRenderbuffer =
4981 __glGetProcAddress("glBindRenderbuffer");
4982 BindRenderbuffer((GLenum) bswap_ENUM(pc + 0),
4983 (GLuint) bswap_CARD32(pc + 4));
4984}
4985
4986void
4987__glXDispSwap_BlitFramebuffer(GLbyte * pc)
4988{
4989 PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer =
4990 __glGetProcAddress("glBlitFramebuffer");
4991 BlitFramebuffer((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4),
4992 (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12),
4993 (GLint) bswap_CARD32(pc + 16),
4994 (GLint) bswap_CARD32(pc + 20),
4995 (GLint) bswap_CARD32(pc + 24),
4996 (GLint) bswap_CARD32(pc + 28),
4997 (GLbitfield) bswap_CARD32(pc + 32),
4998 (GLenum) bswap_ENUM(pc + 36));
4999}
5000
5001int
5002__glXDispSwap_CheckFramebufferStatus(__GLXclientState * cl, GLbyte * pc)
5003{
5004 PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus =
5005 __glGetProcAddress("glCheckFramebufferStatus");
5006 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
5007 int error;
5008 __GLXcontext *const cx =
5009 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
5010
5011 pc += __GLX_VENDPRIV_HDR_SIZE;
5012 if (cx != NULL) {
5013 GLenum retval;
5014
5015 retval = CheckFramebufferStatus((GLenum) bswap_ENUM(pc + 0));
5016 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
5017 error = Success;
5018 }
5019
5020 return error;
5021}
5022
5023void
5024__glXDispSwap_DeleteFramebuffers(GLbyte * pc)
5025{
5026 PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers =
5027 __glGetProcAddress("glDeleteFramebuffers");
5028 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
5029
5030 DeleteFramebuffers(n,
5031 (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
5032 0));
5033}
5034
5035void
5036__glXDispSwap_DeleteRenderbuffers(GLbyte * pc)
5037{
5038 PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers =
5039 __glGetProcAddress("glDeleteRenderbuffers");
5040 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
5041
5042 DeleteRenderbuffers(n,
5043 (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
5044 0));
5045}
5046
5047void
5048__glXDispSwap_FramebufferRenderbuffer(GLbyte * pc)
5049{
5050 PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer =
5051 __glGetProcAddress("glFramebufferRenderbuffer");
5052 FramebufferRenderbuffer((GLenum) bswap_ENUM(pc + 0),
5053 (GLenum) bswap_ENUM(pc + 4),
5054 (GLenum) bswap_ENUM(pc + 8),
5055 (GLuint) bswap_CARD32(pc + 12));
5056}
5057
5058void
5059__glXDispSwap_FramebufferTexture1D(GLbyte * pc)
5060{
5061 PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D =
5062 __glGetProcAddress("glFramebufferTexture1D");
5063 FramebufferTexture1D((GLenum) bswap_ENUM(pc + 0),
5064 (GLenum) bswap_ENUM(pc + 4),
5065 (GLenum) bswap_ENUM(pc + 8),
5066 (GLuint) bswap_CARD32(pc + 12),
5067 (GLint) bswap_CARD32(pc + 16));
5068}
5069
5070void
5071__glXDispSwap_FramebufferTexture2D(GLbyte * pc)
5072{
5073 PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D =
5074 __glGetProcAddress("glFramebufferTexture2D");
5075 FramebufferTexture2D((GLenum) bswap_ENUM(pc + 0),
5076 (GLenum) bswap_ENUM(pc + 4),
5077 (GLenum) bswap_ENUM(pc + 8),
5078 (GLuint) bswap_CARD32(pc + 12),
5079 (GLint) bswap_CARD32(pc + 16));
5080}
5081
5082void
5083__glXDispSwap_FramebufferTexture3D(GLbyte * pc)
5084{
5085 PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D =
5086 __glGetProcAddress("glFramebufferTexture3D");
5087 FramebufferTexture3D((GLenum) bswap_ENUM(pc + 0),
5088 (GLenum) bswap_ENUM(pc + 4),
5089 (GLenum) bswap_ENUM(pc + 8),
5090 (GLuint) bswap_CARD32(pc + 12),
5091 (GLint) bswap_CARD32(pc + 16),
5092 (GLint) bswap_CARD32(pc + 20));
5093}
5094
5095void
5096__glXDispSwap_FramebufferTextureLayer(GLbyte * pc)
5097{
5098 PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer =
5099 __glGetProcAddress("glFramebufferTextureLayer");
5100 FramebufferTextureLayer((GLenum) bswap_ENUM(pc + 0),
5101 (GLenum) bswap_ENUM(pc + 4),
5102 (GLuint) bswap_CARD32(pc + 8),
5103 (GLint) bswap_CARD32(pc + 12),
5104 (GLint) bswap_CARD32(pc + 16));
5105}
5106
5107int
5108__glXDispSwap_GenFramebuffers(__GLXclientState * cl, GLbyte * pc)
5109{
5110 PFNGLGENFRAMEBUFFERSPROC GenFramebuffers =
5111 __glGetProcAddress("glGenFramebuffers");
5112 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
5113 int error;
5114 __GLXcontext *const cx =
5115 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
5116
5117 pc += __GLX_VENDPRIV_HDR_SIZE;
5118 if (cx != NULL) {
5119 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
5120
5121 GLuint answerBuffer[200];
5122 GLuint *framebuffers =
5123 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
5124 4);
5125 GenFramebuffers(n, framebuffers);
5126 (void) bswap_32_array((uint32_t *) framebuffers, n);
5127 __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0);
5128 error = Success;
5129 }
5130
5131 return error;
5132}
5133
5134int
5135__glXDispSwap_GenRenderbuffers(__GLXclientState * cl, GLbyte * pc)
5136{
5137 PFNGLGENRENDERBUFFERSPROC GenRenderbuffers =
5138 __glGetProcAddress("glGenRenderbuffers");
5139 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
5140 int error;
5141 __GLXcontext *const cx =
5142 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
5143
5144 pc += __GLX_VENDPRIV_HDR_SIZE;
5145 if (cx != NULL) {
5146 const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
5147
5148 GLuint answerBuffer[200];
5149 GLuint *renderbuffers =
5150 __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
5151 4);
5152 GenRenderbuffers(n, renderbuffers);
5153 (void) bswap_32_array((uint32_t *) renderbuffers, n);
5154 __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
5155 error = Success;
5156 }
5157
5158 return error;
5159}
5160
5161void
5162__glXDispSwap_GenerateMipmap(GLbyte * pc)
5163{
5164 PFNGLGENERATEMIPMAPPROC GenerateMipmap =
5165 __glGetProcAddress("glGenerateMipmap");
5166 GenerateMipmap((GLenum) bswap_ENUM(pc + 0));
5167}
5168
5169int
5170__glXDispSwap_GetFramebufferAttachmentParameteriv(__GLXclientState * cl,
5171 GLbyte * pc)
5172{
5173 PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC
5174 GetFramebufferAttachmentParameteriv =
5175 __glGetProcAddress("glGetFramebufferAttachmentParameteriv");
5176 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
5177 int error;
5178 __GLXcontext *const cx =
5179 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
5180
5181 pc += __GLX_VENDPRIV_HDR_SIZE;
5182 if (cx != NULL) {
5183 GLint params[1];
5184
5185 GetFramebufferAttachmentParameteriv((GLenum) bswap_ENUM(pc + 0),
5186 (GLenum) bswap_ENUM(pc + 4),
5187 (GLenum) bswap_ENUM(pc + 8),
5188 params);
5189 (void) bswap_32_array((uint32_t *) params, 1);
5190 __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
5191 error = Success;
5192 }
5193
5194 return error;
5195}
5196
5197int
5198__glXDispSwap_GetRenderbufferParameteriv(__GLXclientState * cl, GLbyte * pc)
5199{
5200 PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv =
5201 __glGetProcAddress("glGetRenderbufferParameteriv");
5202 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
5203 int error;
5204 __GLXcontext *const cx =
5205 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
5206
5207 pc += __GLX_VENDPRIV_HDR_SIZE;
5208 if (cx != NULL) {
5209 GLint params[1];
5210
5211 GetRenderbufferParameteriv((GLenum) bswap_ENUM(pc + 0),
5212 (GLenum) bswap_ENUM(pc + 4), params);
5213 (void) bswap_32_array((uint32_t *) params, 1);
5214 __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
5215 error = Success;
5216 }
5217
5218 return error;
5219}
5220
5221int
5222__glXDispSwap_IsFramebuffer(__GLXclientState * cl, GLbyte * pc)
5223{
5224 PFNGLISFRAMEBUFFERPROC IsFramebuffer =
5225 __glGetProcAddress("glIsFramebuffer");
5226 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
5227 int error;
5228 __GLXcontext *const cx =
5229 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
5230
5231 pc += __GLX_VENDPRIV_HDR_SIZE;
5232 if (cx != NULL) {
5233 GLboolean retval;
5234
5235 retval = IsFramebuffer((GLuint) bswap_CARD32(pc + 0));
5236 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
5237 error = Success;
5238 }
5239
5240 return error;
5241}
5242
5243int
5244__glXDispSwap_IsRenderbuffer(__GLXclientState * cl, GLbyte * pc)
5245{
5246 PFNGLISRENDERBUFFERPROC IsRenderbuffer =
5247 __glGetProcAddress("glIsRenderbuffer");
5248 xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
5249 int error;
5250 __GLXcontext *const cx =
5251 __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
5252
5253 pc += __GLX_VENDPRIV_HDR_SIZE;
5254 if (cx != NULL) {
5255 GLboolean retval;
5256
5257 retval = IsRenderbuffer((GLuint) bswap_CARD32(pc + 0));
5258 __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
5259 error = Success;
5260 }
5261
5262 return error;
5263}
5264
5265void
5266__glXDispSwap_RenderbufferStorage(GLbyte * pc)
5267{
5268 PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage =
5269 __glGetProcAddress("glRenderbufferStorage");
5270 RenderbufferStorage((GLenum) bswap_ENUM(pc + 0),
5271 (GLenum) bswap_ENUM(pc + 4),
5272 (GLsizei) bswap_CARD32(pc + 8),
5273 (GLsizei) bswap_CARD32(pc + 12));
5274}
5275
5276void
5277__glXDispSwap_RenderbufferStorageMultisample(GLbyte * pc)
5278{
5279 PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample =
5280 __glGetProcAddress("glRenderbufferStorageMultisample");
5281 RenderbufferStorageMultisample((GLenum) bswap_ENUM(pc + 0),
5282 (GLsizei) bswap_CARD32(pc + 4),
5283 (GLenum) bswap_ENUM(pc + 8),
5284 (GLsizei) bswap_CARD32(pc + 12),
5285 (GLsizei) bswap_CARD32(pc + 16));
5286}
5287
5288void
5289__glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc)
5290{
5291 PFNGLSECONDARYCOLOR3FVEXTPROC SecondaryColor3fvEXT =
5292 __glGetProcAddress("glSecondaryColor3fvEXT");
5293 SecondaryColor3fvEXT((const GLfloat *)
5294 bswap_32_array((uint32_t *) (pc + 0), 3));
5295}
5296
5297void
5298__glXDispSwap_FogCoordfvEXT(GLbyte * pc)
5299{
5300 PFNGLFOGCOORDFVEXTPROC FogCoordfvEXT =
5301 __glGetProcAddress("glFogCoordfvEXT");
5302 FogCoordfvEXT((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1));
5303}
5304
5305void
5306__glXDispSwap_VertexAttrib1dvNV(GLbyte * pc)
5307{
5308 PFNGLVERTEXATTRIB1DVNVPROC VertexAttrib1dvNV =
5309 __glGetProcAddress("glVertexAttrib1dvNV");
5310#ifdef __GLX_ALIGN64
5311 if ((unsigned long) (pc) & 7) {
5312 (void) memmove(pc - 4, pc, 12);
5313 pc -= 4;
5314 }
5315#endif
5316
5317 VertexAttrib1dvNV((GLuint) bswap_CARD32(pc + 0),
5318 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
5319 1));
5320}
5321
5322void
5323__glXDispSwap_VertexAttrib1fvNV(GLbyte * pc)
5324{
5325 PFNGLVERTEXATTRIB1FVNVPROC VertexAttrib1fvNV =
5326 __glGetProcAddress("glVertexAttrib1fvNV");
5327 VertexAttrib1fvNV((GLuint) bswap_CARD32(pc + 0),
5328 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
5329 1));
5330}
5331
5332void
5333__glXDispSwap_VertexAttrib1svNV(GLbyte * pc)
5334{
5335 PFNGLVERTEXATTRIB1SVNVPROC VertexAttrib1svNV =
5336 __glGetProcAddress("glVertexAttrib1svNV");
5337 VertexAttrib1svNV((GLuint) bswap_CARD32(pc + 0),
5338 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
5339 1));
5340}
5341
5342void
5343__glXDispSwap_VertexAttrib2dvNV(GLbyte * pc)
5344{
5345 PFNGLVERTEXATTRIB2DVNVPROC VertexAttrib2dvNV =
5346 __glGetProcAddress("glVertexAttrib2dvNV");
5347#ifdef __GLX_ALIGN64
5348 if ((unsigned long) (pc) & 7) {
5349 (void) memmove(pc - 4, pc, 20);
5350 pc -= 4;
5351 }
5352#endif
5353
5354 VertexAttrib2dvNV((GLuint) bswap_CARD32(pc + 0),
5355 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
5356 2));
5357}
5358
5359void
5360__glXDispSwap_VertexAttrib2fvNV(GLbyte * pc)
5361{
5362 PFNGLVERTEXATTRIB2FVNVPROC VertexAttrib2fvNV =
5363 __glGetProcAddress("glVertexAttrib2fvNV");
5364 VertexAttrib2fvNV((GLuint) bswap_CARD32(pc + 0),
5365 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
5366 2));
5367}
5368
5369void
5370__glXDispSwap_VertexAttrib2svNV(GLbyte * pc)
5371{
5372 PFNGLVERTEXATTRIB2SVNVPROC VertexAttrib2svNV =
5373 __glGetProcAddress("glVertexAttrib2svNV");
5374 VertexAttrib2svNV((GLuint) bswap_CARD32(pc + 0),
5375 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
5376 2));
5377}
5378
5379void
5380__glXDispSwap_VertexAttrib3dvNV(GLbyte * pc)
5381{
5382 PFNGLVERTEXATTRIB3DVNVPROC VertexAttrib3dvNV =
5383 __glGetProcAddress("glVertexAttrib3dvNV");
5384#ifdef __GLX_ALIGN64
5385 if ((unsigned long) (pc) & 7) {
5386 (void) memmove(pc - 4, pc, 28);
5387 pc -= 4;
5388 }
5389#endif
5390
5391 VertexAttrib3dvNV((GLuint) bswap_CARD32(pc + 0),
5392 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
5393 3));
5394}
5395
5396void
5397__glXDispSwap_VertexAttrib3fvNV(GLbyte * pc)
5398{
5399 PFNGLVERTEXATTRIB3FVNVPROC VertexAttrib3fvNV =
5400 __glGetProcAddress("glVertexAttrib3fvNV");
5401 VertexAttrib3fvNV((GLuint) bswap_CARD32(pc + 0),
5402 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
5403 3));
5404}
5405
5406void
5407__glXDispSwap_VertexAttrib3svNV(GLbyte * pc)
5408{
5409 PFNGLVERTEXATTRIB3SVNVPROC VertexAttrib3svNV =
5410 __glGetProcAddress("glVertexAttrib3svNV");
5411 VertexAttrib3svNV((GLuint) bswap_CARD32(pc + 0),
5412 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
5413 3));
5414}
5415
5416void
5417__glXDispSwap_VertexAttrib4dvNV(GLbyte * pc)
5418{
5419 PFNGLVERTEXATTRIB4DVNVPROC VertexAttrib4dvNV =
5420 __glGetProcAddress("glVertexAttrib4dvNV");
5421#ifdef __GLX_ALIGN64
5422 if ((unsigned long) (pc) & 7) {
5423 (void) memmove(pc - 4, pc, 36);
5424 pc -= 4;
5425 }
5426#endif
5427
5428 VertexAttrib4dvNV((GLuint) bswap_CARD32(pc + 0),
5429 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
5430 4));
5431}
5432
5433void
5434__glXDispSwap_VertexAttrib4fvNV(GLbyte * pc)
5435{
5436 PFNGLVERTEXATTRIB4FVNVPROC VertexAttrib4fvNV =
5437 __glGetProcAddress("glVertexAttrib4fvNV");
5438 VertexAttrib4fvNV((GLuint) bswap_CARD32(pc + 0),
5439 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
5440 4));
5441}
5442
5443void
5444__glXDispSwap_VertexAttrib4svNV(GLbyte * pc)
5445{
5446 PFNGLVERTEXATTRIB4SVNVPROC VertexAttrib4svNV =
5447 __glGetProcAddress("glVertexAttrib4svNV");
5448 VertexAttrib4svNV((GLuint) bswap_CARD32(pc + 0),
5449 (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
5450 4));
5451}
5452
5453void
5454__glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc)
5455{
5456 PFNGLVERTEXATTRIB4UBVNVPROC VertexAttrib4ubvNV =
5457 __glGetProcAddress("glVertexAttrib4ubvNV");
5458 VertexAttrib4ubvNV((GLuint) bswap_CARD32(pc + 0),
5459 (const GLubyte *) (pc + 4));
5460}
5461
5462void
5463__glXDispSwap_VertexAttribs1dvNV(GLbyte * pc)
5464{
5465 PFNGLVERTEXATTRIBS1DVNVPROC VertexAttribs1dvNV =
5466 __glGetProcAddress("glVertexAttribs1dvNV");
5467 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5468
5469#ifdef __GLX_ALIGN64
5470 const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
5471
5472 if ((unsigned long) (pc) & 7) {
5473 (void) memmove(pc - 4, pc, cmdlen);
5474 pc -= 4;
5475 }
5476#endif
5477
5478 VertexAttribs1dvNV((GLuint) bswap_CARD32(pc + 0),
5479 n,
5480 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
5481 0));
5482}
5483
5484void
5485__glXDispSwap_VertexAttribs1fvNV(GLbyte * pc)
5486{
5487 PFNGLVERTEXATTRIBS1FVNVPROC VertexAttribs1fvNV =
5488 __glGetProcAddress("glVertexAttribs1fvNV");
5489 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5490
5491 VertexAttribs1fvNV((GLuint) bswap_CARD32(pc + 0),
5492 n,
5493 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
5494 0));
5495}
5496
5497void
5498__glXDispSwap_VertexAttribs1svNV(GLbyte * pc)
5499{
5500 PFNGLVERTEXATTRIBS1SVNVPROC VertexAttribs1svNV =
5501 __glGetProcAddress("glVertexAttribs1svNV");
5502 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5503
5504 VertexAttribs1svNV((GLuint) bswap_CARD32(pc + 0),
5505 n,
5506 (const GLshort *) bswap_16_array((uint16_t *) (pc + 8),
5507 0));
5508}
5509
5510void
5511__glXDispSwap_VertexAttribs2dvNV(GLbyte * pc)
5512{
5513 PFNGLVERTEXATTRIBS2DVNVPROC VertexAttribs2dvNV =
5514 __glGetProcAddress("glVertexAttribs2dvNV");
5515 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5516
5517#ifdef __GLX_ALIGN64
5518 const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
5519
5520 if ((unsigned long) (pc) & 7) {
5521 (void) memmove(pc - 4, pc, cmdlen);
5522 pc -= 4;
5523 }
5524#endif
5525
5526 VertexAttribs2dvNV((GLuint) bswap_CARD32(pc + 0),
5527 n,
5528 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
5529 0));
5530}
5531
5532void
5533__glXDispSwap_VertexAttribs2fvNV(GLbyte * pc)
5534{
5535 PFNGLVERTEXATTRIBS2FVNVPROC VertexAttribs2fvNV =
5536 __glGetProcAddress("glVertexAttribs2fvNV");
5537 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5538
5539 VertexAttribs2fvNV((GLuint) bswap_CARD32(pc + 0),
5540 n,
5541 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
5542 0));
5543}
5544
5545void
5546__glXDispSwap_VertexAttribs2svNV(GLbyte * pc)
5547{
5548 PFNGLVERTEXATTRIBS2SVNVPROC VertexAttribs2svNV =
5549 __glGetProcAddress("glVertexAttribs2svNV");
5550 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5551
5552 VertexAttribs2svNV((GLuint) bswap_CARD32(pc + 0),
5553 n,
5554 (const GLshort *) bswap_16_array((uint16_t *) (pc + 8),
5555 0));
5556}
5557
5558void
5559__glXDispSwap_VertexAttribs3dvNV(GLbyte * pc)
5560{
5561 PFNGLVERTEXATTRIBS3DVNVPROC VertexAttribs3dvNV =
5562 __glGetProcAddress("glVertexAttribs3dvNV");
5563 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5564
5565#ifdef __GLX_ALIGN64
5566 const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
5567
5568 if ((unsigned long) (pc) & 7) {
5569 (void) memmove(pc - 4, pc, cmdlen);
5570 pc -= 4;
5571 }
5572#endif
5573
5574 VertexAttribs3dvNV((GLuint) bswap_CARD32(pc + 0),
5575 n,
5576 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
5577 0));
5578}
5579
5580void
5581__glXDispSwap_VertexAttribs3fvNV(GLbyte * pc)
5582{
5583 PFNGLVERTEXATTRIBS3FVNVPROC VertexAttribs3fvNV =
5584 __glGetProcAddress("glVertexAttribs3fvNV");
5585 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5586
5587 VertexAttribs3fvNV((GLuint) bswap_CARD32(pc + 0),
5588 n,
5589 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
5590 0));
5591}
5592
5593void
5594__glXDispSwap_VertexAttribs3svNV(GLbyte * pc)
5595{
5596 PFNGLVERTEXATTRIBS3SVNVPROC VertexAttribs3svNV =
5597 __glGetProcAddress("glVertexAttribs3svNV");
5598 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5599
5600 VertexAttribs3svNV((GLuint) bswap_CARD32(pc + 0),
5601 n,
5602 (const GLshort *) bswap_16_array((uint16_t *) (pc + 8),
5603 0));
5604}
5605
5606void
5607__glXDispSwap_VertexAttribs4dvNV(GLbyte * pc)
5608{
5609 PFNGLVERTEXATTRIBS4DVNVPROC VertexAttribs4dvNV =
5610 __glGetProcAddress("glVertexAttribs4dvNV");
5611 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5612
5613#ifdef __GLX_ALIGN64
5614 const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
5615
5616 if ((unsigned long) (pc) & 7) {
5617 (void) memmove(pc - 4, pc, cmdlen);
5618 pc -= 4;
5619 }
5620#endif
5621
5622 VertexAttribs4dvNV((GLuint) bswap_CARD32(pc + 0),
5623 n,
5624 (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
5625 0));
5626}
5627
5628void
5629__glXDispSwap_VertexAttribs4fvNV(GLbyte * pc)
5630{
5631 PFNGLVERTEXATTRIBS4FVNVPROC VertexAttribs4fvNV =
5632 __glGetProcAddress("glVertexAttribs4fvNV");
5633 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5634
5635 VertexAttribs4fvNV((GLuint) bswap_CARD32(pc + 0),
5636 n,
5637 (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
5638 0));
5639}
5640
5641void
5642__glXDispSwap_VertexAttribs4svNV(GLbyte * pc)
5643{
5644 PFNGLVERTEXATTRIBS4SVNVPROC VertexAttribs4svNV =
5645 __glGetProcAddress("glVertexAttribs4svNV");
5646 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5647
5648 VertexAttribs4svNV((GLuint) bswap_CARD32(pc + 0),
5649 n,
5650 (const GLshort *) bswap_16_array((uint16_t *) (pc + 8),
5651 0));
5652}
5653
5654void
5655__glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc)
5656{
5657 PFNGLVERTEXATTRIBS4UBVNVPROC VertexAttribs4ubvNV =
5658 __glGetProcAddress("glVertexAttribs4ubvNV");
5659 const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
5660
5661 VertexAttribs4ubvNV((GLuint) bswap_CARD32(pc + 0),
5662 n, (const GLubyte *) (pc + 8));
5663}
5664
5665void
5666__glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc)
5667{
5668 PFNGLACTIVESTENCILFACEEXTPROC ActiveStencilFaceEXT =
5669 __glGetProcAddress("glActiveStencilFaceEXT");
5670 ActiveStencilFaceEXT((GLenum) bswap_ENUM(pc + 0));
5671}