Commit Graph

2428 Commits

Author SHA1 Message Date
Brian Paul b1659b9213 llvmpipe: bin state-change commands
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-04 11:50:43 -07:00
Brian Paul 9dca010048 llvmpipe: struct cmd_bin
Just introducing a new structure to represent a per-tile bin.
2009-12-04 10:41:42 -07:00
Brian Paul 1796ffd3bc llvmpipe: fix typo, whitespace 2009-12-04 09:19:09 -07:00
Brian Paul 04e12e31b2 llvmpipe: dynamic allocation of triangle a0/dadx/dady arrays
Much less memory per triangle now.
2009-12-04 09:14:42 -07:00
Brian Paul c6057ab8ff llvmpipe: comments regarding lp_rast_triangle 2009-12-03 17:28:48 -07:00
Brian Paul 9c1debe208 llvmpipe: comment about blend color 2009-12-03 17:28:02 -07:00
Brian Paul f492edee98 llvmpipe: comments 2009-12-03 17:27:37 -07:00
Brian Paul 30c122a4c9 llvmpipe: new comment in do_triangle_ccw() 2009-12-03 17:27:10 -07:00
Brian Paul 4e058f6c48 llvmpipe: fix incorrect array indexing when saving blend color 2009-12-03 17:00:22 -07:00
Brian Paul a9be9cd8be llvmpipe: comments, clean-ups in lp_rast_priv.h 2009-12-03 16:23:52 -07:00
Brian Paul e2f4634456 llvmpipe: checkpoint some initial state binning code 2009-12-03 16:05:12 -07:00
Brian Paul ffd0759973 llvmpipe: comments and a stub for lp_rast_set_state() 2009-12-03 14:57:44 -07:00
Brian Paul 29207a2ae6 llvmpipe: comments 2009-12-03 14:57:13 -07:00
Brian Paul 0e042bed49 llvmpipe: set LP_SETUP_NEW_FS in lp_setup_set_fs()
Fixes progs/trivial/tri-blend.c, but I think we're just getting
lucky in this case.
2009-12-03 14:56:38 -07:00
Brian Paul 3094fc2009 llvmpipe: more debug info 2009-12-03 14:25:08 -07:00
Brian Paul 51410a254c llvmpipe: fix blend debug strings 2009-12-03 14:13:22 -07:00
Brian Paul 51663f0506 llvmpipe: quick & dirty implementation of lp_rast_store_zstencil()
This allows us to do a glReadPixels(GL_DEPTH_COMPONENT) to see what's
in the depth buffer to help debugging.
2009-12-03 11:41:48 -07:00
Brian Paul 69fe4281ea llvmpipe: additional comment about float->uint conversion 2009-12-03 11:40:49 -07:00
Brian Paul e01fa1eaec llvmpipe: comments 2009-12-03 11:39:40 -07:00
Brian Paul 866e6856d3 llvmpipe: execute shaders on 4x4 blocks instead of 8x2
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-12-02 15:13:47 -07:00
Brian Paul 5750a6426b llvmpipe: whitespace for readability 2009-12-02 14:55:48 -07:00
Brian Paul 63fe997e28 llvmpipe: added assertions
And remove unused BLOCKSIZE.
2009-12-01 16:25:00 -07:00
Brian Paul 9c48677491 llvmpipe: simplify mask computation
Make this a little easier to understand.
2009-12-01 16:24:19 -07:00
Brian Paul 6bde3e0fdf llvmpipe: replace shifts with multiplies to be clearer
The compiler will still do the multiplies with shifts.
It's just a bit easier to follow the logic with multiplies.
2009-12-01 16:00:30 -07:00
Brian Paul 938acf0367 llvmpipe: make nr_blocks unsigned 2009-12-01 16:00:08 -07:00
Brian Paul 63b1f23b3e llvmpipe: comments, reformatting and assertions in tri rast code 2009-12-01 15:43:01 -07:00
Brian Paul 7505510c7b llvmpipe: add a bunch of comments 2009-11-30 14:02:01 -07:00
Brian Paul 7d042ac2a2 llvmpipe: minor refactoring of bin rasterization code 2009-11-30 14:01:31 -07:00
Brian Paul bfa1a766d6 llvmpipe: update C_SOURCES 2009-11-30 10:43:23 -07:00
Keith Whitwell 280c8acc43 llvmpipe: fix the worst of the depth regressions since switch to 4x4 2009-10-22 17:21:37 +01:00
Keith Whitwell 694f05ac18 llvmpipe: remove one of two definitions of TILESIZE 2009-10-21 15:21:11 +01:00
Keith Whitwell 341edde1d2 llvmpipe: remove dead code 2009-10-21 14:35:54 +01:00
Keith Whitwell cccb184209 llvmpipe: minor opts to setup_tri 2009-10-20 10:11:52 +01:00
Keith Whitwell 3199c6e764 llvmpipe: move block list into rast struct 2009-10-20 09:44:23 +01:00
Keith Whitwell 8d752a20c6 llvmpipe: build list of 4x4 blocks to be shaded 2009-10-20 08:56:58 +01:00
Keith Whitwell 1735325a23 llvmpipe: recursive rasterization within a tile 2009-10-20 03:38:07 +01:00
Keith Whitwell 7b116e13a2 llvmpipe: pass mask as a linear encoding of the 4x4 block 2009-10-20 03:17:17 +01:00
Keith Whitwell 7670628061 llvmpipe: precalculate some offsets 2009-10-20 02:46:00 +01:00
Keith Whitwell 5b07d4de38 llvmpipe: remove a leftover 8x2 usage 2009-10-19 17:10:48 +01:00
Keith Whitwell b0828b0adc llvmpipe: calculate masks in format desired by shader
Also remove branches calculating masks for quads.
2009-10-19 16:41:27 +01:00
Keith Whitwell 3fd6b724cc llvmpipe: pre-multiply some constants by fixed_one 2009-10-19 14:55:05 +01:00
José Fonseca 2f5f357c5b llvmpipe: Reshape the shader input from 8x2 to 4x4.
Incorrect rendering until the interpolation code generation is updated.
2009-10-19 14:02:01 +01:00
Keith Whitwell 0580079864 llvmpipe: fixed-point rasterization 2009-10-19 13:36:55 +01:00
José Fonseca 301c1494b2 llvmpipe: Reset the pointer to stored jit context. 2009-10-19 13:14:33 +01:00
José Fonseca f2be08ae0e llvmpipe: Allocate the blend color from the data store, and ensure it's aligned. 2009-10-19 11:53:22 +01:00
Keith Whitwell 269342d916 llvmpipe: correctly scale top/left fill adjustments
Was overdoing it previously.
2009-10-19 11:29:05 +01:00
Keith Whitwell d9f44abe3b llvmpipe: fix typo correcting for fill convention
Adjustments for top-left fill convention were being lost.
2009-10-19 11:23:43 +01:00
José Fonseca 2e3580d994 llvmpipe: Maintain a copy of the shader constants to prevent clobbering. 2009-10-18 11:57:43 +01:00
José Fonseca 0177c6e66c llvmpipe: Only invoke the shader if necessary. 2009-10-10 18:44:46 +01:00
José Fonseca 7908c239e0 llvmpipe: Additional checks for binner block lists. 2009-10-09 19:17:30 +01:00