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,