From bc79442f3fa23ecb40fcc67ea3cf4fd73fb0d3fe Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 30 Apr 2020 13:36:02 +1000 Subject: [PATCH] nir: add glsl_get_ifc_packing() helper This will be used in the following patch. Reviewed-by: Kenneth Graunke Reviewed-by: Eric Anholt Part-of: --- 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); -- 2.30.2