mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-26 12:00:25 +01:00
GLX: Purge some glxint.h usage in glxcmds.c
This is related tod0b249f1c5in the 1.4 branch and was ok'd by krh (cherry picked from commite587436cf2)
This commit is contained in:
parent
ab66b27fa9
commit
b5e871e44c
1 changed files with 16 additions and 6 deletions
|
|
@ -855,6 +855,14 @@ int __glXDisp_CopyContext(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
enum {
|
||||
GLX_VIS_CONFIG_UNPAIRED = 18,
|
||||
GLX_VIS_CONFIG_PAIRED = 20
|
||||
};
|
||||
|
||||
enum {
|
||||
GLX_VIS_CONFIG_TOTAL = GLX_VIS_CONFIG_UNPAIRED + GLX_VIS_CONFIG_PAIRED
|
||||
};
|
||||
|
||||
int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
|
|
@ -863,7 +871,7 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
|
|||
xGLXGetVisualConfigsReply reply;
|
||||
__GLXscreen *pGlxScreen;
|
||||
__GLXconfig *modes;
|
||||
CARD32 buf[__GLX_TOTAL_CONFIG];
|
||||
CARD32 buf[GLX_VIS_CONFIG_TOTAL];
|
||||
int p, i, err;
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
||||
|
|
@ -872,8 +880,8 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
|
|||
return err;
|
||||
|
||||
reply.numVisuals = pGlxScreen->numVisuals;
|
||||
reply.numProps = __GLX_TOTAL_CONFIG;
|
||||
reply.length = (reply.numVisuals * __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG) >> 2;
|
||||
reply.numProps = GLX_VIS_CONFIG_TOTAL;
|
||||
reply.length = (reply.numVisuals * __GLX_SIZE_CARD32 * GLX_VIS_CONFIG_TOTAL) >> 2;
|
||||
reply.type = X_Reply;
|
||||
reply.sequenceNumber = client->sequence;
|
||||
|
||||
|
|
@ -911,6 +919,8 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
|
|||
buf[p++] = modes->stencilBits;
|
||||
buf[p++] = modes->numAuxBuffers;
|
||||
buf[p++] = modes->level;
|
||||
|
||||
assert(p == GLX_VIS_CONFIG_UNPAIRED);
|
||||
/*
|
||||
** Add token/value pairs for extensions.
|
||||
*/
|
||||
|
|
@ -935,11 +945,11 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
|
|||
buf[p++] = 0; /* copy over visualSelectGroup (GLX_VISUAL_SELECT_GROUP_SGIX)? */
|
||||
buf[p++] = 0;
|
||||
|
||||
assert(p == GLX_VIS_CONFIG_TOTAL);
|
||||
if (client->swapped) {
|
||||
__GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG);
|
||||
__GLX_SWAP_INT_ARRAY(buf, p);
|
||||
}
|
||||
WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG,
|
||||
(char *)buf);
|
||||
WriteToClient(client, __GLX_SIZE_CARD32 * p, (char *)buf);
|
||||
}
|
||||
return Success;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue