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:
Emil Velikov 2015-09-17 15:57:26 +01:00
parent bdb1faf44e
commit d130cda453
2 changed files with 9 additions and 0 deletions

View file

@ -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)
{

View file

@ -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);