mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
glx: Inline some reply swapping code
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -825,109 +825,6 @@ __glXDispSwap_GetDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
** Swap replies.
|
||||
*/
|
||||
|
||||
void
|
||||
__glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReply * reply)
|
||||
{
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
||||
__GLX_SWAP_INT(&reply->length);
|
||||
__GLX_SWAP_INT(&reply->contextTag);
|
||||
WriteToClient(client, sz_xGLXMakeCurrentReply, reply);
|
||||
}
|
||||
|
||||
void
|
||||
__glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply)
|
||||
{
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
||||
__GLX_SWAP_INT(&reply->length);
|
||||
WriteToClient(client, sz_xGLXIsDirectReply, reply);
|
||||
}
|
||||
|
||||
void
|
||||
__glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply * reply)
|
||||
{
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
||||
__GLX_SWAP_INT(&reply->length);
|
||||
__GLX_SWAP_INT(&reply->majorVersion);
|
||||
__GLX_SWAP_INT(&reply->minorVersion);
|
||||
WriteToClient(client, sz_xGLXQueryVersionReply, reply);
|
||||
}
|
||||
|
||||
void
|
||||
glxSwapQueryExtensionsStringReply(ClientPtr client,
|
||||
xGLXQueryExtensionsStringReply * reply,
|
||||
char *buf)
|
||||
{
|
||||
int length = reply->length;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
||||
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
||||
__GLX_SWAP_INT(&reply->length);
|
||||
__GLX_SWAP_INT(&reply->n);
|
||||
WriteToClient(client, sz_xGLXQueryExtensionsStringReply, reply);
|
||||
__GLX_SWAP_INT_ARRAY((int *) buf, length);
|
||||
WriteToClient(client, length << 2, buf);
|
||||
}
|
||||
|
||||
void
|
||||
glxSwapQueryServerStringReply(ClientPtr client,
|
||||
xGLXQueryServerStringReply * reply, char *buf)
|
||||
{
|
||||
int length = reply->length;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
||||
__GLX_SWAP_INT(&reply->length);
|
||||
__GLX_SWAP_INT(&reply->n);
|
||||
WriteToClient(client, sz_xGLXQueryServerStringReply, reply);
|
||||
/** no swap is needed for an array of chars **/
|
||||
/* __GLX_SWAP_INT_ARRAY((int *)buf, length); */
|
||||
WriteToClient(client, length << 2, buf);
|
||||
}
|
||||
|
||||
void
|
||||
__glXSwapQueryContextInfoEXTReply(ClientPtr client,
|
||||
xGLXQueryContextInfoEXTReply * reply,
|
||||
int *buf)
|
||||
{
|
||||
int length = reply->length;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
||||
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
||||
__GLX_SWAP_INT(&reply->length);
|
||||
__GLX_SWAP_INT(&reply->n);
|
||||
WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, reply);
|
||||
__GLX_SWAP_INT_ARRAY((int *) buf, length);
|
||||
WriteToClient(client, length << 2, buf);
|
||||
}
|
||||
|
||||
void
|
||||
__glXSwapGetDrawableAttributesReply(ClientPtr client,
|
||||
xGLXGetDrawableAttributesReply * reply,
|
||||
CARD32 *buf)
|
||||
{
|
||||
int length = reply->length;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
||||
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
||||
__GLX_SWAP_INT(&reply->length);
|
||||
__GLX_SWAP_INT(&reply->numAttribs);
|
||||
WriteToClient(client, sz_xGLXGetDrawableAttributesReply, reply);
|
||||
__GLX_SWAP_INT_ARRAY((int *) buf, length);
|
||||
WriteToClient(client, length << 2, buf);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
** Render and Renderlarge are not in the GLX API. They are used by the GLX
|
||||
** client library to send batches of GL rendering commands.
|
||||
|
||||
Reference in New Issue
Block a user