util/format: Add VK_FORMAT_D16_UNORM_S8_UINT.
[mesa.git] / src / util / u_debug.h
index 2136920417ab0a890f6cc3faedeb337883a2f7b1..a9e44bf24e2073a15fb282eaa27454ed19acfcae 100644 (file)
 #ifndef U_DEBUG_H_
 #define U_DEBUG_H_
 
-
+#include <stdarg.h>
+#include <string.h>
 #include "util/os_misc.h"
 #include "util/detect_os.h"
+#include "util/macros.h"
 
 #if DETECT_OS_HAIKU
 /* Haiku provides debug_printf in libroot with OS.h */
 #include <OS.h>
 #endif
 
-#include "pipe/p_defines.h"
-
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -110,9 +109,9 @@ debug_printf(const char *format, ...)
  */
 #define debug_printf_once(args) \
    do { \
-      static boolean once = TRUE; \
+      static bool once = true; \
       if (once) { \
-         once = FALSE; \
+         once = false; \
          debug_printf args; \
       } \
    } while (0)
@@ -236,11 +235,11 @@ void _debug_assert_fail(const char *expr,
 #ifdef DEBUG
 #define debug_warn_once(__msg) \
    do { \
-      static bool warned = FALSE; \
+      static bool warned = false; \
       if (!warned) { \
          _debug_printf("%s:%u:%s: one time warning: %s\n", \
                        __FILE__, __LINE__, __FUNCTION__, __msg); \
-         warned = TRUE; \
+         warned = true; \
       } \
    } while (0)
 #else
@@ -390,8 +389,8 @@ void debug_funclog_enter_exit(const char* f, const int line, const char* file);
 const char *
 debug_get_option(const char *name, const char *dfault);
 
-boolean
-debug_get_bool_option(const char *name, boolean dfault);
+bool
+debug_get_bool_option(const char *name, bool dfault);
 
 long
 debug_get_num_option(const char *name, long dfault);
@@ -405,23 +404,23 @@ debug_get_flags_option(const char *name,
 static const char * \
 debug_get_option_ ## suffix (void) \
 { \
-   static boolean first = TRUE; \
+   static bool first = true; \
    static const char * value; \
    if (first) { \
-      first = FALSE; \
+      first = false; \
       value = debug_get_option(name, dfault); \
    } \
    return value; \
 }
 
 #define DEBUG_GET_ONCE_BOOL_OPTION(sufix, name, dfault) \
-static boolean \
+static bool \
 debug_get_option_ ## sufix (void) \
 { \
-   static boolean first = TRUE; \
-   static boolean value; \
+   static bool first = true; \
+   static bool value; \
    if (first) { \
-      first = FALSE; \
+      first = false; \
       value = debug_get_bool_option(name, dfault); \
    } \
    return value; \
@@ -431,10 +430,10 @@ debug_get_option_ ## sufix (void) \
 static long \
 debug_get_option_ ## sufix (void) \
 { \
-   static boolean first = TRUE; \
+   static bool first = true; \
    static long value; \
    if (first) { \
-      first = FALSE; \
+      first = false; \
       value = debug_get_num_option(name, dfault); \
    } \
    return value; \
@@ -444,10 +443,10 @@ debug_get_option_ ## sufix (void) \
 static unsigned long \
 debug_get_option_ ## sufix (void) \
 { \
-   static boolean first = TRUE; \
+   static bool first = true; \
    static unsigned long value; \
    if (first) { \
-      first = FALSE; \
+      first = false; \
       value = debug_get_flags_option(name, flags, dfault); \
    } \
    return value; \