diff options
author | Keith Packard <keithp@keithp.com> | 2010-11-30 13:30:59 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-11-30 13:30:59 -0800 |
commit | 02449ee24b484c9fea501df5274d95a9f87cab23 (patch) | |
tree | e8df05a624f7f5af14a300e8506ed9da678a28d8 /glx/glxcmds.c | |
parent | afd6eb66d5ef6a59be4c03da4588aaa2ee47b9ad (diff) | |
parent | b85f9063c2370d7710523bccb8bf030a0710425b (diff) |
Merge remote branch 'ajax/for-keithp'
Diffstat (limited to 'glx/glxcmds.c')
-rw-r--r-- | glx/glxcmds.c | 233 |
1 files changed, 0 insertions, 233 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c index 8d13c1509..de9c3f039 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -38,7 +38,6 @@ #include "glxserver.h" #include <GL/glxtokens.h> #include <unpack.h> -#include "g_disptab.h" #include <pixmapstr.h> #include <windowstr.h> #include "glxutil.h" @@ -2061,238 +2060,6 @@ int __glXDisp_RenderLarge(__GLXclientState *cl, GLbyte *pc) } } -extern RESTYPE __glXSwapBarrierRes; - -int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) -{ - ClientPtr client = cl->client; - xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *) pc; - XID drawable = req->drawable; - int barrier = req->barrier; - DrawablePtr pDraw; - int screen, rc; - __GLXscreen *pGlxScreen; - - rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixGetAttrAccess); - pGlxScreen = glxGetScreen(pDraw->pScreen); - if (rc == Success && (pDraw->type == DRAWABLE_WINDOW)) { - screen = pDraw->pScreen->myNum; - if (pGlxScreen->swapBarrierFuncs) { - int ret = pGlxScreen->swapBarrierFuncs->bindSwapBarrierFunc(screen, drawable, barrier); - if (ret == Success) { - if (barrier) - /* add source for cleanup when drawable is gone */ - AddResource(drawable, __glXSwapBarrierRes, (pointer)(intptr_t)screen); - else - /* delete source */ - FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE); - } - return ret; - } - } - client->errorValue = drawable; - return __glXError(GLXBadDrawable); -} - - -int __glXDisp_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc) -{ - ClientPtr client = cl->client; - xGLXQueryMaxSwapBarriersSGIXReq *req = - (xGLXQueryMaxSwapBarriersSGIXReq *) pc; - xGLXQueryMaxSwapBarriersSGIXReply reply; - int screen = req->screen; - __GLXscreen *pGlxScreen; - - pGlxScreen = glxGetScreen(screenInfo.screens[screen]); - if (pGlxScreen->swapBarrierFuncs) - reply.max = pGlxScreen->swapBarrierFuncs->queryMaxSwapBarriersFunc(screen); - else - reply.max = 0; - - - reply.length = 0; - reply.type = X_Reply; - reply.sequenceNumber = client->sequence; - - if (client->swapped) { - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_SHORT(&reply.sequenceNumber); - } - - WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, - (char *) &reply); - return Success; -} - -#define GLX_BAD_HYPERPIPE_SGIX 92 - -int __glXDisp_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc) -{ - ClientPtr client = cl->client; - xGLXQueryHyperpipeNetworkSGIXReq * req = (xGLXQueryHyperpipeNetworkSGIXReq *) pc; - xGLXQueryHyperpipeNetworkSGIXReply reply; - int screen = req->screen; - void *rdata = NULL; - - int length=0; - int npipes=0; - - int n= 0; - __GLXscreen *pGlxScreen; - - pGlxScreen = glxGetScreen(screenInfo.screens[screen]); - if (pGlxScreen->hyperpipeFuncs) { - rdata = - (pGlxScreen->hyperpipeFuncs->queryHyperpipeNetworkFunc(screen, &npipes, &n)); - } - length = __GLX_PAD(n) >> 2; - reply.type = X_Reply; - reply.sequenceNumber = client->sequence; - reply.length = length; - reply.n = n; - reply.npipes = npipes; - - if (client->swapped) { - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_SHORT(&reply.sequenceNumber); - __GLX_SWAP_INT(&reply.length); - __GLX_SWAP_INT(&reply.n); - __GLX_SWAP_INT(&reply.npipes); - } - WriteToClient(client, sz_xGLXQueryHyperpipeNetworkSGIXReply, - (char *) &reply); - - WriteToClient(client, length << 2, (char *)rdata); - - return Success; -} - -int __glXDisp_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc) -{ - ClientPtr client = cl->client; - xGLXDestroyHyperpipeConfigSGIXReq * req = - (xGLXDestroyHyperpipeConfigSGIXReq *) pc; - xGLXDestroyHyperpipeConfigSGIXReply reply; - int screen = req->screen; - int success = GLX_BAD_HYPERPIPE_SGIX; - int hpId ; - __GLXscreen *pGlxScreen; - - hpId = req->hpId; - - pGlxScreen = glxGetScreen(screenInfo.screens[screen]); - if (pGlxScreen->hyperpipeFuncs) { - success = pGlxScreen->hyperpipeFuncs->destroyHyperpipeConfigFunc(screen, hpId); - } - - reply.type = X_Reply; - reply.sequenceNumber = client->sequence; - reply.length = __GLX_PAD(0) >> 2; - reply.n = 0; - reply.success = success; - - - if (client->swapped) { - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_SHORT(&reply.sequenceNumber); - } - WriteToClient(client, - sz_xGLXDestroyHyperpipeConfigSGIXReply, - (char *) &reply); - return Success; -} - -int __glXDisp_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) -{ - ClientPtr client = cl->client; - xGLXQueryHyperpipeConfigSGIXReq * req = - (xGLXQueryHyperpipeConfigSGIXReq *) pc; - xGLXQueryHyperpipeConfigSGIXReply reply; - int screen = req->screen; - void *rdata = NULL; - int length; - int npipes=0; - int n= 0; - int hpId; - __GLXscreen *pGlxScreen; - - hpId = req->hpId; - - pGlxScreen = glxGetScreen(screenInfo.screens[screen]); - if (pGlxScreen->hyperpipeFuncs) { - rdata = pGlxScreen->hyperpipeFuncs->queryHyperpipeConfigFunc(screen, hpId,&npipes, &n); - } - - length = __GLX_PAD(n) >> 2; - reply.type = X_Reply; - reply.sequenceNumber = client->sequence; - reply.length = length; - reply.n = n; - reply.npipes = npipes; - - - if (client->swapped) { - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_SHORT(&reply.sequenceNumber); - __GLX_SWAP_INT(&reply.length); - __GLX_SWAP_INT(&reply.n); - __GLX_SWAP_INT(&reply.npipes); - } - - WriteToClient(client, sz_xGLXQueryHyperpipeConfigSGIXReply, - (char *) &reply); - - WriteToClient(client, length << 2, (char *)rdata); - - return Success; -} - -int __glXDisp_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) -{ - ClientPtr client = cl->client; - xGLXHyperpipeConfigSGIXReq * req = - (xGLXHyperpipeConfigSGIXReq *) pc; - xGLXHyperpipeConfigSGIXReply reply; - int screen = req->screen; - void *rdata; - - int npipes=0, networkId; - int hpId=-1; - __GLXscreen *pGlxScreen; - - pGlxScreen = glxGetScreen(screenInfo.screens[screen]); - networkId = (int)req->networkId; - npipes = (int)req->npipes; - rdata = (void *)(req +1); - - if (pGlxScreen->hyperpipeFuncs) { - pGlxScreen->hyperpipeFuncs->hyperpipeConfigFunc(screen,networkId, - &hpId, &npipes, - (void *) rdata); - } - - reply.type = X_Reply; - reply.sequenceNumber = client->sequence; - reply.length = __GLX_PAD(0) >> 2; - reply.n = 0; - reply.npipes = npipes; - reply.hpId = hpId; - - if (client->swapped) { - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_SHORT(&reply.sequenceNumber); - __GLX_SWAP_INT(&reply.npipes); - __GLX_SWAP_INT(&reply.hpId); - } - - WriteToClient(client, sz_xGLXHyperpipeConfigSGIXReply, - (char *) &reply); - - return Success; -} - - /************************************************************************/ /* |