From a04056d313a8346dc9e6e1b062762a6f115d1b46 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Sat, 14 Jul 2007 14:24:20 +0200 Subject: fix assertion, z/stencil swarst readback, (still looks suspicious) copyTexSubimage --- src/mesa/drivers/dri/common/drirenderbuffer.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/drivers/dri/common') diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c index d36af3e5be..d4f7f2527b 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.c +++ b/src/mesa/drivers/dri/common/drirenderbuffer.c @@ -209,7 +209,11 @@ driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv) struct gl_framebuffer *fb = (struct gl_framebuffer *) dPriv->driverPrivate; if (fb && (dPriv->w != fb->Width || dPriv->h != fb->Height)) { ctx->Driver.ResizeBuffers(ctx, fb, dPriv->w, dPriv->h); +#if 0 + /* if the driver needs the hw lock for ResizeBuffers, the drawable + might have changed again by now */ assert(fb->Width == dPriv->w); assert(fb->Height == dPriv->h); +#endif } } -- cgit v1.2.3 From da21eff86be088852457cdcb725aed5337c4519d Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Thu, 19 Jul 2007 16:41:14 +0200 Subject: fix drawables not getting freed if context is made current with new drawables --- src/mesa/drivers/dri/common/dri_util.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/common') diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index dd52f7e915..d785382f39 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -120,7 +120,7 @@ static __DRIdrawable *__driFindDrawable(void *drawHash, __DRIid draw) * Find drawables in the local hash that have been destroyed on the * server. * - * \param drawHash Hash-table containing all know drawables. + * \param drawHash Hash-table containing all known drawables. */ static void __driGarbageCollectDrawables(void *drawHash) { @@ -235,6 +235,12 @@ static GLboolean driUnbindContext(__DRInativeDisplay *dpy, int scrn, prp->refcount--; } + /* destroy the drawables if they no longer exist on the server */ + if ((pdp->refcount == 0) || (prp->refcount == 0)) { + /* probably shouldn't need the collector here, + as we know the affected drawables (or could there be others?) */ + __driGarbageCollectDrawables(pdp->driScreenPriv->drawHash); + } /* XXX this is disabled so that if we call SwapBuffers on an unbound * window we can determine the last context bound to the window and -- cgit v1.2.3