Commit Graph

58 Commits

Author SHA1 Message Date
Eric Anholt
1f47245bdd glsl2: Remove the const disease from function signature's callee. 2010-07-18 18:13:06 -07:00
Eric Anholt
9be7f63813 glsl2: Make cross() be an expression operation.
ARB_fp, ARB_vp, Mesa IR, and the 965 vertex shader all have
instructions for cross.  Shaves 12 Mesa instructions off of a
66-instruction shader I have.
2010-07-18 18:12:12 -07:00
Ian Romanick
df05ad4e1a ir_function_signature: Add method to get the function owning a signature
There is no setter function, the getter returns a constant pointer,
and ir_function_signature::_function is private for a reason.  The
only way to make a connection between a function and function
signature is via ir_function::add_signature.  This helps ensure that
certain invariants (i.e., a function signature is in the list of
signatures for its _function) are met.
2010-07-12 15:19:29 -07:00
Ian Romanick
792e01c1e2 ir_call: Add method to set the function signature being called 2010-07-12 15:19:29 -07:00
Eric Anholt
d925c91730 glsl2: Add ir_unop_fract as an expression type.
Most backends will prefer seeing this to seeing (a - floor(a)), so
represent it explicitly.
2010-07-01 11:07:22 -07:00
Eric Anholt
0eda9ae0a6 glsl2: Make function names and variable names be children of the node.
This avoids losing their memory when the parser state is freed.
2010-06-30 11:52:40 -07:00
Ian Romanick
6315b68f5f ir_swizzle: Add new constructor, refactor constructors
Adds a new constructor that takes an array of component values.  Refactors
the meat of the two constructors to an init_mask method.
2010-06-29 11:15:26 -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