From 262b611a5bb08ebb8d2876bc44a44952d610a248 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 16 Jan 2020 13:24:19 +1100 Subject: [PATCH] nir: add glsl_get_internal_ifc_packing() helper MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This will be used by the nir glsl linker for linking uniforms. Reviewed-by: Alejandro Piñeiro Part-of: --- src/compiler/nir_types.cpp | 7 +++++++ src/compiler/nir_types.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index 36720686eb7..432c65a7cdd 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -772,6 +772,13 @@ glsl_type_get_image_count(const struct glsl_type *type) return 0; } +const enum glsl_interface_packing +glsl_get_internal_ifc_packing(const struct glsl_type *type, + bool std430_supported) +{ + return type->get_internal_ifc_packing(std430_supported); +} + unsigned glsl_get_explicit_size(const struct glsl_type *type, bool align_to_stride) { diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 3351ce9bf9f..877edda6389 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -52,6 +52,10 @@ int glsl_get_struct_field_offset(const struct glsl_type *type, const struct glsl_struct_field * glsl_get_struct_field_data(const struct glsl_type *type, unsigned index); +const enum glsl_interface_packing +glsl_get_internal_ifc_packing(const struct glsl_type *type, + bool std430_supported); + unsigned glsl_get_explicit_stride(const struct glsl_type *type); const struct glsl_type *glsl_get_array_element(const struct glsl_type *type); const struct glsl_type *glsl_without_array(const struct glsl_type *type); -- 2.30.2