diff options
author | Brian Paul <brianp@vmware.com> | 2009-05-07 13:30:39 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-05-07 14:34:09 -0600 |
commit | 4f6b704f9796775d8d9937c3cf75a2901b99b896 (patch) | |
tree | 9a5ac7599b7e6f7148b031358b2671a78fbf01ac /src/mesa/vbo/vbo_context.c | |
parent | 105c8529e78db961fee832b6248c3bcf59668bad (diff) |
mesa: move the NullBufferObj from GLcontext to gl_shared_state
Since shared array objects may point to the null/default buffer object,
the null/default buffer object should be part of the shared state.
Diffstat (limited to 'src/mesa/vbo/vbo_context.c')
-rw-r--r-- | src/mesa/vbo/vbo_context.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index ca8190fd05..f193a4bf1e 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context.c @@ -28,6 +28,7 @@ #include "main/imports.h" #include "main/mtypes.h" #include "main/api_arrayelt.h" +#include "main/bufferobj.h" #include "math/m_eval.h" #include "vbo.h" #include "vbo_context.h" @@ -81,7 +82,8 @@ static void init_legacy_currval(GLcontext *ctx) cl->Type = GL_FLOAT; cl->Format = GL_RGBA; cl->Ptr = (const void *)ctx->Current.Attrib[i]; - cl->BufferObj = ctx->Array.NullBufferObj; + _mesa_reference_buffer_object(ctx, &cl->BufferObj, + ctx->Shared->NullBufferObj); } } @@ -106,7 +108,8 @@ static void init_generic_currval(GLcontext *ctx) cl->Stride = 0; cl->StrideB = 0; cl->Enabled = 1; - cl->BufferObj = ctx->Array.NullBufferObj; + _mesa_reference_buffer_object(ctx, &cl->BufferObj, + ctx->Shared->NullBufferObj); } } @@ -150,7 +153,7 @@ static void init_mat_currval(GLcontext *ctx) cl->Stride = 0; cl->StrideB = 0; cl->Enabled = 1; - cl->BufferObj = ctx->Array.NullBufferObj; + cl->BufferObj = ctx->Shared->NullBufferObj; } } |