Commit Graph

10 Commits

Author SHA1 Message Date
Eric Anholt d1e31952ed Add support for builtin radians() and degrees(). 2010-03-29 12:48:45 -07:00
Eric Anholt 3cb4358f38 Add the instruction for the parameter variable declarations of builtin funcs.
Matches constructor setup, but I'm not really sure why we make the
variable twice.
2010-03-29 12:48:45 -07:00
Eric Anholt 76a91e1afb Implement dot() builtin. 2010-03-29 12:48:45 -07:00
Eric Anholt 01665262e5 Implement exp2() and log2(), and make ir_unop_exp and ir_unop_log be base e.
Making the base e functions IR operations is not a clear win.  i965
doesn't support it, it doesn't look like r600 supports it, but r500
does. It should be easily supportable as a lowering pass, though.
2010-03-29 12:48:45 -07:00
Eric Anholt 53afc3609d Implement builtin length() function. 2010-03-29 12:48:45 -07:00
Eric Anholt 44d68fd06f Add sqrt() builtin as an IR operation.
Following a discussion in #dri-devel, I think this makes more sense
than implementing it as RSQ RCP CMP as Mesa did.  The i965 has a
hardware sqrt that should work, and AMD is suppposed to be able to
implement it as RSQ RCP with an alternate floating point mode so that
the 0.0 case is handled like we want.
2010-03-29 12:48:45 -07:00
Eric Anholt ddd2e83db2 Add builtin pow() function. 2010-03-29 12:48:45 -07:00
Eric Anholt bfe380a721 Implement some binary gentype builtin functions. 2010-03-29 12:48:45 -07:00
Eric Anholt 2eec73f735 Implement additional unary gentype builtins. 2010-03-29 12:48:45 -07:00
Eric Anholt c22c40015d Implement the first builtin function: exp(). 2010-03-29 12:48:45 -07:00