summaryrefslogtreecommitdiff
path: root/src/glsl/ir_mat_op_to_vec.cpp
AgeCommit message (Collapse)Author
2010-09-13glsl: introduce ir_binop_all_equal and ir_binop_any_equal, allow vector cmpsLuca Barbieri
Currently GLSL IR forbids any vector comparisons, and defines "ir_binop_equal" and "ir_binop_nequal" to compare all elements and give a single bool. This is highly unintuitive and prevents generation of optimal Mesa IR. Hence, first rename "ir_binop_equal" to "ir_binop_all_equal" and "ir_binop_nequal" to "ir_binop_any_nequal". Second, readd "ir_binop_equal" and "ir_binop_nequal" with the same semantics as less, lequal, etc. Third, allow all comparisons to acts on vectors. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-08-27glsl2: Decompose matrix comparison into vector operationsIan Romanick
2010-08-27glsl: Rename a couple of common variable names in mat_op_to_vec.Eric Anholt
It was easy while typing implementations to accidentally overwrite the original expression or assignment variables.
2010-08-27glsl: Make mat_op_to_vec allocate out of the IR's parent.Eric Anholt
This will reduce memory consumption of compiled shaders by not dragging optimized-out children around.
2010-08-13glsl2: Add support for ir_unop_neg to ir_mat_op_to_vecEric Anholt
2010-08-04glsl2: Generate masked assignments in some expanded matrix operationsIan Romanick
2010-07-20glsl2: Add and use new variable mode ir_var_temporaryIan Romanick
This is quite a large patch because breaking it into smaller pieces would result in the tree being intermitently broken. The big changes are: * Add the ir_var_temporary variable mode * Change the ir_variable constructor to take the mode as a parameter and correctly specify the mode for all ir_varables. * Change the linker to not cross validate ir_var_temporary variables. * Change the linker to pull all ir_var_temporary variables from global scope into 'main'.
2010-07-12glsl2: Add matrix multiplication to ir_mat_op_to_vec.Eric Anholt
2010-07-12glsl2: Add a new pass at the IR level to break down matrix ops to vector ops.Eric Anholt
This will be used by the Mesa IR and likely most HW backends, as it allows other optimizations to occur that might not otherwise. Fixes glsl-vs-mat-sub-1, glsl-vs-mat-div-1.