GLX: Purge some glxint.h usage in glxcmds.c
This is related tod0b249f1c5
in the 1.4 branch and was ok'd by krh (cherry picked from commite587436cf2
)
This commit is contained in:
parent
f2151f1b0d
commit
da2aaee24a
|
@ -877,6 +877,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)
|
||||
{
|
||||
|
@ -885,7 +893,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;
|
||||
|
@ -894,8 +902,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;
|
||||
|
||||
|
@ -933,6 +941,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.
|
||||
*/
|
||||
|
@ -957,11 +967,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…
Reference in New Issue
Block a user