[Mesa-dev] [PATCH 05/13] nir: expose 'C' wrappers for std430 size/alignment

Rob Clark robdclark at gmail.com
Wed Feb 28 19:51:35 UTC 2018


Signed-off-by: Rob Clark <robdclark at gmail.com>
---
 src/compiler/nir_types.cpp | 12 ++++++++++++
 src/compiler/nir_types.h   |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index cbdd452dc81..0085a19248a 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -117,6 +117,18 @@ glsl_get_aoa_size(const struct glsl_type *type)
    return type->arrays_of_arrays_size();
 }
 
+unsigned
+glsl_std430_size(const struct glsl_type *type, bool row_major)
+{
+   return type->std430_size(row_major);
+}
+
+unsigned
+glsl_std430_base_alignment(const struct glsl_type *type, bool row_major)
+{
+   return type->std430_base_alignment(row_major);
+}
+
 unsigned
 glsl_count_attribute_slots(const struct glsl_type *type,
                            bool is_vertex_input)
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index e2dfd1ef5b7..5b5e09d137f 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -71,6 +71,10 @@ unsigned glsl_get_length(const struct glsl_type *type);
 
 unsigned glsl_get_aoa_size(const struct glsl_type *type);
 
+unsigned glsl_std430_size(const struct glsl_type *type, bool row_major);
+
+unsigned glsl_std430_base_alignment(const struct glsl_type *type, bool row_major);
+
 unsigned glsl_count_attribute_slots(const struct glsl_type *type,
                                     bool is_vertex_input);
 
-- 
2.14.3



More information about the mesa-dev mailing list