From 597b9e881083533b987dbcbb8f679ca1eefff974 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 1 May 2018 20:16:19 -0400 Subject: [PATCH] radeonsi/gfx9: work around a GPU hang due to broken indirect indexing in LLVM MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: 6d19120da85 "radeonsi/gfx9: workaround for INTERP with indirect indexing" Cc: 18.1 Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_get.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index d4e0eab187d..c31ab43cb42 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -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 -- 2.11.0