diff options
author | Chia-I Wu <[email protected]> | 2014-09-12 11:06:39 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-09-12 16:58:30 +0800 |
commit | 521887f9fd186c8dd39457f2f54be889558676bc (patch) | |
tree | b3c77db828cd4551395db5f08faa73c7810f9f5f /src/gallium/drivers/ilo/ilo_common.h | |
parent | 56d2ebb019f38d727a41f8f4a8ebd4f1aeee19e0 (diff) |
ilo: add ILO_DEV_ASSERT()
It replaces ILO_GPE_VALID_GEN().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_common.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_common.h b/src/gallium/drivers/ilo/ilo_common.h index 591730d8754..ef38e4d486e 100644 --- a/src/gallium/drivers/ilo/ilo_common.h +++ b/src/gallium/drivers/ilo/ilo_common.h @@ -49,6 +49,9 @@ #define ILO_DEBUG_HOT 0 #endif +#define ILO_DEV_ASSERT(dev, min_gen, max_gen) \ + ilo_dev_assert(dev, ILO_GEN(min_gen), ILO_GEN(max_gen)) + enum ilo_debug { ILO_DEBUG_3D = 1 << 0, ILO_DEBUG_VS = 1 << 1, @@ -91,6 +94,12 @@ ilo_dev_gen(const struct ilo_dev_info *dev) return dev->gen_opaque; } +static inline void +ilo_dev_assert(const struct ilo_dev_info *dev, int min_opqaue, int max_opqaue) +{ + assert(dev->gen_opaque >= min_opqaue && dev->gen_opaque <= max_opqaue); +} + /** * Print a message, for dumping or debugging. */ |