diff options
author | Timothy Arceri <[email protected]> | 2019-03-05 15:55:57 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-03-06 13:10:02 +1100 |
commit | 8294295dbdc053c92065844f2079aef8da05db9b (patch) | |
tree | 2111c97684794c261d28cb732dfcdd4b7c5b192d /src/compiler | |
parent | 88d8c4e29003bddeb3836a0af2a2d4dddf3ba9ac (diff) |
glsl: rename record_location_offset() -> struct_location_offset()
Replace done using:
find ./src -type f -exec sed -i -- \
's/record_location_offset(/struct_location_offset(/g' {} \;
Acked-by: Karol Herbst <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/gl_nir_lower_samplers_as_deref.c | 2 | ||||
-rw-r--r-- | src/compiler/glsl_types.cpp | 4 | ||||
-rw-r--r-- | src/compiler/glsl_types.h | 2 | ||||
-rw-r--r-- | src/compiler/nir_types.cpp | 4 | ||||
-rw-r--r-- | src/compiler/nir_types.h | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c b/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c index ea32195d42f..27e2d780e70 100644 --- a/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c +++ b/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c @@ -104,7 +104,7 @@ remove_struct_derefs_prep(nir_deref_instr **p, char **name, } case nir_deref_type_struct: { - *location += glsl_get_record_location_offset(cur->type, next->strct.index); + *location += glsl_get_struct_location_offset(cur->type, next->strct.index); ralloc_asprintf_append(name, ".%s", glsl_get_struct_elem_name(cur->type, next->strct.index)); diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 24f319dbde2..bc9bf1380b2 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -1425,7 +1425,7 @@ glsl_type::component_slots() const } unsigned -glsl_type::record_location_offset(unsigned length) const +glsl_type::struct_location_offset(unsigned length) const { unsigned offset = 0; const glsl_type *t = this->without_array(); @@ -1436,7 +1436,7 @@ glsl_type::record_location_offset(unsigned length) const const glsl_type *st = t->fields.structure[i].type; const glsl_type *wa = st->without_array(); if (wa->is_struct()) { - unsigned r_offset = wa->record_location_offset(wa->length); + unsigned r_offset = wa->struct_location_offset(wa->length); offset += st->is_array() ? st->arrays_of_arrays_size() * r_offset : r_offset; } else if (st->is_array() && st->fields.array->is_array()) { diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index 2e858bf4cd7..3c675112ec1 100644 --- a/src/compiler/glsl_types.h +++ b/src/compiler/glsl_types.h @@ -365,7 +365,7 @@ public: * For the initial call, length is the index of the member to find the * offset for. */ - unsigned record_location_offset(unsigned length) const; + unsigned struct_location_offset(unsigned length) const; /** * Calculate the number of unique values from glGetUniformLocation for the diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index 5e51dbc2d90..89028dcaf3d 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -192,10 +192,10 @@ glsl_get_sampler_coordinate_components(const struct glsl_type *type) } unsigned -glsl_get_record_location_offset(const struct glsl_type *type, +glsl_get_struct_location_offset(const struct glsl_type *type, unsigned length) { - return type->record_location_offset(length); + return type->struct_location_offset(length); } bool diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 68855a65d8e..e28c1b45960 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -89,7 +89,7 @@ enum glsl_base_type glsl_get_sampler_result_type(const struct glsl_type *type); unsigned glsl_get_sampler_target(const struct glsl_type *type); int glsl_get_sampler_coordinate_components(const struct glsl_type *type); -unsigned glsl_get_record_location_offset(const struct glsl_type *type, +unsigned glsl_get_struct_location_offset(const struct glsl_type *type, unsigned length); unsigned glsl_atomic_size(const struct glsl_type *type); |