summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm
AgeCommit message (Collapse)Author
2010-05-08gallivm: Fix mipfiltering with negative lod bias.José Fonseca
In particular, don't use the clamped lod to compute level + 1, or lod in [-1, 0] range will actually interpolate with level 1. This makes Mipfilter DCT pass 100%.
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: Import the code to compute the minimax polynomials.José Fonseca
It's quite a pain to remember the details after a while, and it is quite likely we'll want to use this again, either for different polynomial orders or different functions, so commit it here.
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: Don't hardcode number of args twice.José Fonseca
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-08gallivm: Fix BREAK/CONT translation.José Fonseca
The cont_mask must be restored and exec mask recomputed in order to decide whether to repeat the loop or not. Unlike the continue mask, the break_mask must be preserved across loop iterations. Fixes several VShader DCT cases, and no regressions with glean.
2010-05-08gallivm: Fix segfaul when inserting allocas in an empty function.José Fonseca
2010-05-08gallivm: Centralize SoA swizzling into a single place.José Fonseca
2010-05-08gallivm: Support predicates.José Fonseca
2010-05-04gallivm: Proper implementation of TXL opcode.José Fonseca
2010-05-04gallivm: Fix several glitches introduced in the prev commit.José Fonseca
2010-05-04gallivm: Implement TXD.José Fonseca
2010-05-04gallivm: Increase the TGSI translation limits and centralize them in a header.José Fonseca
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-05-03gallivm: Display message instead of crashing when sampler generator was not ↵José Fonseca
supplied for tgsi translation.
2010-05-03gallivm: Replace predicate assertion failure with warning message.José Fonseca
2010-05-02gallivm: fix nested break and continue statementsZack Rusin
we were resetting the mask on each new break/continue statement within the same scope. we always need to and the current execution mask with the current break/continue mask to get the correct result (the masks are always ~1 initially)
2010-04-30llvmpipe: fix out-of-bounds texture samplingBrian Paul
If we're using a wrap mode in which border color sampling is possible it means that texcoords may be outside of the texture image bounds. Fetching the texel may result in a segfault. Use the 'use_border' variable to catch such texcoords and replace the texel offset with zero (which will be in bounds). Fixes segfault in Lightsmark demo, fd.o bug 27877.
2010-04-30llvmpipe: added lp_build_sample_nop() for debuggingBrian Paul
2010-04-29gallivm: add some assertions in special-case sampler codeBrian Paul
2010-04-27gallivm: Drop BGNFOR, ENDFOR, REP, and ENDREP opcodes.José Fonseca
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-27gallivm: Ensure all allocas are in the first block.José Fonseca
Refactor the code to make this easier.
2010-04-26gallivm: BGNFOR/ENDFOR fallthrough to BGNLOOP/ENDLOOPAlan Hourihane
2010-04-26llvmpipe: Respect pipe_sampler_view::swizzle_r/g/b/aJosé Fonseca
This allows u_sampler_view_default_dx9_template to do its magic on DX9.
2010-04-25gallivm: Rename variable info to opcode_info.Vinson Lee
Avoid hiding existing variable already named info in outer scope.
2010-04-24gallivm: Remove NULL check of pointer that can't be NULL.Vinson Lee
info cannot be NULL at the call to debug_printf. emit_instruction dereferences info, so at debug_printf it is either not NULL or the program has already crashed.
2010-04-24llvmpipe: Implement shader bias.José Fonseca
Fixes glean glsl1 test: texture2D(), with bias.
2010-04-24gallivm: Centralize the cpu caps detection.José Fonseca
2010-04-24gallivm: LLVMConstBitCast -> LLVMBuildBitCastJosé Fonseca
As the argument in general might not be a constant.
2010-04-22gallivm: implement indirect addressing over temporariesZack Rusin
a bit more involved than indirect addressing over consts, but still fairly reasonable. we allocate an array instead of individual alloca's, and we do it only if the shader does indirect addressing.
2010-04-22gallivm: implement indirect addressing over constantsZack Rusin
implement indirect addressing (ARL and ARR instructions) when used with CONST's. indirect addressing over other vars (temps, inputs, outputs) is not supported yet.
2010-04-22gallivm: remove Z/stencil special case code in lp_build_sample_offset()Brian Paul
Fixes progs/tests/zreaddraw.c and progs/demos/shadowtex.c
2010-04-22gallivm: update commentsZack Rusin
2010-04-22gallivm: fix nested cont statementsZack Rusin
2010-04-22gallivm: fix nested break statemantsZack Rusin
2010-04-22gallivm: make sure we return the correct type when approximating log'sZack Rusin
2010-04-22gallivm: Remove unused variable.Vinson Lee
2010-04-21gallivm: added some assertions in loop-gen codeBrian Paul
We're hitting these assertions with nested loops...
2010-04-21gallivm: fix copy&paste error: s/cont_stack_size/break_stack_size/Brian Paul
2010-04-21gallivm: emit_instruction() is booleanBrian Paul
2010-04-21gallivm: implement TGSI KILPBrian Paul
As in tgsi_exec.c we don't actually rely on condition codes; we do an unconditional kill. The only predication comes from the execution mask which applies inside loops/conditionals.
2010-04-20gallivm: Remove unnecessary headers.Vinson Lee
2010-04-20gallivm: Universal format support on lp_build_fetch_rgba_aos via ↵José Fonseca
util_format_description::fetch_rgba_float This therefore adds support to half float vertex buffers.
2010-04-20gallivm: Cleanups and bugfixes to aos format translation.José Fonseca
2010-04-20gallivm: New function to fetch a pixel into a 4xfloat AoS vector.José Fonseca
2010-04-20gallivm: Bring aos format back to life.José Fonseca
Useful for fetching vertices for formats that are straight arrays. This reverts commit aa364d091e7e2ef2296fb25f92efc79a8c88f77d.
2010-04-19gallivm: pass 3D texture stride as an arrayBrian Paul
This should have been included with the previous commit.
2010-04-19gallivm: Remove redundant initialization of dst_vec_type.Vinson Lee
dec_vec_type is already initialized to lp_build_vec_type(dst_type) at its declaration.