ac/nir: use the new raw/struct SSBO atomic intrisics for comp_swap
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 18 Apr 2019 07:09:55 +0000 (09:09 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 19 Apr 2019 07:20:15 +0000 (09:20 +0200)
This is actually fixed now.

This change requires LLVM r358579. Make sure to have it in
your tree, otherwise the following piglit will hang:

tests/spec/arb_shader_storage_buffer_object/execution/ssbo-atomicCompSwap-int.shader_test

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/amd/common/ac_nir_to_llvm.c

index 30e5cc8c38979ec577cc747ca6cba5e74c17d50d..78f25b8e74218d5864467b00190c71baec4209aa 100644 (file)
@@ -1692,8 +1692,7 @@ static LLVMValueRef visit_atomic_ssbo(struct ac_nir_context *ctx,
                                                  get_src(ctx, instr->src[0]),
                                                  true);
 
-       if (HAVE_LLVM >= 0x900 &&
-           instr->intrinsic != nir_intrinsic_ssbo_atomic_comp_swap) {
+       if (HAVE_LLVM >= 0x900) {
                /* XXX: The new raw/struct atomic intrinsics are buggy with
                 * LLVM 8, see r358579.
                 */