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:
Mike Blumenkrantz 2023-04-24 16:23:52 -04:00 committed by Dylan Baker
parent d1b81dafbf
commit 7278e4442c
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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);