From 87e2d2249dc9cd4d23ce6ed103b2c00489a89582 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Thu, 23 Dec 2021 23:20:10 -0800 Subject: [PATCH] anv/blorp: Apply pending pipe flushes after PIPELINE_SELECT Allows the PIPELINE_SELECT change to consume any outstanding flushes. In case it doesn't, we still apply the pipe flushses afterwards. Reviewed-by: Lionel Landwerlin Reviewed-by: Kenneth Graunke Part-of: --- src/intel/vulkan/genX_blorp_exec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/genX_blorp_exec.c b/src/intel/vulkan/genX_blorp_exec.c index ca0e73b5d85..b30a749dab0 100644 --- a/src/intel/vulkan/genX_blorp_exec.c +++ b/src/intel/vulkan/genX_blorp_exec.c @@ -281,9 +281,11 @@ blorp_exec_on_render(struct blorp_batch *batch, !(batch->flags & BLORP_BATCH_NO_EMIT_DEPTH_STENCIL)) genX(cmd_buffer_emit_gfx12_depth_wa)(cmd_buffer, ¶ms->depth.surf); - genX(cmd_buffer_apply_pipe_flushes)(cmd_buffer); genX(flush_pipeline_select_3d)(cmd_buffer); + /* Apply any outstanding flushes in case pipeline select haven't. */ + genX(cmd_buffer_apply_pipe_flushes)(cmd_buffer); + genX(cmd_buffer_emit_gfx7_depth_flush)(cmd_buffer); /* BLORP doesn't do anything fancy with depth such as discards, so we want @@ -340,8 +342,11 @@ blorp_exec_on_compute(struct blorp_batch *batch, struct anv_cmd_buffer *cmd_buffer = batch->driver_batch; assert(cmd_buffer->pool->queue_family->queueFlags & VK_QUEUE_COMPUTE_BIT); - genX(cmd_buffer_apply_pipe_flushes)(cmd_buffer); genX(flush_pipeline_select_gpgpu)(cmd_buffer); + + /* Apply any outstanding flushes in case pipeline select haven't. */ + genX(cmd_buffer_apply_pipe_flushes)(cmd_buffer); + blorp_exec(batch, params); cmd_buffer->state.push_constants_dirty |= VK_SHADER_STAGE_COMPUTE_BIT;