diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-07-18 22:22:22 +0900 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-07-18 22:22:22 +0900 |
commit | 583b9ccbd5961678fa7e594c3117d7c895ef6b41 (patch) | |
tree | 3386573af2d065eb70af75b4fc9c9c0c58e5d710 | |
parent | 3ca935d9efaef4dd9746d3b2207e329b77bb1018 (diff) |
gallium: Add a pf_is_ycbcr utility function.
-rw-r--r-- | src/gallium/include/pipe/p_format.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h index fefb8fdf1b..947c445583 100644 --- a/src/gallium/include/pipe/p_format.h +++ b/src/gallium/include/pipe/p_format.h @@ -522,15 +522,13 @@ pf_get_nblocks(const struct pipe_format_block *block, unsigned width, unsigned h static INLINE boolean pf_is_compressed( enum pipe_format format ) { - switch (format) { - case PIPE_FORMAT_DXT1_RGB: - case PIPE_FORMAT_DXT1_RGBA: - case PIPE_FORMAT_DXT3_RGBA: - case PIPE_FORMAT_DXT5_RGBA: - return TRUE; - default: - return FALSE; - } + return pf_layout(format) == PIPE_FORMAT_LAYOUT_DXT ? TRUE : FALSE; +} + +static INLINE boolean +pf_is_ycbcr( enum pipe_format format ) +{ + return pf_layout(format) == PIPE_FORMAT_LAYOUT_YCBCR ? TRUE : FALSE; } #ifdef __cplusplus |