summaryrefslogtreecommitdiff
path: root/src/compiler/glsl_types.cpp
diff options
context:
space:
mode:
authorCaio Oliveira <caio.oliveira@intel.com>2023-09-07 20:03:57 -0700
committerMarge Bot <emma+marge@anholt.net>2023-10-25 01:51:12 +0000
commite98ba3b53f823f46c17d0eaffcce80b8dbdf01fe (patch)
treea8682687b68ca1c4b57cba25ff98a8c1699044c9 /src/compiler/glsl_types.cpp
parent3ce4d5e033adce089346f98452829ce6f50b3160 (diff)
compiler/types: Add glsl_type_compare_no_precision() and use it in C++
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
Diffstat (limited to 'src/compiler/glsl_types.cpp')
-rw-r--r--src/compiler/glsl_types.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp
index 66463bf9de3..9e6fead59ea 100644
--- a/src/compiler/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -1348,35 +1348,35 @@ glsl_cmat_type(const struct glsl_cmat_description *desc)
return t;
}
-bool
-glsl_type::compare_no_precision(const struct glsl_type *b) const
+extern "C" bool
+glsl_type_compare_no_precision(const struct glsl_type *a, const struct glsl_type *b)
{
- if (this == b)
+ if (a == b)
return true;
- if (this->is_array()) {
- if (!b->is_array() || this->length != b->length)
+ if (a->is_array()) {
+ if (!b->is_array() || a->length != b->length)
return false;
const struct glsl_type *b_no_array = b->fields.array;
- return this->fields.array->compare_no_precision(b_no_array);
+ return a->fields.array->compare_no_precision(b_no_array);
}
- if (this->is_struct()) {
+ if (a->is_struct()) {
if (!b->is_struct())
return false;
- } else if (this->is_interface()) {
+ } else if (a->is_interface()) {
if (!b->is_interface())
return false;
} else {
return false;
}
- return record_compare(b,
- true, /* match_name */
- true, /* match_locations */
- false /* match_precision */);
+ return glsl_record_compare(a, b,
+ true, /* match_name */
+ true, /* match_locations */
+ false /* match_precision */);
}
extern "C" bool