d3dcompiler: Avoid "naked" vars in record dereferences.

This commit is contained in:
Matteo Bruni 2012-10-11 19:48:45 +02:00 committed by Alexandre Julliard
parent 80b73ffcef
commit 426b5b3609
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}