xorg-server: Changes to 'ubuntu'
debian/changelog | 7
debian/control | 2
debian/patches/glx-corner-case-drawablegone.patch | 39 ++
debian/patches/glx-fix-memory-leak.patch | 237 ++++++++++++
debian/patches/glx-link-against-glapi.patch | 31 +
debian/patches/glx-remove-current-context-cache.patch | 338 ++++++++++++++++++
debian/patches/series | 4
7 files changed, 657 insertions(+), 1 deletion(-)
New commits:
commit 201a6567e25a84cc4beff414c513b80d1ce556a0
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Tue Oct 1 14:42:41 2013 +0200
release to saucy
diff --git a/debian/changelog b/debian/changelog
index 2579614..28c2a30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-xorg-server (2:1.14.2.901-2ubuntu7) UNRELEASED; urgency=low
+xorg-server (2:1.14.2.901-2ubuntu7) saucy; urgency=low
* Make glx link against glapi for the dispatch table symbols. (LP: #1232000)
* Cherry pick a few related glx fixes from upstream.
- -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Mon, 30 Sep 2013 16:54:11 +0200
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Tue, 01 Oct 2013 13:30:59 +0200
xorg-server (2:1.14.2.901-2ubuntu6) saucy; urgency=low
commit db9140f4e552c930d2f4d286002d5d4f2d22907c
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Tue Oct 1 13:30:51 2013 +0200
Make glx link against glapi for the dispatch table symbols. (LP: #1232000)
Cherry pick a few related glx fixes from upstream.
diff --git a/debian/changelog b/debian/changelog
index 32e9e3e..2579614 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xorg-server (2:1.14.2.901-2ubuntu7) UNRELEASED; urgency=low
+
+ * Make glx link against glapi for the dispatch table symbols. (LP: #1232000)
+ * Cherry pick a few related glx fixes from upstream.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Mon, 30 Sep 2013 16:54:11 +0200
+
xorg-server (2:1.14.2.901-2ubuntu6) saucy; urgency=low
* xmir.patch: Drop vestigial libatomic-ops dependency, fixing
diff --git a/debian/control b/debian/control
index 95fe273..6a16bc1 100644
--- a/debian/control
+++ b/debian/control
@@ -60,7 +60,7 @@ Build-Depends:
libdrm-dev (>= 2.4.38-0ubuntu2~) [!hurd-i386],
x11proto-gl-dev (>= 1.4.16),
mesa-common-dev (>= 7.10.3-0ubuntu1),
- libgl1-mesa-dev (>= 7.8),
+ libgl1-mesa-dev (>= 9.2-1ubuntu3),
libxmuu-dev (>= 1:0.99.1),
libxext-dev (>= 1:0.99.1),
libx11-dev (>= 1:0.99.2),
diff --git a/debian/patches/glx-corner-case-drawablegone.patch b/debian/patches/glx-corner-case-drawablegone.patch
new file mode 100644
index 0000000..13af4e3
--- /dev/null
+++ b/debian/patches/glx-corner-case-drawablegone.patch
@@ -0,0 +1,39 @@
+From: Adam Jackson <ajax@redhat.com>
+To: xorg-devel@lists.x.org
+Subject: [PATCH 3/3] glx: Fix a corner case in DrawableGone
+Date: Mon, 30 Sep 2013 12:11:24 -0400
+Message-Id: <1380557484-23805-4-git-send-email-ajax@redhat.com>
+
+Losing the drawable does not change our notion of current client. Since
+the GL under us doesn't understand having a current context without
+current drawables (sigh), we do still need to loseCurrent so that we
+re-bind the context on the next request.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65030
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ glx/glxext.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/glx/glxext.c b/glx/glxext.c
+index 534c791..75260a0 100644
+--- a/glx/glxext.c
++++ b/glx/glxext.c
+@@ -132,8 +132,8 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid)
+ next = c->next;
+ if (c->currentClient &&
+ (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
++ /* just force a re-bind the next time through */
+ (*c->loseCurrent) (c);
+- c->currentClient = NULL;
+ }
+ if (c->drawPriv == glxPriv)
+ c->drawPriv = NULL;
+--
+1.8.3.1
+
+_______________________________________________
+xorg-devel@lists.x.org: X.Org development
+Archives: http://lists.x.org/archives/xorg-devel
+Info: http://lists.x.org/mailman/listinfo/xorg-devel
+
diff --git a/debian/patches/glx-fix-memory-leak.patch b/debian/patches/glx-fix-memory-leak.patch
new file mode 100644
index 0000000..a627909
--- /dev/null
+++ b/debian/patches/glx-fix-memory-leak.patch
@@ -0,0 +1,237 @@
+From: Adam Jackson <ajax@redhat.com>
+To: xorg-devel@lists.x.org
+Subject: [PATCH 2/3] glx: Fix memory leak in context garbage collection
+Date: Mon, 30 Sep 2013 12:11:23 -0400
+Message-Id: <1380557484-23805-3-git-send-email-ajax@redhat.com>
+
+I broke this, back in:
+
+ commit a48dadc98a28c969741979b70b7a639f24f4cbbd
+ Author: Adam Jackson <ajax@redhat.com>
+ Date: Mon Mar 21 11:59:29 2011 -0400
+
+ glx: Reimplement context tags
+
+In that, I changed the glx client state to not explicitly track the list
+of current contexts for the client (since that was what we were deriving
+tags from). The bug was that I removed the code for same from
+glxClientCallback without noticing that it had the side effect of
+effectively de-currenting those contexts, so that ContextGone could free
+them. So, if you had a client exit with a context still current, the
+context's memory would leak. Not a huge deal for direct clients, but
+viciously bad for indirect, since the swrast context state at the bottom
+of Mesa is like 15M.
+
+Fix this by promoting Bool isCurrent to ClientPtr currentClient, so that
+we have a back-pointer to chase when walking the list of contexts when
+ClientStateGone happens.
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ glx/createcontext.c | 2 +-
+ glx/glxcmds.c | 14 +++++++-------
+ glx/glxcontext.h | 10 +++++-----
+ glx/glxext.c | 36 +++++++++++++++++++++++++-----------
+ 4 files changed, 38 insertions(+), 24 deletions(-)
+
+diff --git a/glx/createcontext.c b/glx/createcontext.c
+index 13d21cc..78792da 100644
+--- a/glx/createcontext.c
++++ b/glx/createcontext.c
+@@ -320,7 +320,7 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
+ ctx->id = req->context;
+ ctx->share_id = req->shareList;
+ ctx->idExists = True;
+- ctx->isCurrent = False;
++ ctx->currentClient = False;
+ ctx->isDirect = req->isDirect;
+ ctx->hasUnflushedCommands = False;
+ ctx->renderMode = GL_RENDER;
+diff --git a/glx/glxcmds.c b/glx/glxcmds.c
+index 663448a..288b417 100644
+--- a/glx/glxcmds.c
++++ b/glx/glxcmds.c
+@@ -290,7 +290,7 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
+ glxc->id = gcId;
+ glxc->share_id = shareList;
+ glxc->idExists = GL_TRUE;
+- glxc->isCurrent = GL_FALSE;
++ glxc->currentClient = NULL;
+ glxc->isDirect = isDirect;
+ glxc->hasUnflushedCommands = GL_FALSE;
+ glxc->renderMode = GL_RENDER;
+@@ -398,7 +398,7 @@ __glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc)
+ return err;
+
+ glxc->idExists = GL_FALSE;
+- if (!glxc->isCurrent)
++ if (!glxc->currentClient)
+ FreeResourceByType(req->context, __glXContextRes, FALSE);
+
+ return Success;
+@@ -431,7 +431,7 @@ static void
+ StopUsingContext(__GLXcontext * glxc)
+ {
+ if (glxc) {
+- glxc->isCurrent = GL_FALSE;
++ glxc->currentClient = NULL;
+ if (!glxc->idExists) {
+ FreeResourceByType(glxc->id, __glXContextRes, FALSE);
+ }
+@@ -441,7 +441,7 @@ StopUsingContext(__GLXcontext * glxc)
+ static void
+ StartUsingContext(__GLXclientState * cl, __GLXcontext * glxc)
+ {
+- glxc->isCurrent = GL_TRUE;
++ glxc->currentClient = cl->client;
+ }
+
+ /**
+@@ -571,7 +571,7 @@ DoMakeCurrent(__GLXclientState * cl,
+
+ if (!validGlxContext(client, contextId, DixUseAccess, &glxc, &error))
+ return error;
+- if ((glxc != prevglxc) && glxc->isCurrent) {
++ if ((glxc != prevglxc) && glxc->currentClient) {
+ /* Context is current to somebody else */
+ return BadAccess;
+ }
+@@ -633,7 +633,7 @@ DoMakeCurrent(__GLXclientState * cl,
+ return __glXError(GLXBadContext);
+ }
+
+- glxc->isCurrent = GL_TRUE;
++ glxc->currentClient = client;
+ }
+
+ StopUsingContext(prevglxc);
+@@ -854,7 +854,7 @@ __glXDisp_CopyContext(__GLXclientState * cl, GLbyte * pc)
+ /*
+ ** The destination context must not be current for any client.
+ */
+- if (dst->isCurrent) {
++ if (dst->currentClient) {
+ client->errorValue = dest;
+ return BadAccess;
+ }
+diff --git a/glx/glxcontext.h b/glx/glxcontext.h
+index 96a4dd2..fd018d0 100644
+--- a/glx/glxcontext.h
++++ b/glx/glxcontext.h
+@@ -70,6 +70,11 @@ struct __GLXcontext {
+ __GLXscreen *pGlxScreen;
+
+ /*
++ ** If this context is current for a client, this will be that client
++ */
++ ClientPtr currentClient;
++
++ /*
+ ** The XID of this context.
+ */
+ XID id;
+@@ -85,11 +90,6 @@ struct __GLXcontext {
+ GLboolean idExists;
+
+ /*
+- ** Whether this context is current for some client.
+- */
+- GLboolean isCurrent;
+-
+- /*
+ ** Whether this context is a direct rendering context.
+ */
+ GLboolean isDirect;
+diff --git a/glx/glxext.c b/glx/glxext.c
+index 1bb884f..534c791 100644
+--- a/glx/glxext.c
++++ b/glx/glxext.c
+@@ -88,16 +88,15 @@ __glXResetLargeCommandStatus(__GLXclientState * cl)
+ }
+
+ /*
+-** 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 the ID is no longer valid, and (maybe) free the context.
+-** use.
+-*/
++ * 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
++ * the ID is no longer valid, and (maybe) free the context.
++ */
+ static int
+ ContextGone(__GLXcontext * cx, XID id)
+ {
+ cx->idExists = GL_FALSE;
+- if (!cx->isCurrent) {
++ if (!cx->currentClient) {
+ __glXFreeContext(cx);
+ }
+
+@@ -131,9 +130,10 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid)
+
+ for (c = glxAllContexts; c; c = next) {
+ next = c->next;
+- if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
++ if (c->currentClient &&
++ (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
+ (*c->loseCurrent) (c);
+- c->isCurrent = GL_FALSE;
++ c->currentClient = NULL;
+ }
+ if (c->drawPriv == glxPriv)
+ c->drawPriv = NULL;
+@@ -187,14 +187,14 @@ __glXRemoveFromContextList(__GLXcontext * cx)
+ GLboolean
+ __glXFreeContext(__GLXcontext * cx)
+ {
+- if (cx->idExists || cx->isCurrent)
++ if (cx->idExists || cx->currentClient)
+ return GL_FALSE;
+
++ __glXRemoveFromContextList(cx);
++
+ free(cx->feedbackBuf);
+ free(cx->selectBuf);
+
+- __glXRemoveFromContextList(cx);
+-
+ /* We can get here through both regular dispatching from
+ * __glXDispatch() or as a callback from the resource manager. In
+ * the latter case we need to lift the DRI lock manually. */
+@@ -271,6 +271,7 @@ glxClientCallback(CallbackListPtr *list, pointer closure, pointer data)
+ NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
+ ClientPtr pClient = clientinfo->client;
+ __GLXclientState *cl = glxGetClient(pClient);
++ __GLXcontext *c, *next;
+
+ switch (pClient->clientState) {
+ case ClientStateRunning:
+@@ -282,6 +283,19 @@ glxClientCallback(CallbackListPtr *list, pointer closure, pointer data)
+ break;
+
+ case ClientStateGone:
++ /*
++ * reap any remaining contexts. we're running just before
++ * FreeClientResources, so all we need to do is detach the client
++ * from the context, and ContextGone will do the rest.
++ */
++ for (c = glxAllContexts; c; c = next) {
++ next = c->next;
++ if (c->currentClient == pClient) {
++ (*c->loseCurrent) (c);
++ c->currentClient = NULL;
++ }
++ }
++
+ free(cl->returnBuf);
+ free(cl->largeCmdBuf);
+ free(cl->GLClientextensions);
+--
+1.8.3.1
+
+_______________________________________________
+xorg-devel@lists.x.org: X.Org development
+Archives: http://lists.x.org/archives/xorg-devel
+Info: http://lists.x.org/mailman/listinfo/xorg-devel
+
diff --git a/debian/patches/glx-link-against-glapi.patch b/debian/patches/glx-link-against-glapi.patch
new file mode 100644
index 0000000..cda436c
--- /dev/null
+++ b/debian/patches/glx-link-against-glapi.patch
@@ -0,0 +1,31 @@
+diff --git a/glx/Makefile.am b/glx/Makefile.am
+index 591c4ac..5f91946 100644
+--- a/glx/Makefile.am
++++ b/glx/Makefile.am
+@@ -10,7 +10,7 @@ AM_CFLAGS = \
+ @XLIB_CFLAGS@ \
+ @LIBDRM_CFLAGS@ \
+ @GLX_DEFINES@ \
+- @GLX_ARCH_DEFINES@
++ @GLX_ARCH_DEFINES@ -lglapi
+
+ # none yet
+ #sdk_HEADERS =
+diff --git a/glx/glapi.c b/glx/glapi.c
+index ad7329e..8b754e6 100644
+--- a/glx/glapi.c
++++ b/glx/glapi.c
+@@ -80,13 +80,6 @@ static void init_glapi_relocs(void);
+ /*@{*/
+ #if defined(GLX_USE_TLS)
+
+-PUBLIC TLS struct _glapi_table *_glapi_tls_Dispatch = NULL;
+-
+-PUBLIC TLS void *_glapi_tls_Context;
+-
+-PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
+-PUBLIC const void *_glapi_Context = NULL;
+-
+ #else
+
+ #if defined(THREADS)
diff --git a/debian/patches/glx-remove-current-context-cache.patch b/debian/patches/glx-remove-current-context-cache.patch
new file mode 100644
index 0000000..85c1e3e
--- /dev/null
+++ b/debian/patches/glx-remove-current-context-cache.patch
@@ -0,0 +1,338 @@
+From: Adam Jackson <ajax@redhat.com>
+To: xorg-devel@lists.x.org
+Subject: [PATCH 1/3] glx: Remove current context cache
+Date: Mon, 30 Sep 2013 12:11:22 -0400
+Message-Id: <1380557484-23805-2-git-send-email-ajax@redhat.com>
+
+This is something of a pessimization, since now we'll call the
+provider's MakeCurrent hook more often. But that's correct, since the
+provider might have a current GL context itself (think glamor), so while
+this cache might be useful it should be done down in the provider
+itself.
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ glx/glxcmds.c | 13 -------------
+ glx/glxcontext.h | 2 --
+ glx/glxdri.c | 1 -
+ glx/glxdri2.c | 1 -
+ glx/glxdriswrast.c | 1 -
+ glx/glxext.c | 25 +------------------------
+ glx/glxext.h | 1 -
+ glx/glxserver.h | 4 ----
+ hw/dmx/glxProxy/global.c | 6 ------
+ hw/dmx/glxProxy/glxcmds.c | 4 ----
+ hw/dmx/glxProxy/glxext.c | 13 -------------
+ hw/dmx/glxProxy/glxext.h | 1 -
+ hw/dmx/glxProxy/glxserver.h | 6 ------
+ 13 files changed, 1 insertion(+), 77 deletions(-)
+
+diff --git a/glx/glxcmds.c b/glx/glxcmds.c
+index 5b7a628..663448a 100644
+--- a/glx/glxcmds.c
++++ b/glx/glxcmds.c
+@@ -187,16 +187,9 @@ validGlxDrawable(ClientPtr client, XID id, int type, int access_mode,
+ return TRUE;
+ }
+
+-void
+-__glXContextDestroy(__GLXcontext * context)
+-{
+- __glXFlushContextCache();
+-}
+-
+ static void
+ __glXdirectContextDestroy(__GLXcontext * context)
+ {
+- __glXContextDestroy(context);
+ free(context);
+ }
+
+@@ -438,10 +431,6 @@ static void
+ StopUsingContext(__GLXcontext * glxc)
+ {
+ if (glxc) {
+- if (glxc == __glXLastContext) {
+- /* Tell server GL library */
+- __glXLastContext = 0;
+- }
+ glxc->isCurrent = GL_FALSE;
+ if (!glxc->idExists) {
+ FreeResourceByType(glxc->id, __glXContextRes, FALSE);
+@@ -453,7 +442,6 @@ static void
+ StartUsingContext(__GLXclientState * cl, __GLXcontext * glxc)
+ {
+ glxc->isCurrent = GL_TRUE;
+- __glXLastContext = glxc;
+ }
+
+ /**
+@@ -627,7 +615,6 @@ DoMakeCurrent(__GLXclientState * cl,
+ if (!(*prevglxc->loseCurrent) (prevglxc)) {
+ return __glXError(GLXBadContext);
+ }
+- __glXFlushContextCache();
+ if (!prevglxc->isDirect) {
+ prevglxc->drawPriv = NULL;
+ prevglxc->readPriv = NULL;
+diff --git a/glx/glxcontext.h b/glx/glxcontext.h
+index 4764e56..96a4dd2 100644
+--- a/glx/glxcontext.h
++++ b/glx/glxcontext.h
+@@ -124,8 +124,6 @@ struct __GLXcontext {
+ __GLXdrawable *readPriv;
+ };
+
+-void __glXContextDestroy(__GLXcontext * context);
+-
+ extern int validGlxScreen(ClientPtr client, int screen,
+ __GLXscreen ** pGlxScreen, int *err);
+
+diff --git a/glx/glxdri.c b/glx/glxdri.c
+index 1ac6839..f146c7c 100644
+--- a/glx/glxdri.c
++++ b/glx/glxdri.c
+@@ -295,7 +295,6 @@ __glXDRIcontextDestroy(__GLXcontext * baseContext)
+ context->hwContextID);
+ __glXleaveServer(GL_FALSE);
+
+- __glXContextDestroy(&context->base);
+ free(context);
+ }
+
+diff --git a/glx/glxdri2.c b/glx/glxdri2.c
+index 8a1fa41..19caeed 100644
+--- a/glx/glxdri2.c
++++ b/glx/glxdri2.c
+@@ -261,7 +261,6 @@ __glXDRIcontextDestroy(__GLXcontext * baseContext)
+ __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
+
+ (*screen->core->destroyContext) (context->driContext);
+- __glXContextDestroy(&context->base);
+ free(context);
+ }
+
+diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
+index b478398..861e97c 100644
+--- a/glx/glxdriswrast.c
++++ b/glx/glxdriswrast.c
+@@ -137,7 +137,6 @@ __glXDRIcontextDestroy(__GLXcontext * baseContext)
+ __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
+
+ (*screen->core->destroyContext) (context->driContext);
+- __glXContextDestroy(&context->base);
+ free(context);
+ }
+
+diff --git a/glx/glxext.c b/glx/glxext.c
+index bc7fe82..1bb884f 100644
+--- a/glx/glxext.c
++++ b/glx/glxext.c
+@@ -48,12 +48,6 @@
+ #include "indirect_util.h"
+
+ /*
+-** The last context used by the server. It is the context that is current
+-** from the server's perspective.
+-*/
+-__GLXcontext *__glXLastContext;
+-
+-/*
+ ** X resources.
+ */
+ RESTYPE __glXContextRes;
+@@ -79,7 +73,6 @@ static int __glXDispatch(ClientPtr);
+ static void
+ ResetExtension(ExtensionEntry * extEntry)
+ {
+- __glXFlushContextCache();
+ }
+
+ /*
+@@ -141,8 +134,6 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid)
+ if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
+ (*c->loseCurrent) (c);
+ c->isCurrent = GL_FALSE;
+- if (c == __glXLastContext)
+- __glXFlushContextCache();
+ }
+ if (c->drawPriv == glxPriv)
+ c->drawPriv = NULL;
+@@ -201,9 +192,6 @@ __glXFreeContext(__GLXcontext * cx)
+
+ free(cx->feedbackBuf);
+ free(cx->selectBuf);
+- if (cx == __glXLastContext) {
+- __glXFlushContextCache();
+- }
+
+ __glXRemoveFromContextList(cx);
+
+@@ -396,12 +384,6 @@ GlxExtensionInit(void)
+
+ /************************************************************************/
+
+-void
+-__glXFlushContextCache(void)
+-{
+- __glXLastContext = 0;
+-}
+-
+ /*
+ ** Make a context the current one for the GL (in this implementation, there
+ ** is only one instance of the GL, and we use it to serve all GL clients by
+@@ -439,11 +421,6 @@ __glXForceCurrent(__GLXclientState * cl, GLXContextTag tag, int *error)
+ if (cx->wait && (*cx->wait) (cx, cl, error))
+ return NULL;
+
+- if (cx == __glXLastContext) {
+- /* No need to re-bind */
+- return cx;
+- }
+-
+ /* Make this context the current one for the GL. */
+ if (!cx->isDirect) {
+ if (!(*cx->makeCurrent) (cx)) {
+@@ -453,7 +430,7 @@ __glXForceCurrent(__GLXclientState * cl, GLXContextTag tag, int *error)
+ return 0;
+ }
+ }
+- __glXLastContext = cx;
++
+ return cx;
+ }
+
+diff --git a/glx/glxext.h b/glx/glxext.h
+index 9b0978b..8b62c40 100644
+--- a/glx/glxext.h
++++ b/glx/glxext.h
+@@ -36,7 +36,6 @@
+ */
+
+ extern GLboolean __glXFreeContext(__GLXcontext * glxc);
+-extern void __glXFlushContextCache(void);
+
+ extern Bool __glXAddContext(__GLXcontext * cx);
+ extern void __glXErrorCallBack(GLenum code);
+diff --git a/glx/glxserver.h b/glx/glxserver.h
+index 1021aec..9178537 100644
+--- a/glx/glxserver.h
++++ b/glx/glxserver.h
+@@ -80,10 +80,6 @@ void GlxSetVisualConfigs(int nconfigs, void *configs, void **privates);
+
+ void __glXScreenInitVisuals(__GLXscreen * screen);
+
+-/*
+-** The last context used (from the server's persective) is cached.
+-*/
+-extern __GLXcontext *__glXLastContext;
+ extern __GLXcontext *__glXForceCurrent(__GLXclientState *, GLXContextTag,
+ int *);
+
+diff --git a/hw/dmx/glxProxy/global.c b/hw/dmx/glxProxy/global.c
+index 6d4612d..9f6e022 100644
+--- a/hw/dmx/glxProxy/global.c
++++ b/hw/dmx/glxProxy/global.c
+@@ -31,12 +31,6 @@
+ #include "glxserver.h"
+
+ /*
+-** The last context used by the server. It is the context that is current
+-** from the server's perspective.
+-*/
+-__GLXcontext *__glXLastContext;
+-
+-/*
+ ** X resources.
+ */
+ RESTYPE __glXContextRes;
+diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
+index 8cdb25e..2220399 100644
+--- a/hw/dmx/glxProxy/glxcmds.c
++++ b/hw/dmx/glxProxy/glxcmds.c
+@@ -763,10 +763,6 @@ static void
+ StopUsingContext(__GLXcontext * glxc)
+ {
+ if (glxc) {
+- if (glxc == __glXLastContext) {
+- /* Tell server GL library */
+- __glXLastContext = 0;
+- }
+ glxc->isCurrent = GL_FALSE;
+ if (!glxc->idExists) {
+ __glXFreeContext(glxc);
+diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c
+index e72a040..e4abd02 100644
+--- a/hw/dmx/glxProxy/glxext.c
++++ b/hw/dmx/glxProxy/glxext.c
+@@ -59,7 +59,6 @@ static int __glXDispatch(ClientPtr);
+ static void
+ ResetExtension(ExtensionEntry * extEntry)
+ {
+- __glXFlushContextCache();
+ __glXScreenReset();
+ SwapBarrierReset();
+ }
+@@ -274,10 +273,6 @@ __glXFreeContext(__GLXcontext * cx)
+
+ free(cx);
+
+- if (cx == __glXLastContext) {
+- __glXFlushContextCache();
+- }
+-
+ return GL_TRUE;
+ }
+
+@@ -378,14 +373,6 @@ __glXCoreType(void)
+
+ /************************************************************************/
+
+-void
+-__glXFlushContextCache(void)
+-{
+- __glXLastContext = 0;
+-}
+-
+-/************************************************************************/
+-
+ /*
+ ** Top level dispatcher; all commands are executed from here down.
+ */
+diff --git a/hw/dmx/glxProxy/glxext.h b/hw/dmx/glxProxy/glxext.h
+index 47cec15..fcdba75 100644
+--- a/hw/dmx/glxProxy/glxext.h
++++ b/hw/dmx/glxProxy/glxext.h
+@@ -49,7 +49,6 @@ typedef struct {
+ } __GLXextensionInfo;
+
+ extern GLboolean __glXFreeContext(__GLXcontext * glxc);
+-extern void __glXFlushContextCache(void);
+
+ extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
+ extern void __glXFreeGLXPixmap(__GLXpixmap * pGlxPixmap);
+diff --git a/hw/dmx/glxProxy/glxserver.h b/hw/dmx/glxProxy/glxserver.h
+index ad94966..9fa837c 100644
+--- a/hw/dmx/glxProxy/glxserver.h
++++ b/hw/dmx/glxProxy/glxserver.h
+@@ -76,12 +76,6 @@ typedef struct __GLXclientStateRec __GLXclientState;
+ extern __GLXscreenInfo *__glXActiveScreens;
+ extern GLint __glXNumActiveScreens;
+
+-/************************************************************************/
+-
+-/*
+-** The last context used (from the server's persective) is cached.
+-*/
+-extern __GLXcontext *__glXLastContext;
+ extern __GLXcontext *__glXForceCurrent(__GLXclientState *, GLXContextTag,
+ int *);
+
+--
+1.8.3.1
+
+_______________________________________________
+xorg-devel@lists.x.org: X.Org development
+Archives: http://lists.x.org/archives/xorg-devel
+Info: http://lists.x.org/mailman/listinfo/xorg-devel
+
diff --git a/debian/patches/series b/debian/patches/series
index 82df08d..1ff231c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -53,5 +53,9 @@ config-add-no-removal.patch
include-selection-h.patch
xf86-detach-scanout.patch
+glx-remove-current-context-cache.patch
+glx-fix-memory-leak.patch
+glx-corner-case-drawablegone.patch
+glx-link-against-glapi.patch
aarch64.patch
xmir.patch
Reply to: