panvk: Keep a ref to a pan_kmod_bo in panvk_image
We don't need the panfrost_bo object which contains both the BO and
its CPU/GPU mappings. We store the GPU address at bind time and store
it in the pimage object.
While at it, keep a ref to the buffer object so we don't end up with
a invalid deref (UAF) if the vulkan user does something silly like
freeing the VkDeviceMemory object while the VkImage is still active.
Flag this with a TODO to make sure we don't forget about it.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
7 files changed