[Mesa-dev] [PATCH] intel/compiler/icl: Use barrier id bits 24:30 instead of 24:27, 31
Anuj Phogat
anuj.phogat at gmail.com
Mon Sep 24 19:11:19 UTC 2018
On Thu, Sep 20, 2018 at 11:01 PM Topi Pohjolainen
<topi.pohjolainen at gmail.com> wrote:
>
> Fixes gpu hangs with Carchase and Manhattan.
>
> Cc: Anuj Phogat <anuj.phogat at gmail.com>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/intel/compiler/brw_fs_visitor.cpp | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> 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);
> --
> 2.17.1
>
Barrier ID now setting the right bits specified h/w documentation. Fixes the
GPU hangs. Good find Topi.
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
More information about the mesa-dev
mailing list