~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to GL/glx/indirect_dispatch_swap.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

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