diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2019-04-18 09:17:04 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-04-22 09:06:26 -0700 |
commit | b5ea4378c3260ff003532c8138a81a57091bdaa0 (patch) | |
tree | d4e69b5725fe73c14f633e8b9f5c84f54b438dd5 | |
parent | 23abb7d3109884fb950ee81c92f9fd62b93ffcc2 (diff) |
ac/nir: only use the new raw/struct image atomic intrinsics with LLVM 9+
They are buggy with LLVM 8 because they weren't marked as source
of divergence, see r358579.
Fixes: dd0172e865f ("radv: Use structured intrinsics instead of indexing workaround for GFX9.")"
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit 31164cf5f70caa94dba0abb93610a935e17f5af2)
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 9c21df7f4fb..b96dc7f5420 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2539,7 +2539,10 @@ static LLVMValueRef visit_image_atomic(struct ac_nir_context *ctx, params[param_count++] = LLVMBuildExtractElement(ctx->ac.builder, get_src(ctx, instr->src[1]), ctx->ac.i32_0, ""); /* vindex */ params[param_count++] = ctx->ac.i32_0; /* voffset */ - if (HAVE_LLVM >= 0x800) { + if (HAVE_LLVM >= 0x900) { + /* XXX: The new raw/struct atomic intrinsics are buggy + * with LLVM 8, see r358579. + */ params[param_count++] = ctx->ac.i32_0; /* soffset */ params[param_count++] = ctx->ac.i32_0; /* slc */ |