vkd3d-shader/hlsl: Use expr_common_base_type() in intrinsic_cross().

This commit is contained in:
Elizabeth Figura 2024-09-04 22:37:16 -05:00 committed by Henri Verbeet
parent 9260078300
commit 534d546ed9
Notes: Henri Verbeet 2024-09-12 18:57:51 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1064

View File

@ -3554,9 +3554,8 @@ static bool intrinsic_cross(struct hlsl_ctx *ctx,
struct hlsl_type *cast_type;
enum hlsl_base_type base;
if (arg1->data_type->e.numeric.type == HLSL_TYPE_HALF && arg2->data_type->e.numeric.type == HLSL_TYPE_HALF)
base = HLSL_TYPE_HALF;
else
base = expr_common_base_type(arg1->data_type->e.numeric.type, arg2->data_type->e.numeric.type);
if (base != HLSL_TYPE_HALF)
base = HLSL_TYPE_FLOAT;
cast_type = hlsl_get_vector_type(ctx, base, 3);