projects
/
platform
/
upstream
/
Vulkan-LoaderAndValidationLayers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a57761b
)
icd: add icd_format_is_equal()
author
Chia-I Wu
<olv@lunarg.com>
Mon, 20 Oct 2014 05:50:43 +0000
(13:50 +0800)
committer
Chia-I Wu
<olv@lunarg.com>
Tue, 21 Oct 2014 23:19:42 +0000
(07:19 +0800)
It returns true when the formats are equal.
icd/common/icd-format.h
patch
|
blob
|
history
diff --git
a/icd/common/icd-format.h
b/icd/common/icd-format.h
index 614b8a329bf07917b4962be5fa3a91d6247fdf63..9e1c29a867bf6e14b410e4b2ca0d6c7541200094 100644
(file)
--- 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 */