diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 6e9acf987bd..b194d1d640c 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -3737,6 +3737,18 @@ genX(flush_pipeline_select)(struct anv_cmd_buffer *cmd_buffer, return; #if GFX_VER >= 20 + /* While PIPELINE_SELECT is not needed on Xe2+, our current assumption + * is that the pipelined flushes in the 3D pipeline are not getting + * synchronized with the compute dispatches (and vice versa). So we need + * a CS_STALL prior the next set of commands to ensure the flushes have + * completed. + * + * The new RESOURCE_BARRIER instruction has support for synchronizing + * 3D/Compute and once we switch to that we should be able to get rid of + * this CS_STALL. + */ + anv_add_pending_pipe_bits(cmd_buffer, ANV_PIPE_CS_STALL_BIT, "pipeline switch stall"); + /* Since we are not stalling/flushing caches explicitly while switching * between the pipelines, we need to apply data dependency flushes recorded * previously on the resource.