diff options
author | Eduardo Lima Mitev <[email protected]> | 2017-10-19 13:28:35 +0200 |
---|---|---|
committer | Alejandro PiƱeiro <[email protected]> | 2018-06-21 14:25:05 +0200 |
commit | f1ab16cf179b605882c927a5be2f01daca703a47 (patch) | |
tree | e74d77117940585571ac4db65085bf1f3e965837 /src | |
parent | 2b8765b824cbbdcbbc51033c7ac7a1c3af264244 (diff) |
nir/types: Add a glsl_get_component_slots() utility
It is basically a wrapper around glsl_type::component_slots().
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir_types.cpp | 6 | ||||
-rw-r--r-- | src/compiler/nir_types.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index 78b66803f08..51ca797497e 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -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) { diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 5b441af1486..9c81980042f 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -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); |