glsl: rename record_types -> struct_types
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 5 Mar 2019 04:58:49 +0000 (15:58 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 6 Mar 2019 02:10:02 +0000 (13:10 +1100)
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl_types.cpp
src/compiler/glsl_types.h

index bc9bf1380b269cd9a0dd9170d9ab32797bfeeb74..50320a46e98af51be154bf0e41626b6a1a71bba1 100644 (file)
@@ -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);
index 3c675112ec13bca2d8cb3a61f3e5e72b02ba8289..56e5de7cd9123912b4ff0e77de3f56e9d4ad65ed 100644 (file)
@@ -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;