anv/gpu_memcpy: CS Stall before a MI memcpy on gen7
This fixes a pile of hangs caused by the recent shuffling of resolves and transitions. The particularly problematic case is when you have at least three attachments with load ops of CLEAR, LOAD, CLEAR. In this case, we execute the first CLEAR followed by a MI memcpy to copy the clear values over for the LOAD followed by a second CLEAR. The MI commands cause the first CLEAR to hang which causes us to get stuck on the 3DSTATE_MULTISAMPLE in the second CLEAR. We also add guards for BLORP to fix the same issue. These shouldn't actually do anything right now because the only use of indirect clears in BLORP today is for resolves which are already guarded by a render cache flush and CS stall. However, this will guard us against potential issues in the future. Acked-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Nanley Chery <nanley.g.chery@intel.com>
This commit is contained in:
@@ -200,6 +200,16 @@ genX(blorp_exec)(struct blorp_batch *batch,
|
||||
genX(cmd_buffer_config_l3)(cmd_buffer, cfg);
|
||||
}
|
||||
|
||||
#if GEN_GEN == 7
|
||||
/* The MI_LOAD/STORE_REGISTER_MEM commands which BLORP uses to implement
|
||||
* indirect fast-clear colors can cause GPU hangs if we don't stall first.
|
||||
* See genX(cmd_buffer_mi_memcpy) for more details.
|
||||
*/
|
||||
assert(params->src.clear_color_addr.buffer == NULL);
|
||||
if (params->dst.clear_color_addr.buffer)
|
||||
cmd_buffer->state.pending_pipe_bits |= ANV_PIPE_CS_STALL_BIT;
|
||||
#endif
|
||||
|
||||
genX(cmd_buffer_apply_pipe_flushes)(cmd_buffer);
|
||||
|
||||
genX(flush_pipeline_select_3d)(cmd_buffer);
|
||||
|
Reference in New Issue
Block a user