diff options
author | Michal Krol <[email protected]> | 2009-12-03 09:56:03 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2009-12-03 09:56:03 +0100 |
commit | 3400b668e35469d5dbba515e3a8b9d775fd2eff5 (patch) | |
tree | ae330b437c9c79876d11b2a7129615b60f660905 /src/gallium/auxiliary | |
parent | 3ffe25c91706fe5ab2735f07c3c8b4114b9f9514 (diff) |
Move pf_is_compressed() to u_format auxiliary module.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_format.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h index 7b5b7fcda5b..2931d2a8bbf 100644 --- a/src/gallium/auxiliary/util/u_format.h +++ b/src/gallium/auxiliary/util/u_format.h @@ -111,6 +111,28 @@ const struct util_format_description * util_format_description(enum pipe_format format); +/* + * Format query functions. + */ + +static INLINE boolean +util_format_is_compressed(enum pipe_format format) +{ + const struct util_format_description *desc = util_format_description(format); + + assert(format); + if (!format) { + return FALSE; + } + + return desc->layout == UTIL_FORMAT_LAYOUT_DXT ? TRUE : FALSE; +} + + +/* + * Format access functions. + */ + void util_format_read_4f(enum pipe_format format, float *dst, unsigned dst_stride, |