diff options
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_strings.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_strings.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c index 894d47501de..306ab4fefa8 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_strings.c +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c @@ -225,12 +225,12 @@ const char *tgsi_memory_names[3] = static inline void tgsi_strings_check(void) { - STATIC_ASSERT(Elements(tgsi_semantic_names) == TGSI_SEMANTIC_COUNT); - STATIC_ASSERT(Elements(tgsi_texture_names) == TGSI_TEXTURE_COUNT); - STATIC_ASSERT(Elements(tgsi_property_names) == TGSI_PROPERTY_COUNT); - STATIC_ASSERT(Elements(tgsi_primitive_names) == PIPE_PRIM_MAX); - STATIC_ASSERT(Elements(tgsi_interpolate_names) == TGSI_INTERPOLATE_COUNT); - STATIC_ASSERT(Elements(tgsi_return_type_names) == TGSI_RETURN_TYPE_COUNT); + STATIC_ASSERT(ARRAY_SIZE(tgsi_semantic_names) == TGSI_SEMANTIC_COUNT); + STATIC_ASSERT(ARRAY_SIZE(tgsi_texture_names) == TGSI_TEXTURE_COUNT); + STATIC_ASSERT(ARRAY_SIZE(tgsi_property_names) == TGSI_PROPERTY_COUNT); + STATIC_ASSERT(ARRAY_SIZE(tgsi_primitive_names) == PIPE_PRIM_MAX); + STATIC_ASSERT(ARRAY_SIZE(tgsi_interpolate_names) == TGSI_INTERPOLATE_COUNT); + STATIC_ASSERT(ARRAY_SIZE(tgsi_return_type_names) == TGSI_RETURN_TYPE_COUNT); (void) tgsi_processor_type_names; (void) tgsi_return_type_names; (void) tgsi_immediate_type_names; @@ -242,8 +242,8 @@ tgsi_strings_check(void) const char * tgsi_file_name(unsigned file) { - STATIC_ASSERT(Elements(tgsi_file_names) == TGSI_FILE_COUNT); - if (file < Elements(tgsi_file_names)) + STATIC_ASSERT(ARRAY_SIZE(tgsi_file_names) == TGSI_FILE_COUNT); + if (file < ARRAY_SIZE(tgsi_file_names)) return tgsi_file_names[file]; else return "invalid file"; |