From b2d223b6bf4d0c099d5e9644119ee08441a1b926 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 19 Oct 2018 01:40:06 -0700 Subject: [PATCH] iris: hack to avoid memorybarriers out the wazoo we don't want to emit piles of pipe controls to a compute batch if it isn't necessary... prevents double-batch-wraps in cs-op-selection-bool-bvec4-bvec4 (but it's still kinda a big ol' hack...) --- src/gallium/drivers/iris/iris_pipe_control.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_pipe_control.c b/src/gallium/drivers/iris/iris_pipe_control.c index fe937614150..5b9935398d3 100644 --- a/src/gallium/drivers/iris/iris_pipe_control.c +++ b/src/gallium/drivers/iris/iris_pipe_control.c @@ -182,10 +182,14 @@ iris_memory_barrier(struct pipe_context *ctx, unsigned flags) } // XXX: MAPPED_BUFFER, QUERY_BUFFER, STREAMOUT_BUFFER, GLOBAL_BUFFER? - // XXX: compute batch? - iris_emit_pipe_control_flush(&ice->render_batch, bits); - iris_emit_pipe_control_flush(&ice->compute_batch, bits); + // XXX: don't unconditionally emit flushes in both engines, we don't + // even know if we're even using e.g. the compute engine... + + if (ice->render_batch.contains_draw) + iris_emit_pipe_control_flush(&ice->render_batch, bits); + if (ice->compute_batch.contains_draw) + iris_emit_pipe_control_flush(&ice->compute_batch, bits); } void -- 2.30.2