Giovanni Mascellani : vkd3d-shader/hlsl: Assert that bool values are not bit-shifted.

Alexandre Julliard julliard at winehq.org
Thu Apr 7 16:08:46 CDT 2022


Module: vkd3d
Branch: master
Commit: 95df144c69cb94ff0982b519afd653fd0140843d
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=95df144c69cb94ff0982b519afd653fd0140843d

Author: Giovanni Mascellani <gmascellani at codeweavers.com>
Date:   Wed Apr  6 21:24:47 2022 +0200

vkd3d-shader/hlsl: Assert that bool values are not bit-shifted.

Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d-shader/hlsl_sm4.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c
index f5e48173..1eefe450 100644
--- a/libs/vkd3d-shader/hlsl_sm4.c
+++ b/libs/vkd3d-shader/hlsl_sm4.c
@@ -1765,6 +1765,7 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
 
         case HLSL_OP2_LSHIFT:
             assert(type_is_integer(dst_type));
+            assert(dst_type->base_type != HLSL_TYPE_BOOL);
             write_sm4_binary_op(buffer, VKD3D_SM4_OP_ISHL, &expr->node, arg1, arg2);
             break;
 




More information about the wine-cvs mailing list