Mesa (master): nir: add glsl_get_ifc_packing() helper

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 3 02:43:24 UTC 2020


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

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Thu Apr 30 13:36:02 2020 +1000

nir: add glsl_get_ifc_packing() helper

This will be used in the following patch.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>

---

 src/compiler/nir_types.cpp | 6 ++++++
 src/compiler/nir_types.h   | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 25043acaca7..70ae1173c36 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -803,6 +803,12 @@ glsl_get_internal_ifc_packing(const struct glsl_type *type,
    return type->get_internal_ifc_packing(std430_supported);
 }
 
+enum glsl_interface_packing
+glsl_get_ifc_packing(const struct glsl_type *type)
+{
+   return type->get_interface_packing();
+}
+
 unsigned
 glsl_get_std140_base_alignment(const struct glsl_type *type, bool row_major)
 {
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index 77a9c787d98..eeddcf2dabe 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -55,6 +55,8 @@ glsl_get_struct_field_data(const struct glsl_type *type, unsigned index);
 enum glsl_interface_packing
 glsl_get_internal_ifc_packing(const struct glsl_type *type,
                               bool std430_supported);
+enum glsl_interface_packing
+glsl_get_ifc_packing(const struct glsl_type *type);
 
 unsigned glsl_get_std140_base_alignment(const struct glsl_type *type,
                                         bool row_major);



More information about the mesa-commit mailing list