mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 13:10:10 +01:00
nir/types: Add accessors for function parameter/return types
This commit is contained in:
parent
707b706d18
commit
8ee23dab04
2 changed files with 18 additions and 0 deletions
|
|
@ -70,6 +70,18 @@ glsl_get_struct_field(const glsl_type *type, unsigned index)
|
|||
return type->fields.structure[index].type;
|
||||
}
|
||||
|
||||
const glsl_type *
|
||||
glsl_get_function_return_type(const glsl_type *type)
|
||||
{
|
||||
return type->fields.parameters[0].type;
|
||||
}
|
||||
|
||||
const glsl_function_param *
|
||||
glsl_get_function_param(const glsl_type *type, unsigned index)
|
||||
{
|
||||
return &type->fields.parameters[index + 1];
|
||||
}
|
||||
|
||||
const struct glsl_type *
|
||||
glsl_get_column_type(const struct glsl_type *type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,6 +49,12 @@ const struct glsl_type *glsl_get_array_element(const struct glsl_type *type);
|
|||
|
||||
const struct glsl_type *glsl_get_column_type(const struct glsl_type *type);
|
||||
|
||||
const struct glsl_type *
|
||||
glsl_get_function_return_type(const struct glsl_type *type);
|
||||
|
||||
const struct glsl_function_param *
|
||||
glsl_get_function_param(const struct glsl_type *type, unsigned index);
|
||||
|
||||
enum glsl_base_type glsl_get_base_type(const struct glsl_type *type);
|
||||
|
||||
unsigned glsl_get_vector_elements(const struct glsl_type *type);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue