From 5d57bd0345bc8f4bbbfd563079247755fa762417 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 2 Nov 2021 12:33:10 +1100 Subject: [PATCH] nir/glsl: wrap component_slots_aligned() 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 | 6 ++++++ src/compiler/nir_types.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index e99b755ba9b..4693ddd4905 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -203,6 +203,12 @@ glsl_get_component_slots(const struct glsl_type *type) return type->component_slots(); } +unsigned +glsl_get_component_slots_aligned(const struct glsl_type *type, unsigned offset) +{ + return type->component_slots_aligned(offset); +} + unsigned glsl_varying_count(const struct glsl_type *type) { diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index d86f995fe10..ddbb472c9fe 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -102,6 +102,8 @@ unsigned glsl_count_dword_slots(const struct glsl_type *type, bool is_bindless); unsigned glsl_count_attribute_slots(const struct glsl_type *type, bool is_gl_vertex_input); unsigned glsl_get_component_slots(const struct glsl_type *type); +unsigned glsl_get_component_slots_aligned(const struct glsl_type *type, + unsigned offset); unsigned glsl_varying_count(const struct glsl_type *type); const char *glsl_get_struct_elem_name(const struct glsl_type *type,