45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef __GLX_unpack_h__
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_unpack_h__
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync** License Applicability. Except to the extent portions of this file are
45e9809aff7304721fddb95654901b32195c9c7avboxsync** made subject to an alternative license as permitted in the SGI Free
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Software License B, Version 1.1 (the "License"), the contents of this
45e9809aff7304721fddb95654901b32195c9c7avboxsync** file are subject only to the provisions of the License. You may not use
45e9809aff7304721fddb95654901b32195c9c7avboxsync** this file except in compliance with the License. You may obtain a copy
45e9809aff7304721fddb95654901b32195c9c7avboxsync** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
45e9809aff7304721fddb95654901b32195c9c7avboxsync**
45e9809aff7304721fddb95654901b32195c9c7avboxsync** http://oss.sgi.com/projects/FreeB
45e9809aff7304721fddb95654901b32195c9c7avboxsync**
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Note that, as provided in the License, the Software is distributed on an
45e9809aff7304721fddb95654901b32195c9c7avboxsync** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
45e9809aff7304721fddb95654901b32195c9c7avboxsync** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
45e9809aff7304721fddb95654901b32195c9c7avboxsync** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
45e9809aff7304721fddb95654901b32195c9c7avboxsync** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
45e9809aff7304721fddb95654901b32195c9c7avboxsync**
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Original Code. The Original Code is: OpenGL Sample Implementation,
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Copyright in any portions created by third parties is as indicated
45e9809aff7304721fddb95654901b32195c9c7avboxsync** elsewhere herein. All Rights Reserved.
45e9809aff7304721fddb95654901b32195c9c7avboxsync**
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Additional Notice Provisions: The application programming interfaces
45e9809aff7304721fddb95654901b32195c9c7avboxsync** established by SGI in conjunction with the Original Code are The
45e9809aff7304721fddb95654901b32195c9c7avboxsync** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
45e9809aff7304721fddb95654901b32195c9c7avboxsync** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
45e9809aff7304721fddb95654901b32195c9c7avboxsync** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Window System(R) (Version 1.3), released October 19, 1998. This software
45e9809aff7304721fddb95654901b32195c9c7avboxsync** was created using the OpenGL(R) version 1.2.1 Sample Implementation
45e9809aff7304721fddb95654901b32195c9c7avboxsync** published by SGI, but has not been independently verified as being
45e9809aff7304721fddb95654901b32195c9c7avboxsync** compliant with the OpenGL(R) version 1.2.1 Specification.
45e9809aff7304721fddb95654901b32195c9c7avboxsync**
45e9809aff7304721fddb95654901b32195c9c7avboxsync*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_PAD(s) (((s)+3) & (GLuint)~3)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Fetch the context-id out of a SingleReq request pointed to by pc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Fetch a double from potentially unaligned memory.
45e9809aff7304721fddb95654901b32195c9c7avboxsync*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef __GLX_ALIGN64
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_MEM_COPY(dst,src,n) memcpy(dst,src,n)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src))
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void __glXMemInit(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern xGLXSingleReply __glXReply;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_BEGIN_REPLY(size) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXReply.length = __GLX_PAD(size) >> 2; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXReply.type = X_Reply; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXReply.sequenceNumber = client->sequence;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_HEADER() \
45e9809aff7304721fddb95654901b32195c9c7avboxsync WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_PUT_RETVAL(a) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXReply.retval = (a);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_PUT_SIZE(a) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXReply.size = (a);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_PUT_RENDERMODE(m) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXReply.pad3 = (m)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Get a buffer to hold returned data, with the given alignment. If we have
45e9809aff7304721fddb95654901b32195c9c7avboxsync** to realloc, allocate size+align, in case the pointer has to be bumped for
45e9809aff7304721fddb95654901b32195c9c7avboxsync** alignment. The answerBuffer should already be aligned.
45e9809aff7304721fddb95654901b32195c9c7avboxsync**
45e9809aff7304721fddb95654901b32195c9c7avboxsync** NOTE: the cast (long)res below assumes a long is large enough to hold a
45e9809aff7304721fddb95654901b32195c9c7avboxsync** pointer.
45e9809aff7304721fddb95654901b32195c9c7avboxsync*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync if ((size) > sizeof(answerBuffer)) { \
45e9809aff7304721fddb95654901b32195c9c7avboxsync int bump; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync if ((cl)->returnBufSize < (size)+(align)) { \
45e9809aff7304721fddb95654901b32195c9c7avboxsync (cl)->returnBuf = (GLbyte*)Xrealloc((cl)->returnBuf, \
45e9809aff7304721fddb95654901b32195c9c7avboxsync (size)+(align)); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync if (!(cl)->returnBuf) { \
45e9809aff7304721fddb95654901b32195c9c7avboxsync return BadAlloc; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync } \
45e9809aff7304721fddb95654901b32195c9c7avboxsync (cl)->returnBufSize = (size)+(align); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync } \
45e9809aff7304721fddb95654901b32195c9c7avboxsync res = (char*)cl->returnBuf; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync bump = (long)(res) % (align); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync if (bump) res += (align) - (bump); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync } else { \
45e9809aff7304721fddb95654901b32195c9c7avboxsync res = (char *)answerBuffer; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync }
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_PUT_BYTE() \
45e9809aff7304721fddb95654901b32195c9c7avboxsync *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_PUT_SHORT() \
45e9809aff7304721fddb95654901b32195c9c7avboxsync *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_PUT_INT() \
45e9809aff7304721fddb95654901b32195c9c7avboxsync *(GLint *)&__glXReply.pad3 = *(GLint *)answer
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_PUT_FLOAT() \
45e9809aff7304721fddb95654901b32195c9c7avboxsync *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_PUT_DOUBLE() \
45e9809aff7304721fddb95654901b32195c9c7avboxsync *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_BYTE_ARRAY(len) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_SHORT_ARRAY(len) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_INT_ARRAY(len) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_FLOAT_ARRAY(len) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_DOUBLE_ARRAY(len) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync** PERFORMANCE NOTE:
45e9809aff7304721fddb95654901b32195c9c7avboxsync** Machine dependent optimizations abound here; these swapping macros can
45e9809aff7304721fddb95654901b32195c9c7avboxsync** conceivably be replaced with routines that do the job faster.
45e9809aff7304721fddb95654901b32195c9c7avboxsync*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_DECLARE_SWAP_VARIABLES \
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLbyte sw; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLbyte *swapPC; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLbyte *swapEnd
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_INT(pc) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync sw = ((GLbyte *)(pc))[0]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[3] = sw; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync sw = ((GLbyte *)(pc))[1]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[2] = sw;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_SHORT(pc) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync sw = ((GLbyte *)(pc))[0]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[1] = sw;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_DOUBLE(pc) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync sw = ((GLbyte *)(pc))[0]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[7] = sw; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync sw = ((GLbyte *)(pc))[1]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[6] = sw; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync sw = ((GLbyte *)(pc))[2]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[5] = sw; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync sw = ((GLbyte *)(pc))[3]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[4] = sw;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_FLOAT(pc) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync sw = ((GLbyte *)(pc))[0]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[3] = sw; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync sw = ((GLbyte *)(pc))[1]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((GLbyte *)(pc))[2] = sw;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_INT_ARRAY(pc, count) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapPC = ((GLbyte *)(pc)); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\
45e9809aff7304721fddb95654901b32195c9c7avboxsync while (swapPC < swapEnd) { \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLX_SWAP_INT(swapPC); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapPC += __GLX_SIZE_INT32; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync }
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_SHORT_ARRAY(pc, count) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapPC = ((GLbyte *)(pc)); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\
45e9809aff7304721fddb95654901b32195c9c7avboxsync while (swapPC < swapEnd) { \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLX_SWAP_SHORT(swapPC); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapPC += __GLX_SIZE_INT16; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync }
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapPC = ((GLbyte *)(pc)); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\
45e9809aff7304721fddb95654901b32195c9c7avboxsync while (swapPC < swapEnd) { \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLX_SWAP_DOUBLE(swapPC); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapPC += __GLX_SIZE_FLOAT64; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync }
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapPC = ((GLbyte *)(pc)); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\
45e9809aff7304721fddb95654901b32195c9c7avboxsync while (swapPC < swapEnd) { \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLX_SWAP_FLOAT(swapPC); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync swapPC += __GLX_SIZE_FLOAT32; \
45e9809aff7304721fddb95654901b32195c9c7avboxsync }
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_REPLY_HEADER() \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLX_SWAP_INT(&__glXReply.length);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_REPLY_RETVAL() \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLX_SWAP_INT(&__glXReply.retval)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define __GLX_SWAP_REPLY_SIZE() \
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLX_SWAP_INT(&__glXReply.size)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* !__GLX_unpack_h__ */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync