mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 00:49:04 +02:00
util: add util_format_short_name
This commit is contained in:
parent
bc3d9a8b18
commit
5a6b9f3855
1 changed files with 13 additions and 0 deletions
|
|
@ -338,6 +338,19 @@ util_format_name(enum pipe_format format)
|
|||
return desc->name;
|
||||
}
|
||||
|
||||
static INLINE const char *
|
||||
util_format_short_name(enum pipe_format format)
|
||||
{
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
|
||||
assert(desc);
|
||||
if (!desc) {
|
||||
return "???";
|
||||
}
|
||||
|
||||
return desc->short_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this format is plain, see UTIL_FORMAT_LAYOUT_PLAIN for more info.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue