mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-19 03:50:26 +01:00
compiler/types: Flip wrapping of cmat related functions
Also add a missing `struct` related to cmat. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
This commit is contained in:
parent
67210f90ad
commit
d78110d356
2 changed files with 15 additions and 14 deletions
|
|
@ -3021,7 +3021,7 @@ union packed_type {
|
|||
unsigned length:13;
|
||||
unsigned explicit_stride:14;
|
||||
} array;
|
||||
glsl_cmat_description cmat_desc;
|
||||
struct glsl_cmat_description cmat_desc;
|
||||
struct {
|
||||
unsigned base_type:5;
|
||||
unsigned interface_packing_or_packed:2;
|
||||
|
|
@ -3472,6 +3472,20 @@ glsl_type_wrap_in_arrays(const struct glsl_type *t,
|
|||
glsl_get_explicit_stride(arrays));
|
||||
}
|
||||
|
||||
const struct glsl_type *
|
||||
glsl_get_cmat_element(const struct glsl_type *t)
|
||||
{
|
||||
assert(t->base_type == GLSL_TYPE_COOPERATIVE_MATRIX);
|
||||
return glsl_type::get_instance(t->cmat_desc.element_type, 1, 1);
|
||||
}
|
||||
|
||||
const struct glsl_cmat_description *
|
||||
glsl_get_cmat_description(const struct glsl_type *t)
|
||||
{
|
||||
assert(t->base_type == GLSL_TYPE_COOPERATIVE_MATRIX);
|
||||
return &t->cmat_desc;
|
||||
}
|
||||
|
||||
unsigned
|
||||
glsl_get_length(const struct glsl_type *t)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -669,16 +669,3 @@ glsl_type_replace_vec3_with_vec4(const struct glsl_type *type)
|
|||
return type->replace_vec3_with_vec4();
|
||||
}
|
||||
|
||||
const struct glsl_type *
|
||||
glsl_get_cmat_element(const struct glsl_type *type)
|
||||
{
|
||||
assert(type->base_type == GLSL_TYPE_COOPERATIVE_MATRIX);
|
||||
return glsl_type::get_instance(type->cmat_desc.element_type, 1, 1);
|
||||
}
|
||||
|
||||
const struct glsl_cmat_description *
|
||||
glsl_get_cmat_description(const struct glsl_type *type)
|
||||
{
|
||||
assert(type->base_type == GLSL_TYPE_COOPERATIVE_MATRIX);
|
||||
return &type->cmat_desc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue