15 Oct
2021
15 Oct
'21
8:36 a.m.
For example, the common shape between a matrix 1x4 and a matrix 2x4 is a vector of length 4, not a matrix 1x4. Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> --- libs/vkd3d-shader/hlsl.y | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index d2cc1878..bfe2bbb9 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -996,6 +996,9 @@ static bool expr_common_shape(struct hlsl_ctx *ctx, struct hlsl_type *t1, struct } } + if (*type == HLSL_CLASS_MATRIX && *dimy == 1) + *type = HLSL_CLASS_VECTOR; + return true; } -- 2.33.0