gallium/util: add util_{str,dump}_query_value_type

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle 2017-07-27 11:59:38 +02:00
parent aff9c54125
commit f402fa371e
2 changed files with 31 additions and 0 deletions

View file

@ -84,12 +84,18 @@ util_str_tex_filter(unsigned value, boolean shortened);
const char *
util_str_query_type(unsigned value, boolean shortened);
const char *
util_str_query_value_type(unsigned value, boolean shortened);
const char *
util_str_prim_mode(unsigned value, boolean shortened);
void
util_dump_query_type(FILE *stream, unsigned value);
void
util_dump_query_value_type(FILE *stream, unsigned value);
/*
* p_state.h, through a FILE
*/

View file

@ -395,6 +395,25 @@ util_query_type_short_names[] = {
DEFINE_UTIL_STR_CONTINUOUS(query_type)
static const char *
util_query_value_type_names[] = {
"PIPE_QUERY_TYPE_I32",
"PIPE_QUERY_TYPE_U32",
"PIPE_QUERY_TYPE_I64",
"PIPE_QUERY_TYPE_U64",
};
static const char *
util_query_value_type_short_names[] = {
"i32",
"u32",
"i64",
"u64",
};
DEFINE_UTIL_STR_CONTINUOUS(query_value_type)
static const char *
util_prim_mode_names[] = {
"PIPE_PRIM_POINTS",
@ -444,3 +463,9 @@ util_dump_query_type(FILE *stream, unsigned value)
else
fprintf(stream, "%s", util_str_query_type(value, false));
}
void
util_dump_query_value_type(FILE *stream, unsigned value)
{
fprintf(stream, "%s", util_str_query_value_type(value, false));
}