Module: vkd3d Branch: master Commit: 176b12f9e4d8c209d10701a19085c1169bca0e60 URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=176b12f9e4d8c209d10701a1... Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Fri Aug 27 12:05:12 2021 +0200 vkd3d-shader/hlsl: Return int as common type between bool and bool. So does the native d3dcompiler, following the spirit of integer promotion in C. Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/hlsl.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 4c3c067..69c42b6 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -917,7 +917,7 @@ static enum hlsl_base_type expr_common_base_type(enum hlsl_base_type t1, enum hl int t1_idx = -1, t2_idx = -1, i; if (t1 == t2) - return t1; + return t1 == HLSL_TYPE_BOOL ? HLSL_TYPE_INT : t1; for (i = 0; i < ARRAY_SIZE(types); ++i) {