nir: add glsl_get_ifc_packing() helper
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 30 Apr 2020 03:36:02 +0000 (13:36 +1000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 02:22:23 +0000 (02:22 +0000)
This will be used in the following patch.

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

src/compiler/nir_types.cpp
src/compiler/nir_types.h

index 25043acaca713b24c9e9f6d9f4eda93298938f25..70ae1173c363b5b7ea93befe714ed0f7881c4cf5 100644 (file)
@@ -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)
 {
index 77a9c787d98225f7e352b2c81a2731d0b0346a2b..eeddcf2dabe3e1107cc9e105ca73b69fd2978741 100644 (file)
@@ -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);