vulkan: Add a concept of recycling an object
authorJason Ekstrand <jason.ekstrand@collabora.com>
Tue, 30 Aug 2022 16:06:39 +0000 (11:06 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 1 Sep 2022 20:17:25 +0000 (20:17 +0000)
commitea9e7ecdc1240d4c42f2709086837459f9da818c
tree7d7418bf08c61b05150b715dc1210e64ddb3162f
parent63b1290c2f30ae6b6c40dd0092306564a33686e3
vulkan: Add a concept of recycling an object

This is not necessarily a full re-initialization of the object but is
whatever is necessary/expedient for the client to see it as a new object
and not the one it has seen before.  For vk_base_object, this removes
any private data and resets the object name to NULL.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18324>
src/vulkan/runtime/vk_object.c
src/vulkan/runtime/vk_object.h