nir/types: Add a glsl_get_component_slots() utility

It is basically a wrapper around glsl_type::component_slots().

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Eduardo Lima Mitev
2017-10-19 13:28:35 +02:00
committed by Alejandro Piñeiro
parent 2b8765b824
commit f1ab16cf17
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -124,6 +124,12 @@ glsl_count_attribute_slots(const struct glsl_type *type,
return type->count_attribute_slots(is_vertex_input);
}
unsigned
glsl_get_component_slots(const struct glsl_type *type)
{
return type->component_slots();
}
const char *
glsl_get_struct_elem_name(const struct glsl_type *type, unsigned index)
{
+1
View File
@@ -73,6 +73,7 @@ unsigned glsl_get_aoa_size(const struct glsl_type *type);
unsigned glsl_count_attribute_slots(const struct glsl_type *type,
bool is_vertex_input);
unsigned glsl_get_component_slots(const struct glsl_type *type);
const char *glsl_get_struct_elem_name(const struct glsl_type *type,
unsigned index);