Index: extras/Mesa/include/GL/internal/dri_interface.h =================================================================== RCS file: /cvs/xorg/xc/extras/Mesa/include/GL/internal/dri_interface.h,v retrieving revision 1.1.1.5 diff -u -p -r1.1.1.5 dri_interface.h --- extras/Mesa/include/GL/internal/dri_interface.h 18 Oct 2005 02:51:49 -0000 1.1.1.5 +++ extras/Mesa/include/GL/internal/dri_interface.h 22 Nov 2005 18:51:10 -0000 @@ -39,7 +39,6 @@ #define DRI_INTERFACE_H #include -#include #include /** Index: extras/Mesa/src/mesa/drivers/dri/common/dri_util.c =================================================================== RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.c,v retrieving revision 1.5 diff -u -p -r1.5 dri_util.c --- extras/Mesa/src/mesa/drivers/dri/common/dri_util.c 18 Oct 2005 03:10:14 -0000 1.5 +++ extras/Mesa/src/mesa/drivers/dri/common/dri_util.c 22 Nov 2005 18:51:10 -0000 @@ -131,9 +131,8 @@ static void __driGarbageCollectDrawables __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; dpy = pdp->driScreenPriv->display; if (! (*dri_interface->windowExists)(dpy, draw)) { - /* Destroy the local drawable data in the hash table, if the - drawable no longer exists in the Xserver */ - drmHashDelete(drawHash, draw); + /* Destroy the local drawable data, if the drawable no + longer exists in the Xserver */ (*pdraw->destroyDrawable)(dpy, pdraw->private); _mesa_free(pdraw); } @@ -664,6 +663,7 @@ static void driDestroyDrawable(__DRInati (*psp->DriverAPI.DestroyBuffer)(pdp); if ((*dri_interface->windowExists)(dpy, pdp->draw)) (void)(*dri_interface->destroyDrawable)(dpy, scrn, pdp->draw); + drmHashDelete(psp->drawHash, pdp->draw); if (pdp->pClipRects) { _mesa_free(pdp->pClipRects); pdp->pClipRects = NULL; Index: extras/Mesa/src/mesa/drivers/dri/common/dri_util.h =================================================================== RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.h,v retrieving revision 1.1.1.4 diff -u -p -r1.1.1.4 dri_util.h --- extras/Mesa/src/mesa/drivers/dri/common/dri_util.h 31 Jul 2005 16:47:10 -0000 1.1.1.4 +++ extras/Mesa/src/mesa/drivers/dri/common/dri_util.h 22 Nov 2005 18:51:11 -0000 @@ -54,6 +54,7 @@ #include #include "drm.h" #include "drm_sarea.h" +#include "xf86drm.h" #include "GL/internal/glcore.h" #include "GL/internal/dri_interface.h" Index: extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c =================================================================== RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c,v retrieving revision 1.1.1.3 diff -u -p -r1.1.1.3 glcontextmodes.c --- extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c 18 Oct 2005 02:51:57 -0000 1.1.1.3 +++ extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c 22 Nov 2005 18:51:11 -0000 @@ -157,9 +157,717 @@ _gl_copy_visual_to_context_mode( __GLcon mode->greenMask = config->greenMask; mode->blueMask = config->blueMask; mode->alphaMask = config->alphaMask; - mode->rgbBits = config->bufferSize; - mode->indexBits = config->bufferSize; + mode->rgbBits = mode->rgbMode ? config->bufferSize : 0; + mode->indexBits = mode->colorIndexMode ? config->bufferSize : 0; mode->accumRedBits = config->accumRedSize; mode->accumGreenBits = config->accumGreenSize;