[Mesa-dev] [PATCH 4/5] glsl: rename record_types -> struct_types

Timothy Arceri tarceri at itsqueeze.com
Tue Mar 5 05:08:54 UTC 2019


---
 src/compiler/glsl_types.cpp | 16 ++++++++--------
 src/compiler/glsl_types.h   |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp
index bc9bf1380b2..50320a46e98 100644
--- a/src/compiler/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -32,7 +32,7 @@
 mtx_t glsl_type::hash_mutex = _MTX_INITIALIZER_NP;
 hash_table *glsl_type::explicit_matrix_types = NULL;
 hash_table *glsl_type::array_types = NULL;
-hash_table *glsl_type::record_types = NULL;
+hash_table *glsl_type::struct_types = NULL;
 hash_table *glsl_type::interface_types = NULL;
 hash_table *glsl_type::function_types = NULL;
 hash_table *glsl_type::subroutine_types = NULL;
@@ -486,9 +486,9 @@ _mesa_glsl_release_types(void)
       glsl_type::array_types = NULL;
    }
 
-   if (glsl_type::record_types != NULL) {
-      _mesa_hash_table_destroy(glsl_type::record_types, hash_free_type_function);
-      glsl_type::record_types = NULL;
+   if (glsl_type::struct_types != NULL) {
+      _mesa_hash_table_destroy(glsl_type::struct_types, hash_free_type_function);
+      glsl_type::struct_types = NULL;
    }
 
    if (glsl_type::interface_types != NULL) {
@@ -1135,17 +1135,17 @@ glsl_type::get_struct_instance(const glsl_struct_field *fields,
 
    mtx_lock(&glsl_type::hash_mutex);
 
-   if (record_types == NULL) {
-      record_types = _mesa_hash_table_create(NULL, record_key_hash,
+   if (struct_types == NULL) {
+      struct_types = _mesa_hash_table_create(NULL, record_key_hash,
                                              record_key_compare);
    }
 
-   const struct hash_entry *entry = _mesa_hash_table_search(record_types,
+   const struct hash_entry *entry = _mesa_hash_table_search(struct_types,
                                                             &key);
    if (entry == NULL) {
       const glsl_type *t = new glsl_type(fields, num_fields, name);
 
-      entry = _mesa_hash_table_insert(record_types, t, (void *) t);
+      entry = _mesa_hash_table_insert(struct_types, t, (void *) t);
    }
 
    assert(((glsl_type *) entry->data)->base_type == GLSL_TYPE_STRUCT);
diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h
index 3c675112ec1..56e5de7cd91 100644
--- a/src/compiler/glsl_types.h
+++ b/src/compiler/glsl_types.h
@@ -954,8 +954,8 @@ private:
    /** Hash table containing the known array types. */
    static struct hash_table *array_types;
 
-   /** Hash table containing the known record types. */
-   static struct hash_table *record_types;
+   /** Hash table containing the known struct types. */
+   static struct hash_table *struct_types;
 
    /** Hash table containing the known interface types. */
    static struct hash_table *interface_types;
-- 
2.20.1



More information about the mesa-dev mailing list