unsigned
glsl_get_length(const struct glsl_type *type)
{
- return type->length;
+ return type->is_matrix() ? type->matrix_columns : type->length;
+}
+
+unsigned
+glsl_get_aoa_size(const struct glsl_type *type)
+{
+ return type->arrays_of_arrays_size();
}
const char *
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)
{
return type->is_scalar();
}
+bool
+glsl_type_is_vector_or_scalar(const struct glsl_type *type)
+{
+ return type->is_vector() || type->is_scalar();
+}
+
bool
glsl_type_is_matrix(const struct glsl_type *type)
{
return glsl_type::void_type;
}
+const glsl_type *
+glsl_float_type(void)
+{
+ return glsl_type::float_type;
+}
+
const glsl_type *
glsl_vec4_type(void)
{
return glsl_type::vec4_type;
}
+const glsl_type *
+glsl_uint_type(void)
+{
+ return glsl_type::uint_type;
+}
+
const glsl_type *
glsl_array_type(const glsl_type *base, unsigned elements)
{