aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxcmds.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-13 12:16:00 +0200
committermarha <marha@users.sourceforge.net>2012-07-13 12:16:00 +0200
commitdcf9ae77854778629cabd0d6943dda3678eb91fa (patch)
tree087d3bb4beb55bcc0c5857b41d2b5b10edd0e2f3 /xorg-server/glx/glxcmds.c
parent2c8d7aa6bda138693fa1827852ba6b75d1721ff8 (diff)
parentf0a7d1d88be0c31bd471f4428c4493a93f2d9321 (diff)
downloadvcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.tar.gz
vcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.tar.bz2
vcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/glx/glxext.c xorg-server/hw/xwin/InitOutput.c
Diffstat (limited to 'xorg-server/glx/glxcmds.c')
-rw-r--r--xorg-server/glx/glxcmds.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c
index 36be33404..684533127 100644
--- a/xorg-server/glx/glxcmds.c
+++ b/xorg-server/glx/glxcmds.c
@@ -667,17 +667,17 @@ DoMakeCurrent(__GLXclientState * cl,
StopUsingContext(prevglxc);
+
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.length = 0;
+ reply.contextTag = 0;
+
+
if (glxc) {
StartUsingContext(cl, glxc);
reply.contextTag = glxc->id;
}
- else {
- reply.contextTag = 0;
- }
-
- reply.length = 0;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
if (client->swapped) {
__glXSwapMakeCurrentReply(client, &reply);
@@ -738,11 +738,13 @@ __glXDisp_IsDirect(__GLXclientState * cl, GLbyte * pc)
if (!validGlxContext(cl->client, req->context, DixReadAccess, &glxc, &err))
return err;
+
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
reply.length = 0;
reply.isDirect = glxc->isDirect;
+
if (client->swapped) {
__glXSwapIsDirectReply(client, &reply);
}
@@ -773,12 +775,14 @@ __glXDisp_QueryVersion(__GLXclientState * cl, GLbyte * pc)
** client if it wants to work with older clients; however, in this
** implementation the server just returns its version number.
*/
+
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
reply.length = 0;
reply.majorVersion = glxMajorVersion;
reply.minorVersion = glxMinorVersion;
+
if (client->swapped) {
__glXSwapQueryVersionReply(client, &reply);
}
@@ -951,6 +955,7 @@ __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err))
return err;
+
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
reply.length = (pGlxScreen->numVisuals *
@@ -958,6 +963,7 @@ __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
reply.numVisuals = pGlxScreen->numVisuals;
reply.numProps = GLX_VIS_CONFIG_TOTAL;
+
if (client->swapped) {
__GLX_SWAP_SHORT(&reply.sequenceNumber);
__GLX_SWAP_INT(&reply.length);
@@ -1055,12 +1061,14 @@ DoGetFBConfigs(__GLXclientState * cl, unsigned screen)
if (!validGlxScreen(cl->client, screen, &pGlxScreen, &err))
return err;
+
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
- reply.length = (__GLX_FBCONFIG_ATTRIBS_LENGTH * pGlxScreen->numFBConfigs);
+ reply.length = __GLX_FBCONFIG_ATTRIBS_LENGTH * pGlxScreen->numFBConfigs;
reply.numFBConfigs = pGlxScreen->numFBConfigs;
reply.numAttribs = __GLX_TOTAL_FBCONFIG_ATTRIBS;
+
if (client->swapped) {
__GLX_SWAP_SHORT(&reply.sequenceNumber);
__GLX_SWAP_INT(&reply.length);
@@ -1679,11 +1687,13 @@ DoQueryContext(__GLXclientState * cl, GLXContextID gcId)
return err;
nProps = 3;
+
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
reply.length = nProps << 1;
reply.n = nProps;
+
nReplyBytes = reply.length << 2;
sendBuf = (int *) malloc((size_t) nReplyBytes);
if (sendBuf == NULL) {
@@ -1886,11 +1896,13 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
return error;
numAttribs = 3;
+
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
reply.length = numAttribs << 1;
reply.numAttribs = numAttribs;
+
attributes[0] = GLX_TEXTURE_TARGET_EXT;
attributes[1] = pGlxDraw->target == GL_TEXTURE_2D ? GLX_TEXTURE_2D_EXT :
GLX_TEXTURE_RECTANGLE_EXT;
@@ -2325,11 +2337,13 @@ __glXDisp_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
n = strlen(pGlxScreen->GLXextensions) + 1;
length = __GLX_PAD(n) >> 2;
+
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
reply.length = length;
reply.n = n;
+
/* Allocate buffer to make sure it's a multiple of 4 bytes big. */
buf = calloc(length, 4);
if (buf == NULL)
@@ -2386,11 +2400,13 @@ __glXDisp_QueryServerString(__GLXclientState * cl, GLbyte * pc)
n = strlen(ptr) + 1;
length = __GLX_PAD(n) >> 2;
+
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
reply.length = length;
reply.n = n;
+
buf = calloc(length, 4);
if (buf == NULL) {
return BadAlloc;