summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_arit.c
AgeCommit message (Collapse)Author
2010-12-02gallivm/llvmpipe: remove lp_build_context::builderBrian Paul
The field was redundant. Use the gallivm->builder value instead.
2010-11-30gallivm/llvmpipe: squash merge of the llvm-context branchBrian Paul
This branch defines a gallivm_state structure which contains the LLVMBuilderRef, LLVMContextRef, etc. All data structures built with this object can be periodically freed during a "garbage collection" operation. The gallivm_state object has to be passed to most of the builder functions where LLVMBuilderRef used to be used. Conflicts: src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c src/gallium/drivers/llvmpipe/lp_state_setup.c
2010-10-18gallivm: Add a note about SSE4.1's nearest mode rounding.José Fonseca
2010-10-12gallivm: remove newlinesBrian Paul
2010-10-09gallivm: Less code duplication in log computation.José Fonseca
2010-10-09gallivm: faster iround implementation for sse2Roland Scheidegger
sse2 supports round to nearest directly (or rather, assuming default nearest rounding mode in MXCSR). Use intrinsic to use this rather than round (sse41) or bit manipulation whenever possible.
2010-10-09gallivm: fix trunc/itrunc commentRoland Scheidegger
trunc of -1.5 is -1.0 not 1.0...
2010-10-06gallivm: Combined ifloor & fract helper.José Fonseca
The only way to ensure we don't do redundant FP <-> SI conversions.
2010-10-06gallivm: Fast implementation of iround(log2(x))José Fonseca
Not tested yet, but should be correct.
2010-10-06gallivm: Use a faster (and less accurate) log2 in lod computation.José Fonseca
2010-10-06gallivm: Take the type signedness in consideration in round/ceil/floor.José Fonseca
2010-09-29gallivm: Use SSE4.1's ROUNDSS/ROUNDSD for scalar rounding.José Fonseca
2010-09-22gallivm: Add unorm support to lp_build_lerp()José Fonseca
Unfortunately this can cause segfault with LLVM 2.6, if x is a constant.
2010-09-11gallivm: Add a new debug flag to warn about performance issues.José Fonseca
2010-08-30gallivm: Fix lp_build_sum_vector.José Fonseca
The result is scalar, so when argument is zero/undef we can pass vector zero/undef. Also, support the scalar case.
2010-08-29util: remove util_is_pot in favor of util_is_power_of_twoMarek Olšák
The function was duplicated.
2010-08-21gallivm: Emit DIVPS instead of RCPPS.José Fonseca
See comments for detailed rationale. Thanks to Michal Krol and Zack Rusin for detecting and investigating this in detail.
2010-08-14gallivm: Refactor the Newton-Rapshon steps, and disable once again.José Fonseca
It causes a very ugly corruption on the Earth's halo on Google Earth.
2010-08-11gallivm: Fix and enable the extra Newton/Raphson step in lp_build_rcp().José Fonseca
Thanks to Michal for spotting this.
2010-08-10gallivm: Fix bitwise operations for floats, division for integersnobled
http://bugs.freedesktop.org/29407 Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-10gallivm: Even more type checkingnobled
http://bugs.freedesktop.org/29407 Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-09gallivm: More type checks.José Fonseca
2010-08-09gallivm: Don't call LLVMBuildFNeg on llvm-2.6.José Fonseca
It didn't exist yet.
2010-08-09gallivm: Always use floating-point operators for floating-point typesnobled
This fixes the assert added in LLVM 2.8: assert(getType()->isIntOrIntVectorTy() && "Tried to create an integer operation on a non-integer type!") But it also fixes some subtle bugs, since we should've been doing this since LLVM 2.6 anyway. Includes a modified patch from steckdenis@yahoo.fr for the FNeg instructions in emit_fetch(); thanks for pointing those out. http://bugs.freedesktop.org/29404 http://bugs.freedesktop.org/29407 Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-08gallivm: Add type checks for the basic operations.José Fonseca
2010-07-06gallivm: Remove unnecessary header.Vinson Lee
2010-07-06gallivm: finish implementation of lp_build_iceil()Brian Paul
Plus fix minor error in lp_build_iceil() by tweaking the offset value. And add a bunch of comments for the round(), trunc(), floor(), ceil() functions.
2010-05-26gallivm: Remove unnecessary headers.Vinson Lee
2010-05-24gallivm: Efficient implementation of sin/cos.Qicheng Christopher Li
Based on Julien Pommier's SSE and SSE2 algorithms. Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-05-10gallivm: Silent warning.José Fonseca
2010-05-10gallivm: cosf/sinf are macros on MSVC.José Fonseca
So taking the function address does not work.
2010-05-08gallivm: Actually do floor/ceil/trunc for scalars.José Fonseca
Also start axing the code duplication for scalar case. The olution is to treat the scalar case specially in a few innermost functions, and leave outer functions untouched.
2010-05-08gallivm: Use a minimax polynomial for exp2 in range [0,1] instead [-0.5,5].José Fonseca
The advantage of range[-0.5, 0.5] is that it doesn't require floor (for which intrinsics are only available in SSE4.1). But the EXP opcode pretty much forces us to use floor, and there is a good floor approximation around truncation available anyway. This fixes EXP failures in VShader DCT.
2010-05-08gallivm: The the JIT engine to use our sinf()/cosf() on Windows.José Fonseca
A quick hack to get the right results, as there are many DCT tests which use these opcodes to generate data to test other opcodes.
2010-05-04gallicm: Newton-Raphson step to improve precision.José Fonseca
Disabled as it doesn't make VS/PSPrecision DCT happy, and it would unnecessarily slow some cases where it is not needed.
2010-04-27gallivm: Disable llvm.cos.v4f32 and llvm.sin.v4f32 instrinsics on Windows.José Fonseca
Runtime linking doesn't quite work. Just comment then out for now to prevent crashes. These will go away in the future because calling 4 times CRT's cosf()/sinf() is over-precise and under-performing.
2010-04-24gallivm: LLVMConstBitCast -> LLVMBuildBitCastJosé Fonseca
As the argument in general might not be a constant.
2010-04-22gallivm: make sure we return the correct type when approximating log'sZack Rusin
2010-03-15gallivm/llvmpipe: rename some constant building functionsBrian Paul
2010-03-15gallivm: fix typo/bug in lp_build_sgn()Brian Paul
We were never returning -1 as a result. This fixes some inverted/flipped faces with cube mapping.
2010-03-15gallivm: fix incorrect floor(), itrunc()Brian Paul
LLVMBuildFPTrunc() should be used for double->float conversion, not float->int conversion. There should be a better way to compute floor(), ceil(), etc that doesn't involve float->int->float conversion.
2010-03-12gallivm: support non-vector float in lp_build_sgn()Brian Paul
2010-03-11gallivm: added lp_build_sum_vector()Brian Paul
2010-03-10gallivm: handle scalar floats in lp_build_floor() and lp_build_iround()Brian Paul
2010-03-09gallivm: checkpoint: nearest mipmap filteringBrian Paul
The LOD is computed from texcoord partial derivatives and used to select a mipmap level. Still some bugs in texel fetching. Lots of rough edges and unfinished parts but the basics are in place. Lots of changes to the lp_bld_arit.c code to support non-vector/scalar datatypes.
2010-03-04gallivm: added lp_build_fract()Brian Paul
2010-03-04gallivm: added lp_build_set_sign()Brian Paul
2010-03-04gallivm: added lp_build_negate()Brian Paul
2010-02-23gallivm: added clamp and int_to_float functionsBrian Paul
2010-02-08llvmpipe: export the tgsi translation code to a common layerZack Rusin
the llvmpipe tgsi translation is a lot more complete than what was in gallivm so replacing the latter with the former. this is needed since the draw llvm paths will use the same code. effectively the proven llvmpipe code becomes gallivm.