mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Handle error expressions in unary expressions.
This commit is contained in:
parent
7e3231c749
commit
43b714d896
Notes:
Henri Verbeet
2024-09-23 15:55:59 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1071
@ -1710,12 +1710,18 @@ static struct hlsl_ir_node *add_unary_arithmetic_expr(struct hlsl_ctx *ctx, stru
|
|||||||
{
|
{
|
||||||
struct hlsl_ir_node *args[HLSL_MAX_OPERANDS] = {arg};
|
struct hlsl_ir_node *args[HLSL_MAX_OPERANDS] = {arg};
|
||||||
|
|
||||||
|
if (arg->data_type->class == HLSL_CLASS_ERROR)
|
||||||
|
return arg;
|
||||||
|
|
||||||
return add_expr(ctx, block, op, args, arg->data_type, loc);
|
return add_expr(ctx, block, op, args, arg->data_type, loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct hlsl_ir_node *add_unary_bitwise_expr(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
static struct hlsl_ir_node *add_unary_bitwise_expr(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
||||||
enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg, const struct vkd3d_shader_location *loc)
|
enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg, const struct vkd3d_shader_location *loc)
|
||||||
{
|
{
|
||||||
|
if (arg->data_type->class == HLSL_CLASS_ERROR)
|
||||||
|
return arg;
|
||||||
|
|
||||||
check_integer_type(ctx, arg);
|
check_integer_type(ctx, arg);
|
||||||
|
|
||||||
return add_unary_arithmetic_expr(ctx, block, op, arg, loc);
|
return add_unary_arithmetic_expr(ctx, block, op, arg, loc);
|
||||||
@ -1727,6 +1733,9 @@ static struct hlsl_ir_node *add_unary_logical_expr(struct hlsl_ctx *ctx, struct
|
|||||||
struct hlsl_ir_node *args[HLSL_MAX_OPERANDS] = {0};
|
struct hlsl_ir_node *args[HLSL_MAX_OPERANDS] = {0};
|
||||||
struct hlsl_type *bool_type;
|
struct hlsl_type *bool_type;
|
||||||
|
|
||||||
|
if (arg->data_type->class == HLSL_CLASS_ERROR)
|
||||||
|
return arg;
|
||||||
|
|
||||||
bool_type = hlsl_get_numeric_type(ctx, arg->data_type->class, HLSL_TYPE_BOOL,
|
bool_type = hlsl_get_numeric_type(ctx, arg->data_type->class, HLSL_TYPE_BOOL,
|
||||||
arg->data_type->dimx, arg->data_type->dimy);
|
arg->data_type->dimx, arg->data_type->dimy);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user