[PATCH vkd3d v2 6/7] vkd3d-shader/hlsl: Assert that bool values are not bit-shifted.

Matteo Bruni mbruni at codeweavers.com
Wed Apr 6 14:24:47 CDT 2022


From: Giovanni Mascellani <gmascellani at codeweavers.com>

Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 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;
 
-- 
2.34.1




More information about the wine-devel mailing list