panvk: Close batch when ending a command buffer

In some cases, there will be an open batch because an event operation
has been recorded, or a non-rendering command.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019>
This commit is contained in:
Tomeu Vizoso 2021-07-22 15:40:45 +02:00
parent 616aa3f138
commit cef56d5824

View file

@ -327,6 +327,9 @@ panvk_EndCommandBuffer(VkCommandBuffer commandBuffer)
{
VK_FROM_HANDLE(panvk_cmd_buffer, cmdbuf, commandBuffer);
if (cmdbuf->state.batch)
panvk_cmd_close_batch(cmdbuf);
cmdbuf->status = PANVK_CMD_BUFFER_STATUS_EXECUTABLE;
return cmdbuf->record_result;