mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
nir/types: Add some asserts to glsl_get_struct_field()
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19430>
This commit is contained in:
parent
4bf116d440
commit
15796bdd0e
1 changed files with 2 additions and 0 deletions
|
|
@ -75,6 +75,8 @@ glsl_get_bare_type(const glsl_type *type)
|
|||
const glsl_type *
|
||||
glsl_get_struct_field(const glsl_type *type, unsigned index)
|
||||
{
|
||||
assert(type->is_struct() || type->is_interface());
|
||||
assert(index < type->length);
|
||||
return type->fields.structure[index].type;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue