diff options
author | Michal Krol <[email protected]> | 2010-02-09 14:25:41 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2010-02-09 14:52:52 +0100 |
commit | 01d7e3d5a25a7cc49b38f5561d00c2ff22c43e93 (patch) | |
tree | caa96a292b385ab401544714bdb907b1d6ee478f /src/mesa/main/context.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/context.c')
-rw-r--r-- | src/mesa/main/context.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index fccce51e852..591aa1121d1 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -955,6 +955,7 @@ _mesa_free_context_data( GLcontext *ctx ) _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL); _mesa_free_attrib_data(ctx); + _mesa_free_buffer_objects(ctx); _mesa_free_lighting_data( ctx ); _mesa_free_eval_data( ctx ); _mesa_free_texture_data( ctx ); @@ -974,6 +975,7 @@ _mesa_free_context_data( GLcontext *ctx ) #if FEATURE_ARB_pixel_buffer_object _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, NULL); _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, NULL); + _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj, NULL); #endif #if FEATURE_ARB_vertex_buffer_object |