From a005f1a6e7b7f885a6168f6ea94d992d03fafe6d Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 16 Jan 2020 14:44:43 +1100 Subject: [PATCH] nir: add glsl_get_std430_base_alignment() 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 | 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 631e8b41832..3898a9dc5ca 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -791,6 +791,12 @@ glsl_get_std140_size(const struct glsl_type *type, bool row_major) return type->std140_size(row_major); } +unsigned +glsl_get_std430_base_alignment(const struct glsl_type *type, bool row_major) +{ + return type->std430_base_alignment(row_major); +} + 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 67d719adec6..0ceb1125cb4 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -59,6 +59,8 @@ glsl_get_internal_ifc_packing(const struct glsl_type *type, unsigned glsl_get_std140_base_alignment(const struct glsl_type *type, bool row_major); unsigned glsl_get_std140_size(const struct glsl_type *type, bool row_major); +unsigned glsl_get_std430_base_alignment(const struct glsl_type *type, + bool row_major); 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