[Mesa-dev] [PATCH v2 06/21] nir/types: Add a glsl_get_component_slots() utility
Alejandro PiƱeiro
apinheiro at igalia.com
Sat May 12 09:40:44 UTC 2018
From: Eduardo Lima Mitev <elima at igalia.com>
It is basically a wrapper around glsl_type::component_slots().
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
src/compiler/nir_types.cpp | 6 ++++++
src/compiler/nir_types.h | 1 +
2 files changed, 7 insertions(+)
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);
--
2.14.1
More information about the mesa-dev
mailing list