From: Brian Paul Date: Wed, 10 Jun 2009 19:45:01 +0000 (-0600) Subject: mesa: use _mesa_reference_buffer_object() in a few places X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0854b7e972eaea1986aa956d4dffa2d6ad541b62;p=mesa.git mesa: use _mesa_reference_buffer_object() in a few places --- diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index a49da3d3b58..c04fa691154 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -470,11 +470,15 @@ _mesa_copy_buffer_subdata(GLcontext *ctx, void _mesa_init_buffer_objects( GLcontext *ctx ) { - ctx->Array.ArrayBufferObj = ctx->Shared->NullBufferObj; - ctx->Array.ElementArrayBufferObj = ctx->Shared->NullBufferObj; - - ctx->CopyReadBuffer = ctx->Shared->NullBufferObj; - ctx->CopyWriteBuffer = ctx->Shared->NullBufferObj; + _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, + ctx->Shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, + ctx->Shared->NullBufferObj); + + _mesa_reference_buffer_object(ctx, &ctx->CopyReadBuffer, + ctx->Shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->CopyWriteBuffer, + ctx->Shared->NullBufferObj); }