Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/d3dcompiler_43/d3dcompiler_private.h | 2 +- dlls/d3dcompiler_43/hlsl.y | 8 +++----- dlls/d3dcompiler_43/utils.c | 3 ++- 3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index 1a155736fd0..04878c70463 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -1144,7 +1144,7 @@ struct hlsl_ir_node *implicit_conversion(struct hlsl_ir_node *node, struct hlsl_ struct hlsl_ir_deref *new_var_deref(struct hlsl_ir_var *var) DECLSPEC_HIDDEN; struct hlsl_ir_deref *new_record_deref(struct hlsl_ir_node *record, struct hlsl_struct_field *field) DECLSPEC_HIDDEN; struct hlsl_ir_node *make_assignment(struct hlsl_ir_node *left, enum parse_assign_op assign_op, - DWORD writemask, struct hlsl_ir_node *right) DECLSPEC_HIDDEN; + struct hlsl_ir_node *right) DECLSPEC_HIDDEN; void push_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN; BOOL pop_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN; struct hlsl_ir_function_decl *new_func_decl(struct hlsl_type *return_type, struct list *parameters) DECLSPEC_HIDDEN; diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index 46d815d0144..591f755a7b2 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -542,7 +542,7 @@ static void struct_var_initializer(struct list *list, struct hlsl_ir_var *var, } deref->node.loc = node->loc; list_add_tail(list, &deref->node.entry); - assignment = make_assignment(&deref->node, ASSIGN_OP_ASSIGN, BWRITERSP_WRITEMASK_ALL, node); + assignment = make_assignment(&deref->node, ASSIGN_OP_ASSIGN, node); list_add_tail(list, &assignment->entry); } else @@ -688,8 +688,7 @@ static struct list *declare_vars(struct hlsl_type *basic_type, DWORD modifiers,
deref = new_var_deref(var); list_add_tail(statements_list, &deref->node.entry); - assignment = make_assignment(&deref->node, ASSIGN_OP_ASSIGN, - BWRITERSP_WRITEMASK_ALL, v->initializer.args[0]); + assignment = make_assignment(&deref->node, ASSIGN_OP_ASSIGN, v->initializer.args[0]); d3dcompiler_free(v->initializer.args); list_add_tail(statements_list, &assignment->entry); } @@ -2413,8 +2412,7 @@ assignment_expr: conditional_expr hlsl_report_message(get_location(&@2), HLSL_LEVEL_ERROR, "l-value is const"); YYABORT; } - if (!(instr = make_assignment(node_from_list($1), $2, - BWRITERSP_WRITEMASK_ALL, node_from_list($3)))) + if (!(instr = make_assignment(node_from_list($1), $2, node_from_list($3)))) YYABORT; instr->loc = get_location(&@2); $$ = append_binop($3, $1, instr); diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index fe2d23b623e..1b572aa0aec 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -1423,9 +1423,10 @@ static enum hlsl_ir_expr_op op_from_assignment(enum parse_assign_op op) }
struct hlsl_ir_node *make_assignment(struct hlsl_ir_node *left, enum parse_assign_op assign_op, - DWORD writemask, struct hlsl_ir_node *right) + struct hlsl_ir_node *right) { struct hlsl_ir_assignment *assign = d3dcompiler_alloc(sizeof(*assign)); + DWORD writemask = BWRITERSP_WRITEMASK_ALL; struct hlsl_type *type; struct hlsl_ir_node *lhs, *rhs;