From: Timothy Arceri Date: Thu, 30 Apr 2020 03:36:02 +0000 (+1000) Subject: nir: add glsl_get_ifc_packing() helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc79442f3fa23ecb40fcc67ea3cf4fd73fb0d3fe;p=mesa.git 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: --- 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);