mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
a/vk: Add VK_NAME_OBJ_DISABLED helper
This commit is contained in:
parent
bb87f54730
commit
2aa00dbf8f
|
@ -641,12 +641,21 @@ vk_name_object(struct vk_bundle *vk, VkObjectType type, uint64_t object, const c
|
||||||
|
|
||||||
#else
|
#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 { \
|
do { \
|
||||||
XRT_MAYBE_UNUSED TYPE _thing = OBJ; \
|
XRT_MAYBE_UNUSED TYPE _thing = OBJ; \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define VK_NAME_INSTANCE(VK, OBJ, NAME) VK_NAME_OBJ(VK, VkInstance, INSTANCE, OBJ, NAME)
|
#define VK_NAME_INSTANCE(VK, OBJ, NAME) VK_NAME_OBJ(VK, VkInstance, INSTANCE, OBJ, NAME)
|
||||||
|
|
Loading…
Reference in a new issue