mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 03:50:13 +01:00
trace: Re-init refcounters just incase
This commit is contained in:
parent
f73066fbd5
commit
068fd6d50b
2 changed files with 5 additions and 0 deletions
|
|
@ -47,6 +47,8 @@ trace_buffer_create(struct trace_screen *tr_scr,
|
|||
goto error;
|
||||
|
||||
memcpy(&tr_buf->base, buffer, sizeof(struct pipe_buffer));
|
||||
|
||||
pipe_reference_init(&tr_buf->base.reference, 1);
|
||||
tr_buf->base.screen = &tr_scr->base;
|
||||
tr_buf->buffer = buffer;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ trace_texture_create(struct trace_screen *tr_scr,
|
|||
goto error;
|
||||
|
||||
memcpy(&tr_tex->base, texture, sizeof(struct pipe_texture));
|
||||
|
||||
pipe_reference_init(&tr_tex->base.reference, 1);
|
||||
tr_tex->base.screen = &tr_scr->base;
|
||||
tr_tex->texture = texture;
|
||||
|
||||
|
|
@ -86,6 +88,7 @@ trace_surface_create(struct trace_texture *tr_tex,
|
|||
|
||||
memcpy(&tr_surf->base, surface, sizeof(struct pipe_surface));
|
||||
|
||||
pipe_reference_init(&tr_surf->base.reference, 1);
|
||||
tr_surf->base.texture = NULL;
|
||||
pipe_texture_reference(&tr_surf->base.texture, &tr_tex->base);
|
||||
tr_surf->surface = surface;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue