summaryrefslogtreecommitdiff
path: root/builtin_function.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-06-09Implement 1.30 int/uint variants of min/max/clamp.Kenneth Graunke1-0/+389
2010-06-09Implement 1.30 hyperbolic trig builtins (sinh, cosh, tanh).Kenneth Graunke1-0/+114
2010-06-09Implement 1.20 'transpose' builtin.Kenneth Graunke1-0/+143
2010-06-09Implement 1.20 'outerProduct' builtin.Kenneth Graunke1-0/+96
2010-06-09Implement matrixCompMult builtin - the last of the 110 builtins.Kenneth Graunke1-0/+111
2010-06-09Implement dFdx, dFdy, and fwidth via new expression opcodes.Kenneth Graunke1-0/+77
2010-06-09Implement 'refract' builtin.Kenneth Graunke1-0/+106
2010-06-09Fix some typing issues in asin.Kenneth Graunke1-7/+7
CorrectFunction.vert now passes.
2010-06-09Add a completely bogus implementation of the noise[1234] builtins.Kenneth Graunke1-0/+80
idr suggested this. Eventually we will need a real one.
2010-06-09Implement 'acos' builtin.Kenneth Graunke1-0/+23
This is tacked on to the end of the 'asin' file because acos calls asin, whech means asin needs to be defined first. Alphabetical order fail.
2010-06-09Implement 'faceforward' builtin.Kenneth Graunke1-0/+41
2010-06-09Implement 'distance' builtin.Kenneth Graunke1-0/+37
2010-06-09Add remaining signatures for 'clamp' builtin.Kenneth Graunke1-1/+34
2010-06-09Add remaining signatures for 'max' builtin.Kenneth Graunke1-0/+39
2010-06-09Add remaining signatures for 'min' builtin.Kenneth Graunke1-0/+39
2010-06-09Add remaining signatures for 'mod' builtin.Kenneth Graunke1-0/+39
2010-06-09Commit output of texture_builtins.py and refresh builtin_function.cpp.Kenneth Graunke1-7/+1592
2010-06-01builtins: Add support for reflect().Eric Anholt1-0/+62
Fixes glsl-orangebook-ch06.frag parsing.
2010-06-01builtins: Add ftransform().Eric Anholt1-0/+20
Fixes glsl-orangebook-ch06-bump.vert.
2010-06-01builtins: Add the mix(gentype, gentype, float) variant.Eric Anholt1-0/+21
The broken-in-mesa Regnum Online shader now parses, except for its preprocessor usage.
2010-06-01builtins: Add atan().Eric Anholt1-0/+158
2010-06-01builtins: Add asin().Eric Anholt1-0/+93
2010-05-14Refresh autogenerated builtin_function.cpp.Kenneth Graunke1-144/+654
2010-05-14Replace old builtin_function.cpp with new autogenerated one.Kenneth Graunke1-778/+1226
2010-04-23builtin_functions: Clean up compiler warning about unused name, instructions.Eric Anholt1-35/+33
2010-04-23Put static pointers to vec[234]_types along with the static float_type.Eric Anholt1-30/+15
Otherwise you have to type a lot of get_instance.
2010-04-21Actually emit temp declaration in vector comparison builtins.Kenneth Graunke1-0/+1
2010-04-21Refactor IR function representation.Kenneth Graunke1-3/+15
Now, ir_function is emitted as part of the IR instructions, rather than simply existing in the symbol table. Individual ir_function_signatures are not emitted themselves, but only as part of ir_function.
2010-04-08Add an implementation of gentype-only clamp().Eric Anholt1-1/+18
2010-04-08Add builtin implementations of vector comparison functions.Eric Anholt1-6/+153
Fixes CorrectFunction1.vert, glsl-fs-notequal.frag.
2010-04-08Add support for builtin gentype mix(gentype a, gentype b)Eric Anholt1-2/+23
Fixes glsl-fs-mix.frag, glsl-fs-mix-constant.frag.
2010-04-08Add buitlin functions for any(), all(), not().Eric Anholt1-3/+203
2010-04-08Add builtin normalize() functions.Eric Anholt1-0/+20
Fixes CorrectSqizzle2.vert.
2010-04-07Make function bodies rely on the parameter variable declarations.Eric Anholt1-4/+0
Previously, generating inlined function bodies was going to be difficult, as there was no mapping between the body's declaration of variables where parameter values were supposed to live and the parameter variables that a caller would use in paramater setup. Presumably this also have been a problem for actual codegen.
2010-04-07Make dot() take the right number of args.Eric Anholt1-6/+7
2010-04-07Fix the returns of builtin functions to actually return.Eric Anholt1-19/+8
2010-04-07Put function bodies under function signatures, instead of flat in the parent.Eric Anholt1-4/+4
This will let us know the length of function bodies for the purpose of inlining (among other uses).
2010-03-31Use ir_function::add_signature to create link between function and signatureIan Romanick1-1/+1
ir_function_signature now has a pointer back to the ir_function that owns it.
2010-03-29Add support for builtin radians() and degrees().Eric Anholt1-2/+37
2010-03-29Add the instruction for the parameter variable declarations of builtin funcs.Eric Anholt1-1/+3
Matches constructor setup, but I'm not really sure why we make the variable twice.
2010-03-29Implement dot() builtin.Eric Anholt1-1/+41
2010-03-29Implement exp2() and log2(), and make ir_unop_exp and ir_unop_log be base e.Eric Anholt1-2/+18
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-29Implement builtin length() function.Eric Anholt1-6/+51
2010-03-29Add sqrt() builtin as an IR operation.Eric Anholt1-1/+9
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-29Add builtin pow() function.Eric Anholt1-1/+10
2010-03-29Implement some binary gentype builtin functions.Eric Anholt1-18/+74
2010-03-29Implement additional unary gentype builtins.Eric Anholt1-9/+58
2010-03-29Implement the first builtin function: exp().Eric Anholt1-0/+169