1706f2543Smrg/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
2706f2543Smrg
3706f2543Smrg/*
4706f2543Smrg * (C) Copyright IBM Corporation 2005
5706f2543Smrg * All Rights Reserved.
6706f2543Smrg *
7706f2543Smrg * Permission is hereby granted, free of charge, to any person obtaining a
8706f2543Smrg * copy of this software and associated documentation files (the "Software"),
9706f2543Smrg * to deal in the Software without restriction, including without limitation
10706f2543Smrg * the rights to use, copy, modify, merge, publish, distribute, sub license,
11706f2543Smrg * and/or sell copies of the Software, and to permit persons to whom the
12706f2543Smrg * Software is furnished to do so, subject to the following conditions:
13706f2543Smrg *
14706f2543Smrg * The above copyright notice and this permission notice (including the next
15706f2543Smrg * paragraph) shall be included in all copies or substantial portions of the
16706f2543Smrg * Software.
17706f2543Smrg *
18706f2543Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19706f2543Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20706f2543Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
21706f2543Smrg * IBM,
22706f2543Smrg * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23706f2543Smrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24706f2543Smrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25706f2543Smrg * SOFTWARE.
26706f2543Smrg */
27706f2543Smrg
28706f2543Smrg#include <X11/Xmd.h>
29706f2543Smrg#include <GL/gl.h>
30706f2543Smrg#include <GL/glxproto.h>
31706f2543Smrg#include <inttypes.h>
32706f2543Smrg#include "indirect_size.h"
33706f2543Smrg#include "indirect_size_get.h"
34706f2543Smrg#include "indirect_dispatch.h"
35706f2543Smrg#include "glxserver.h"
36706f2543Smrg#include "glxbyteorder.h"
37706f2543Smrg#include "indirect_util.h"
38706f2543Smrg#include "singlesize.h"
39706f2543Smrg#include "glapi.h"
40706f2543Smrg#include "glapitable.h"
41706f2543Smrg#include "glthread.h"
42706f2543Smrg#include "dispatch.h"
43706f2543Smrg
44706f2543Smrg#define __GLX_PAD(x)  (((x) + 3) & ~3)
45706f2543Smrg
46706f2543Smrgtypedef struct {
47706f2543Smrg    __GLX_PIXEL_3D_HDR;
48706f2543Smrg} __GLXpixel3DHeader;
49706f2543Smrg
50706f2543Smrgextern GLboolean __glXErrorOccured( void );
51706f2543Smrgextern void __glXClearErrorOccured( void );
52706f2543Smrg
53706f2543Smrgstatic const unsigned dummy_answer[2] = {0, 0};
54706f2543Smrg
55706f2543Smrgstatic GLsizei
56706f2543Smrgbswap_CARD32( const void * src )
57706f2543Smrg{
58706f2543Smrg    union { uint32_t dst; GLsizei ret; } x;
59706f2543Smrg    x.dst = bswap_32( *(uint32_t *) src );
60706f2543Smrg    return x.ret;
61706f2543Smrg}
62706f2543Smrg
63706f2543Smrgstatic GLshort
64706f2543Smrgbswap_CARD16( const void * src )
65706f2543Smrg{
66706f2543Smrg    union { uint16_t dst; GLshort ret; } x;
67706f2543Smrg    x.dst = bswap_16( *(uint16_t *) src );
68706f2543Smrg    return x.ret;
69706f2543Smrg}
70706f2543Smrg
71706f2543Smrgstatic GLenum
72706f2543Smrgbswap_ENUM( const void * src )
73706f2543Smrg{
74706f2543Smrg    union { uint32_t dst; GLenum ret; } x;
75706f2543Smrg    x.dst = bswap_32( *(uint32_t *) src );
76706f2543Smrg    return x.ret;
77706f2543Smrg}
78706f2543Smrg
79706f2543Smrgstatic GLdouble
80706f2543Smrgbswap_FLOAT64( const void * src )
81706f2543Smrg{
82706f2543Smrg    union { uint64_t dst; GLdouble ret; } x;
83706f2543Smrg    x.dst = bswap_64( *(uint64_t *) src );
84706f2543Smrg    return x.ret;
85706f2543Smrg}
86706f2543Smrg
87706f2543Smrgstatic GLfloat
88706f2543Smrgbswap_FLOAT32( const void * src )
89706f2543Smrg{
90706f2543Smrg    union { uint32_t dst; GLfloat ret; } x;
91706f2543Smrg    x.dst = bswap_32( *(uint32_t *) src );
92706f2543Smrg    return x.ret;
93706f2543Smrg}
94706f2543Smrg
95706f2543Smrgstatic void *
96706f2543Smrgbswap_16_array( uint16_t * src, unsigned count )
97706f2543Smrg{
98706f2543Smrg    unsigned  i;
99706f2543Smrg
100706f2543Smrg    for ( i = 0 ; i < count ; i++ ) {
101706f2543Smrg        uint16_t temp = bswap_16( src[i] );
102706f2543Smrg        src[i] = temp;
103706f2543Smrg    }
104706f2543Smrg
105706f2543Smrg    return src;
106706f2543Smrg}
107706f2543Smrg
108706f2543Smrgstatic void *
109706f2543Smrgbswap_32_array( uint32_t * src, unsigned count )
110706f2543Smrg{
111706f2543Smrg    unsigned  i;
112706f2543Smrg
113706f2543Smrg    for ( i = 0 ; i < count ; i++ ) {
114706f2543Smrg        uint32_t temp = bswap_32( src[i] );
115706f2543Smrg        src[i] = temp;
116706f2543Smrg    }
117706f2543Smrg
118706f2543Smrg    return src;
119706f2543Smrg}
120706f2543Smrg
121706f2543Smrgstatic void *
122706f2543Smrgbswap_64_array( uint64_t * src, unsigned count )
123706f2543Smrg{
124706f2543Smrg    unsigned  i;
125706f2543Smrg
126706f2543Smrg    for ( i = 0 ; i < count ; i++ ) {
127706f2543Smrg        uint64_t temp = bswap_64( src[i] );
128706f2543Smrg        src[i] = temp;
129706f2543Smrg    }
130706f2543Smrg
131706f2543Smrg    return src;
132706f2543Smrg}
133706f2543Smrg
134706f2543Smrgint __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc)
135706f2543Smrg{
136706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
137706f2543Smrg    int error;
138706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
139706f2543Smrg
140706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
141706f2543Smrg    if ( cx != NULL ) {
142706f2543Smrg        CALL_NewList( GET_DISPATCH(), (
143706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
144706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  4 )
145706f2543Smrg        ) );
146706f2543Smrg        error = Success;
147706f2543Smrg    }
148706f2543Smrg
149706f2543Smrg    return error;
150706f2543Smrg}
151706f2543Smrg
152706f2543Smrgint __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc)
153706f2543Smrg{
154706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
155706f2543Smrg    int error;
156706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
157706f2543Smrg
158706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
159706f2543Smrg    if ( cx != NULL ) {
160706f2543Smrg        CALL_EndList( GET_DISPATCH(), () );
161706f2543Smrg        error = Success;
162706f2543Smrg    }
163706f2543Smrg
164706f2543Smrg    return error;
165706f2543Smrg}
166706f2543Smrg
167706f2543Smrgvoid __glXDispSwap_CallList(GLbyte * pc)
168706f2543Smrg{
169706f2543Smrg    CALL_CallList( GET_DISPATCH(), (
170706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 )
171706f2543Smrg    ) );
172706f2543Smrg}
173706f2543Smrg
174706f2543Smrgvoid __glXDispSwap_CallLists(GLbyte * pc)
175706f2543Smrg{
176706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
177706f2543Smrg    const GLenum type =  (GLenum  )bswap_ENUM   ( pc +  4 );
178706f2543Smrg    const GLvoid * lists;
179706f2543Smrg
180706f2543Smrg    switch(type) {
181706f2543Smrg    case GL_BYTE:
182706f2543Smrg    case GL_UNSIGNED_BYTE:
183706f2543Smrg    case GL_2_BYTES:
184706f2543Smrg    case GL_3_BYTES:
185706f2543Smrg    case GL_4_BYTES:
186706f2543Smrg        lists = (const GLvoid *) (pc + 8); break;
187706f2543Smrg    case GL_SHORT:
188706f2543Smrg    case GL_UNSIGNED_SHORT:
189706f2543Smrg        lists = (const GLvoid *) bswap_16_array( (uint16_t *) (pc + 8), n ); break;
190706f2543Smrg    case GL_INT:
191706f2543Smrg    case GL_UNSIGNED_INT:
192706f2543Smrg    case GL_FLOAT:
193706f2543Smrg        lists = (const GLvoid *) bswap_32_array( (uint32_t *) (pc + 8), n ); break;
194706f2543Smrg    default:
195706f2543Smrg        return;
196706f2543Smrg    }
197706f2543Smrg
198706f2543Smrg    CALL_CallLists( GET_DISPATCH(), (
199706f2543Smrg        n,
200706f2543Smrg        type,
201706f2543Smrg        lists
202706f2543Smrg    ) );
203706f2543Smrg}
204706f2543Smrg
205706f2543Smrgint __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc)
206706f2543Smrg{
207706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
208706f2543Smrg    int error;
209706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
210706f2543Smrg
211706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
212706f2543Smrg    if ( cx != NULL ) {
213706f2543Smrg        CALL_DeleteLists( GET_DISPATCH(), (
214706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
215706f2543Smrg             (GLsizei )bswap_CARD32 ( pc +  4 )
216706f2543Smrg        ) );
217706f2543Smrg        error = Success;
218706f2543Smrg    }
219706f2543Smrg
220706f2543Smrg    return error;
221706f2543Smrg}
222706f2543Smrg
223706f2543Smrgint __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc)
224706f2543Smrg{
225706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
226706f2543Smrg    int error;
227706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
228706f2543Smrg
229706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
230706f2543Smrg    if ( cx != NULL ) {
231706f2543Smrg        GLuint retval;
232706f2543Smrg        retval = CALL_GenLists( GET_DISPATCH(), (
233706f2543Smrg             (GLsizei )bswap_CARD32 ( pc +  0 )
234706f2543Smrg        ) );
235706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
236706f2543Smrg        error = Success;
237706f2543Smrg    }
238706f2543Smrg
239706f2543Smrg    return error;
240706f2543Smrg}
241706f2543Smrg
242706f2543Smrgvoid __glXDispSwap_ListBase(GLbyte * pc)
243706f2543Smrg{
244706f2543Smrg    CALL_ListBase( GET_DISPATCH(), (
245706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 )
246706f2543Smrg    ) );
247706f2543Smrg}
248706f2543Smrg
249706f2543Smrgvoid __glXDispSwap_Begin(GLbyte * pc)
250706f2543Smrg{
251706f2543Smrg    CALL_Begin( GET_DISPATCH(), (
252706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
253706f2543Smrg    ) );
254706f2543Smrg}
255706f2543Smrg
256706f2543Smrgvoid __glXDispSwap_Bitmap(GLbyte * pc)
257706f2543Smrg{
258706f2543Smrg    const GLubyte * const bitmap = (const GLubyte *) (pc + 44);
259706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
260706f2543Smrg
261706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
262706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
263706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
264706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
265706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
266706f2543Smrg
267706f2543Smrg    CALL_Bitmap( GET_DISPATCH(), (
268706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 20 ),
269706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 24 ),
270706f2543Smrg         (GLfloat )bswap_FLOAT32( pc + 28 ),
271706f2543Smrg         (GLfloat )bswap_FLOAT32( pc + 32 ),
272706f2543Smrg         (GLfloat )bswap_FLOAT32( pc + 36 ),
273706f2543Smrg         (GLfloat )bswap_FLOAT32( pc + 40 ),
274706f2543Smrg        bitmap
275706f2543Smrg    ) );
276706f2543Smrg}
277706f2543Smrg
278706f2543Smrgvoid __glXDispSwap_Color3bv(GLbyte * pc)
279706f2543Smrg{
280706f2543Smrg    CALL_Color3bv( GET_DISPATCH(), (
281706f2543Smrg         (const GLbyte *)(pc +  0)
282706f2543Smrg    ) );
283706f2543Smrg}
284706f2543Smrg
285706f2543Smrgvoid __glXDispSwap_Color3dv(GLbyte * pc)
286706f2543Smrg{
287706f2543Smrg#ifdef __GLX_ALIGN64
288706f2543Smrg    if ((unsigned long)(pc) & 7) {
289706f2543Smrg        (void) memmove(pc-4, pc, 24);
290706f2543Smrg        pc -= 4;
291706f2543Smrg    }
292706f2543Smrg#endif
293706f2543Smrg
294706f2543Smrg    CALL_Color3dv( GET_DISPATCH(), (
295706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
296706f2543Smrg    ) );
297706f2543Smrg}
298706f2543Smrg
299706f2543Smrgvoid __glXDispSwap_Color3fv(GLbyte * pc)
300706f2543Smrg{
301706f2543Smrg    CALL_Color3fv( GET_DISPATCH(), (
302706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
303706f2543Smrg    ) );
304706f2543Smrg}
305706f2543Smrg
306706f2543Smrgvoid __glXDispSwap_Color3iv(GLbyte * pc)
307706f2543Smrg{
308706f2543Smrg    CALL_Color3iv( GET_DISPATCH(), (
309706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
310706f2543Smrg    ) );
311706f2543Smrg}
312706f2543Smrg
313706f2543Smrgvoid __glXDispSwap_Color3sv(GLbyte * pc)
314706f2543Smrg{
315706f2543Smrg    CALL_Color3sv( GET_DISPATCH(), (
316706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
317706f2543Smrg    ) );
318706f2543Smrg}
319706f2543Smrg
320706f2543Smrgvoid __glXDispSwap_Color3ubv(GLbyte * pc)
321706f2543Smrg{
322706f2543Smrg    CALL_Color3ubv( GET_DISPATCH(), (
323706f2543Smrg         (const GLubyte *)(pc +  0)
324706f2543Smrg    ) );
325706f2543Smrg}
326706f2543Smrg
327706f2543Smrgvoid __glXDispSwap_Color3uiv(GLbyte * pc)
328706f2543Smrg{
329706f2543Smrg    CALL_Color3uiv( GET_DISPATCH(), (
330706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
331706f2543Smrg    ) );
332706f2543Smrg}
333706f2543Smrg
334706f2543Smrgvoid __glXDispSwap_Color3usv(GLbyte * pc)
335706f2543Smrg{
336706f2543Smrg    CALL_Color3usv( GET_DISPATCH(), (
337706f2543Smrg         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
338706f2543Smrg    ) );
339706f2543Smrg}
340706f2543Smrg
341706f2543Smrgvoid __glXDispSwap_Color4bv(GLbyte * pc)
342706f2543Smrg{
343706f2543Smrg    CALL_Color4bv( GET_DISPATCH(), (
344706f2543Smrg         (const GLbyte *)(pc +  0)
345706f2543Smrg    ) );
346706f2543Smrg}
347706f2543Smrg
348706f2543Smrgvoid __glXDispSwap_Color4dv(GLbyte * pc)
349706f2543Smrg{
350706f2543Smrg#ifdef __GLX_ALIGN64
351706f2543Smrg    if ((unsigned long)(pc) & 7) {
352706f2543Smrg        (void) memmove(pc-4, pc, 32);
353706f2543Smrg        pc -= 4;
354706f2543Smrg    }
355706f2543Smrg#endif
356706f2543Smrg
357706f2543Smrg    CALL_Color4dv( GET_DISPATCH(), (
358706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
359706f2543Smrg    ) );
360706f2543Smrg}
361706f2543Smrg
362706f2543Smrgvoid __glXDispSwap_Color4fv(GLbyte * pc)
363706f2543Smrg{
364706f2543Smrg    CALL_Color4fv( GET_DISPATCH(), (
365706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
366706f2543Smrg    ) );
367706f2543Smrg}
368706f2543Smrg
369706f2543Smrgvoid __glXDispSwap_Color4iv(GLbyte * pc)
370706f2543Smrg{
371706f2543Smrg    CALL_Color4iv( GET_DISPATCH(), (
372706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
373706f2543Smrg    ) );
374706f2543Smrg}
375706f2543Smrg
376706f2543Smrgvoid __glXDispSwap_Color4sv(GLbyte * pc)
377706f2543Smrg{
378706f2543Smrg    CALL_Color4sv( GET_DISPATCH(), (
379706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
380706f2543Smrg    ) );
381706f2543Smrg}
382706f2543Smrg
383706f2543Smrgvoid __glXDispSwap_Color4ubv(GLbyte * pc)
384706f2543Smrg{
385706f2543Smrg    CALL_Color4ubv( GET_DISPATCH(), (
386706f2543Smrg         (const GLubyte *)(pc +  0)
387706f2543Smrg    ) );
388706f2543Smrg}
389706f2543Smrg
390706f2543Smrgvoid __glXDispSwap_Color4uiv(GLbyte * pc)
391706f2543Smrg{
392706f2543Smrg    CALL_Color4uiv( GET_DISPATCH(), (
393706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
394706f2543Smrg    ) );
395706f2543Smrg}
396706f2543Smrg
397706f2543Smrgvoid __glXDispSwap_Color4usv(GLbyte * pc)
398706f2543Smrg{
399706f2543Smrg    CALL_Color4usv( GET_DISPATCH(), (
400706f2543Smrg         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
401706f2543Smrg    ) );
402706f2543Smrg}
403706f2543Smrg
404706f2543Smrgvoid __glXDispSwap_EdgeFlagv(GLbyte * pc)
405706f2543Smrg{
406706f2543Smrg    CALL_EdgeFlagv( GET_DISPATCH(), (
407706f2543Smrg         (const GLboolean *)(pc +  0)
408706f2543Smrg    ) );
409706f2543Smrg}
410706f2543Smrg
411706f2543Smrgvoid __glXDispSwap_End(GLbyte * pc)
412706f2543Smrg{
413706f2543Smrg    CALL_End( GET_DISPATCH(), () );
414706f2543Smrg}
415706f2543Smrg
416706f2543Smrgvoid __glXDispSwap_Indexdv(GLbyte * pc)
417706f2543Smrg{
418706f2543Smrg#ifdef __GLX_ALIGN64
419706f2543Smrg    if ((unsigned long)(pc) & 7) {
420706f2543Smrg        (void) memmove(pc-4, pc, 8);
421706f2543Smrg        pc -= 4;
422706f2543Smrg    }
423706f2543Smrg#endif
424706f2543Smrg
425706f2543Smrg    CALL_Indexdv( GET_DISPATCH(), (
426706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
427706f2543Smrg    ) );
428706f2543Smrg}
429706f2543Smrg
430706f2543Smrgvoid __glXDispSwap_Indexfv(GLbyte * pc)
431706f2543Smrg{
432706f2543Smrg    CALL_Indexfv( GET_DISPATCH(), (
433706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
434706f2543Smrg    ) );
435706f2543Smrg}
436706f2543Smrg
437706f2543Smrgvoid __glXDispSwap_Indexiv(GLbyte * pc)
438706f2543Smrg{
439706f2543Smrg    CALL_Indexiv( GET_DISPATCH(), (
440706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
441706f2543Smrg    ) );
442706f2543Smrg}
443706f2543Smrg
444706f2543Smrgvoid __glXDispSwap_Indexsv(GLbyte * pc)
445706f2543Smrg{
446706f2543Smrg    CALL_Indexsv( GET_DISPATCH(), (
447706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 1 )
448706f2543Smrg    ) );
449706f2543Smrg}
450706f2543Smrg
451706f2543Smrgvoid __glXDispSwap_Normal3bv(GLbyte * pc)
452706f2543Smrg{
453706f2543Smrg    CALL_Normal3bv( GET_DISPATCH(), (
454706f2543Smrg         (const GLbyte *)(pc +  0)
455706f2543Smrg    ) );
456706f2543Smrg}
457706f2543Smrg
458706f2543Smrgvoid __glXDispSwap_Normal3dv(GLbyte * pc)
459706f2543Smrg{
460706f2543Smrg#ifdef __GLX_ALIGN64
461706f2543Smrg    if ((unsigned long)(pc) & 7) {
462706f2543Smrg        (void) memmove(pc-4, pc, 24);
463706f2543Smrg        pc -= 4;
464706f2543Smrg    }
465706f2543Smrg#endif
466706f2543Smrg
467706f2543Smrg    CALL_Normal3dv( GET_DISPATCH(), (
468706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
469706f2543Smrg    ) );
470706f2543Smrg}
471706f2543Smrg
472706f2543Smrgvoid __glXDispSwap_Normal3fv(GLbyte * pc)
473706f2543Smrg{
474706f2543Smrg    CALL_Normal3fv( GET_DISPATCH(), (
475706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
476706f2543Smrg    ) );
477706f2543Smrg}
478706f2543Smrg
479706f2543Smrgvoid __glXDispSwap_Normal3iv(GLbyte * pc)
480706f2543Smrg{
481706f2543Smrg    CALL_Normal3iv( GET_DISPATCH(), (
482706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
483706f2543Smrg    ) );
484706f2543Smrg}
485706f2543Smrg
486706f2543Smrgvoid __glXDispSwap_Normal3sv(GLbyte * pc)
487706f2543Smrg{
488706f2543Smrg    CALL_Normal3sv( GET_DISPATCH(), (
489706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
490706f2543Smrg    ) );
491706f2543Smrg}
492706f2543Smrg
493706f2543Smrgvoid __glXDispSwap_RasterPos2dv(GLbyte * pc)
494706f2543Smrg{
495706f2543Smrg#ifdef __GLX_ALIGN64
496706f2543Smrg    if ((unsigned long)(pc) & 7) {
497706f2543Smrg        (void) memmove(pc-4, pc, 16);
498706f2543Smrg        pc -= 4;
499706f2543Smrg    }
500706f2543Smrg#endif
501706f2543Smrg
502706f2543Smrg    CALL_RasterPos2dv( GET_DISPATCH(), (
503706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
504706f2543Smrg    ) );
505706f2543Smrg}
506706f2543Smrg
507706f2543Smrgvoid __glXDispSwap_RasterPos2fv(GLbyte * pc)
508706f2543Smrg{
509706f2543Smrg    CALL_RasterPos2fv( GET_DISPATCH(), (
510706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
511706f2543Smrg    ) );
512706f2543Smrg}
513706f2543Smrg
514706f2543Smrgvoid __glXDispSwap_RasterPos2iv(GLbyte * pc)
515706f2543Smrg{
516706f2543Smrg    CALL_RasterPos2iv( GET_DISPATCH(), (
517706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
518706f2543Smrg    ) );
519706f2543Smrg}
520706f2543Smrg
521706f2543Smrgvoid __glXDispSwap_RasterPos2sv(GLbyte * pc)
522706f2543Smrg{
523706f2543Smrg    CALL_RasterPos2sv( GET_DISPATCH(), (
524706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 2 )
525706f2543Smrg    ) );
526706f2543Smrg}
527706f2543Smrg
528706f2543Smrgvoid __glXDispSwap_RasterPos3dv(GLbyte * pc)
529706f2543Smrg{
530706f2543Smrg#ifdef __GLX_ALIGN64
531706f2543Smrg    if ((unsigned long)(pc) & 7) {
532706f2543Smrg        (void) memmove(pc-4, pc, 24);
533706f2543Smrg        pc -= 4;
534706f2543Smrg    }
535706f2543Smrg#endif
536706f2543Smrg
537706f2543Smrg    CALL_RasterPos3dv( GET_DISPATCH(), (
538706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
539706f2543Smrg    ) );
540706f2543Smrg}
541706f2543Smrg
542706f2543Smrgvoid __glXDispSwap_RasterPos3fv(GLbyte * pc)
543706f2543Smrg{
544706f2543Smrg    CALL_RasterPos3fv( GET_DISPATCH(), (
545706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
546706f2543Smrg    ) );
547706f2543Smrg}
548706f2543Smrg
549706f2543Smrgvoid __glXDispSwap_RasterPos3iv(GLbyte * pc)
550706f2543Smrg{
551706f2543Smrg    CALL_RasterPos3iv( GET_DISPATCH(), (
552706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
553706f2543Smrg    ) );
554706f2543Smrg}
555706f2543Smrg
556706f2543Smrgvoid __glXDispSwap_RasterPos3sv(GLbyte * pc)
557706f2543Smrg{
558706f2543Smrg    CALL_RasterPos3sv( GET_DISPATCH(), (
559706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
560706f2543Smrg    ) );
561706f2543Smrg}
562706f2543Smrg
563706f2543Smrgvoid __glXDispSwap_RasterPos4dv(GLbyte * pc)
564706f2543Smrg{
565706f2543Smrg#ifdef __GLX_ALIGN64
566706f2543Smrg    if ((unsigned long)(pc) & 7) {
567706f2543Smrg        (void) memmove(pc-4, pc, 32);
568706f2543Smrg        pc -= 4;
569706f2543Smrg    }
570706f2543Smrg#endif
571706f2543Smrg
572706f2543Smrg    CALL_RasterPos4dv( GET_DISPATCH(), (
573706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
574706f2543Smrg    ) );
575706f2543Smrg}
576706f2543Smrg
577706f2543Smrgvoid __glXDispSwap_RasterPos4fv(GLbyte * pc)
578706f2543Smrg{
579706f2543Smrg    CALL_RasterPos4fv( GET_DISPATCH(), (
580706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
581706f2543Smrg    ) );
582706f2543Smrg}
583706f2543Smrg
584706f2543Smrgvoid __glXDispSwap_RasterPos4iv(GLbyte * pc)
585706f2543Smrg{
586706f2543Smrg    CALL_RasterPos4iv( GET_DISPATCH(), (
587706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
588706f2543Smrg    ) );
589706f2543Smrg}
590706f2543Smrg
591706f2543Smrgvoid __glXDispSwap_RasterPos4sv(GLbyte * pc)
592706f2543Smrg{
593706f2543Smrg    CALL_RasterPos4sv( GET_DISPATCH(), (
594706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
595706f2543Smrg    ) );
596706f2543Smrg}
597706f2543Smrg
598706f2543Smrgvoid __glXDispSwap_Rectdv(GLbyte * pc)
599706f2543Smrg{
600706f2543Smrg#ifdef __GLX_ALIGN64
601706f2543Smrg    if ((unsigned long)(pc) & 7) {
602706f2543Smrg        (void) memmove(pc-4, pc, 32);
603706f2543Smrg        pc -= 4;
604706f2543Smrg    }
605706f2543Smrg#endif
606706f2543Smrg
607706f2543Smrg    CALL_Rectdv( GET_DISPATCH(), (
608706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 ),
609706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 16), 2 )
610706f2543Smrg    ) );
611706f2543Smrg}
612706f2543Smrg
613706f2543Smrgvoid __glXDispSwap_Rectfv(GLbyte * pc)
614706f2543Smrg{
615706f2543Smrg    CALL_Rectfv( GET_DISPATCH(), (
616706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 ),
617706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 2 )
618706f2543Smrg    ) );
619706f2543Smrg}
620706f2543Smrg
621706f2543Smrgvoid __glXDispSwap_Rectiv(GLbyte * pc)
622706f2543Smrg{
623706f2543Smrg    CALL_Rectiv( GET_DISPATCH(), (
624706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 2 ),
625706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  8), 2 )
626706f2543Smrg    ) );
627706f2543Smrg}
628706f2543Smrg
629706f2543Smrgvoid __glXDispSwap_Rectsv(GLbyte * pc)
630706f2543Smrg{
631706f2543Smrg    CALL_Rectsv( GET_DISPATCH(), (
632706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 2 ),
633706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 2 )
634706f2543Smrg    ) );
635706f2543Smrg}
636706f2543Smrg
637706f2543Smrgvoid __glXDispSwap_TexCoord1dv(GLbyte * pc)
638706f2543Smrg{
639706f2543Smrg#ifdef __GLX_ALIGN64
640706f2543Smrg    if ((unsigned long)(pc) & 7) {
641706f2543Smrg        (void) memmove(pc-4, pc, 8);
642706f2543Smrg        pc -= 4;
643706f2543Smrg    }
644706f2543Smrg#endif
645706f2543Smrg
646706f2543Smrg    CALL_TexCoord1dv( GET_DISPATCH(), (
647706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
648706f2543Smrg    ) );
649706f2543Smrg}
650706f2543Smrg
651706f2543Smrgvoid __glXDispSwap_TexCoord1fv(GLbyte * pc)
652706f2543Smrg{
653706f2543Smrg    CALL_TexCoord1fv( GET_DISPATCH(), (
654706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
655706f2543Smrg    ) );
656706f2543Smrg}
657706f2543Smrg
658706f2543Smrgvoid __glXDispSwap_TexCoord1iv(GLbyte * pc)
659706f2543Smrg{
660706f2543Smrg    CALL_TexCoord1iv( GET_DISPATCH(), (
661706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
662706f2543Smrg    ) );
663706f2543Smrg}
664706f2543Smrg
665706f2543Smrgvoid __glXDispSwap_TexCoord1sv(GLbyte * pc)
666706f2543Smrg{
667706f2543Smrg    CALL_TexCoord1sv( GET_DISPATCH(), (
668706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 1 )
669706f2543Smrg    ) );
670706f2543Smrg}
671706f2543Smrg
672706f2543Smrgvoid __glXDispSwap_TexCoord2dv(GLbyte * pc)
673706f2543Smrg{
674706f2543Smrg#ifdef __GLX_ALIGN64
675706f2543Smrg    if ((unsigned long)(pc) & 7) {
676706f2543Smrg        (void) memmove(pc-4, pc, 16);
677706f2543Smrg        pc -= 4;
678706f2543Smrg    }
679706f2543Smrg#endif
680706f2543Smrg
681706f2543Smrg    CALL_TexCoord2dv( GET_DISPATCH(), (
682706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
683706f2543Smrg    ) );
684706f2543Smrg}
685706f2543Smrg
686706f2543Smrgvoid __glXDispSwap_TexCoord2fv(GLbyte * pc)
687706f2543Smrg{
688706f2543Smrg    CALL_TexCoord2fv( GET_DISPATCH(), (
689706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
690706f2543Smrg    ) );
691706f2543Smrg}
692706f2543Smrg
693706f2543Smrgvoid __glXDispSwap_TexCoord2iv(GLbyte * pc)
694706f2543Smrg{
695706f2543Smrg    CALL_TexCoord2iv( GET_DISPATCH(), (
696706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
697706f2543Smrg    ) );
698706f2543Smrg}
699706f2543Smrg
700706f2543Smrgvoid __glXDispSwap_TexCoord2sv(GLbyte * pc)
701706f2543Smrg{
702706f2543Smrg    CALL_TexCoord2sv( GET_DISPATCH(), (
703706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 2 )
704706f2543Smrg    ) );
705706f2543Smrg}
706706f2543Smrg
707706f2543Smrgvoid __glXDispSwap_TexCoord3dv(GLbyte * pc)
708706f2543Smrg{
709706f2543Smrg#ifdef __GLX_ALIGN64
710706f2543Smrg    if ((unsigned long)(pc) & 7) {
711706f2543Smrg        (void) memmove(pc-4, pc, 24);
712706f2543Smrg        pc -= 4;
713706f2543Smrg    }
714706f2543Smrg#endif
715706f2543Smrg
716706f2543Smrg    CALL_TexCoord3dv( GET_DISPATCH(), (
717706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
718706f2543Smrg    ) );
719706f2543Smrg}
720706f2543Smrg
721706f2543Smrgvoid __glXDispSwap_TexCoord3fv(GLbyte * pc)
722706f2543Smrg{
723706f2543Smrg    CALL_TexCoord3fv( GET_DISPATCH(), (
724706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
725706f2543Smrg    ) );
726706f2543Smrg}
727706f2543Smrg
728706f2543Smrgvoid __glXDispSwap_TexCoord3iv(GLbyte * pc)
729706f2543Smrg{
730706f2543Smrg    CALL_TexCoord3iv( GET_DISPATCH(), (
731706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
732706f2543Smrg    ) );
733706f2543Smrg}
734706f2543Smrg
735706f2543Smrgvoid __glXDispSwap_TexCoord3sv(GLbyte * pc)
736706f2543Smrg{
737706f2543Smrg    CALL_TexCoord3sv( GET_DISPATCH(), (
738706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
739706f2543Smrg    ) );
740706f2543Smrg}
741706f2543Smrg
742706f2543Smrgvoid __glXDispSwap_TexCoord4dv(GLbyte * pc)
743706f2543Smrg{
744706f2543Smrg#ifdef __GLX_ALIGN64
745706f2543Smrg    if ((unsigned long)(pc) & 7) {
746706f2543Smrg        (void) memmove(pc-4, pc, 32);
747706f2543Smrg        pc -= 4;
748706f2543Smrg    }
749706f2543Smrg#endif
750706f2543Smrg
751706f2543Smrg    CALL_TexCoord4dv( GET_DISPATCH(), (
752706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
753706f2543Smrg    ) );
754706f2543Smrg}
755706f2543Smrg
756706f2543Smrgvoid __glXDispSwap_TexCoord4fv(GLbyte * pc)
757706f2543Smrg{
758706f2543Smrg    CALL_TexCoord4fv( GET_DISPATCH(), (
759706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
760706f2543Smrg    ) );
761706f2543Smrg}
762706f2543Smrg
763706f2543Smrgvoid __glXDispSwap_TexCoord4iv(GLbyte * pc)
764706f2543Smrg{
765706f2543Smrg    CALL_TexCoord4iv( GET_DISPATCH(), (
766706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
767706f2543Smrg    ) );
768706f2543Smrg}
769706f2543Smrg
770706f2543Smrgvoid __glXDispSwap_TexCoord4sv(GLbyte * pc)
771706f2543Smrg{
772706f2543Smrg    CALL_TexCoord4sv( GET_DISPATCH(), (
773706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
774706f2543Smrg    ) );
775706f2543Smrg}
776706f2543Smrg
777706f2543Smrgvoid __glXDispSwap_Vertex2dv(GLbyte * pc)
778706f2543Smrg{
779706f2543Smrg#ifdef __GLX_ALIGN64
780706f2543Smrg    if ((unsigned long)(pc) & 7) {
781706f2543Smrg        (void) memmove(pc-4, pc, 16);
782706f2543Smrg        pc -= 4;
783706f2543Smrg    }
784706f2543Smrg#endif
785706f2543Smrg
786706f2543Smrg    CALL_Vertex2dv( GET_DISPATCH(), (
787706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
788706f2543Smrg    ) );
789706f2543Smrg}
790706f2543Smrg
791706f2543Smrgvoid __glXDispSwap_Vertex2fv(GLbyte * pc)
792706f2543Smrg{
793706f2543Smrg    CALL_Vertex2fv( GET_DISPATCH(), (
794706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
795706f2543Smrg    ) );
796706f2543Smrg}
797706f2543Smrg
798706f2543Smrgvoid __glXDispSwap_Vertex2iv(GLbyte * pc)
799706f2543Smrg{
800706f2543Smrg    CALL_Vertex2iv( GET_DISPATCH(), (
801706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
802706f2543Smrg    ) );
803706f2543Smrg}
804706f2543Smrg
805706f2543Smrgvoid __glXDispSwap_Vertex2sv(GLbyte * pc)
806706f2543Smrg{
807706f2543Smrg    CALL_Vertex2sv( GET_DISPATCH(), (
808706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 2 )
809706f2543Smrg    ) );
810706f2543Smrg}
811706f2543Smrg
812706f2543Smrgvoid __glXDispSwap_Vertex3dv(GLbyte * pc)
813706f2543Smrg{
814706f2543Smrg#ifdef __GLX_ALIGN64
815706f2543Smrg    if ((unsigned long)(pc) & 7) {
816706f2543Smrg        (void) memmove(pc-4, pc, 24);
817706f2543Smrg        pc -= 4;
818706f2543Smrg    }
819706f2543Smrg#endif
820706f2543Smrg
821706f2543Smrg    CALL_Vertex3dv( GET_DISPATCH(), (
822706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
823706f2543Smrg    ) );
824706f2543Smrg}
825706f2543Smrg
826706f2543Smrgvoid __glXDispSwap_Vertex3fv(GLbyte * pc)
827706f2543Smrg{
828706f2543Smrg    CALL_Vertex3fv( GET_DISPATCH(), (
829706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
830706f2543Smrg    ) );
831706f2543Smrg}
832706f2543Smrg
833706f2543Smrgvoid __glXDispSwap_Vertex3iv(GLbyte * pc)
834706f2543Smrg{
835706f2543Smrg    CALL_Vertex3iv( GET_DISPATCH(), (
836706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
837706f2543Smrg    ) );
838706f2543Smrg}
839706f2543Smrg
840706f2543Smrgvoid __glXDispSwap_Vertex3sv(GLbyte * pc)
841706f2543Smrg{
842706f2543Smrg    CALL_Vertex3sv( GET_DISPATCH(), (
843706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
844706f2543Smrg    ) );
845706f2543Smrg}
846706f2543Smrg
847706f2543Smrgvoid __glXDispSwap_Vertex4dv(GLbyte * pc)
848706f2543Smrg{
849706f2543Smrg#ifdef __GLX_ALIGN64
850706f2543Smrg    if ((unsigned long)(pc) & 7) {
851706f2543Smrg        (void) memmove(pc-4, pc, 32);
852706f2543Smrg        pc -= 4;
853706f2543Smrg    }
854706f2543Smrg#endif
855706f2543Smrg
856706f2543Smrg    CALL_Vertex4dv( GET_DISPATCH(), (
857706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
858706f2543Smrg    ) );
859706f2543Smrg}
860706f2543Smrg
861706f2543Smrgvoid __glXDispSwap_Vertex4fv(GLbyte * pc)
862706f2543Smrg{
863706f2543Smrg    CALL_Vertex4fv( GET_DISPATCH(), (
864706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
865706f2543Smrg    ) );
866706f2543Smrg}
867706f2543Smrg
868706f2543Smrgvoid __glXDispSwap_Vertex4iv(GLbyte * pc)
869706f2543Smrg{
870706f2543Smrg    CALL_Vertex4iv( GET_DISPATCH(), (
871706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
872706f2543Smrg    ) );
873706f2543Smrg}
874706f2543Smrg
875706f2543Smrgvoid __glXDispSwap_Vertex4sv(GLbyte * pc)
876706f2543Smrg{
877706f2543Smrg    CALL_Vertex4sv( GET_DISPATCH(), (
878706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
879706f2543Smrg    ) );
880706f2543Smrg}
881706f2543Smrg
882706f2543Smrgvoid __glXDispSwap_ClipPlane(GLbyte * pc)
883706f2543Smrg{
884706f2543Smrg#ifdef __GLX_ALIGN64
885706f2543Smrg    if ((unsigned long)(pc) & 7) {
886706f2543Smrg        (void) memmove(pc-4, pc, 36);
887706f2543Smrg        pc -= 4;
888706f2543Smrg    }
889706f2543Smrg#endif
890706f2543Smrg
891706f2543Smrg    CALL_ClipPlane( GET_DISPATCH(), (
892706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 32 ),
893706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
894706f2543Smrg    ) );
895706f2543Smrg}
896706f2543Smrg
897706f2543Smrgvoid __glXDispSwap_ColorMaterial(GLbyte * pc)
898706f2543Smrg{
899706f2543Smrg    CALL_ColorMaterial( GET_DISPATCH(), (
900706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
901706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 )
902706f2543Smrg    ) );
903706f2543Smrg}
904706f2543Smrg
905706f2543Smrgvoid __glXDispSwap_CullFace(GLbyte * pc)
906706f2543Smrg{
907706f2543Smrg    CALL_CullFace( GET_DISPATCH(), (
908706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
909706f2543Smrg    ) );
910706f2543Smrg}
911706f2543Smrg
912706f2543Smrgvoid __glXDispSwap_Fogf(GLbyte * pc)
913706f2543Smrg{
914706f2543Smrg    CALL_Fogf( GET_DISPATCH(), (
915706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
916706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 )
917706f2543Smrg    ) );
918706f2543Smrg}
919706f2543Smrg
920706f2543Smrgvoid __glXDispSwap_Fogfv(GLbyte * pc)
921706f2543Smrg{
922706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
923706f2543Smrg    const GLfloat * params;
924706f2543Smrg
925706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glFogfv_size(pname) );
926706f2543Smrg
927706f2543Smrg    CALL_Fogfv( GET_DISPATCH(), (
928706f2543Smrg        pname,
929706f2543Smrg        params
930706f2543Smrg    ) );
931706f2543Smrg}
932706f2543Smrg
933706f2543Smrgvoid __glXDispSwap_Fogi(GLbyte * pc)
934706f2543Smrg{
935706f2543Smrg    CALL_Fogi( GET_DISPATCH(), (
936706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
937706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 )
938706f2543Smrg    ) );
939706f2543Smrg}
940706f2543Smrg
941706f2543Smrgvoid __glXDispSwap_Fogiv(GLbyte * pc)
942706f2543Smrg{
943706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
944706f2543Smrg    const GLint * params;
945706f2543Smrg
946706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glFogiv_size(pname) );
947706f2543Smrg
948706f2543Smrg    CALL_Fogiv( GET_DISPATCH(), (
949706f2543Smrg        pname,
950706f2543Smrg        params
951706f2543Smrg    ) );
952706f2543Smrg}
953706f2543Smrg
954706f2543Smrgvoid __glXDispSwap_FrontFace(GLbyte * pc)
955706f2543Smrg{
956706f2543Smrg    CALL_FrontFace( GET_DISPATCH(), (
957706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
958706f2543Smrg    ) );
959706f2543Smrg}
960706f2543Smrg
961706f2543Smrgvoid __glXDispSwap_Hint(GLbyte * pc)
962706f2543Smrg{
963706f2543Smrg    CALL_Hint( GET_DISPATCH(), (
964706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
965706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 )
966706f2543Smrg    ) );
967706f2543Smrg}
968706f2543Smrg
969706f2543Smrgvoid __glXDispSwap_Lightf(GLbyte * pc)
970706f2543Smrg{
971706f2543Smrg    CALL_Lightf( GET_DISPATCH(), (
972706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
973706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
974706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 )
975706f2543Smrg    ) );
976706f2543Smrg}
977706f2543Smrg
978706f2543Smrgvoid __glXDispSwap_Lightfv(GLbyte * pc)
979706f2543Smrg{
980706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
981706f2543Smrg    const GLfloat * params;
982706f2543Smrg
983706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glLightfv_size(pname) );
984706f2543Smrg
985706f2543Smrg    CALL_Lightfv( GET_DISPATCH(), (
986706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
987706f2543Smrg        pname,
988706f2543Smrg        params
989706f2543Smrg    ) );
990706f2543Smrg}
991706f2543Smrg
992706f2543Smrgvoid __glXDispSwap_Lighti(GLbyte * pc)
993706f2543Smrg{
994706f2543Smrg    CALL_Lighti( GET_DISPATCH(), (
995706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
996706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
997706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 )
998706f2543Smrg    ) );
999706f2543Smrg}
1000706f2543Smrg
1001706f2543Smrgvoid __glXDispSwap_Lightiv(GLbyte * pc)
1002706f2543Smrg{
1003706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1004706f2543Smrg    const GLint * params;
1005706f2543Smrg
1006706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glLightiv_size(pname) );
1007706f2543Smrg
1008706f2543Smrg    CALL_Lightiv( GET_DISPATCH(), (
1009706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1010706f2543Smrg        pname,
1011706f2543Smrg        params
1012706f2543Smrg    ) );
1013706f2543Smrg}
1014706f2543Smrg
1015706f2543Smrgvoid __glXDispSwap_LightModelf(GLbyte * pc)
1016706f2543Smrg{
1017706f2543Smrg    CALL_LightModelf( GET_DISPATCH(), (
1018706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1019706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 )
1020706f2543Smrg    ) );
1021706f2543Smrg}
1022706f2543Smrg
1023706f2543Smrgvoid __glXDispSwap_LightModelfv(GLbyte * pc)
1024706f2543Smrg{
1025706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
1026706f2543Smrg    const GLfloat * params;
1027706f2543Smrg
1028706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModelfv_size(pname) );
1029706f2543Smrg
1030706f2543Smrg    CALL_LightModelfv( GET_DISPATCH(), (
1031706f2543Smrg        pname,
1032706f2543Smrg        params
1033706f2543Smrg    ) );
1034706f2543Smrg}
1035706f2543Smrg
1036706f2543Smrgvoid __glXDispSwap_LightModeli(GLbyte * pc)
1037706f2543Smrg{
1038706f2543Smrg    CALL_LightModeli( GET_DISPATCH(), (
1039706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1040706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 )
1041706f2543Smrg    ) );
1042706f2543Smrg}
1043706f2543Smrg
1044706f2543Smrgvoid __glXDispSwap_LightModeliv(GLbyte * pc)
1045706f2543Smrg{
1046706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
1047706f2543Smrg    const GLint * params;
1048706f2543Smrg
1049706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModeliv_size(pname) );
1050706f2543Smrg
1051706f2543Smrg    CALL_LightModeliv( GET_DISPATCH(), (
1052706f2543Smrg        pname,
1053706f2543Smrg        params
1054706f2543Smrg    ) );
1055706f2543Smrg}
1056706f2543Smrg
1057706f2543Smrgvoid __glXDispSwap_LineStipple(GLbyte * pc)
1058706f2543Smrg{
1059706f2543Smrg    CALL_LineStipple( GET_DISPATCH(), (
1060706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  0 ),
1061706f2543Smrg         (GLushort)bswap_CARD16 ( pc +  4 )
1062706f2543Smrg    ) );
1063706f2543Smrg}
1064706f2543Smrg
1065706f2543Smrgvoid __glXDispSwap_LineWidth(GLbyte * pc)
1066706f2543Smrg{
1067706f2543Smrg    CALL_LineWidth( GET_DISPATCH(), (
1068706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 )
1069706f2543Smrg    ) );
1070706f2543Smrg}
1071706f2543Smrg
1072706f2543Smrgvoid __glXDispSwap_Materialf(GLbyte * pc)
1073706f2543Smrg{
1074706f2543Smrg    CALL_Materialf( GET_DISPATCH(), (
1075706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1076706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
1077706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 )
1078706f2543Smrg    ) );
1079706f2543Smrg}
1080706f2543Smrg
1081706f2543Smrgvoid __glXDispSwap_Materialfv(GLbyte * pc)
1082706f2543Smrg{
1083706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1084706f2543Smrg    const GLfloat * params;
1085706f2543Smrg
1086706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialfv_size(pname) );
1087706f2543Smrg
1088706f2543Smrg    CALL_Materialfv( GET_DISPATCH(), (
1089706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1090706f2543Smrg        pname,
1091706f2543Smrg        params
1092706f2543Smrg    ) );
1093706f2543Smrg}
1094706f2543Smrg
1095706f2543Smrgvoid __glXDispSwap_Materiali(GLbyte * pc)
1096706f2543Smrg{
1097706f2543Smrg    CALL_Materiali( GET_DISPATCH(), (
1098706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1099706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
1100706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 )
1101706f2543Smrg    ) );
1102706f2543Smrg}
1103706f2543Smrg
1104706f2543Smrgvoid __glXDispSwap_Materialiv(GLbyte * pc)
1105706f2543Smrg{
1106706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1107706f2543Smrg    const GLint * params;
1108706f2543Smrg
1109706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialiv_size(pname) );
1110706f2543Smrg
1111706f2543Smrg    CALL_Materialiv( GET_DISPATCH(), (
1112706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1113706f2543Smrg        pname,
1114706f2543Smrg        params
1115706f2543Smrg    ) );
1116706f2543Smrg}
1117706f2543Smrg
1118706f2543Smrgvoid __glXDispSwap_PointSize(GLbyte * pc)
1119706f2543Smrg{
1120706f2543Smrg    CALL_PointSize( GET_DISPATCH(), (
1121706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 )
1122706f2543Smrg    ) );
1123706f2543Smrg}
1124706f2543Smrg
1125706f2543Smrgvoid __glXDispSwap_PolygonMode(GLbyte * pc)
1126706f2543Smrg{
1127706f2543Smrg    CALL_PolygonMode( GET_DISPATCH(), (
1128706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1129706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 )
1130706f2543Smrg    ) );
1131706f2543Smrg}
1132706f2543Smrg
1133706f2543Smrgvoid __glXDispSwap_PolygonStipple(GLbyte * pc)
1134706f2543Smrg{
1135706f2543Smrg    const GLubyte * const mask = (const GLubyte *) (pc + 20);
1136706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
1137706f2543Smrg
1138706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
1139706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
1140706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
1141706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
1142706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
1143706f2543Smrg
1144706f2543Smrg    CALL_PolygonStipple( GET_DISPATCH(), (
1145706f2543Smrg        mask
1146706f2543Smrg    ) );
1147706f2543Smrg}
1148706f2543Smrg
1149706f2543Smrgvoid __glXDispSwap_Scissor(GLbyte * pc)
1150706f2543Smrg{
1151706f2543Smrg    CALL_Scissor( GET_DISPATCH(), (
1152706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  0 ),
1153706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
1154706f2543Smrg         (GLsizei )bswap_CARD32 ( pc +  8 ),
1155706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 12 )
1156706f2543Smrg    ) );
1157706f2543Smrg}
1158706f2543Smrg
1159706f2543Smrgvoid __glXDispSwap_ShadeModel(GLbyte * pc)
1160706f2543Smrg{
1161706f2543Smrg    CALL_ShadeModel( GET_DISPATCH(), (
1162706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
1163706f2543Smrg    ) );
1164706f2543Smrg}
1165706f2543Smrg
1166706f2543Smrgvoid __glXDispSwap_TexParameterf(GLbyte * pc)
1167706f2543Smrg{
1168706f2543Smrg    CALL_TexParameterf( GET_DISPATCH(), (
1169706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1170706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
1171706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 )
1172706f2543Smrg    ) );
1173706f2543Smrg}
1174706f2543Smrg
1175706f2543Smrgvoid __glXDispSwap_TexParameterfv(GLbyte * pc)
1176706f2543Smrg{
1177706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1178706f2543Smrg    const GLfloat * params;
1179706f2543Smrg
1180706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameterfv_size(pname) );
1181706f2543Smrg
1182706f2543Smrg    CALL_TexParameterfv( GET_DISPATCH(), (
1183706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1184706f2543Smrg        pname,
1185706f2543Smrg        params
1186706f2543Smrg    ) );
1187706f2543Smrg}
1188706f2543Smrg
1189706f2543Smrgvoid __glXDispSwap_TexParameteri(GLbyte * pc)
1190706f2543Smrg{
1191706f2543Smrg    CALL_TexParameteri( GET_DISPATCH(), (
1192706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1193706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
1194706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 )
1195706f2543Smrg    ) );
1196706f2543Smrg}
1197706f2543Smrg
1198706f2543Smrgvoid __glXDispSwap_TexParameteriv(GLbyte * pc)
1199706f2543Smrg{
1200706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1201706f2543Smrg    const GLint * params;
1202706f2543Smrg
1203706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameteriv_size(pname) );
1204706f2543Smrg
1205706f2543Smrg    CALL_TexParameteriv( GET_DISPATCH(), (
1206706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1207706f2543Smrg        pname,
1208706f2543Smrg        params
1209706f2543Smrg    ) );
1210706f2543Smrg}
1211706f2543Smrg
1212706f2543Smrgvoid __glXDispSwap_TexImage1D(GLbyte * pc)
1213706f2543Smrg{
1214706f2543Smrg    const GLvoid * const pixels = (const GLvoid *) (pc + 52);
1215706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
1216706f2543Smrg
1217706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
1218706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
1219706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
1220706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
1221706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
1222706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
1223706f2543Smrg
1224706f2543Smrg    CALL_TexImage1D( GET_DISPATCH(), (
1225706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 20 ),
1226706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 24 ),
1227706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 28 ),
1228706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 32 ),
1229706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 40 ),
1230706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 44 ),
1231706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 48 ),
1232706f2543Smrg        pixels
1233706f2543Smrg    ) );
1234706f2543Smrg}
1235706f2543Smrg
1236706f2543Smrgvoid __glXDispSwap_TexImage2D(GLbyte * pc)
1237706f2543Smrg{
1238706f2543Smrg    const GLvoid * const pixels = (const GLvoid *) (pc + 52);
1239706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
1240706f2543Smrg
1241706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
1242706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
1243706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
1244706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
1245706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
1246706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
1247706f2543Smrg
1248706f2543Smrg    CALL_TexImage2D( GET_DISPATCH(), (
1249706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 20 ),
1250706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 24 ),
1251706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 28 ),
1252706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 32 ),
1253706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 36 ),
1254706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 40 ),
1255706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 44 ),
1256706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 48 ),
1257706f2543Smrg        pixels
1258706f2543Smrg    ) );
1259706f2543Smrg}
1260706f2543Smrg
1261706f2543Smrgvoid __glXDispSwap_TexEnvf(GLbyte * pc)
1262706f2543Smrg{
1263706f2543Smrg    CALL_TexEnvf( GET_DISPATCH(), (
1264706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1265706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
1266706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 )
1267706f2543Smrg    ) );
1268706f2543Smrg}
1269706f2543Smrg
1270706f2543Smrgvoid __glXDispSwap_TexEnvfv(GLbyte * pc)
1271706f2543Smrg{
1272706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1273706f2543Smrg    const GLfloat * params;
1274706f2543Smrg
1275706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnvfv_size(pname) );
1276706f2543Smrg
1277706f2543Smrg    CALL_TexEnvfv( GET_DISPATCH(), (
1278706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1279706f2543Smrg        pname,
1280706f2543Smrg        params
1281706f2543Smrg    ) );
1282706f2543Smrg}
1283706f2543Smrg
1284706f2543Smrgvoid __glXDispSwap_TexEnvi(GLbyte * pc)
1285706f2543Smrg{
1286706f2543Smrg    CALL_TexEnvi( GET_DISPATCH(), (
1287706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1288706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
1289706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 )
1290706f2543Smrg    ) );
1291706f2543Smrg}
1292706f2543Smrg
1293706f2543Smrgvoid __glXDispSwap_TexEnviv(GLbyte * pc)
1294706f2543Smrg{
1295706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1296706f2543Smrg    const GLint * params;
1297706f2543Smrg
1298706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnviv_size(pname) );
1299706f2543Smrg
1300706f2543Smrg    CALL_TexEnviv( GET_DISPATCH(), (
1301706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1302706f2543Smrg        pname,
1303706f2543Smrg        params
1304706f2543Smrg    ) );
1305706f2543Smrg}
1306706f2543Smrg
1307706f2543Smrgvoid __glXDispSwap_TexGend(GLbyte * pc)
1308706f2543Smrg{
1309706f2543Smrg#ifdef __GLX_ALIGN64
1310706f2543Smrg    if ((unsigned long)(pc) & 7) {
1311706f2543Smrg        (void) memmove(pc-4, pc, 16);
1312706f2543Smrg        pc -= 4;
1313706f2543Smrg    }
1314706f2543Smrg#endif
1315706f2543Smrg
1316706f2543Smrg    CALL_TexGend( GET_DISPATCH(), (
1317706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
1318706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 12 ),
1319706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  0 )
1320706f2543Smrg    ) );
1321706f2543Smrg}
1322706f2543Smrg
1323706f2543Smrgvoid __glXDispSwap_TexGendv(GLbyte * pc)
1324706f2543Smrg{
1325706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1326706f2543Smrg    const GLdouble * params;
1327706f2543Smrg
1328706f2543Smrg#ifdef __GLX_ALIGN64
1329706f2543Smrg    const GLuint compsize = __glTexGendv_size(pname);
1330706f2543Smrg    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
1331706f2543Smrg    if ((unsigned long)(pc) & 7) {
1332706f2543Smrg        (void) memmove(pc-4, pc, cmdlen);
1333706f2543Smrg        pc -= 4;
1334706f2543Smrg    }
1335706f2543Smrg#endif
1336706f2543Smrg
1337706f2543Smrg    params = (const GLdouble *) bswap_64_array( (uint64_t *) (pc + 8), __glTexGendv_size(pname) );
1338706f2543Smrg
1339706f2543Smrg    CALL_TexGendv( GET_DISPATCH(), (
1340706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1341706f2543Smrg        pname,
1342706f2543Smrg        params
1343706f2543Smrg    ) );
1344706f2543Smrg}
1345706f2543Smrg
1346706f2543Smrgvoid __glXDispSwap_TexGenf(GLbyte * pc)
1347706f2543Smrg{
1348706f2543Smrg    CALL_TexGenf( GET_DISPATCH(), (
1349706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1350706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
1351706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 )
1352706f2543Smrg    ) );
1353706f2543Smrg}
1354706f2543Smrg
1355706f2543Smrgvoid __glXDispSwap_TexGenfv(GLbyte * pc)
1356706f2543Smrg{
1357706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1358706f2543Smrg    const GLfloat * params;
1359706f2543Smrg
1360706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGenfv_size(pname) );
1361706f2543Smrg
1362706f2543Smrg    CALL_TexGenfv( GET_DISPATCH(), (
1363706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1364706f2543Smrg        pname,
1365706f2543Smrg        params
1366706f2543Smrg    ) );
1367706f2543Smrg}
1368706f2543Smrg
1369706f2543Smrgvoid __glXDispSwap_TexGeni(GLbyte * pc)
1370706f2543Smrg{
1371706f2543Smrg    CALL_TexGeni( GET_DISPATCH(), (
1372706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1373706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
1374706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 )
1375706f2543Smrg    ) );
1376706f2543Smrg}
1377706f2543Smrg
1378706f2543Smrgvoid __glXDispSwap_TexGeniv(GLbyte * pc)
1379706f2543Smrg{
1380706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
1381706f2543Smrg    const GLint * params;
1382706f2543Smrg
1383706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGeniv_size(pname) );
1384706f2543Smrg
1385706f2543Smrg    CALL_TexGeniv( GET_DISPATCH(), (
1386706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1387706f2543Smrg        pname,
1388706f2543Smrg        params
1389706f2543Smrg    ) );
1390706f2543Smrg}
1391706f2543Smrg
1392706f2543Smrgvoid __glXDispSwap_InitNames(GLbyte * pc)
1393706f2543Smrg{
1394706f2543Smrg    CALL_InitNames( GET_DISPATCH(), () );
1395706f2543Smrg}
1396706f2543Smrg
1397706f2543Smrgvoid __glXDispSwap_LoadName(GLbyte * pc)
1398706f2543Smrg{
1399706f2543Smrg    CALL_LoadName( GET_DISPATCH(), (
1400706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 )
1401706f2543Smrg    ) );
1402706f2543Smrg}
1403706f2543Smrg
1404706f2543Smrgvoid __glXDispSwap_PassThrough(GLbyte * pc)
1405706f2543Smrg{
1406706f2543Smrg    CALL_PassThrough( GET_DISPATCH(), (
1407706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 )
1408706f2543Smrg    ) );
1409706f2543Smrg}
1410706f2543Smrg
1411706f2543Smrgvoid __glXDispSwap_PopName(GLbyte * pc)
1412706f2543Smrg{
1413706f2543Smrg    CALL_PopName( GET_DISPATCH(), () );
1414706f2543Smrg}
1415706f2543Smrg
1416706f2543Smrgvoid __glXDispSwap_PushName(GLbyte * pc)
1417706f2543Smrg{
1418706f2543Smrg    CALL_PushName( GET_DISPATCH(), (
1419706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 )
1420706f2543Smrg    ) );
1421706f2543Smrg}
1422706f2543Smrg
1423706f2543Smrgvoid __glXDispSwap_DrawBuffer(GLbyte * pc)
1424706f2543Smrg{
1425706f2543Smrg    CALL_DrawBuffer( GET_DISPATCH(), (
1426706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
1427706f2543Smrg    ) );
1428706f2543Smrg}
1429706f2543Smrg
1430706f2543Smrgvoid __glXDispSwap_Clear(GLbyte * pc)
1431706f2543Smrg{
1432706f2543Smrg    CALL_Clear( GET_DISPATCH(), (
1433706f2543Smrg         (GLbitfield)bswap_CARD32 ( pc +  0 )
1434706f2543Smrg    ) );
1435706f2543Smrg}
1436706f2543Smrg
1437706f2543Smrgvoid __glXDispSwap_ClearAccum(GLbyte * pc)
1438706f2543Smrg{
1439706f2543Smrg    CALL_ClearAccum( GET_DISPATCH(), (
1440706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 ),
1441706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 ),
1442706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 ),
1443706f2543Smrg         (GLfloat )bswap_FLOAT32( pc + 12 )
1444706f2543Smrg    ) );
1445706f2543Smrg}
1446706f2543Smrg
1447706f2543Smrgvoid __glXDispSwap_ClearIndex(GLbyte * pc)
1448706f2543Smrg{
1449706f2543Smrg    CALL_ClearIndex( GET_DISPATCH(), (
1450706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 )
1451706f2543Smrg    ) );
1452706f2543Smrg}
1453706f2543Smrg
1454706f2543Smrgvoid __glXDispSwap_ClearColor(GLbyte * pc)
1455706f2543Smrg{
1456706f2543Smrg    CALL_ClearColor( GET_DISPATCH(), (
1457706f2543Smrg         (GLclampf)bswap_FLOAT32( pc +  0 ),
1458706f2543Smrg         (GLclampf)bswap_FLOAT32( pc +  4 ),
1459706f2543Smrg         (GLclampf)bswap_FLOAT32( pc +  8 ),
1460706f2543Smrg         (GLclampf)bswap_FLOAT32( pc + 12 )
1461706f2543Smrg    ) );
1462706f2543Smrg}
1463706f2543Smrg
1464706f2543Smrgvoid __glXDispSwap_ClearStencil(GLbyte * pc)
1465706f2543Smrg{
1466706f2543Smrg    CALL_ClearStencil( GET_DISPATCH(), (
1467706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  0 )
1468706f2543Smrg    ) );
1469706f2543Smrg}
1470706f2543Smrg
1471706f2543Smrgvoid __glXDispSwap_ClearDepth(GLbyte * pc)
1472706f2543Smrg{
1473706f2543Smrg#ifdef __GLX_ALIGN64
1474706f2543Smrg    if ((unsigned long)(pc) & 7) {
1475706f2543Smrg        (void) memmove(pc-4, pc, 8);
1476706f2543Smrg        pc -= 4;
1477706f2543Smrg    }
1478706f2543Smrg#endif
1479706f2543Smrg
1480706f2543Smrg    CALL_ClearDepth( GET_DISPATCH(), (
1481706f2543Smrg         (GLclampd)bswap_FLOAT64( pc +  0 )
1482706f2543Smrg    ) );
1483706f2543Smrg}
1484706f2543Smrg
1485706f2543Smrgvoid __glXDispSwap_StencilMask(GLbyte * pc)
1486706f2543Smrg{
1487706f2543Smrg    CALL_StencilMask( GET_DISPATCH(), (
1488706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 )
1489706f2543Smrg    ) );
1490706f2543Smrg}
1491706f2543Smrg
1492706f2543Smrgvoid __glXDispSwap_ColorMask(GLbyte * pc)
1493706f2543Smrg{
1494706f2543Smrg    CALL_ColorMask( GET_DISPATCH(), (
1495706f2543Smrg        *(GLboolean *)(pc +  0),
1496706f2543Smrg        *(GLboolean *)(pc +  1),
1497706f2543Smrg        *(GLboolean *)(pc +  2),
1498706f2543Smrg        *(GLboolean *)(pc +  3)
1499706f2543Smrg    ) );
1500706f2543Smrg}
1501706f2543Smrg
1502706f2543Smrgvoid __glXDispSwap_DepthMask(GLbyte * pc)
1503706f2543Smrg{
1504706f2543Smrg    CALL_DepthMask( GET_DISPATCH(), (
1505706f2543Smrg        *(GLboolean *)(pc +  0)
1506706f2543Smrg    ) );
1507706f2543Smrg}
1508706f2543Smrg
1509706f2543Smrgvoid __glXDispSwap_IndexMask(GLbyte * pc)
1510706f2543Smrg{
1511706f2543Smrg    CALL_IndexMask( GET_DISPATCH(), (
1512706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 )
1513706f2543Smrg    ) );
1514706f2543Smrg}
1515706f2543Smrg
1516706f2543Smrgvoid __glXDispSwap_Accum(GLbyte * pc)
1517706f2543Smrg{
1518706f2543Smrg    CALL_Accum( GET_DISPATCH(), (
1519706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1520706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 )
1521706f2543Smrg    ) );
1522706f2543Smrg}
1523706f2543Smrg
1524706f2543Smrgvoid __glXDispSwap_Disable(GLbyte * pc)
1525706f2543Smrg{
1526706f2543Smrg    CALL_Disable( GET_DISPATCH(), (
1527706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
1528706f2543Smrg    ) );
1529706f2543Smrg}
1530706f2543Smrg
1531706f2543Smrgvoid __glXDispSwap_Enable(GLbyte * pc)
1532706f2543Smrg{
1533706f2543Smrg    CALL_Enable( GET_DISPATCH(), (
1534706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
1535706f2543Smrg    ) );
1536706f2543Smrg}
1537706f2543Smrg
1538706f2543Smrgvoid __glXDispSwap_PopAttrib(GLbyte * pc)
1539706f2543Smrg{
1540706f2543Smrg    CALL_PopAttrib( GET_DISPATCH(), () );
1541706f2543Smrg}
1542706f2543Smrg
1543706f2543Smrgvoid __glXDispSwap_PushAttrib(GLbyte * pc)
1544706f2543Smrg{
1545706f2543Smrg    CALL_PushAttrib( GET_DISPATCH(), (
1546706f2543Smrg         (GLbitfield)bswap_CARD32 ( pc +  0 )
1547706f2543Smrg    ) );
1548706f2543Smrg}
1549706f2543Smrg
1550706f2543Smrgvoid __glXDispSwap_MapGrid1d(GLbyte * pc)
1551706f2543Smrg{
1552706f2543Smrg#ifdef __GLX_ALIGN64
1553706f2543Smrg    if ((unsigned long)(pc) & 7) {
1554706f2543Smrg        (void) memmove(pc-4, pc, 20);
1555706f2543Smrg        pc -= 4;
1556706f2543Smrg    }
1557706f2543Smrg#endif
1558706f2543Smrg
1559706f2543Smrg    CALL_MapGrid1d( GET_DISPATCH(), (
1560706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 ),
1561706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  0 ),
1562706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  8 )
1563706f2543Smrg    ) );
1564706f2543Smrg}
1565706f2543Smrg
1566706f2543Smrgvoid __glXDispSwap_MapGrid1f(GLbyte * pc)
1567706f2543Smrg{
1568706f2543Smrg    CALL_MapGrid1f( GET_DISPATCH(), (
1569706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  0 ),
1570706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 ),
1571706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 )
1572706f2543Smrg    ) );
1573706f2543Smrg}
1574706f2543Smrg
1575706f2543Smrgvoid __glXDispSwap_MapGrid2d(GLbyte * pc)
1576706f2543Smrg{
1577706f2543Smrg#ifdef __GLX_ALIGN64
1578706f2543Smrg    if ((unsigned long)(pc) & 7) {
1579706f2543Smrg        (void) memmove(pc-4, pc, 40);
1580706f2543Smrg        pc -= 4;
1581706f2543Smrg    }
1582706f2543Smrg#endif
1583706f2543Smrg
1584706f2543Smrg    CALL_MapGrid2d( GET_DISPATCH(), (
1585706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 32 ),
1586706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  0 ),
1587706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  8 ),
1588706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 36 ),
1589706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 16 ),
1590706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 24 )
1591706f2543Smrg    ) );
1592706f2543Smrg}
1593706f2543Smrg
1594706f2543Smrgvoid __glXDispSwap_MapGrid2f(GLbyte * pc)
1595706f2543Smrg{
1596706f2543Smrg    CALL_MapGrid2f( GET_DISPATCH(), (
1597706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  0 ),
1598706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 ),
1599706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 ),
1600706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
1601706f2543Smrg         (GLfloat )bswap_FLOAT32( pc + 16 ),
1602706f2543Smrg         (GLfloat )bswap_FLOAT32( pc + 20 )
1603706f2543Smrg    ) );
1604706f2543Smrg}
1605706f2543Smrg
1606706f2543Smrgvoid __glXDispSwap_EvalCoord1dv(GLbyte * pc)
1607706f2543Smrg{
1608706f2543Smrg#ifdef __GLX_ALIGN64
1609706f2543Smrg    if ((unsigned long)(pc) & 7) {
1610706f2543Smrg        (void) memmove(pc-4, pc, 8);
1611706f2543Smrg        pc -= 4;
1612706f2543Smrg    }
1613706f2543Smrg#endif
1614706f2543Smrg
1615706f2543Smrg    CALL_EvalCoord1dv( GET_DISPATCH(), (
1616706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
1617706f2543Smrg    ) );
1618706f2543Smrg}
1619706f2543Smrg
1620706f2543Smrgvoid __glXDispSwap_EvalCoord1fv(GLbyte * pc)
1621706f2543Smrg{
1622706f2543Smrg    CALL_EvalCoord1fv( GET_DISPATCH(), (
1623706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
1624706f2543Smrg    ) );
1625706f2543Smrg}
1626706f2543Smrg
1627706f2543Smrgvoid __glXDispSwap_EvalCoord2dv(GLbyte * pc)
1628706f2543Smrg{
1629706f2543Smrg#ifdef __GLX_ALIGN64
1630706f2543Smrg    if ((unsigned long)(pc) & 7) {
1631706f2543Smrg        (void) memmove(pc-4, pc, 16);
1632706f2543Smrg        pc -= 4;
1633706f2543Smrg    }
1634706f2543Smrg#endif
1635706f2543Smrg
1636706f2543Smrg    CALL_EvalCoord2dv( GET_DISPATCH(), (
1637706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
1638706f2543Smrg    ) );
1639706f2543Smrg}
1640706f2543Smrg
1641706f2543Smrgvoid __glXDispSwap_EvalCoord2fv(GLbyte * pc)
1642706f2543Smrg{
1643706f2543Smrg    CALL_EvalCoord2fv( GET_DISPATCH(), (
1644706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
1645706f2543Smrg    ) );
1646706f2543Smrg}
1647706f2543Smrg
1648706f2543Smrgvoid __glXDispSwap_EvalMesh1(GLbyte * pc)
1649706f2543Smrg{
1650706f2543Smrg    CALL_EvalMesh1( GET_DISPATCH(), (
1651706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1652706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
1653706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 )
1654706f2543Smrg    ) );
1655706f2543Smrg}
1656706f2543Smrg
1657706f2543Smrgvoid __glXDispSwap_EvalPoint1(GLbyte * pc)
1658706f2543Smrg{
1659706f2543Smrg    CALL_EvalPoint1( GET_DISPATCH(), (
1660706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  0 )
1661706f2543Smrg    ) );
1662706f2543Smrg}
1663706f2543Smrg
1664706f2543Smrgvoid __glXDispSwap_EvalMesh2(GLbyte * pc)
1665706f2543Smrg{
1666706f2543Smrg    CALL_EvalMesh2( GET_DISPATCH(), (
1667706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1668706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
1669706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
1670706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
1671706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 )
1672706f2543Smrg    ) );
1673706f2543Smrg}
1674706f2543Smrg
1675706f2543Smrgvoid __glXDispSwap_EvalPoint2(GLbyte * pc)
1676706f2543Smrg{
1677706f2543Smrg    CALL_EvalPoint2( GET_DISPATCH(), (
1678706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  0 ),
1679706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 )
1680706f2543Smrg    ) );
1681706f2543Smrg}
1682706f2543Smrg
1683706f2543Smrgvoid __glXDispSwap_AlphaFunc(GLbyte * pc)
1684706f2543Smrg{
1685706f2543Smrg    CALL_AlphaFunc( GET_DISPATCH(), (
1686706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1687706f2543Smrg         (GLclampf)bswap_FLOAT32( pc +  4 )
1688706f2543Smrg    ) );
1689706f2543Smrg}
1690706f2543Smrg
1691706f2543Smrgvoid __glXDispSwap_BlendFunc(GLbyte * pc)
1692706f2543Smrg{
1693706f2543Smrg    CALL_BlendFunc( GET_DISPATCH(), (
1694706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1695706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 )
1696706f2543Smrg    ) );
1697706f2543Smrg}
1698706f2543Smrg
1699706f2543Smrgvoid __glXDispSwap_LogicOp(GLbyte * pc)
1700706f2543Smrg{
1701706f2543Smrg    CALL_LogicOp( GET_DISPATCH(), (
1702706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
1703706f2543Smrg    ) );
1704706f2543Smrg}
1705706f2543Smrg
1706706f2543Smrgvoid __glXDispSwap_StencilFunc(GLbyte * pc)
1707706f2543Smrg{
1708706f2543Smrg    CALL_StencilFunc( GET_DISPATCH(), (
1709706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1710706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
1711706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  8 )
1712706f2543Smrg    ) );
1713706f2543Smrg}
1714706f2543Smrg
1715706f2543Smrgvoid __glXDispSwap_StencilOp(GLbyte * pc)
1716706f2543Smrg{
1717706f2543Smrg    CALL_StencilOp( GET_DISPATCH(), (
1718706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1719706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
1720706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 )
1721706f2543Smrg    ) );
1722706f2543Smrg}
1723706f2543Smrg
1724706f2543Smrgvoid __glXDispSwap_DepthFunc(GLbyte * pc)
1725706f2543Smrg{
1726706f2543Smrg    CALL_DepthFunc( GET_DISPATCH(), (
1727706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
1728706f2543Smrg    ) );
1729706f2543Smrg}
1730706f2543Smrg
1731706f2543Smrgvoid __glXDispSwap_PixelZoom(GLbyte * pc)
1732706f2543Smrg{
1733706f2543Smrg    CALL_PixelZoom( GET_DISPATCH(), (
1734706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 ),
1735706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 )
1736706f2543Smrg    ) );
1737706f2543Smrg}
1738706f2543Smrg
1739706f2543Smrgvoid __glXDispSwap_PixelTransferf(GLbyte * pc)
1740706f2543Smrg{
1741706f2543Smrg    CALL_PixelTransferf( GET_DISPATCH(), (
1742706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1743706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 )
1744706f2543Smrg    ) );
1745706f2543Smrg}
1746706f2543Smrg
1747706f2543Smrgvoid __glXDispSwap_PixelTransferi(GLbyte * pc)
1748706f2543Smrg{
1749706f2543Smrg    CALL_PixelTransferi( GET_DISPATCH(), (
1750706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1751706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 )
1752706f2543Smrg    ) );
1753706f2543Smrg}
1754706f2543Smrg
1755706f2543Smrgint __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc)
1756706f2543Smrg{
1757706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1758706f2543Smrg    int error;
1759706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
1760706f2543Smrg
1761706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
1762706f2543Smrg    if ( cx != NULL ) {
1763706f2543Smrg        CALL_PixelStoref( GET_DISPATCH(), (
1764706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
1765706f2543Smrg             (GLfloat )bswap_FLOAT32( pc +  4 )
1766706f2543Smrg        ) );
1767706f2543Smrg        error = Success;
1768706f2543Smrg    }
1769706f2543Smrg
1770706f2543Smrg    return error;
1771706f2543Smrg}
1772706f2543Smrg
1773706f2543Smrgint __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc)
1774706f2543Smrg{
1775706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1776706f2543Smrg    int error;
1777706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
1778706f2543Smrg
1779706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
1780706f2543Smrg    if ( cx != NULL ) {
1781706f2543Smrg        CALL_PixelStorei( GET_DISPATCH(), (
1782706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
1783706f2543Smrg             (GLint   )bswap_CARD32 ( pc +  4 )
1784706f2543Smrg        ) );
1785706f2543Smrg        error = Success;
1786706f2543Smrg    }
1787706f2543Smrg
1788706f2543Smrg    return error;
1789706f2543Smrg}
1790706f2543Smrg
1791706f2543Smrgvoid __glXDispSwap_PixelMapfv(GLbyte * pc)
1792706f2543Smrg{
1793706f2543Smrg    const GLsizei mapsize =  (GLsizei )bswap_CARD32 ( pc +  4 );
1794706f2543Smrg
1795706f2543Smrg    CALL_PixelMapfv( GET_DISPATCH(), (
1796706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1797706f2543Smrg        mapsize,
1798706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
1799706f2543Smrg    ) );
1800706f2543Smrg}
1801706f2543Smrg
1802706f2543Smrgvoid __glXDispSwap_PixelMapuiv(GLbyte * pc)
1803706f2543Smrg{
1804706f2543Smrg    const GLsizei mapsize =  (GLsizei )bswap_CARD32 ( pc +  4 );
1805706f2543Smrg
1806706f2543Smrg    CALL_PixelMapuiv( GET_DISPATCH(), (
1807706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1808706f2543Smrg        mapsize,
1809706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
1810706f2543Smrg    ) );
1811706f2543Smrg}
1812706f2543Smrg
1813706f2543Smrgvoid __glXDispSwap_PixelMapusv(GLbyte * pc)
1814706f2543Smrg{
1815706f2543Smrg    const GLsizei mapsize =  (GLsizei )bswap_CARD32 ( pc +  4 );
1816706f2543Smrg
1817706f2543Smrg    CALL_PixelMapusv( GET_DISPATCH(), (
1818706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
1819706f2543Smrg        mapsize,
1820706f2543Smrg         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
1821706f2543Smrg    ) );
1822706f2543Smrg}
1823706f2543Smrg
1824706f2543Smrgvoid __glXDispSwap_ReadBuffer(GLbyte * pc)
1825706f2543Smrg{
1826706f2543Smrg    CALL_ReadBuffer( GET_DISPATCH(), (
1827706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
1828706f2543Smrg    ) );
1829706f2543Smrg}
1830706f2543Smrg
1831706f2543Smrgvoid __glXDispSwap_CopyPixels(GLbyte * pc)
1832706f2543Smrg{
1833706f2543Smrg    CALL_CopyPixels( GET_DISPATCH(), (
1834706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  0 ),
1835706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
1836706f2543Smrg         (GLsizei )bswap_CARD32 ( pc +  8 ),
1837706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 12 ),
1838706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 16 )
1839706f2543Smrg    ) );
1840706f2543Smrg}
1841706f2543Smrg
1842706f2543Smrgvoid __glXDispSwap_DrawPixels(GLbyte * pc)
1843706f2543Smrg{
1844706f2543Smrg    const GLvoid * const pixels = (const GLvoid *) (pc + 36);
1845706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
1846706f2543Smrg
1847706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
1848706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
1849706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
1850706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
1851706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
1852706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
1853706f2543Smrg
1854706f2543Smrg    CALL_DrawPixels( GET_DISPATCH(), (
1855706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 20 ),
1856706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 24 ),
1857706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 28 ),
1858706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 32 ),
1859706f2543Smrg        pixels
1860706f2543Smrg    ) );
1861706f2543Smrg}
1862706f2543Smrg
1863706f2543Smrgint __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc)
1864706f2543Smrg{
1865706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1866706f2543Smrg    int error;
1867706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
1868706f2543Smrg
1869706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
1870706f2543Smrg    if ( cx != NULL ) {
1871706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
1872706f2543Smrg
1873706f2543Smrg        const GLuint compsize = __glGetBooleanv_size(pname);
1874706f2543Smrg        GLboolean answerBuffer[200];
1875706f2543Smrg        GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1);
1876706f2543Smrg
1877706f2543Smrg        if (params == NULL) return BadAlloc;
1878706f2543Smrg        __glXClearErrorOccured();
1879706f2543Smrg
1880706f2543Smrg        CALL_GetBooleanv( GET_DISPATCH(), (
1881706f2543Smrg            pname,
1882706f2543Smrg            params
1883706f2543Smrg        ) );
1884706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0);
1885706f2543Smrg        error = Success;
1886706f2543Smrg    }
1887706f2543Smrg
1888706f2543Smrg    return error;
1889706f2543Smrg}
1890706f2543Smrg
1891706f2543Smrgint __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
1892706f2543Smrg{
1893706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1894706f2543Smrg    int error;
1895706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
1896706f2543Smrg
1897706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
1898706f2543Smrg    if ( cx != NULL ) {
1899706f2543Smrg        GLdouble equation[4];
1900706f2543Smrg        CALL_GetClipPlane( GET_DISPATCH(), (
1901706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
1902706f2543Smrg            equation
1903706f2543Smrg        ) );
1904706f2543Smrg        (void) bswap_64_array( (uint64_t *) equation, 4 );
1905706f2543Smrg        __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0);
1906706f2543Smrg        error = Success;
1907706f2543Smrg    }
1908706f2543Smrg
1909706f2543Smrg    return error;
1910706f2543Smrg}
1911706f2543Smrg
1912706f2543Smrgint __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc)
1913706f2543Smrg{
1914706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1915706f2543Smrg    int error;
1916706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
1917706f2543Smrg
1918706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
1919706f2543Smrg    if ( cx != NULL ) {
1920706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
1921706f2543Smrg
1922706f2543Smrg        const GLuint compsize = __glGetDoublev_size(pname);
1923706f2543Smrg        GLdouble answerBuffer[200];
1924706f2543Smrg        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
1925706f2543Smrg
1926706f2543Smrg        if (params == NULL) return BadAlloc;
1927706f2543Smrg        __glXClearErrorOccured();
1928706f2543Smrg
1929706f2543Smrg        CALL_GetDoublev( GET_DISPATCH(), (
1930706f2543Smrg            pname,
1931706f2543Smrg            params
1932706f2543Smrg        ) );
1933706f2543Smrg        (void) bswap_64_array( (uint64_t *) params, compsize );
1934706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
1935706f2543Smrg        error = Success;
1936706f2543Smrg    }
1937706f2543Smrg
1938706f2543Smrg    return error;
1939706f2543Smrg}
1940706f2543Smrg
1941706f2543Smrgint __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc)
1942706f2543Smrg{
1943706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1944706f2543Smrg    int error;
1945706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
1946706f2543Smrg
1947706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
1948706f2543Smrg    if ( cx != NULL ) {
1949706f2543Smrg        GLenum retval;
1950706f2543Smrg        retval = CALL_GetError( GET_DISPATCH(), () );
1951706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
1952706f2543Smrg        error = Success;
1953706f2543Smrg    }
1954706f2543Smrg
1955706f2543Smrg    return error;
1956706f2543Smrg}
1957706f2543Smrg
1958706f2543Smrgint __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc)
1959706f2543Smrg{
1960706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1961706f2543Smrg    int error;
1962706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
1963706f2543Smrg
1964706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
1965706f2543Smrg    if ( cx != NULL ) {
1966706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
1967706f2543Smrg
1968706f2543Smrg        const GLuint compsize = __glGetFloatv_size(pname);
1969706f2543Smrg        GLfloat answerBuffer[200];
1970706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
1971706f2543Smrg
1972706f2543Smrg        if (params == NULL) return BadAlloc;
1973706f2543Smrg        __glXClearErrorOccured();
1974706f2543Smrg
1975706f2543Smrg        CALL_GetFloatv( GET_DISPATCH(), (
1976706f2543Smrg            pname,
1977706f2543Smrg            params
1978706f2543Smrg        ) );
1979706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
1980706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
1981706f2543Smrg        error = Success;
1982706f2543Smrg    }
1983706f2543Smrg
1984706f2543Smrg    return error;
1985706f2543Smrg}
1986706f2543Smrg
1987706f2543Smrgint __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc)
1988706f2543Smrg{
1989706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
1990706f2543Smrg    int error;
1991706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
1992706f2543Smrg
1993706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
1994706f2543Smrg    if ( cx != NULL ) {
1995706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
1996706f2543Smrg
1997706f2543Smrg        const GLuint compsize = __glGetIntegerv_size(pname);
1998706f2543Smrg        GLint answerBuffer[200];
1999706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2000706f2543Smrg
2001706f2543Smrg        if (params == NULL) return BadAlloc;
2002706f2543Smrg        __glXClearErrorOccured();
2003706f2543Smrg
2004706f2543Smrg        CALL_GetIntegerv( GET_DISPATCH(), (
2005706f2543Smrg            pname,
2006706f2543Smrg            params
2007706f2543Smrg        ) );
2008706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2009706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2010706f2543Smrg        error = Success;
2011706f2543Smrg    }
2012706f2543Smrg
2013706f2543Smrg    return error;
2014706f2543Smrg}
2015706f2543Smrg
2016706f2543Smrgint __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc)
2017706f2543Smrg{
2018706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2019706f2543Smrg    int error;
2020706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2021706f2543Smrg
2022706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2023706f2543Smrg    if ( cx != NULL ) {
2024706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2025706f2543Smrg
2026706f2543Smrg        const GLuint compsize = __glGetLightfv_size(pname);
2027706f2543Smrg        GLfloat answerBuffer[200];
2028706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2029706f2543Smrg
2030706f2543Smrg        if (params == NULL) return BadAlloc;
2031706f2543Smrg        __glXClearErrorOccured();
2032706f2543Smrg
2033706f2543Smrg        CALL_GetLightfv( GET_DISPATCH(), (
2034706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2035706f2543Smrg            pname,
2036706f2543Smrg            params
2037706f2543Smrg        ) );
2038706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2039706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2040706f2543Smrg        error = Success;
2041706f2543Smrg    }
2042706f2543Smrg
2043706f2543Smrg    return error;
2044706f2543Smrg}
2045706f2543Smrg
2046706f2543Smrgint __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc)
2047706f2543Smrg{
2048706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2049706f2543Smrg    int error;
2050706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2051706f2543Smrg
2052706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2053706f2543Smrg    if ( cx != NULL ) {
2054706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2055706f2543Smrg
2056706f2543Smrg        const GLuint compsize = __glGetLightiv_size(pname);
2057706f2543Smrg        GLint answerBuffer[200];
2058706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2059706f2543Smrg
2060706f2543Smrg        if (params == NULL) return BadAlloc;
2061706f2543Smrg        __glXClearErrorOccured();
2062706f2543Smrg
2063706f2543Smrg        CALL_GetLightiv( GET_DISPATCH(), (
2064706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2065706f2543Smrg            pname,
2066706f2543Smrg            params
2067706f2543Smrg        ) );
2068706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2069706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2070706f2543Smrg        error = Success;
2071706f2543Smrg    }
2072706f2543Smrg
2073706f2543Smrg    return error;
2074706f2543Smrg}
2075706f2543Smrg
2076706f2543Smrgint __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc)
2077706f2543Smrg{
2078706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2079706f2543Smrg    int error;
2080706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2081706f2543Smrg
2082706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2083706f2543Smrg    if ( cx != NULL ) {
2084706f2543Smrg        const GLenum target =  (GLenum  )bswap_ENUM   ( pc +  0 );
2085706f2543Smrg        const GLenum query =  (GLenum  )bswap_ENUM   ( pc +  4 );
2086706f2543Smrg
2087706f2543Smrg        const GLuint compsize = __glGetMapdv_size(target,query);
2088706f2543Smrg        GLdouble answerBuffer[200];
2089706f2543Smrg        GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
2090706f2543Smrg
2091706f2543Smrg        if (v == NULL) return BadAlloc;
2092706f2543Smrg        __glXClearErrorOccured();
2093706f2543Smrg
2094706f2543Smrg        CALL_GetMapdv( GET_DISPATCH(), (
2095706f2543Smrg            target,
2096706f2543Smrg            query,
2097706f2543Smrg            v
2098706f2543Smrg        ) );
2099706f2543Smrg        (void) bswap_64_array( (uint64_t *) v, compsize );
2100706f2543Smrg        __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0);
2101706f2543Smrg        error = Success;
2102706f2543Smrg    }
2103706f2543Smrg
2104706f2543Smrg    return error;
2105706f2543Smrg}
2106706f2543Smrg
2107706f2543Smrgint __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc)
2108706f2543Smrg{
2109706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2110706f2543Smrg    int error;
2111706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2112706f2543Smrg
2113706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2114706f2543Smrg    if ( cx != NULL ) {
2115706f2543Smrg        const GLenum target =  (GLenum  )bswap_ENUM   ( pc +  0 );
2116706f2543Smrg        const GLenum query =  (GLenum  )bswap_ENUM   ( pc +  4 );
2117706f2543Smrg
2118706f2543Smrg        const GLuint compsize = __glGetMapfv_size(target,query);
2119706f2543Smrg        GLfloat answerBuffer[200];
2120706f2543Smrg        GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2121706f2543Smrg
2122706f2543Smrg        if (v == NULL) return BadAlloc;
2123706f2543Smrg        __glXClearErrorOccured();
2124706f2543Smrg
2125706f2543Smrg        CALL_GetMapfv( GET_DISPATCH(), (
2126706f2543Smrg            target,
2127706f2543Smrg            query,
2128706f2543Smrg            v
2129706f2543Smrg        ) );
2130706f2543Smrg        (void) bswap_32_array( (uint32_t *) v, compsize );
2131706f2543Smrg        __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
2132706f2543Smrg        error = Success;
2133706f2543Smrg    }
2134706f2543Smrg
2135706f2543Smrg    return error;
2136706f2543Smrg}
2137706f2543Smrg
2138706f2543Smrgint __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc)
2139706f2543Smrg{
2140706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2141706f2543Smrg    int error;
2142706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2143706f2543Smrg
2144706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2145706f2543Smrg    if ( cx != NULL ) {
2146706f2543Smrg        const GLenum target =  (GLenum  )bswap_ENUM   ( pc +  0 );
2147706f2543Smrg        const GLenum query =  (GLenum  )bswap_ENUM   ( pc +  4 );
2148706f2543Smrg
2149706f2543Smrg        const GLuint compsize = __glGetMapiv_size(target,query);
2150706f2543Smrg        GLint answerBuffer[200];
2151706f2543Smrg        GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2152706f2543Smrg
2153706f2543Smrg        if (v == NULL) return BadAlloc;
2154706f2543Smrg        __glXClearErrorOccured();
2155706f2543Smrg
2156706f2543Smrg        CALL_GetMapiv( GET_DISPATCH(), (
2157706f2543Smrg            target,
2158706f2543Smrg            query,
2159706f2543Smrg            v
2160706f2543Smrg        ) );
2161706f2543Smrg        (void) bswap_32_array( (uint32_t *) v, compsize );
2162706f2543Smrg        __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
2163706f2543Smrg        error = Success;
2164706f2543Smrg    }
2165706f2543Smrg
2166706f2543Smrg    return error;
2167706f2543Smrg}
2168706f2543Smrg
2169706f2543Smrgint __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc)
2170706f2543Smrg{
2171706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2172706f2543Smrg    int error;
2173706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2174706f2543Smrg
2175706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2176706f2543Smrg    if ( cx != NULL ) {
2177706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2178706f2543Smrg
2179706f2543Smrg        const GLuint compsize = __glGetMaterialfv_size(pname);
2180706f2543Smrg        GLfloat answerBuffer[200];
2181706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2182706f2543Smrg
2183706f2543Smrg        if (params == NULL) return BadAlloc;
2184706f2543Smrg        __glXClearErrorOccured();
2185706f2543Smrg
2186706f2543Smrg        CALL_GetMaterialfv( GET_DISPATCH(), (
2187706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2188706f2543Smrg            pname,
2189706f2543Smrg            params
2190706f2543Smrg        ) );
2191706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2192706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2193706f2543Smrg        error = Success;
2194706f2543Smrg    }
2195706f2543Smrg
2196706f2543Smrg    return error;
2197706f2543Smrg}
2198706f2543Smrg
2199706f2543Smrgint __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc)
2200706f2543Smrg{
2201706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2202706f2543Smrg    int error;
2203706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2204706f2543Smrg
2205706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2206706f2543Smrg    if ( cx != NULL ) {
2207706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2208706f2543Smrg
2209706f2543Smrg        const GLuint compsize = __glGetMaterialiv_size(pname);
2210706f2543Smrg        GLint answerBuffer[200];
2211706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2212706f2543Smrg
2213706f2543Smrg        if (params == NULL) return BadAlloc;
2214706f2543Smrg        __glXClearErrorOccured();
2215706f2543Smrg
2216706f2543Smrg        CALL_GetMaterialiv( GET_DISPATCH(), (
2217706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2218706f2543Smrg            pname,
2219706f2543Smrg            params
2220706f2543Smrg        ) );
2221706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2222706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2223706f2543Smrg        error = Success;
2224706f2543Smrg    }
2225706f2543Smrg
2226706f2543Smrg    return error;
2227706f2543Smrg}
2228706f2543Smrg
2229706f2543Smrgint __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc)
2230706f2543Smrg{
2231706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2232706f2543Smrg    int error;
2233706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2234706f2543Smrg
2235706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2236706f2543Smrg    if ( cx != NULL ) {
2237706f2543Smrg        const GLenum map =  (GLenum  )bswap_ENUM   ( pc +  0 );
2238706f2543Smrg
2239706f2543Smrg        const GLuint compsize = __glGetPixelMapfv_size(map);
2240706f2543Smrg        GLfloat answerBuffer[200];
2241706f2543Smrg        GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2242706f2543Smrg
2243706f2543Smrg        if (values == NULL) return BadAlloc;
2244706f2543Smrg        __glXClearErrorOccured();
2245706f2543Smrg
2246706f2543Smrg        CALL_GetPixelMapfv( GET_DISPATCH(), (
2247706f2543Smrg            map,
2248706f2543Smrg            values
2249706f2543Smrg        ) );
2250706f2543Smrg        (void) bswap_32_array( (uint32_t *) values, compsize );
2251706f2543Smrg        __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
2252706f2543Smrg        error = Success;
2253706f2543Smrg    }
2254706f2543Smrg
2255706f2543Smrg    return error;
2256706f2543Smrg}
2257706f2543Smrg
2258706f2543Smrgint __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc)
2259706f2543Smrg{
2260706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2261706f2543Smrg    int error;
2262706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2263706f2543Smrg
2264706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2265706f2543Smrg    if ( cx != NULL ) {
2266706f2543Smrg        const GLenum map =  (GLenum  )bswap_ENUM   ( pc +  0 );
2267706f2543Smrg
2268706f2543Smrg        const GLuint compsize = __glGetPixelMapuiv_size(map);
2269706f2543Smrg        GLuint answerBuffer[200];
2270706f2543Smrg        GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2271706f2543Smrg
2272706f2543Smrg        if (values == NULL) return BadAlloc;
2273706f2543Smrg        __glXClearErrorOccured();
2274706f2543Smrg
2275706f2543Smrg        CALL_GetPixelMapuiv( GET_DISPATCH(), (
2276706f2543Smrg            map,
2277706f2543Smrg            values
2278706f2543Smrg        ) );
2279706f2543Smrg        (void) bswap_32_array( (uint32_t *) values, compsize );
2280706f2543Smrg        __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
2281706f2543Smrg        error = Success;
2282706f2543Smrg    }
2283706f2543Smrg
2284706f2543Smrg    return error;
2285706f2543Smrg}
2286706f2543Smrg
2287706f2543Smrgint __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc)
2288706f2543Smrg{
2289706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2290706f2543Smrg    int error;
2291706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2292706f2543Smrg
2293706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2294706f2543Smrg    if ( cx != NULL ) {
2295706f2543Smrg        const GLenum map =  (GLenum  )bswap_ENUM   ( pc +  0 );
2296706f2543Smrg
2297706f2543Smrg        const GLuint compsize = __glGetPixelMapusv_size(map);
2298706f2543Smrg        GLushort answerBuffer[200];
2299706f2543Smrg        GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2);
2300706f2543Smrg
2301706f2543Smrg        if (values == NULL) return BadAlloc;
2302706f2543Smrg        __glXClearErrorOccured();
2303706f2543Smrg
2304706f2543Smrg        CALL_GetPixelMapusv( GET_DISPATCH(), (
2305706f2543Smrg            map,
2306706f2543Smrg            values
2307706f2543Smrg        ) );
2308706f2543Smrg        (void) bswap_16_array( (uint16_t *) values, compsize );
2309706f2543Smrg        __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0);
2310706f2543Smrg        error = Success;
2311706f2543Smrg    }
2312706f2543Smrg
2313706f2543Smrg    return error;
2314706f2543Smrg}
2315706f2543Smrg
2316706f2543Smrgint __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc)
2317706f2543Smrg{
2318706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2319706f2543Smrg    int error;
2320706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2321706f2543Smrg
2322706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2323706f2543Smrg    if ( cx != NULL ) {
2324706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2325706f2543Smrg
2326706f2543Smrg        const GLuint compsize = __glGetTexEnvfv_size(pname);
2327706f2543Smrg        GLfloat answerBuffer[200];
2328706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2329706f2543Smrg
2330706f2543Smrg        if (params == NULL) return BadAlloc;
2331706f2543Smrg        __glXClearErrorOccured();
2332706f2543Smrg
2333706f2543Smrg        CALL_GetTexEnvfv( GET_DISPATCH(), (
2334706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2335706f2543Smrg            pname,
2336706f2543Smrg            params
2337706f2543Smrg        ) );
2338706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2339706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2340706f2543Smrg        error = Success;
2341706f2543Smrg    }
2342706f2543Smrg
2343706f2543Smrg    return error;
2344706f2543Smrg}
2345706f2543Smrg
2346706f2543Smrgint __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc)
2347706f2543Smrg{
2348706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2349706f2543Smrg    int error;
2350706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2351706f2543Smrg
2352706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2353706f2543Smrg    if ( cx != NULL ) {
2354706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2355706f2543Smrg
2356706f2543Smrg        const GLuint compsize = __glGetTexEnviv_size(pname);
2357706f2543Smrg        GLint answerBuffer[200];
2358706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2359706f2543Smrg
2360706f2543Smrg        if (params == NULL) return BadAlloc;
2361706f2543Smrg        __glXClearErrorOccured();
2362706f2543Smrg
2363706f2543Smrg        CALL_GetTexEnviv( GET_DISPATCH(), (
2364706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2365706f2543Smrg            pname,
2366706f2543Smrg            params
2367706f2543Smrg        ) );
2368706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2369706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2370706f2543Smrg        error = Success;
2371706f2543Smrg    }
2372706f2543Smrg
2373706f2543Smrg    return error;
2374706f2543Smrg}
2375706f2543Smrg
2376706f2543Smrgint __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc)
2377706f2543Smrg{
2378706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2379706f2543Smrg    int error;
2380706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2381706f2543Smrg
2382706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2383706f2543Smrg    if ( cx != NULL ) {
2384706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2385706f2543Smrg
2386706f2543Smrg        const GLuint compsize = __glGetTexGendv_size(pname);
2387706f2543Smrg        GLdouble answerBuffer[200];
2388706f2543Smrg        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
2389706f2543Smrg
2390706f2543Smrg        if (params == NULL) return BadAlloc;
2391706f2543Smrg        __glXClearErrorOccured();
2392706f2543Smrg
2393706f2543Smrg        CALL_GetTexGendv( GET_DISPATCH(), (
2394706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2395706f2543Smrg            pname,
2396706f2543Smrg            params
2397706f2543Smrg        ) );
2398706f2543Smrg        (void) bswap_64_array( (uint64_t *) params, compsize );
2399706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
2400706f2543Smrg        error = Success;
2401706f2543Smrg    }
2402706f2543Smrg
2403706f2543Smrg    return error;
2404706f2543Smrg}
2405706f2543Smrg
2406706f2543Smrgint __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc)
2407706f2543Smrg{
2408706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2409706f2543Smrg    int error;
2410706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2411706f2543Smrg
2412706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2413706f2543Smrg    if ( cx != NULL ) {
2414706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2415706f2543Smrg
2416706f2543Smrg        const GLuint compsize = __glGetTexGenfv_size(pname);
2417706f2543Smrg        GLfloat answerBuffer[200];
2418706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2419706f2543Smrg
2420706f2543Smrg        if (params == NULL) return BadAlloc;
2421706f2543Smrg        __glXClearErrorOccured();
2422706f2543Smrg
2423706f2543Smrg        CALL_GetTexGenfv( GET_DISPATCH(), (
2424706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2425706f2543Smrg            pname,
2426706f2543Smrg            params
2427706f2543Smrg        ) );
2428706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2429706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2430706f2543Smrg        error = Success;
2431706f2543Smrg    }
2432706f2543Smrg
2433706f2543Smrg    return error;
2434706f2543Smrg}
2435706f2543Smrg
2436706f2543Smrgint __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc)
2437706f2543Smrg{
2438706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2439706f2543Smrg    int error;
2440706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2441706f2543Smrg
2442706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2443706f2543Smrg    if ( cx != NULL ) {
2444706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2445706f2543Smrg
2446706f2543Smrg        const GLuint compsize = __glGetTexGeniv_size(pname);
2447706f2543Smrg        GLint answerBuffer[200];
2448706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2449706f2543Smrg
2450706f2543Smrg        if (params == NULL) return BadAlloc;
2451706f2543Smrg        __glXClearErrorOccured();
2452706f2543Smrg
2453706f2543Smrg        CALL_GetTexGeniv( GET_DISPATCH(), (
2454706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2455706f2543Smrg            pname,
2456706f2543Smrg            params
2457706f2543Smrg        ) );
2458706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2459706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2460706f2543Smrg        error = Success;
2461706f2543Smrg    }
2462706f2543Smrg
2463706f2543Smrg    return error;
2464706f2543Smrg}
2465706f2543Smrg
2466706f2543Smrgint __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc)
2467706f2543Smrg{
2468706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2469706f2543Smrg    int error;
2470706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2471706f2543Smrg
2472706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2473706f2543Smrg    if ( cx != NULL ) {
2474706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2475706f2543Smrg
2476706f2543Smrg        const GLuint compsize = __glGetTexParameterfv_size(pname);
2477706f2543Smrg        GLfloat answerBuffer[200];
2478706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2479706f2543Smrg
2480706f2543Smrg        if (params == NULL) return BadAlloc;
2481706f2543Smrg        __glXClearErrorOccured();
2482706f2543Smrg
2483706f2543Smrg        CALL_GetTexParameterfv( GET_DISPATCH(), (
2484706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2485706f2543Smrg            pname,
2486706f2543Smrg            params
2487706f2543Smrg        ) );
2488706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2489706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2490706f2543Smrg        error = Success;
2491706f2543Smrg    }
2492706f2543Smrg
2493706f2543Smrg    return error;
2494706f2543Smrg}
2495706f2543Smrg
2496706f2543Smrgint __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc)
2497706f2543Smrg{
2498706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2499706f2543Smrg    int error;
2500706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2501706f2543Smrg
2502706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2503706f2543Smrg    if ( cx != NULL ) {
2504706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
2505706f2543Smrg
2506706f2543Smrg        const GLuint compsize = __glGetTexParameteriv_size(pname);
2507706f2543Smrg        GLint answerBuffer[200];
2508706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2509706f2543Smrg
2510706f2543Smrg        if (params == NULL) return BadAlloc;
2511706f2543Smrg        __glXClearErrorOccured();
2512706f2543Smrg
2513706f2543Smrg        CALL_GetTexParameteriv( GET_DISPATCH(), (
2514706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2515706f2543Smrg            pname,
2516706f2543Smrg            params
2517706f2543Smrg        ) );
2518706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2519706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2520706f2543Smrg        error = Success;
2521706f2543Smrg    }
2522706f2543Smrg
2523706f2543Smrg    return error;
2524706f2543Smrg}
2525706f2543Smrg
2526706f2543Smrgint __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc)
2527706f2543Smrg{
2528706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2529706f2543Smrg    int error;
2530706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2531706f2543Smrg
2532706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2533706f2543Smrg    if ( cx != NULL ) {
2534706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  8 );
2535706f2543Smrg
2536706f2543Smrg        const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
2537706f2543Smrg        GLfloat answerBuffer[200];
2538706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2539706f2543Smrg
2540706f2543Smrg        if (params == NULL) return BadAlloc;
2541706f2543Smrg        __glXClearErrorOccured();
2542706f2543Smrg
2543706f2543Smrg        CALL_GetTexLevelParameterfv( GET_DISPATCH(), (
2544706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2545706f2543Smrg             (GLint   )bswap_CARD32 ( pc +  4 ),
2546706f2543Smrg            pname,
2547706f2543Smrg            params
2548706f2543Smrg        ) );
2549706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2550706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2551706f2543Smrg        error = Success;
2552706f2543Smrg    }
2553706f2543Smrg
2554706f2543Smrg    return error;
2555706f2543Smrg}
2556706f2543Smrg
2557706f2543Smrgint __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc)
2558706f2543Smrg{
2559706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2560706f2543Smrg    int error;
2561706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2562706f2543Smrg
2563706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2564706f2543Smrg    if ( cx != NULL ) {
2565706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  8 );
2566706f2543Smrg
2567706f2543Smrg        const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
2568706f2543Smrg        GLint answerBuffer[200];
2569706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
2570706f2543Smrg
2571706f2543Smrg        if (params == NULL) return BadAlloc;
2572706f2543Smrg        __glXClearErrorOccured();
2573706f2543Smrg
2574706f2543Smrg        CALL_GetTexLevelParameteriv( GET_DISPATCH(), (
2575706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
2576706f2543Smrg             (GLint   )bswap_CARD32 ( pc +  4 ),
2577706f2543Smrg            pname,
2578706f2543Smrg            params
2579706f2543Smrg        ) );
2580706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
2581706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
2582706f2543Smrg        error = Success;
2583706f2543Smrg    }
2584706f2543Smrg
2585706f2543Smrg    return error;
2586706f2543Smrg}
2587706f2543Smrg
2588706f2543Smrgint __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc)
2589706f2543Smrg{
2590706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2591706f2543Smrg    int error;
2592706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2593706f2543Smrg
2594706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2595706f2543Smrg    if ( cx != NULL ) {
2596706f2543Smrg        GLboolean retval;
2597706f2543Smrg        retval = CALL_IsEnabled( GET_DISPATCH(), (
2598706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 )
2599706f2543Smrg        ) );
2600706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2601706f2543Smrg        error = Success;
2602706f2543Smrg    }
2603706f2543Smrg
2604706f2543Smrg    return error;
2605706f2543Smrg}
2606706f2543Smrg
2607706f2543Smrgint __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc)
2608706f2543Smrg{
2609706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2610706f2543Smrg    int error;
2611706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2612706f2543Smrg
2613706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2614706f2543Smrg    if ( cx != NULL ) {
2615706f2543Smrg        GLboolean retval;
2616706f2543Smrg        retval = CALL_IsList( GET_DISPATCH(), (
2617706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 )
2618706f2543Smrg        ) );
2619706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
2620706f2543Smrg        error = Success;
2621706f2543Smrg    }
2622706f2543Smrg
2623706f2543Smrg    return error;
2624706f2543Smrg}
2625706f2543Smrg
2626706f2543Smrgvoid __glXDispSwap_DepthRange(GLbyte * pc)
2627706f2543Smrg{
2628706f2543Smrg#ifdef __GLX_ALIGN64
2629706f2543Smrg    if ((unsigned long)(pc) & 7) {
2630706f2543Smrg        (void) memmove(pc-4, pc, 16);
2631706f2543Smrg        pc -= 4;
2632706f2543Smrg    }
2633706f2543Smrg#endif
2634706f2543Smrg
2635706f2543Smrg    CALL_DepthRange( GET_DISPATCH(), (
2636706f2543Smrg         (GLclampd)bswap_FLOAT64( pc +  0 ),
2637706f2543Smrg         (GLclampd)bswap_FLOAT64( pc +  8 )
2638706f2543Smrg    ) );
2639706f2543Smrg}
2640706f2543Smrg
2641706f2543Smrgvoid __glXDispSwap_Frustum(GLbyte * pc)
2642706f2543Smrg{
2643706f2543Smrg#ifdef __GLX_ALIGN64
2644706f2543Smrg    if ((unsigned long)(pc) & 7) {
2645706f2543Smrg        (void) memmove(pc-4, pc, 48);
2646706f2543Smrg        pc -= 4;
2647706f2543Smrg    }
2648706f2543Smrg#endif
2649706f2543Smrg
2650706f2543Smrg    CALL_Frustum( GET_DISPATCH(), (
2651706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  0 ),
2652706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  8 ),
2653706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 16 ),
2654706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 24 ),
2655706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 32 ),
2656706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 40 )
2657706f2543Smrg    ) );
2658706f2543Smrg}
2659706f2543Smrg
2660706f2543Smrgvoid __glXDispSwap_LoadIdentity(GLbyte * pc)
2661706f2543Smrg{
2662706f2543Smrg    CALL_LoadIdentity( GET_DISPATCH(), () );
2663706f2543Smrg}
2664706f2543Smrg
2665706f2543Smrgvoid __glXDispSwap_LoadMatrixf(GLbyte * pc)
2666706f2543Smrg{
2667706f2543Smrg    CALL_LoadMatrixf( GET_DISPATCH(), (
2668706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 16 )
2669706f2543Smrg    ) );
2670706f2543Smrg}
2671706f2543Smrg
2672706f2543Smrgvoid __glXDispSwap_LoadMatrixd(GLbyte * pc)
2673706f2543Smrg{
2674706f2543Smrg#ifdef __GLX_ALIGN64
2675706f2543Smrg    if ((unsigned long)(pc) & 7) {
2676706f2543Smrg        (void) memmove(pc-4, pc, 128);
2677706f2543Smrg        pc -= 4;
2678706f2543Smrg    }
2679706f2543Smrg#endif
2680706f2543Smrg
2681706f2543Smrg    CALL_LoadMatrixd( GET_DISPATCH(), (
2682706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 16 )
2683706f2543Smrg    ) );
2684706f2543Smrg}
2685706f2543Smrg
2686706f2543Smrgvoid __glXDispSwap_MatrixMode(GLbyte * pc)
2687706f2543Smrg{
2688706f2543Smrg    CALL_MatrixMode( GET_DISPATCH(), (
2689706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
2690706f2543Smrg    ) );
2691706f2543Smrg}
2692706f2543Smrg
2693706f2543Smrgvoid __glXDispSwap_MultMatrixf(GLbyte * pc)
2694706f2543Smrg{
2695706f2543Smrg    CALL_MultMatrixf( GET_DISPATCH(), (
2696706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 16 )
2697706f2543Smrg    ) );
2698706f2543Smrg}
2699706f2543Smrg
2700706f2543Smrgvoid __glXDispSwap_MultMatrixd(GLbyte * pc)
2701706f2543Smrg{
2702706f2543Smrg#ifdef __GLX_ALIGN64
2703706f2543Smrg    if ((unsigned long)(pc) & 7) {
2704706f2543Smrg        (void) memmove(pc-4, pc, 128);
2705706f2543Smrg        pc -= 4;
2706706f2543Smrg    }
2707706f2543Smrg#endif
2708706f2543Smrg
2709706f2543Smrg    CALL_MultMatrixd( GET_DISPATCH(), (
2710706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 16 )
2711706f2543Smrg    ) );
2712706f2543Smrg}
2713706f2543Smrg
2714706f2543Smrgvoid __glXDispSwap_Ortho(GLbyte * pc)
2715706f2543Smrg{
2716706f2543Smrg#ifdef __GLX_ALIGN64
2717706f2543Smrg    if ((unsigned long)(pc) & 7) {
2718706f2543Smrg        (void) memmove(pc-4, pc, 48);
2719706f2543Smrg        pc -= 4;
2720706f2543Smrg    }
2721706f2543Smrg#endif
2722706f2543Smrg
2723706f2543Smrg    CALL_Ortho( GET_DISPATCH(), (
2724706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  0 ),
2725706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  8 ),
2726706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 16 ),
2727706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 24 ),
2728706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 32 ),
2729706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 40 )
2730706f2543Smrg    ) );
2731706f2543Smrg}
2732706f2543Smrg
2733706f2543Smrgvoid __glXDispSwap_PopMatrix(GLbyte * pc)
2734706f2543Smrg{
2735706f2543Smrg    CALL_PopMatrix( GET_DISPATCH(), () );
2736706f2543Smrg}
2737706f2543Smrg
2738706f2543Smrgvoid __glXDispSwap_PushMatrix(GLbyte * pc)
2739706f2543Smrg{
2740706f2543Smrg    CALL_PushMatrix( GET_DISPATCH(), () );
2741706f2543Smrg}
2742706f2543Smrg
2743706f2543Smrgvoid __glXDispSwap_Rotated(GLbyte * pc)
2744706f2543Smrg{
2745706f2543Smrg#ifdef __GLX_ALIGN64
2746706f2543Smrg    if ((unsigned long)(pc) & 7) {
2747706f2543Smrg        (void) memmove(pc-4, pc, 32);
2748706f2543Smrg        pc -= 4;
2749706f2543Smrg    }
2750706f2543Smrg#endif
2751706f2543Smrg
2752706f2543Smrg    CALL_Rotated( GET_DISPATCH(), (
2753706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  0 ),
2754706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  8 ),
2755706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 16 ),
2756706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 24 )
2757706f2543Smrg    ) );
2758706f2543Smrg}
2759706f2543Smrg
2760706f2543Smrgvoid __glXDispSwap_Rotatef(GLbyte * pc)
2761706f2543Smrg{
2762706f2543Smrg    CALL_Rotatef( GET_DISPATCH(), (
2763706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 ),
2764706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 ),
2765706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 ),
2766706f2543Smrg         (GLfloat )bswap_FLOAT32( pc + 12 )
2767706f2543Smrg    ) );
2768706f2543Smrg}
2769706f2543Smrg
2770706f2543Smrgvoid __glXDispSwap_Scaled(GLbyte * pc)
2771706f2543Smrg{
2772706f2543Smrg#ifdef __GLX_ALIGN64
2773706f2543Smrg    if ((unsigned long)(pc) & 7) {
2774706f2543Smrg        (void) memmove(pc-4, pc, 24);
2775706f2543Smrg        pc -= 4;
2776706f2543Smrg    }
2777706f2543Smrg#endif
2778706f2543Smrg
2779706f2543Smrg    CALL_Scaled( GET_DISPATCH(), (
2780706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  0 ),
2781706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  8 ),
2782706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 16 )
2783706f2543Smrg    ) );
2784706f2543Smrg}
2785706f2543Smrg
2786706f2543Smrgvoid __glXDispSwap_Scalef(GLbyte * pc)
2787706f2543Smrg{
2788706f2543Smrg    CALL_Scalef( GET_DISPATCH(), (
2789706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 ),
2790706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 ),
2791706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 )
2792706f2543Smrg    ) );
2793706f2543Smrg}
2794706f2543Smrg
2795706f2543Smrgvoid __glXDispSwap_Translated(GLbyte * pc)
2796706f2543Smrg{
2797706f2543Smrg#ifdef __GLX_ALIGN64
2798706f2543Smrg    if ((unsigned long)(pc) & 7) {
2799706f2543Smrg        (void) memmove(pc-4, pc, 24);
2800706f2543Smrg        pc -= 4;
2801706f2543Smrg    }
2802706f2543Smrg#endif
2803706f2543Smrg
2804706f2543Smrg    CALL_Translated( GET_DISPATCH(), (
2805706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  0 ),
2806706f2543Smrg         (GLdouble)bswap_FLOAT64( pc +  8 ),
2807706f2543Smrg         (GLdouble)bswap_FLOAT64( pc + 16 )
2808706f2543Smrg    ) );
2809706f2543Smrg}
2810706f2543Smrg
2811706f2543Smrgvoid __glXDispSwap_Translatef(GLbyte * pc)
2812706f2543Smrg{
2813706f2543Smrg    CALL_Translatef( GET_DISPATCH(), (
2814706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 ),
2815706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 ),
2816706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 )
2817706f2543Smrg    ) );
2818706f2543Smrg}
2819706f2543Smrg
2820706f2543Smrgvoid __glXDispSwap_Viewport(GLbyte * pc)
2821706f2543Smrg{
2822706f2543Smrg    CALL_Viewport( GET_DISPATCH(), (
2823706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  0 ),
2824706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
2825706f2543Smrg         (GLsizei )bswap_CARD32 ( pc +  8 ),
2826706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 12 )
2827706f2543Smrg    ) );
2828706f2543Smrg}
2829706f2543Smrg
2830706f2543Smrgvoid __glXDispSwap_BindTexture(GLbyte * pc)
2831706f2543Smrg{
2832706f2543Smrg    CALL_BindTexture( GET_DISPATCH(), (
2833706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
2834706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 )
2835706f2543Smrg    ) );
2836706f2543Smrg}
2837706f2543Smrg
2838706f2543Smrgvoid __glXDispSwap_Indexubv(GLbyte * pc)
2839706f2543Smrg{
2840706f2543Smrg    CALL_Indexubv( GET_DISPATCH(), (
2841706f2543Smrg         (const GLubyte *)(pc +  0)
2842706f2543Smrg    ) );
2843706f2543Smrg}
2844706f2543Smrg
2845706f2543Smrgvoid __glXDispSwap_PolygonOffset(GLbyte * pc)
2846706f2543Smrg{
2847706f2543Smrg    CALL_PolygonOffset( GET_DISPATCH(), (
2848706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  0 ),
2849706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 )
2850706f2543Smrg    ) );
2851706f2543Smrg}
2852706f2543Smrg
2853706f2543Smrgint __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
2854706f2543Smrg{
2855706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2856706f2543Smrg    int error;
2857706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2858706f2543Smrg
2859706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2860706f2543Smrg    if ( cx != NULL ) {
2861706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
2862706f2543Smrg
2863706f2543Smrg        GLboolean retval;
2864706f2543Smrg        GLboolean answerBuffer[200];
2865706f2543Smrg        GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
2866706f2543Smrg        retval = CALL_AreTexturesResident( GET_DISPATCH(), (
2867706f2543Smrg            n,
2868706f2543Smrg             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 ),
2869706f2543Smrg            residences
2870706f2543Smrg        ) );
2871706f2543Smrg        __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
2872706f2543Smrg        error = Success;
2873706f2543Smrg    }
2874706f2543Smrg
2875706f2543Smrg    return error;
2876706f2543Smrg}
2877706f2543Smrg
2878706f2543Smrgint __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
2879706f2543Smrg{
2880706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
2881706f2543Smrg    int error;
2882706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2883706f2543Smrg
2884706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
2885706f2543Smrg    if ( cx != NULL ) {
2886706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
2887706f2543Smrg
2888706f2543Smrg        GLboolean retval;
2889706f2543Smrg        GLboolean answerBuffer[200];
2890706f2543Smrg        GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
2891706f2543Smrg        retval = CALL_AreTexturesResident( GET_DISPATCH(), (
2892706f2543Smrg            n,
2893706f2543Smrg             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 ),
2894706f2543Smrg            residences
2895706f2543Smrg        ) );
2896706f2543Smrg        __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
2897706f2543Smrg        error = Success;
2898706f2543Smrg    }
2899706f2543Smrg
2900706f2543Smrg    return error;
2901706f2543Smrg}
2902706f2543Smrg
2903706f2543Smrgvoid __glXDispSwap_CopyTexImage1D(GLbyte * pc)
2904706f2543Smrg{
2905706f2543Smrg    CALL_CopyTexImage1D( GET_DISPATCH(), (
2906706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
2907706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
2908706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
2909706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
2910706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 ),
2911706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 20 ),
2912706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 24 )
2913706f2543Smrg    ) );
2914706f2543Smrg}
2915706f2543Smrg
2916706f2543Smrgvoid __glXDispSwap_CopyTexImage2D(GLbyte * pc)
2917706f2543Smrg{
2918706f2543Smrg    CALL_CopyTexImage2D( GET_DISPATCH(), (
2919706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
2920706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
2921706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
2922706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
2923706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 ),
2924706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 20 ),
2925706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 24 ),
2926706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 28 )
2927706f2543Smrg    ) );
2928706f2543Smrg}
2929706f2543Smrg
2930706f2543Smrgvoid __glXDispSwap_CopyTexSubImage1D(GLbyte * pc)
2931706f2543Smrg{
2932706f2543Smrg    CALL_CopyTexSubImage1D( GET_DISPATCH(), (
2933706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
2934706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
2935706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
2936706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
2937706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 ),
2938706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 20 )
2939706f2543Smrg    ) );
2940706f2543Smrg}
2941706f2543Smrg
2942706f2543Smrgvoid __glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
2943706f2543Smrg{
2944706f2543Smrg    CALL_CopyTexSubImage2D( GET_DISPATCH(), (
2945706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
2946706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
2947706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
2948706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
2949706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 ),
2950706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 20 ),
2951706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 24 ),
2952706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 28 )
2953706f2543Smrg    ) );
2954706f2543Smrg}
2955706f2543Smrg
2956706f2543Smrgint __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
2957706f2543Smrg{
2958706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2959706f2543Smrg    int error;
2960706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2961706f2543Smrg
2962706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
2963706f2543Smrg    if ( cx != NULL ) {
2964706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
2965706f2543Smrg
2966706f2543Smrg        CALL_DeleteTextures( GET_DISPATCH(), (
2967706f2543Smrg            n,
2968706f2543Smrg             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
2969706f2543Smrg        ) );
2970706f2543Smrg        error = Success;
2971706f2543Smrg    }
2972706f2543Smrg
2973706f2543Smrg    return error;
2974706f2543Smrg}
2975706f2543Smrg
2976706f2543Smrgint __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
2977706f2543Smrg{
2978706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
2979706f2543Smrg    int error;
2980706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
2981706f2543Smrg
2982706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
2983706f2543Smrg    if ( cx != NULL ) {
2984706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
2985706f2543Smrg
2986706f2543Smrg        CALL_DeleteTextures( GET_DISPATCH(), (
2987706f2543Smrg            n,
2988706f2543Smrg             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
2989706f2543Smrg        ) );
2990706f2543Smrg        error = Success;
2991706f2543Smrg    }
2992706f2543Smrg
2993706f2543Smrg    return error;
2994706f2543Smrg}
2995706f2543Smrg
2996706f2543Smrgint __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc)
2997706f2543Smrg{
2998706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
2999706f2543Smrg    int error;
3000706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3001706f2543Smrg
3002706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3003706f2543Smrg    if ( cx != NULL ) {
3004706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
3005706f2543Smrg
3006706f2543Smrg        GLuint answerBuffer[200];
3007706f2543Smrg        GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
3008706f2543Smrg        CALL_GenTextures( GET_DISPATCH(), (
3009706f2543Smrg            n,
3010706f2543Smrg            textures
3011706f2543Smrg        ) );
3012706f2543Smrg        (void) bswap_32_array( (uint32_t *) textures, n );
3013706f2543Smrg        __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
3014706f2543Smrg        error = Success;
3015706f2543Smrg    }
3016706f2543Smrg
3017706f2543Smrg    return error;
3018706f2543Smrg}
3019706f2543Smrg
3020706f2543Smrgint __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
3021706f2543Smrg{
3022706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3023706f2543Smrg    int error;
3024706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3025706f2543Smrg
3026706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3027706f2543Smrg    if ( cx != NULL ) {
3028706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
3029706f2543Smrg
3030706f2543Smrg        GLuint answerBuffer[200];
3031706f2543Smrg        GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
3032706f2543Smrg        CALL_GenTextures( GET_DISPATCH(), (
3033706f2543Smrg            n,
3034706f2543Smrg            textures
3035706f2543Smrg        ) );
3036706f2543Smrg        (void) bswap_32_array( (uint32_t *) textures, n );
3037706f2543Smrg        __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
3038706f2543Smrg        error = Success;
3039706f2543Smrg    }
3040706f2543Smrg
3041706f2543Smrg    return error;
3042706f2543Smrg}
3043706f2543Smrg
3044706f2543Smrgint __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc)
3045706f2543Smrg{
3046706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3047706f2543Smrg    int error;
3048706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3049706f2543Smrg
3050706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3051706f2543Smrg    if ( cx != NULL ) {
3052706f2543Smrg        GLboolean retval;
3053706f2543Smrg        retval = CALL_IsTexture( GET_DISPATCH(), (
3054706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 )
3055706f2543Smrg        ) );
3056706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
3057706f2543Smrg        error = Success;
3058706f2543Smrg    }
3059706f2543Smrg
3060706f2543Smrg    return error;
3061706f2543Smrg}
3062706f2543Smrg
3063706f2543Smrgint __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
3064706f2543Smrg{
3065706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3066706f2543Smrg    int error;
3067706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3068706f2543Smrg
3069706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3070706f2543Smrg    if ( cx != NULL ) {
3071706f2543Smrg        GLboolean retval;
3072706f2543Smrg        retval = CALL_IsTexture( GET_DISPATCH(), (
3073706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 )
3074706f2543Smrg        ) );
3075706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
3076706f2543Smrg        error = Success;
3077706f2543Smrg    }
3078706f2543Smrg
3079706f2543Smrg    return error;
3080706f2543Smrg}
3081706f2543Smrg
3082706f2543Smrgvoid __glXDispSwap_PrioritizeTextures(GLbyte * pc)
3083706f2543Smrg{
3084706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
3085706f2543Smrg
3086706f2543Smrg    CALL_PrioritizeTextures( GET_DISPATCH(), (
3087706f2543Smrg        n,
3088706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 ),
3089706f2543Smrg         (const GLclampf *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
3090706f2543Smrg    ) );
3091706f2543Smrg}
3092706f2543Smrg
3093706f2543Smrgvoid __glXDispSwap_TexSubImage1D(GLbyte * pc)
3094706f2543Smrg{
3095706f2543Smrg    const GLvoid * const pixels = (const GLvoid *) (pc + 56);
3096706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3097706f2543Smrg
3098706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3099706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3100706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
3101706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
3102706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
3103706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
3104706f2543Smrg
3105706f2543Smrg    CALL_TexSubImage1D( GET_DISPATCH(), (
3106706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 20 ),
3107706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 24 ),
3108706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 28 ),
3109706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 36 ),
3110706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 44 ),
3111706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 48 ),
3112706f2543Smrg        pixels
3113706f2543Smrg    ) );
3114706f2543Smrg}
3115706f2543Smrg
3116706f2543Smrgvoid __glXDispSwap_TexSubImage2D(GLbyte * pc)
3117706f2543Smrg{
3118706f2543Smrg    const GLvoid * const pixels = (const GLvoid *) (pc + 56);
3119706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3120706f2543Smrg
3121706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3122706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3123706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
3124706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
3125706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
3126706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
3127706f2543Smrg
3128706f2543Smrg    CALL_TexSubImage2D( GET_DISPATCH(), (
3129706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 20 ),
3130706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 24 ),
3131706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 28 ),
3132706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 32 ),
3133706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 36 ),
3134706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 40 ),
3135706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 44 ),
3136706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 48 ),
3137706f2543Smrg        pixels
3138706f2543Smrg    ) );
3139706f2543Smrg}
3140706f2543Smrg
3141706f2543Smrgvoid __glXDispSwap_BlendColor(GLbyte * pc)
3142706f2543Smrg{
3143706f2543Smrg    CALL_BlendColor( GET_DISPATCH(), (
3144706f2543Smrg         (GLclampf)bswap_FLOAT32( pc +  0 ),
3145706f2543Smrg         (GLclampf)bswap_FLOAT32( pc +  4 ),
3146706f2543Smrg         (GLclampf)bswap_FLOAT32( pc +  8 ),
3147706f2543Smrg         (GLclampf)bswap_FLOAT32( pc + 12 )
3148706f2543Smrg    ) );
3149706f2543Smrg}
3150706f2543Smrg
3151706f2543Smrgvoid __glXDispSwap_BlendEquation(GLbyte * pc)
3152706f2543Smrg{
3153706f2543Smrg    CALL_BlendEquation( GET_DISPATCH(), (
3154706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
3155706f2543Smrg    ) );
3156706f2543Smrg}
3157706f2543Smrg
3158706f2543Smrgvoid __glXDispSwap_ColorTable(GLbyte * pc)
3159706f2543Smrg{
3160706f2543Smrg    const GLvoid * const table = (const GLvoid *) (pc + 40);
3161706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3162706f2543Smrg
3163706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3164706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3165706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
3166706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
3167706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
3168706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
3169706f2543Smrg
3170706f2543Smrg    CALL_ColorTable( GET_DISPATCH(), (
3171706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 20 ),
3172706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 24 ),
3173706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 28 ),
3174706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 32 ),
3175706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 36 ),
3176706f2543Smrg        table
3177706f2543Smrg    ) );
3178706f2543Smrg}
3179706f2543Smrg
3180706f2543Smrgvoid __glXDispSwap_ColorTableParameterfv(GLbyte * pc)
3181706f2543Smrg{
3182706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3183706f2543Smrg    const GLfloat * params;
3184706f2543Smrg
3185706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname) );
3186706f2543Smrg
3187706f2543Smrg    CALL_ColorTableParameterfv( GET_DISPATCH(), (
3188706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3189706f2543Smrg        pname,
3190706f2543Smrg        params
3191706f2543Smrg    ) );
3192706f2543Smrg}
3193706f2543Smrg
3194706f2543Smrgvoid __glXDispSwap_ColorTableParameteriv(GLbyte * pc)
3195706f2543Smrg{
3196706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3197706f2543Smrg    const GLint * params;
3198706f2543Smrg
3199706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname) );
3200706f2543Smrg
3201706f2543Smrg    CALL_ColorTableParameteriv( GET_DISPATCH(), (
3202706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3203706f2543Smrg        pname,
3204706f2543Smrg        params
3205706f2543Smrg    ) );
3206706f2543Smrg}
3207706f2543Smrg
3208706f2543Smrgvoid __glXDispSwap_CopyColorTable(GLbyte * pc)
3209706f2543Smrg{
3210706f2543Smrg    CALL_CopyColorTable( GET_DISPATCH(), (
3211706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3212706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
3213706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
3214706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
3215706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 16 )
3216706f2543Smrg    ) );
3217706f2543Smrg}
3218706f2543Smrg
3219706f2543Smrgint __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
3220706f2543Smrg{
3221706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3222706f2543Smrg    int error;
3223706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3224706f2543Smrg
3225706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3226706f2543Smrg    if ( cx != NULL ) {
3227706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3228706f2543Smrg
3229706f2543Smrg        const GLuint compsize = __glGetColorTableParameterfv_size(pname);
3230706f2543Smrg        GLfloat answerBuffer[200];
3231706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3232706f2543Smrg
3233706f2543Smrg        if (params == NULL) return BadAlloc;
3234706f2543Smrg        __glXClearErrorOccured();
3235706f2543Smrg
3236706f2543Smrg        CALL_GetColorTableParameterfv( GET_DISPATCH(), (
3237706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3238706f2543Smrg            pname,
3239706f2543Smrg            params
3240706f2543Smrg        ) );
3241706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3242706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3243706f2543Smrg        error = Success;
3244706f2543Smrg    }
3245706f2543Smrg
3246706f2543Smrg    return error;
3247706f2543Smrg}
3248706f2543Smrg
3249706f2543Smrgint __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
3250706f2543Smrg{
3251706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3252706f2543Smrg    int error;
3253706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3254706f2543Smrg
3255706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3256706f2543Smrg    if ( cx != NULL ) {
3257706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3258706f2543Smrg
3259706f2543Smrg        const GLuint compsize = __glGetColorTableParameterfv_size(pname);
3260706f2543Smrg        GLfloat answerBuffer[200];
3261706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3262706f2543Smrg
3263706f2543Smrg        if (params == NULL) return BadAlloc;
3264706f2543Smrg        __glXClearErrorOccured();
3265706f2543Smrg
3266706f2543Smrg        CALL_GetColorTableParameterfv( GET_DISPATCH(), (
3267706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3268706f2543Smrg            pname,
3269706f2543Smrg            params
3270706f2543Smrg        ) );
3271706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3272706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3273706f2543Smrg        error = Success;
3274706f2543Smrg    }
3275706f2543Smrg
3276706f2543Smrg    return error;
3277706f2543Smrg}
3278706f2543Smrg
3279706f2543Smrgint __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
3280706f2543Smrg{
3281706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3282706f2543Smrg    int error;
3283706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3284706f2543Smrg
3285706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3286706f2543Smrg    if ( cx != NULL ) {
3287706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3288706f2543Smrg
3289706f2543Smrg        const GLuint compsize = __glGetColorTableParameteriv_size(pname);
3290706f2543Smrg        GLint answerBuffer[200];
3291706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3292706f2543Smrg
3293706f2543Smrg        if (params == NULL) return BadAlloc;
3294706f2543Smrg        __glXClearErrorOccured();
3295706f2543Smrg
3296706f2543Smrg        CALL_GetColorTableParameteriv( GET_DISPATCH(), (
3297706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3298706f2543Smrg            pname,
3299706f2543Smrg            params
3300706f2543Smrg        ) );
3301706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3302706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3303706f2543Smrg        error = Success;
3304706f2543Smrg    }
3305706f2543Smrg
3306706f2543Smrg    return error;
3307706f2543Smrg}
3308706f2543Smrg
3309706f2543Smrgint __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
3310706f2543Smrg{
3311706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3312706f2543Smrg    int error;
3313706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3314706f2543Smrg
3315706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3316706f2543Smrg    if ( cx != NULL ) {
3317706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3318706f2543Smrg
3319706f2543Smrg        const GLuint compsize = __glGetColorTableParameteriv_size(pname);
3320706f2543Smrg        GLint answerBuffer[200];
3321706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3322706f2543Smrg
3323706f2543Smrg        if (params == NULL) return BadAlloc;
3324706f2543Smrg        __glXClearErrorOccured();
3325706f2543Smrg
3326706f2543Smrg        CALL_GetColorTableParameteriv( GET_DISPATCH(), (
3327706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3328706f2543Smrg            pname,
3329706f2543Smrg            params
3330706f2543Smrg        ) );
3331706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3332706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3333706f2543Smrg        error = Success;
3334706f2543Smrg    }
3335706f2543Smrg
3336706f2543Smrg    return error;
3337706f2543Smrg}
3338706f2543Smrg
3339706f2543Smrgvoid __glXDispSwap_ColorSubTable(GLbyte * pc)
3340706f2543Smrg{
3341706f2543Smrg    const GLvoid * const data = (const GLvoid *) (pc + 40);
3342706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3343706f2543Smrg
3344706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3345706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3346706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
3347706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
3348706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
3349706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
3350706f2543Smrg
3351706f2543Smrg    CALL_ColorSubTable( GET_DISPATCH(), (
3352706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 20 ),
3353706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 24 ),
3354706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 28 ),
3355706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 32 ),
3356706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 36 ),
3357706f2543Smrg        data
3358706f2543Smrg    ) );
3359706f2543Smrg}
3360706f2543Smrg
3361706f2543Smrgvoid __glXDispSwap_CopyColorSubTable(GLbyte * pc)
3362706f2543Smrg{
3363706f2543Smrg    CALL_CopyColorSubTable( GET_DISPATCH(), (
3364706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3365706f2543Smrg         (GLsizei )bswap_CARD32 ( pc +  4 ),
3366706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
3367706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
3368706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 16 )
3369706f2543Smrg    ) );
3370706f2543Smrg}
3371706f2543Smrg
3372706f2543Smrgvoid __glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
3373706f2543Smrg{
3374706f2543Smrg    const GLvoid * const image = (const GLvoid *) (pc + 44);
3375706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3376706f2543Smrg
3377706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3378706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3379706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
3380706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
3381706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
3382706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
3383706f2543Smrg
3384706f2543Smrg    CALL_ConvolutionFilter1D( GET_DISPATCH(), (
3385706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 20 ),
3386706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 24 ),
3387706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 28 ),
3388706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 36 ),
3389706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 40 ),
3390706f2543Smrg        image
3391706f2543Smrg    ) );
3392706f2543Smrg}
3393706f2543Smrg
3394706f2543Smrgvoid __glXDispSwap_ConvolutionFilter2D(GLbyte * pc)
3395706f2543Smrg{
3396706f2543Smrg    const GLvoid * const image = (const GLvoid *) (pc + 44);
3397706f2543Smrg    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
3398706f2543Smrg
3399706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3400706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3401706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
3402706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
3403706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
3404706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
3405706f2543Smrg
3406706f2543Smrg    CALL_ConvolutionFilter2D( GET_DISPATCH(), (
3407706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 20 ),
3408706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 24 ),
3409706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 28 ),
3410706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 32 ),
3411706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 36 ),
3412706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 40 ),
3413706f2543Smrg        image
3414706f2543Smrg    ) );
3415706f2543Smrg}
3416706f2543Smrg
3417706f2543Smrgvoid __glXDispSwap_ConvolutionParameterf(GLbyte * pc)
3418706f2543Smrg{
3419706f2543Smrg    CALL_ConvolutionParameterf( GET_DISPATCH(), (
3420706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3421706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
3422706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  8 )
3423706f2543Smrg    ) );
3424706f2543Smrg}
3425706f2543Smrg
3426706f2543Smrgvoid __glXDispSwap_ConvolutionParameterfv(GLbyte * pc)
3427706f2543Smrg{
3428706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3429706f2543Smrg    const GLfloat * params;
3430706f2543Smrg
3431706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameterfv_size(pname) );
3432706f2543Smrg
3433706f2543Smrg    CALL_ConvolutionParameterfv( GET_DISPATCH(), (
3434706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3435706f2543Smrg        pname,
3436706f2543Smrg        params
3437706f2543Smrg    ) );
3438706f2543Smrg}
3439706f2543Smrg
3440706f2543Smrgvoid __glXDispSwap_ConvolutionParameteri(GLbyte * pc)
3441706f2543Smrg{
3442706f2543Smrg    CALL_ConvolutionParameteri( GET_DISPATCH(), (
3443706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3444706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
3445706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 )
3446706f2543Smrg    ) );
3447706f2543Smrg}
3448706f2543Smrg
3449706f2543Smrgvoid __glXDispSwap_ConvolutionParameteriv(GLbyte * pc)
3450706f2543Smrg{
3451706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3452706f2543Smrg    const GLint * params;
3453706f2543Smrg
3454706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname) );
3455706f2543Smrg
3456706f2543Smrg    CALL_ConvolutionParameteriv( GET_DISPATCH(), (
3457706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3458706f2543Smrg        pname,
3459706f2543Smrg        params
3460706f2543Smrg    ) );
3461706f2543Smrg}
3462706f2543Smrg
3463706f2543Smrgvoid __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc)
3464706f2543Smrg{
3465706f2543Smrg    CALL_CopyConvolutionFilter1D( GET_DISPATCH(), (
3466706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3467706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
3468706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
3469706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
3470706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 16 )
3471706f2543Smrg    ) );
3472706f2543Smrg}
3473706f2543Smrg
3474706f2543Smrgvoid __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc)
3475706f2543Smrg{
3476706f2543Smrg    CALL_CopyConvolutionFilter2D( GET_DISPATCH(), (
3477706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3478706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
3479706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
3480706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
3481706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 16 ),
3482706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 20 )
3483706f2543Smrg    ) );
3484706f2543Smrg}
3485706f2543Smrg
3486706f2543Smrgint __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
3487706f2543Smrg{
3488706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3489706f2543Smrg    int error;
3490706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3491706f2543Smrg
3492706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3493706f2543Smrg    if ( cx != NULL ) {
3494706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3495706f2543Smrg
3496706f2543Smrg        const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
3497706f2543Smrg        GLfloat answerBuffer[200];
3498706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3499706f2543Smrg
3500706f2543Smrg        if (params == NULL) return BadAlloc;
3501706f2543Smrg        __glXClearErrorOccured();
3502706f2543Smrg
3503706f2543Smrg        CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
3504706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3505706f2543Smrg            pname,
3506706f2543Smrg            params
3507706f2543Smrg        ) );
3508706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3509706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3510706f2543Smrg        error = Success;
3511706f2543Smrg    }
3512706f2543Smrg
3513706f2543Smrg    return error;
3514706f2543Smrg}
3515706f2543Smrg
3516706f2543Smrgint __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
3517706f2543Smrg{
3518706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3519706f2543Smrg    int error;
3520706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3521706f2543Smrg
3522706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3523706f2543Smrg    if ( cx != NULL ) {
3524706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3525706f2543Smrg
3526706f2543Smrg        const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
3527706f2543Smrg        GLfloat answerBuffer[200];
3528706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3529706f2543Smrg
3530706f2543Smrg        if (params == NULL) return BadAlloc;
3531706f2543Smrg        __glXClearErrorOccured();
3532706f2543Smrg
3533706f2543Smrg        CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
3534706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3535706f2543Smrg            pname,
3536706f2543Smrg            params
3537706f2543Smrg        ) );
3538706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3539706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3540706f2543Smrg        error = Success;
3541706f2543Smrg    }
3542706f2543Smrg
3543706f2543Smrg    return error;
3544706f2543Smrg}
3545706f2543Smrg
3546706f2543Smrgint __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
3547706f2543Smrg{
3548706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3549706f2543Smrg    int error;
3550706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3551706f2543Smrg
3552706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3553706f2543Smrg    if ( cx != NULL ) {
3554706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3555706f2543Smrg
3556706f2543Smrg        const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
3557706f2543Smrg        GLint answerBuffer[200];
3558706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3559706f2543Smrg
3560706f2543Smrg        if (params == NULL) return BadAlloc;
3561706f2543Smrg        __glXClearErrorOccured();
3562706f2543Smrg
3563706f2543Smrg        CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
3564706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3565706f2543Smrg            pname,
3566706f2543Smrg            params
3567706f2543Smrg        ) );
3568706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3569706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3570706f2543Smrg        error = Success;
3571706f2543Smrg    }
3572706f2543Smrg
3573706f2543Smrg    return error;
3574706f2543Smrg}
3575706f2543Smrg
3576706f2543Smrgint __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
3577706f2543Smrg{
3578706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3579706f2543Smrg    int error;
3580706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3581706f2543Smrg
3582706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3583706f2543Smrg    if ( cx != NULL ) {
3584706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3585706f2543Smrg
3586706f2543Smrg        const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
3587706f2543Smrg        GLint answerBuffer[200];
3588706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3589706f2543Smrg
3590706f2543Smrg        if (params == NULL) return BadAlloc;
3591706f2543Smrg        __glXClearErrorOccured();
3592706f2543Smrg
3593706f2543Smrg        CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
3594706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3595706f2543Smrg            pname,
3596706f2543Smrg            params
3597706f2543Smrg        ) );
3598706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3599706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3600706f2543Smrg        error = Success;
3601706f2543Smrg    }
3602706f2543Smrg
3603706f2543Smrg    return error;
3604706f2543Smrg}
3605706f2543Smrg
3606706f2543Smrgint __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
3607706f2543Smrg{
3608706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3609706f2543Smrg    int error;
3610706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3611706f2543Smrg
3612706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3613706f2543Smrg    if ( cx != NULL ) {
3614706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3615706f2543Smrg
3616706f2543Smrg        const GLuint compsize = __glGetHistogramParameterfv_size(pname);
3617706f2543Smrg        GLfloat answerBuffer[200];
3618706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3619706f2543Smrg
3620706f2543Smrg        if (params == NULL) return BadAlloc;
3621706f2543Smrg        __glXClearErrorOccured();
3622706f2543Smrg
3623706f2543Smrg        CALL_GetHistogramParameterfv( GET_DISPATCH(), (
3624706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3625706f2543Smrg            pname,
3626706f2543Smrg            params
3627706f2543Smrg        ) );
3628706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3629706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3630706f2543Smrg        error = Success;
3631706f2543Smrg    }
3632706f2543Smrg
3633706f2543Smrg    return error;
3634706f2543Smrg}
3635706f2543Smrg
3636706f2543Smrgint __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
3637706f2543Smrg{
3638706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3639706f2543Smrg    int error;
3640706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3641706f2543Smrg
3642706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3643706f2543Smrg    if ( cx != NULL ) {
3644706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3645706f2543Smrg
3646706f2543Smrg        const GLuint compsize = __glGetHistogramParameterfv_size(pname);
3647706f2543Smrg        GLfloat answerBuffer[200];
3648706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3649706f2543Smrg
3650706f2543Smrg        if (params == NULL) return BadAlloc;
3651706f2543Smrg        __glXClearErrorOccured();
3652706f2543Smrg
3653706f2543Smrg        CALL_GetHistogramParameterfv( GET_DISPATCH(), (
3654706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3655706f2543Smrg            pname,
3656706f2543Smrg            params
3657706f2543Smrg        ) );
3658706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3659706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3660706f2543Smrg        error = Success;
3661706f2543Smrg    }
3662706f2543Smrg
3663706f2543Smrg    return error;
3664706f2543Smrg}
3665706f2543Smrg
3666706f2543Smrgint __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
3667706f2543Smrg{
3668706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3669706f2543Smrg    int error;
3670706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3671706f2543Smrg
3672706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3673706f2543Smrg    if ( cx != NULL ) {
3674706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3675706f2543Smrg
3676706f2543Smrg        const GLuint compsize = __glGetHistogramParameteriv_size(pname);
3677706f2543Smrg        GLint answerBuffer[200];
3678706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3679706f2543Smrg
3680706f2543Smrg        if (params == NULL) return BadAlloc;
3681706f2543Smrg        __glXClearErrorOccured();
3682706f2543Smrg
3683706f2543Smrg        CALL_GetHistogramParameteriv( GET_DISPATCH(), (
3684706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3685706f2543Smrg            pname,
3686706f2543Smrg            params
3687706f2543Smrg        ) );
3688706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3689706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3690706f2543Smrg        error = Success;
3691706f2543Smrg    }
3692706f2543Smrg
3693706f2543Smrg    return error;
3694706f2543Smrg}
3695706f2543Smrg
3696706f2543Smrgint __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
3697706f2543Smrg{
3698706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3699706f2543Smrg    int error;
3700706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3701706f2543Smrg
3702706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3703706f2543Smrg    if ( cx != NULL ) {
3704706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3705706f2543Smrg
3706706f2543Smrg        const GLuint compsize = __glGetHistogramParameteriv_size(pname);
3707706f2543Smrg        GLint answerBuffer[200];
3708706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3709706f2543Smrg
3710706f2543Smrg        if (params == NULL) return BadAlloc;
3711706f2543Smrg        __glXClearErrorOccured();
3712706f2543Smrg
3713706f2543Smrg        CALL_GetHistogramParameteriv( GET_DISPATCH(), (
3714706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3715706f2543Smrg            pname,
3716706f2543Smrg            params
3717706f2543Smrg        ) );
3718706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3719706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3720706f2543Smrg        error = Success;
3721706f2543Smrg    }
3722706f2543Smrg
3723706f2543Smrg    return error;
3724706f2543Smrg}
3725706f2543Smrg
3726706f2543Smrgint __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
3727706f2543Smrg{
3728706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3729706f2543Smrg    int error;
3730706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3731706f2543Smrg
3732706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3733706f2543Smrg    if ( cx != NULL ) {
3734706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3735706f2543Smrg
3736706f2543Smrg        const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
3737706f2543Smrg        GLfloat answerBuffer[200];
3738706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3739706f2543Smrg
3740706f2543Smrg        if (params == NULL) return BadAlloc;
3741706f2543Smrg        __glXClearErrorOccured();
3742706f2543Smrg
3743706f2543Smrg        CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
3744706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3745706f2543Smrg            pname,
3746706f2543Smrg            params
3747706f2543Smrg        ) );
3748706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3749706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3750706f2543Smrg        error = Success;
3751706f2543Smrg    }
3752706f2543Smrg
3753706f2543Smrg    return error;
3754706f2543Smrg}
3755706f2543Smrg
3756706f2543Smrgint __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
3757706f2543Smrg{
3758706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3759706f2543Smrg    int error;
3760706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3761706f2543Smrg
3762706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3763706f2543Smrg    if ( cx != NULL ) {
3764706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3765706f2543Smrg
3766706f2543Smrg        const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
3767706f2543Smrg        GLfloat answerBuffer[200];
3768706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3769706f2543Smrg
3770706f2543Smrg        if (params == NULL) return BadAlloc;
3771706f2543Smrg        __glXClearErrorOccured();
3772706f2543Smrg
3773706f2543Smrg        CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
3774706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3775706f2543Smrg            pname,
3776706f2543Smrg            params
3777706f2543Smrg        ) );
3778706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3779706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3780706f2543Smrg        error = Success;
3781706f2543Smrg    }
3782706f2543Smrg
3783706f2543Smrg    return error;
3784706f2543Smrg}
3785706f2543Smrg
3786706f2543Smrgint __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
3787706f2543Smrg{
3788706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
3789706f2543Smrg    int error;
3790706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3791706f2543Smrg
3792706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
3793706f2543Smrg    if ( cx != NULL ) {
3794706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3795706f2543Smrg
3796706f2543Smrg        const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
3797706f2543Smrg        GLint answerBuffer[200];
3798706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3799706f2543Smrg
3800706f2543Smrg        if (params == NULL) return BadAlloc;
3801706f2543Smrg        __glXClearErrorOccured();
3802706f2543Smrg
3803706f2543Smrg        CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
3804706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3805706f2543Smrg            pname,
3806706f2543Smrg            params
3807706f2543Smrg        ) );
3808706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3809706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3810706f2543Smrg        error = Success;
3811706f2543Smrg    }
3812706f2543Smrg
3813706f2543Smrg    return error;
3814706f2543Smrg}
3815706f2543Smrg
3816706f2543Smrgint __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
3817706f2543Smrg{
3818706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
3819706f2543Smrg    int error;
3820706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
3821706f2543Smrg
3822706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
3823706f2543Smrg    if ( cx != NULL ) {
3824706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
3825706f2543Smrg
3826706f2543Smrg        const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
3827706f2543Smrg        GLint answerBuffer[200];
3828706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
3829706f2543Smrg
3830706f2543Smrg        if (params == NULL) return BadAlloc;
3831706f2543Smrg        __glXClearErrorOccured();
3832706f2543Smrg
3833706f2543Smrg        CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
3834706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
3835706f2543Smrg            pname,
3836706f2543Smrg            params
3837706f2543Smrg        ) );
3838706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
3839706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
3840706f2543Smrg        error = Success;
3841706f2543Smrg    }
3842706f2543Smrg
3843706f2543Smrg    return error;
3844706f2543Smrg}
3845706f2543Smrg
3846706f2543Smrgvoid __glXDispSwap_Histogram(GLbyte * pc)
3847706f2543Smrg{
3848706f2543Smrg    CALL_Histogram( GET_DISPATCH(), (
3849706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3850706f2543Smrg         (GLsizei )bswap_CARD32 ( pc +  4 ),
3851706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
3852706f2543Smrg        *(GLboolean *)(pc + 12)
3853706f2543Smrg    ) );
3854706f2543Smrg}
3855706f2543Smrg
3856706f2543Smrgvoid __glXDispSwap_Minmax(GLbyte * pc)
3857706f2543Smrg{
3858706f2543Smrg    CALL_Minmax( GET_DISPATCH(), (
3859706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3860706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
3861706f2543Smrg        *(GLboolean *)(pc +  8)
3862706f2543Smrg    ) );
3863706f2543Smrg}
3864706f2543Smrg
3865706f2543Smrgvoid __glXDispSwap_ResetHistogram(GLbyte * pc)
3866706f2543Smrg{
3867706f2543Smrg    CALL_ResetHistogram( GET_DISPATCH(), (
3868706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
3869706f2543Smrg    ) );
3870706f2543Smrg}
3871706f2543Smrg
3872706f2543Smrgvoid __glXDispSwap_ResetMinmax(GLbyte * pc)
3873706f2543Smrg{
3874706f2543Smrg    CALL_ResetMinmax( GET_DISPATCH(), (
3875706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
3876706f2543Smrg    ) );
3877706f2543Smrg}
3878706f2543Smrg
3879706f2543Smrgvoid __glXDispSwap_TexImage3D(GLbyte * pc)
3880706f2543Smrg{
3881706f2543Smrg    const CARD32 ptr_is_null = *(CARD32 *)(pc + 76);
3882706f2543Smrg    const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80));
3883706f2543Smrg    __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
3884706f2543Smrg
3885706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3886706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3887706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
3888706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) );
3889706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
3890706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES,  (GLint) bswap_CARD32( & hdr->skipImages )) );
3891706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
3892706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
3893706f2543Smrg
3894706f2543Smrg    CALL_TexImage3D( GET_DISPATCH(), (
3895706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 36 ),
3896706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 40 ),
3897706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 44 ),
3898706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 48 ),
3899706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 52 ),
3900706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 56 ),
3901706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 64 ),
3902706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 68 ),
3903706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 72 ),
3904706f2543Smrg        pixels
3905706f2543Smrg    ) );
3906706f2543Smrg}
3907706f2543Smrg
3908706f2543Smrgvoid __glXDispSwap_TexSubImage3D(GLbyte * pc)
3909706f2543Smrg{
3910706f2543Smrg    const GLvoid * const pixels = (const GLvoid *) (pc + 88);
3911706f2543Smrg    __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
3912706f2543Smrg
3913706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
3914706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
3915706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
3916706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) );
3917706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
3918706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES,  (GLint) bswap_CARD32( & hdr->skipImages )) );
3919706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
3920706f2543Smrg    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
3921706f2543Smrg
3922706f2543Smrg    CALL_TexSubImage3D( GET_DISPATCH(), (
3923706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 36 ),
3924706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 40 ),
3925706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 44 ),
3926706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 48 ),
3927706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 52 ),
3928706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 60 ),
3929706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 64 ),
3930706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 68 ),
3931706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 76 ),
3932706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 80 ),
3933706f2543Smrg        pixels
3934706f2543Smrg    ) );
3935706f2543Smrg}
3936706f2543Smrg
3937706f2543Smrgvoid __glXDispSwap_CopyTexSubImage3D(GLbyte * pc)
3938706f2543Smrg{
3939706f2543Smrg    CALL_CopyTexSubImage3D( GET_DISPATCH(), (
3940706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3941706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
3942706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
3943706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
3944706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 ),
3945706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 20 ),
3946706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 24 ),
3947706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 28 ),
3948706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 32 )
3949706f2543Smrg    ) );
3950706f2543Smrg}
3951706f2543Smrg
3952706f2543Smrgvoid __glXDispSwap_ActiveTextureARB(GLbyte * pc)
3953706f2543Smrg{
3954706f2543Smrg    CALL_ActiveTextureARB( GET_DISPATCH(), (
3955706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
3956706f2543Smrg    ) );
3957706f2543Smrg}
3958706f2543Smrg
3959706f2543Smrgvoid __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc)
3960706f2543Smrg{
3961706f2543Smrg#ifdef __GLX_ALIGN64
3962706f2543Smrg    if ((unsigned long)(pc) & 7) {
3963706f2543Smrg        (void) memmove(pc-4, pc, 12);
3964706f2543Smrg        pc -= 4;
3965706f2543Smrg    }
3966706f2543Smrg#endif
3967706f2543Smrg
3968706f2543Smrg    CALL_MultiTexCoord1dvARB( GET_DISPATCH(), (
3969706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
3970706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
3971706f2543Smrg    ) );
3972706f2543Smrg}
3973706f2543Smrg
3974706f2543Smrgvoid __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc)
3975706f2543Smrg{
3976706f2543Smrg    CALL_MultiTexCoord1fvARB( GET_DISPATCH(), (
3977706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3978706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 1 )
3979706f2543Smrg    ) );
3980706f2543Smrg}
3981706f2543Smrg
3982706f2543Smrgvoid __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc)
3983706f2543Smrg{
3984706f2543Smrg    CALL_MultiTexCoord1ivARB( GET_DISPATCH(), (
3985706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3986706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 1 )
3987706f2543Smrg    ) );
3988706f2543Smrg}
3989706f2543Smrg
3990706f2543Smrgvoid __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc)
3991706f2543Smrg{
3992706f2543Smrg    CALL_MultiTexCoord1svARB( GET_DISPATCH(), (
3993706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
3994706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 1 )
3995706f2543Smrg    ) );
3996706f2543Smrg}
3997706f2543Smrg
3998706f2543Smrgvoid __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc)
3999706f2543Smrg{
4000706f2543Smrg#ifdef __GLX_ALIGN64
4001706f2543Smrg    if ((unsigned long)(pc) & 7) {
4002706f2543Smrg        (void) memmove(pc-4, pc, 20);
4003706f2543Smrg        pc -= 4;
4004706f2543Smrg    }
4005706f2543Smrg#endif
4006706f2543Smrg
4007706f2543Smrg    CALL_MultiTexCoord2dvARB( GET_DISPATCH(), (
4008706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 16 ),
4009706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
4010706f2543Smrg    ) );
4011706f2543Smrg}
4012706f2543Smrg
4013706f2543Smrgvoid __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc)
4014706f2543Smrg{
4015706f2543Smrg    CALL_MultiTexCoord2fvARB( GET_DISPATCH(), (
4016706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4017706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 2 )
4018706f2543Smrg    ) );
4019706f2543Smrg}
4020706f2543Smrg
4021706f2543Smrgvoid __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc)
4022706f2543Smrg{
4023706f2543Smrg    CALL_MultiTexCoord2ivARB( GET_DISPATCH(), (
4024706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4025706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 2 )
4026706f2543Smrg    ) );
4027706f2543Smrg}
4028706f2543Smrg
4029706f2543Smrgvoid __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc)
4030706f2543Smrg{
4031706f2543Smrg    CALL_MultiTexCoord2svARB( GET_DISPATCH(), (
4032706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4033706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 2 )
4034706f2543Smrg    ) );
4035706f2543Smrg}
4036706f2543Smrg
4037706f2543Smrgvoid __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc)
4038706f2543Smrg{
4039706f2543Smrg#ifdef __GLX_ALIGN64
4040706f2543Smrg    if ((unsigned long)(pc) & 7) {
4041706f2543Smrg        (void) memmove(pc-4, pc, 28);
4042706f2543Smrg        pc -= 4;
4043706f2543Smrg    }
4044706f2543Smrg#endif
4045706f2543Smrg
4046706f2543Smrg    CALL_MultiTexCoord3dvARB( GET_DISPATCH(), (
4047706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 24 ),
4048706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
4049706f2543Smrg    ) );
4050706f2543Smrg}
4051706f2543Smrg
4052706f2543Smrgvoid __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc)
4053706f2543Smrg{
4054706f2543Smrg    CALL_MultiTexCoord3fvARB( GET_DISPATCH(), (
4055706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4056706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 3 )
4057706f2543Smrg    ) );
4058706f2543Smrg}
4059706f2543Smrg
4060706f2543Smrgvoid __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc)
4061706f2543Smrg{
4062706f2543Smrg    CALL_MultiTexCoord3ivARB( GET_DISPATCH(), (
4063706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4064706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 3 )
4065706f2543Smrg    ) );
4066706f2543Smrg}
4067706f2543Smrg
4068706f2543Smrgvoid __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc)
4069706f2543Smrg{
4070706f2543Smrg    CALL_MultiTexCoord3svARB( GET_DISPATCH(), (
4071706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4072706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 3 )
4073706f2543Smrg    ) );
4074706f2543Smrg}
4075706f2543Smrg
4076706f2543Smrgvoid __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc)
4077706f2543Smrg{
4078706f2543Smrg#ifdef __GLX_ALIGN64
4079706f2543Smrg    if ((unsigned long)(pc) & 7) {
4080706f2543Smrg        (void) memmove(pc-4, pc, 36);
4081706f2543Smrg        pc -= 4;
4082706f2543Smrg    }
4083706f2543Smrg#endif
4084706f2543Smrg
4085706f2543Smrg    CALL_MultiTexCoord4dvARB( GET_DISPATCH(), (
4086706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 32 ),
4087706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
4088706f2543Smrg    ) );
4089706f2543Smrg}
4090706f2543Smrg
4091706f2543Smrgvoid __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc)
4092706f2543Smrg{
4093706f2543Smrg    CALL_MultiTexCoord4fvARB( GET_DISPATCH(), (
4094706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4095706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
4096706f2543Smrg    ) );
4097706f2543Smrg}
4098706f2543Smrg
4099706f2543Smrgvoid __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc)
4100706f2543Smrg{
4101706f2543Smrg    CALL_MultiTexCoord4ivARB( GET_DISPATCH(), (
4102706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4103706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
4104706f2543Smrg    ) );
4105706f2543Smrg}
4106706f2543Smrg
4107706f2543Smrgvoid __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc)
4108706f2543Smrg{
4109706f2543Smrg    CALL_MultiTexCoord4svARB( GET_DISPATCH(), (
4110706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4111706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
4112706f2543Smrg    ) );
4113706f2543Smrg}
4114706f2543Smrg
4115706f2543Smrgvoid __glXDispSwap_SampleCoverageARB(GLbyte * pc)
4116706f2543Smrg{
4117706f2543Smrg    CALL_SampleCoverageARB( GET_DISPATCH(), (
4118706f2543Smrg         (GLclampf)bswap_FLOAT32( pc +  0 ),
4119706f2543Smrg        *(GLboolean *)(pc +  4)
4120706f2543Smrg    ) );
4121706f2543Smrg}
4122706f2543Smrg
4123706f2543Smrgvoid __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc)
4124706f2543Smrg{
4125706f2543Smrg    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 20 );
4126706f2543Smrg
4127706f2543Smrg    CALL_CompressedTexImage1DARB( GET_DISPATCH(), (
4128706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4129706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
4130706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
4131706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 12 ),
4132706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 ),
4133706f2543Smrg        imageSize,
4134706f2543Smrg         (const GLvoid *)(pc + 24)
4135706f2543Smrg    ) );
4136706f2543Smrg}
4137706f2543Smrg
4138706f2543Smrgvoid __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc)
4139706f2543Smrg{
4140706f2543Smrg    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 24 );
4141706f2543Smrg
4142706f2543Smrg    CALL_CompressedTexImage2DARB( GET_DISPATCH(), (
4143706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4144706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
4145706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
4146706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 12 ),
4147706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 16 ),
4148706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 20 ),
4149706f2543Smrg        imageSize,
4150706f2543Smrg         (const GLvoid *)(pc + 28)
4151706f2543Smrg    ) );
4152706f2543Smrg}
4153706f2543Smrg
4154706f2543Smrgvoid __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc)
4155706f2543Smrg{
4156706f2543Smrg    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 28 );
4157706f2543Smrg
4158706f2543Smrg    CALL_CompressedTexImage3DARB( GET_DISPATCH(), (
4159706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4160706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
4161706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
4162706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 12 ),
4163706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 16 ),
4164706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 20 ),
4165706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 24 ),
4166706f2543Smrg        imageSize,
4167706f2543Smrg         (const GLvoid *)(pc + 32)
4168706f2543Smrg    ) );
4169706f2543Smrg}
4170706f2543Smrg
4171706f2543Smrgvoid __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc)
4172706f2543Smrg{
4173706f2543Smrg    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 20 );
4174706f2543Smrg
4175706f2543Smrg    CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), (
4176706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4177706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
4178706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
4179706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 12 ),
4180706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 16 ),
4181706f2543Smrg        imageSize,
4182706f2543Smrg         (const GLvoid *)(pc + 24)
4183706f2543Smrg    ) );
4184706f2543Smrg}
4185706f2543Smrg
4186706f2543Smrgvoid __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc)
4187706f2543Smrg{
4188706f2543Smrg    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 28 );
4189706f2543Smrg
4190706f2543Smrg    CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), (
4191706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4192706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
4193706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
4194706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
4195706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 16 ),
4196706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 20 ),
4197706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 24 ),
4198706f2543Smrg        imageSize,
4199706f2543Smrg         (const GLvoid *)(pc + 32)
4200706f2543Smrg    ) );
4201706f2543Smrg}
4202706f2543Smrg
4203706f2543Smrgvoid __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc)
4204706f2543Smrg{
4205706f2543Smrg    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 36 );
4206706f2543Smrg
4207706f2543Smrg    CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), (
4208706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4209706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 ),
4210706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  8 ),
4211706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 12 ),
4212706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 ),
4213706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 20 ),
4214706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 24 ),
4215706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 28 ),
4216706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 32 ),
4217706f2543Smrg        imageSize,
4218706f2543Smrg         (const GLvoid *)(pc + 40)
4219706f2543Smrg    ) );
4220706f2543Smrg}
4221706f2543Smrg
4222706f2543Smrgint __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc)
4223706f2543Smrg{
4224706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4225706f2543Smrg    int error;
4226706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4227706f2543Smrg
4228706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
4229706f2543Smrg    if ( cx != NULL ) {
4230706f2543Smrg        GLdouble params[4];
4231706f2543Smrg        CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), (
4232706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
4233706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  4 ),
4234706f2543Smrg            params
4235706f2543Smrg        ) );
4236706f2543Smrg        (void) bswap_64_array( (uint64_t *) params, 4 );
4237706f2543Smrg        __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
4238706f2543Smrg        error = Success;
4239706f2543Smrg    }
4240706f2543Smrg
4241706f2543Smrg    return error;
4242706f2543Smrg}
4243706f2543Smrg
4244706f2543Smrgint __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc)
4245706f2543Smrg{
4246706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4247706f2543Smrg    int error;
4248706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4249706f2543Smrg
4250706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
4251706f2543Smrg    if ( cx != NULL ) {
4252706f2543Smrg        GLfloat params[4];
4253706f2543Smrg        CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), (
4254706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
4255706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  4 ),
4256706f2543Smrg            params
4257706f2543Smrg        ) );
4258706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, 4 );
4259706f2543Smrg        __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
4260706f2543Smrg        error = Success;
4261706f2543Smrg    }
4262706f2543Smrg
4263706f2543Smrg    return error;
4264706f2543Smrg}
4265706f2543Smrg
4266706f2543Smrgint __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc)
4267706f2543Smrg{
4268706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4269706f2543Smrg    int error;
4270706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4271706f2543Smrg
4272706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
4273706f2543Smrg    if ( cx != NULL ) {
4274706f2543Smrg        GLdouble params[4];
4275706f2543Smrg        CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), (
4276706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
4277706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  4 ),
4278706f2543Smrg            params
4279706f2543Smrg        ) );
4280706f2543Smrg        (void) bswap_64_array( (uint64_t *) params, 4 );
4281706f2543Smrg        __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
4282706f2543Smrg        error = Success;
4283706f2543Smrg    }
4284706f2543Smrg
4285706f2543Smrg    return error;
4286706f2543Smrg}
4287706f2543Smrg
4288706f2543Smrgint __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc)
4289706f2543Smrg{
4290706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4291706f2543Smrg    int error;
4292706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4293706f2543Smrg
4294706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
4295706f2543Smrg    if ( cx != NULL ) {
4296706f2543Smrg        GLfloat params[4];
4297706f2543Smrg        CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), (
4298706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
4299706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  4 ),
4300706f2543Smrg            params
4301706f2543Smrg        ) );
4302706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, 4 );
4303706f2543Smrg        __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
4304706f2543Smrg        error = Success;
4305706f2543Smrg    }
4306706f2543Smrg
4307706f2543Smrg    return error;
4308706f2543Smrg}
4309706f2543Smrg
4310706f2543Smrgint __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc)
4311706f2543Smrg{
4312706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4313706f2543Smrg    int error;
4314706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4315706f2543Smrg
4316706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
4317706f2543Smrg    if ( cx != NULL ) {
4318706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
4319706f2543Smrg
4320706f2543Smrg        const GLuint compsize = __glGetProgramivARB_size(pname);
4321706f2543Smrg        GLint answerBuffer[200];
4322706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4323706f2543Smrg
4324706f2543Smrg        if (params == NULL) return BadAlloc;
4325706f2543Smrg        __glXClearErrorOccured();
4326706f2543Smrg
4327706f2543Smrg        CALL_GetProgramivARB( GET_DISPATCH(), (
4328706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
4329706f2543Smrg            pname,
4330706f2543Smrg            params
4331706f2543Smrg        ) );
4332706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
4333706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4334706f2543Smrg        error = Success;
4335706f2543Smrg    }
4336706f2543Smrg
4337706f2543Smrg    return error;
4338706f2543Smrg}
4339706f2543Smrg
4340706f2543Smrgint __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc)
4341706f2543Smrg{
4342706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4343706f2543Smrg    int error;
4344706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4345706f2543Smrg
4346706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
4347706f2543Smrg    if ( cx != NULL ) {
4348706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
4349706f2543Smrg
4350706f2543Smrg        const GLuint compsize = __glGetVertexAttribdvARB_size(pname);
4351706f2543Smrg        GLdouble answerBuffer[200];
4352706f2543Smrg        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
4353706f2543Smrg
4354706f2543Smrg        if (params == NULL) return BadAlloc;
4355706f2543Smrg        __glXClearErrorOccured();
4356706f2543Smrg
4357706f2543Smrg        CALL_GetVertexAttribdvARB( GET_DISPATCH(), (
4358706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
4359706f2543Smrg            pname,
4360706f2543Smrg            params
4361706f2543Smrg        ) );
4362706f2543Smrg        (void) bswap_64_array( (uint64_t *) params, compsize );
4363706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
4364706f2543Smrg        error = Success;
4365706f2543Smrg    }
4366706f2543Smrg
4367706f2543Smrg    return error;
4368706f2543Smrg}
4369706f2543Smrg
4370706f2543Smrgint __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc)
4371706f2543Smrg{
4372706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4373706f2543Smrg    int error;
4374706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4375706f2543Smrg
4376706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
4377706f2543Smrg    if ( cx != NULL ) {
4378706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
4379706f2543Smrg
4380706f2543Smrg        const GLuint compsize = __glGetVertexAttribfvARB_size(pname);
4381706f2543Smrg        GLfloat answerBuffer[200];
4382706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4383706f2543Smrg
4384706f2543Smrg        if (params == NULL) return BadAlloc;
4385706f2543Smrg        __glXClearErrorOccured();
4386706f2543Smrg
4387706f2543Smrg        CALL_GetVertexAttribfvARB( GET_DISPATCH(), (
4388706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
4389706f2543Smrg            pname,
4390706f2543Smrg            params
4391706f2543Smrg        ) );
4392706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
4393706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4394706f2543Smrg        error = Success;
4395706f2543Smrg    }
4396706f2543Smrg
4397706f2543Smrg    return error;
4398706f2543Smrg}
4399706f2543Smrg
4400706f2543Smrgint __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc)
4401706f2543Smrg{
4402706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
4403706f2543Smrg    int error;
4404706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4405706f2543Smrg
4406706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
4407706f2543Smrg    if ( cx != NULL ) {
4408706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
4409706f2543Smrg
4410706f2543Smrg        const GLuint compsize = __glGetVertexAttribivARB_size(pname);
4411706f2543Smrg        GLint answerBuffer[200];
4412706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4413706f2543Smrg
4414706f2543Smrg        if (params == NULL) return BadAlloc;
4415706f2543Smrg        __glXClearErrorOccured();
4416706f2543Smrg
4417706f2543Smrg        CALL_GetVertexAttribivARB( GET_DISPATCH(), (
4418706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
4419706f2543Smrg            pname,
4420706f2543Smrg            params
4421706f2543Smrg        ) );
4422706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
4423706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4424706f2543Smrg        error = Success;
4425706f2543Smrg    }
4426706f2543Smrg
4427706f2543Smrg    return error;
4428706f2543Smrg}
4429706f2543Smrg
4430706f2543Smrgvoid __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc)
4431706f2543Smrg{
4432706f2543Smrg#ifdef __GLX_ALIGN64
4433706f2543Smrg    if ((unsigned long)(pc) & 7) {
4434706f2543Smrg        (void) memmove(pc-4, pc, 40);
4435706f2543Smrg        pc -= 4;
4436706f2543Smrg    }
4437706f2543Smrg#endif
4438706f2543Smrg
4439706f2543Smrg    CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), (
4440706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4441706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 ),
4442706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 4 )
4443706f2543Smrg    ) );
4444706f2543Smrg}
4445706f2543Smrg
4446706f2543Smrgvoid __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc)
4447706f2543Smrg{
4448706f2543Smrg    CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), (
4449706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4450706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 ),
4451706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 4 )
4452706f2543Smrg    ) );
4453706f2543Smrg}
4454706f2543Smrg
4455706f2543Smrgvoid __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc)
4456706f2543Smrg{
4457706f2543Smrg#ifdef __GLX_ALIGN64
4458706f2543Smrg    if ((unsigned long)(pc) & 7) {
4459706f2543Smrg        (void) memmove(pc-4, pc, 40);
4460706f2543Smrg        pc -= 4;
4461706f2543Smrg    }
4462706f2543Smrg#endif
4463706f2543Smrg
4464706f2543Smrg    CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), (
4465706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4466706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 ),
4467706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 4 )
4468706f2543Smrg    ) );
4469706f2543Smrg}
4470706f2543Smrg
4471706f2543Smrgvoid __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc)
4472706f2543Smrg{
4473706f2543Smrg    CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), (
4474706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4475706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 ),
4476706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 4 )
4477706f2543Smrg    ) );
4478706f2543Smrg}
4479706f2543Smrg
4480706f2543Smrgvoid __glXDispSwap_ProgramStringARB(GLbyte * pc)
4481706f2543Smrg{
4482706f2543Smrg    const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  8 );
4483706f2543Smrg
4484706f2543Smrg    CALL_ProgramStringARB( GET_DISPATCH(), (
4485706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4486706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
4487706f2543Smrg        len,
4488706f2543Smrg         (const GLvoid *)(pc + 12)
4489706f2543Smrg    ) );
4490706f2543Smrg}
4491706f2543Smrg
4492706f2543Smrgvoid __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc)
4493706f2543Smrg{
4494706f2543Smrg#ifdef __GLX_ALIGN64
4495706f2543Smrg    if ((unsigned long)(pc) & 7) {
4496706f2543Smrg        (void) memmove(pc-4, pc, 12);
4497706f2543Smrg        pc -= 4;
4498706f2543Smrg    }
4499706f2543Smrg#endif
4500706f2543Smrg
4501706f2543Smrg    CALL_VertexAttrib1dvARB( GET_DISPATCH(), (
4502706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4503706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 1 )
4504706f2543Smrg    ) );
4505706f2543Smrg}
4506706f2543Smrg
4507706f2543Smrgvoid __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc)
4508706f2543Smrg{
4509706f2543Smrg    CALL_VertexAttrib1fvARB( GET_DISPATCH(), (
4510706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4511706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 1 )
4512706f2543Smrg    ) );
4513706f2543Smrg}
4514706f2543Smrg
4515706f2543Smrgvoid __glXDispSwap_VertexAttrib1svARB(GLbyte * pc)
4516706f2543Smrg{
4517706f2543Smrg    CALL_VertexAttrib1svARB( GET_DISPATCH(), (
4518706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4519706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 1 )
4520706f2543Smrg    ) );
4521706f2543Smrg}
4522706f2543Smrg
4523706f2543Smrgvoid __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc)
4524706f2543Smrg{
4525706f2543Smrg#ifdef __GLX_ALIGN64
4526706f2543Smrg    if ((unsigned long)(pc) & 7) {
4527706f2543Smrg        (void) memmove(pc-4, pc, 20);
4528706f2543Smrg        pc -= 4;
4529706f2543Smrg    }
4530706f2543Smrg#endif
4531706f2543Smrg
4532706f2543Smrg    CALL_VertexAttrib2dvARB( GET_DISPATCH(), (
4533706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4534706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 2 )
4535706f2543Smrg    ) );
4536706f2543Smrg}
4537706f2543Smrg
4538706f2543Smrgvoid __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc)
4539706f2543Smrg{
4540706f2543Smrg    CALL_VertexAttrib2fvARB( GET_DISPATCH(), (
4541706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4542706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 2 )
4543706f2543Smrg    ) );
4544706f2543Smrg}
4545706f2543Smrg
4546706f2543Smrgvoid __glXDispSwap_VertexAttrib2svARB(GLbyte * pc)
4547706f2543Smrg{
4548706f2543Smrg    CALL_VertexAttrib2svARB( GET_DISPATCH(), (
4549706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4550706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 2 )
4551706f2543Smrg    ) );
4552706f2543Smrg}
4553706f2543Smrg
4554706f2543Smrgvoid __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc)
4555706f2543Smrg{
4556706f2543Smrg#ifdef __GLX_ALIGN64
4557706f2543Smrg    if ((unsigned long)(pc) & 7) {
4558706f2543Smrg        (void) memmove(pc-4, pc, 28);
4559706f2543Smrg        pc -= 4;
4560706f2543Smrg    }
4561706f2543Smrg#endif
4562706f2543Smrg
4563706f2543Smrg    CALL_VertexAttrib3dvARB( GET_DISPATCH(), (
4564706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4565706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 3 )
4566706f2543Smrg    ) );
4567706f2543Smrg}
4568706f2543Smrg
4569706f2543Smrgvoid __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc)
4570706f2543Smrg{
4571706f2543Smrg    CALL_VertexAttrib3fvARB( GET_DISPATCH(), (
4572706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4573706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 3 )
4574706f2543Smrg    ) );
4575706f2543Smrg}
4576706f2543Smrg
4577706f2543Smrgvoid __glXDispSwap_VertexAttrib3svARB(GLbyte * pc)
4578706f2543Smrg{
4579706f2543Smrg    CALL_VertexAttrib3svARB( GET_DISPATCH(), (
4580706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4581706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 3 )
4582706f2543Smrg    ) );
4583706f2543Smrg}
4584706f2543Smrg
4585706f2543Smrgvoid __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc)
4586706f2543Smrg{
4587706f2543Smrg    CALL_VertexAttrib4NbvARB( GET_DISPATCH(), (
4588706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4589706f2543Smrg         (const GLbyte *)(pc +  4)
4590706f2543Smrg    ) );
4591706f2543Smrg}
4592706f2543Smrg
4593706f2543Smrgvoid __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc)
4594706f2543Smrg{
4595706f2543Smrg    CALL_VertexAttrib4NivARB( GET_DISPATCH(), (
4596706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4597706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
4598706f2543Smrg    ) );
4599706f2543Smrg}
4600706f2543Smrg
4601706f2543Smrgvoid __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc)
4602706f2543Smrg{
4603706f2543Smrg    CALL_VertexAttrib4NsvARB( GET_DISPATCH(), (
4604706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4605706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
4606706f2543Smrg    ) );
4607706f2543Smrg}
4608706f2543Smrg
4609706f2543Smrgvoid __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc)
4610706f2543Smrg{
4611706f2543Smrg    CALL_VertexAttrib4NubvARB( GET_DISPATCH(), (
4612706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4613706f2543Smrg         (const GLubyte *)(pc +  4)
4614706f2543Smrg    ) );
4615706f2543Smrg}
4616706f2543Smrg
4617706f2543Smrgvoid __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc)
4618706f2543Smrg{
4619706f2543Smrg    CALL_VertexAttrib4NuivARB( GET_DISPATCH(), (
4620706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4621706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
4622706f2543Smrg    ) );
4623706f2543Smrg}
4624706f2543Smrg
4625706f2543Smrgvoid __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc)
4626706f2543Smrg{
4627706f2543Smrg    CALL_VertexAttrib4NusvARB( GET_DISPATCH(), (
4628706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4629706f2543Smrg         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
4630706f2543Smrg    ) );
4631706f2543Smrg}
4632706f2543Smrg
4633706f2543Smrgvoid __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc)
4634706f2543Smrg{
4635706f2543Smrg    CALL_VertexAttrib4bvARB( GET_DISPATCH(), (
4636706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4637706f2543Smrg         (const GLbyte *)(pc +  4)
4638706f2543Smrg    ) );
4639706f2543Smrg}
4640706f2543Smrg
4641706f2543Smrgvoid __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc)
4642706f2543Smrg{
4643706f2543Smrg#ifdef __GLX_ALIGN64
4644706f2543Smrg    if ((unsigned long)(pc) & 7) {
4645706f2543Smrg        (void) memmove(pc-4, pc, 36);
4646706f2543Smrg        pc -= 4;
4647706f2543Smrg    }
4648706f2543Smrg#endif
4649706f2543Smrg
4650706f2543Smrg    CALL_VertexAttrib4dvARB( GET_DISPATCH(), (
4651706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4652706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 4 )
4653706f2543Smrg    ) );
4654706f2543Smrg}
4655706f2543Smrg
4656706f2543Smrgvoid __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc)
4657706f2543Smrg{
4658706f2543Smrg    CALL_VertexAttrib4fvARB( GET_DISPATCH(), (
4659706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4660706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
4661706f2543Smrg    ) );
4662706f2543Smrg}
4663706f2543Smrg
4664706f2543Smrgvoid __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc)
4665706f2543Smrg{
4666706f2543Smrg    CALL_VertexAttrib4ivARB( GET_DISPATCH(), (
4667706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4668706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
4669706f2543Smrg    ) );
4670706f2543Smrg}
4671706f2543Smrg
4672706f2543Smrgvoid __glXDispSwap_VertexAttrib4svARB(GLbyte * pc)
4673706f2543Smrg{
4674706f2543Smrg    CALL_VertexAttrib4svARB( GET_DISPATCH(), (
4675706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4676706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
4677706f2543Smrg    ) );
4678706f2543Smrg}
4679706f2543Smrg
4680706f2543Smrgvoid __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc)
4681706f2543Smrg{
4682706f2543Smrg    CALL_VertexAttrib4ubvARB( GET_DISPATCH(), (
4683706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4684706f2543Smrg         (const GLubyte *)(pc +  4)
4685706f2543Smrg    ) );
4686706f2543Smrg}
4687706f2543Smrg
4688706f2543Smrgvoid __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc)
4689706f2543Smrg{
4690706f2543Smrg    CALL_VertexAttrib4uivARB( GET_DISPATCH(), (
4691706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4692706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
4693706f2543Smrg    ) );
4694706f2543Smrg}
4695706f2543Smrg
4696706f2543Smrgvoid __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc)
4697706f2543Smrg{
4698706f2543Smrg    CALL_VertexAttrib4usvARB( GET_DISPATCH(), (
4699706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
4700706f2543Smrg         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
4701706f2543Smrg    ) );
4702706f2543Smrg}
4703706f2543Smrg
4704706f2543Smrgvoid __glXDispSwap_BeginQueryARB(GLbyte * pc)
4705706f2543Smrg{
4706706f2543Smrg    CALL_BeginQueryARB( GET_DISPATCH(), (
4707706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4708706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 )
4709706f2543Smrg    ) );
4710706f2543Smrg}
4711706f2543Smrg
4712706f2543Smrgint __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc)
4713706f2543Smrg{
4714706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4715706f2543Smrg    int error;
4716706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4717706f2543Smrg
4718706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
4719706f2543Smrg    if ( cx != NULL ) {
4720706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
4721706f2543Smrg
4722706f2543Smrg        CALL_DeleteQueriesARB( GET_DISPATCH(), (
4723706f2543Smrg            n,
4724706f2543Smrg             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
4725706f2543Smrg        ) );
4726706f2543Smrg        error = Success;
4727706f2543Smrg    }
4728706f2543Smrg
4729706f2543Smrg    return error;
4730706f2543Smrg}
4731706f2543Smrg
4732706f2543Smrgvoid __glXDispSwap_EndQueryARB(GLbyte * pc)
4733706f2543Smrg{
4734706f2543Smrg    CALL_EndQueryARB( GET_DISPATCH(), (
4735706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
4736706f2543Smrg    ) );
4737706f2543Smrg}
4738706f2543Smrg
4739706f2543Smrgint __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc)
4740706f2543Smrg{
4741706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4742706f2543Smrg    int error;
4743706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4744706f2543Smrg
4745706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
4746706f2543Smrg    if ( cx != NULL ) {
4747706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
4748706f2543Smrg
4749706f2543Smrg        GLuint answerBuffer[200];
4750706f2543Smrg        GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
4751706f2543Smrg        CALL_GenQueriesARB( GET_DISPATCH(), (
4752706f2543Smrg            n,
4753706f2543Smrg            ids
4754706f2543Smrg        ) );
4755706f2543Smrg        (void) bswap_32_array( (uint32_t *) ids, n );
4756706f2543Smrg        __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0);
4757706f2543Smrg        error = Success;
4758706f2543Smrg    }
4759706f2543Smrg
4760706f2543Smrg    return error;
4761706f2543Smrg}
4762706f2543Smrg
4763706f2543Smrgint __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc)
4764706f2543Smrg{
4765706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4766706f2543Smrg    int error;
4767706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4768706f2543Smrg
4769706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
4770706f2543Smrg    if ( cx != NULL ) {
4771706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
4772706f2543Smrg
4773706f2543Smrg        const GLuint compsize = __glGetQueryObjectivARB_size(pname);
4774706f2543Smrg        GLint answerBuffer[200];
4775706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4776706f2543Smrg
4777706f2543Smrg        if (params == NULL) return BadAlloc;
4778706f2543Smrg        __glXClearErrorOccured();
4779706f2543Smrg
4780706f2543Smrg        CALL_GetQueryObjectivARB( GET_DISPATCH(), (
4781706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
4782706f2543Smrg            pname,
4783706f2543Smrg            params
4784706f2543Smrg        ) );
4785706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
4786706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4787706f2543Smrg        error = Success;
4788706f2543Smrg    }
4789706f2543Smrg
4790706f2543Smrg    return error;
4791706f2543Smrg}
4792706f2543Smrg
4793706f2543Smrgint __glXDispSwap_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc)
4794706f2543Smrg{
4795706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4796706f2543Smrg    int error;
4797706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4798706f2543Smrg
4799706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
4800706f2543Smrg    if ( cx != NULL ) {
4801706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
4802706f2543Smrg
4803706f2543Smrg        const GLuint compsize = __glGetQueryObjectuivARB_size(pname);
4804706f2543Smrg        GLuint answerBuffer[200];
4805706f2543Smrg        GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4806706f2543Smrg
4807706f2543Smrg        if (params == NULL) return BadAlloc;
4808706f2543Smrg        __glXClearErrorOccured();
4809706f2543Smrg
4810706f2543Smrg        CALL_GetQueryObjectuivARB( GET_DISPATCH(), (
4811706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
4812706f2543Smrg            pname,
4813706f2543Smrg            params
4814706f2543Smrg        ) );
4815706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
4816706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4817706f2543Smrg        error = Success;
4818706f2543Smrg    }
4819706f2543Smrg
4820706f2543Smrg    return error;
4821706f2543Smrg}
4822706f2543Smrg
4823706f2543Smrgint __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc)
4824706f2543Smrg{
4825706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4826706f2543Smrg    int error;
4827706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4828706f2543Smrg
4829706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
4830706f2543Smrg    if ( cx != NULL ) {
4831706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
4832706f2543Smrg
4833706f2543Smrg        const GLuint compsize = __glGetQueryivARB_size(pname);
4834706f2543Smrg        GLint answerBuffer[200];
4835706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
4836706f2543Smrg
4837706f2543Smrg        if (params == NULL) return BadAlloc;
4838706f2543Smrg        __glXClearErrorOccured();
4839706f2543Smrg
4840706f2543Smrg        CALL_GetQueryivARB( GET_DISPATCH(), (
4841706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
4842706f2543Smrg            pname,
4843706f2543Smrg            params
4844706f2543Smrg        ) );
4845706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
4846706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
4847706f2543Smrg        error = Success;
4848706f2543Smrg    }
4849706f2543Smrg
4850706f2543Smrg    return error;
4851706f2543Smrg}
4852706f2543Smrg
4853706f2543Smrgint __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc)
4854706f2543Smrg{
4855706f2543Smrg    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
4856706f2543Smrg    int error;
4857706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
4858706f2543Smrg
4859706f2543Smrg    pc += __GLX_SINGLE_HDR_SIZE;
4860706f2543Smrg    if ( cx != NULL ) {
4861706f2543Smrg        GLboolean retval;
4862706f2543Smrg        retval = CALL_IsQueryARB( GET_DISPATCH(), (
4863706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 )
4864706f2543Smrg        ) );
4865706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
4866706f2543Smrg        error = Success;
4867706f2543Smrg    }
4868706f2543Smrg
4869706f2543Smrg    return error;
4870706f2543Smrg}
4871706f2543Smrg
4872706f2543Smrgvoid __glXDispSwap_DrawBuffersARB(GLbyte * pc)
4873706f2543Smrg{
4874706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
4875706f2543Smrg
4876706f2543Smrg    CALL_DrawBuffersARB( GET_DISPATCH(), (
4877706f2543Smrg        n,
4878706f2543Smrg         (const GLenum *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
4879706f2543Smrg    ) );
4880706f2543Smrg}
4881706f2543Smrg
4882706f2543Smrgvoid __glXDispSwap_SampleMaskSGIS(GLbyte * pc)
4883706f2543Smrg{
4884706f2543Smrg    CALL_SampleMaskSGIS( GET_DISPATCH(), (
4885706f2543Smrg         (GLclampf)bswap_FLOAT32( pc +  0 ),
4886706f2543Smrg        *(GLboolean *)(pc +  4)
4887706f2543Smrg    ) );
4888706f2543Smrg}
4889706f2543Smrg
4890706f2543Smrgvoid __glXDispSwap_SamplePatternSGIS(GLbyte * pc)
4891706f2543Smrg{
4892706f2543Smrg    CALL_SamplePatternSGIS( GET_DISPATCH(), (
4893706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
4894706f2543Smrg    ) );
4895706f2543Smrg}
4896706f2543Smrg
4897706f2543Smrgvoid __glXDispSwap_PointParameterfEXT(GLbyte * pc)
4898706f2543Smrg{
4899706f2543Smrg    CALL_PointParameterfEXT( GET_DISPATCH(), (
4900706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
4901706f2543Smrg         (GLfloat )bswap_FLOAT32( pc +  4 )
4902706f2543Smrg    ) );
4903706f2543Smrg}
4904706f2543Smrg
4905706f2543Smrgvoid __glXDispSwap_PointParameterfvEXT(GLbyte * pc)
4906706f2543Smrg{
4907706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
4908706f2543Smrg    const GLfloat * params;
4909706f2543Smrg
4910706f2543Smrg    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterfvEXT_size(pname) );
4911706f2543Smrg
4912706f2543Smrg    CALL_PointParameterfvEXT( GET_DISPATCH(), (
4913706f2543Smrg        pname,
4914706f2543Smrg        params
4915706f2543Smrg    ) );
4916706f2543Smrg}
4917706f2543Smrg
4918706f2543Smrgvoid __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc)
4919706f2543Smrg{
4920706f2543Smrg    CALL_SecondaryColor3bvEXT( GET_DISPATCH(), (
4921706f2543Smrg         (const GLbyte *)(pc +  0)
4922706f2543Smrg    ) );
4923706f2543Smrg}
4924706f2543Smrg
4925706f2543Smrgvoid __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc)
4926706f2543Smrg{
4927706f2543Smrg#ifdef __GLX_ALIGN64
4928706f2543Smrg    if ((unsigned long)(pc) & 7) {
4929706f2543Smrg        (void) memmove(pc-4, pc, 24);
4930706f2543Smrg        pc -= 4;
4931706f2543Smrg    }
4932706f2543Smrg#endif
4933706f2543Smrg
4934706f2543Smrg    CALL_SecondaryColor3dvEXT( GET_DISPATCH(), (
4935706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
4936706f2543Smrg    ) );
4937706f2543Smrg}
4938706f2543Smrg
4939706f2543Smrgvoid __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc)
4940706f2543Smrg{
4941706f2543Smrg    CALL_SecondaryColor3fvEXT( GET_DISPATCH(), (
4942706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
4943706f2543Smrg    ) );
4944706f2543Smrg}
4945706f2543Smrg
4946706f2543Smrgvoid __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc)
4947706f2543Smrg{
4948706f2543Smrg    CALL_SecondaryColor3ivEXT( GET_DISPATCH(), (
4949706f2543Smrg         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
4950706f2543Smrg    ) );
4951706f2543Smrg}
4952706f2543Smrg
4953706f2543Smrgvoid __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc)
4954706f2543Smrg{
4955706f2543Smrg    CALL_SecondaryColor3svEXT( GET_DISPATCH(), (
4956706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
4957706f2543Smrg    ) );
4958706f2543Smrg}
4959706f2543Smrg
4960706f2543Smrgvoid __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc)
4961706f2543Smrg{
4962706f2543Smrg    CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), (
4963706f2543Smrg         (const GLubyte *)(pc +  0)
4964706f2543Smrg    ) );
4965706f2543Smrg}
4966706f2543Smrg
4967706f2543Smrgvoid __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc)
4968706f2543Smrg{
4969706f2543Smrg    CALL_SecondaryColor3uivEXT( GET_DISPATCH(), (
4970706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
4971706f2543Smrg    ) );
4972706f2543Smrg}
4973706f2543Smrg
4974706f2543Smrgvoid __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc)
4975706f2543Smrg{
4976706f2543Smrg    CALL_SecondaryColor3usvEXT( GET_DISPATCH(), (
4977706f2543Smrg         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
4978706f2543Smrg    ) );
4979706f2543Smrg}
4980706f2543Smrg
4981706f2543Smrgvoid __glXDispSwap_FogCoorddvEXT(GLbyte * pc)
4982706f2543Smrg{
4983706f2543Smrg#ifdef __GLX_ALIGN64
4984706f2543Smrg    if ((unsigned long)(pc) & 7) {
4985706f2543Smrg        (void) memmove(pc-4, pc, 8);
4986706f2543Smrg        pc -= 4;
4987706f2543Smrg    }
4988706f2543Smrg#endif
4989706f2543Smrg
4990706f2543Smrg    CALL_FogCoorddvEXT( GET_DISPATCH(), (
4991706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
4992706f2543Smrg    ) );
4993706f2543Smrg}
4994706f2543Smrg
4995706f2543Smrgvoid __glXDispSwap_FogCoordfvEXT(GLbyte * pc)
4996706f2543Smrg{
4997706f2543Smrg    CALL_FogCoordfvEXT( GET_DISPATCH(), (
4998706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
4999706f2543Smrg    ) );
5000706f2543Smrg}
5001706f2543Smrg
5002706f2543Smrgvoid __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc)
5003706f2543Smrg{
5004706f2543Smrg    CALL_BlendFuncSeparateEXT( GET_DISPATCH(), (
5005706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5006706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
5007706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
5008706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 12 )
5009706f2543Smrg    ) );
5010706f2543Smrg}
5011706f2543Smrg
5012706f2543Smrgvoid __glXDispSwap_WindowPos3fvMESA(GLbyte * pc)
5013706f2543Smrg{
5014706f2543Smrg    CALL_WindowPos3fvMESA( GET_DISPATCH(), (
5015706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
5016706f2543Smrg    ) );
5017706f2543Smrg}
5018706f2543Smrg
5019706f2543Smrgint __glXDispSwap_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc)
5020706f2543Smrg{
5021706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5022706f2543Smrg    int error;
5023706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5024706f2543Smrg
5025706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5026706f2543Smrg    if ( cx != NULL ) {
5027706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
5028706f2543Smrg
5029706f2543Smrg        GLboolean retval;
5030706f2543Smrg        GLboolean answerBuffer[200];
5031706f2543Smrg        GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
5032706f2543Smrg        retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), (
5033706f2543Smrg            n,
5034706f2543Smrg             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 ),
5035706f2543Smrg            residences
5036706f2543Smrg        ) );
5037706f2543Smrg        __glXSendReplySwap(cl->client, residences, n, 1, GL_FALSE, retval);
5038706f2543Smrg        error = Success;
5039706f2543Smrg    }
5040706f2543Smrg
5041706f2543Smrg    return error;
5042706f2543Smrg}
5043706f2543Smrg
5044706f2543Smrgvoid __glXDispSwap_BindProgramNV(GLbyte * pc)
5045706f2543Smrg{
5046706f2543Smrg    CALL_BindProgramNV( GET_DISPATCH(), (
5047706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5048706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 )
5049706f2543Smrg    ) );
5050706f2543Smrg}
5051706f2543Smrg
5052706f2543Smrgint __glXDispSwap_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc)
5053706f2543Smrg{
5054706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5055706f2543Smrg    int error;
5056706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5057706f2543Smrg
5058706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5059706f2543Smrg    if ( cx != NULL ) {
5060706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
5061706f2543Smrg
5062706f2543Smrg        CALL_DeleteProgramsNV( GET_DISPATCH(), (
5063706f2543Smrg            n,
5064706f2543Smrg             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
5065706f2543Smrg        ) );
5066706f2543Smrg        error = Success;
5067706f2543Smrg    }
5068706f2543Smrg
5069706f2543Smrg    return error;
5070706f2543Smrg}
5071706f2543Smrg
5072706f2543Smrgvoid __glXDispSwap_ExecuteProgramNV(GLbyte * pc)
5073706f2543Smrg{
5074706f2543Smrg    CALL_ExecuteProgramNV( GET_DISPATCH(), (
5075706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5076706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 ),
5077706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 4 )
5078706f2543Smrg    ) );
5079706f2543Smrg}
5080706f2543Smrg
5081706f2543Smrgint __glXDispSwap_GenProgramsNV(__GLXclientState *cl, GLbyte *pc)
5082706f2543Smrg{
5083706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5084706f2543Smrg    int error;
5085706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5086706f2543Smrg
5087706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5088706f2543Smrg    if ( cx != NULL ) {
5089706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
5090706f2543Smrg
5091706f2543Smrg        GLuint answerBuffer[200];
5092706f2543Smrg        GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
5093706f2543Smrg        CALL_GenProgramsNV( GET_DISPATCH(), (
5094706f2543Smrg            n,
5095706f2543Smrg            programs
5096706f2543Smrg        ) );
5097706f2543Smrg        (void) bswap_32_array( (uint32_t *) programs, n );
5098706f2543Smrg        __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0);
5099706f2543Smrg        error = Success;
5100706f2543Smrg    }
5101706f2543Smrg
5102706f2543Smrg    return error;
5103706f2543Smrg}
5104706f2543Smrg
5105706f2543Smrgint __glXDispSwap_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc)
5106706f2543Smrg{
5107706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5108706f2543Smrg    int error;
5109706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5110706f2543Smrg
5111706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5112706f2543Smrg    if ( cx != NULL ) {
5113706f2543Smrg        GLdouble params[4];
5114706f2543Smrg        CALL_GetProgramParameterdvNV( GET_DISPATCH(), (
5115706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
5116706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  4 ),
5117706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  8 ),
5118706f2543Smrg            params
5119706f2543Smrg        ) );
5120706f2543Smrg        (void) bswap_64_array( (uint64_t *) params, 4 );
5121706f2543Smrg        __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
5122706f2543Smrg        error = Success;
5123706f2543Smrg    }
5124706f2543Smrg
5125706f2543Smrg    return error;
5126706f2543Smrg}
5127706f2543Smrg
5128706f2543Smrgint __glXDispSwap_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc)
5129706f2543Smrg{
5130706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5131706f2543Smrg    int error;
5132706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5133706f2543Smrg
5134706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5135706f2543Smrg    if ( cx != NULL ) {
5136706f2543Smrg        GLfloat params[4];
5137706f2543Smrg        CALL_GetProgramParameterfvNV( GET_DISPATCH(), (
5138706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
5139706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  4 ),
5140706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  8 ),
5141706f2543Smrg            params
5142706f2543Smrg        ) );
5143706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, 4 );
5144706f2543Smrg        __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
5145706f2543Smrg        error = Success;
5146706f2543Smrg    }
5147706f2543Smrg
5148706f2543Smrg    return error;
5149706f2543Smrg}
5150706f2543Smrg
5151706f2543Smrgint __glXDispSwap_GetProgramivNV(__GLXclientState *cl, GLbyte *pc)
5152706f2543Smrg{
5153706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5154706f2543Smrg    int error;
5155706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5156706f2543Smrg
5157706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5158706f2543Smrg    if ( cx != NULL ) {
5159706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
5160706f2543Smrg
5161706f2543Smrg        const GLuint compsize = __glGetProgramivNV_size(pname);
5162706f2543Smrg        GLint answerBuffer[200];
5163706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
5164706f2543Smrg
5165706f2543Smrg        if (params == NULL) return BadAlloc;
5166706f2543Smrg        __glXClearErrorOccured();
5167706f2543Smrg
5168706f2543Smrg        CALL_GetProgramivNV( GET_DISPATCH(), (
5169706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
5170706f2543Smrg            pname,
5171706f2543Smrg            params
5172706f2543Smrg        ) );
5173706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
5174706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
5175706f2543Smrg        error = Success;
5176706f2543Smrg    }
5177706f2543Smrg
5178706f2543Smrg    return error;
5179706f2543Smrg}
5180706f2543Smrg
5181706f2543Smrgint __glXDispSwap_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc)
5182706f2543Smrg{
5183706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5184706f2543Smrg    int error;
5185706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5186706f2543Smrg
5187706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5188706f2543Smrg    if ( cx != NULL ) {
5189706f2543Smrg        GLint params[1];
5190706f2543Smrg        CALL_GetTrackMatrixivNV( GET_DISPATCH(), (
5191706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
5192706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  4 ),
5193706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  8 ),
5194706f2543Smrg            params
5195706f2543Smrg        ) );
5196706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, 1 );
5197706f2543Smrg        __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
5198706f2543Smrg        error = Success;
5199706f2543Smrg    }
5200706f2543Smrg
5201706f2543Smrg    return error;
5202706f2543Smrg}
5203706f2543Smrg
5204706f2543Smrgint __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc)
5205706f2543Smrg{
5206706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5207706f2543Smrg    int error;
5208706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5209706f2543Smrg
5210706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5211706f2543Smrg    if ( cx != NULL ) {
5212706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
5213706f2543Smrg
5214706f2543Smrg        const GLuint compsize = __glGetVertexAttribdvNV_size(pname);
5215706f2543Smrg        GLdouble answerBuffer[200];
5216706f2543Smrg        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
5217706f2543Smrg
5218706f2543Smrg        if (params == NULL) return BadAlloc;
5219706f2543Smrg        __glXClearErrorOccured();
5220706f2543Smrg
5221706f2543Smrg        CALL_GetVertexAttribdvNV( GET_DISPATCH(), (
5222706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
5223706f2543Smrg            pname,
5224706f2543Smrg            params
5225706f2543Smrg        ) );
5226706f2543Smrg        (void) bswap_64_array( (uint64_t *) params, compsize );
5227706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
5228706f2543Smrg        error = Success;
5229706f2543Smrg    }
5230706f2543Smrg
5231706f2543Smrg    return error;
5232706f2543Smrg}
5233706f2543Smrg
5234706f2543Smrgint __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc)
5235706f2543Smrg{
5236706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5237706f2543Smrg    int error;
5238706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5239706f2543Smrg
5240706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5241706f2543Smrg    if ( cx != NULL ) {
5242706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
5243706f2543Smrg
5244706f2543Smrg        const GLuint compsize = __glGetVertexAttribfvNV_size(pname);
5245706f2543Smrg        GLfloat answerBuffer[200];
5246706f2543Smrg        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
5247706f2543Smrg
5248706f2543Smrg        if (params == NULL) return BadAlloc;
5249706f2543Smrg        __glXClearErrorOccured();
5250706f2543Smrg
5251706f2543Smrg        CALL_GetVertexAttribfvNV( GET_DISPATCH(), (
5252706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
5253706f2543Smrg            pname,
5254706f2543Smrg            params
5255706f2543Smrg        ) );
5256706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
5257706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
5258706f2543Smrg        error = Success;
5259706f2543Smrg    }
5260706f2543Smrg
5261706f2543Smrg    return error;
5262706f2543Smrg}
5263706f2543Smrg
5264706f2543Smrgint __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc)
5265706f2543Smrg{
5266706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5267706f2543Smrg    int error;
5268706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5269706f2543Smrg
5270706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5271706f2543Smrg    if ( cx != NULL ) {
5272706f2543Smrg        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
5273706f2543Smrg
5274706f2543Smrg        const GLuint compsize = __glGetVertexAttribivNV_size(pname);
5275706f2543Smrg        GLint answerBuffer[200];
5276706f2543Smrg        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
5277706f2543Smrg
5278706f2543Smrg        if (params == NULL) return BadAlloc;
5279706f2543Smrg        __glXClearErrorOccured();
5280706f2543Smrg
5281706f2543Smrg        CALL_GetVertexAttribivNV( GET_DISPATCH(), (
5282706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
5283706f2543Smrg            pname,
5284706f2543Smrg            params
5285706f2543Smrg        ) );
5286706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, compsize );
5287706f2543Smrg        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
5288706f2543Smrg        error = Success;
5289706f2543Smrg    }
5290706f2543Smrg
5291706f2543Smrg    return error;
5292706f2543Smrg}
5293706f2543Smrg
5294706f2543Smrgint __glXDispSwap_IsProgramNV(__GLXclientState *cl, GLbyte *pc)
5295706f2543Smrg{
5296706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5297706f2543Smrg    int error;
5298706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5299706f2543Smrg
5300706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5301706f2543Smrg    if ( cx != NULL ) {
5302706f2543Smrg        GLboolean retval;
5303706f2543Smrg        retval = CALL_IsProgramNV( GET_DISPATCH(), (
5304706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 )
5305706f2543Smrg        ) );
5306706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
5307706f2543Smrg        error = Success;
5308706f2543Smrg    }
5309706f2543Smrg
5310706f2543Smrg    return error;
5311706f2543Smrg}
5312706f2543Smrg
5313706f2543Smrgvoid __glXDispSwap_LoadProgramNV(GLbyte * pc)
5314706f2543Smrg{
5315706f2543Smrg    const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  8 );
5316706f2543Smrg
5317706f2543Smrg    CALL_LoadProgramNV( GET_DISPATCH(), (
5318706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5319706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 ),
5320706f2543Smrg        len,
5321706f2543Smrg         (const GLubyte *)(pc + 12)
5322706f2543Smrg    ) );
5323706f2543Smrg}
5324706f2543Smrg
5325706f2543Smrgvoid __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc)
5326706f2543Smrg{
5327706f2543Smrg    const GLuint num =  (GLuint  )bswap_CARD32 ( pc +  8 );
5328706f2543Smrg
5329706f2543Smrg#ifdef __GLX_ALIGN64
5330706f2543Smrg    const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
5331706f2543Smrg    if ((unsigned long)(pc) & 7) {
5332706f2543Smrg        (void) memmove(pc-4, pc, cmdlen);
5333706f2543Smrg        pc -= 4;
5334706f2543Smrg    }
5335706f2543Smrg#endif
5336706f2543Smrg
5337706f2543Smrg    CALL_ProgramParameters4dvNV( GET_DISPATCH(), (
5338706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5339706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 ),
5340706f2543Smrg        num,
5341706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 12), 0 )
5342706f2543Smrg    ) );
5343706f2543Smrg}
5344706f2543Smrg
5345706f2543Smrgvoid __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc)
5346706f2543Smrg{
5347706f2543Smrg    const GLuint num =  (GLuint  )bswap_CARD32 ( pc +  8 );
5348706f2543Smrg
5349706f2543Smrg    CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
5350706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5351706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 ),
5352706f2543Smrg        num,
5353706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 12), 0 )
5354706f2543Smrg    ) );
5355706f2543Smrg}
5356706f2543Smrg
5357706f2543Smrgvoid __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc)
5358706f2543Smrg{
5359706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
5360706f2543Smrg
5361706f2543Smrg    CALL_RequestResidentProgramsNV( GET_DISPATCH(), (
5362706f2543Smrg        n,
5363706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
5364706f2543Smrg    ) );
5365706f2543Smrg}
5366706f2543Smrg
5367706f2543Smrgvoid __glXDispSwap_TrackMatrixNV(GLbyte * pc)
5368706f2543Smrg{
5369706f2543Smrg    CALL_TrackMatrixNV( GET_DISPATCH(), (
5370706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5371706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 ),
5372706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
5373706f2543Smrg         (GLenum  )bswap_ENUM   ( pc + 12 )
5374706f2543Smrg    ) );
5375706f2543Smrg}
5376706f2543Smrg
5377706f2543Smrgvoid __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc)
5378706f2543Smrg{
5379706f2543Smrg#ifdef __GLX_ALIGN64
5380706f2543Smrg    if ((unsigned long)(pc) & 7) {
5381706f2543Smrg        (void) memmove(pc-4, pc, 12);
5382706f2543Smrg        pc -= 4;
5383706f2543Smrg    }
5384706f2543Smrg#endif
5385706f2543Smrg
5386706f2543Smrg    CALL_VertexAttrib1dvNV( GET_DISPATCH(), (
5387706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5388706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 1 )
5389706f2543Smrg    ) );
5390706f2543Smrg}
5391706f2543Smrg
5392706f2543Smrgvoid __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc)
5393706f2543Smrg{
5394706f2543Smrg    CALL_VertexAttrib1fvNV( GET_DISPATCH(), (
5395706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5396706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 1 )
5397706f2543Smrg    ) );
5398706f2543Smrg}
5399706f2543Smrg
5400706f2543Smrgvoid __glXDispSwap_VertexAttrib1svNV(GLbyte * pc)
5401706f2543Smrg{
5402706f2543Smrg    CALL_VertexAttrib1svNV( GET_DISPATCH(), (
5403706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5404706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 1 )
5405706f2543Smrg    ) );
5406706f2543Smrg}
5407706f2543Smrg
5408706f2543Smrgvoid __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc)
5409706f2543Smrg{
5410706f2543Smrg#ifdef __GLX_ALIGN64
5411706f2543Smrg    if ((unsigned long)(pc) & 7) {
5412706f2543Smrg        (void) memmove(pc-4, pc, 20);
5413706f2543Smrg        pc -= 4;
5414706f2543Smrg    }
5415706f2543Smrg#endif
5416706f2543Smrg
5417706f2543Smrg    CALL_VertexAttrib2dvNV( GET_DISPATCH(), (
5418706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5419706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 2 )
5420706f2543Smrg    ) );
5421706f2543Smrg}
5422706f2543Smrg
5423706f2543Smrgvoid __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc)
5424706f2543Smrg{
5425706f2543Smrg    CALL_VertexAttrib2fvNV( GET_DISPATCH(), (
5426706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5427706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 2 )
5428706f2543Smrg    ) );
5429706f2543Smrg}
5430706f2543Smrg
5431706f2543Smrgvoid __glXDispSwap_VertexAttrib2svNV(GLbyte * pc)
5432706f2543Smrg{
5433706f2543Smrg    CALL_VertexAttrib2svNV( GET_DISPATCH(), (
5434706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5435706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 2 )
5436706f2543Smrg    ) );
5437706f2543Smrg}
5438706f2543Smrg
5439706f2543Smrgvoid __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc)
5440706f2543Smrg{
5441706f2543Smrg#ifdef __GLX_ALIGN64
5442706f2543Smrg    if ((unsigned long)(pc) & 7) {
5443706f2543Smrg        (void) memmove(pc-4, pc, 28);
5444706f2543Smrg        pc -= 4;
5445706f2543Smrg    }
5446706f2543Smrg#endif
5447706f2543Smrg
5448706f2543Smrg    CALL_VertexAttrib3dvNV( GET_DISPATCH(), (
5449706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5450706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 3 )
5451706f2543Smrg    ) );
5452706f2543Smrg}
5453706f2543Smrg
5454706f2543Smrgvoid __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc)
5455706f2543Smrg{
5456706f2543Smrg    CALL_VertexAttrib3fvNV( GET_DISPATCH(), (
5457706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5458706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 3 )
5459706f2543Smrg    ) );
5460706f2543Smrg}
5461706f2543Smrg
5462706f2543Smrgvoid __glXDispSwap_VertexAttrib3svNV(GLbyte * pc)
5463706f2543Smrg{
5464706f2543Smrg    CALL_VertexAttrib3svNV( GET_DISPATCH(), (
5465706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5466706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 3 )
5467706f2543Smrg    ) );
5468706f2543Smrg}
5469706f2543Smrg
5470706f2543Smrgvoid __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc)
5471706f2543Smrg{
5472706f2543Smrg#ifdef __GLX_ALIGN64
5473706f2543Smrg    if ((unsigned long)(pc) & 7) {
5474706f2543Smrg        (void) memmove(pc-4, pc, 36);
5475706f2543Smrg        pc -= 4;
5476706f2543Smrg    }
5477706f2543Smrg#endif
5478706f2543Smrg
5479706f2543Smrg    CALL_VertexAttrib4dvNV( GET_DISPATCH(), (
5480706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5481706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 4 )
5482706f2543Smrg    ) );
5483706f2543Smrg}
5484706f2543Smrg
5485706f2543Smrgvoid __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc)
5486706f2543Smrg{
5487706f2543Smrg    CALL_VertexAttrib4fvNV( GET_DISPATCH(), (
5488706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5489706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
5490706f2543Smrg    ) );
5491706f2543Smrg}
5492706f2543Smrg
5493706f2543Smrgvoid __glXDispSwap_VertexAttrib4svNV(GLbyte * pc)
5494706f2543Smrg{
5495706f2543Smrg    CALL_VertexAttrib4svNV( GET_DISPATCH(), (
5496706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5497706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
5498706f2543Smrg    ) );
5499706f2543Smrg}
5500706f2543Smrg
5501706f2543Smrgvoid __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc)
5502706f2543Smrg{
5503706f2543Smrg    CALL_VertexAttrib4ubvNV( GET_DISPATCH(), (
5504706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5505706f2543Smrg         (const GLubyte *)(pc +  4)
5506706f2543Smrg    ) );
5507706f2543Smrg}
5508706f2543Smrg
5509706f2543Smrgvoid __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc)
5510706f2543Smrg{
5511706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5512706f2543Smrg
5513706f2543Smrg#ifdef __GLX_ALIGN64
5514706f2543Smrg    const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
5515706f2543Smrg    if ((unsigned long)(pc) & 7) {
5516706f2543Smrg        (void) memmove(pc-4, pc, cmdlen);
5517706f2543Smrg        pc -= 4;
5518706f2543Smrg    }
5519706f2543Smrg#endif
5520706f2543Smrg
5521706f2543Smrg    CALL_VertexAttribs1dvNV( GET_DISPATCH(), (
5522706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5523706f2543Smrg        n,
5524706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 0 )
5525706f2543Smrg    ) );
5526706f2543Smrg}
5527706f2543Smrg
5528706f2543Smrgvoid __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc)
5529706f2543Smrg{
5530706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5531706f2543Smrg
5532706f2543Smrg    CALL_VertexAttribs1fvNV( GET_DISPATCH(), (
5533706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5534706f2543Smrg        n,
5535706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
5536706f2543Smrg    ) );
5537706f2543Smrg}
5538706f2543Smrg
5539706f2543Smrgvoid __glXDispSwap_VertexAttribs1svNV(GLbyte * pc)
5540706f2543Smrg{
5541706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5542706f2543Smrg
5543706f2543Smrg    CALL_VertexAttribs1svNV( GET_DISPATCH(), (
5544706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5545706f2543Smrg        n,
5546706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
5547706f2543Smrg    ) );
5548706f2543Smrg}
5549706f2543Smrg
5550706f2543Smrgvoid __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc)
5551706f2543Smrg{
5552706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5553706f2543Smrg
5554706f2543Smrg#ifdef __GLX_ALIGN64
5555706f2543Smrg    const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
5556706f2543Smrg    if ((unsigned long)(pc) & 7) {
5557706f2543Smrg        (void) memmove(pc-4, pc, cmdlen);
5558706f2543Smrg        pc -= 4;
5559706f2543Smrg    }
5560706f2543Smrg#endif
5561706f2543Smrg
5562706f2543Smrg    CALL_VertexAttribs2dvNV( GET_DISPATCH(), (
5563706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5564706f2543Smrg        n,
5565706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 0 )
5566706f2543Smrg    ) );
5567706f2543Smrg}
5568706f2543Smrg
5569706f2543Smrgvoid __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc)
5570706f2543Smrg{
5571706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5572706f2543Smrg
5573706f2543Smrg    CALL_VertexAttribs2fvNV( GET_DISPATCH(), (
5574706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5575706f2543Smrg        n,
5576706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
5577706f2543Smrg    ) );
5578706f2543Smrg}
5579706f2543Smrg
5580706f2543Smrgvoid __glXDispSwap_VertexAttribs2svNV(GLbyte * pc)
5581706f2543Smrg{
5582706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5583706f2543Smrg
5584706f2543Smrg    CALL_VertexAttribs2svNV( GET_DISPATCH(), (
5585706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5586706f2543Smrg        n,
5587706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
5588706f2543Smrg    ) );
5589706f2543Smrg}
5590706f2543Smrg
5591706f2543Smrgvoid __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc)
5592706f2543Smrg{
5593706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5594706f2543Smrg
5595706f2543Smrg#ifdef __GLX_ALIGN64
5596706f2543Smrg    const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
5597706f2543Smrg    if ((unsigned long)(pc) & 7) {
5598706f2543Smrg        (void) memmove(pc-4, pc, cmdlen);
5599706f2543Smrg        pc -= 4;
5600706f2543Smrg    }
5601706f2543Smrg#endif
5602706f2543Smrg
5603706f2543Smrg    CALL_VertexAttribs3dvNV( GET_DISPATCH(), (
5604706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5605706f2543Smrg        n,
5606706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 0 )
5607706f2543Smrg    ) );
5608706f2543Smrg}
5609706f2543Smrg
5610706f2543Smrgvoid __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc)
5611706f2543Smrg{
5612706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5613706f2543Smrg
5614706f2543Smrg    CALL_VertexAttribs3fvNV( GET_DISPATCH(), (
5615706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5616706f2543Smrg        n,
5617706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
5618706f2543Smrg    ) );
5619706f2543Smrg}
5620706f2543Smrg
5621706f2543Smrgvoid __glXDispSwap_VertexAttribs3svNV(GLbyte * pc)
5622706f2543Smrg{
5623706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5624706f2543Smrg
5625706f2543Smrg    CALL_VertexAttribs3svNV( GET_DISPATCH(), (
5626706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5627706f2543Smrg        n,
5628706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
5629706f2543Smrg    ) );
5630706f2543Smrg}
5631706f2543Smrg
5632706f2543Smrgvoid __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc)
5633706f2543Smrg{
5634706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5635706f2543Smrg
5636706f2543Smrg#ifdef __GLX_ALIGN64
5637706f2543Smrg    const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
5638706f2543Smrg    if ((unsigned long)(pc) & 7) {
5639706f2543Smrg        (void) memmove(pc-4, pc, cmdlen);
5640706f2543Smrg        pc -= 4;
5641706f2543Smrg    }
5642706f2543Smrg#endif
5643706f2543Smrg
5644706f2543Smrg    CALL_VertexAttribs4dvNV( GET_DISPATCH(), (
5645706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5646706f2543Smrg        n,
5647706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 0 )
5648706f2543Smrg    ) );
5649706f2543Smrg}
5650706f2543Smrg
5651706f2543Smrgvoid __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc)
5652706f2543Smrg{
5653706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5654706f2543Smrg
5655706f2543Smrg    CALL_VertexAttribs4fvNV( GET_DISPATCH(), (
5656706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5657706f2543Smrg        n,
5658706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
5659706f2543Smrg    ) );
5660706f2543Smrg}
5661706f2543Smrg
5662706f2543Smrgvoid __glXDispSwap_VertexAttribs4svNV(GLbyte * pc)
5663706f2543Smrg{
5664706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5665706f2543Smrg
5666706f2543Smrg    CALL_VertexAttribs4svNV( GET_DISPATCH(), (
5667706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5668706f2543Smrg        n,
5669706f2543Smrg         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
5670706f2543Smrg    ) );
5671706f2543Smrg}
5672706f2543Smrg
5673706f2543Smrgvoid __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc)
5674706f2543Smrg{
5675706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
5676706f2543Smrg
5677706f2543Smrg    CALL_VertexAttribs4ubvNV( GET_DISPATCH(), (
5678706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5679706f2543Smrg        n,
5680706f2543Smrg         (const GLubyte *)(pc +  8)
5681706f2543Smrg    ) );
5682706f2543Smrg}
5683706f2543Smrg
5684706f2543Smrgvoid __glXDispSwap_PointParameteriNV(GLbyte * pc)
5685706f2543Smrg{
5686706f2543Smrg    CALL_PointParameteriNV( GET_DISPATCH(), (
5687706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5688706f2543Smrg         (GLint   )bswap_CARD32 ( pc +  4 )
5689706f2543Smrg    ) );
5690706f2543Smrg}
5691706f2543Smrg
5692706f2543Smrgvoid __glXDispSwap_PointParameterivNV(GLbyte * pc)
5693706f2543Smrg{
5694706f2543Smrg    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
5695706f2543Smrg    const GLint * params;
5696706f2543Smrg
5697706f2543Smrg    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterivNV_size(pname) );
5698706f2543Smrg
5699706f2543Smrg    CALL_PointParameterivNV( GET_DISPATCH(), (
5700706f2543Smrg        pname,
5701706f2543Smrg        params
5702706f2543Smrg    ) );
5703706f2543Smrg}
5704706f2543Smrg
5705706f2543Smrgvoid __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc)
5706706f2543Smrg{
5707706f2543Smrg    CALL_ActiveStencilFaceEXT( GET_DISPATCH(), (
5708706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
5709706f2543Smrg    ) );
5710706f2543Smrg}
5711706f2543Smrg
5712706f2543Smrgint __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc)
5713706f2543Smrg{
5714706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5715706f2543Smrg    int error;
5716706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5717706f2543Smrg
5718706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5719706f2543Smrg    if ( cx != NULL ) {
5720706f2543Smrg        const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  4 );
5721706f2543Smrg
5722706f2543Smrg        GLdouble params[4];
5723706f2543Smrg        CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), (
5724706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
5725706f2543Smrg            len,
5726706f2543Smrg             (const GLubyte *)(pc +  8),
5727706f2543Smrg            params
5728706f2543Smrg        ) );
5729706f2543Smrg        (void) bswap_64_array( (uint64_t *) params, 4 );
5730706f2543Smrg        __glXSendReplySwap(cl->client, params, 4, 8, GL_TRUE, 0);
5731706f2543Smrg        error = Success;
5732706f2543Smrg    }
5733706f2543Smrg
5734706f2543Smrg    return error;
5735706f2543Smrg}
5736706f2543Smrg
5737706f2543Smrgint __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc)
5738706f2543Smrg{
5739706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5740706f2543Smrg    int error;
5741706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5742706f2543Smrg
5743706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5744706f2543Smrg    if ( cx != NULL ) {
5745706f2543Smrg        const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  4 );
5746706f2543Smrg
5747706f2543Smrg        GLfloat params[4];
5748706f2543Smrg        CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), (
5749706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 ),
5750706f2543Smrg            len,
5751706f2543Smrg             (const GLubyte *)(pc +  8),
5752706f2543Smrg            params
5753706f2543Smrg        ) );
5754706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, 4 );
5755706f2543Smrg        __glXSendReplySwap(cl->client, params, 4, 4, GL_TRUE, 0);
5756706f2543Smrg        error = Success;
5757706f2543Smrg    }
5758706f2543Smrg
5759706f2543Smrg    return error;
5760706f2543Smrg}
5761706f2543Smrg
5762706f2543Smrgvoid __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc)
5763706f2543Smrg{
5764706f2543Smrg    const GLsizei len =  (GLsizei )bswap_CARD32 ( pc + 36 );
5765706f2543Smrg
5766706f2543Smrg#ifdef __GLX_ALIGN64
5767706f2543Smrg    const GLuint cmdlen = 44 + __GLX_PAD(len) - 4;
5768706f2543Smrg    if ((unsigned long)(pc) & 7) {
5769706f2543Smrg        (void) memmove(pc-4, pc, cmdlen);
5770706f2543Smrg        pc -= 4;
5771706f2543Smrg    }
5772706f2543Smrg#endif
5773706f2543Smrg
5774706f2543Smrg    CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), (
5775706f2543Smrg         (GLuint  )bswap_CARD32 ( pc + 32 ),
5776706f2543Smrg        len,
5777706f2543Smrg         (const GLubyte *)(pc + 40),
5778706f2543Smrg         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
5779706f2543Smrg    ) );
5780706f2543Smrg}
5781706f2543Smrg
5782706f2543Smrgvoid __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc)
5783706f2543Smrg{
5784706f2543Smrg    const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  4 );
5785706f2543Smrg
5786706f2543Smrg    CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), (
5787706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  0 ),
5788706f2543Smrg        len,
5789706f2543Smrg         (const GLubyte *)(pc + 24),
5790706f2543Smrg         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 4 )
5791706f2543Smrg    ) );
5792706f2543Smrg}
5793706f2543Smrg
5794706f2543Smrgvoid __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc)
5795706f2543Smrg{
5796706f2543Smrg    CALL_BlendEquationSeparateEXT( GET_DISPATCH(), (
5797706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5798706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 )
5799706f2543Smrg    ) );
5800706f2543Smrg}
5801706f2543Smrg
5802706f2543Smrgvoid __glXDispSwap_BindFramebufferEXT(GLbyte * pc)
5803706f2543Smrg{
5804706f2543Smrg    CALL_BindFramebufferEXT( GET_DISPATCH(), (
5805706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5806706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 )
5807706f2543Smrg    ) );
5808706f2543Smrg}
5809706f2543Smrg
5810706f2543Smrgvoid __glXDispSwap_BindRenderbufferEXT(GLbyte * pc)
5811706f2543Smrg{
5812706f2543Smrg    CALL_BindRenderbufferEXT( GET_DISPATCH(), (
5813706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5814706f2543Smrg         (GLuint  )bswap_CARD32 ( pc +  4 )
5815706f2543Smrg    ) );
5816706f2543Smrg}
5817706f2543Smrg
5818706f2543Smrgint __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc)
5819706f2543Smrg{
5820706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5821706f2543Smrg    int error;
5822706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5823706f2543Smrg
5824706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5825706f2543Smrg    if ( cx != NULL ) {
5826706f2543Smrg        GLenum retval;
5827706f2543Smrg        retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), (
5828706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 )
5829706f2543Smrg        ) );
5830706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
5831706f2543Smrg        error = Success;
5832706f2543Smrg    }
5833706f2543Smrg
5834706f2543Smrg    return error;
5835706f2543Smrg}
5836706f2543Smrg
5837706f2543Smrgvoid __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc)
5838706f2543Smrg{
5839706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
5840706f2543Smrg
5841706f2543Smrg    CALL_DeleteFramebuffersEXT( GET_DISPATCH(), (
5842706f2543Smrg        n,
5843706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
5844706f2543Smrg    ) );
5845706f2543Smrg}
5846706f2543Smrg
5847706f2543Smrgvoid __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc)
5848706f2543Smrg{
5849706f2543Smrg    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
5850706f2543Smrg
5851706f2543Smrg    CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), (
5852706f2543Smrg        n,
5853706f2543Smrg         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
5854706f2543Smrg    ) );
5855706f2543Smrg}
5856706f2543Smrg
5857706f2543Smrgvoid __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc)
5858706f2543Smrg{
5859706f2543Smrg    CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), (
5860706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5861706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
5862706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
5863706f2543Smrg         (GLuint  )bswap_CARD32 ( pc + 12 )
5864706f2543Smrg    ) );
5865706f2543Smrg}
5866706f2543Smrg
5867706f2543Smrgvoid __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc)
5868706f2543Smrg{
5869706f2543Smrg    CALL_FramebufferTexture1DEXT( GET_DISPATCH(), (
5870706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5871706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
5872706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
5873706f2543Smrg         (GLuint  )bswap_CARD32 ( pc + 12 ),
5874706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 )
5875706f2543Smrg    ) );
5876706f2543Smrg}
5877706f2543Smrg
5878706f2543Smrgvoid __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc)
5879706f2543Smrg{
5880706f2543Smrg    CALL_FramebufferTexture2DEXT( GET_DISPATCH(), (
5881706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5882706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
5883706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
5884706f2543Smrg         (GLuint  )bswap_CARD32 ( pc + 12 ),
5885706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 )
5886706f2543Smrg    ) );
5887706f2543Smrg}
5888706f2543Smrg
5889706f2543Smrgvoid __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc)
5890706f2543Smrg{
5891706f2543Smrg    CALL_FramebufferTexture3DEXT( GET_DISPATCH(), (
5892706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
5893706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
5894706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  8 ),
5895706f2543Smrg         (GLuint  )bswap_CARD32 ( pc + 12 ),
5896706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 16 ),
5897706f2543Smrg         (GLint   )bswap_CARD32 ( pc + 20 )
5898706f2543Smrg    ) );
5899706f2543Smrg}
5900706f2543Smrg
5901706f2543Smrgint __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc)
5902706f2543Smrg{
5903706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5904706f2543Smrg    int error;
5905706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5906706f2543Smrg
5907706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5908706f2543Smrg    if ( cx != NULL ) {
5909706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
5910706f2543Smrg
5911706f2543Smrg        GLuint answerBuffer[200];
5912706f2543Smrg        GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
5913706f2543Smrg        CALL_GenFramebuffersEXT( GET_DISPATCH(), (
5914706f2543Smrg            n,
5915706f2543Smrg            framebuffers
5916706f2543Smrg        ) );
5917706f2543Smrg        (void) bswap_32_array( (uint32_t *) framebuffers, n );
5918706f2543Smrg        __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0);
5919706f2543Smrg        error = Success;
5920706f2543Smrg    }
5921706f2543Smrg
5922706f2543Smrg    return error;
5923706f2543Smrg}
5924706f2543Smrg
5925706f2543Smrgint __glXDispSwap_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc)
5926706f2543Smrg{
5927706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5928706f2543Smrg    int error;
5929706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5930706f2543Smrg
5931706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5932706f2543Smrg    if ( cx != NULL ) {
5933706f2543Smrg        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
5934706f2543Smrg
5935706f2543Smrg        GLuint answerBuffer[200];
5936706f2543Smrg        GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
5937706f2543Smrg        CALL_GenRenderbuffersEXT( GET_DISPATCH(), (
5938706f2543Smrg            n,
5939706f2543Smrg            renderbuffers
5940706f2543Smrg        ) );
5941706f2543Smrg        (void) bswap_32_array( (uint32_t *) renderbuffers, n );
5942706f2543Smrg        __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
5943706f2543Smrg        error = Success;
5944706f2543Smrg    }
5945706f2543Smrg
5946706f2543Smrg    return error;
5947706f2543Smrg}
5948706f2543Smrg
5949706f2543Smrgvoid __glXDispSwap_GenerateMipmapEXT(GLbyte * pc)
5950706f2543Smrg{
5951706f2543Smrg    CALL_GenerateMipmapEXT( GET_DISPATCH(), (
5952706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 )
5953706f2543Smrg    ) );
5954706f2543Smrg}
5955706f2543Smrg
5956706f2543Smrgint __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc)
5957706f2543Smrg{
5958706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5959706f2543Smrg    int error;
5960706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5961706f2543Smrg
5962706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5963706f2543Smrg    if ( cx != NULL ) {
5964706f2543Smrg        GLint params[1];
5965706f2543Smrg        CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), (
5966706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
5967706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  4 ),
5968706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  8 ),
5969706f2543Smrg            params
5970706f2543Smrg        ) );
5971706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, 1 );
5972706f2543Smrg        __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
5973706f2543Smrg        error = Success;
5974706f2543Smrg    }
5975706f2543Smrg
5976706f2543Smrg    return error;
5977706f2543Smrg}
5978706f2543Smrg
5979706f2543Smrgint __glXDispSwap_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc)
5980706f2543Smrg{
5981706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
5982706f2543Smrg    int error;
5983706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
5984706f2543Smrg
5985706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
5986706f2543Smrg    if ( cx != NULL ) {
5987706f2543Smrg        GLint params[1];
5988706f2543Smrg        CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), (
5989706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  0 ),
5990706f2543Smrg             (GLenum  )bswap_ENUM   ( pc +  4 ),
5991706f2543Smrg            params
5992706f2543Smrg        ) );
5993706f2543Smrg        (void) bswap_32_array( (uint32_t *) params, 1 );
5994706f2543Smrg        __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
5995706f2543Smrg        error = Success;
5996706f2543Smrg    }
5997706f2543Smrg
5998706f2543Smrg    return error;
5999706f2543Smrg}
6000706f2543Smrg
6001706f2543Smrgint __glXDispSwap_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc)
6002706f2543Smrg{
6003706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
6004706f2543Smrg    int error;
6005706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
6006706f2543Smrg
6007706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
6008706f2543Smrg    if ( cx != NULL ) {
6009706f2543Smrg        GLboolean retval;
6010706f2543Smrg        retval = CALL_IsFramebufferEXT( GET_DISPATCH(), (
6011706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 )
6012706f2543Smrg        ) );
6013706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
6014706f2543Smrg        error = Success;
6015706f2543Smrg    }
6016706f2543Smrg
6017706f2543Smrg    return error;
6018706f2543Smrg}
6019706f2543Smrg
6020706f2543Smrgint __glXDispSwap_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc)
6021706f2543Smrg{
6022706f2543Smrg    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
6023706f2543Smrg    int error;
6024706f2543Smrg    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
6025706f2543Smrg
6026706f2543Smrg    pc += __GLX_VENDPRIV_HDR_SIZE;
6027706f2543Smrg    if ( cx != NULL ) {
6028706f2543Smrg        GLboolean retval;
6029706f2543Smrg        retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), (
6030706f2543Smrg             (GLuint  )bswap_CARD32 ( pc +  0 )
6031706f2543Smrg        ) );
6032706f2543Smrg        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
6033706f2543Smrg        error = Success;
6034706f2543Smrg    }
6035706f2543Smrg
6036706f2543Smrg    return error;
6037706f2543Smrg}
6038706f2543Smrg
6039706f2543Smrgvoid __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc)
6040706f2543Smrg{
6041706f2543Smrg    CALL_RenderbufferStorageEXT( GET_DISPATCH(), (
6042706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  0 ),
6043706f2543Smrg         (GLenum  )bswap_ENUM   ( pc +  4 ),
6044706f2543Smrg         (GLsizei )bswap_CARD32 ( pc +  8 ),
6045706f2543Smrg         (GLsizei )bswap_CARD32 ( pc + 12 )
6046706f2543Smrg    ) );
6047706f2543Smrg}
6048706f2543Smrg
6049