mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Fix typing rules for bitwise NOT.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Francisco Casas <fcasas@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
7aeb99261c
commit
a83919c228
@@ -1043,6 +1043,14 @@ static struct hlsl_ir_expr *add_unary_arithmetic_expr(struct hlsl_ctx *ctx, stru
|
|||||||
return add_expr(ctx, instrs, op, args, arg->data_type, loc);
|
return add_expr(ctx, instrs, op, args, arg->data_type, loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct hlsl_ir_expr *add_unary_bitwise_expr(struct hlsl_ctx *ctx, struct list *instrs,
|
||||||
|
enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg, const struct vkd3d_shader_location *loc)
|
||||||
|
{
|
||||||
|
check_integer_type(ctx, arg);
|
||||||
|
|
||||||
|
return add_unary_arithmetic_expr(ctx, instrs, op, arg, loc);
|
||||||
|
}
|
||||||
|
|
||||||
static struct hlsl_ir_expr *add_binary_arithmetic_expr(struct hlsl_ctx *ctx, struct list *instrs,
|
static struct hlsl_ir_expr *add_binary_arithmetic_expr(struct hlsl_ctx *ctx, struct list *instrs,
|
||||||
enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg1, struct hlsl_ir_node *arg2,
|
enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg1, struct hlsl_ir_node *arg2,
|
||||||
const struct vkd3d_shader_location *loc)
|
const struct vkd3d_shader_location *loc)
|
||||||
@@ -3595,7 +3603,7 @@ unary_expr:
|
|||||||
}
|
}
|
||||||
| '~' unary_expr
|
| '~' unary_expr
|
||||||
{
|
{
|
||||||
add_unary_arithmetic_expr(ctx, $2, HLSL_OP1_BIT_NOT, node_from_list($2), &@1);
|
add_unary_bitwise_expr(ctx, $2, HLSL_OP1_BIT_NOT, node_from_list($2), &@1);
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
}
|
}
|
||||||
| '!' unary_expr
|
| '!' unary_expr
|
||||||
|
Reference in New Issue
Block a user