Add a virtual clone() method to ir_instruction.

This will be used by function inlining, the linker, and avoiding double
usage of the LHS deref chains in ++, *=, and similar operations.
This commit is contained in:
Eric Anholt
2010-06-23 11:37:12 -07:00
committed by Ian Romanick
parent 02fc4b34e4
commit 4b6fd39c89
10 changed files with 305 additions and 328 deletions

View File

@@ -290,7 +290,8 @@ cross_validate_uniforms(struct glsl_program *prog)
* have an initializer but a later instance does, copy the
* initializer to the version stored in the symbol table.
*/
existing->constant_value = var->constant_value->clone();
existing->constant_value =
(ir_constant *)var->constant_value->clone(NULL);
}
} else
uniforms.add_variable(var->name, var);