mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
cso: unbind fb state when unbinding the context
this avoids leaking/ballooning references
cc: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22673>
(cherry picked from commit c686c98a79)
This commit is contained in:
parent
1aaef5b067
commit
fca009ad9a
2 changed files with 4 additions and 1 deletions
|
|
@ -697,7 +697,7 @@
|
|||
"description": "cso: unbind fb state when unbinding the context",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -438,6 +438,9 @@ cso_unbind_context(struct cso_context *ctx)
|
|||
|
||||
if (ctx->has_streamout)
|
||||
ctx->base.pipe->set_stream_output_targets(ctx->base.pipe, 0, NULL, NULL);
|
||||
|
||||
struct pipe_framebuffer_state fb = {0};
|
||||
ctx->base.pipe->set_framebuffer_state(ctx->base.pipe, &fb);
|
||||
}
|
||||
|
||||
util_unreference_framebuffer_state(&ctx->fb);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue