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

Submitted by Alex Smith on June 27, 2017, 3:53 p.m.

Details

Message ID 20170627155319.23388-1-asmith@feralinteractive.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Alex Smith June 27, 2017, 3:53 p.m.
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
---
 src/compiler/nir_types.cpp | 7 +++++++
 src/compiler/nir_types.h   | 3 +++
 2 files changed, 10 insertions(+)

Patch hide | download patch | download mbox

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);