Remove a local modification to vulkan.h defining type-safe 32-bit handle

* This is possible now because VK_NON_DISPATCHABLE_WRAPPER_STRUCT isn't
  redefined in vulkan.h if defined externally
This commit is contained in:
baldurk
2017-02-13 19:20:15 +00:00
parent 9d349d48ae
commit c326145834
2 changed files with 24 additions and 12 deletions
+1 -11
View File
@@ -57,17 +57,7 @@ extern "C" {
#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
#else
// RenderDoc modification - 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; } \
uint64_t handle; \
};
#define VK_NON_DISPATCHABLE_WRAPPER_STRUCT
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
#endif
#endif
+23 -1
View File
@@ -32,10 +32,32 @@
// SHARING - as above, for handling resource sharing between queues
#include "common/common.h"
#define VK_NO_PROTOTYPES
#if ENABLED(RDOC_X64)
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
#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; } \
uint64_t handle; \
};
#define VK_NON_DISPATCHABLE_WRAPPER_STRUCT
#endif
#include "api/replay/renderdoc_replay.h"
#include "common/common.h"
#include "core/core.h"
#include "official/vulkan.h"
#include "serialise/serialiser.h"