diff options
| author | Chia-I Wu <olv@lunarg.com> | 2014-10-20 13:50:43 +0800 |
|---|---|---|
| committer | Chia-I Wu <olv@lunarg.com> | 2014-10-22 07:19:42 +0800 |
| commit | 86edf761c0ea5b7f3a2cd53779d7864148de9ea1 (patch) | |
| tree | 87719a834b8b7832a557f901ae506afb922c6917 | |
| parent | e36cbc21edec6d631cfe677dcaa7e92f8af61d5c (diff) | |
| download | usermoji-86edf761c0ea5b7f3a2cd53779d7864148de9ea1.tar.xz | |
icd: add icd_format_is_equal()
It returns true when the formats are equal.
| -rw-r--r-- | icd/common/icd-format.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/icd/common/icd-format.h b/icd/common/icd-format.h index 614b8a32..9e1c29a8 100644 --- a/icd/common/icd-format.h +++ b/icd/common/icd-format.h @@ -85,6 +85,12 @@ static inline bool icd_format_is_compressed(XGL_FORMAT format) } } +static inline bool icd_format_is_equal(XGL_FORMAT a, XGL_FORMAT b) +{ + return (a.channelFormat == b.channelFormat && + a.numericFormat == b.numericFormat); +} + static inline int icd_format_get_block_width(XGL_FORMAT format) { /* all compressed formats use 4x4 blocks */ |
