v3dv: fix leaks during recording of meta blits
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 29 Apr 2020 07:42:01 +0000 (09:42 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:30 +0000 (21:21 +0000)
commitf49d9d7c8b1a6c84dec921d18aed5cc3f4ce21de
tree0da9d19799fcf597c8e6a9df99d10ba145231857
parentbfadd70d6c230780150eed2c2f215011c952a3f9
v3dv: fix leaks during recording of meta blits

This uses the framework to register private commmand buffer objects
that get freed automatically when the command buffer is destroyed by
the application.

This change also moves the descriptor set pool that the meta blit path
uses to allocate descriptors for the blit source textures, from the
device to the command buffer, so we can have a descriptor pool per
command buffer.  This is necessary to ensure correct behavior when
doing multi-threaded command buffer recording (alternatively, we would
have to lock around the descriptor set allocation code, which would be
undesirable).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/vulkan/v3dv_cmd_buffer.c
src/broadcom/vulkan/v3dv_device.c
src/broadcom/vulkan/v3dv_meta_copy.c
src/broadcom/vulkan/v3dv_private.h