Commit graph

26928 commits

Author SHA1 Message Date
Brian Paul
edf11da7f8 progs/demos/gloss: press 'n' to advance by one frame 2009-12-09 16:23:30 -07:00
Brian Paul
3bee8c2e7c llvmpipe: use the empty_bins queue now 2009-12-09 16:06:04 -07:00
Brian Paul
288ea9770a progs/demos: call glutDestroyWindow() in gloss.c 2009-12-09 14:53:53 -07:00
Brian Paul
d7dbc66636 llvmpipe: checkpoint: begin plugging in bin queue code 2009-12-09 14:53:33 -07:00
Brian Paul
ea35993e74 llvmpipe: added new lp_bin_queue.[ch] files
The queues will be used for keeping track of full and empty bins so
we can overlap setup with the rasterization threads.
2009-12-09 14:36:54 -07:00
Brian Paul
22b07b8be4 llvmpipe: use new lp_setup_get_current_bins() function
This stub function will interface to the queue system...
2009-12-09 12:28:59 -07:00
Brian Paul
88e62b33dc llvmpipe: more bin functions for create/destroy/queries 2009-12-09 12:22:12 -07:00
José Fonseca
7f457acabc llvmpipe: Use number of CPUs as default number of threads.
Also bump MAX_THREADS to 8.
2009-12-08 08:02:49 +00:00
Brian Paul
73e13c33fd llvmpipe: remove some left-over debug code 2009-12-07 18:18:37 -07:00
Brian Paul
aab1ceceec llvmpipe: implement threaded rasterization
The LP_NUM_THREADS env var controls how many threads are created.
The default (and max) is 4, for now.
If LP_NUM_THREADS = 0, threading is not used.
2009-12-07 18:04:54 -07:00
Brian Paul
87c9ceaea2 gallium: added pipe_semaphore and related code 2009-12-07 18:04:54 -07:00
Brian Paul
3a06c113c7 llvmpipe: repartition lp_rasterizer state for threading
Some of the state is per-thread.  Put that state in new lp_rasterizer_task
struct.
2009-12-07 18:04:54 -07:00
Brian Paul
cdaea049c9 llvmpipe: use bin iteration functions when rasterizing bins 2009-12-07 18:04:54 -07:00
Brian Paul
270f154860 llvmpipe: introduce mutex and bin iteration functions 2009-12-07 18:04:31 -07:00
Brian Paul
8a23105fa0 llvmpipe: still more bin code reorganization
Move tiles_x,y fields from setup state into bin state.
Move more bin-adding commands into lp_bin.[ch].
2009-12-04 15:59:25 -07:00
Brian Paul
2c8d5c66ce llvmpipe: remove dead code left over from a previous commit 2009-12-04 15:46:37 -07:00
Brian Paul
01b1900084 llvmpipe: reorganization of binning data structions and funtions
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-04 15:31:09 -07:00
Brian Paul
b533b56750 llvmpipe: move lp_rasterize_bin() into lp_rast.c
First step of moving bin rasterization/execution code out of lp_setup.c
2009-12-04 14:47:46 -07:00
Brian Paul
9fca3e065b llvmpipe: simplify framebuffer state code 2009-12-04 14:22:08 -07:00
Brian Paul
a08d630216 llvmpipe: use LP_DBG() macro everywhere 2009-12-04 14:11:25 -07:00
Brian Paul
15a2a588d8 llvmpipe: fix-up polygon culling/winding 2009-12-04 13:53:28 -07:00
Brian Paul
24a3b0d23a llvmpipe: add missing sources to Makefile 2009-12-04 13:01:03 -07:00
Brian Paul
49a720c5cd llvmpipe: comments and minor clean-ups 2009-12-04 12:59:34 -07:00
Brian Paul
d9dc3d5976 llvmpipe: move bin-related structures and functions into new lp_bin.[ch]
And put lp_ prefixes on some functions.
2009-12-04 12:54:37 -07:00
Brian Paul
5c7d1b592a llvmpipe: remove lp_rast_triangle::oneoverarea field
Makes lp_rast_triangle a little smaller (now 280 bytes on a 32-bit system).
2009-12-04 11:58:26 -07:00
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
52081f0a2c progs/trivial: readback and print Z value in tri-z-eq.c 2009-12-03 11:43:19 -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