mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
lima: fix refcnt imbalance related to framebuffer
Indeed, the current framebuffer hardcoded cleanup
is not sufficient.
For instance, this issue is triggered with:
"piglit/bin/fbo-depthstencil clear default_fb -samples=2 -auto"
while setting GALLIUM_REFCNT_LOG=refcnt.log.
cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22234>
(cherry picked from commit 035b84f308)
This commit is contained in:
parent
0128c73e35
commit
8881d4e36f
3 changed files with 2 additions and 4 deletions
|
|
@ -2964,7 +2964,7 @@
|
|||
"description": "lima: fix refcnt imbalance related to framebuffer",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ lima_context_destroy(struct pipe_context *pctx)
|
|||
|
||||
lima_program_fini(ctx);
|
||||
lima_state_fini(ctx);
|
||||
util_unreference_framebuffer_state(&ctx->framebuffer.base);
|
||||
|
||||
if (ctx->blitter)
|
||||
util_blitter_destroy(ctx->blitter);
|
||||
|
|
|
|||
|
|
@ -473,7 +473,4 @@ lima_state_fini(struct lima_context *ctx)
|
|||
|
||||
util_set_vertex_buffers_mask(so->vb, &so->enabled_mask, NULL,
|
||||
0, 0, ARRAY_SIZE(so->vb), false);
|
||||
|
||||
pipe_surface_reference(&ctx->framebuffer.base.cbufs[0], NULL);
|
||||
pipe_surface_reference(&ctx->framebuffer.base.zsbuf, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue