-#define WSI_DEFINE_NONDISP_HANDLE_CASTS(__wsi_type, __VkType) \
- \
- static inline struct __wsi_type * \
- __wsi_type ## _from_handle(__VkType _handle) \
- { \
- return (struct __wsi_type *)(uintptr_t) _handle; \
- } \
- \
- static inline __VkType \
- __wsi_type ## _to_handle(struct __wsi_type *_obj) \
- { \
- return (__VkType)(uintptr_t) _obj; \
- }
-
-#define WSI_FROM_HANDLE(__wsi_type, __name, __handle) \
- struct __wsi_type *__name = __wsi_type ## _from_handle(__handle)
-
-WSI_DEFINE_NONDISP_HANDLE_CASTS(wsi_swapchain, VkSwapchainKHR)
+VK_DEFINE_NONDISP_HANDLE_CASTS(wsi_swapchain, base, VkSwapchainKHR,
+ VK_OBJECT_TYPE_SWAPCHAIN_KHR)