summaryrefslogtreecommitdiff
path: root/freedreno/freedreno_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'freedreno/freedreno_pipe.c')
-rw-r--r--freedreno/freedreno_pipe.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/freedreno/freedreno_pipe.c b/freedreno/freedreno_pipe.c
index 1698c466..9f9f1c6e 100644
--- a/freedreno/freedreno_pipe.c
+++ b/freedreno/freedreno_pipe.c
@@ -199,8 +199,26 @@ void fd_pipe_add_submit(struct fd_pipe *pipe, struct fd_bo *bo)
list_addtail(list, &pipe->submit_list);
}
+/* prepare buffers on submit list before flush: */
+void fd_pipe_pre_submit(struct fd_pipe *pipe)
+{
+ struct fd_bo *bo;
+
+ if (pipe->id == FD_PIPE_3D)
+ return;
+
+ if (!pipe->p3d)
+ pipe->p3d = fd_pipe_new(pipe->dev, FD_PIPE_3D);
+
+ LIST_FOR_EACH_ENTRY(bo, &pipe->submit_list, list[pipe->id]) {
+ uint32_t timestamp = fd_bo_get_timestamp(bo);
+ if (timestamp)
+ fd_pipe_wait(pipe->p3d, timestamp);
+ }
+}
+
/* process buffers on submit list after flush: */
-void fd_pipe_process_submit(struct fd_pipe *pipe, uint32_t timestamp)
+void fd_pipe_post_submit(struct fd_pipe *pipe, uint32_t timestamp)
{
struct fd_bo *bo, *tmp;
@@ -209,6 +227,9 @@ void fd_pipe_process_submit(struct fd_pipe *pipe, uint32_t timestamp)
list_del(list);
bo->timestamp[pipe->id] = timestamp;
list_addtail(list, &pipe->pending_list);
+
+ if (pipe->id == FD_PIPE_3D)
+ fb_bo_set_timestamp(bo, timestamp);
}
if (!fd_pipe_timestamp(pipe, &timestamp))