[3/3] ac/nir: use the new raw/struct SSBO atomic intrisics for comp_swap

Submitted by Samuel Pitoiset on April 18, 2019, 7:23 a.m.

Details

Message ID 20190418072357.11837-3-samuel.pitoiset@gmail.com
State Accepted
Commit 2b515a8259bc104f09e3af7a0e545f7aa659e30d
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Samuel Pitoiset April 18, 2019, 7:23 a.m.
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>
---
 src/amd/common/ac_nir_to_llvm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 30e5cc8c389..78f25b8e742 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -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.
 		 */

Comments

Series:

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>

On 18/4/19 5:23 pm, Samuel Pitoiset wrote:
> 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>
> ---
>   src/amd/common/ac_nir_to_llvm.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 30e5cc8c389..78f25b8e742 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -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.
>   		 */
>