aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-26 08:05:44 +0100
committermarha <marha@users.sourceforge.net>2013-11-26 08:05:44 +0100
commit4042ec939a2cdc8473479c900871c4c8c0b4e818 (patch)
treecdf43e2577d3aaf53cfeda1ccf49bdb6eaa09677 /mesalib/src/mesa/main/bufferobj.c
parenta473b885d641b9c1ea57f2ae53f9ba7f2958cce2 (diff)
downloadvcxsrv-4042ec939a2cdc8473479c900871c4c8c0b4e818.tar.gz
vcxsrv-4042ec939a2cdc8473479c900871c4c8c0b4e818.tar.bz2
vcxsrv-4042ec939a2cdc8473479c900871c4c8c0b4e818.zip
xkeyboard-config mesa git update 26 nov 2013
xkeyboard-config commit aaf4edebf7de3c2b5188a4f25a8901d274ea3400 mesa commit ddc77c5092b6f782327a7014b320f31f5f4e8e93
Diffstat (limited to 'mesalib/src/mesa/main/bufferobj.c')
-rw-r--r--mesalib/src/mesa/main/bufferobj.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c
index b27f592e8..8b5ebc489 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 );