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:
@@ -622,7 +622,9 @@ check_node_type(ir_instruction *ir, void *data)
|
||||
printf("Instruction node with unset type\n");
|
||||
ir->print(); printf("\n");
|
||||
}
|
||||
assert(ir->type != glsl_type::error_type);
|
||||
ir_rvalue *value = ir->as_rvalue();
|
||||
if (value != NULL)
|
||||
assert(value->type != glsl_type::error_type);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user