diff options
author | Brian Paul <brianp@vmware.com> | 2009-12-07 18:01:12 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-12-07 18:04:54 -0700 |
commit | aab1ceceecbd6449eebce7f5f5b356b1a51552e7 (patch) | |
tree | 5a34c098ac995bff9f1c8bdb167e6c701dcdb726 /src/gallium/drivers/llvmpipe/lp_rast_priv.h | |
parent | 87c9ceaea2138e051c48cd8c0fbf5f6658100779 (diff) |
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.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast_priv.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast_priv.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index 9e7cbd7912..62f3c877da 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -28,6 +28,7 @@ #ifndef LP_RAST_PRIV_H #define LP_RAST_PRIV_H +#include "pipe/p_thread.h" #include "lp_rast.h" @@ -36,6 +37,7 @@ struct pipe_transfer; struct pipe_screen; +struct lp_rasterizer; /** @@ -69,6 +71,15 @@ struct lp_rasterizer_task } blocks[256]; const struct lp_rast_state *current_state; + + /** "back" pointer */ + struct lp_rasterizer *rast; + + /** "my" index */ + unsigned thread_index; + + pipe_semaphore work_ready; + pipe_semaphore work_done; }; @@ -104,6 +115,13 @@ struct lp_rasterizer /** A task object for each rasterization thread */ struct lp_rasterizer_task tasks[MAX_THREADS]; + + unsigned num_threads; + pipe_thread threads[MAX_THREADS]; + + struct lp_bins *bins; + const struct pipe_framebuffer_state *fb; + boolean write_depth; }; |