freedreno/ir3: fix the param order of cmpxchg
authorHyunjun Ko <zzoon@igalia.com>
Fri, 7 Sep 2018 08:11:45 +0000 (17:11 +0900)
committerRob Clark <robdclark@gmail.com>
Thu, 27 Sep 2018 20:05:49 +0000 (16:05 -0400)
commitaef410f31ed9a36275d4a66c1578ca48b6f8d0eb
treefdcac4b3bef3706ef8398fde6748fa3b2bab074a
parent49d22c2dfcebb794a0bc7d481ac11f8817e214b6
freedreno/ir3: fix the param order of cmpxchg

According to the following definition,
int AtomicCompSwap(inout int mem, uint compare, uint data);

the preceding one in atomic_comp_swap of NIR is compare and data is
followed, while src0 for cmpxchg needs vec2(data, compare)
So for ssbo/image deref comp_swap, that should be reversed.

Fixes: dEQP-GLES31.functional.image_load_store.*.atomic.comp_swap*
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c