glx: Use vnd layer for dispatch (v4)
The big change here is MakeCurrent and context tag tracking. We now delegate context tags entirely to the vnd layer, and simply store a pointer to the context state as the tag data. If a context is deleted while it's current, we allocate a fake ID for the context and move the context state there, so the tag data still points to a real context. As a result we can stop trying so hard to detach the client from contexts at disconnect time and just let resource destruction handle it. Since vnd handles all the MakeCurrent protocol now, our request handlers for it can just be return BadImplementation. We also remove a bunch of LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already allocated its tracking resource on that XID. v2: Update to match v2 of the vnd import, and remove more redundant work like request length checks. v3: Add/remove the XID map from the vendor private thunk, not the backend. (Kyle Brenneman) v4: Fix deletion of ghost contexts (Kyle Brenneman) Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
8753218bea
commit
d8ec33fe05
|
@ -1295,7 +1295,7 @@ if test "x$GLX" = xyes; then
|
||||||
PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL)
|
PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL)
|
||||||
AC_SUBST(XLIB_CFLAGS)
|
AC_SUBST(XLIB_CFLAGS)
|
||||||
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
|
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
|
||||||
GLX_LIBS='$(top_builddir)/glx/libglx.la'
|
GLX_LIBS='$(top_builddir)/glx/libglx.la $(top_builddir)/glx/libglxvnd.la'
|
||||||
GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS"
|
GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS"
|
||||||
else
|
else
|
||||||
GLX=no
|
GLX=no
|
||||||
|
|
|
@ -123,8 +123,6 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
|
||||||
if (req->length != expected_size)
|
if (req->length != expected_size)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
LEGAL_NEW_RESOURCE(req->context, client);
|
|
||||||
|
|
||||||
/* The GLX_ARB_create_context spec says:
|
/* The GLX_ARB_create_context spec says:
|
||||||
*
|
*
|
||||||
* "* If <config> is not a valid GLXFBConfig, GLXBadFBConfig is
|
* "* If <config> is not a valid GLXFBConfig, GLXBadFBConfig is
|
||||||
|
|
213
glx/glxcmds.c
213
glx/glxcmds.c
|
@ -47,6 +47,7 @@
|
||||||
#include "indirect_table.h"
|
#include "indirect_table.h"
|
||||||
#include "indirect_util.h"
|
#include "indirect_util.h"
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
|
#include "glxvndabi.h"
|
||||||
|
|
||||||
static char GLXServerVendorName[] = "SGI";
|
static char GLXServerVendorName[] = "SGI";
|
||||||
|
|
||||||
|
@ -135,6 +136,10 @@ _X_HIDDEN int
|
||||||
validGlxContext(ClientPtr client, XID id, int access_mode,
|
validGlxContext(ClientPtr client, XID id, int access_mode,
|
||||||
__GLXcontext ** context, int *err)
|
__GLXcontext ** context, int *err)
|
||||||
{
|
{
|
||||||
|
/* no ghost contexts */
|
||||||
|
if (id & SERVER_BIT)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
*err = dixLookupResourceByType((void **) context, id,
|
*err = dixLookupResourceByType((void **) context, id,
|
||||||
__glXContextRes, client, access_mode);
|
__glXContextRes, client, access_mode);
|
||||||
if (*err != Success || (*context)->idExists == GL_FALSE) {
|
if (*err != Success || (*context)->idExists == GL_FALSE) {
|
||||||
|
@ -240,8 +245,6 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
|
||||||
__GLXcontext *glxc, *shareglxc;
|
__GLXcontext *glxc, *shareglxc;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
LEGAL_NEW_RESOURCE(gcId, client);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Find the display list space that we want to share.
|
** Find the display list space that we want to share.
|
||||||
**
|
**
|
||||||
|
@ -356,14 +359,11 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
|
||||||
int
|
int
|
||||||
__glXDisp_CreateContext(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_CreateContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
|
xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
|
||||||
__GLXconfig *config;
|
__GLXconfig *config;
|
||||||
__GLXscreen *pGlxScreen;
|
__GLXscreen *pGlxScreen;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXCreateContextReq);
|
|
||||||
|
|
||||||
if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err))
|
if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err))
|
||||||
return err;
|
return err;
|
||||||
if (!validGlxVisual(cl->client, pGlxScreen, req->visual, &config, &err))
|
if (!validGlxVisual(cl->client, pGlxScreen, req->visual, &config, &err))
|
||||||
|
@ -376,14 +376,11 @@ __glXDisp_CreateContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDisp_CreateNewContext(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_CreateNewContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
|
xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
|
||||||
__GLXconfig *config;
|
__GLXconfig *config;
|
||||||
__GLXscreen *pGlxScreen;
|
__GLXscreen *pGlxScreen;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXCreateNewContextReq);
|
|
||||||
|
|
||||||
if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err))
|
if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err))
|
||||||
return err;
|
return err;
|
||||||
if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err))
|
if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err))
|
||||||
|
@ -417,62 +414,33 @@ __glXDisp_CreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
|
xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
|
||||||
__GLXcontext *glxc;
|
__GLXcontext *glxc;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXDestroyContextReq);
|
|
||||||
|
|
||||||
if (!validGlxContext(cl->client, req->context, DixDestroyAccess,
|
if (!validGlxContext(cl->client, req->context, DixDestroyAccess,
|
||||||
&glxc, &err))
|
&glxc, &err))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
glxc->idExists = GL_FALSE;
|
glxc->idExists = GL_FALSE;
|
||||||
if (!glxc->currentClient)
|
if (glxc->currentClient) {
|
||||||
FreeResourceByType(req->context, __glXContextRes, FALSE);
|
XID ghost = FakeClientID(glxc->currentClient->index);
|
||||||
|
|
||||||
|
if (!AddResource(ghost, __glXContextRes, glxc))
|
||||||
|
return BadAlloc;
|
||||||
|
ChangeResourceValue(glxc->id, __glXContextRes, NULL);
|
||||||
|
glxc->id = ghost;
|
||||||
|
}
|
||||||
|
|
||||||
|
FreeResourceByType(req->context, __glXContextRes, FALSE);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* This will return "deleted" contexts, ie, where idExists is GL_FALSE.
|
|
||||||
* Contrast validGlxContext, which will not. We're cheating here and
|
|
||||||
* using the XID as the context tag, which is fine as long as we defer
|
|
||||||
* actually destroying the context until it's no longer referenced, and
|
|
||||||
* block clients from trying to MakeCurrent on contexts that are on the
|
|
||||||
* way to destruction. Notice that DoMakeCurrent calls validGlxContext
|
|
||||||
* for new contexts but __glXLookupContextByTag for previous contexts.
|
|
||||||
*/
|
|
||||||
__GLXcontext *
|
__GLXcontext *
|
||||||
__glXLookupContextByTag(__GLXclientState * cl, GLXContextTag tag)
|
__glXLookupContextByTag(__GLXclientState * cl, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
__GLXcontext *ret;
|
return glxServer.getContextTagPrivate(cl->client, tag);
|
||||||
|
|
||||||
if (dixLookupResourceByType((void **) &ret, tag, __glXContextRes,
|
|
||||||
cl->client, DixUseAccess) == Success)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
StopUsingContext(__GLXcontext * glxc)
|
|
||||||
{
|
|
||||||
if (glxc) {
|
|
||||||
glxc->currentClient = NULL;
|
|
||||||
if (!glxc->idExists) {
|
|
||||||
FreeResourceByType(glxc->id, __glXContextRes, FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
StartUsingContext(__GLXclientState * cl, __GLXcontext * glxc)
|
|
||||||
{
|
|
||||||
glxc->currentClient = cl->client;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __GLXconfig *
|
static __GLXconfig *
|
||||||
|
@ -583,14 +551,12 @@ __glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, ClientPtr client,
|
||||||
** Make an OpenGL context and drawable current.
|
** Make an OpenGL context and drawable current.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
int
|
||||||
DoMakeCurrent(__GLXclientState * cl,
|
xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
|
||||||
GLXDrawable drawId, GLXDrawable readId,
|
XID contextId, GLXContextTag newContextTag)
|
||||||
GLXContextID contextId, GLXContextTag tag)
|
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
__GLXclientState *cl = glxGetClient(client);
|
||||||
xGLXMakeCurrentReply reply;
|
__GLXcontext *glxc = NULL, *prevglxc = NULL;
|
||||||
__GLXcontext *glxc, *prevglxc;
|
|
||||||
__GLXdrawable *drawPriv = NULL;
|
__GLXdrawable *drawPriv = NULL;
|
||||||
__GLXdrawable *readPriv = NULL;
|
__GLXdrawable *readPriv = NULL;
|
||||||
int error;
|
int error;
|
||||||
|
@ -603,39 +569,28 @@ DoMakeCurrent(__GLXclientState * cl,
|
||||||
if ((drawId == None) != (readId == None))
|
if ((drawId == None) != (readId == None))
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
|
|
||||||
/*
|
/* Look up old context. If we have one, it must be in a usable state. */
|
||||||
** Lookup old context. If we have one, it must be in a usable state.
|
|
||||||
*/
|
|
||||||
if (tag != 0) {
|
if (tag != 0) {
|
||||||
prevglxc = __glXLookupContextByTag(cl, tag);
|
prevglxc = glxServer.getContextTagPrivate(client, tag);
|
||||||
if (!prevglxc) {
|
if (!prevglxc)
|
||||||
/*
|
|
||||||
** Tag for previous context is invalid.
|
|
||||||
*/
|
|
||||||
return __glXError(GLXBadContextTag);
|
return __glXError(GLXBadContextTag);
|
||||||
}
|
|
||||||
if (prevglxc->renderMode != GL_RENDER) {
|
if (prevglxc->renderMode != GL_RENDER) {
|
||||||
/* Oops. Not in render mode render. */
|
/* Oops. Not in render mode render. */
|
||||||
client->errorValue = prevglxc->id;
|
client->errorValue = prevglxc->id;
|
||||||
return __glXError(GLXBadContextState);
|
return __glXError(GLXBadContextState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
prevglxc = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/* Look up new context. It must not be current for someone else. */
|
||||||
** Lookup new context. It must not be current for someone else.
|
|
||||||
*/
|
|
||||||
if (contextId != None) {
|
if (contextId != None) {
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (!validGlxContext(client, contextId, DixUseAccess, &glxc, &error))
|
if (!validGlxContext(client, contextId, DixUseAccess, &glxc, &error))
|
||||||
return error;
|
return error;
|
||||||
if ((glxc != prevglxc) && glxc->currentClient) {
|
|
||||||
/* Context is current to somebody else */
|
if ((glxc != prevglxc) && glxc->currentClient)
|
||||||
return BadAccess;
|
return BadAccess;
|
||||||
}
|
|
||||||
|
|
||||||
if (drawId) {
|
if (drawId) {
|
||||||
drawPriv = __glXGetDrawable(glxc, drawId, client, &status);
|
drawPriv = __glXGetDrawable(glxc, drawId, client, &status);
|
||||||
|
@ -648,38 +603,25 @@ DoMakeCurrent(__GLXclientState * cl,
|
||||||
if (readPriv == NULL)
|
if (readPriv == NULL)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
/* Switching to no context. Ignore new drawable. */
|
|
||||||
|
|
||||||
glxc = 0;
|
|
||||||
drawPriv = 0;
|
|
||||||
readPriv = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevglxc) {
|
if (prevglxc) {
|
||||||
/*
|
/* Flush the previous context if needed. */
|
||||||
** Flush the previous context if needed.
|
|
||||||
*/
|
|
||||||
Bool need_flush = !prevglxc->isDirect;
|
Bool need_flush = !prevglxc->isDirect;
|
||||||
#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
|
#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
|
||||||
if (prevglxc->releaseBehavior == GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB)
|
if (prevglxc->releaseBehavior == GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB)
|
||||||
need_flush = GL_FALSE;
|
need_flush = GL_FALSE;
|
||||||
#endif
|
#endif
|
||||||
if (need_flush) {
|
if (need_flush) {
|
||||||
if (__glXForceCurrent(cl, tag, (int *) &error)) {
|
if (!__glXForceCurrent(cl, tag, (int *) &error))
|
||||||
glFlush();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return error;
|
return error;
|
||||||
}
|
glFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Make the previous context not current. */
|
||||||
** Make the previous context not current.
|
if (!(*prevglxc->loseCurrent) (prevglxc))
|
||||||
*/
|
|
||||||
if (!(*prevglxc->loseCurrent) (prevglxc)) {
|
|
||||||
return __glXError(GLXBadContext);
|
return __glXError(GLXBadContext);
|
||||||
}
|
|
||||||
lastGLContext = NULL;
|
lastGLContext = NULL;
|
||||||
if (!prevglxc->isDirect) {
|
if (!prevglxc->isDirect) {
|
||||||
prevglxc->drawPriv = NULL;
|
prevglxc->drawPriv = NULL;
|
||||||
|
@ -687,8 +629,7 @@ DoMakeCurrent(__GLXclientState * cl,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((glxc != 0) && !glxc->isDirect) {
|
if (glxc && !glxc->isDirect) {
|
||||||
|
|
||||||
glxc->drawPriv = drawPriv;
|
glxc->drawPriv = drawPriv;
|
||||||
glxc->readPriv = readPriv;
|
glxc->readPriv = readPriv;
|
||||||
|
|
||||||
|
@ -702,66 +643,35 @@ DoMakeCurrent(__GLXclientState * cl,
|
||||||
}
|
}
|
||||||
|
|
||||||
glxc->currentClient = client;
|
glxc->currentClient = client;
|
||||||
|
glxServer.setContextTagPrivate(client, newContextTag, glxc);
|
||||||
}
|
}
|
||||||
|
|
||||||
StopUsingContext(prevglxc);
|
if (prevglxc) {
|
||||||
|
prevglxc->currentClient = NULL;
|
||||||
reply = (xGLXMakeCurrentReply) {
|
if (!prevglxc->idExists) {
|
||||||
.type = X_Reply,
|
FreeResourceByType(prevglxc->id, __glXContextRes, FALSE);
|
||||||
.sequenceNumber = client->sequence,
|
}
|
||||||
.length = 0,
|
|
||||||
.contextTag = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
if (glxc) {
|
|
||||||
StartUsingContext(cl, glxc);
|
|
||||||
reply.contextTag = glxc->id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
|
||||||
__GLX_SWAP_SHORT(&reply.sequenceNumber);
|
|
||||||
__GLX_SWAP_INT(&reply.length);
|
|
||||||
__GLX_SWAP_INT(&reply.contextTag);
|
|
||||||
}
|
|
||||||
WriteToClient(client, sz_xGLXMakeCurrentReply, &reply);
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__glXDisp_MakeCurrent(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_MakeCurrent(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
return BadImplementation;
|
||||||
xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXMakeCurrentReq);
|
|
||||||
|
|
||||||
return DoMakeCurrent(cl, req->drawable, req->drawable,
|
|
||||||
req->context, req->oldContextTag);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__glXDisp_MakeContextCurrent(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_MakeContextCurrent(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
return BadImplementation;
|
||||||
xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXMakeContextCurrentReq);
|
|
||||||
|
|
||||||
return DoMakeCurrent(cl, req->drawable, req->readdrawable,
|
|
||||||
req->context, req->oldContextTag);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__glXDisp_MakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_MakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
return BadImplementation;
|
||||||
xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXMakeCurrentReadSGIReq);
|
|
||||||
|
|
||||||
return DoMakeCurrent(cl, req->drawable, req->readable,
|
|
||||||
req->context, req->oldContextTag);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -773,8 +683,6 @@ __glXDisp_IsDirect(__GLXclientState * cl, GLbyte * pc)
|
||||||
__GLXcontext *glxc;
|
__GLXcontext *glxc;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXIsDirectReq);
|
|
||||||
|
|
||||||
if (!validGlxContext(cl->client, req->context, DixReadAccess, &glxc, &err))
|
if (!validGlxContext(cl->client, req->context, DixReadAccess, &glxc, &err))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -838,14 +746,11 @@ __glXDisp_QueryVersion(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDisp_WaitGL(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_WaitGL(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
|
xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
|
||||||
GLXContextTag tag;
|
GLXContextTag tag;
|
||||||
__GLXcontext *glxc = NULL;
|
__GLXcontext *glxc = NULL;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXWaitGLReq);
|
|
||||||
|
|
||||||
tag = req->contextTag;
|
tag = req->contextTag;
|
||||||
if (tag) {
|
if (tag) {
|
||||||
glxc = __glXLookupContextByTag(cl, tag);
|
glxc = __glXLookupContextByTag(cl, tag);
|
||||||
|
@ -867,14 +772,11 @@ __glXDisp_WaitGL(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDisp_WaitX(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_WaitX(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
|
xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
|
||||||
GLXContextTag tag;
|
GLXContextTag tag;
|
||||||
__GLXcontext *glxc = NULL;
|
__GLXcontext *glxc = NULL;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXWaitXReq);
|
|
||||||
|
|
||||||
tag = req->contextTag;
|
tag = req->contextTag;
|
||||||
if (tag) {
|
if (tag) {
|
||||||
glxc = __glXLookupContextByTag(cl, tag);
|
glxc = __glXLookupContextByTag(cl, tag);
|
||||||
|
@ -903,8 +805,6 @@ __glXDisp_CopyContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
__GLXcontext *src, *dst;
|
__GLXcontext *src, *dst;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXCopyContextReq);
|
|
||||||
|
|
||||||
source = req->source;
|
source = req->source;
|
||||||
dest = req->dest;
|
dest = req->dest;
|
||||||
tag = req->contextTag;
|
tag = req->contextTag;
|
||||||
|
@ -992,8 +892,6 @@ __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXGetVisualConfigsReq);
|
|
||||||
|
|
||||||
if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err))
|
if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -1213,10 +1111,8 @@ DoGetFBConfigs(__GLXclientState * cl, unsigned screen)
|
||||||
int
|
int
|
||||||
__glXDisp_GetFBConfigs(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_GetFBConfigs(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
|
xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXGetFBConfigsReq);
|
|
||||||
return DoGetFBConfigs(cl, req->screen);
|
return DoGetFBConfigs(cl, req->screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1287,8 +1183,6 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen * pGlxScreen,
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
LEGAL_NEW_RESOURCE(glxDrawableId, client);
|
|
||||||
|
|
||||||
err = dixLookupDrawable(&pDraw, drawableId, client, 0, DixAddAccess);
|
err = dixLookupDrawable(&pDraw, drawableId, client, 0, DixAddAccess);
|
||||||
if (err != Success) {
|
if (err != Success) {
|
||||||
client->errorValue = drawableId;
|
client->errorValue = drawableId;
|
||||||
|
@ -1354,14 +1248,11 @@ determineTextureTarget(ClientPtr client, XID glxDrawableID,
|
||||||
int
|
int
|
||||||
__glXDisp_CreateGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_CreateGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
|
xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
|
||||||
__GLXconfig *config;
|
__GLXconfig *config;
|
||||||
__GLXscreen *pGlxScreen;
|
__GLXscreen *pGlxScreen;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapReq);
|
|
||||||
|
|
||||||
if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err))
|
if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err))
|
||||||
return err;
|
return err;
|
||||||
if (!validGlxVisual(cl->client, pGlxScreen, req->visual, &config, &err))
|
if (!validGlxVisual(cl->client, pGlxScreen, req->visual, &config, &err))
|
||||||
|
@ -1442,11 +1333,8 @@ DoDestroyDrawable(__GLXclientState * cl, XID glxdrawable, int type)
|
||||||
int
|
int
|
||||||
__glXDisp_DestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_DestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
|
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXDestroyGLXPixmapReq);
|
|
||||||
|
|
||||||
return DoDestroyDrawable(cl, req->glxpixmap, GLX_DRAWABLE_PIXMAP);
|
return DoDestroyDrawable(cl, req->glxpixmap, GLX_DRAWABLE_PIXMAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1472,8 +1360,6 @@ DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId,
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
LEGAL_NEW_RESOURCE(glxDrawableId, client);
|
|
||||||
|
|
||||||
if (!validGlxScreen(client, screenNum, &pGlxScreen, &err))
|
if (!validGlxScreen(client, screenNum, &pGlxScreen, &err))
|
||||||
return err;
|
return err;
|
||||||
if (!validGlxFBConfig(client, pGlxScreen, fbconfigId, &config, &err))
|
if (!validGlxFBConfig(client, pGlxScreen, fbconfigId, &config, &err))
|
||||||
|
@ -1658,8 +1544,6 @@ __glXDisp_CreateWindow(__GLXclientState * cl, GLbyte * pc)
|
||||||
}
|
}
|
||||||
REQUEST_FIXED_SIZE(xGLXCreateWindowReq, req->numAttribs << 3);
|
REQUEST_FIXED_SIZE(xGLXCreateWindowReq, req->numAttribs << 3);
|
||||||
|
|
||||||
LEGAL_NEW_RESOURCE(req->glxwindow, client);
|
|
||||||
|
|
||||||
if (!validGlxScreen(client, req->screen, &pGlxScreen, &err))
|
if (!validGlxScreen(client, req->screen, &pGlxScreen, &err))
|
||||||
return err;
|
return err;
|
||||||
if (!validGlxFBConfig(client, pGlxScreen, req->fbconfig, &config, &err))
|
if (!validGlxFBConfig(client, pGlxScreen, req->fbconfig, &config, &err))
|
||||||
|
@ -1709,8 +1593,6 @@ __glXDisp_SwapBuffers(__GLXclientState * cl, GLbyte * pc)
|
||||||
__GLXdrawable *pGlxDraw;
|
__GLXdrawable *pGlxDraw;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXSwapBuffersReq);
|
|
||||||
|
|
||||||
tag = req->contextTag;
|
tag = req->contextTag;
|
||||||
drawId = req->drawable;
|
drawId = req->drawable;
|
||||||
if (tag) {
|
if (tag) {
|
||||||
|
@ -1813,11 +1695,8 @@ __glXDisp_QueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDisp_QueryContext(__GLXclientState * cl, GLbyte * pc)
|
__glXDisp_QueryContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
|
xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXQueryContextReq);
|
|
||||||
|
|
||||||
return DoQueryContext(cl, req->context);
|
return DoQueryContext(cl, req->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2453,8 +2332,6 @@ __glXDisp_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
|
||||||
char *buf;
|
char *buf;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXQueryExtensionsStringReq);
|
|
||||||
|
|
||||||
if (!validGlxScreen(client, req->screen, &pGlxScreen, &err))
|
if (!validGlxScreen(client, req->screen, &pGlxScreen, &err))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -2508,8 +2385,6 @@ __glXDisp_QueryServerString(__GLXclientState * cl, GLbyte * pc)
|
||||||
__GLXscreen *pGlxScreen;
|
__GLXscreen *pGlxScreen;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXQueryServerStringReq);
|
|
||||||
|
|
||||||
if (!validGlxScreen(client, req->screen, &pGlxScreen, &err))
|
if (!validGlxScreen(client, req->screen, &pGlxScreen, &err))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
|
@ -56,13 +56,10 @@
|
||||||
int
|
int
|
||||||
__glXDispSwap_CreateContext(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_CreateContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
|
xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXCreateContextReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->context);
|
__GLX_SWAP_INT(&req->context);
|
||||||
__GLX_SWAP_INT(&req->visual);
|
__GLX_SWAP_INT(&req->visual);
|
||||||
|
@ -75,13 +72,10 @@ __glXDispSwap_CreateContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_CreateNewContext(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_CreateNewContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
|
xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXCreateNewContextReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->context);
|
__GLX_SWAP_INT(&req->context);
|
||||||
__GLX_SWAP_INT(&req->fbconfig);
|
__GLX_SWAP_INT(&req->fbconfig);
|
||||||
|
@ -115,13 +109,10 @@ __glXDispSwap_CreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_DestroyContext(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_DestroyContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
|
xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXDestroyContextReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->context);
|
__GLX_SWAP_INT(&req->context);
|
||||||
|
|
||||||
|
@ -131,69 +122,28 @@ __glXDispSwap_DestroyContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_MakeCurrent(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_MakeCurrent(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
return BadImplementation;
|
||||||
xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
|
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXMakeCurrentReq);
|
|
||||||
|
|
||||||
__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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__glXDispSwap_MakeContextCurrent(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_MakeContextCurrent(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
return BadImplementation;
|
||||||
xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
|
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXMakeContextCurrentReq);
|
|
||||||
|
|
||||||
__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);
|
|
||||||
|
|
||||||
return __glXDisp_MakeContextCurrent(cl, pc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__glXDispSwap_MakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_MakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
return BadImplementation;
|
||||||
xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
|
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXMakeCurrentReadSGIReq);
|
|
||||||
|
|
||||||
__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);
|
|
||||||
|
|
||||||
return __glXDisp_MakeCurrentReadSGI(cl, pc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__glXDispSwap_IsDirect(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_IsDirect(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
|
xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXIsDirectReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->context);
|
__GLX_SWAP_INT(&req->context);
|
||||||
|
|
||||||
|
@ -203,13 +153,10 @@ __glXDispSwap_IsDirect(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_QueryVersion(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_QueryVersion(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc;
|
xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXQueryVersionReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->majorVersion);
|
__GLX_SWAP_INT(&req->majorVersion);
|
||||||
__GLX_SWAP_INT(&req->minorVersion);
|
__GLX_SWAP_INT(&req->minorVersion);
|
||||||
|
@ -220,13 +167,10 @@ __glXDispSwap_QueryVersion(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_WaitGL(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_WaitGL(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
|
xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXWaitGLReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->contextTag);
|
__GLX_SWAP_INT(&req->contextTag);
|
||||||
|
|
||||||
|
@ -236,13 +180,10 @@ __glXDispSwap_WaitGL(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_WaitX(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_WaitX(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
|
xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXWaitXReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->contextTag);
|
__GLX_SWAP_INT(&req->contextTag);
|
||||||
|
|
||||||
|
@ -252,13 +193,10 @@ __glXDispSwap_WaitX(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_CopyContext(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_CopyContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
|
xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXCopyContextReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->source);
|
__GLX_SWAP_INT(&req->source);
|
||||||
__GLX_SWAP_INT(&req->dest);
|
__GLX_SWAP_INT(&req->dest);
|
||||||
|
@ -270,13 +208,10 @@ __glXDispSwap_CopyContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
|
xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXGetVisualConfigsReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_INT(&req->screen);
|
__GLX_SWAP_INT(&req->screen);
|
||||||
return __glXDisp_GetVisualConfigs(cl, pc);
|
return __glXDisp_GetVisualConfigs(cl, pc);
|
||||||
}
|
}
|
||||||
|
@ -284,13 +219,10 @@ __glXDispSwap_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_GetFBConfigs(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_GetFBConfigs(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
|
xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXGetFBConfigsReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_INT(&req->screen);
|
__GLX_SWAP_INT(&req->screen);
|
||||||
return __glXDisp_GetFBConfigs(cl, pc);
|
return __glXDisp_GetFBConfigs(cl, pc);
|
||||||
}
|
}
|
||||||
|
@ -312,13 +244,10 @@ __glXDispSwap_GetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_CreateGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_CreateGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
|
xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->screen);
|
__GLX_SWAP_INT(&req->screen);
|
||||||
__GLX_SWAP_INT(&req->visual);
|
__GLX_SWAP_INT(&req->visual);
|
||||||
|
@ -380,13 +309,10 @@ __glXDispSwap_CreateGLXPixmapWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_DestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_DestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
|
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXDestroyGLXPixmapReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->glxpixmap);
|
__GLX_SWAP_INT(&req->glxpixmap);
|
||||||
|
|
||||||
|
@ -412,13 +338,10 @@ __glXDispSwap_DestroyPixmap(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_QueryContext(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_QueryContext(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
|
xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXQueryContextReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_INT(&req->context);
|
__GLX_SWAP_INT(&req->context);
|
||||||
|
|
||||||
return __glXDisp_QueryContext(cl, pc);
|
return __glXDisp_QueryContext(cl, pc);
|
||||||
|
@ -474,13 +397,10 @@ __glXDispSwap_CreateGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_DestroyPbuffer(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_DestroyPbuffer(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
|
xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXDestroyPbufferReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_INT(&req->pbuffer);
|
__GLX_SWAP_INT(&req->pbuffer);
|
||||||
|
|
||||||
return __glXDisp_DestroyPbuffer(cl, pc);
|
return __glXDisp_DestroyPbuffer(cl, pc);
|
||||||
|
@ -604,13 +524,10 @@ __glXDispSwap_DestroyWindow(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_SwapBuffers(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_SwapBuffers(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
|
xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXSwapBuffersReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->contextTag);
|
__GLX_SWAP_INT(&req->contextTag);
|
||||||
__GLX_SWAP_INT(&req->drawable);
|
__GLX_SWAP_INT(&req->drawable);
|
||||||
|
@ -621,13 +538,10 @@ __glXDispSwap_SwapBuffers(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_UseXFont(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_UseXFont(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc;
|
xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXUseXFontReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->contextTag);
|
__GLX_SWAP_INT(&req->contextTag);
|
||||||
__GLX_SWAP_INT(&req->font);
|
__GLX_SWAP_INT(&req->font);
|
||||||
|
@ -641,13 +555,10 @@ __glXDispSwap_UseXFont(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc;
|
xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXQueryExtensionsStringReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->screen);
|
__GLX_SWAP_INT(&req->screen);
|
||||||
|
|
||||||
|
@ -657,13 +568,10 @@ __glXDispSwap_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
|
||||||
int
|
int
|
||||||
__glXDispSwap_QueryServerString(__GLXclientState * cl, GLbyte * pc)
|
__glXDispSwap_QueryServerString(__GLXclientState * cl, GLbyte * pc)
|
||||||
{
|
{
|
||||||
ClientPtr client = cl->client;
|
|
||||||
xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc;
|
xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXQueryServerStringReq);
|
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
__GLX_SWAP_INT(&req->screen);
|
__GLX_SWAP_INT(&req->screen);
|
||||||
__GLX_SWAP_INT(&req->name);
|
__GLX_SWAP_INT(&req->name);
|
||||||
|
|
341
glx/glxext.c
341
glx/glxext.c
|
@ -46,10 +46,12 @@
|
||||||
#include "glxext.h"
|
#include "glxext.h"
|
||||||
#include "indirect_table.h"
|
#include "indirect_table.h"
|
||||||
#include "indirect_util.h"
|
#include "indirect_util.h"
|
||||||
|
#include "glxvndabi.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** X resources.
|
** X resources.
|
||||||
*/
|
*/
|
||||||
|
static int glxGeneration;
|
||||||
RESTYPE __glXContextRes;
|
RESTYPE __glXContextRes;
|
||||||
RESTYPE __glXDrawableRes;
|
RESTYPE __glXDrawableRes;
|
||||||
|
|
||||||
|
@ -63,15 +65,6 @@ static DevPrivateKeyRec glxClientPrivateKeyRec;
|
||||||
static int __glXDispatch(ClientPtr);
|
static int __glXDispatch(ClientPtr);
|
||||||
static GLboolean __glXFreeContext(__GLXcontext * cx);
|
static GLboolean __glXFreeContext(__GLXcontext * cx);
|
||||||
|
|
||||||
/*
|
|
||||||
** Called when the extension is reset.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
ResetExtension(ExtensionEntry * extEntry)
|
|
||||||
{
|
|
||||||
lastGLContext = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Reset state used to keep track of large (multi-request) commands.
|
** Reset state used to keep track of large (multi-request) commands.
|
||||||
*/
|
*/
|
||||||
|
@ -86,16 +79,18 @@ __glXResetLargeCommandStatus(__GLXclientState * cl)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This procedure is called when the client who created the context goes away
|
* This procedure is called when the client who created the context goes away
|
||||||
* OR when glXDestroyContext is called. In either case, all we do is flag that
|
* OR when glXDestroyContext is called. If the context is current for a client
|
||||||
* the ID is no longer valid, and (maybe) free the context.
|
* the dispatch layer will have moved the context struct to a fake resource ID
|
||||||
|
* and cx here will be NULL. Otherwise we really free the context.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ContextGone(__GLXcontext * cx, XID id)
|
ContextGone(__GLXcontext * cx, XID id)
|
||||||
{
|
{
|
||||||
cx->idExists = GL_FALSE;
|
if (!cx)
|
||||||
if (!cx->currentClient) {
|
return TRUE;
|
||||||
|
|
||||||
|
if (!cx->currentClient)
|
||||||
__glXFreeContext(cx);
|
__glXFreeContext(cx);
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -271,29 +266,14 @@ glxClientCallback(CallbackListPtr *list, void *closure, void *data)
|
||||||
NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
|
NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
|
||||||
ClientPtr pClient = clientinfo->client;
|
ClientPtr pClient = clientinfo->client;
|
||||||
__GLXclientState *cl = glxGetClient(pClient);
|
__GLXclientState *cl = glxGetClient(pClient);
|
||||||
__GLXcontext *c, *next;
|
|
||||||
|
|
||||||
switch (pClient->clientState) {
|
switch (pClient->clientState) {
|
||||||
case ClientStateRunning:
|
|
||||||
cl->client = pClient;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ClientStateGone:
|
case ClientStateGone:
|
||||||
/* detach from all current contexts */
|
|
||||||
for (c = glxAllContexts; c; c = next) {
|
|
||||||
next = c->next;
|
|
||||||
if (c->currentClient == pClient) {
|
|
||||||
c->loseCurrent(c);
|
|
||||||
lastGLContext = NULL;
|
|
||||||
c->currentClient = NULL;
|
|
||||||
FreeResourceByType(c->id, __glXContextRes, FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
free(cl->returnBuf);
|
free(cl->returnBuf);
|
||||||
free(cl->largeCmdBuf);
|
free(cl->largeCmdBuf);
|
||||||
free(cl->GLClientextensions);
|
free(cl->GLClientextensions);
|
||||||
memset(cl, 0, sizeof(*cl));
|
cl->returnBuf = NULL;
|
||||||
|
cl->GLClientextensions = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -303,7 +283,7 @@ glxClientCallback(CallbackListPtr *list, void *closure, void *data)
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
static __GLXprovider *__glXProviderStack;
|
static __GLXprovider *__glXProviderStack = &__glXDRISWRastProvider;
|
||||||
|
|
||||||
void
|
void
|
||||||
GlxPushProvider(__GLXprovider * provider)
|
GlxPushProvider(__GLXprovider * provider)
|
||||||
|
@ -346,50 +326,236 @@ GetGLXDrawableBytes(void *value, XID id, ResourceSizePtr size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
static void
|
||||||
** Initialize the GLX extension.
|
xorgGlxCloseExtension(const ExtensionEntry *extEntry)
|
||||||
*/
|
|
||||||
void
|
|
||||||
GlxExtensionInit(void)
|
|
||||||
{
|
{
|
||||||
ExtensionEntry *extEntry;
|
lastGLContext = NULL;
|
||||||
ScreenPtr pScreen;
|
}
|
||||||
int i;
|
|
||||||
__GLXprovider *p, **stack;
|
|
||||||
Bool glx_provided = FALSE;
|
|
||||||
|
|
||||||
if (serverGeneration == 1) {
|
static int
|
||||||
for (stack = &__glXProviderStack; *stack; stack = &(*stack)->next)
|
xorgGlxHandleRequest(ClientPtr client)
|
||||||
;
|
{
|
||||||
*stack = &__glXDRISWRastProvider;
|
return __glXDispatch(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ScreenPtr
|
||||||
|
screenNumToScreen(int screen)
|
||||||
|
{
|
||||||
|
if (screen < 0 || screen >= screenInfo.numScreens)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return screenInfo.screens[screen];
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
maybe_swap32(ClientPtr client, int x)
|
||||||
|
{
|
||||||
|
return client->swapped ? bswap_32(x) : x;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GlxServerVendor *
|
||||||
|
vendorForScreen(ClientPtr client, int screen)
|
||||||
|
{
|
||||||
|
screen = maybe_swap32(client, screen);
|
||||||
|
|
||||||
|
return glxServer.getVendorForScreen(client, screenNumToScreen(screen));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* this ought to be generated */
|
||||||
|
static int
|
||||||
|
xorgGlxThunkRequest(ClientPtr client)
|
||||||
|
{
|
||||||
|
REQUEST(xGLXVendorPrivateReq);
|
||||||
|
CARD32 vendorCode = maybe_swap32(client, stuff->vendorCode);
|
||||||
|
GlxServerVendor *vendor = NULL;
|
||||||
|
XID resource = 0;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
switch (vendorCode) {
|
||||||
|
case X_GLXvop_QueryContextInfoEXT: {
|
||||||
|
xGLXQueryContextInfoEXTReq *req = (void *)stuff;
|
||||||
|
REQUEST_AT_LEAST_SIZE(*req);
|
||||||
|
if (!(vendor = glxServer.getXIDMap(maybe_swap32(client, req->context))))
|
||||||
|
return __glXError(GLXBadContext);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case X_GLXvop_GetFBConfigsSGIX: {
|
||||||
|
xGLXGetFBConfigsSGIXReq *req = (void *)stuff;
|
||||||
|
REQUEST_AT_LEAST_SIZE(*req);
|
||||||
|
if (!(vendor = vendorForScreen(client, req->screen)))
|
||||||
|
return BadValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case X_GLXvop_CreateContextWithConfigSGIX: {
|
||||||
|
xGLXCreateContextWithConfigSGIXReq *req = (void *)stuff;
|
||||||
|
REQUEST_AT_LEAST_SIZE(*req);
|
||||||
|
resource = maybe_swap32(client, req->context);
|
||||||
|
if (!(vendor = vendorForScreen(client, req->screen)))
|
||||||
|
return BadValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case X_GLXvop_CreateGLXPixmapWithConfigSGIX: {
|
||||||
|
xGLXCreateGLXPixmapWithConfigSGIXReq *req = (void *)stuff;
|
||||||
|
REQUEST_AT_LEAST_SIZE(*req);
|
||||||
|
resource = maybe_swap32(client, req->glxpixmap);
|
||||||
|
if (!(vendor = vendorForScreen(client, req->screen)))
|
||||||
|
return BadValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case X_GLXvop_CreateGLXPbufferSGIX: {
|
||||||
|
xGLXCreateGLXPbufferSGIXReq *req = (void *)stuff;
|
||||||
|
REQUEST_AT_LEAST_SIZE(*req);
|
||||||
|
resource = maybe_swap32(client, req->pbuffer);
|
||||||
|
if (!(vendor = vendorForScreen(client, req->screen)))
|
||||||
|
return BadValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* same offset for the drawable for these three */
|
||||||
|
case X_GLXvop_DestroyGLXPbufferSGIX:
|
||||||
|
case X_GLXvop_ChangeDrawableAttributesSGIX:
|
||||||
|
case X_GLXvop_GetDrawableAttributesSGIX: {
|
||||||
|
xGLXGetDrawableAttributesSGIXReq *req = (void *)stuff;
|
||||||
|
REQUEST_AT_LEAST_SIZE(*req);
|
||||||
|
if (!(vendor = glxServer.getXIDMap(maybe_swap32(client,
|
||||||
|
req->drawable))))
|
||||||
|
return __glXError(GLXBadDrawable);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* most things just use the standard context tag */
|
||||||
|
default: {
|
||||||
|
/* size checked by vnd layer already */
|
||||||
|
GLXContextTag tag = maybe_swap32(client, stuff->contextTag);
|
||||||
|
vendor = glxServer.getContextTag(client, tag);
|
||||||
|
if (!vendor)
|
||||||
|
return __glXError(GLXBadContextTag);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mesa requires at least one True/DirectColor visual */
|
/* If we're creating a resource, add the map now */
|
||||||
if (!checkScreenVisuals())
|
if (resource) {
|
||||||
return;
|
LEGAL_NEW_RESOURCE(resource, client);
|
||||||
|
if (!glxServer.addXIDMap(resource, vendor))
|
||||||
|
return BadAlloc;
|
||||||
|
}
|
||||||
|
|
||||||
__glXContextRes = CreateNewResourceType((DeleteType) ContextGone,
|
ret = glxServer.forwardRequest(vendor, client);
|
||||||
"GLXContext");
|
|
||||||
__glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone,
|
|
||||||
"GLXDrawable");
|
|
||||||
if (!__glXContextRes || !__glXDrawableRes)
|
|
||||||
return;
|
|
||||||
|
|
||||||
SetResourceTypeSizeFunc(__glXDrawableRes, GetGLXDrawableBytes);
|
if (ret == Success && vendorCode == X_GLXvop_DestroyGLXPbufferSGIX) {
|
||||||
|
xGLXDestroyGLXPbufferSGIXReq *req = (void *)stuff;
|
||||||
|
glxServer.removeXIDMap(maybe_swap32(client, req->pbuffer));
|
||||||
|
}
|
||||||
|
|
||||||
if (!dixRegisterPrivateKey
|
if (ret != Success)
|
||||||
(&glxClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(__GLXclientState)))
|
glxServer.removeXIDMap(resource);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GlxServerDispatchProc
|
||||||
|
xorgGlxGetDispatchAddress(CARD8 minorOpcode, CARD32 vendorCode)
|
||||||
|
{
|
||||||
|
/* we don't support any other GLX opcodes */
|
||||||
|
if (minorOpcode != X_GLXVendorPrivate &&
|
||||||
|
minorOpcode != X_GLXVendorPrivateWithReply)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/* we only support some vendor private requests */
|
||||||
|
if (!__glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, vendorCode,
|
||||||
|
FALSE))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return xorgGlxThunkRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Bool
|
||||||
|
xorgGlxServerPreInit(const ExtensionEntry *extEntry)
|
||||||
|
{
|
||||||
|
if (glxGeneration != serverGeneration) {
|
||||||
|
/* Mesa requires at least one True/DirectColor visual */
|
||||||
|
if (!checkScreenVisuals())
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
__glXContextRes = CreateNewResourceType((DeleteType) ContextGone,
|
||||||
|
"GLXContext");
|
||||||
|
__glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone,
|
||||||
|
"GLXDrawable");
|
||||||
|
if (!__glXContextRes || !__glXDrawableRes)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (!dixRegisterPrivateKey
|
||||||
|
(&glxClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(__GLXclientState)))
|
||||||
|
return FALSE;
|
||||||
|
if (!AddCallback(&ClientStateCallback, glxClientCallback, 0))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
__glXErrorBase = extEntry->errorBase;
|
||||||
|
__glXEventBase = extEntry->eventBase;
|
||||||
|
|
||||||
|
SetResourceTypeSizeFunc(__glXDrawableRes, GetGLXDrawableBytes);
|
||||||
|
#if PRESENT
|
||||||
|
__glXregisterPresentCompleteNotify();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
glxGeneration = serverGeneration;
|
||||||
|
}
|
||||||
|
|
||||||
|
return glxGeneration == serverGeneration;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GlxServerVendor *glvnd_vendor = NULL;
|
||||||
|
|
||||||
|
static GlxServerVendor *
|
||||||
|
xorgGlxInitGLVNDVendor(void)
|
||||||
|
{
|
||||||
|
if (glvnd_vendor == NULL) {
|
||||||
|
GlxServerImports *imports = NULL;
|
||||||
|
imports = glxServer.allocateServerImports();
|
||||||
|
|
||||||
|
if (imports != NULL) {
|
||||||
|
imports->extensionCloseDown = xorgGlxCloseExtension;
|
||||||
|
imports->handleRequest = xorgGlxHandleRequest;
|
||||||
|
imports->getDispatchAddress = xorgGlxGetDispatchAddress;
|
||||||
|
imports->makeCurrent = xorgGlxMakeCurrent;
|
||||||
|
glvnd_vendor = glxServer.createVendor(imports);
|
||||||
|
glxServer.freeServerImports(imports);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return glvnd_vendor;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xorgGlxServerInit(CallbackListPtr *pcbl, void *param, void *ext)
|
||||||
|
{
|
||||||
|
const ExtensionEntry *extEntry = ext;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!xorgGlxServerPreInit(extEntry)) {
|
||||||
return;
|
return;
|
||||||
if (!AddCallback(&ClientStateCallback, glxClientCallback, 0))
|
}
|
||||||
|
|
||||||
|
if (!xorgGlxInitGLVNDVendor()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||||
pScreen = screenInfo.screens[i];
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
|
__GLXprovider *p;
|
||||||
|
|
||||||
|
if (glxServer.getVendorForScreen(NULL, pScreen) != NULL) {
|
||||||
|
// There's already a vendor registered.
|
||||||
|
LogMessage(X_INFO, "GLX: Another vendor is already registered for screen %d\n", i);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (p = __glXProviderStack; p != NULL; p = p->next) {
|
for (p = __glXProviderStack; p != NULL; p = p->next) {
|
||||||
__GLXscreen *glxScreen;
|
__GLXscreen *glxScreen = p->screenProbe(pScreen);
|
||||||
|
|
||||||
glxScreen = p->screenProbe(pScreen);
|
|
||||||
if (glxScreen != NULL) {
|
if (glxScreen != NULL) {
|
||||||
LogMessage(X_INFO,
|
LogMessage(X_INFO,
|
||||||
"GLX: Initialized %s GL provider for screen %d\n",
|
"GLX: Initialized %s GL provider for screen %d\n",
|
||||||
|
@ -399,33 +565,19 @@ GlxExtensionInit(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p)
|
if (p) {
|
||||||
|
glxServer.setScreenVendor(pScreen, glvnd_vendor);
|
||||||
|
} else {
|
||||||
LogMessage(X_INFO,
|
LogMessage(X_INFO,
|
||||||
"GLX: no usable GL providers found for screen %d\n", i);
|
"GLX: no usable GL providers found for screen %d\n", i);
|
||||||
else
|
}
|
||||||
glx_provided = TRUE;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* don't register extension if GL is not provided on any screen */
|
Bool
|
||||||
if (!glx_provided)
|
xorgGlxCreateVendor(void)
|
||||||
return;
|
{
|
||||||
|
return AddCallback(glxServer.extensionInitCallback, xorgGlxServerInit, NULL);
|
||||||
/*
|
|
||||||
** Add extension to server extensions.
|
|
||||||
*/
|
|
||||||
extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS,
|
|
||||||
__GLX_NUMBER_ERRORS, __glXDispatch,
|
|
||||||
__glXDispatch, ResetExtension, StandardMinorOpcode);
|
|
||||||
if (!extEntry) {
|
|
||||||
FatalError("__glXExtensionInit: AddExtensions failed\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
__glXErrorBase = extEntry->errorBase;
|
|
||||||
__glXEventBase = extEntry->eventBase;
|
|
||||||
#if PRESENT
|
|
||||||
__glXregisterPresentCompleteNotify();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
@ -500,7 +652,7 @@ glxSuspendClients(void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 1; i < currentMaxClients; i++) {
|
for (i = 1; i < currentMaxClients; i++) {
|
||||||
if (clients[i] && glxGetClient(clients[i])->inUse)
|
if (glxGetClient(clients[i])->client)
|
||||||
IgnoreClient(clients[i]);
|
IgnoreClient(clients[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,7 +668,7 @@ glxResumeClients(void)
|
||||||
glxBlockClients = FALSE;
|
glxBlockClients = FALSE;
|
||||||
|
|
||||||
for (i = 1; i < currentMaxClients; i++) {
|
for (i = 1; i < currentMaxClients; i++) {
|
||||||
if (clients[i] && glxGetClient(clients[i])->inUse)
|
if (glxGetClient(clients[i])->client)
|
||||||
AttendClient(clients[i]);
|
AttendClient(clients[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,12 +705,10 @@ __glXDispatch(ClientPtr client)
|
||||||
CARD8 opcode;
|
CARD8 opcode;
|
||||||
__GLXdispatchSingleProcPtr proc;
|
__GLXdispatchSingleProcPtr proc;
|
||||||
__GLXclientState *cl;
|
__GLXclientState *cl;
|
||||||
int retval;
|
int retval = BadRequest;
|
||||||
|
|
||||||
opcode = stuff->glxCode;
|
opcode = stuff->glxCode;
|
||||||
cl = glxGetClient(client);
|
cl = glxGetClient(client);
|
||||||
/* Mark it in use so we suspend it on VT switch. */
|
|
||||||
cl->inUse = TRUE;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** If we're expecting a glXRenderLarge request, this better be one.
|
** If we're expecting a glXRenderLarge request, this better be one.
|
||||||
|
@ -568,6 +718,9 @@ __glXDispatch(ClientPtr client)
|
||||||
return __glXError(GLXBadLargeRequest);
|
return __glXError(GLXBadLargeRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!cl->client)
|
||||||
|
cl->client = client;
|
||||||
|
|
||||||
/* If we're currently blocking GLX clients, just put this guy to
|
/* If we're currently blocking GLX clients, just put this guy to
|
||||||
* sleep, reset the request and return. */
|
* sleep, reset the request and return. */
|
||||||
if (glxBlockClients) {
|
if (glxBlockClients) {
|
||||||
|
@ -582,12 +735,8 @@ __glXDispatch(ClientPtr client)
|
||||||
*/
|
*/
|
||||||
proc = __glXGetProtocolDecodeFunction(&Single_dispatch_info, opcode,
|
proc = __glXGetProtocolDecodeFunction(&Single_dispatch_info, opcode,
|
||||||
client->swapped);
|
client->swapped);
|
||||||
if (proc != NULL) {
|
if (proc != NULL)
|
||||||
retval = (*proc) (cl, (GLbyte *) stuff);
|
retval = (*proc) (cl, (GLbyte *) stuff);
|
||||||
}
|
|
||||||
else {
|
|
||||||
retval = BadRequest;
|
|
||||||
}
|
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,4 +62,8 @@ extern void __glXResetLargeCommandStatus(__GLXclientState *);
|
||||||
extern const char GLServerVersion[];
|
extern const char GLServerVersion[];
|
||||||
extern int DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap);
|
extern int DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap);
|
||||||
|
|
||||||
|
extern int
|
||||||
|
xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
|
||||||
|
XID contextId, GLXContextTag newContextTag);
|
||||||
|
|
||||||
#endif /* _glxext_h_ */
|
#endif /* _glxext_h_ */
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "extension_string.h"
|
#include "extension_string.h"
|
||||||
|
#include "glxvndabi.h"
|
||||||
|
|
||||||
typedef struct __GLXconfig __GLXconfig;
|
typedef struct __GLXconfig __GLXconfig;
|
||||||
struct __GLXconfig {
|
struct __GLXconfig {
|
||||||
|
|
|
@ -109,11 +109,6 @@ __glXregisterPresentCompleteNotify(void);
|
||||||
** State kept per client.
|
** State kept per client.
|
||||||
*/
|
*/
|
||||||
struct __GLXclientStateRec {
|
struct __GLXclientStateRec {
|
||||||
/*
|
|
||||||
** Whether this structure is currently being used to support a client.
|
|
||||||
*/
|
|
||||||
Bool inUse;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Buffer for returned data.
|
** Buffer for returned data.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -152,8 +152,6 @@ __glXDisp_UseXFont(__GLXclientState * cl, GLbyte * pc)
|
||||||
__GLXcontext *cx;
|
__GLXcontext *cx;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGLXUseXFontReq);
|
|
||||||
|
|
||||||
req = (xGLXUseXFontReq *) pc;
|
req = (xGLXUseXFontReq *) pc;
|
||||||
cx = __glXForceCurrent(cl, req->contextTag, &error);
|
cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include "glamor.h"
|
#include "glamor.h"
|
||||||
#endif
|
#endif
|
||||||
#include "ephyr_glamor_glx.h"
|
#include "ephyr_glamor_glx.h"
|
||||||
|
#include "glx_extinit.h"
|
||||||
#include "xkbsrv.h"
|
#include "xkbsrv.h"
|
||||||
|
|
||||||
extern Bool ephyr_glamor;
|
extern Bool ephyr_glamor;
|
||||||
|
|
|
@ -56,6 +56,7 @@ executable(
|
||||||
libxserver_xkb_stubs,
|
libxserver_xkb_stubs,
|
||||||
libxserver_xi_stubs,
|
libxserver_xi_stubs,
|
||||||
libxserver_glx,
|
libxserver_glx,
|
||||||
|
libglxvnd,
|
||||||
],
|
],
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#ifdef RANDR
|
#ifdef RANDR
|
||||||
#include <randrstr.h>
|
#include <randrstr.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include "glx_extinit.h"
|
||||||
|
|
||||||
#ifdef XV
|
#ifdef XV
|
||||||
#include "kxv.h"
|
#include "kxv.h"
|
||||||
|
@ -973,6 +974,8 @@ KdInitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
for (screen = card->screenList; screen; screen = screen->next)
|
for (screen = card->screenList; screen; screen = screen->next)
|
||||||
KdAddScreen(pScreenInfo, screen, argc, argv);
|
KdAddScreen(pScreenInfo, screen, argc, argv);
|
||||||
|
|
||||||
|
xorgGlxCreateVendor();
|
||||||
|
|
||||||
#if defined(CONFIG_UDEV) || defined(CONFIG_HAL)
|
#if defined(CONFIG_UDEV) || defined(CONFIG_HAL)
|
||||||
if (SeatId) /* Enable input hot-plugging */
|
if (SeatId) /* Enable input hot-plugging */
|
||||||
config_pre_init();
|
config_pre_init();
|
||||||
|
|
|
@ -1002,6 +1002,8 @@ InitOutput(ScreenInfo * screen_info, int argc, char **argv)
|
||||||
vfbPixmapDepths[32] = TRUE;
|
vfbPixmapDepths[32] = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xorgGlxCreateVendor();
|
||||||
|
|
||||||
for (i = 1; i <= 32; i++) {
|
for (i = 1; i <= 32; i++) {
|
||||||
if (vfbPixmapDepths[i]) {
|
if (vfbPixmapDepths[i]) {
|
||||||
if (NumFormats >= MAXFORMATS)
|
if (NumFormats >= MAXFORMATS)
|
||||||
|
|
|
@ -15,7 +15,8 @@ xvfb_server = executable(
|
||||||
libxserver,
|
libxserver,
|
||||||
libxserver_xkb_stubs,
|
libxserver_xkb_stubs,
|
||||||
libxserver_xi_stubs,
|
libxserver_xi_stubs,
|
||||||
libxserver_glx
|
libxserver_glx,
|
||||||
|
libglxvnd,
|
||||||
],
|
],
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -14,6 +14,10 @@ DRI3_BUILDDIR = $(top_builddir)/dri3
|
||||||
DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la
|
DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if GLX
|
||||||
|
GLXVND_LIB = $(top_builddir)/glx/libglxvnd.la
|
||||||
|
endif
|
||||||
|
|
||||||
if GLAMOR_EGL
|
if GLAMOR_EGL
|
||||||
GLAMOR_EGL_SUBDIR = glamor_egl
|
GLAMOR_EGL_SUBDIR = glamor_egl
|
||||||
endif
|
endif
|
||||||
|
@ -70,6 +74,7 @@ LOCAL_LIBS = \
|
||||||
$(DRI_LIB) \
|
$(DRI_LIB) \
|
||||||
$(DRI2_LIB) \
|
$(DRI2_LIB) \
|
||||||
$(DRI3_LIB) \
|
$(DRI3_LIB) \
|
||||||
|
$(GLXVND_LIB) \
|
||||||
$(top_builddir)/miext/sync/libsync.la \
|
$(top_builddir)/miext/sync/libsync.la \
|
||||||
$(top_builddir)/mi/libmi.la \
|
$(top_builddir)/mi/libmi.la \
|
||||||
$(top_builddir)/os/libos.la \
|
$(top_builddir)/os/libos.la \
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
#include "xf86InPriv.h"
|
#include "xf86InPriv.h"
|
||||||
#include "picturestr.h"
|
#include "picturestr.h"
|
||||||
#include "randrstr.h"
|
#include "randrstr.h"
|
||||||
|
#include "glxvndabi.h"
|
||||||
#include "xf86Bus.h"
|
#include "xf86Bus.h"
|
||||||
#ifdef XSERVER_LIBPCIACCESS
|
#ifdef XSERVER_LIBPCIACCESS
|
||||||
#include "xf86VGAarbiter.h"
|
#include "xf86VGAarbiter.h"
|
||||||
|
|
|
@ -83,6 +83,7 @@ glxSetup(void *module, void *opts, int *errmaj, int *errmin)
|
||||||
provider = LoaderSymbol("__glXDRI2Provider");
|
provider = LoaderSymbol("__glXDRI2Provider");
|
||||||
if (provider)
|
if (provider)
|
||||||
GlxPushProvider(provider);
|
GlxPushProvider(provider);
|
||||||
|
xorgGlxCreateVendor();
|
||||||
|
|
||||||
LoadExtensionList(GLXExt, ARRAY_SIZE(GLXExt), FALSE);
|
LoadExtensionList(GLXExt, ARRAY_SIZE(GLXExt), FALSE);
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ srcs_xorg = [
|
||||||
|
|
||||||
xorg_link = [
|
xorg_link = [
|
||||||
libxserver,
|
libxserver,
|
||||||
|
libglxvnd,
|
||||||
xorg_common,
|
xorg_common,
|
||||||
xorg_loader,
|
xorg_loader,
|
||||||
xorg_ddc,
|
xorg_ddc,
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "extinit.h"
|
#include "extinit.h"
|
||||||
|
#include "glx_extinit.h"
|
||||||
#include "xserver-properties.h"
|
#include "xserver-properties.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -670,6 +670,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
|
||||||
AddScreen(DarwinScreenInit, argc, argv);
|
AddScreen(DarwinScreenInit, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xorgGlxCreateVendor();
|
||||||
|
|
||||||
DarwinAdjustScreenOrigins(pScreenInfo);
|
DarwinAdjustScreenOrigins(pScreenInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ Xwayland_SOURCES = \
|
||||||
Xwayland_LDADD = \
|
Xwayland_LDADD = \
|
||||||
$(glamor_lib) \
|
$(glamor_lib) \
|
||||||
$(XWAYLAND_LIBS) \
|
$(XWAYLAND_LIBS) \
|
||||||
|
$(top_builddir)/glx/libglxvnd.la \
|
||||||
$(XWAYLAND_SYS_LIBS) \
|
$(XWAYLAND_SYS_LIBS) \
|
||||||
$(top_builddir)/Xext/libXvidmode.la \
|
$(top_builddir)/Xext/libXvidmode.la \
|
||||||
$(XSERVER_SYS_LIBS)
|
$(XSERVER_SYS_LIBS)
|
||||||
|
|
|
@ -70,6 +70,7 @@ executable(
|
||||||
libxserver_xkb_stubs,
|
libxserver_xkb_stubs,
|
||||||
libxserver_xi_stubs,
|
libxserver_xi_stubs,
|
||||||
libxserver_glx,
|
libxserver_glx,
|
||||||
|
libglxvnd,
|
||||||
],
|
],
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -1107,5 +1107,7 @@ InitOutput(ScreenInfo * screen_info, int argc, char **argv)
|
||||||
FatalError("Couldn't add screen\n");
|
FatalError("Couldn't add screen\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xorgGlxCreateVendor();
|
||||||
|
|
||||||
LocalAccessScopeUser();
|
LocalAccessScopeUser();
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,10 @@ struct __GLXprovider {
|
||||||
extern __GLXprovider __glXDRISWRastProvider;
|
extern __GLXprovider __glXDRISWRastProvider;
|
||||||
|
|
||||||
void GlxPushProvider(__GLXprovider * provider);
|
void GlxPushProvider(__GLXprovider * provider);
|
||||||
|
Bool xorgGlxCreateVendor(void);
|
||||||
|
#else
|
||||||
|
static inline Bool xorgGlxCreateVendor(void) { return TRUE; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user