From: Francisco Jerez Date: Thu, 6 Feb 2020 02:27:46 +0000 (-0800) Subject: iris: Perform compute predraw flushes from compute batch. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b980725110dca19fc8a3ea365a74d21f032baa1;p=mesa.git 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: --- 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);