Fix so that using mesa for software rendering works again

This commit is contained in:
David Reveman 2006-03-15 00:26:51 +00:00
parent fca1974b8c
commit a0b5fb9d35
2 changed files with 20 additions and 2 deletions

View file

@ -1,3 +1,13 @@
2006-03-15 David Reveman <davidr@novell.com>
* GL/mesa/X/xf86glx.c (init_screen_visuals): Pass the correct visual
to XMesaCreateVisual.
(__glXMesaDrawableDestroy): Only try to destroy mesa buffer if it has
been created.
(__glXMesaContextDestroy):
(__glXMesaContextLoseCurrent): Flush context cache appropriately.
(__glXMesaContextForceCurrent): Set dispatch table.
2006-03-13 Matthias Hopf <mhopf@suse.de>
* GL/mesa/Makefile.am:

View file

@ -101,7 +101,8 @@ __glXMesaDrawableDestroy(__GLXdrawable *base)
{
__GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base;
XMesaDestroyBuffer(glxPriv->xm_buf);
if (glxPriv->xm_buf)
XMesaDestroyBuffer(glxPriv->xm_buf);
xfree(glxPriv);
}
@ -214,6 +215,9 @@ __glXMesaContextDestroy(__GLXcontext *baseContext)
__GLXMESAcontext *context = (__GLXMESAcontext *) baseContext;
XMesaDestroyContext(context->xmesa);
GlxFlushContextCache ();
xfree(context);
}
@ -235,6 +239,8 @@ __glXMesaContextLoseCurrent(__GLXcontext *baseContext)
{
__GLXMESAcontext *context = (__GLXMESAcontext *) baseContext;
GlxFlushContextCache ();
return XMesaLoseCurrent(context->xmesa);
}
@ -255,6 +261,8 @@ __glXMesaContextForceCurrent(__GLXcontext *baseContext)
{
__GLXMESAcontext *context = (__GLXMESAcontext *) baseContext;
GlxSetRenderTables (context->xmesa->mesa.CurrentDispatch);
return XMesaForceCurrent(context->xmesa);
}
@ -383,7 +391,7 @@ static void init_screen_visuals(__GLXMESAscreen *screen)
/* Create the XMesa visual */
pXMesaVisual[i] =
XMesaCreateVisual(pScreen,
pVis,
&pVis[j],
modes->rgbMode,
(modes->alphaBits > 0),
modes->doubleBufferMode,