aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_debug.c19
-rw-r--r--src/gallium/auxiliary/util/u_debug.h3
-rw-r--r--src/gallium/auxiliary/util/u_debug_gallium.c19
-rw-r--r--src/gallium/auxiliary/util/u_debug_gallium.h9
4 files changed, 28 insertions, 22 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index f17cb1b58f5..ece3cf74c18 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -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
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index 6d1e92b7b97..6cacec6740d 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -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
}
diff --git a/src/gallium/auxiliary/util/u_debug_gallium.c b/src/gallium/auxiliary/util/u_debug_gallium.c
index 977e19375ba..389c8f848a5 100644
--- a/src/gallium/auxiliary/util/u_debug_gallium.c
+++ b/src/gallium/auxiliary/util/u_debug_gallium.c
@@ -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
diff --git a/src/gallium/auxiliary/util/u_debug_gallium.h b/src/gallium/auxiliary/util/u_debug_gallium.h
index 2e05e53c29d..1e725275834 100644
--- a/src/gallium/auxiliary/util/u_debug_gallium.h
+++ b/src/gallium/auxiliary/util/u_debug_gallium.h
@@ -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