mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 18:24:13 +08: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
d1b81dafbf
commit
7278e4442c
@ -6574,7 +6574,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,
|
||||
"notes": 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…
Reference in New Issue
Block a user