mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
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 <bas@basnieuwenhuizen.nl> Cc: "17.2 17.3" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
608af05ffb
commit
f0ae06a13c
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue