X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fnouveau%2Fnouveau_bufferobj.c;h=afccf353960d02222119ab944c145f667852ed2b;hb=da9e6fdfe27065b8ede8b2fe30c8cccc3b573245;hp=9a3d41739b9ebfd454a3cfe2518da6a5eae20852;hpb=dca350201e00c7cf1cfb009158f4abf27fbc96d2;p=mesa.git diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c index 9a3d41739b9..afccf353960 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c @@ -48,7 +48,7 @@ get_bufferobj_map(struct gl_context *ctx, struct gl_buffer_object *obj, } 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; @@ -56,7 +56,7 @@ nouveau_bufferobj_new(struct gl_context *ctx, GLuint buffer, GLenum target) if (!nbo) return NULL; - _mesa_initialize_buffer_object(ctx, &nbo->base, buffer, target); + _mesa_initialize_buffer_object(ctx, &nbo->base, buffer); return &nbo->base; } @@ -86,6 +86,7 @@ nouveau_bufferobj_data(struct gl_context *ctx, GLenum target, GLsizeiptrARB size /* 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) ||