From 6b980725110dca19fc8a3ea365a74d21f032baa1 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 5 Feb 2020 18:27:46 -0800 Subject: [PATCH] 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 Part-of: --- 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); -- 2.30.2