summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-05-29 14:27:46 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-05-29 14:48:24 -0700
commitda2aaee24a77e1a9e5c623af4a78ca6acc94b787 (patch)
tree090b3246f6838eb80cf51c27a6c8e3d434eb7177 /glx
parentf2151f1b0dcbfec23488a29a7ea887fbfd53b760 (diff)
GLX: Purge some glxint.h usage in glxcmds.c
This is related to d0b249f1c5df81f3941d638f9625fe1e16c31807 in the 1.4 branch and was ok'd by krh (cherry picked from commit e587436cf2e1237813c924699ff0662aea3034e1)
Diffstat (limited to 'glx')
-rw-r--r--glx/glxcmds.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 1ae31515d..66b1ec7b0 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -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;
}