glsl: rename record_types -> struct_types

Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Timothy Arceri
2019-03-05 15:58:49 +11:00
parent 8294295dbd
commit e16a27fcf8
2 changed files with 10 additions and 10 deletions

View File

@@ -32,7 +32,7 @@
mtx_t glsl_type::hash_mutex = _MTX_INITIALIZER_NP; mtx_t glsl_type::hash_mutex = _MTX_INITIALIZER_NP;
hash_table *glsl_type::explicit_matrix_types = NULL; hash_table *glsl_type::explicit_matrix_types = NULL;
hash_table *glsl_type::array_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::interface_types = NULL;
hash_table *glsl_type::function_types = NULL; hash_table *glsl_type::function_types = NULL;
hash_table *glsl_type::subroutine_types = NULL; hash_table *glsl_type::subroutine_types = NULL;
@@ -486,9 +486,9 @@ _mesa_glsl_release_types(void)
glsl_type::array_types = NULL; glsl_type::array_types = NULL;
} }
if (glsl_type::record_types != NULL) { if (glsl_type::struct_types != NULL) {
_mesa_hash_table_destroy(glsl_type::record_types, hash_free_type_function); _mesa_hash_table_destroy(glsl_type::struct_types, hash_free_type_function);
glsl_type::record_types = NULL; glsl_type::struct_types = NULL;
} }
if (glsl_type::interface_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); mtx_lock(&glsl_type::hash_mutex);
if (record_types == NULL) { if (struct_types == NULL) {
record_types = _mesa_hash_table_create(NULL, record_key_hash, struct_types = _mesa_hash_table_create(NULL, record_key_hash,
record_key_compare); 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); &key);
if (entry == NULL) { if (entry == NULL) {
const glsl_type *t = new glsl_type(fields, num_fields, name); 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); assert(((glsl_type *) entry->data)->base_type == GLSL_TYPE_STRUCT);

View File

@@ -954,8 +954,8 @@ private:
/** Hash table containing the known array types. */ /** Hash table containing the known array types. */
static struct hash_table *array_types; static struct hash_table *array_types;
/** Hash table containing the known record types. */ /** Hash table containing the known struct types. */
static struct hash_table *record_types; static struct hash_table *struct_types;
/** Hash table containing the known interface types. */ /** Hash table containing the known interface types. */
static struct hash_table *interface_types; static struct hash_table *interface_types;