mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
nir: add C wrapper around glsl_type::record_location_offset
This will allow us to convert nir_lower_sampler.cpp to C. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Gottfried Haider <gottfried.haider@gmail.com> Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
This commit is contained in:
parent
bdb1faf44e
commit
d130cda453
2 changed files with 9 additions and 0 deletions
|
|
@ -112,6 +112,13 @@ glsl_get_struct_elem_name(const struct glsl_type *type, unsigned index)
|
|||
return type->fields.structure[index].name;
|
||||
}
|
||||
|
||||
unsigned
|
||||
glsl_get_record_location_offset(const struct glsl_type *type,
|
||||
unsigned length)
|
||||
{
|
||||
return type->record_location_offset(length);
|
||||
}
|
||||
|
||||
bool
|
||||
glsl_type_is_void(const glsl_type *type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ unsigned glsl_get_length(const struct glsl_type *type);
|
|||
const char *glsl_get_struct_elem_name(const struct glsl_type *type,
|
||||
unsigned index);
|
||||
|
||||
unsigned glsl_get_record_location_offset(const struct glsl_type *type,
|
||||
unsigned length);
|
||||
|
||||
bool glsl_type_is_void(const struct glsl_type *type);
|
||||
bool glsl_type_is_vector(const struct glsl_type *type);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue