Commit 49f64d05 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3dcompiler: Don't pass a writemask to make_assignment().

parent 0e95c3fa
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment