nir/spirv: Swap the argument order for AtomicCompareExchange

SPIR-V has the two arguments in the opposite order from GLSL.  NIR uses the
GLSL order so we had them backwards.

Fixes dEQP-VK.spirv_assembly.instruction.compute.opatomic.compex

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Jason Ekstrand 2016-09-06 15:02:31 -07:00
parent edd688d986
commit 0ead7bef6b

View file

@ -1847,8 +1847,8 @@ fill_common_atomic_sources(struct vtn_builder *b, SpvOp opcode,
break;
case SpvOpAtomicCompareExchange:
src[0] = nir_src_for_ssa(vtn_ssa_value(b, w[7])->def);
src[1] = nir_src_for_ssa(vtn_ssa_value(b, w[8])->def);
src[0] = nir_src_for_ssa(vtn_ssa_value(b, w[8])->def);
src[1] = nir_src_for_ssa(vtn_ssa_value(b, w[7])->def);
break;
/* Fall through */