Commit graph

8 commits

Author SHA1 Message Date
Eric Anholt
9fd2a8d692 glsl2: Move ir_expression_flattening to using the rvalue visitor class.
The previous implementation was missing handling of some rvalues, such
as "if" conditions, leading to glsl-mat-int-from-ctor-* not getting
caught.
2010-08-26 00:15:18 -07:00
Kenneth Graunke
c7a18da690 glsl2: Replace insert_before/remove pairs with exec_node::replace_with. 2010-07-21 16:37:57 -07:00
Ian Romanick
7e2aa91507 glsl2: Add and use new variable mode ir_var_temporary
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-20 17:48:24 -07:00
Eric Anholt
562c3d0cb1 glsl2: Flatten expression that appear as the parameters of ir_call as well. 2010-07-12 19:50:49 -07:00
Eric Anholt
94da2abfd4 glsl2: Flatten expressions that appear as the children of ir_return as well. 2010-07-12 19:50:49 -07:00
Eric Anholt
d74c9ff046 glsl2: Use a better talloc context for ir_expression_flattening.
The instruction can be hung off of any other in the tree, even if the
other one will be deleted, since it'll get stolen to the shader's
context later if it's still live.
2010-07-12 16:07:02 -07:00
Eric Anholt
5723e5bb8b glsl2: Flatten out expressions that are the child of an assignment rhs.
This feels a little odd, but it will be useful for ir_mat_to_vec,
where I want to see a plain assignment of the expression to a
variable, not to a writemasked array dereference with a call as the
array index.
2010-07-12 12:02:32 -07:00
Eric Anholt
2928588267 glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
Renamed from ir_expression_flattening.cpp (Browse further)