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