Mesa (master): iris: Flush any current work in iris_fence_await before adding deps
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 1 19:13:07 UTC 2020
Module: Mesa
Branch: master
Commit: 07fb925ad82f2b61cbdd239956c16e752c64e05d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=07fb925ad82f2b61cbdd239956c16e752c64e05d
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Feb 14 16:40:07 2020 -0800
iris: Flush any current work in iris_fence_await before adding deps
Receiving a fence_server_sync (iris_fence_await) means that any future
work needs to wait for the fence. But previous work doesn't need to.
So flush it now, to avoid delaying it arbitrarily.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3802>
---
src/gallium/drivers/iris/iris_fence.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/drivers/iris/iris_fence.c b/src/gallium/drivers/iris/iris_fence.c
index c43c892bb87..ff280599060 100644
--- a/src/gallium/drivers/iris/iris_fence.c
+++ b/src/gallium/drivers/iris/iris_fence.c
@@ -213,6 +213,9 @@ iris_fence_await(struct pipe_context *ctx,
{
struct iris_context *ice = (struct iris_context *)ctx;
+ /* Flush any current work in our context as it doesn't need to wait
+ * for this fence. Any future work in our context must wait.
+ */
for (unsigned b = 0; b < IRIS_BATCH_COUNT; b++) {
struct iris_batch *batch = &ice->batches[b];
@@ -222,6 +225,7 @@ iris_fence_await(struct pipe_context *ctx,
if (iris_seqno_signaled(seqno))
continue;
+ iris_batch_flush(batch);
iris_batch_add_syncobj(batch, seqno->syncobj, I915_EXEC_FENCE_WAIT);
}
}
More information about the mesa-commit
mailing list