Brian Paul [Wed, 6 Jan 2010 21:11:54 +0000 (14:11 -0700)]
llvmpipe: more comments in flow builder code
Brian Paul [Mon, 4 Jan 2010 22:22:58 +0000 (15:22 -0700)]
llvmpipe: flow-control comments
Keith Whitwell [Wed, 6 Jan 2010 17:13:37 +0000 (17:13 +0000)]
llvmpipe: fix double free
Keith Whitwell [Wed, 6 Jan 2010 17:13:28 +0000 (17:13 +0000)]
llvmpipe: rename some functions
Keith Whitwell [Wed, 6 Jan 2010 17:00:26 +0000 (17:00 +0000)]
llvmpipe: remove dead code
Keith Whitwell [Wed, 6 Jan 2010 16:56:28 +0000 (16:56 +0000)]
llvmpipe: restrict header visibility
Keith Whitwell [Wed, 6 Jan 2010 16:44:43 +0000 (16:44 +0000)]
llvmpipe: merge setup and draw vbuf submodules
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.
Brian Paul [Fri, 18 Dec 2009 18:17:06 +0000 (11:17 -0700)]
llvmpipe: added linux-llvm-debug configuration
Brian Paul [Fri, 18 Dec 2009 18:12:59 +0000 (11:12 -0700)]
llvmpipe: change configs/linux-llvm from debug build to optimized build
Basically equivalent to the SCons non-debug build now.
Brian Paul [Thu, 17 Dec 2009 21:26:48 +0000 (14:26 -0700)]
llvmpipe: fix upper/lower-case typo
Brian Paul [Thu, 17 Dec 2009 21:22:43 +0000 (14:22 -0700)]
llvmpipe: added function comments
Brian Paul [Thu, 17 Dec 2009 17:52:50 +0000 (10:52 -0700)]
llvmpipe: remove unused code, added comments, etc
Brian Paul [Thu, 17 Dec 2009 16:00:58 +0000 (09:00 -0700)]
llvmpipe: replace INT_MIN/2 with INT_MIN
Since changing the in/out test we can just use INT_MIN to be sure the
comparison against the step values always passes.
Brian Paul [Thu, 17 Dec 2009 00:08:13 +0000 (17:08 -0700)]
llvmpipe: improve the in/out test a little
Instead of:
s = c + step
m = s > 0
Do:
m = step > c (with negated c)
Keith Whitwell [Thu, 17 Dec 2009 11:29:37 +0000 (11:29 +0000)]
llvmpipe: keep copy of framebuffer state in setup context
Avoids crashes when first frame is rendered before window is mapped.
Avoids potential issue where fb state is changed before setup context is
flushed.
Brian Paul [Wed, 16 Dec 2009 23:02:59 +0000 (16:02 -0700)]
llvmpipe: do final the pixel in/out triangle test in the fragment shader
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.
Brian Paul [Wed, 16 Dec 2009 19:33:11 +0000 (12:33 -0700)]
llvmpipe: added lp_build_int32_vec4_type()
Brian Paul [Wed, 16 Dec 2009 19:32:45 +0000 (12:32 -0700)]
llvmpipe: refactor lp_build_cmp() to use lp_build_compare()
Brian Paul [Tue, 15 Dec 2009 22:39:48 +0000 (15:39 -0700)]
llvmpipe: tighten up an assertion
Brian Paul [Tue, 15 Dec 2009 14:58:37 +0000 (07:58 -0700)]
llvmpipe: use 1ULL to be ready for 64-bit arithmetic someday
Brian Paul [Mon, 14 Dec 2009 22:27:35 +0000 (15:27 -0700)]
llvmpipe: fix broken TGSI_OPCODE_FRC codegen
Brian Paul [Mon, 14 Dec 2009 22:24:31 +0000 (15:24 -0700)]
llvmpipe: fix broken lp_build_abs()
Brian Paul [Mon, 14 Dec 2009 18:49:23 +0000 (11:49 -0700)]
llvmpipe: update file list in Makefile
Keith Whitwell [Sun, 13 Dec 2009 18:17:25 +0000 (18:17 +0000)]
llvmpipe: rename bins to scene
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.
Keith Whitwell [Sat, 12 Dec 2009 20:29:39 +0000 (20:29 +0000)]
llvmpipe: rename queue size to count
Keith Whitwell [Sat, 12 Dec 2009 20:19:46 +0000 (20:19 +0000)]
llvmpipe: rename one of the two rasterize_bins functions
Brian Paul [Sat, 12 Dec 2009 00:59:26 +0000 (17:59 -0700)]
llvmpipe: checkpoint: plug in the new fencing code
This has only been very lightly tested. More work to come.
Brian Paul [Sat, 12 Dec 2009 00:57:45 +0000 (17:57 -0700)]
llvmpipe: added lp_rast_fence() bin function
Brian Paul [Sat, 12 Dec 2009 00:45:52 +0000 (17:45 -0700)]
llvmpipe: added lp_rast_get_num_threads()
Brian Paul [Sat, 12 Dec 2009 00:33:30 +0000 (17:33 -0700)]
llvmpipe: added lp_bin_get_num_bins()
Brian Paul [Sat, 12 Dec 2009 00:32:45 +0000 (17:32 -0700)]
llvmpipe: remove old fence code, compile new lp_fence.c file
Brian Paul [Sat, 12 Dec 2009 00:32:08 +0000 (17:32 -0700)]
llvmpipe: initial fence implementation
Brian Paul [Fri, 11 Dec 2009 22:00:28 +0000 (15:00 -0700)]
llvmpipe: implement lp_rast_load_color()
Brian Paul [Fri, 11 Dec 2009 21:52:42 +0000 (14:52 -0700)]
llvmpipe: checkpoint: more thread/queuing changes
Now mapping/unmapping the framebuffer is done by a rasteizer thread
rather than the main calling thread.
Brian Paul [Fri, 11 Dec 2009 21:07:01 +0000 (14:07 -0700)]
gallium: comments and minor re-org in p_thread.h
There's more work to do in this file:
1. Implement condvars for Windows via Win32 CONDITION_VARIABLE type.
2. Implement barriers for Windows
3. Try to get rid of PIPE_THREAD_HAVE_CONDVAR (only used in trace driver)
4. Why the 2 in _P_THREAD2_H_?
Brian Paul [Fri, 11 Dec 2009 21:00:25 +0000 (14:00 -0700)]
gallium: added pipe_barrier type and functions
Brian Paul [Fri, 11 Dec 2009 18:56:22 +0000 (11:56 -0700)]
llvmpipe: remove unused lp_rasterizer::fb field
Brian Paul [Fri, 11 Dec 2009 18:46:23 +0000 (11:46 -0700)]
llvmpipe: improve framebuffer/surface code
Brian Paul [Fri, 11 Dec 2009 18:42:18 +0000 (11:42 -0700)]
llvmpipe: fix-up #includes
Brian Paul [Fri, 11 Dec 2009 18:41:11 +0000 (11:41 -0700)]
llvmpipe: fix inverted util_framebuffer_state_equal() result
Brian Paul [Fri, 11 Dec 2009 18:40:52 +0000 (11:40 -0700)]
gallium/util: added util_unreference_framebuffer_state()
Brian Paul [Fri, 11 Dec 2009 18:39:53 +0000 (11:39 -0700)]
gallium/util: simplify util_framebuffer_state_equal()
And copy width, height in util_copy_framebuffer_state().
Brian Paul [Fri, 11 Dec 2009 18:25:22 +0000 (11:25 -0700)]
llvmpipe: remove unused fb parameter
Brian Paul [Fri, 11 Dec 2009 18:16:48 +0000 (11:16 -0700)]
llvmpipe: minor comment fix
Brian Paul [Thu, 10 Dec 2009 21:56:30 +0000 (14:56 -0700)]
llvmpipe: checkpoint: use empty/full bin queues
Brian Paul [Thu, 10 Dec 2009 21:56:11 +0000 (14:56 -0700)]
llvmpipe: updated comment
Brian Paul [Thu, 10 Dec 2009 21:55:28 +0000 (14:55 -0700)]
llvmpipe: simplify llvmpipe_set_framebuffer_state()
Brian Paul [Thu, 10 Dec 2009 21:54:57 +0000 (14:54 -0700)]
gallium/util: added framebuffer compare, copy util funcs
Brian Paul [Thu, 10 Dec 2009 21:54:32 +0000 (14:54 -0700)]
llvmpipe: added some bin queue debug code
Brian Paul [Thu, 10 Dec 2009 17:59:46 +0000 (10:59 -0700)]
llvmpipe: updated comments
Brian Paul [Wed, 9 Dec 2009 23:32:32 +0000 (16:32 -0700)]
llvmpipe: added some debug/info code
Brian Paul [Wed, 9 Dec 2009 23:30:05 +0000 (16:30 -0700)]
llvmpipe: simplify the tiles_x, tiles_y code a bit
Brian Paul [Wed, 9 Dec 2009 23:23:30 +0000 (16:23 -0700)]
progs/demos/gloss: press 'n' to advance by one frame
Brian Paul [Wed, 9 Dec 2009 23:02:30 +0000 (16:02 -0700)]
llvmpipe: use the empty_bins queue now
Brian Paul [Wed, 9 Dec 2009 21:53:53 +0000 (14:53 -0700)]
progs/demos: call glutDestroyWindow() in gloss.c
Brian Paul [Wed, 9 Dec 2009 21:53:33 +0000 (14:53 -0700)]
llvmpipe: checkpoint: begin plugging in bin queue code
Brian Paul [Wed, 9 Dec 2009 21:36:52 +0000 (14:36 -0700)]
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.
Brian Paul [Wed, 9 Dec 2009 19:28:54 +0000 (12:28 -0700)]
llvmpipe: use new lp_setup_get_current_bins() function
This stub function will interface to the queue system...
Brian Paul [Wed, 9 Dec 2009 19:22:12 +0000 (12:22 -0700)]
llvmpipe: more bin functions for create/destroy/queries
José Fonseca [Tue, 8 Dec 2009 08:02:49 +0000 (08:02 +0000)]
llvmpipe: Use number of CPUs as default number of threads.
Also bump MAX_THREADS to 8.
Brian Paul [Tue, 8 Dec 2009 01:18:37 +0000 (18:18 -0700)]
llvmpipe: remove some left-over debug code
Brian Paul [Tue, 8 Dec 2009 01:01:12 +0000 (18:01 -0700)]
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.
Brian Paul [Tue, 8 Dec 2009 00:58:46 +0000 (17:58 -0700)]
gallium: added pipe_semaphore and related code
Brian Paul [Tue, 8 Dec 2009 00:02:17 +0000 (17:02 -0700)]
llvmpipe: repartition lp_rasterizer state for threading
Some of the state is per-thread. Put that state in new lp_rasterizer_task
struct.
Brian Paul [Mon, 7 Dec 2009 22:31:50 +0000 (15:31 -0700)]
llvmpipe: use bin iteration functions when rasterizing bins
Brian Paul [Tue, 8 Dec 2009 01:04:31 +0000 (18:04 -0700)]
llvmpipe: introduce mutex and bin iteration functions
Brian Paul [Fri, 4 Dec 2009 22:59:25 +0000 (15:59 -0700)]
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].
Brian Paul [Fri, 4 Dec 2009 22:46:37 +0000 (15:46 -0700)]
llvmpipe: remove dead code left over from a previous commit
Brian Paul [Fri, 4 Dec 2009 22:31:09 +0000 (15:31 -0700)]
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.
Brian Paul [Fri, 4 Dec 2009 21:47:40 +0000 (14:47 -0700)]
llvmpipe: move lp_rasterize_bin() into lp_rast.c
First step of moving bin rasterization/execution code out of lp_setup.c
Brian Paul [Fri, 4 Dec 2009 21:22:08 +0000 (14:22 -0700)]
llvmpipe: simplify framebuffer state code
Brian Paul [Fri, 4 Dec 2009 21:11:25 +0000 (14:11 -0700)]
llvmpipe: use LP_DBG() macro everywhere
Brian Paul [Fri, 4 Dec 2009 20:53:28 +0000 (13:53 -0700)]
llvmpipe: fix-up polygon culling/winding
Brian Paul [Fri, 4 Dec 2009 20:01:03 +0000 (13:01 -0700)]
llvmpipe: add missing sources to Makefile
Brian Paul [Fri, 4 Dec 2009 19:59:34 +0000 (12:59 -0700)]
llvmpipe: comments and minor clean-ups
Brian Paul [Fri, 4 Dec 2009 19:54:37 +0000 (12:54 -0700)]
llvmpipe: move bin-related structures and functions into new lp_bin.[ch]
And put lp_ prefixes on some functions.
Brian Paul [Fri, 4 Dec 2009 18:58:24 +0000 (11:58 -0700)]
llvmpipe: remove lp_rast_triangle::oneoverarea field
Makes lp_rast_triangle a little smaller (now 280 bytes on a 32-bit system).
Brian Paul [Fri, 4 Dec 2009 18:50:40 +0000 (11:50 -0700)]
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.
Brian Paul [Fri, 4 Dec 2009 17:41:38 +0000 (10:41 -0700)]
llvmpipe: struct cmd_bin
Just introducing a new structure to represent a per-tile bin.
Brian Paul [Fri, 4 Dec 2009 16:19:09 +0000 (09:19 -0700)]
llvmpipe: fix typo, whitespace
Brian Paul [Fri, 4 Dec 2009 16:14:40 +0000 (09:14 -0700)]
llvmpipe: dynamic allocation of triangle a0/dadx/dady arrays
Much less memory per triangle now.
Brian Paul [Fri, 4 Dec 2009 00:28:48 +0000 (17:28 -0700)]
llvmpipe: comments regarding lp_rast_triangle
Brian Paul [Fri, 4 Dec 2009 00:28:02 +0000 (17:28 -0700)]
llvmpipe: comment about blend color
Brian Paul [Fri, 4 Dec 2009 00:27:37 +0000 (17:27 -0700)]
llvmpipe: comments
Brian Paul [Fri, 4 Dec 2009 00:27:10 +0000 (17:27 -0700)]
llvmpipe: new comment in do_triangle_ccw()
Brian Paul [Fri, 4 Dec 2009 00:00:22 +0000 (17:00 -0700)]
llvmpipe: fix incorrect array indexing when saving blend color
Brian Paul [Thu, 3 Dec 2009 23:23:52 +0000 (16:23 -0700)]
llvmpipe: comments, clean-ups in lp_rast_priv.h
Brian Paul [Thu, 3 Dec 2009 23:05:12 +0000 (16:05 -0700)]
llvmpipe: checkpoint some initial state binning code
Brian Paul [Thu, 3 Dec 2009 21:57:44 +0000 (14:57 -0700)]
llvmpipe: comments and a stub for lp_rast_set_state()
Brian Paul [Thu, 3 Dec 2009 21:57:13 +0000 (14:57 -0700)]
llvmpipe: comments
Brian Paul [Thu, 3 Dec 2009 21:25:46 +0000 (14:25 -0700)]
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.
Brian Paul [Thu, 3 Dec 2009 21:25:08 +0000 (14:25 -0700)]
llvmpipe: more debug info
Brian Paul [Thu, 3 Dec 2009 21:13:22 +0000 (14:13 -0700)]
llvmpipe: fix blend debug strings
Brian Paul [Thu, 3 Dec 2009 18:43:19 +0000 (11:43 -0700)]
progs/trivial: readback and print Z value in tri-z-eq.c
Brian Paul [Thu, 3 Dec 2009 18:41:45 +0000 (11:41 -0700)]
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.
Brian Paul [Thu, 3 Dec 2009 18:40:49 +0000 (11:40 -0700)]
llvmpipe: additional comment about float->uint conversion
Brian Paul [Thu, 3 Dec 2009 18:39:40 +0000 (11:39 -0700)]
llvmpipe: comments
Brian Paul [Wed, 2 Dec 2009 22:13:45 +0000 (15:13 -0700)]
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.
Brian Paul [Wed, 2 Dec 2009 21:55:48 +0000 (14:55 -0700)]
llvmpipe: whitespace for readability
Brian Paul [Tue, 1 Dec 2009 23:24:57 +0000 (16:24 -0700)]
llvmpipe: added assertions
And remove unused BLOCKSIZE.