mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
gallium/util: add debug_print_usage_enum() debug helper
Signed-off-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
b14cec0b8e
commit
943784bbcd
2 changed files with 22 additions and 0 deletions
|
|
@ -771,4 +771,23 @@ 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, unsigned 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
|
||||
|
|
|
|||
|
|
@ -470,6 +470,9 @@ 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, unsigned usage);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue