gallium/util: move debug_print_usage_enum to the u_debug_gallium
authorDylan Baker <dylan@pnwbakers.com>
Fri, 21 Sep 2018 17:37:35 +0000 (10:37 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 30 Oct 2018 21:32:52 +0000 (14:32 -0700)
This isn't used in mesa, maybe vmware uses this in a closed source state
tracker?

Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_debug.c
src/gallium/auxiliary/util/u_debug.h
src/gallium/auxiliary/util/u_debug_gallium.c
src/gallium/auxiliary/util/u_debug_gallium.h

index f17cb1b58f5af20f46bf8f195baecb0248621224..ece3cf74c18b4e67aaf684e126ce94fb4a455bc7 100644 (file)
@@ -491,23 +491,4 @@ debug_print_bind_flags(const char *msg, unsigned usage)
 }
 
 
-/**
- * Print PIPE_USAGE_x enum values with a message.
- */
-void
-debug_print_usage_enum(const char *msg, enum pipe_resource_usage usage)
-{
-   static const struct debug_named_value names[] = {
-      DEBUG_NAMED_VALUE(PIPE_USAGE_DEFAULT),
-      DEBUG_NAMED_VALUE(PIPE_USAGE_IMMUTABLE),
-      DEBUG_NAMED_VALUE(PIPE_USAGE_DYNAMIC),
-      DEBUG_NAMED_VALUE(PIPE_USAGE_STREAM),
-      DEBUG_NAMED_VALUE(PIPE_USAGE_STAGING),
-      DEBUG_NAMED_VALUE_END
-   };
-
-   debug_printf("%s: %s\n", msg, debug_dump_enum(names, usage));
-}
-
-
 #endif
index 6d1e92b7b971bebe8834ecdcbbfea047c0299c9e..6cacec6740d011fb62d32b1d4245917b08852214 100644 (file)
@@ -467,9 +467,6 @@ debug_print_transfer_flags(const char *msg, unsigned usage);
 void
 debug_print_bind_flags(const char *msg, unsigned usage);
 
-void
-debug_print_usage_enum(const char *msg, enum pipe_resource_usage usage);
-
 
 #ifdef __cplusplus
 }
index 977e19375ba084654550c8deed82ba56a419eafd..389c8f848a5abe33b90adf4cbcb6f0a246fd4ebf 100644 (file)
@@ -39,4 +39,23 @@ debug_print_format(const char *msg, unsigned fmt)
    debug_printf("%s: %s\n", msg, util_format_name(fmt));
 }
 
+
+/**
+ * Print PIPE_USAGE_x enum values with a message.
+ */
+void
+debug_print_usage_enum(const char *msg, enum pipe_resource_usage usage)
+{
+   static const struct debug_named_value names[] = {
+      DEBUG_NAMED_VALUE(PIPE_USAGE_DEFAULT),
+      DEBUG_NAMED_VALUE(PIPE_USAGE_IMMUTABLE),
+      DEBUG_NAMED_VALUE(PIPE_USAGE_DYNAMIC),
+      DEBUG_NAMED_VALUE(PIPE_USAGE_STREAM),
+      DEBUG_NAMED_VALUE(PIPE_USAGE_STAGING),
+      DEBUG_NAMED_VALUE_END
+   };
+
+   debug_printf("%s: %s\n", msg, debug_dump_enum(names, usage));
+}
+
 #endif
index 2e05e53c29d7922212930ff026c2f9412a6e16da..1e725275834437d37e7549c98af223f838500299 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _U_DEBUG_GALLIUM_H_
 #define _U_DEBUG_GALLIUM_H_
 
+#include "pipe/p_defines.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -39,6 +41,13 @@ void debug_print_format(const char *msg, unsigned fmt);
 #define debug_print_format(_msg, _fmt) ((void)0)
 #endif
 
+#ifdef DEBUG
+
+void
+debug_print_usage_enum(const char *msg, enum pipe_resource_usage usage);
+
+#endif
+
 #ifdef __cplusplus
 }
 #endif