diff options
author | Michal Krol <michal@vmware.com> | 2010-02-09 14:25:41 +0100 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2010-02-09 14:52:52 +0100 |
commit | 01d7e3d5a25a7cc49b38f5561d00c2ff22c43e93 (patch) | |
tree | caa96a292b385ab401544714bdb907b1d6ee478f /src/mesa/main/shared.c | |
parent | eeec2c3d951fed0d22e5dbf436d4a2d887e24221 (diff) |
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.
Diffstat (limited to 'src/mesa/main/shared.c')
-rw-r--r-- | src/mesa/main/shared.c | 6 |
1 files changed, 0 insertions, 6 deletions
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++) { |