From: Topi Pohjolainen Date: Thu, 20 Sep 2018 10:46:04 +0000 (-0400) Subject: intel/compiler/icl: Use barrier id bits 24:30 instead of 24:27,31 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cc17fb731466c68586915acbb916586457b19bc;p=mesa.git intel/compiler/icl: Use barrier id bits 24:30 instead of 24:27,31 Fixes gpu hangs with Carchase and Manhattan. Reviewed-by: Anuj Phogat Signed-off-by: Topi Pohjolainen --- diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp index cd2abbb5960..51a0ca2374a 100644 --- a/src/intel/compiler/brw_fs_visitor.cpp +++ b/src/intel/compiler/brw_fs_visitor.cpp @@ -791,9 +791,19 @@ fs_visitor::emit_cs_terminate() void fs_visitor::emit_barrier() { - assert(devinfo->gen >= 7); - const uint32_t barrier_id_mask = - devinfo->gen >= 9 ? 0x8f000000u : 0x0f000000u; + uint32_t barrier_id_mask; + switch (devinfo->gen) { + case 7: + case 8: + barrier_id_mask = 0x0f000000u; break; + case 9: + case 10: + barrier_id_mask = 0x8f000000u; break; + case 11: + barrier_id_mask = 0x7f000000u; break; + default: + unreachable("barrier is only available on gen >= 7"); + } /* We are getting the barrier ID from the compute shader header */ assert(stage == MESA_SHADER_COMPUTE);