Fix compilation of demos project on 32-bit

This commit is contained in:
baldurk
2019-04-30 10:30:55 +01:00
parent e8a794c026
commit 4d7e8d879a
+23
View File
@@ -30,6 +30,29 @@
#define VK_NO_PROTOTYPES
#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || \
defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || \
defined(__powerpc64__)
#else
// make handles typed even on 32-bit, by relying on C++
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(obj) \
struct obj \
{ \
obj() : handle(0) {} \
obj(uint64_t x) : handle(x) {} \
bool operator==(const obj &other) const { return handle == other.handle; } \
bool operator<(const obj &other) const { return handle < other.handle; } \
bool operator!=(const obj &other) const { return handle != other.handle; } \
bool operator==(const int &other) const { return handle == other; } \
bool operator!=(const int &other) const { return handle != other; } \
operator bool() const { return handle != 0; } \
uint64_t handle; \
};
#endif
// first include our local vulkan to ensure it's used over any system header
#include "official/vulkan/vulkan.h"