diff options
-rw-r--r-- | glucose/glucose.c | 8 | ||||
-rw-r--r-- | hw/xgl/glxext/xglglxext.c | 19 | ||||
-rw-r--r-- | hw/xgl/xglglx.c | 3 | ||||
-rw-r--r-- | hw/xgl/xglglx.h | 1 |
4 files changed, 17 insertions, 14 deletions
diff --git a/glucose/glucose.c b/glucose/glucose.c index d0f1993f1..9e9933374 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 e997bb128..e84a416cc 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 21f48d141..9fae97f79 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 531b66e47..bcfc552e3 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; |