From: Jason Ekstrand Date: Fri, 25 Mar 2016 23:12:19 +0000 (-0700) Subject: nir/types: Add a wrapper for count_attribute_slots X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=05db68024853fe3613480ca164485ccf67f1a7cc;p=mesa.git nir/types: Add a wrapper for count_attribute_slots Reviewed-by: Rob Clark --- diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index 3669cfed360..70e9cd397fc 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -124,6 +124,13 @@ glsl_get_aoa_size(const struct glsl_type *type) return type->arrays_of_arrays_size(); } +unsigned +glsl_count_attribute_slots(const struct glsl_type *type, + bool vertex_input_slots) +{ + return type->count_attribute_slots(vertex_input_slots); +} + const char * glsl_get_struct_elem_name(const struct glsl_type *type, unsigned index) { diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 07487838b50..5efdd85dea5 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -68,6 +68,9 @@ unsigned glsl_get_length(const struct glsl_type *type); unsigned glsl_get_aoa_size(const struct glsl_type *type); +unsigned glsl_count_attribute_slots(const struct glsl_type *type, + bool vertex_input_slots); + const char *glsl_get_struct_elem_name(const struct glsl_type *type, unsigned index);