venus: refactor private descriptor_set helpers to be private
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13522>
This commit is contained in:
parent
565d65baaf
commit
9fa702f28c
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "vn_device.h"
|
||||
|
||||
void
|
||||
static void
|
||||
vn_descriptor_set_layout_destroy(struct vn_device *dev,
|
||||
struct vn_descriptor_set_layout *layout)
|
||||
{
|
||||
|
@ -33,6 +33,22 @@ vn_descriptor_set_layout_destroy(struct vn_device *dev,
|
|||
vk_free(alloc, layout);
|
||||
}
|
||||
|
||||
static inline struct vn_descriptor_set_layout *
|
||||
vn_descriptor_set_layout_ref(struct vn_device *dev,
|
||||
struct vn_descriptor_set_layout *layout)
|
||||
{
|
||||
vn_refcount_inc(&layout->refcount);
|
||||
return layout;
|
||||
}
|
||||
|
||||
static inline void
|
||||
vn_descriptor_set_layout_unref(struct vn_device *dev,
|
||||
struct vn_descriptor_set_layout *layout)
|
||||
{
|
||||
if (vn_refcount_dec(&layout->refcount))
|
||||
vn_descriptor_set_layout_destroy(dev, layout);
|
||||
}
|
||||
|
||||
static void
|
||||
vn_descriptor_set_destroy(struct vn_device *dev,
|
||||
struct vn_descriptor_set *set,
|
||||
|
|
|
@ -100,24 +100,4 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(vn_descriptor_update_template,
|
|||
VkDescriptorUpdateTemplate,
|
||||
VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE)
|
||||
|
||||
void
|
||||
vn_descriptor_set_layout_destroy(struct vn_device *dev,
|
||||
struct vn_descriptor_set_layout *layout);
|
||||
|
||||
static inline struct vn_descriptor_set_layout *
|
||||
vn_descriptor_set_layout_ref(struct vn_device *dev,
|
||||
struct vn_descriptor_set_layout *layout)
|
||||
{
|
||||
vn_refcount_inc(&layout->refcount);
|
||||
return layout;
|
||||
}
|
||||
|
||||
static inline void
|
||||
vn_descriptor_set_layout_unref(struct vn_device *dev,
|
||||
struct vn_descriptor_set_layout *layout)
|
||||
{
|
||||
if (vn_refcount_dec(&layout->refcount))
|
||||
vn_descriptor_set_layout_destroy(dev, layout);
|
||||
}
|
||||
|
||||
#endif /* VN_DESCRIPTOR_SET_H */
|
||||
|
|
Loading…
Reference in New Issue