From 73ccbcab6013aee36f3b2144efd6e7c4010fa227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Briano?= Date: Thu, 24 Aug 2023 10:20:31 -0700 Subject: [PATCH] blorp: fix hangs with mesh enabled Move mesh URB allocations together with the other stages. This fixes a hang that started happening with mesh enabled after 419531c5d98 ("intel/blorp: add a new flag to communicate PSS sync need") Bspec 45352 says: L3 Space allocation can only be changed when the GPU pipeline is completely flushed. It's likely that the PIPE_CONTROL added in that commit was breaking that assumption and the URB allocation happening afterwards at the end of the pipeline emission would then hang. And before that, we were probably just getting lucky. Reviewed-by: Caio Oliveira (cherry picked from commit bcde58ea86e048b8aec5459294b46daf97f85a0d) Part-of: --- src/intel/blorp/blorp_genX_exec.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index 8eceb15bcab..d1d0c96684e 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -267,6 +267,14 @@ emit_urb_config(struct blorp_batch *batch, urb.VSNumberofURBEntries = entries[i]; } } + + if (batch->blorp->config.use_mesh_shading) { +#if GFX_VERx10 >= 125 + blorp_emit(batch, GENX(3DSTATE_URB_ALLOC_MESH), zero); + blorp_emit(batch, GENX(3DSTATE_URB_ALLOC_TASK), zero); +#endif + } + #else /* GFX_VER < 7 */ blorp_emit_urb_config(batch, vs_entry_size, sf_entry_size); #endif @@ -1422,12 +1430,6 @@ blorp_emit_pipeline(struct blorp_batch *batch, if (batch->blorp->config.use_mesh_shading) { #if GFX_VERx10 >= 125 - blorp_emit(batch, GENX(3DSTATE_URB_ALLOC_MESH), zero); - blorp_emit(batch, GENX(3DSTATE_URB_ALLOC_TASK), zero); - - blorp_emit(batch, GENX(3DSTATE_MESH_SHADER), zero); - blorp_emit(batch, GENX(3DSTATE_TASK_SHADER), zero); - blorp_emit(batch, GENX(3DSTATE_MESH_CONTROL), zero); blorp_emit(batch, GENX(3DSTATE_TASK_CONTROL), zero); #endif