diff options
author | Dylan Baker <[email protected]> | 2018-09-21 10:37:35 -0700 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2018-10-30 14:32:52 -0700 |
commit | e4f1fea82118a5e9586fedf88f69d4456f72d2ad (patch) | |
tree | 3d132dc273f36b58250430f98d60303ee4a7c083 /src/gallium | |
parent | 078b3cdb34202c0d4b23b7f8723cd92081240ed5 (diff) |
gallium/util: move debug_print_usage_enum to the u_debug_gallium
This isn't used in mesa, maybe vmware uses this in a closed source state
tracker?
Tested-by: Brian Paul <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_debug.c | 19 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug.h | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_gallium.c | 19 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_gallium.h | 9 |
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 |