mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/hlsl: Use expr_common_base_type() in intrinsic_cross().
This commit is contained in:
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
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user