Mesa (master): v3d: Don't forget to wait for our TFU job before rendering from it.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Dec 15 03:29:15 UTC 2018
Module: Mesa
Branch: master
Commit: e731d537161c33aebcfd8a7aca6154919ca4c60f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e731d537161c33aebcfd8a7aca6154919ca4c60f
Author: Eric Anholt <eric at anholt.net>
Date: Fri Dec 14 09:43:15 2018 -0800
v3d: Don't forget to wait for our TFU job before rendering from it.
Otherwise we may race to read old contents. This didn't show up in the
CTS and piglit for me, but it did once I started using the TFU to do
linear->UIF blits for X11.
Fixes: 2ebca177dc18 ("v3d: Use the TFU to do generatemipmap.")
---
src/gallium/drivers/v3d/v3d_job.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c
index 604e973090..f92aac1a51 100644
--- a/src/gallium/drivers/v3d/v3d_job.c
+++ b/src/gallium/drivers/v3d/v3d_job.c
@@ -385,7 +385,15 @@ v3d_job_submit(struct v3d_context *v3d, struct v3d_job *job)
v3d33_bcl_epilogue(v3d, job);
}
+ /* While the RCL will implicitly depend on the last RCL to have
+ * finished, we also need to block on any previous TFU job we may have
+ * dispatched.
+ */
+ job->submit.in_sync_rcl = v3d->out_sync;
+
+ /* Update the sync object for the last rendering by our context. */
job->submit.out_sync = v3d->out_sync;
+
job->submit.bcl_end = job->bcl.bo->offset + cl_offset(&job->bcl);
job->submit.rcl_end = job->rcl.bo->offset + cl_offset(&job->rcl);
More information about the mesa-commit
mailing list