vkd3d-shader/hlsl: Simplify common shape computation.

When t1 is a vector type, it's already supposed to have dimx == max_dim_1
and dimy == 1, and the same for t2.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Giovanni Mascellani 2021-10-25 09:06:27 +02:00 committed by Alexandre Julliard
parent e9edb2161e
commit 9196f28822

View File

@ -985,30 +985,14 @@ static bool expr_common_shape(struct hlsl_ctx *ctx, struct hlsl_type *t1, struct
else if (max_dim_1 <= max_dim_2)
{
*type = t1->type;
if (*type == HLSL_CLASS_VECTOR)
{
*dimx = max_dim_1;
*dimy = 1;
}
else
{
*dimx = t1->dimx;
*dimy = t1->dimy;
}
*dimx = t1->dimx;
*dimy = t1->dimy;
}
else
{
*type = t2->type;
if (*type == HLSL_CLASS_VECTOR)
{
*dimx = max_dim_2;
*dimy = 1;
}
else
{
*dimx = t2->dimx;
*dimy = t2->dimy;
}
*dimx = t2->dimx;
*dimy = t2->dimy;
}
}