[Mesa-dev] [PATCH 05/23] main: Add entry point for CreateBuffers.
Ilia Mirkin
imirkin at alum.mit.edu
Mon Mar 30 19:10:13 PDT 2015
On Wed, Feb 11, 2015 at 9:05 PM, Laura Ekstrand <laura at jlekstrand.net> wrote:
> for (i = 0; i < n; i++) {
> - _mesa_HashInsert(ctx->Shared->BufferObjects, first + i,
> - &DummyBufferObject);
> - buffer[i] = first + i;
> + buffers[i] = first + i;
> + if (dsa) {
> + ASSERT(ctx->Driver.NewBufferObject);
> + buf = ctx->Driver.NewBufferObject(ctx, buffers[i]);
> + if (!buf) {
> + _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
> + return;
Aren't you holding the shared mutex at this point? I think you need to
free it...
> + }
> + }
> + else
> + buf = &DummyBufferObject;
> +
> + _mesa_HashInsert(ctx->Shared->BufferObjects, buffers[i], buf);
> }
>
> mtx_unlock(&ctx->Shared->Mutex);
More information about the mesa-dev
mailing list