mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 00:20:09 +01:00
mesa: tidy up renderbuffer RefCount initialisation
42aaa548 changed the renderbuffer initialisation of RefCount from
1 to 0.
This is inconsitent with how we use RefCount elsewhere. Also every
driver implementation of NewRenderbuffer() calls
_mesa_init_renderbuffer() so its safe to set it there.
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
e75001811e
commit
32141e53d1
3 changed files with 1 additions and 4 deletions
|
|
@ -3044,8 +3044,6 @@ decompress_texture_image(struct gl_context *ctx,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
decompress_fbo->rb->RefCount = 1;
|
|
||||||
|
|
||||||
decompress_fbo->fb = ctx->Driver.NewFramebuffer(ctx, 0xDEADBEEF);
|
decompress_fbo->fb = ctx->Driver.NewFramebuffer(ctx, 0xDEADBEEF);
|
||||||
if (decompress_fbo->fb == NULL) {
|
if (decompress_fbo->fb == NULL) {
|
||||||
_mesa_meta_end(ctx);
|
_mesa_meta_end(ctx);
|
||||||
|
|
|
||||||
|
|
@ -1323,7 +1323,6 @@ allocate_renderbuffer_locked(struct gl_context *ctx, GLuint renderbuffer,
|
||||||
}
|
}
|
||||||
assert(newRb->AllocStorage);
|
assert(newRb->AllocStorage);
|
||||||
_mesa_HashInsertLocked(ctx->Shared->RenderBuffers, renderbuffer, newRb);
|
_mesa_HashInsertLocked(ctx->Shared->RenderBuffers, renderbuffer, newRb);
|
||||||
newRb->RefCount = 1; /* referenced by hash table */
|
|
||||||
|
|
||||||
return newRb;
|
return newRb;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
|
||||||
|
|
||||||
rb->ClassID = 0;
|
rb->ClassID = 0;
|
||||||
rb->Name = name;
|
rb->Name = name;
|
||||||
rb->RefCount = 0;
|
rb->RefCount = 1;
|
||||||
rb->Delete = _mesa_delete_renderbuffer;
|
rb->Delete = _mesa_delete_renderbuffer;
|
||||||
|
|
||||||
/* The rest of these should be set later by the caller of this function or
|
/* The rest of these should be set later by the caller of this function or
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue