nir/types: Add an is_vector_or_scalar helper
This commit is contained in:
@@ -142,6 +142,12 @@ glsl_type_is_scalar(const struct 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)
|
||||
{
|
||||
|
||||
@@ -72,6 +72,7 @@ const char *glsl_get_struct_elem_name(const struct glsl_type *type,
|
||||
bool glsl_type_is_void(const struct glsl_type *type);
|
||||
bool glsl_type_is_vector(const struct glsl_type *type);
|
||||
bool glsl_type_is_scalar(const struct glsl_type *type);
|
||||
bool glsl_type_is_vector_or_scalar(const struct glsl_type *type);
|
||||
bool glsl_type_is_matrix(const struct glsl_type *type);
|
||||
|
||||
const struct glsl_type *glsl_void_type(void);
|
||||
|
||||
Reference in New Issue
Block a user