15 Mar
2024
15 Mar
'24
1:19 p.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
check_condition_type(ctx, condition);
- if (!(not = hlsl_new_unary_expr(ctx, HLSL_OP1_LOGIC_NOT, condition, &condition->loc))) + bool_type = hlsl_get_numeric_type(ctx, condition->data_type->class, HLSL_TYPE_BOOL, + condition->data_type->dimx, condition->data_type->dimy);
Notice that `check_condition_type()` already checks that this is a scalar-like. Maybe you can just cast to a scalar `bool`. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/724#note_64886