summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_setup_tri.c
AgeCommit message (Collapse)Author
2010-06-01llvmpipe: Use struct lp_shader_input in the interpolator.José Fonseca
Eliminates all this identical yet slightly different code to decide how shader inputs should be interpolated. As bonus, don't interpolate the position twice when it is listed in the TGSI shader inputs.
2010-06-01llvmpipe: Don't waste time interpolating unused input channels.José Fonseca
2010-05-30llvmpipe: Pass the fs variant to the rasterizer.José Fonseca
2010-05-28llvmpipe: add out of memory checking to triangle setup pathBrian Paul
2010-05-17llvmpipe: fix front/back tri culling mix-upBrian Paul
2010-05-14gallium: convert rasterizer state to use gl-style front/back conceptsKeith Whitwell
Use front/back instead of cw/ccw throughout. Also, use offset_point/line/fill instead of offset_cw/ccw. Brings gallium representation of this state into line with its main user, and also what turns out to be the most common hardware representation. This fixes a long-standing bias in the interface towards the architecture of the software rasterizer.
2010-05-05llvmpipe: update driver's provoking vertex codeBrian Paul
Note that the lp_setup_vbuf.c code is very, very similar to the corresponding code in softpipe. It could probably be shared.
2010-04-20llvmpipe: fix incorrect front-facing value for fragment shaderBrian Paul
The TGSI convention is +1 for front-facing, -1 for back-facing Fixes glean glsl1 gl_FrontFacing tests.
2010-04-19llvmpipe: triangle function commentsBrian Paul
2010-04-16llvmpipe: print_triangle() func (disabled)Brian Paul
2010-03-18gallivm/llvmpipe: added lp_rast_shader_inputs::facing and pass throughBrian Paul
The triangle rasterizer sets this field to indicate front/back-facing. It gets passed into the generated fragment code as another parameter. Used now for stencil front/back selection but will also be used for fragment shaders in general (see TGSI_SEMANTIC_FACE). With this commit two-sided stenciling mostly works but there's still a bug or two...
2010-03-13llvmpipe: Obey rasterization rules.José Fonseca
Replicates softpipe.
2010-03-13llvmpipe: setup_context -> lp_setup_contextJosé Fonseca
Otherwise IDEs and debuggers have trouble distinguishing from softpipe's setup_context.
2010-03-03llvmpipe: Store the original triangle coordinates in the debug build.José Fonseca
For debugging purposes only.
2010-02-11llvmpipe: Clamp both extremes of triangles to framebuffer size.José Fonseca
Fix segmentation fault when triangles crossed the axis.
2010-01-21llvmpipe: s/inline/INLINE/Brian Paul
2010-01-21llvmpipe: consolidate lp_scene_alloc_aligned() callsBrian Paul
Use just one call instead of four. Good for a few more fps.
2010-01-21llvmpipe: re-use a1 var in linear_coef()Brian Paul
2010-01-21llvmpipe: area is an int here, not floatBrian Paul
2010-01-21llvmpipe: manually unroll the inputs.step[] setup codeBrian Paul
Good for a few more fps in some tests.
2010-01-21llvmpipe: added simple perf/statistics counting facilityBrian Paul
Currently counting number of tris, how many tiles of each size are fully covered, partially covered or empty, etc. Set LP_DEBUG=counters to enable. Results are printed upon context destruction.
2010-01-19llvmpipe: updated commentsBrian Paul
2010-01-15llvmpipe: implement scissor test in triangle setupBrian Paul
2010-01-15llvmpipe: remove lp_rast_triangle::min/max fieldsBrian Paul
These values aren't needed outside the do_triangle_ccw() function.
2010-01-15llvmpipe: change 'in' to boolean, add commentsBrian Paul
2010-01-14llvmpipe: minor comment updateBrian Paul
2010-01-13llvmpipe: minor assorted clean-upsBrian Paul
2010-01-13llvmpipe: Reset the bin when shading a whole tile with an opaque shader.José Fonseca
2010-01-13llvmpipe: tweak subpixel_snap() arithmeticBrian Paul
This adjustment fixes some rasterization differences between llvmpipe and softpipe (and other renderers).
2010-01-12llvmpipe: clamp maxx,maxy to framebuffer size (in terms of tiles)Brian Paul
In some corner cases the right-most / bottom-most vertex can be right on the edge of the framebuffer. Because the maxx, maxy vals are computed with a series of float/int, pixel/tile transformations we can end up with maxx >= scene->x_tiles or maxy >= scene->y_tiles. This leads to putting data into bins that never get processed, or reset. This becomes stale data that can lead to segfaults. Clamping fixes this.
2010-01-11llvmpipe: remove opencoded constantKeith Whitwell
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
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-13llvmpipe: rename bins to sceneKeith Whitwell
It was pretty confusing having an entity named "bin" and another named "bins", not least because sometimes there was a need to talk about >1 of the "bins" objects, which couldn't be pluralized any further... Scene is a term used in a bunch of places to talk about what a binner operates on, so it's a decent choice here.
2009-12-09llvmpipe: use new lp_setup_get_current_bins() functionBrian Paul
This stub function will interface to the queue system...
2009-12-04llvmpipe: reorganization of binning data structions and funtionsBrian Paul
New lp_bins struct contains all bin information. More move bin-related code into lp_bin.[ch] Use new/updated bin-access functions to hide implementation details. The result is more/cleaner separation between the setup and rast components. This will make double-buffering of the bins easier, etc.
2009-12-04llvmpipe: move bin-related structures and functions into new lp_bin.[ch]Brian Paul
And put lp_ prefixes on some functions.
2009-12-04llvmpipe: remove lp_rast_triangle::oneoverarea fieldBrian Paul
Makes lp_rast_triangle a little smaller (now 280 bytes on a 32-bit system).
2009-12-04llvmpipe: bin state-change commandsBrian Paul
Previously, each triangle had a pointer to the state to use for shading. Now we insert state-change commands into the bins. When we execute one of those commands we just update a 'current state' pointer and use that pointer when calling the jit shader. When inserting state-change commands into a bin we check if the previous command was also a state-change command and simply replace it. This avoids accumulating useless/redundant state-change commands.
2009-12-04llvmpipe: fix typo, whitespaceBrian Paul
2009-12-04llvmpipe: dynamic allocation of triangle a0/dadx/dady arraysBrian Paul
Much less memory per triangle now.
2009-12-03llvmpipe: new comment in do_triangle_ccw()Brian Paul
2009-11-30llvmpipe: add a bunch of commentsBrian Paul
2009-10-21llvmpipe: remove one of two definitions of TILESIZEKeith Whitwell
2009-10-21llvmpipe: remove dead codeKeith Whitwell
2009-10-20llvmpipe: minor opts to setup_triKeith Whitwell
2009-10-20llvmpipe: pass mask as a linear encoding of the 4x4 blockKeith Whitwell
2009-10-20llvmpipe: precalculate some offsetsKeith Whitwell
2009-10-19llvmpipe: pre-multiply some constants by fixed_oneKeith Whitwell
2009-10-19llvmpipe: fixed-point rasterizationKeith Whitwell