Mesa (master): iris: Perform compute predraw flushes from compute batch.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 3 23:24:44 UTC 2020


Module: Mesa
Branch: master
Commit: 6b980725110dca19fc8a3ea365a74d21f032baa1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b980725110dca19fc8a3ea365a74d21f032baa1

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Wed Feb  5 18:27:46 2020 -0800

iris: Perform compute predraw flushes from compute batch.

Whenever iris_predraw_resolve_inputs() ends up doing a flush or
invalidate, we really want it to be on the same batch which is going
to consume the result.  Any resolves should still be performed from
the render batch thanks to the previous patch.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3875>

---

 src/gallium/drivers/iris/iris_draw.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c
index c0d749e8927..c9f4da99912 100644
--- a/src/gallium/drivers/iris/iris_draw.c
+++ b/src/gallium/drivers/iris/iris_draw.c
@@ -351,13 +351,8 @@ iris_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info *grid)
       ice->state.stage_dirty |= IRIS_ALL_STAGE_DIRTY_FOR_COMPUTE;
    }
 
-   /* We can't do resolves on the compute engine, so awkwardly, we have to
-    * do them on the render batch...
-    */
-   if (ice->state.dirty & IRIS_DIRTY_COMPUTE_RESOLVES_AND_FLUSHES) {
-      iris_predraw_resolve_inputs(ice, &ice->batches[IRIS_BATCH_RENDER], NULL,
-                                  MESA_SHADER_COMPUTE, false);
-   }
+   if (ice->state.dirty & IRIS_DIRTY_COMPUTE_RESOLVES_AND_FLUSHES)
+      iris_predraw_resolve_inputs(ice, batch, NULL, MESA_SHADER_COMPUTE, false);
 
    iris_batch_maybe_flush(batch, 1500);
 



More information about the mesa-commit mailing list