summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_rast_priv.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-12-07 18:01:12 -0700
committerBrian Paul <brianp@vmware.com>2009-12-07 18:04:54 -0700
commitaab1ceceecbd6449eebce7f5f5b356b1a51552e7 (patch)
tree5a34c098ac995bff9f1c8bdb167e6c701dcdb726 /src/gallium/drivers/llvmpipe/lp_rast_priv.h
parent87c9ceaea2138e051c48cd8c0fbf5f6658100779 (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.h18
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;
};