a/vk: Add VK_NAME_OBJ_DISABLED helper

This commit is contained in:
Jakob Bornecrantz 2023-11-04 16:44:51 +00:00
parent bb87f54730
commit 2aa00dbf8f

View file

@ -641,12 +641,21 @@ vk_name_object(struct vk_bundle *vk, VkObjectType type, uint64_t object, const c
#else
#define VK_NAME_OBJ(VK, TYPE, SUFFIX, OBJ, NAME) \
#define VK_NAME_OBJ(VK, TYPE, SUFFIX, OBJ, NAME) VK_NAME_OBJ_DISABLED(VK, TYPE, OBJ)
#endif
/*!
* Some combinations of Vulkan implementation and types are broken, we still
* want type safety so we have this define. Examples of broken combinations:
*
* @ingroup aux_vk
*/
#define VK_NAME_OBJ_DISABLED(VK, TYPE, OBJ) \
do { \
XRT_MAYBE_UNUSED TYPE _thing = OBJ; \
} while (false)
#endif
// clang-format off
#define VK_NAME_INSTANCE(VK, OBJ, NAME) VK_NAME_OBJ(VK, VkInstance, INSTANCE, OBJ, NAME)