Mesa (master): nir_types: add glsl_varying_count helper

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Mar 8 14:01:27 UTC 2019


Module: Mesa
Branch: master
Commit: 9f68b9ac711b39d030e795820b61285d9524555a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f68b9ac711b39d030e795820b61285d9524555a

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Wed Mar  6 15:15:54 2019 +0100

nir_types: add glsl_varying_count helper

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 3dd233d8edb..a6c9dbd7192 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -157,6 +157,12 @@ glsl_get_component_slots(const struct glsl_type *type)
    return type->component_slots();
 }
 
+unsigned
+glsl_varying_count(const struct glsl_type *type)
+{
+   return type->varying_count();
+}
+
 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 7458efb8ca4..2c31fa2e43b 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -80,6 +80,7 @@ unsigned glsl_get_aoa_size(const struct glsl_type *type);
 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_varying_count(const struct glsl_type *type);
 
 const char *glsl_get_struct_elem_name(const struct glsl_type *type,
                                       unsigned index);




More information about the mesa-commit mailing list