summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-02 10:27:05 -0600
committerBrian Paul <[email protected]>2009-06-02 10:29:39 -0600
commit12e94d892e3322be5c8a1594702d69e7a02d5274 (patch)
tree3eac826a9b012e7c56edd34ec97841996bf4e0c4 /src/mesa/main/context.c
parentcb3a9f984de6b1a167c60c345d51d55b8c0ca80b (diff)
mesa: release VBO and PBO references upon context destruction
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 884b6ad2829..a947f69632f 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1007,6 +1007,16 @@ _mesa_free_context_data( GLcontext *ctx )
_mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj);
+#if FEATURE_ARB_pixel_buffer_object
+ _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, NULL);
+ _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, NULL);
+#endif
+
+#if FEATURE_ARB_vertex_buffer_object
+ _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL);
+ _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, NULL);
+#endif
+
#if FEATURE_ARB_vertex_buffer_object
_mesa_delete_buffer_object(ctx, ctx->Array.NullBufferObj);
#endif