mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d-common: Provide access to current debug level.
This commit is contained in:
parent
5808c280f7
commit
97c7bc0a18
@ -30,6 +30,8 @@ enum vkd3d_dbg_level
|
||||
VKD3D_DBG_LEVEL_TRACE,
|
||||
};
|
||||
|
||||
enum vkd3d_dbg_level vkd3d_dbg_get_level(void) DECLSPEC_HIDDEN;
|
||||
|
||||
void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function,
|
||||
const char *fmt, ...) VKD3D_PRINTF_FUNC(3, 4) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -50,6 +52,8 @@ const char *debugstr_w(const WCHAR *wstr) DECLSPEC_HIDDEN;
|
||||
#define FIXME VKD3D_DBG_LOG(FIXME)
|
||||
#define ERR VKD3D_DBG_LOG(ERR)
|
||||
|
||||
#define TRACE_ON() (vkd3d_dbg_get_level() == VKD3D_DBG_LEVEL_TRACE)
|
||||
|
||||
static inline const char *debugstr_guid(const GUID *guid)
|
||||
{
|
||||
if (!guid)
|
||||
|
@ -37,7 +37,7 @@ static const char *debug_level_names[] =
|
||||
/* VKD3D_DBG_LEVEL_TRACE */ "trace",
|
||||
};
|
||||
|
||||
static enum vkd3d_dbg_level vkd3d_dbg_get_level(void)
|
||||
enum vkd3d_dbg_level vkd3d_dbg_get_level(void)
|
||||
{
|
||||
static unsigned int level = ~0u;
|
||||
const char *vkd3d_debug;
|
||||
|
Loading…
Reference in New Issue
Block a user