Skip to content
Snippets Groups Projects
Commit 06a2a857 authored by Boris Brezillon's avatar Boris Brezillon Committed by Marge Bot
Browse files

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: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: default avatarConstantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: default avatarErik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <mesa/mesa!26698>
parent 00cdd1d7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment