diff options
author | marha <marha@users.sourceforge.net> | 2013-11-26 08:07:23 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-11-26 08:07:23 +0100 |
commit | cec4285e4e6b06babf340165148ff8c31601b382 (patch) | |
tree | 9e19864958826fb517b22ba224aa713307272687 /mesalib/src/mesa/main/bufferobj.c | |
parent | 0f333fb1102f4886a8ce39f3c09b12e89e5a7f19 (diff) | |
parent | 4042ec939a2cdc8473479c900871c4c8c0b4e818 (diff) | |
download | vcxsrv-cec4285e4e6b06babf340165148ff8c31601b382.tar.gz vcxsrv-cec4285e4e6b06babf340165148ff8c31601b382.tar.bz2 vcxsrv-cec4285e4e6b06babf340165148ff8c31601b382.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xkeyboard-config mesa git update 26 nov 2013
Diffstat (limited to 'mesalib/src/mesa/main/bufferobj.c')
-rw-r--r-- | mesalib/src/mesa/main/bufferobj.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index 351934433..3127a8247 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -86,6 +86,12 @@ get_buffer_target(struct gl_context *ctx, GLenum target) return &ctx->CopyReadBuffer; case GL_COPY_WRITE_BUFFER: return &ctx->CopyWriteBuffer; + case GL_DRAW_INDIRECT_BUFFER: + if (ctx->API == API_OPENGL_CORE && + ctx->Extensions.ARB_draw_indirect) { + return &ctx->DrawIndirectBuffer; + } + break; case GL_TRANSFORM_FEEDBACK_BUFFER: if (ctx->Extensions.EXT_transform_feedback) { return &ctx->TransformFeedback.CurrentBuffer; @@ -626,6 +632,9 @@ _mesa_init_buffer_objects( struct gl_context *ctx ) _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, ctx->Shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->DrawIndirectBuffer, + ctx->Shared->NullBufferObj); + for (i = 0; i < MAX_COMBINED_UNIFORM_BUFFERS; i++) { _mesa_reference_buffer_object(ctx, &ctx->UniformBufferBindings[i].BufferObject, @@ -875,6 +884,11 @@ _mesa_DeleteBuffers(GLsizei n, const GLuint *ids) _mesa_BindBuffer( GL_ELEMENT_ARRAY_BUFFER_ARB, 0 ); } + /* unbind ARB_draw_indirect binding point */ + if (ctx->DrawIndirectBuffer == bufObj) { + _mesa_BindBuffer( GL_DRAW_INDIRECT_BUFFER, 0 ); + } + /* unbind ARB_copy_buffer binding points */ if (ctx->CopyReadBuffer == bufObj) { _mesa_BindBuffer( GL_COPY_READ_BUFFER, 0 ); |