nir: add glsl_get_std430_size() helper

This will be used by the nir glsl linker for linking uniforms.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4050>
This commit is contained in:
Timothy Arceri 2020-01-16 14:46:04 +11:00 committed by Marge Bot
parent a005f1a6e7
commit 858a49a10d
2 changed files with 7 additions and 0 deletions

View file

@ -797,6 +797,12 @@ glsl_get_std430_base_alignment(const struct glsl_type *type, bool row_major)
return type->std430_base_alignment(row_major);
}
unsigned
glsl_get_std430_size(const struct glsl_type *type, bool row_major)
{
return type->std430_size(row_major);
}
unsigned
glsl_get_explicit_size(const struct glsl_type *type, bool align_to_stride)
{

View file

@ -61,6 +61,7 @@ unsigned glsl_get_std140_base_alignment(const struct glsl_type *type,
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_std430_size(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);