diff options
Diffstat (limited to 'src/gallium/auxiliary/util/u_format.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_format.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h index d0557785f93..88bfd72d053 100644 --- a/src/gallium/auxiliary/util/u_format.h +++ b/src/gallium/auxiliary/util/u_format.h @@ -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) { |