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:
@@ -83,7 +83,7 @@ prototype_string(const glsl_type *return_type, const char *name,
|
||||
|
||||
const char *comma = "";
|
||||
foreach_list(node, parameters) {
|
||||
const ir_instruction *const param = (ir_instruction *) node;
|
||||
const ir_variable *const param = (ir_variable *) node;
|
||||
|
||||
ralloc_asprintf_append(&str, "%s%s", comma, param->type->name);
|
||||
comma = ", ";
|
||||
|
||||
Reference in New Issue
Block a user