From fff0d54733b016f225eb767b3d755c06295ac806 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 18 Oct 2017 00:21:00 +0200 Subject: glxext.c/NXglxext.c: merge two functions into one This has also been done in Xorg 7.1 This also fixes a little flaw for the swapped case: a check for glXRenderLarge was missing. --- nx-X11/programs/Xserver/GL/glx/glxext.c | 54 +++------------------------------ 1 file changed, 5 insertions(+), 49 deletions(-) (limited to 'nx-X11/programs/Xserver/GL') diff --git a/nx-X11/programs/Xserver/GL/glx/glxext.c b/nx-X11/programs/Xserver/GL/glx/glxext.c index cb82dc609..e92e605fa 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxext.c +++ b/nx-X11/programs/Xserver/GL/glx/glxext.c @@ -42,7 +42,6 @@ static __GLXextensionInfo *__glXExt /* = &__glDDXExtensionInfo */; /* ** Forward declarations. */ -static int __glXSwapDispatch(ClientPtr); static int __glXDispatch(ClientPtr); /* @@ -246,7 +245,7 @@ void GlxExtensionInit(void) */ extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS, __GLX_NUMBER_ERRORS, __glXDispatch, - __glXSwapDispatch, ResetExtension, + __glXDispatch, ResetExtension, StandardMinorOpcode); if (!extEntry) { FatalError("__glXExtensionInit: AddExtensions failed\n"); @@ -445,53 +444,10 @@ static int __glXDispatch(ClientPtr client) /* ** Use the opcode to index into the procedure table. */ - proc = __glXSingleTable[opcode]; - return (*proc)(cl, (GLbyte *) stuff); -} - -static int __glXSwapDispatch(ClientPtr client) -{ - REQUEST(xGLXSingleReq); - CARD8 opcode; - int (*proc)(__GLXclientState *cl, GLbyte *pc); - __GLXclientState *cl; - - 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; - } - - /* - ** Use the opcode to index into the procedure table. - */ - proc = __glXSwapSingleTable[opcode]; + if (client->swapped) + proc = __glXSwapSingleTable[opcode]; + else + proc = __glXSingleTable[opcode]; return (*proc)(cl, (GLbyte *) stuff); } -- cgit v1.2.3 From 9a16043722f6d60505a8776048b39cc7f1e799d9 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 18 Oct 2017 00:28:23 +0200 Subject: fix broken path due to missing / --- .../Xserver/GL/mesa/shader/slang/Imakefile.inc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'nx-X11/programs/Xserver/GL') diff --git a/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile.inc index 4ffa7805f..6757e2e50 100644 --- a/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile.inc @@ -61,16 +61,16 @@ LinkSourceFile(traverse_wrap.h, $(MESASRCDIR)/src/mesa/shader/slang) MESA_SLANG_UOBJS = $(MESA_SLANG_OBJS) #endif - MESA_SLANG_DOBJS = $(MESASLANGBUILDDIR)debuggerslang_assemble_assignment.o \ - $(MESASLANGBUILDDIR)debuggerslang_assemble.o \ - $(MESASLANGBUILDDIR)debuggerslang_assemble_conditional.o \ - $(MESASLANGBUILDDIR)debuggerslang_assemble_constructor.o \ - $(MESASLANGBUILDDIR)debuggerslang_assemble_typeinfo.o \ - $(MESASLANGBUILDDIR)debuggerslang_compile.o \ - $(MESASLANGBUILDDIR)debuggerslang_execute.o \ - $(MESASLANGBUILDDIR)debuggerslang_preprocess.o \ - $(MESASLANGBUILDDIR)debuggerslang_storage.o \ - $(MESASLANGBUILDDIR)debuggerslang_utility.o + MESA_SLANG_DOBJS = $(MESASLANGBUILDDIR)debugger/slang_assemble_assignment.o \ + $(MESASLANGBUILDDIR)debugger/slang_assemble.o \ + $(MESASLANGBUILDDIR)debugger/slang_assemble_conditional.o \ + $(MESASLANGBUILDDIR)debugger/slang_assemble_constructor.o \ + $(MESASLANGBUILDDIR)debugger/slang_assemble_typeinfo.o \ + $(MESASLANGBUILDDIR)debugger/slang_compile.o \ + $(MESASLANGBUILDDIR)debugger/slang_execute.o \ + $(MESASLANGBUILDDIR)debugger/slang_preprocess.o \ + $(MESASLANGBUILDDIR)debugger/slang_storage.o \ + $(MESASLANGBUILDDIR)debugger/slang_utility.o MESA_SLANG_POBJS = $(MESASLANGBUILDDIR)profiled/slang_assemble_assignment.o \ $(MESASLANGBUILDDIR)profiled/slang_assemble.o \ -- cgit v1.2.3