diff options
author | Timothy Arceri <[email protected]> | 2020-04-30 13:36:02 +1000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-03 02:22:23 +0000 |
commit | bc79442f3fa23ecb40fcc67ea3cf4fd73fb0d3fe (patch) | |
tree | 3fe868137850d53f576af096fcd850f323239985 /src/compiler | |
parent | 7ac617c1172a5031818fdd907579777acf7729b0 (diff) |
nir: add glsl_get_ifc_packing() helper
This will be used in the following patch.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir_types.cpp | 6 | ||||
-rw-r--r-- | src/compiler/nir_types.h | 2 |
2 files changed, 8 insertions, 0 deletions
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); |