mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
nir/types: add a helper to transpose a matrix type
This commit is contained in:
parent
de4c31a085
commit
0e86ab7c0a
2 changed files with 9 additions and 0 deletions
|
|
@ -270,3 +270,10 @@ glsl_function_type(const glsl_type *return_type,
|
|||
{
|
||||
return glsl_type::get_function_instance(return_type, params, num_params);
|
||||
}
|
||||
|
||||
const glsl_type *
|
||||
glsl_transposed_type(const struct glsl_type *type)
|
||||
{
|
||||
return glsl_type::get_instance(type->base_type, type->matrix_columns,
|
||||
type->vector_elements);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,8 @@ const struct glsl_type * glsl_function_type(const struct glsl_type *return_type,
|
|||
const struct glsl_function_param *params,
|
||||
unsigned num_params);
|
||||
|
||||
const struct glsl_type *glsl_transposed_type(const struct glsl_type *type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue