aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXglxext.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-05-01 21:52:02 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-02 11:48:07 +0100
commitf3bddad4c69bc83f68b5f1118cb37752593b8c57 (patch)
treebe72db598a67613d9ca4cb37e900e09a55ba0ca5 /nx-X11/programs/Xserver/hw/nxagent/NXglxext.c
parenteb8c16ef9d24add2e0912269775d586d7d4061e4 (diff)
downloadnx-libs-f3bddad4c69bc83f68b5f1118cb37752593b8c57.tar.gz
nx-libs-f3bddad4c69bc83f68b5f1118cb37752593b8c57.tar.bz2
nx-libs-f3bddad4c69bc83f68b5f1118cb37752593b8c57.zip
NXglxext.c: use upstream versions of Dispatch functions
instead of a full copy. We still have our own function because we need to handle the nxagentGlxTrap. This trap is now set before the start of the dispatcher while it has been set only directly before calling the dispatched function. Saves ~50 duplicated lines.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXglxext.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglxext.c54
1 files changed, 1 insertions, 53 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglxext.c b/nx-X11/programs/Xserver/hw/nxagent/NXglxext.c
index 9d0f4f719..7af295eac 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXglxext.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXglxext.c
@@ -57,60 +57,8 @@
*/
static int __glXDispatch(ClientPtr client)
{
- REQUEST(xGLXSingleReq);
- CARD8 opcode;
- int (*proc)(__GLXclientState *cl, GLbyte *pc);
- __GLXclientState *cl;
int retval;
- opcode = stuff->glxCode;
- cl = __glXClients[client->index];
- if (!cl) {
- cl = (__GLXclientState *) malloc(sizeof(__GLXclientState));
- __glXClients[client->index] = cl;
- if (!cl) {
- return BadAlloc;
- }
- memset(cl, 0, sizeof(__GLXclientState));
- }
-
- if (!cl->inUse) {
- /*
- ** This is first request from this client. Associate a resource
- ** with the client so we will be notified when the client dies.
- */
- XID xid = FakeClientID(client->index);
- if (!AddResource( xid, __glXClientRes, (void *)(long)client->index)) {
- return BadAlloc;
- }
- ResetClientState(client->index);
- cl->inUse = GL_TRUE;
- cl->client = client;
- }
-
- /*
- ** Check for valid opcode.
- */
- if (opcode >= __GLX_SINGLE_TABLE_SIZE) {
- return BadRequest;
- }
-
- /*
- ** If we're expecting a glXRenderLarge request, this better be one.
- */
- if ((cl->largeCmdRequestsSoFar != 0) && (opcode != X_GLXRenderLarge)) {
- client->errorValue = stuff->glxCode;
- return __glXBadLargeRequest;
- }
-
- /*
- ** Use the opcode to index into the procedure table.
- */
- if (client->swapped)
- proc = __glXSwapSingleTable[opcode];
- else
- proc = __glXSingleTable[opcode];
-
/*
* Report upstream that we are
* dispatching a GLX operation.
@@ -123,7 +71,7 @@ static int __glXDispatch(ClientPtr client)
opcode, client -> index);
#endif
- retval = (*proc)(cl, (GLbyte *) stuff);
+ retval = xorg__glXDispatch(client);
nxagentGlxTrap = 0;