From 66cb64c8ad339848e7538faa24800755dc6221f8 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 9 Mar 2022 20:14:44 -0600 Subject: [PATCH] lavapipe: Reset the free_cmd_buffers list in TrimCommandPool We delete all the command buffers but they're still in the list so future allocations may try to re-use them post-free and another trim will re-delete them. Fixes: b38879f8c5f5 ("vallium: initial import of the vulkan frontend") Reviewed-by: Boris Brezillon Part-of: --- src/gallium/frontends/lavapipe/lvp_cmd_buffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c b/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c index 28589e66a39..07b36b9f9d5 100644 --- a/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c +++ b/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c @@ -265,6 +265,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_TrimCommandPool( &pool->free_cmd_buffers, pool_link) { lvp_cmd_buffer_destroy(cmd_buffer); } + list_inithead(&pool->free_cmd_buffers); } VKAPI_ATTR void VKAPI_CALL lvp_CmdDrawMultiEXT(