diff options
Diffstat (limited to 'mesalib/src/gallium/auxiliary')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_format.c | 11 | ||||
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_format.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.c b/mesalib/src/gallium/auxiliary/util/u_format.c index 056f82f72..a53ed6f29 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format.c +++ b/mesalib/src/gallium/auxiliary/util/u_format.c @@ -187,6 +187,17 @@ util_format_is_intensity(enum pipe_format format) return FALSE; } +boolean +util_format_is_subsampled_422(enum pipe_format format) +{ + const struct util_format_description *desc = + util_format_description(format); + + return desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED && + desc->block.width == 2 && + desc->block.height == 1 && + desc->block.bits == 32; +} boolean util_format_is_supported(enum pipe_format format, unsigned bind) diff --git a/mesalib/src/gallium/auxiliary/util/u_format.h b/mesalib/src/gallium/auxiliary/util/u_format.h index 1dd5d52f1..2e2bf0240 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format.h +++ b/mesalib/src/gallium/auxiliary/util/u_format.h @@ -664,6 +664,9 @@ boolean util_format_is_intensity(enum pipe_format format); boolean +util_format_is_subsampled_422(enum pipe_format format); + +boolean util_format_is_pure_integer(enum pipe_format format); boolean |