v3dv: revert the decision that the command buffer takes ownership of BOs
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 17 Dec 2019 07:41:35 +0000 (08:41 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:25 +0000 (21:21 +0000)
commit4075f8e2219c74ae01bb358817e381d5a3a23a1a
tree800f0e853608af556ed0c19ed2d398c4e6219695
parentec1d7e453eca12d7afd916ba63450e8ec1dfda82
v3dv: revert the decision that the command buffer takes ownership of BOs

The CLs in the command buffer will reference BOs allocated by the application
such as images and buffers, that will be destroyed by the application, so
destroying them with the command buffer won't be correct.

For now, let's just assume that the comman buffer only owns the BOs
it explicitly allocates and that other abstractions own their own
BOs and are responsible from freeing them.

In the future, we might consider a ref/unref system similar to v3d's, but
for now this should work.

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