ac/nir: fix atomic compare-and-swap
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 2 Apr 2018 12:12:50 +0000 (14:12 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 20 Apr 2018 07:21:40 +0000 (09:21 +0200)
commita807a9b215d1a6db7fc51478a6bf8fa873f51f58
tree09b7b61baf08c7a52a116e9b01edc4d37c9de5b3
parente788b987d866c12af25cee641209a3a5b2d2c107
ac/nir: fix atomic compare-and-swap

The LLVM instruction returns { i32, i1 }, where the i1 indicates success.
We're only interested in the first part, which is the loaded value.

Fixes dEQP-GLES31.functional.compute.shared_var.atomic.compswap.*

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/amd/common/ac_nir_to_llvm.c