xserver: Branch 'server-1.4-branch'

Alan Hourihane alanh at kemper.freedesktop.org
Wed Feb 27 08:54:00 PST 2008


 GL/glx/glxdri.c |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit a65d4aed06acd839fb21153f74144498abda3e18
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Wed Feb 27 16:49:34 2008 +0000

    Fix context sharing between direct/indirect contexts

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 685683d..09abca3 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -598,6 +598,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
     else
 	sharePrivate = NULL;
 
+    if (baseShareContext && baseShareContext->isDirect)
+        return NULL;
+
     context = xalloc(sizeof *context);
     if (context == NULL)
 	return NULL;
@@ -617,6 +620,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
 					   0, /* render type */
 					   sharePrivate,
 					   &context->driContext);
+    
+    if (!context->driContext.private) {
+    	xfree(context);
+    	return NULL;
+    }
 
     context->driContext.mode = modes;
 


More information about the xorg-commit mailing list