summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_context.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-07-13 09:49:53 -0400
committerRob Clark <[email protected]>2016-07-30 09:23:42 -0400
commit00bed8a794de3d80a46b65b9ab23c6df83e416a8 (patch)
tree7098b39af0e3a10665314e97487e6773c2c9312f /src/gallium/drivers/freedreno/freedreno_context.h
parentc44163876a2858aea219a08bd2e048b76953cff9 (diff)
freedreno: threaded batch flush
With the state accessed from GMEM+submit factored out of fd_context and into fd_batch, now it is possible to punt this off to a helper thread. And more importantly, since there are cases where one context might force the batch-cache to flush another context's batches (ie. when there are too many in-flight batches), using a per-context helper thread keeps various different flushes for a given context serialized. TODO as with batch-cache, there are a few places where we'll need a mutex to protect critical sections, which is completely missing at the moment. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.h')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h
index 7e25e57d43b..2d88cdcbd8c 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/src/gallium/drivers/freedreno/freedreno_context.h
@@ -114,6 +114,8 @@ struct fd_context {
struct fd_device *dev;
struct fd_screen *screen;
+ struct util_queue flush_queue;
+
struct blitter_context *blitter;
struct primconvert_context *primconvert;
@@ -161,6 +163,8 @@ struct fd_context {
*/
struct fd_batch *batch;
+ uint32_t last_fence;
+
/* Are we in process of shadowing a resource? Used to detect recursion
* in transfer_map, and skip unneeded synchronization.
*/