}
static struct gl_buffer_object *
-nouveau_bufferobj_new(struct gl_context *ctx, GLuint buffer, GLenum target)
+nouveau_bufferobj_new(struct gl_context *ctx, GLuint buffer)
{
struct nouveau_bufferobj *nbo;
if (!nbo)
return NULL;
- _mesa_initialize_buffer_object(ctx, &nbo->base, buffer, target);
+ _mesa_initialize_buffer_object(ctx, &nbo->base, buffer);
return &nbo->base;
}
/* Free previous storage */
nouveau_bo_ref(NULL, &nbo->bo);
free(nbo->sys);
+ nbo->sys = NULL;
if (target == GL_ELEMENT_ARRAY_BUFFER_ARB ||
(size < 512 && usage == GL_DYNAMIC_DRAW_ARB) ||