panfrost: Add an helper to emit a pair of vertex/tiler jobs
[mesa.git] / src / gallium / drivers / swr / swr_fence.h
index 47f4d2e7c9f69792277294e07c871149d1deefc2..2f7cd1cf9a690870381ec0312d6c57cb803dd630 100644 (file)
@@ -25,6 +25,8 @@
 #include "pipe/p_state.h"
 #include "util/u_inlines.h"
 
+#include "swr_fence_work.h"
+
 struct pipe_screen;
 
 struct swr_fence {
@@ -36,6 +38,12 @@ struct swr_fence {
    unsigned pending;
 
    unsigned id; /* Just for reference */
+   
+   struct {
+      uint32_t count;
+      struct swr_fence_work head;
+      struct swr_fence_work *tail;
+   } work;
 };
 
 
@@ -46,14 +54,14 @@ swr_fence(struct pipe_fence_handle *fence)
 }
 
 
-static INLINE boolean
+static INLINE bool
 swr_is_fence_done(struct pipe_fence_handle *fence_handle)
 {
    struct swr_fence *fence = swr_fence(fence_handle);
    return (fence->read == fence->write);
 }
 
-static INLINE boolean
+static INLINE bool
 swr_is_fence_pending(struct pipe_fence_handle *fence_handle)
 {
    return swr_fence(fence_handle)->pending;
@@ -68,9 +76,10 @@ void swr_fence_reference(struct pipe_screen *screen,
                          struct pipe_fence_handle **ptr,
                          struct pipe_fence_handle *f);
 
-boolean swr_fence_finish(struct pipe_screen *screen,
-                         struct pipe_fence_handle *fence_handle,
-                         uint64_t timeout);
+bool swr_fence_finish(struct pipe_screen *screen,
+                      struct pipe_context *ctx,
+                      struct pipe_fence_handle *fence_handle,
+                      uint64_t timeout);
 
 void
 swr_fence_submit(struct swr_context *ctx, struct pipe_fence_handle *fence);