Ejemplo n.º 1
0
static void
SendSwappedReply(ClientPtr client,
                 xGLXVendorPrivReply * reply, char *buf, int buf_size)
{
    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_SWAP_SHORT(&reply->sequenceNumber);
    __GLX_SWAP_INT(&reply->length);
    __GLX_SWAP_INT(&reply->retval);
    __GLX_SWAP_INT(&reply->size);

    if ((buf_size == 0) && (swap_vec_element_size > 0)) {
        /*
         * the reply has single component - need to swap pad3
         */
        if (swap_vec_element_size == 2) {
            __GLX_SWAP_SHORT(&reply->pad3);
        }
        else if (swap_vec_element_size == 4) {
            __GLX_SWAP_INT(&reply->pad3);
            __GLX_SWAP_INT(&reply->pad4);
        }
        else if (swap_vec_element_size == 8) {
            __GLX_SWAP_DOUBLE(&reply->pad3);
        }
    }
    else if ((buf_size > 0) && (swap_vec_element_size > 0)) {
        /*
         * the reply has vector of elements which needs to be swapped
         */
        int vsize = buf_size / swap_vec_element_size;
        char *p = buf;
        int i;

        for (i = 0; i < vsize; i++) {
            if (swap_vec_element_size == 2) {
                __GLX_SWAP_SHORT(p);
            }
            else if (swap_vec_element_size == 4) {
                __GLX_SWAP_INT(p);
            }
            else if (swap_vec_element_size == 8) {
                __GLX_SWAP_DOUBLE(p);
            }

            p += swap_vec_element_size;
        }

        __GLX_SWAP_INT(&reply->pad3);
        __GLX_SWAP_INT(&reply->pad4);
        __GLX_SWAP_INT(&reply->pad5);
        __GLX_SWAP_INT(&reply->pad6);

    }

    WriteToClient(client, sizeof(xGLXVendorPrivReply), reply);
    if (buf_size > 0)
        WriteToClient(client, buf_size, buf);

}
Ejemplo n.º 2
0
int __glXDispSwap_VendorPrivate(__GLXclientState *cl, GLbyte *pc)
{
    xGLXVendorPrivateReq *req;
    GLint vendorcode;
    __GLXdispatchVendorPrivProcPtr proc;

    __GLX_DECLARE_SWAP_VARIABLES;

    req = (xGLXVendorPrivateReq *) pc;
    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->vendorCode);

    vendorcode = req->vendorCode;

    proc = (__GLXdispatchVendorPrivProcPtr)
      __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info,
				     vendorcode, 1);
    if (proc != NULL) {
	(*proc)(cl, (GLbyte*)req);
	return Success;
    }

    cl->client->errorValue = req->vendorCode;
    return __glXError(GLXUnsupportedPrivateRequest);
}
Ejemplo n.º 3
0
void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply *reply)
{
    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_SWAP_SHORT(&reply->sequenceNumber);
    __GLX_SWAP_INT(&reply->length);
    WriteToClient(client, sz_xGLXIsDirectReply, (char *)reply);
}
Ejemplo n.º 4
0
int
__glXVForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc)
{
    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;

    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->vendorCode);
    __GLX_SWAP_INT(&req->contextTag);

    swap_vec_element_size = 8;

    /*
     * swap extra data in request - assuming all data
     * (if available) are arrays of 4 bytes components !
     */
    if (req->length > sz_xGLXVendorPrivateReq / 4) {
        int *data = (int *) (req + 1);
        int count = req->length - sz_xGLXVendorPrivateReq / 4;

        __GLX_SWAP_INT_ARRAY(data, count);
    }

    return (__glXVForwardAllWithReply(cl, pc));
}
Ejemplo n.º 5
0
static void
swapArray(GLint numVals, GLenum datatype,
          GLint stride, GLint numVertexes, GLbyte * pc)
{
    int i, j;

    __GLX_DECLARE_SWAP_VARIABLES;

    switch (datatype) {
    case GL_BYTE:
    case GL_UNSIGNED_BYTE:
        /* don't need to swap */
        return;
    case GL_SHORT:
    case GL_UNSIGNED_SHORT:
        for (i = 0; i < numVertexes; i++) {
            GLshort *pVal = (GLshort *) pc;

            for (j = 0; j < numVals; j++) {
                __GLX_SWAP_SHORT(&pVal[j]);
            }
            pc += stride;
        }
        break;
    case GL_INT:
    case GL_UNSIGNED_INT:
        for (i = 0; i < numVertexes; i++) {
            GLint *pVal = (GLint *) pc;

            for (j = 0; j < numVals; j++) {
                __GLX_SWAP_INT(&pVal[j]);
            }
            pc += stride;
        }
        break;
    case GL_FLOAT:
        for (i = 0; i < numVertexes; i++) {
            GLfloat *pVal = (GLfloat *) pc;

            for (j = 0; j < numVals; j++) {
                __GLX_SWAP_FLOAT(&pVal[j]);
            }
            pc += stride;
        }
        break;
    case GL_DOUBLE:
        for (i = 0; i < numVertexes; i++) {
            GLdouble *pVal = (GLdouble *) pc;

            for (j = 0; j < numVals; j++) {
                __GLX_SWAP_DOUBLE(&pVal[j]);
            }
            pc += stride;
        }
        break;
    default:
        return;
    }
}
Ejemplo n.º 6
0
static int
ephyrGLXMakeCurrentReal(__GLXclientState * a_cl, GLXDrawable write,
                        GLXDrawable read, GLXContextTag ctx,
                        GLXContextTag old_ctx, Bool a_do_swap)
{
    int res = BadImplementation;
    xGLXMakeCurrentReply reply;
    DrawablePtr drawableR = NULL, drawableW = NULL;
    GLXContextTag new_ctx = 0;

    EPHYR_LOG("enter\n");
    res = dixLookupDrawable(&drawableW, write, a_cl->client, 0, DixReadAccess);
    EPHYR_RETURN_VAL_IF_FAIL(drawableW, BadValue);
    EPHYR_RETURN_VAL_IF_FAIL(drawableW->pScreen, BadValue);
    EPHYR_LOG("screen nummber requested:%d\n", drawableW->pScreen->myNum);

    if (read != write) {
        res = dixLookupDrawable(&drawableR, read, a_cl->client, 0,
                                DixReadAccess);
        EPHYR_RETURN_VAL_IF_FAIL(drawableR, BadValue);
        EPHYR_RETURN_VAL_IF_FAIL(drawableR->pScreen, BadValue);
    }
    else {
        drawableR = drawableW;
    }

    if (!ephyrHostGLXMakeCurrent(hostx_get_window(drawableW->pScreen->myNum),
                                 hostx_get_window(drawableR->pScreen->myNum),
                                 ctx, old_ctx, (int *) &new_ctx)) {
        EPHYR_LOG_ERROR("ephyrHostGLXMakeCurrent() failed\n");
        goto out;
    }
    reply = (xGLXMakeCurrentReply) {
        .type = X_Reply,
        .sequenceNumber = a_cl->client->sequence,
        .length = 0,
        .contextTag = new_ctx
    };
    if (a_do_swap) {
        __GLX_DECLARE_SWAP_VARIABLES;
        __GLX_SWAP_SHORT(&reply.sequenceNumber);
        __GLX_SWAP_INT(&reply.length);
        __GLX_SWAP_INT(&reply.contextTag);
    }
    WriteToClient(a_cl->client, sz_xGLXMakeCurrentReply, &reply);

    res = Success;
 out:
    EPHYR_LOG("leave\n");
    return res;
}

int
ephyrGLXMakeCurrent(__GLXclientState * a_cl, GLbyte * a_pc)
{
    xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) a_pc;
    return ephyrGLXMakeCurrentReal(a_cl, req->drawable, req->drawable,
                                   req->context, req->oldContextTag, FALSE);
}
Ejemplo n.º 7
0
void __glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReply *reply)
{
    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_SWAP_SHORT(&reply->sequenceNumber);
    __GLX_SWAP_INT(&reply->length);
    __GLX_SWAP_INT(&reply->contextTag);
    WriteToClient(client, sz_xGLXMakeCurrentReply, (char *)reply);
}
Ejemplo n.º 8
0
void __glXDispSwap_LineStipple(GLbyte *pc)
{
	__GLX_DECLARE_SWAP_VARIABLES;

	__GLX_SWAP_INT(pc + 0);
	__GLX_SWAP_SHORT(pc + 4);

}
Ejemplo n.º 9
0
void __glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply *reply)
{
    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_SWAP_SHORT(&reply->sequenceNumber);
    __GLX_SWAP_INT(&reply->length);
    __GLX_SWAP_INT(&reply->majorVersion);
    __GLX_SWAP_INT(&reply->minorVersion);
    WriteToClient(client, sz_xGLXQueryVersionReply, (char *)reply);
}
Ejemplo n.º 10
0
static int
ephyrGLXGetFBConfigsSGIXReal (__GLXclientState *a_cl,
                              GLbyte *a_pc,
                              Bool a_do_swap)
{
    xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *)a_pc;
    ClientPtr client = a_cl->client;
    xGLXGetVisualConfigsReply reply;
    int32_t *props_buf=NULL, num_visuals=0,
            num_props=0, res=BadImplementation, i=0,
            props_per_visual_size=0,
            props_buf_size=0;
    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;

    EPHYR_LOG ("enter\n") ;

    if (!ephyrHostGLXVendorPrivGetFBConfigsSGIX (req->screen,
                                                 &num_visuals,
                                                 &num_props,
                                                 &props_buf_size,
                                                 &props_buf)) {
        EPHYR_LOG_ERROR ("ephyrHostGLXGetVisualConfigs() failed\n") ;
        goto out ;
    }
    EPHYR_LOG ("num_visuals:%d, num_props:%d\n", num_visuals, num_props) ;

    reply.numVisuals = num_visuals;
    reply.numProps = num_props;
    reply.length = props_buf_size >> 2;
    reply.type = X_Reply;
    reply.sequenceNumber = client->sequence;

    if (a_do_swap) {
        __GLX_SWAP_SHORT(&reply.sequenceNumber);
        __GLX_SWAP_INT(&reply.length);
        __GLX_SWAP_INT(&reply.numVisuals);
        __GLX_SWAP_INT(&reply.numProps);
        __GLX_SWAP_INT_ARRAY (props_buf, num_props) ;
    }
    WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char*)&reply);
    props_per_visual_size = props_buf_size/num_visuals ;
    for (i=0; i < num_visuals; i++) {
        WriteToClient (client,
                       props_per_visual_size,
                       &((char*)props_buf)[i*props_per_visual_size]);
    }
    res = Success ;

out:
    EPHYR_LOG ("leave\n") ;
    free(props_buf) ;
    props_buf = NULL ;

    return res ;
}
Ejemplo n.º 11
0
int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
{
    xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->context);

    return __glXQueryContextInfoEXT(cl, pc);
}
Ejemplo n.º 12
0
int __glXDispSwap_DestroyContext(__GLXclientState *cl, GLbyte *pc)
{
    xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->context);

    return __glXDisp_DestroyContext(cl, pc);
}
Ejemplo n.º 13
0
int __glXSwapIsDirect(__GLXclientState *cl, GLbyte *pc)
{
    xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->context);

    return __glXIsDirect(cl, pc);
}
Ejemplo n.º 14
0
int __glXSwapQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
{
    xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *)pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->screen);

    return __glXQueryExtensionsString(cl, pc);
}
Ejemplo n.º 15
0
int __glXSwapWaitX(__GLXclientState *cl, GLbyte *pc)
{
    xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->contextTag);

    return __glXWaitX(cl, pc);
}
Ejemplo n.º 16
0
int __glXSwapDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
{
    xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->glxpixmap);

    return __glXDestroyGLXPixmap(cl, pc);
}
Ejemplo n.º 17
0
int __glXSwapSwapBuffers(__GLXclientState *cl, GLbyte *pc)
{
    xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->contextTag);
    __GLX_SWAP_INT(&req->drawable);

    return __glXSwapBuffers(cl, pc);
}
Ejemplo n.º 18
0
int __glXDispSwap_QueryServerString(__GLXclientState *cl, GLbyte *pc)
{
    xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *)pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->screen);
    __GLX_SWAP_INT(&req->name);

    return __glXDisp_QueryServerString(cl, pc);
}
Ejemplo n.º 19
0
int __glXDispSwap_GetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
{
    xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc;
    
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->drawable);

    return __glXDisp_GetDrawableAttributes(cl, pc);
}
Ejemplo n.º 20
0
int __glXSwapQueryVersion(__GLXclientState *cl, GLbyte *pc)
{
    xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->majorVersion);
    __GLX_SWAP_INT(&req->minorVersion);

    return __glXQueryVersion(cl, pc);
}
Ejemplo n.º 21
0
int
ephyrGLXQueryVersionSwap (__GLXclientState *a_cl, GLbyte *a_pc)
{
    xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) a_pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT (&req->length);
    __GLX_SWAP_INT (&req->majorVersion);
    __GLX_SWAP_INT (&req->minorVersion);
    return ephyrGLXQueryVersion (a_cl, a_pc) ;
}
Ejemplo n.º 22
0
int __glXDispSwap_MakeCurrent(__GLXclientState *cl, GLbyte *pc)
{
    xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->drawable);
    __GLX_SWAP_INT(&req->context);
    __GLX_SWAP_INT(&req->oldContextTag);

    return __glXDisp_MakeCurrent(cl, pc);
}
Ejemplo n.º 23
0
void __glXSwapQueryContextInfoEXTReply(ClientPtr client, xGLXQueryContextInfoEXTReply *reply, int *buf)
{
    int length = reply->length;
    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
    __GLX_SWAP_SHORT(&reply->sequenceNumber);
    __GLX_SWAP_INT(&reply->length);
    __GLX_SWAP_INT(&reply->n);
    WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)reply);
    __GLX_SWAP_INT_ARRAY((int *)buf, length);
    WriteToClient(client, length << 2, (char *)buf);
}
Ejemplo n.º 24
0
int __glXSwapCopyContext(__GLXclientState *cl, GLbyte *pc)
{
    xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->source);
    __GLX_SWAP_INT(&req->dest);
    __GLX_SWAP_INT(&req->mask);

    return __glXCopyContext(cl, pc);
}
Ejemplo n.º 25
0
int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc)
{
    xGLXClientInfoReq *req = (xGLXClientInfoReq *)pc;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->major);
    __GLX_SWAP_INT(&req->minor);
    __GLX_SWAP_INT(&req->numbytes);

    return __glXClientInfo(cl, pc);
}
Ejemplo n.º 26
0
int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
{
    xGLXVendorPrivateWithReplyReq *req;
    GLint vendorcode;

    __GLX_DECLARE_SWAP_VARIABLES;

    req = (xGLXVendorPrivateWithReplyReq *) pc;
    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->vendorCode);

    vendorcode = req->vendorCode;

    switch (vendorcode) {
      case X_GLXvop_QueryContextInfoEXT:
	return __glXSwapQueryContextInfoEXT(cl, pc);
      case X_GLXvop_MakeCurrentReadSGI:
	return __glXSwapMakeCurrentReadSGI(cl, pc);
      case X_GLXvop_GetFBConfigsSGIX:
	return __glXSwapGetFBConfigsSGIX(cl, pc);
      case X_GLXvop_CreateContextWithConfigSGIX:
	return __glXSwapCreateContextWithConfigSGIX(cl, pc);
      case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
	return __glXSwapCreateGLXPixmapWithConfigSGIX(cl, pc);
      case X_GLXvop_GetDrawableAttributesSGIX:
	return __glXSwapGetDrawableAttributesSGIX(cl, pc);
      case X_GLvop_IsRenderbufferEXT:
	return __glXDispSwap_IsRenderbufferEXT(cl, pc);
      case X_GLvop_GenRenderbuffersEXT:
	return __glXDispSwap_GenRenderbuffersEXT(cl, pc);
      case X_GLvop_GetRenderbufferParameterivEXT:
	return __glXDispSwap_GetRenderbufferParameterivEXT(cl, pc);
      case X_GLvop_IsFramebufferEXT:
	return __glXDispSwap_IsFramebufferEXT(cl, pc);
      case X_GLvop_GenFramebuffersEXT:
	return __glXDispSwap_GenFramebuffersEXT(cl, pc);
      case X_GLvop_CheckFramebufferStatusEXT:
	return __glXDispSwap_CheckFramebufferStatusEXT(cl, pc);
      case X_GLvop_GetFramebufferAttachmentParameterivEXT:
	return __glXDispSwap_GetFramebufferAttachmentParameterivEXT(cl, pc);
      default:
	break;
    }


    if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) &&
          (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT))  {
	return (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req);
    }
    cl->client->errorValue = req->vendorCode;
    return __glXUnsupportedPrivateRequest;
}
Ejemplo n.º 27
0
int
ephyrGLXQueryVersion(__GLXclientState * a_cl, GLbyte * a_pc)
{
    ClientPtr client = a_cl->client;
    xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) a_pc;
    xGLXQueryVersionReply reply;
    int major, minor;
    int res = BadImplementation;

    EPHYR_LOG("enter\n");

    major = req->majorVersion;
    minor = req->minorVersion;

    if (!ephyrHostGLXQueryVersion(&major, &minor)) {
        EPHYR_LOG_ERROR("ephyrHostGLXQueryVersion() failed\n");
        goto out;
    }
    EPHYR_LOG("major:%d, minor:%d\n", major, minor);
    reply = (xGLXQueryVersionReply) {
        .type = X_Reply,
        .sequenceNumber = client->sequence,
        .length = 0,
        .majorVersion = major,
        .minorVersion = minor
    };

    if (client->swapped) {
        __glXSwapQueryVersionReply(client, &reply);
    }
    else {
        WriteToClient(client, sz_xGLXQueryVersionReply, &reply);
    }

    res = Success;
 out:
    EPHYR_LOG("leave\n");
    return res;
}

int
ephyrGLXQueryVersionSwap(__GLXclientState * a_cl, GLbyte * a_pc)
{
    xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) a_pc;

    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_SHORT(&req->length);
    __GLX_SWAP_INT(&req->majorVersion);
    __GLX_SWAP_INT(&req->minorVersion);
    return ephyrGLXQueryVersion(a_cl, a_pc);
}
Ejemplo n.º 28
0
void __glXSwapGetDrawableAttributesReply(ClientPtr client,
					 xGLXGetDrawableAttributesReply *reply, CARD32 *buf)
{
    int length = reply->length;
    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
    __GLX_SWAP_SHORT(&reply->sequenceNumber);
    __GLX_SWAP_INT(&reply->length);
    __GLX_SWAP_INT(&reply->numAttribs);
    WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *)reply);
    __GLX_SWAP_INT_ARRAY((int *)buf, length);
    WriteToClient(client, length << 2, (char *)buf);
}
Ejemplo n.º 29
0
void glxSwapQueryServerStringReply(ClientPtr client,
				   xGLXQueryServerStringReply *reply, char *buf)
{
    int length = reply->length;
    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_SWAP_SHORT(&reply->sequenceNumber);
    __GLX_SWAP_INT(&reply->length);
    __GLX_SWAP_INT(&reply->n);
    WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)reply);
    /** no swap is needed for an array of chars **/
    /* __GLX_SWAP_INT_ARRAY((int *)buf, length); */
    WriteToClient(client, length << 2, buf);
}
Ejemplo n.º 30
0
void glxSwapQueryExtensionsStringReply(ClientPtr client,
				       xGLXQueryExtensionsStringReply *reply, char *buf)
{
    int length = reply->length;
    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
    __GLX_SWAP_SHORT(&reply->sequenceNumber);
    __GLX_SWAP_INT(&reply->length);
    __GLX_SWAP_INT(&reply->n);
    WriteToClient(client, sz_xGLXQueryExtensionsStringReply, (char *)reply);
    __GLX_SWAP_INT_ARRAY((int *)buf, length);
    WriteToClient(client, length << 2, buf);
}