Module: Mesa Branch: master Commit: f0ae06a13c1a60f58de77401f705eaf620b5b822 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0ae06a13c1a60f58de77401f705eaf620b5b822
Author: Dave Airlie <[email protected]> Date: Mon Nov 6 00:35:17 2017 +0000 radv: free attachments on end command buffer. If we allocate attachments in the begin command buffer due to the render pass continue bit, we were leaking them. Since renderpasses inside a cmd buffer malloc/free these properly, and set to NULL, we just need to call free at end. Fixes a memory leak with multithreading demo. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2 17.3" <[email protected]> Signed-off-by: Dave Airlie <[email protected]> --- src/amd/vulkan/radv_cmd_buffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 43505a3372..1e5c73ea58 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2509,6 +2509,8 @@ VkResult radv_EndCommandBuffer( si_emit_cache_flush(cmd_buffer); } + vk_free(&cmd_buffer->pool->alloc, cmd_buffer->state.attachments); + if (!cmd_buffer->device->ws->cs_finalize(cmd_buffer->cs)) return VK_ERROR_OUT_OF_DEVICE_MEMORY; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
