mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
gallium/util: Implement util_format_is_etc
This is the equivalent of util_format_is_s3tc, but for ETC. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
parent
c1a29e104c
commit
c8fe372a15
1 changed files with 13 additions and 0 deletions
|
|
@ -495,6 +495,19 @@ util_format_is_s3tc(enum pipe_format format)
|
|||
return desc->layout == UTIL_FORMAT_LAYOUT_S3TC ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static inline boolean
|
||||
util_format_is_etc(enum pipe_format format)
|
||||
{
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
|
||||
assert(desc);
|
||||
if (!desc) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return desc->layout == UTIL_FORMAT_LAYOUT_ETC ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static inline boolean
|
||||
util_format_is_srgb(enum pipe_format format)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue