aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Kraus <petr_kraus@email.cz>2017-05-13 20:53:12 +0200
committerTobin Ehlis <tobine@google.com>2017-05-17 09:28:49 -0600
commitffaa557aabe1609713062efe79aea8c7aeb1bf76 (patch)
tree9b22cedc0a36c0bbb4e7b0782c887e3d59311e54
parentd4fe452af3ee07bb54aa5ece253a414fe0ab657f (diff)
downloadusermoji-ffaa557aabe1609713062efe79aea8c7aeb1bf76.tar.xz
layers: Add handle to uint64 helper
-rw-r--r--layers/vk_layer_logging.h14
1 files changed, 14 insertions, 0 deletions
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 <typename HANDLE_T>
+static inline uint64_t HandleToUint64(HANDLE_T *h) {
+ return reinterpret_cast<uint64_t>(h);
+}
+
+template <typename HANDLE_T>
+uint64_t HandleToUint64(HANDLE_T h);
+
+static inline uint64_t HandleToUint64(uint64_t h) {
+ return h;
+}
+
#endif // LAYER_LOGGING_H