Commit 426b5b36 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dcompiler: Avoid "naked" vars in record dereferences.

parent 80b73ffc
......@@ -1568,7 +1568,10 @@ struct hlsl_ir_deref *new_record_deref(struct hlsl_ir_node *record, struct hlsl_
deref->node.type = HLSL_IR_DEREF;
deref->node.data_type = field->type;
deref->type = HLSL_IR_DEREF_RECORD;
deref->v.record.record = record;
if (record->type == HLSL_IR_VAR)
deref->v.record.record = &new_var_deref(var_from_node(record))->node;
else
deref->v.record.record = record;
deref->v.record.field = field;
return deref;
}
......
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