summaryrefslogtreecommitdiff
path: root/src/glsl/ir_tree_grafting.cpp
AgeCommit message (Collapse)Author
2010-08-23glsl2: Add missing sig_iter.next() to the no-constant-folding-to-outvals fix.Eric Anholt
2010-08-22glsl: Don't tree-graft in an expression in place of a function outval.Eric Anholt
Fixes: glsl-constant-folding-call-1 (bug #29737)
2010-08-14glsl: Standardize a few more uses of struct vs class keyword.José Fonseca
2010-08-05glsl2: Fix the dereferences_variable check in ir_tree_grafting.Eric Anholt
The HV doesn't descend into ir_variable, which is generally a good thing (allowing one to distinguish between variable declarations and refs), but here we never saw tree grafting opportunities killed because we were looking for the ir_variable child of a dereference to get visited. Fixes: glsl1-function call with inout params
2010-08-05glsl2: Don't tree-grafting out assignment to an out variable.Eric Anholt
Fixes: glsl-deadcode-varying.
2010-08-04glsl2: Add ir_assignment::write_mask and associated methodsIan Romanick
Replace swizzles on the LHS with additional swizzles on the RHS and a write mask in the assignment instruction. As part of this add ir_assignment::set_lhs. Ideally we'd make ir_assignment::lhs private to prevent erroneous writes, but that would require a lot of code butchery at this point. Add ir_assignment constructor that takes an explicit write mask. This is required for ir_assignment::clone, but it can also be used in other places. Without this, ir_assignment clones lose their write masks, and incorrect IR is generated in optimization passes. Add ir_assignment::whole_variable_written method. This method gets the variable on the LHS if the whole variable is written or NULL otherwise. This is different from ir->lhs->whole_variable_referenced() because the latter has no knowledge of the write mask stored in the ir_assignment. Gut all code from ir_to_mesa that handled swizzles on the LHS of assignments. There is probably some other refactoring that could be done here, but that can be left for another day.
2010-07-31glsl2: Add new tree grafting optimization pass.Eric Anholt