mesa.git
14 years agollvmpipe: rename queue size to count
Keith Whitwell [Sat, 12 Dec 2009 20:29:39 +0000 (20:29 +0000)]
llvmpipe: rename queue size to count

14 years agollvmpipe: rename one of the two rasterize_bins functions
Keith Whitwell [Sat, 12 Dec 2009 20:19:46 +0000 (20:19 +0000)]
llvmpipe: rename one of the two rasterize_bins functions

14 years agollvmpipe: checkpoint: plug in the new fencing code
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.

14 years agollvmpipe: added lp_rast_fence() bin function
Brian Paul [Sat, 12 Dec 2009 00:57:45 +0000 (17:57 -0700)]
llvmpipe: added lp_rast_fence() bin function

14 years agollvmpipe: added lp_rast_get_num_threads()
Brian Paul [Sat, 12 Dec 2009 00:45:52 +0000 (17:45 -0700)]
llvmpipe: added lp_rast_get_num_threads()

14 years agollvmpipe: added lp_bin_get_num_bins()
Brian Paul [Sat, 12 Dec 2009 00:33:30 +0000 (17:33 -0700)]
llvmpipe: added lp_bin_get_num_bins()

14 years agollvmpipe: remove old fence code, compile new lp_fence.c file
Brian Paul [Sat, 12 Dec 2009 00:32:45 +0000 (17:32 -0700)]
llvmpipe: remove old fence code, compile new lp_fence.c file

14 years agollvmpipe: initial fence implementation
Brian Paul [Sat, 12 Dec 2009 00:32:08 +0000 (17:32 -0700)]
llvmpipe: initial fence implementation

14 years agollvmpipe: implement lp_rast_load_color()
Brian Paul [Fri, 11 Dec 2009 22:00:28 +0000 (15:00 -0700)]
llvmpipe: implement lp_rast_load_color()

14 years agollvmpipe: checkpoint: more thread/queuing changes
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.

14 years agogallium: comments and minor re-org in p_thread.h
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_?

14 years agogallium: added pipe_barrier type and functions
Brian Paul [Fri, 11 Dec 2009 21:00:25 +0000 (14:00 -0700)]
gallium: added pipe_barrier type and functions

14 years agollvmpipe: remove unused lp_rasterizer::fb field
Brian Paul [Fri, 11 Dec 2009 18:56:22 +0000 (11:56 -0700)]
llvmpipe: remove unused lp_rasterizer::fb field

14 years agollvmpipe: improve framebuffer/surface code
Brian Paul [Fri, 11 Dec 2009 18:46:23 +0000 (11:46 -0700)]
llvmpipe: improve framebuffer/surface code

14 years agollvmpipe: fix-up #includes
Brian Paul [Fri, 11 Dec 2009 18:42:18 +0000 (11:42 -0700)]
llvmpipe: fix-up #includes

14 years agollvmpipe: fix inverted util_framebuffer_state_equal() result
Brian Paul [Fri, 11 Dec 2009 18:41:11 +0000 (11:41 -0700)]
llvmpipe: fix inverted util_framebuffer_state_equal() result

14 years agogallium/util: added util_unreference_framebuffer_state()
Brian Paul [Fri, 11 Dec 2009 18:40:52 +0000 (11:40 -0700)]
gallium/util: added util_unreference_framebuffer_state()

14 years agogallium/util: simplify util_framebuffer_state_equal()
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().

14 years agollvmpipe: remove unused fb parameter
Brian Paul [Fri, 11 Dec 2009 18:25:22 +0000 (11:25 -0700)]
llvmpipe: remove unused fb parameter

14 years agollvmpipe: minor comment fix
Brian Paul [Fri, 11 Dec 2009 18:16:48 +0000 (11:16 -0700)]
llvmpipe: minor comment fix

14 years agollvmpipe: checkpoint: use empty/full bin queues
Brian Paul [Thu, 10 Dec 2009 21:56:30 +0000 (14:56 -0700)]
llvmpipe: checkpoint: use empty/full bin queues

14 years agollvmpipe: updated comment
Brian Paul [Thu, 10 Dec 2009 21:56:11 +0000 (14:56 -0700)]
llvmpipe: updated comment

14 years agollvmpipe: simplify llvmpipe_set_framebuffer_state()
Brian Paul [Thu, 10 Dec 2009 21:55:28 +0000 (14:55 -0700)]
llvmpipe: simplify llvmpipe_set_framebuffer_state()

14 years agogallium/util: added framebuffer compare, copy util funcs
Brian Paul [Thu, 10 Dec 2009 21:54:57 +0000 (14:54 -0700)]
gallium/util: added framebuffer compare, copy util funcs

14 years agollvmpipe: added some bin queue debug code
Brian Paul [Thu, 10 Dec 2009 21:54:32 +0000 (14:54 -0700)]
llvmpipe: added some bin queue debug code

14 years agollvmpipe: updated comments
Brian Paul [Thu, 10 Dec 2009 17:59:46 +0000 (10:59 -0700)]
llvmpipe: updated comments

14 years agollvmpipe: added some debug/info code
Brian Paul [Wed, 9 Dec 2009 23:32:32 +0000 (16:32 -0700)]
llvmpipe: added some debug/info code

14 years agollvmpipe: simplify the tiles_x, tiles_y code a bit
Brian Paul [Wed, 9 Dec 2009 23:30:05 +0000 (16:30 -0700)]
llvmpipe: simplify the tiles_x, tiles_y code a bit

14 years agoprogs/demos/gloss: press 'n' to advance by one frame
Brian Paul [Wed, 9 Dec 2009 23:23:30 +0000 (16:23 -0700)]
progs/demos/gloss: press 'n' to advance by one frame

14 years agollvmpipe: use the empty_bins queue now
Brian Paul [Wed, 9 Dec 2009 23:02:30 +0000 (16:02 -0700)]
llvmpipe: use the empty_bins queue now

14 years agoprogs/demos: call glutDestroyWindow() in gloss.c
Brian Paul [Wed, 9 Dec 2009 21:53:53 +0000 (14:53 -0700)]
progs/demos: call glutDestroyWindow() in gloss.c

14 years agollvmpipe: checkpoint: begin plugging in bin queue code
Brian Paul [Wed, 9 Dec 2009 21:53:33 +0000 (14:53 -0700)]
llvmpipe: checkpoint: begin plugging in bin queue code

14 years agollvmpipe: added new lp_bin_queue.[ch] files
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.

14 years agollvmpipe: use new lp_setup_get_current_bins() function
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...

14 years agollvmpipe: more bin functions for create/destroy/queries
Brian Paul [Wed, 9 Dec 2009 19:22:12 +0000 (12:22 -0700)]
llvmpipe: more bin functions for create/destroy/queries

14 years agollvmpipe: Use number of CPUs as default number of threads.
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.

14 years agollvmpipe: remove some left-over debug code
Brian Paul [Tue, 8 Dec 2009 01:18:37 +0000 (18:18 -0700)]
llvmpipe: remove some left-over debug code

14 years agollvmpipe: implement threaded rasterization
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.

14 years agogallium: added pipe_semaphore and related code
Brian Paul [Tue, 8 Dec 2009 00:58:46 +0000 (17:58 -0700)]
gallium: added pipe_semaphore and related code

14 years agollvmpipe: repartition lp_rasterizer state for threading
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.

14 years agollvmpipe: use bin iteration functions when rasterizing bins
Brian Paul [Mon, 7 Dec 2009 22:31:50 +0000 (15:31 -0700)]
llvmpipe: use bin iteration functions when rasterizing bins

14 years agollvmpipe: introduce mutex and bin iteration functions
Brian Paul [Tue, 8 Dec 2009 01:04:31 +0000 (18:04 -0700)]
llvmpipe: introduce mutex and bin iteration functions

14 years agollvmpipe: still more bin code reorganization
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].

14 years agollvmpipe: remove dead code left over from a previous commit
Brian Paul [Fri, 4 Dec 2009 22:46:37 +0000 (15:46 -0700)]
llvmpipe: remove dead code left over from a previous commit

14 years agollvmpipe: reorganization of binning data structions and funtions
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.

14 years agollvmpipe: move lp_rasterize_bin() into lp_rast.c
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

14 years agollvmpipe: simplify framebuffer state code
Brian Paul [Fri, 4 Dec 2009 21:22:08 +0000 (14:22 -0700)]
llvmpipe: simplify framebuffer state code

14 years agollvmpipe: use LP_DBG() macro everywhere
Brian Paul [Fri, 4 Dec 2009 21:11:25 +0000 (14:11 -0700)]
llvmpipe: use LP_DBG() macro everywhere

14 years agollvmpipe: fix-up polygon culling/winding
Brian Paul [Fri, 4 Dec 2009 20:53:28 +0000 (13:53 -0700)]
llvmpipe: fix-up polygon culling/winding

14 years agollvmpipe: add missing sources to Makefile
Brian Paul [Fri, 4 Dec 2009 20:01:03 +0000 (13:01 -0700)]
llvmpipe: add missing sources to Makefile

14 years agollvmpipe: comments and minor clean-ups
Brian Paul [Fri, 4 Dec 2009 19:59:34 +0000 (12:59 -0700)]
llvmpipe: comments and minor clean-ups

14 years agollvmpipe: move bin-related structures and functions into new lp_bin.[ch]
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.

14 years agollvmpipe: remove lp_rast_triangle::oneoverarea field
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).

14 years agollvmpipe: bin state-change commands
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.

14 years agollvmpipe: struct cmd_bin
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.

14 years agollvmpipe: fix typo, whitespace
Brian Paul [Fri, 4 Dec 2009 16:19:09 +0000 (09:19 -0700)]
llvmpipe: fix typo, whitespace

14 years agollvmpipe: dynamic allocation of triangle a0/dadx/dady arrays
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.

14 years agollvmpipe: comments regarding lp_rast_triangle
Brian Paul [Fri, 4 Dec 2009 00:28:48 +0000 (17:28 -0700)]
llvmpipe: comments regarding lp_rast_triangle

14 years agollvmpipe: comment about blend color
Brian Paul [Fri, 4 Dec 2009 00:28:02 +0000 (17:28 -0700)]
llvmpipe: comment about blend color

14 years agollvmpipe: comments
Brian Paul [Fri, 4 Dec 2009 00:27:37 +0000 (17:27 -0700)]
llvmpipe: comments

14 years agollvmpipe: new comment in do_triangle_ccw()
Brian Paul [Fri, 4 Dec 2009 00:27:10 +0000 (17:27 -0700)]
llvmpipe: new comment in do_triangle_ccw()

14 years agollvmpipe: fix incorrect array indexing when saving blend color
Brian Paul [Fri, 4 Dec 2009 00:00:22 +0000 (17:00 -0700)]
llvmpipe: fix incorrect array indexing when saving blend color

14 years agollvmpipe: comments, clean-ups in lp_rast_priv.h
Brian Paul [Thu, 3 Dec 2009 23:23:52 +0000 (16:23 -0700)]
llvmpipe: comments, clean-ups in lp_rast_priv.h

14 years agollvmpipe: checkpoint some initial state binning code
Brian Paul [Thu, 3 Dec 2009 23:05:12 +0000 (16:05 -0700)]
llvmpipe: checkpoint some initial state binning code

14 years agollvmpipe: comments and a stub for lp_rast_set_state()
Brian Paul [Thu, 3 Dec 2009 21:57:44 +0000 (14:57 -0700)]
llvmpipe: comments and a stub for lp_rast_set_state()

14 years agollvmpipe: comments
Brian Paul [Thu, 3 Dec 2009 21:57:13 +0000 (14:57 -0700)]
llvmpipe: comments

14 years agollvmpipe: set LP_SETUP_NEW_FS in lp_setup_set_fs()
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.

14 years agollvmpipe: more debug info
Brian Paul [Thu, 3 Dec 2009 21:25:08 +0000 (14:25 -0700)]
llvmpipe: more debug info

14 years agollvmpipe: fix blend debug strings
Brian Paul [Thu, 3 Dec 2009 21:13:22 +0000 (14:13 -0700)]
llvmpipe: fix blend debug strings

14 years agoprogs/trivial: readback and print Z value in tri-z-eq.c
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

14 years agollvmpipe: quick & dirty implementation of lp_rast_store_zstencil()
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.

14 years agollvmpipe: additional comment about float->uint conversion
Brian Paul [Thu, 3 Dec 2009 18:40:49 +0000 (11:40 -0700)]
llvmpipe: additional comment about float->uint conversion

14 years agollvmpipe: comments
Brian Paul [Thu, 3 Dec 2009 18:39:40 +0000 (11:39 -0700)]
llvmpipe: comments

14 years agollvmpipe: execute shaders on 4x4 blocks instead of 8x2
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.

14 years agollvmpipe: whitespace for readability
Brian Paul [Wed, 2 Dec 2009 21:55:48 +0000 (14:55 -0700)]
llvmpipe: whitespace for readability

14 years agollvmpipe: added assertions
Brian Paul [Tue, 1 Dec 2009 23:24:57 +0000 (16:24 -0700)]
llvmpipe: added assertions

And remove unused BLOCKSIZE.

14 years agollvmpipe: simplify mask computation
Brian Paul [Tue, 1 Dec 2009 23:24:16 +0000 (16:24 -0700)]
llvmpipe: simplify mask computation

Make this a little easier to understand.

14 years agollvmpipe: replace shifts with multiplies to be clearer
Brian Paul [Tue, 1 Dec 2009 22:51:07 +0000 (15:51 -0700)]
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.

14 years agollvmpipe: make nr_blocks unsigned
Brian Paul [Tue, 1 Dec 2009 23:00:04 +0000 (16:00 -0700)]
llvmpipe: make nr_blocks unsigned

14 years agollvmpipe: comments, reformatting and assertions in tri rast code
Brian Paul [Tue, 1 Dec 2009 22:43:01 +0000 (15:43 -0700)]
llvmpipe: comments, reformatting and assertions in tri rast code

14 years agoprogs/trivial: added two simple texture tests
Brian Paul [Mon, 30 Nov 2009 22:31:30 +0000 (15:31 -0700)]
progs/trivial: added two simple texture tests

One draws a series of quads with different textures.
The other draws with one texture which is changed with glTexSubImage2D().

14 years agollvmpipe: add a bunch of comments
Brian Paul [Mon, 30 Nov 2009 21:02:01 +0000 (14:02 -0700)]
llvmpipe: add a bunch of comments

14 years agollvmpipe: minor refactoring of bin rasterization code
Brian Paul [Mon, 30 Nov 2009 21:01:31 +0000 (14:01 -0700)]
llvmpipe: minor refactoring of bin rasterization code

14 years agollvmpipe: update C_SOURCES
Brian Paul [Mon, 30 Nov 2009 17:43:23 +0000 (10:43 -0700)]
llvmpipe: update C_SOURCES

14 years agollvmpipe: fix the worst of the depth regressions since switch to 4x4
Keith Whitwell [Thu, 22 Oct 2009 16:21:37 +0000 (17:21 +0100)]
llvmpipe: fix the worst of the depth regressions since switch to 4x4

14 years agollvmpipe: remove one of two definitions of TILESIZE
Keith Whitwell [Wed, 21 Oct 2009 14:21:11 +0000 (15:21 +0100)]
llvmpipe: remove one of two definitions of TILESIZE

14 years agollvmpipe: remove dead code
Keith Whitwell [Wed, 21 Oct 2009 13:35:54 +0000 (14:35 +0100)]
llvmpipe: remove dead code

14 years agollvmpipe: minor opts to setup_tri
Keith Whitwell [Tue, 20 Oct 2009 09:11:52 +0000 (10:11 +0100)]
llvmpipe: minor opts to setup_tri

14 years agollvmpipe: move block list into rast struct
Keith Whitwell [Tue, 20 Oct 2009 08:44:23 +0000 (09:44 +0100)]
llvmpipe: move block list into rast struct

14 years agollvmpipe: build list of 4x4 blocks to be shaded
Keith Whitwell [Tue, 20 Oct 2009 07:56:58 +0000 (08:56 +0100)]
llvmpipe: build list of 4x4 blocks to be shaded

14 years agollvmpipe: recursive rasterization within a tile
Keith Whitwell [Tue, 20 Oct 2009 02:38:07 +0000 (03:38 +0100)]
llvmpipe: recursive rasterization within a tile

14 years agollvmpipe: pass mask as a linear encoding of the 4x4 block
Keith Whitwell [Tue, 20 Oct 2009 02:17:17 +0000 (03:17 +0100)]
llvmpipe: pass mask as a linear encoding of the 4x4 block

14 years agollvmpipe: precalculate some offsets
Keith Whitwell [Tue, 20 Oct 2009 01:46:00 +0000 (02:46 +0100)]
llvmpipe: precalculate some offsets

14 years agollvmpipe: remove a leftover 8x2 usage
Keith Whitwell [Mon, 19 Oct 2009 16:10:48 +0000 (17:10 +0100)]
llvmpipe: remove a leftover 8x2 usage

14 years agollvmpipe: calculate masks in format desired by shader
Keith Whitwell [Mon, 19 Oct 2009 15:41:27 +0000 (16:41 +0100)]
llvmpipe: calculate masks in format desired by shader

Also remove branches calculating masks for quads.

14 years agollvmpipe: pre-multiply some constants by fixed_one
Keith Whitwell [Mon, 19 Oct 2009 13:55:05 +0000 (14:55 +0100)]
llvmpipe: pre-multiply some constants by fixed_one

14 years agollvmpipe: Reshape the shader input from 8x2 to 4x4.
José Fonseca [Mon, 19 Oct 2009 13:02:01 +0000 (14:02 +0100)]
llvmpipe: Reshape the shader input from 8x2 to 4x4.

Incorrect rendering until the interpolation code generation is updated.

14 years agollvmpipe: fixed-point rasterization
Keith Whitwell [Mon, 19 Oct 2009 11:24:18 +0000 (12:24 +0100)]
llvmpipe: fixed-point rasterization

14 years agollvmpipe: Reset the pointer to stored jit context.
José Fonseca [Mon, 19 Oct 2009 12:14:33 +0000 (13:14 +0100)]
llvmpipe: Reset the pointer to stored jit context.

14 years agollvmpipe: Allocate the blend color from the data store, and ensure it's aligned.
José Fonseca [Mon, 19 Oct 2009 10:53:22 +0000 (11:53 +0100)]
llvmpipe: Allocate the blend color from the data store, and ensure it's aligned.