2006-11-26 11:13:41 -07:00
|
|
|
/*
|
2009-09-06 13:44:18 -06:00
|
|
|
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
|
|
|
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice including the dates of first publication and
|
|
|
|
* either this permission notice or a reference to
|
|
|
|
* http://oss.sgi.com/projects/FreeB/
|
|
|
|
* shall be included in all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
|
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
|
|
|
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
|
|
|
*
|
|
|
|
* Except as contained in this notice, the name of Silicon Graphics, Inc.
|
|
|
|
* shall not be used in advertising or otherwise to promote the sale, use or
|
|
|
|
* other dealings in this Software without prior written authorization from
|
|
|
|
* Silicon Graphics, Inc.
|
|
|
|
*/
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
#ifdef HAVE_DIX_CONFIG_H
|
|
|
|
#include <dix-config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include "glxserver.h"
|
|
|
|
#include "glxutil.h"
|
|
|
|
#include <GL/glxtokens.h>
|
|
|
|
#include <unpack.h>
|
|
|
|
#include <pixmapstr.h>
|
|
|
|
#include <windowstr.h>
|
|
|
|
#include "glxext.h"
|
|
|
|
#include "glapitable.h"
|
|
|
|
#include "glapi.h"
|
|
|
|
#include "glthread.h"
|
|
|
|
#include "dispatch.h"
|
|
|
|
#include "indirect_dispatch.h"
|
|
|
|
#include "indirect_table.h"
|
|
|
|
#include "indirect_util.h"
|
|
|
|
|
|
|
|
/************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Byteswapping versions of GLX commands. In most cases they just swap
|
|
|
|
** the incoming arguments and then call the unswapped routine. For commands
|
|
|
|
** that have replies, a separate swapping routine for the reply is provided;
|
|
|
|
** it is called at the end of the unswapped routine.
|
|
|
|
*/
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CreateContext(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXCreateContextReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->context);
|
|
|
|
__GLX_SWAP_INT(&req->visual);
|
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->shareList);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_CreateContext(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CreateNewContext(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXCreateNewContextReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->context);
|
|
|
|
__GLX_SWAP_INT(&req->fbconfig);
|
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->renderType);
|
|
|
|
__GLX_SWAP_INT(&req->shareList);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_CreateNewContext(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXCreateContextWithConfigSGIXReq *req =
|
2012-06-10 07:21:05 -06:00
|
|
|
(xGLXCreateContextWithConfigSGIXReq *) pc;
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXCreateContextWithConfigSGIXReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->context);
|
|
|
|
__GLX_SWAP_INT(&req->fbconfig);
|
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->renderType);
|
|
|
|
__GLX_SWAP_INT(&req->shareList);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_CreateContextWithConfigSGIX(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_DestroyContext(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXDestroyContextReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->context);
|
|
|
|
|
|
|
|
return __glXDisp_DestroyContext(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_MakeCurrent(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXMakeCurrentReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->drawable);
|
|
|
|
__GLX_SWAP_INT(&req->context);
|
|
|
|
__GLX_SWAP_INT(&req->oldContextTag);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_MakeCurrent(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_MakeContextCurrent(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXMakeContextCurrentReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->drawable);
|
|
|
|
__GLX_SWAP_INT(&req->readdrawable);
|
|
|
|
__GLX_SWAP_INT(&req->context);
|
|
|
|
__GLX_SWAP_INT(&req->oldContextTag);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_MakeContextCurrent(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_MakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXMakeCurrentReadSGIReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->drawable);
|
|
|
|
__GLX_SWAP_INT(&req->readable);
|
|
|
|
__GLX_SWAP_INT(&req->context);
|
|
|
|
__GLX_SWAP_INT(&req->oldContextTag);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_MakeCurrentReadSGI(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_IsDirect(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXIsDirectReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->context);
|
|
|
|
|
|
|
|
return __glXDisp_IsDirect(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_QueryVersion(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXQueryVersionReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->majorVersion);
|
|
|
|
__GLX_SWAP_INT(&req->minorVersion);
|
|
|
|
|
|
|
|
return __glXDisp_QueryVersion(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_WaitGL(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXWaitGLReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->contextTag);
|
|
|
|
|
|
|
|
return __glXDisp_WaitGL(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_WaitX(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXWaitXReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->contextTag);
|
|
|
|
|
|
|
|
return __glXDisp_WaitX(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CopyContext(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXCopyContextReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->source);
|
|
|
|
__GLX_SWAP_INT(&req->dest);
|
|
|
|
__GLX_SWAP_INT(&req->mask);
|
|
|
|
|
|
|
|
return __glXDisp_CopyContext(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXGetVisualConfigsReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_INT(&req->screen);
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_GetVisualConfigs(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_GetFBConfigs(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXGetFBConfigsReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_INT(&req->screen);
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_GetFBConfigs(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_GetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXGetFBConfigsSGIXReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_INT(&req->screen);
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_GetFBConfigsSGIX(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CreateGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->visual);
|
|
|
|
__GLX_SWAP_INT(&req->pixmap);
|
|
|
|
__GLX_SWAP_INT(&req->glxpixmap);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_CreateGLXPixmap(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CreatePixmap(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc;
|
2008-11-02 08:26:08 -07:00
|
|
|
CARD32 *attribs;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXCreatePixmapReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->fbconfig);
|
|
|
|
__GLX_SWAP_INT(&req->pixmap);
|
|
|
|
__GLX_SWAP_INT(&req->glxpixmap);
|
2007-11-24 12:04:00 -07:00
|
|
|
__GLX_SWAP_INT(&req->numAttribs);
|
2011-11-05 07:32:40 -06:00
|
|
|
|
|
|
|
if (req->numAttribs > (UINT32_MAX >> 3)) {
|
2012-06-10 07:21:05 -06:00
|
|
|
client->errorValue = req->numAttribs;
|
|
|
|
return BadValue;
|
2011-11-05 07:32:40 -06:00
|
|
|
}
|
|
|
|
REQUEST_FIXED_SIZE(xGLXCreatePixmapReq, req->numAttribs << 3);
|
2012-06-10 07:21:05 -06:00
|
|
|
attribs = (CARD32 *) (req + 1);
|
2011-11-05 07:32:40 -06:00
|
|
|
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_CreatePixmap(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CreateGLXPixmapWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2012-06-10 07:21:05 -06:00
|
|
|
xGLXCreateGLXPixmapWithConfigSGIXReq *req =
|
|
|
|
(xGLXCreateGLXPixmapWithConfigSGIXReq *) pc;
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapWithConfigSGIXReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->fbconfig);
|
|
|
|
__GLX_SWAP_INT(&req->pixmap);
|
|
|
|
__GLX_SWAP_INT(&req->glxpixmap);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_CreateGLXPixmapWithConfigSGIX(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_DestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXDestroyGLXPixmapReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->glxpixmap);
|
|
|
|
|
|
|
|
return __glXDisp_DestroyGLXPixmap(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_DestroyPixmap(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXDestroyGLXPixmapReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->glxpixmap);
|
|
|
|
|
|
|
|
return __glXDisp_DestroyGLXPixmap(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_QueryContext(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2012-06-10 07:21:05 -06:00
|
|
|
xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXQueryContextReq);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_SWAP_INT(&req->context);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_QueryContext(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CreatePbuffer(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2012-06-10 07:21:05 -06:00
|
|
|
xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc;
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
|
|
|
CARD32 *attribs;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXCreatePbufferReq);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->fbconfig);
|
|
|
|
__GLX_SWAP_INT(&req->pbuffer);
|
|
|
|
__GLX_SWAP_INT(&req->numAttribs);
|
2011-11-05 07:32:40 -06:00
|
|
|
|
|
|
|
if (req->numAttribs > (UINT32_MAX >> 3)) {
|
2012-06-10 07:21:05 -06:00
|
|
|
client->errorValue = req->numAttribs;
|
|
|
|
return BadValue;
|
2011-11-05 07:32:40 -06:00
|
|
|
}
|
|
|
|
REQUEST_FIXED_SIZE(xGLXCreatePbufferReq, req->numAttribs << 3);
|
2012-06-10 07:21:05 -06:00
|
|
|
attribs = (CARD32 *) (req + 1);
|
2011-11-05 07:32:40 -06:00
|
|
|
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
2008-11-02 08:26:08 -07:00
|
|
|
|
|
|
|
return __glXDisp_CreatePbuffer(cl, pc);
|
|
|
|
}
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CreateGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc)
|
2008-11-02 08:26:08 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2012-06-10 07:21:05 -06:00
|
|
|
xGLXCreateGLXPbufferSGIXReq *req = (xGLXCreateGLXPbufferSGIXReq *) pc;
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXCreateGLXPbufferSGIXReq);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->fbconfig);
|
|
|
|
__GLX_SWAP_INT(&req->pbuffer);
|
|
|
|
__GLX_SWAP_INT(&req->width);
|
|
|
|
__GLX_SWAP_INT(&req->height);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_CreateGLXPbufferSGIX(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_DestroyPbuffer(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2010-07-27 13:02:24 -06:00
|
|
|
xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXDestroyPbufferReq);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_SWAP_INT(&req->pbuffer);
|
|
|
|
|
|
|
|
return __glXDisp_DestroyPbuffer(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_DestroyGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc)
|
2008-11-02 08:26:08 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2010-07-27 13:02:24 -06:00
|
|
|
xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXDestroyGLXPbufferSGIXReq);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_SWAP_INT(&req->pbuffer);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_DestroyGLXPbufferSGIX(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_ChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXChangeDrawableAttributesReq *req =
|
2012-06-10 07:21:05 -06:00
|
|
|
(xGLXChangeDrawableAttributesReq *) pc;
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
|
|
|
CARD32 *attribs;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesReq);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_SWAP_INT(&req->drawable);
|
|
|
|
__GLX_SWAP_INT(&req->numAttribs);
|
2011-11-05 07:32:40 -06:00
|
|
|
|
|
|
|
if (req->numAttribs > (UINT32_MAX >> 3)) {
|
2012-06-10 07:21:05 -06:00
|
|
|
client->errorValue = req->numAttribs;
|
|
|
|
return BadValue;
|
2011-11-05 07:32:40 -06:00
|
|
|
}
|
2012-06-10 07:21:05 -06:00
|
|
|
if (((sizeof(xGLXChangeDrawableAttributesReq) +
|
|
|
|
(req->numAttribs << 3)) >> 2) < client->req_len)
|
|
|
|
return BadLength;
|
2011-11-05 07:32:40 -06:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
attribs = (CARD32 *) (req + 1);
|
2011-11-05 07:32:40 -06:00
|
|
|
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
2008-11-02 08:26:08 -07:00
|
|
|
|
|
|
|
return __glXDisp_ChangeDrawableAttributes(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_ChangeDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc)
|
2008-11-02 08:26:08 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2008-11-02 08:26:08 -07:00
|
|
|
xGLXChangeDrawableAttributesSGIXReq *req =
|
2012-06-10 07:21:05 -06:00
|
|
|
(xGLXChangeDrawableAttributesSGIXReq *) pc;
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
|
|
|
CARD32 *attribs;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesSGIXReq);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_SWAP_INT(&req->drawable);
|
|
|
|
__GLX_SWAP_INT(&req->numAttribs);
|
2011-11-05 07:32:40 -06:00
|
|
|
|
|
|
|
if (req->numAttribs > (UINT32_MAX >> 3)) {
|
2012-06-10 07:21:05 -06:00
|
|
|
client->errorValue = req->numAttribs;
|
|
|
|
return BadValue;
|
2011-11-05 07:32:40 -06:00
|
|
|
}
|
2012-06-10 07:21:05 -06:00
|
|
|
REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesSGIXReq,
|
|
|
|
req->numAttribs << 3);
|
|
|
|
attribs = (CARD32 *) (req + 1);
|
2011-11-05 07:32:40 -06:00
|
|
|
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_ChangeDrawableAttributesSGIX(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CreateWindow(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
|
|
|
CARD32 *attribs;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXCreateWindowReq);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->fbconfig);
|
|
|
|
__GLX_SWAP_INT(&req->window);
|
|
|
|
__GLX_SWAP_INT(&req->glxwindow);
|
|
|
|
__GLX_SWAP_INT(&req->numAttribs);
|
2011-11-05 07:32:40 -06:00
|
|
|
|
|
|
|
if (req->numAttribs > (UINT32_MAX >> 3)) {
|
2012-06-10 07:21:05 -06:00
|
|
|
client->errorValue = req->numAttribs;
|
|
|
|
return BadValue;
|
2011-11-05 07:32:40 -06:00
|
|
|
}
|
|
|
|
REQUEST_FIXED_SIZE(xGLXCreateWindowReq, req->numAttribs << 3);
|
2012-06-10 07:21:05 -06:00
|
|
|
attribs = (CARD32 *) (req + 1);
|
2011-11-05 07:32:40 -06:00
|
|
|
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_CreateWindow(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_DestroyWindow(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXDestroyWindowReq);
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
__GLX_SWAP_INT(&req->glxwindow);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_DestroyWindow(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_SwapBuffers(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXSwapBuffersReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->contextTag);
|
|
|
|
__GLX_SWAP_INT(&req->drawable);
|
|
|
|
|
|
|
|
return __glXDisp_SwapBuffers(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_UseXFont(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXUseXFontReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->contextTag);
|
|
|
|
__GLX_SWAP_INT(&req->font);
|
|
|
|
__GLX_SWAP_INT(&req->first);
|
|
|
|
__GLX_SWAP_INT(&req->count);
|
|
|
|
__GLX_SWAP_INT(&req->listBase);
|
|
|
|
|
|
|
|
return __glXDisp_UseXFont(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2012-06-10 07:21:05 -06:00
|
|
|
xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc;
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXQueryExtensionsStringReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
|
|
|
|
return __glXDisp_QueryExtensionsString(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_QueryServerString(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2012-06-10 07:21:05 -06:00
|
|
|
xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc;
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXQueryServerStringReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->screen);
|
|
|
|
__GLX_SWAP_INT(&req->name);
|
|
|
|
|
|
|
|
return __glXDisp_QueryServerString(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_ClientInfo(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2012-06-10 07:21:05 -06:00
|
|
|
xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc;
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXClientInfoReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->major);
|
|
|
|
__GLX_SWAP_INT(&req->minor);
|
|
|
|
__GLX_SWAP_INT(&req->numbytes);
|
|
|
|
|
|
|
|
return __glXDisp_ClientInfo(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_QueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXQueryContextInfoEXTReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->context);
|
|
|
|
|
|
|
|
return __glXDisp_QueryContextInfoEXT(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_BindTexImageEXT(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
GLXDrawable *drawId;
|
|
|
|
int *buffer;
|
|
|
|
CARD32 *num_attribs;
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
if ((sizeof(xGLXVendorPrivateReq) + 12) >> 2 > client->req_len)
|
2012-06-10 07:21:05 -06:00
|
|
|
return BadLength;
|
2011-11-05 07:32:40 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
|
|
|
|
|
|
drawId = ((GLXDrawable *) (pc));
|
2012-06-10 07:21:05 -06:00
|
|
|
buffer = ((int *) (pc + 4));
|
2011-11-05 07:32:40 -06:00
|
|
|
num_attribs = ((CARD32 *) (pc + 8));
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->contextTag);
|
|
|
|
__GLX_SWAP_INT(drawId);
|
|
|
|
__GLX_SWAP_INT(buffer);
|
2011-11-05 07:32:40 -06:00
|
|
|
__GLX_SWAP_INT(num_attribs);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
return __glXDisp_BindTexImageEXT(cl, (GLbyte *) pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_ReleaseTexImageEXT(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
GLXDrawable *drawId;
|
|
|
|
int *buffer;
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 8);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
|
|
|
|
|
|
drawId = ((GLXDrawable *) (pc));
|
2012-06-10 07:21:05 -06:00
|
|
|
buffer = ((int *) (pc + 4));
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->contextTag);
|
|
|
|
__GLX_SWAP_INT(drawId);
|
|
|
|
__GLX_SWAP_INT(buffer);
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
return __glXDisp_ReleaseTexImageEXT(cl, (GLbyte *) pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_CopySubBufferMESA(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2006-11-26 11:13:41 -07:00
|
|
|
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
|
2012-06-10 07:21:05 -06:00
|
|
|
GLXDrawable *drawId;
|
|
|
|
int *buffer;
|
|
|
|
|
2006-12-04 13:28:28 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 20);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
(void) drawId;
|
|
|
|
(void) buffer;
|
|
|
|
|
|
|
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
|
|
|
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->contextTag);
|
|
|
|
__GLX_SWAP_INT(pc);
|
|
|
|
__GLX_SWAP_INT(pc + 4);
|
|
|
|
__GLX_SWAP_INT(pc + 8);
|
|
|
|
__GLX_SWAP_INT(pc + 12);
|
|
|
|
__GLX_SWAP_INT(pc + 16);
|
|
|
|
|
|
|
|
return __glXDisp_CopySubBufferMESA(cl, pc);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_GetDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2012-06-10 07:21:05 -06:00
|
|
|
xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *) pc;
|
2006-11-26 11:13:41 -07:00
|
|
|
CARD32 *data;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_SIZE_MATCH(xGLXGetDrawableAttributesSGIXReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
data = (CARD32 *) (req + 1);
|
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->contextTag);
|
|
|
|
__GLX_SWAP_INT(data);
|
|
|
|
|
|
|
|
return __glXDisp_GetDrawableAttributesSGIX(cl, pc);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_GetDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ClientPtr client = cl->client;
|
2012-06-10 07:21:05 -06:00
|
|
|
xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc;
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
REQUEST_AT_LEAST_SIZE(xGLXGetDrawableAttributesReq);
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->drawable);
|
|
|
|
|
|
|
|
return __glXDisp_GetDrawableAttributes(cl, pc);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Swap replies.
|
|
|
|
*/
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
void
|
|
|
|
__glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReply * reply)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
|
|
|
__GLX_SWAP_INT(&reply->length);
|
|
|
|
__GLX_SWAP_INT(&reply->contextTag);
|
2012-06-10 07:21:05 -06:00
|
|
|
WriteToClient(client, sz_xGLXMakeCurrentReply, (char *) reply);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
void
|
|
|
|
__glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
|
|
|
__GLX_SWAP_INT(&reply->length);
|
2012-06-10 07:21:05 -06:00
|
|
|
WriteToClient(client, sz_xGLXIsDirectReply, (char *) reply);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
void
|
|
|
|
__glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply * reply)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
|
|
|
__GLX_SWAP_INT(&reply->length);
|
|
|
|
__GLX_SWAP_INT(&reply->majorVersion);
|
|
|
|
__GLX_SWAP_INT(&reply->minorVersion);
|
2012-06-10 07:21:05 -06:00
|
|
|
WriteToClient(client, sz_xGLXQueryVersionReply, (char *) reply);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
void
|
|
|
|
glxSwapQueryExtensionsStringReply(ClientPtr client,
|
|
|
|
xGLXQueryExtensionsStringReply * reply,
|
|
|
|
char *buf)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
int length = reply->length;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
|
|
|
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
|
|
|
__GLX_SWAP_INT(&reply->length);
|
|
|
|
__GLX_SWAP_INT(&reply->n);
|
2012-06-10 07:21:05 -06:00
|
|
|
WriteToClient(client, sz_xGLXQueryExtensionsStringReply, (char *) reply);
|
|
|
|
__GLX_SWAP_INT_ARRAY((int *) buf, length);
|
2006-11-26 11:13:41 -07:00
|
|
|
WriteToClient(client, length << 2, buf);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
void
|
|
|
|
glxSwapQueryServerStringReply(ClientPtr client,
|
|
|
|
xGLXQueryServerStringReply * reply, char *buf)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
int length = reply->length;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
|
|
|
__GLX_SWAP_INT(&reply->length);
|
|
|
|
__GLX_SWAP_INT(&reply->n);
|
2012-06-10 07:21:05 -06:00
|
|
|
WriteToClient(client, sz_xGLXQueryServerStringReply, (char *) reply);
|
2006-11-26 11:13:41 -07:00
|
|
|
/** no swap is needed for an array of chars **/
|
|
|
|
/* __GLX_SWAP_INT_ARRAY((int *)buf, length); */
|
|
|
|
WriteToClient(client, length << 2, buf);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
void
|
|
|
|
__glXSwapQueryContextInfoEXTReply(ClientPtr client,
|
|
|
|
xGLXQueryContextInfoEXTReply * reply,
|
|
|
|
int *buf)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
int length = reply->length;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
|
|
|
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
|
|
|
__GLX_SWAP_INT(&reply->length);
|
|
|
|
__GLX_SWAP_INT(&reply->n);
|
2012-06-10 07:21:05 -06:00
|
|
|
WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *) reply);
|
|
|
|
__GLX_SWAP_INT_ARRAY((int *) buf, length);
|
|
|
|
WriteToClient(client, length << 2, (char *) buf);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
void
|
|
|
|
__glXSwapGetDrawableAttributesReply(ClientPtr client,
|
|
|
|
xGLXGetDrawableAttributesReply * reply,
|
|
|
|
CARD32 *buf)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
int length = reply->length;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
|
|
|
__GLX_SWAP_SHORT(&reply->sequenceNumber);
|
|
|
|
__GLX_SWAP_INT(&reply->length);
|
|
|
|
__GLX_SWAP_INT(&reply->numAttribs);
|
2012-06-10 07:21:05 -06:00
|
|
|
WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *) reply);
|
|
|
|
__GLX_SWAP_INT_ARRAY((int *) buf, length);
|
|
|
|
WriteToClient(client, length << 2, (char *) buf);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Render and Renderlarge are not in the GLX API. They are used by the GLX
|
|
|
|
** client library to send batches of GL rendering commands.
|
|
|
|
*/
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_Render(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_Render(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Execute a large rendering request (one that spans multiple X requests).
|
|
|
|
*/
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_RenderLarge(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
2008-11-02 08:26:08 -07:00
|
|
|
return __glXDisp_RenderLarge(cl, pc);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
** No support is provided for the vendor-private requests other than
|
|
|
|
** allocating these entry points in the dispatch table.
|
|
|
|
*/
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
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)
|
2012-06-10 07:21:05 -06:00
|
|
|
__glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info,
|
|
|
|
vendorcode, 1);
|
2006-11-26 11:13:41 -07:00
|
|
|
if (proc != NULL) {
|
2012-06-10 07:21:05 -06:00
|
|
|
(*proc) (cl, (GLbyte *) req);
|
|
|
|
return Success;
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
cl->client->errorValue = req->vendorCode;
|
|
|
|
return __glXError(GLXUnsupportedPrivateRequest);
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int
|
|
|
|
__glXDispSwap_VendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
xGLXVendorPrivateWithReplyReq *req;
|
|
|
|
GLint vendorcode;
|
|
|
|
__GLXdispatchVendorPrivProcPtr proc;
|
|
|
|
|
|
|
|
__GLX_DECLARE_SWAP_VARIABLES;
|
|
|
|
|
|
|
|
req = (xGLXVendorPrivateWithReplyReq *) pc;
|
|
|
|
__GLX_SWAP_SHORT(&req->length);
|
|
|
|
__GLX_SWAP_INT(&req->vendorCode);
|
|
|
|
|
|
|
|
vendorcode = req->vendorCode;
|
|
|
|
|
|
|
|
proc = (__GLXdispatchVendorPrivProcPtr)
|
2012-06-10 07:21:05 -06:00
|
|
|
__glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info,
|
|
|
|
vendorcode, 1);
|
2006-11-26 11:13:41 -07:00
|
|
|
if (proc != NULL) {
|
2012-06-10 07:21:05 -06:00
|
|
|
return (*proc) (cl, (GLbyte *) req);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
cl->client->errorValue = req->vendorCode;
|
|
|
|
return __glXError(GLXUnsupportedPrivateRequest);
|
|
|
|
}
|