nir/glsl: wrapper field_index()

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15731>
This commit is contained in:
Timothy Arceri 2021-11-01 15:16:18 +11:00 committed by Marge Bot
parent 42a97a0aef
commit 6dbe075f92
2 changed files with 8 additions and 0 deletions

View File

@ -992,6 +992,12 @@ glsl_type_get_image_count(const struct glsl_type *type)
return glsl_type_count(type, GLSL_TYPE_IMAGE);
}
int
glsl_get_field_index(const struct glsl_type *type, const char *name)
{
return type->field_index(name);
}
enum glsl_interface_packing
glsl_get_internal_ifc_packing(const struct glsl_type *type,
bool std430_supported)

View File

@ -260,6 +260,8 @@ unsigned glsl_type_get_sampler_count(const struct glsl_type *type);
unsigned glsl_type_get_texture_count(const struct glsl_type *type);
unsigned glsl_type_get_image_count(const struct glsl_type *type);
int glsl_get_field_index(const struct glsl_type *type, const char *name);
bool glsl_type_is_leaf(const struct glsl_type *type);
#ifdef __cplusplus