glsl: Demote 'type' from ir_instruction to ir_rvalue and ir_variable.

Variables have types, expression trees have types, but statements don't.
Rather than have a nonsensical field that stays NULL in the base class,
just move it to where it makes sense.

Fix up a few places that lazily used ir_instruction even though they
actually knew the particular subclass.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Kenneth Graunke
2011-09-20 17:58:45 -07:00
parent 82065fa20e
commit f75c2d5314
6 changed files with 14 additions and 7 deletions

View File

@@ -59,7 +59,7 @@ parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
const ir_variable *const param = (ir_variable *) node_a;
const ir_instruction *const actual = (ir_instruction *) node_b;
const ir_rvalue *const actual = (ir_rvalue *) node_b;
if (param->type == actual->type)
continue;