nir/glsl: Add glsl_get_cl_type_size_align helper

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
This commit is contained in:
Jesse Natalie 2020-05-28 10:24:34 -07:00 committed by Marge Bot
parent a27823ef2c
commit 1e7c2d1862
2 changed files with 11 additions and 0 deletions

View File

@ -761,6 +761,14 @@ glsl_get_cl_alignment(const struct glsl_type *type)
return type->cl_alignment();
}
void
glsl_get_cl_type_size_align(const struct glsl_type *type,
unsigned *size, unsigned *align)
{
*size = glsl_get_cl_size(type);
*align = glsl_get_cl_alignment(type);
}
unsigned
glsl_type_get_sampler_count(const struct glsl_type *type)
{

View File

@ -118,6 +118,9 @@ int glsl_get_cl_size(const struct glsl_type *type);
int glsl_get_cl_alignment(const struct glsl_type *type);
void glsl_get_cl_type_size_align(const struct glsl_type *type,
unsigned *size, unsigned *align);
unsigned glsl_get_explicit_size(const struct glsl_type *type, bool align_to_stride);
static inline unsigned