diff options
author | Keith Whitwell <[email protected]> | 2007-07-31 14:37:45 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2007-07-31 14:37:45 +0100 |
commit | 9273150f9a8394f4ef630a96f0089ad8cad607f5 (patch) | |
tree | 6a62bb6a88ebcc0af7682a811ab0c628daadd602 /src/mesa/drivers/dri/common/dri_util.c | |
parent | 9bc1c92a0b809c6b60d5e4a2c8909f5f98528919 (diff) | |
parent | 7aefdd518578687f961bb512a2b408857f0b9824 (diff) |
Merge branch 'i915tex_privbuffers' into softpipe_0_1_branch
Conflicts:
src/mesa/drivers/dri/i915tex/intel_buffers.c
src/mesa/drivers/dri/i915tex/intel_context.c
src/mesa/drivers/dri/i915tex/intel_fbo.c
src/mesa/drivers/dri/i915tex/intel_pixel_draw.c
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_util.c')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index c30e66f1722..6e8a5b52180 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 |