xserver: Branch 'xorg-server-1.5-apple' - 3 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Thu Apr 24 18:26:18 PDT 2008
GL/glx/glxglcore.c | 1
GL/glx/glxutil.c | 58 +++++++++++++++++++++++++++--------------------------
2 files changed, 31 insertions(+), 28 deletions(-)
New commits:
commit 7ee34a69f37e6745708d8fc1bfa647769edbb907
Merge: 1b4b73c... 947419b...
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Thu Apr 24 18:26:09 2008 -0700
Merge branch 'server-1.5-branch' into xorg-server-1.5-apple
commit 947419bce25e6f003c74ba72a33ee6145396d1d8
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Apr 24 16:37:29 2008 +1000
glx: test for valid read and draw privates before using them
this should fix a bug where f-spot exiting blows up the X server
(cherry picked from commit ae982a27e4059fecd4048d245e6aa02f8dcc97d0)
diff --git a/GL/glx/glxutil.c b/GL/glx/glxutil.c
index 11e9f89..aa23a95 100644
--- a/GL/glx/glxutil.c
+++ b/GL/glx/glxutil.c
@@ -81,38 +81,40 @@ __glXDeassociateContext(__GLXcontext *glxc)
__GLXcontext *curr, *prev;
prev = NULL;
- for ( curr = glxc->drawPriv->drawGlxc
- ; curr != NULL
- ; prev = curr, curr = curr->nextDrawPriv ) {
- if (curr == glxc) {
- /* found context. Deassociate. */
- if (prev == NULL) {
- glxc->drawPriv->drawGlxc = curr->nextDrawPriv;
- } else {
- prev->nextDrawPriv = curr->nextDrawPriv;
+ if (glxc->drawPriv) {
+ for ( curr = glxc->drawPriv->drawGlxc; curr != NULL
+ ; prev = curr, curr = curr->nextDrawPriv ) {
+ if (curr == glxc) {
+ /* found context. Deassociate. */
+ if (prev == NULL) {
+ glxc->drawPriv->drawGlxc = curr->nextDrawPriv;
+ } else {
+ prev->nextDrawPriv = curr->nextDrawPriv;
+ }
+ curr->nextDrawPriv = NULL;
+ __glXUnrefDrawable(glxc->drawPriv);
+ break;
}
- curr->nextDrawPriv = NULL;
- __glXUnrefDrawable(glxc->drawPriv);
- break;
- }
+ }
}
-
prev = NULL;
- for ( curr = glxc->readPriv->readGlxc
- ; curr != NULL
- ; prev = curr, curr = curr->nextReadPriv ) {
- if (curr == glxc) {
- /* found context. Deassociate. */
- if (prev == NULL) {
- glxc->readPriv->readGlxc = curr->nextReadPriv;
- } else {
- prev->nextReadPriv = curr->nextReadPriv;
- }
- curr->nextReadPriv = NULL;
- __glXUnrefDrawable(glxc->readPriv);
- break;
- }
+ if (glxc->readPriv) {
+ for ( curr = glxc->readPriv->readGlxc
+ ; curr != NULL
+ ; prev = curr, curr = curr->nextReadPriv ) {
+ if (curr == glxc) {
+ /* found context. Deassociate. */
+ if (prev == NULL) {
+ glxc->readPriv->readGlxc = curr->nextReadPriv;
+ } else {
+ prev->nextReadPriv = curr->nextReadPriv;
+ }
+ curr->nextReadPriv = NULL;
+ __glXUnrefDrawable(glxc->readPriv);
+ break;
+ }
+ }
}
}
commit d7db6dd1a15393e9a30acfe87f7651ca1c9a0d75
Author: Dave Airlie <airlied at linux.ie>
Date: Tue Apr 22 15:13:57 2008 +1000
GLcore: make googleearth not crash the server on sw-rendering.
I don't think this is the 100% correct answer as I get log spam saying
(EE) DoSwapInterval: cx = 0x98b8998, GLX screen = 0x96dd780
(EE) AIGLX: cx->pGlxScreen->swapInterval == NULL
but thats better than X exiting in my book.
(cherry picked from commit a368ab757edf36ed7bbda023673d28883ce11231)
diff --git a/GL/glx/glxglcore.c b/GL/glx/glxglcore.c
index 1eac0eb..c8a2514 100644
--- a/GL/glx/glxglcore.c
+++ b/GL/glx/glxglcore.c
@@ -432,6 +432,7 @@ __glXMesaScreenProbe(ScreenPtr pScreen)
screen->base.destroy = __glXMesaScreenDestroy;
screen->base.createContext = __glXMesaScreenCreateContext;
screen->base.createDrawable = __glXMesaScreenCreateDrawable;
+ screen->base.swapInterval = NULL;
screen->base.pScreen = pScreen;
return &screen->base;
More information about the xorg-commit
mailing list