diff options
| -rw-r--r-- | include/GL/internal/dri_interface.h | 1 | ||||
| -rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 6 | ||||
| -rw-r--r-- | src/mesa/drivers/dri/common/dri_util.h | 1 | ||||
| -rw-r--r-- | src/mesa/drivers/dri/common/glcontextmodes.c | 4 | 
4 files changed, 6 insertions, 6 deletions
| diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index e63415db02..0f3555b576 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -39,7 +39,6 @@  #define DRI_INTERFACE_H  #include <GL/internal/glcore.h> -#include <xf86drm.h>  #include <drm.h>  /** diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 421f24ccb1..d7640759de 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -133,9 +133,8 @@ static void __driGarbageCollectDrawables(void *drawHash)  	    __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);  	    } @@ -667,6 +666,7 @@ driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate)          (*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; diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index a5e907e726..b9b38f39cd 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -54,6 +54,7 @@  #include <GL/gl.h>  #include "drm.h"  #include "drm_sarea.h" +#include "xf86drm.h"  #include "GL/internal/glcore.h"  #include "GL/internal/dri_interface.h" diff --git a/src/mesa/drivers/dri/common/glcontextmodes.c b/src/mesa/drivers/dri/common/glcontextmodes.c index 4bff387ae0..5e9e352f2c 100644 --- a/src/mesa/drivers/dri/common/glcontextmodes.c +++ b/src/mesa/drivers/dri/common/glcontextmodes.c @@ -157,8 +157,8 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,      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; | 
