[Mesa-dev] [RFC PATCH 1/2] nir: Add a C wrapper for glsl_type::std430_array_stride

Alex Smith asmith at feralinteractive.com
Tue Jun 27 15:53:18 UTC 2017


Signed-off-by: Alex Smith <asmith at feralinteractive.com>
---
 src/compiler/nir_types.cpp | 7 +++++++
 src/compiler/nir_types.h   | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 25980b9..554130c 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -115,6 +115,13 @@ glsl_count_attribute_slots(const struct glsl_type *type,
    return type->count_attribute_slots(is_vertex_input);
 }
 
+unsigned
+glsl_get_std430_array_stride(const struct glsl_type *type,
+                             bool row_major)
+{
+	return type->std430_array_stride(row_major);
+}
+
 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 0c52bb9..687bc0c 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -72,6 +72,9 @@ 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_std430_array_stride(const struct glsl_type *type,
+                                      bool row_major);
+
 const char *glsl_get_struct_elem_name(const struct glsl_type *type,
                                       unsigned index);
 
-- 
2.9.4



More information about the mesa-dev mailing list