lavapipe: Fix lvp_execute_cmds' pipe_stream_output_target leak.

v2: Unbind SO targets, as suggested by Mike Blumenkrantz.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10688>
This commit is contained in:
Jose Fonseca 2021-05-07 11:48:20 +01:00
parent 38de1cd5f0
commit c1609c3531

View file

@ -3197,6 +3197,13 @@ VkResult lvp_execute_cmds(struct lvp_device *device,
state.pctx->set_constant_buffer(state.pctx, s, idx + 1, false, NULL);
}
state.pctx->set_stream_output_targets(state.pctx, 0, NULL, NULL);
for (unsigned i = 0; i < PIPE_MAX_SO_BUFFERS; i++) {
if (state.so_targets[i]) {
state.pctx->stream_output_target_destroy(state.pctx, state.so_targets[i]);
}
}
free(state.pending_clear_aspects);
free(state.cleared_views);
return VK_SUCCESS;