_mesa_reference_buffer_object(ctx, &ctx->UniformBuffer,
ctx->Shared->NullBufferObj);
+ _mesa_reference_buffer_object(ctx, &ctx->AtomicBuffer,
+ ctx->Shared->NullBufferObj);
+
_mesa_reference_buffer_object(ctx, &ctx->DrawIndirectBuffer,
ctx->Shared->NullBufferObj);
ctx->UniformBufferBindings[i].Offset = -1;
ctx->UniformBufferBindings[i].Size = -1;
}
+
+ for (i = 0; i < MAX_COMBINED_ATOMIC_BUFFERS; i++) {
+ _mesa_reference_buffer_object(ctx,
+ &ctx->AtomicBufferBindings[i].BufferObject,
+ ctx->Shared->NullBufferObj);
+ ctx->AtomicBufferBindings[i].Offset = -1;
+ ctx->AtomicBufferBindings[i].Size = -1;
+ }
}
_mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, NULL);
+ _mesa_reference_buffer_object(ctx, &ctx->AtomicBuffer, NULL);
+
_mesa_reference_buffer_object(ctx, &ctx->DrawIndirectBuffer, NULL);
for (i = 0; i < MAX_COMBINED_UNIFORM_BUFFERS; i++) {
&ctx->UniformBufferBindings[i].BufferObject,
NULL);
}
+
+ for (i = 0; i < MAX_COMBINED_ATOMIC_BUFFERS; i++) {
+ _mesa_reference_buffer_object(ctx,
+ &ctx->AtomicBufferBindings[i].BufferObject,
+ NULL);
+ }
+
}
bool
_mesa_BindBuffer( GL_UNIFORM_BUFFER, 0 );
}
+ /* unbind Atomci Buffer binding points */
+ for (j = 0; j < ctx->Const.MaxAtomicBufferBindings; j++) {
+ if (ctx->AtomicBufferBindings[j].BufferObject == bufObj) {
+ _mesa_BindBufferBase( GL_ATOMIC_COUNTER_BUFFER, j, 0 );
+ }
+ }
+
+ if (ctx->UniformBuffer == bufObj) {
+ _mesa_BindBuffer( GL_ATOMIC_COUNTER_BUFFER, 0 );
+ }
+
/* unbind any pixel pack/unpack pointers bound to this buffer */
if (ctx->Pack.BufferObj == bufObj) {
_mesa_BindBuffer( GL_PIXEL_PACK_BUFFER_EXT, 0 );