mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 00:16:45 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user