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