From 01d7e3d5a25a7cc49b38f5561d00c2ff22c43e93 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 9 Feb 2010 14:25:41 +0100 Subject: mesa: Enable true refcounting for NullBufferObj. This object can be shared with another context, so we cannot just delete it when the owning context is being destroyed. Ensuring that buffer objects are properly refcounted guarantees NullBufferObj is destroyed when all references to it are removed. --- src/mesa/main/shared.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/mesa/main/shared.c') diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c index a7cf623c47..b889364f0d 100644 --- a/src/mesa/main/shared.c +++ b/src/mesa/main/shared.c @@ -95,12 +95,6 @@ _mesa_alloc_shared_state(GLcontext *ctx) /* Allocate the default buffer object */ shared->NullBufferObj = ctx->Driver.NewBufferObject(ctx, 0, 0); -#ifndef DEBUG - /* Set refcount so high that it never gets deleted. - * XXX with recent/improved refcounting this should be no longer be needed. - */ - shared->NullBufferObj->RefCount = 1000 * 1000 * 1000; -#endif /* Create default texture objects */ for (i = 0; i < NUM_TEXTURE_TARGETS; i++) { -- cgit v1.2.3