Eric Anholt
6173312d84
Make dot() take the right number of args.
2010-04-07 17:23:23 -07:00
Eric Anholt
7e78e07ddb
Fix the returns of builtin functions to actually return.
2010-04-07 17:23:23 -07:00
Eric Anholt
894ea972a4
Put function bodies under function signatures, instead of flat in the parent.
...
This will let us know the length of function bodies for the purpose of
inlining (among other uses).
2010-04-07 17:23:23 -07:00
Ian Romanick
6a15d5b514
Use ir_function::add_signature to create link between function and signature
...
ir_function_signature now has a pointer back to the ir_function that owns it.
2010-03-31 16:37:10 -07:00
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