From ffaa557aabe1609713062efe79aea8c7aeb1bf76 Mon Sep 17 00:00:00 2001 From: Petr Kraus Date: Sat, 13 May 2017 20:53:12 +0200 Subject: layers: Add handle to uint64 helper --- layers/vk_layer_logging.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h index 58947d50..a47acb04 100644 --- a/layers/vk_layer_logging.h +++ b/layers/vk_layer_logging.h @@ -383,4 +383,18 @@ static inline VKAPI_ATTR VkBool32 VKAPI_CALL win32_debug_output_msg(VkFlags msgF return false; } + +// TODO: Could be autogenerated for the specific handles for extra type safety... +template +static inline uint64_t HandleToUint64(HANDLE_T *h) { + return reinterpret_cast(h); +} + +template +uint64_t HandleToUint64(HANDLE_T h); + +static inline uint64_t HandleToUint64(uint64_t h) { + return h; +} + #endif // LAYER_LOGGING_H -- cgit v1.2.3