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>
This commit is contained in:
Mike Blumenkrantz 2023-04-24 16:23:52 -04:00 committed by Marge Bot
parent cb865ac721
commit c686c98a79

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