From 88d8c4e29003bddeb3836a0af2a2d4dddf3ba9ac Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 5 Mar 2019 15:46:14 +1100 Subject: [PATCH] glsl: rename get_record_instance() -> get_struct_instance() Replace done using: find ./src -type f -exec sed -i -- \ 's/get_record_instance(/get_struct_instance(/g' {} \; Acked-by: Karol Herbst Acked-by: Jason Ekstrand Acked-by: Kenneth Graunke --- src/compiler/glsl/ast_to_hir.cpp | 2 +- src/compiler/glsl/tests/array_refcount_test.cpp | 2 +- src/compiler/glsl_types.cpp | 6 +++--- src/compiler/glsl_types.h | 2 +- src/compiler/nir_types.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 68acf2666cc..feea92258d3 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -7581,7 +7581,7 @@ ast_struct_specifier::hir(exec_list *instructions, validate_identifier(this->name, loc, state); - type = glsl_type::get_record_instance(fields, decl_count, this->name); + type = glsl_type::get_struct_instance(fields, decl_count, this->name); if (!type->is_anonymous() && !state->symbols->add_type(name, type)) { const glsl_type *match = state->symbols->get_type(name); diff --git a/src/compiler/glsl/tests/array_refcount_test.cpp b/src/compiler/glsl/tests/array_refcount_test.cpp index 45c204dc2f8..edd9cf42a31 100644 --- a/src/compiler/glsl/tests/array_refcount_test.cpp +++ b/src/compiler/glsl/tests/array_refcount_test.cpp @@ -477,7 +477,7 @@ TEST_F(array_refcount_test, do_not_process_array_inside_structure) }; const glsl_type *const record_of_array_3_of_int = - glsl_type::get_record_instance(fields, ARRAY_SIZE(fields), "S"); + glsl_type::get_struct_instance(fields, ARRAY_SIZE(fields), "S"); ir_variable *var_a = new(mem_ctx) ir_variable(glsl_type::int_type, "a", diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 260b07b67fe..24f319dbde2 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -434,7 +434,7 @@ const glsl_type *glsl_type::get_bare_type() const bare_fields[i].name = this->fields.structure[i].name; } const glsl_type *bare_type = - get_record_instance(bare_fields, this->length, this->name); + get_struct_instance(bare_fields, this->length, this->name); delete[] bare_fields; return bare_type; } @@ -1127,7 +1127,7 @@ glsl_type::record_key_hash(const void *a) const glsl_type * -glsl_type::get_record_instance(const glsl_struct_field *fields, +glsl_type::get_struct_instance(const glsl_struct_field *fields, unsigned num_fields, const char *name) { @@ -2375,7 +2375,7 @@ decode_type_from_blob(struct blob_reader *blob) t = glsl_type::get_interface_instance(fields, num_fields, packing, row_major, name); } else { - t = glsl_type::get_record_instance(fields, num_fields, name); + t = glsl_type::get_struct_instance(fields, num_fields, name); } free(fields); diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index 8f9a69556eb..2e858bf4cd7 100644 --- a/src/compiler/glsl_types.h +++ b/src/compiler/glsl_types.h @@ -312,7 +312,7 @@ public: /** * Get the instance of a record type */ - static const glsl_type *get_record_instance(const glsl_struct_field *fields, + static const glsl_type *get_struct_instance(const glsl_struct_field *fields, unsigned num_fields, const char *name); diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index 32b47f2b60f..5e51dbc2d90 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -486,7 +486,7 @@ const glsl_type * glsl_struct_type(const glsl_struct_field *fields, unsigned num_fields, const char *name) { - return glsl_type::get_record_instance(fields, num_fields, name); + return glsl_type::get_struct_instance(fields, num_fields, name); } const glsl_type * -- 2.30.2