new debugger functions
This commit is contained in:
10
projects/core/src/instance/gryphn_debugger.c
Normal file
10
projects/core/src/instance/gryphn_debugger.c
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#include "gryphn_debugger.h"
|
||||||
|
|
||||||
|
void gnDebuggerSetVerboseMessage(gnDebuggerCreateInfo* debugger, gnMessageData data) {
|
||||||
|
debugger->callback(
|
||||||
|
GN_MESSAGE_VERBOSE,
|
||||||
|
GN_DEBUG_MESSAGE_GENERAL,
|
||||||
|
data,
|
||||||
|
debugger->userData
|
||||||
|
);
|
||||||
|
}
|
@@ -29,7 +29,8 @@ typedef gnBool (*gnDebuggerCallback)(
|
|||||||
|
|
||||||
typedef enum gnDebuggerLayer {
|
typedef enum gnDebuggerLayer {
|
||||||
GN_DEBUGGER_LAYER_PLATFORM, // enable platform (vulkan validation) layers
|
GN_DEBUGGER_LAYER_PLATFORM, // enable platform (vulkan validation) layers
|
||||||
GN_DEBUGGER_LAYER_FUNCTIONS, // enable the checks on every function
|
GN_DEBUGGER_LAYER_FUNCTIONS, // enable the checks on every function,
|
||||||
|
GN_DEBUGGER_LAYER_ALLOCATORS, // enable the layer which debugs all allocations within Gryphn
|
||||||
|
|
||||||
GN_LAYER_MAX
|
GN_LAYER_MAX
|
||||||
} gnDebuggerLayer;
|
} gnDebuggerLayer;
|
||||||
@@ -42,6 +43,7 @@ typedef struct gnDebuggerCreateInfo {
|
|||||||
} gnDebuggerCreateInfo;
|
} gnDebuggerCreateInfo;
|
||||||
|
|
||||||
#ifdef GN_REVEAL_IMPL
|
#ifdef GN_REVEAL_IMPL
|
||||||
|
void gnDebuggerSetVerboseMessage(gnDebuggerCreateInfo* debugger, gnMessageData data);
|
||||||
static inline void gnDebuggerSetErrorMessage(gnDebuggerCreateInfo debugger, gnMessageData data) {
|
static inline void gnDebuggerSetErrorMessage(gnDebuggerCreateInfo debugger, gnMessageData data) {
|
||||||
// if (debugger == NULL) return;
|
// if (debugger == NULL) return;
|
||||||
debugger.callback(
|
debugger.callback(
|
||||||
|
Reference in New Issue
Block a user