summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_fs.c
AgeCommit message (Collapse)Author
2010-01-08llvmpipe: optimize case when all four pixels are inside the triangleBrian Paul
When the incoming c0,c1,c2 values are equal to INT_MIN it means that all pixels are inside the triangle. Thus we can skip the detailed pixel inside/outside triangle tests. Use the new lp_build_if()/endif() functions to generate the branching code. The code is disabled ATM however because it's actually a little slower than the original code. A little more tuning may fix that though...
2010-01-08Merge remote branch 'origin/master' into lp-binningJosé Fonseca
Conflicts: src/gallium/auxiliary/util/u_surface.c src/gallium/drivers/llvmpipe/Makefile src/gallium/drivers/llvmpipe/SConscript src/gallium/drivers/llvmpipe/lp_bld_arit.c src/gallium/drivers/llvmpipe/lp_bld_flow.c src/gallium/drivers/llvmpipe/lp_bld_interp.c src/gallium/drivers/llvmpipe/lp_clear.c src/gallium/drivers/llvmpipe/lp_context.c src/gallium/drivers/llvmpipe/lp_context.h src/gallium/drivers/llvmpipe/lp_draw_arrays.c src/gallium/drivers/llvmpipe/lp_jit.c src/gallium/drivers/llvmpipe/lp_jit.h src/gallium/drivers/llvmpipe/lp_prim_vbuf.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_setup_point.c src/gallium/drivers/llvmpipe/lp_state.h src/gallium/drivers/llvmpipe/lp_state_blend.c src/gallium/drivers/llvmpipe/lp_state_derived.c src/gallium/drivers/llvmpipe/lp_state_fs.c src/gallium/drivers/llvmpipe/lp_state_sampler.c src/gallium/drivers/llvmpipe/lp_state_surface.c src/gallium/drivers/llvmpipe/lp_tex_cache.c src/gallium/drivers/llvmpipe/lp_tex_cache.h src/gallium/drivers/llvmpipe/lp_tex_sample.h src/gallium/drivers/llvmpipe/lp_tile_cache.c
2010-01-07llvmpipe: Axe texture sampling code inherited from softpipe.José Fonseca
Was used only as a reference, since texture sampling is now code generated. Already axed in the lp-binning branch too. This fixes the llvmpipe build after recent sampling changes.
2010-01-06llvmpipe: merge setup and draw vbuf submodulesKeith Whitwell
The setup tiling engine is now plugged directly into the draw module as a rendering backend. Removed a couple of layering violations such that the setup code no longer reaches out into the surrounding llvmpipe state or context.
2010-01-06pipe_sampler_state::compare_mode is not a boolean enable flag.Michal Krol
It's a 1-bit enum.
2009-12-31Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: configs/darwin src/gallium/auxiliary/util/u_clear.h src/gallium/state_trackers/xorg/xorg_exa_tgsi.c src/mesa/drivers/dri/i965/brw_draw_upload.c
2009-12-28llvmpipe: Silence compiler warnings.Vinson Lee
2009-12-26llvmpipe: Treat state changes systematically.José Fonseca
That is: - check for no op - update/flush draw module - update bound state and mark it as dirty In particular flushing the draw module is important since it may contain unflushed primitives which would otherwise be draw with wrong state.
2009-12-25gallium: add geometry shader support to galliumZack Rusin
2009-12-24gallium: adapt drivers to pipe_constant_buffer removalRoland Scheidegger
2009-12-17llvmpipe: remove unused code, added comments, etcBrian Paul
2009-12-17llvmpipe: improve the in/out test a littleBrian Paul
Instead of: s = c + step m = s > 0 Do: m = step > c (with negated c)
2009-12-16llvmpipe: do final the pixel in/out triangle test in the fragment shaderBrian Paul
The test to determine which of the pixels in a 2x2 quad is now done in the fragment shader rather than in the calling C code. This is a little faster but there's a few more things to do. Note that the step[] array elements are in a different order now. Rather than being in row-major order for the 4x4 grid, they're in "quad-major" order. The setup of the step arrays is a little more complicated now. So is the course/intermediate tile test code, but some lookup tables help with that. Next steps: - early-cull 2x2 quads which are totally outside the triangle. - skip the in/out test for fully contained quads - make the in/out comparison code tighter/faster.
2009-12-16llvmpipe: add LP_DEBUG env varJosé Fonseca
Cherry-picked from dec35d04aeb398eef159aaf8cde5e0d04622b811.
2009-12-10llvmpipe: Fix after sampler view changes.michal
2009-12-03llvmpipe: fix blend debug stringsBrian Paul
2009-12-02llvmpipe: execute shaders on 4x4 blocks instead of 8x2Brian Paul
This matches the convention used by the recursive rasterizer. Also fixed assorted typos, comments, etc. Now tri-z.c, gears.c, etc look basically right but there's still some cracks in triangle rasterization.
2009-11-24llvmpipe: Use assert instead of abort. Only verify functions on debug builds.José Fonseca
2009-11-24llvmpipe: Use the generic conversion routine for depths.José Fonseca
This allows for z32f depth format to work correctly.
2009-10-25llvmpipe: Human friendlier sampler state dump.José Fonseca
2009-10-25llvmpipe: Dump the sampler state of the shader key.José Fonseca
2009-10-09llvmpipe: Get jit_context/jit_function across the rasterizer.José Fonseca
2009-10-09llvmpipe: add LP_DEBUG env varKeith Whitwell
2009-10-09llvmpipe: Pass state to setup.José Fonseca
2009-10-09llvmpipe: Eliminate constant mapping/unmapping.José Fonseca
2009-10-08llvmpipe: Remove quad headers.José Fonseca
2009-10-09llvmpipe: Eliminate constant mapping/unmapping.José Fonseca
2009-10-01gallium: remove depth.occlusion_count flagKeith Whitwell
This was redundant as drivers can just keep track of whether they are inside a begin/end query pair. We want to add more query types later and also support nested queries, none of which map well onto a flag like this. No driver appeared to be using the flag.
2009-09-29llvmpipe: First verify LLVM IR, only then run optimizing passes.José Fonseca
2009-09-14llvmpipe: Make lp_type a regular union.José Fonseca
Union not worth the hassle of violating C99 or adding a name to the structure.
2009-09-10llvmpipe: Fix alpha test.José Fonseca
2009-09-10llvmpipe: Mask out color channels not present in the color buffer.José Fonseca
2009-09-10llvmpipe: Skip blending when mask is zero.José Fonseca
This increases quake3 timedemo fps another 10%.
2009-09-10llvmpipe: Proper control flow builders.José Fonseca
New control flow helper functions which keep track of all variables and generate the correct Phi functions. This re-enables skipping the fs execution of quads masked out by the rasterizer, early z testing, and kill opcode. This yields a performance improvement of around 20%.
2009-09-09llvmpipe: Include zsbuf's format in the fragment shader key.José Fonseca
2009-09-07llvmpipe: Code generate the texture sampling inside the shader.José Fonseca
Finally a substantial performance improvement: framerates of apps using texturing tripled, and furthermore, enabling/disabling texturing only affects around 15% of the framerate, which means the bottleneck is now somewhere else. Generated texture sampling code is not complete though -- we always sample from the base level -- so final figures will be different.
2009-09-07llvmpipe: Further abstract the texture sampling generation from TGSI ↵José Fonseca
translation.
2009-08-29llvmpipe: Isolate sampling from TGSI translation.José Fonseca
2009-08-29llvmpipe: Fix shader variant key construction.José Fonseca
Fixes the blank screen on non-64bit mode.
2009-08-29llvmpipe: Factor out and optimize the input interpolation.José Fonseca
Special attention is given to the interpolation of side by side quads. Multiplications are made only for the first quad. Interpolation of inputs for posterior quads are done exclusively with additions, and perspective divide if necessary.
2009-08-29llvmpipe: Pre-declare fetch_texel.José Fonseca
2009-08-29llvmpipe: Pass the alpha ref value and blend color in the jit context.José Fonseca
2009-08-29llvmpipe: Pass fragment context to generated function in a single structure.José Fonseca
2009-08-29llvmpipe: Centralize the C <-> JIT interfaces in one place.José Fonseca
2009-08-29llvmpipe: Drop blend derived state.José Fonseca
Already included in the fragment shader.
2009-08-29llvmpipe: Add a bunch of comments.José Fonseca
Description/rationale/to-do items, while I still remember them...
2009-08-29llvmpipe: Split off vs stuff from lp_state_fs.c.José Fonseca
lp_state_fs.c is already too big without it.
2009-08-29llvmpipe: Generate the fragment pipeline into a single function.José Fonseca
Still hackish. Will document and optimize later.
2009-08-29llvmpipe: Early depth testing.José Fonseca
2009-08-29llvmpipe: Code generate the depth test, and include in the shader.José Fonseca
Only 32bit depth/stencil surfaces supported for now. Stencil ops not implemented yet.