(submit/glx-cleanups-vla) glx: DoQueryContext(): use core's swapping macros

No need to have duplicated byte swapping macros in GLX for things that
the core alreay provides. Using core's macros is actually even easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-08-28 14:22:31 +02:00
parent e78ea2e50e
commit b54ebcdc75

View File

@ -1686,12 +1686,10 @@ DoQueryContext(__GLXclientState * cl, GLXContextID gcId)
sendBuf[9] = (int) (ctx->renderType);
if (client->swapped) {
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
__GLX_SWAP_SHORT(&reply.sequenceNumber);
__GLX_SWAP_INT(&reply.length);
__GLX_SWAP_INT(&reply.n);
__GLX_SWAP_INT_ARRAY(sendBuf, sizeof(sendBuf) / sizeof(CARD32));
swaps(&reply.sequenceNumber);
swapl(&reply.length);
swapl(&reply.n);
SwapLongs(sendBuf, sizeof(sendBuf) / 4);
}
WriteToClient(client, sizeof(xGLXQueryContextInfoEXTReply), &reply);