radeonsi/gfx9: work around a GPU hang due to broken indirect indexing in LLVM
authorMarek Olšák <marek.olsak@amd.com>
Wed, 2 May 2018 00:16:19 +0000 (20:16 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 10 May 2018 22:26:32 +0000 (18:26 -0400)
Fixes: 6d19120da85 "radeonsi/gfx9: workaround for INTERP with indirect indexing"
Cc: 18.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_get.c

index d4e0eab187d921644ada3a1cb6536fe1c8eb03af..c31ab43cb42b72622dc286653e5eff34f08b8a92 100644 (file)
@@ -494,6 +494,15 @@ static int si_get_shader_param(struct pipe_screen* pscreen,
                    !sscreen->llvm_has_working_vgpr_indexing)
                        return 0;
 
+               /* Doing indirect indexing on GFX9 with LLVM 6.0 hangs.
+                * This means we don't support INTERP instructions with
+                * indirect indexing on inputs.
+                */
+               if (shader == PIPE_SHADER_FRAGMENT &&
+                   !sscreen->llvm_has_working_vgpr_indexing &&
+                   HAVE_LLVM < 0x0700)
+                       return 0;
+
                /* TCS and TES load inputs directly from LDS or offchip
                 * memory, so indirect indexing is always supported.
                 * PS has to support indirect indexing, because we can't