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 <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
078b3cdb34
commit
e4f1fea821
|
@ -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
|
#endif
|
||||||
|
|
|
@ -467,9 +467,6 @@ debug_print_transfer_flags(const char *msg, unsigned usage);
|
||||||
void
|
void
|
||||||
debug_print_bind_flags(const char *msg, unsigned usage);
|
debug_print_bind_flags(const char *msg, unsigned usage);
|
||||||
|
|
||||||
void
|
|
||||||
debug_print_usage_enum(const char *msg, enum pipe_resource_usage usage);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,23 @@ debug_print_format(const char *msg, unsigned fmt)
|
||||||
debug_printf("%s: %s\n", msg, util_format_name(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
|
#endif
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#ifndef _U_DEBUG_GALLIUM_H_
|
#ifndef _U_DEBUG_GALLIUM_H_
|
||||||
#define _U_DEBUG_GALLIUM_H_
|
#define _U_DEBUG_GALLIUM_H_
|
||||||
|
|
||||||
|
#include "pipe/p_defines.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,6 +41,13 @@ void debug_print_format(const char *msg, unsigned fmt);
|
||||||
#define debug_print_format(_msg, _fmt) ((void)0)
|
#define debug_print_format(_msg, _fmt) ((void)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
|
||||||
|
void
|
||||||
|
debug_print_usage_enum(const char *msg, enum pipe_resource_usage usage);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue