xserver: Branch 'glucose-2'

Alan Hourihane alanh at kemper.freedesktop.org
Tue Oct 16 12:02:22 PDT 2007


 glucose/glucose.c         |    8 +++++---
 hw/xgl/glxext/xglglxext.c |   19 +++++++++----------
 hw/xgl/xglglx.c           |    3 ++-
 hw/xgl/xglglx.h           |    1 +
 4 files changed, 17 insertions(+), 14 deletions(-)

New commits:
commit 0521f562600e68cbef765d9e3f92ee765673e3d7
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Tue Oct 16 20:02:02 2007 +0100

    Fix problems after master merge.

diff --git a/glucose/glucose.c b/glucose/glucose.c
index d0f1993..9e99333 100644
--- a/glucose/glucose.c
+++ b/glucose/glucose.c
@@ -45,7 +45,6 @@
 static ShmFuncs shmFuncs = { NULL, xglShmPutImage };
 #endif
 
-extern __GLXscreen **__glXActiveScreens;
 int xglScreenGeneration;
 int xglScreenPrivateIndex;
 int xglGCPrivateIndex;
@@ -120,8 +119,11 @@ glucoseCreateWindow(WindowPtr pWin)
   xglScreenInfo.widthMm  = pScreen->mmWidth;
   xglScreenInfo.heightMm = pScreen->mmHeight;
 
-  pScreenPriv->screen = __glXActiveScreens[pScreen->myNum];
+  pScreenPriv->screen = glxGetScreen(pScreen);
 
+  /* This stops the driver being unload and prevents a crash.
+   * But should be solved properly.
+   */
   pScreenPriv->destroyGLXscreen = pScreenPriv->screen->destroy;
   pScreenPriv->screen->destroy = glucoseDestroyGLXscreen;
 
@@ -142,7 +144,7 @@ glucoseCreateWindow(WindowPtr pWin)
 	AddResource(pPixmap->drawable.id, RT_PIXMAP, (pointer)pPixmap);
     }
 
-    pScreenPriv->rootDrawable = pScreenPriv->screen->createDrawable(pScreenPriv->screen, (DrawablePtr)pPixmap, pPixmap->drawable.id, modes);
+    pScreenPriv->rootDrawable = pScreenPriv->screen->createDrawable(pScreenPriv->screen, (DrawablePtr)pPixmap, GLX_DRAWABLE_PIXMAP, pPixmap->drawable.id, modes);
 
     if (!pScreenPriv->rootDrawable) {
   	xf86DrvMsg(pScreen->myNum, X_WARNING,
diff --git a/hw/xgl/glxext/xglglxext.c b/hw/xgl/glxext/xglglxext.c
index e997bb1..e84a416 100644
--- a/hw/xgl/glxext/xglglxext.c
+++ b/hw/xgl/glxext/xglglxext.c
@@ -5375,9 +5375,9 @@ xglResizeDrawable (__GLXdrawable *drawable)
 }
 
 static int
-xglBindTexImage (__GLXcontext *context,
-		 int	      buffer,
-		 __GLXpixmap  *pixmap)
+xglBindTexImage (__GLXcontext   *context,
+		 int	        buffer,
+		 __GLXdrawable  *pixmap)
 {
     xglGLContextPtr pContext = (xglGLContextPtr) context;
     __GLXcontext    *mesaContext = pContext->mesaContext;
@@ -5448,9 +5448,9 @@ xglBindTexImage (__GLXcontext *context,
 }
 
 static int
-xglReleaseTexImage (__GLXcontext *context,
-		    int		 buffer,
-		    __GLXpixmap  *pixmap)
+xglReleaseTexImage (__GLXcontext   *context,
+		    int		   buffer,
+		    __GLXdrawable  *pixmap)
 {
     xglGLContextPtr pContext = (xglGLContextPtr) context;
     __GLXcontext    *mesaContext = pContext->mesaContext;
@@ -5533,6 +5533,7 @@ xglDestroyDrawable (__GLXdrawable *drawable)
 static __GLXdrawable *
 xglCreateDrawable (__GLXscreen *screen,
 		   DrawablePtr pDrawable,
+		   int type,
 		   XID drawId,
 		   __GLcontextModes *modes)
 {
@@ -5552,7 +5553,7 @@ xglCreateDrawable (__GLXscreen *screen,
 
     memset (pBufferPriv, 0, sizeof (xglGLBufferRec));
 
-    if (!__glXDrawableInit (&pBufferPriv->base, screen, pDrawable, drawId, modes))
+    if (!__glXDrawableInit (&pBufferPriv->base, screen, pDrawable, type, drawId, modes))
     {
 	xfree (pBufferPriv);
 	return NULL;
@@ -5662,6 +5663,7 @@ xglCreateDrawable (__GLXscreen *screen,
     {
 	pBufferPriv->mesaDrawable = (*mesaScreen->createDrawable) (mesaScreen,
 								   pDrawable,
+								   type,
 								   drawId,
 								   modes);
     }
@@ -6341,9 +6343,6 @@ xglScreenProbe (ScreenPtr pScreen)
 	}
     }
 
-    screen->base.WrappedPositionWindow =
-	screen->mesaScreen->WrappedPositionWindow;
-
     screen->base.modes		  = screen->mesaScreen->modes;
     screen->base.pVisualPriv	  = screen->mesaScreen->pVisualPriv;
     screen->base.numVisuals	  = screen->mesaScreen->numVisuals;
diff --git a/hw/xgl/xglglx.c b/hw/xgl/xglglx.c
index 21f48d1..9fae97f 100644
--- a/hw/xgl/xglglx.c
+++ b/hw/xgl/xglglx.c
@@ -127,11 +127,12 @@ GLboolean
 __glXDrawableInit (__GLXdrawable *drawable,
                    __GLXscreen *screen,
 		   DrawablePtr pDrawable, 
+		   int type,
 		   XID drawId,
 		   __GLcontextModes *modes)
 {
     if (glXHandle)
-	return (*__xglGLXFunc.drawableInit) (drawable, screen, pDrawable, drawId, modes);
+	return (*__xglGLXFunc.drawableInit) (drawable, screen, pDrawable, type, drawId, modes);
 
     return GL_FALSE;
 }
diff --git a/hw/xgl/xglglx.h b/hw/xgl/xglglx.h
index 531b66e..bcfc552 100644
--- a/hw/xgl/xglglx.h
+++ b/hw/xgl/xglglx.h
@@ -56,6 +56,7 @@ typedef struct _xglGLXFunc {
     GLboolean (*drawableInit) (__GLXdrawable *drawable,
 	    		       __GLXscreen *screen,
 			       DrawablePtr   pDrawable,
+			       int           type,
 			       XID	     drawId,
 			       __GLcontextModes *modes);
 } xglGLXFuncRec, *xglGLXFuncPtr;


More information about the xorg-commit mailing list