Module: Mesa
Branch: master
Commit: 895e10d2dbc9b0efcb97f8232948f780a32c1524
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=895e10d2dbc9b0efcb97f8232948f780a32c1524

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Apr 18 09:06:49 2019 +0200

ac/nir: only use the new raw/struct SSBO atomic intrinsics with LLVM 9+

They are buggy with older LLVM version, see r358579.

Fixes: 78c551aca1c ("ac/nir: use new LLVM 8 intrinsics for SSBO atomics except 
cmpswap")
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>

---

 src/amd/common/ac_nir_to_llvm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index fcd75903088..30e5cc8c389 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1692,8 +1692,11 @@ static LLVMValueRef visit_atomic_ssbo(struct 
ac_nir_context *ctx,
                                                  get_src(ctx, instr->src[0]),
                                                  true);
 
-       if (HAVE_LLVM >= 0x800 &&
+       if (HAVE_LLVM >= 0x900 &&
            instr->intrinsic != nir_intrinsic_ssbo_atomic_comp_swap) {
+               /* XXX: The new raw/struct atomic intrinsics are buggy with
+                * LLVM 8, see r358579.
+                */
                params[arg_count++] = get_src(ctx, instr->src[1]); /* voffset */
                params[arg_count++] = ctx->ac.i32_0; /* soffset */
                params[arg_count++] = ctx->ac.i32_0; /* slc */

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to