mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 18:30:09 +01:00
glsl_type: Add a C wrapper to get struct field offsets
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
parent
d34f19feba
commit
d8a11bfc08
2 changed files with 10 additions and 0 deletions
|
|
@ -65,6 +65,13 @@ glsl_get_struct_field(const glsl_type *type, unsigned index)
|
|||
return type->fields.structure[index].type;
|
||||
}
|
||||
|
||||
const int
|
||||
glsl_get_struct_field_offset(const struct glsl_type *type,
|
||||
unsigned index)
|
||||
{
|
||||
return type->fields.structure[index].offset;
|
||||
}
|
||||
|
||||
const glsl_type *
|
||||
glsl_get_function_return_type(const glsl_type *type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ const char *glsl_get_type_name(const struct glsl_type *type);
|
|||
const struct glsl_type *glsl_get_struct_field(const struct glsl_type *type,
|
||||
unsigned index);
|
||||
|
||||
const int glsl_get_struct_field_offset(const struct glsl_type *type,
|
||||
unsigned index);
|
||||
|
||||
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);
|
||||
const struct glsl_type *glsl_without_array_or_matrix(const struct glsl_type *type);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue