From 7af9459670de47d35acaff566ae70d8e83c3dec9 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Mon, 1 Nov 2021 13:19:54 +1100 Subject: [PATCH] nir/glsl: add glsl_record_compare() wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/compiler/nir_types.cpp | 7 +++++++ src/compiler/nir_types.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index 9d471480bbe..2231d4039dc 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -441,6 +441,13 @@ glsl_type_contains_image(const struct glsl_type *type) return type->contains_image(); } +bool +glsl_record_compare(const struct glsl_type *a, const struct glsl_type *b, + bool match_name, bool match_locations, bool match_precision) +{ + return a->record_compare(b, match_name, match_locations, match_precision); +} + const glsl_type * glsl_void_type(void) { diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 8360d9892de..ed5ec6159ff 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -166,6 +166,9 @@ bool glsl_sampler_type_is_array(const struct glsl_type *type); bool glsl_struct_type_is_packed(const struct glsl_type *type); bool glsl_contains_atomic(const struct glsl_type *type); bool glsl_contains_opaque(const struct glsl_type *type); +bool glsl_record_compare(const struct glsl_type *a, const struct glsl_type *b, + bool match_name, bool match_locations, + bool match_precision); const struct glsl_type *glsl_void_type(void); const struct glsl_type *glsl_float_type(void);