mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
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:
parent
e9edb2161e
commit
9196f28822
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user