gallium/util: fix memory-leak

When I originally wrote this code, I forgot to release the views the
code creates, leaking a bit of memory that never gets cleaned up. That's
not great, so let's plug it.

Fixes: e8a40715a8 ("gallium/util: add blitter-support for stencil-fallback")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6960>
This commit is contained in:
Erik Faye-Lund 2020-10-01 13:25:08 +02:00 committed by Marge Bot
parent 03bea54e02
commit e7e0468f73
1 changed files with 3 additions and 0 deletions

View File

@ -2911,4 +2911,7 @@ util_blitter_stencil_fallback(struct blitter_context *blitter,
util_blitter_restore_render_cond(blitter);
util_blitter_restore_constant_buffer_state(blitter);
util_blitter_unset_running_flag(blitter);
pipe_surface_reference(&dst_view, NULL);
pipe_sampler_view_reference(&src_view, NULL);
}