From: Jason Ekstrand Date: Tue, 6 Sep 2016 22:02:31 +0000 (-0700) Subject: nir/spirv: Swap the argument order for AtomicCompareExchange X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ead7bef6b24add7bf0119f8d5f63e4ff806ec72;p=mesa.git 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 Cc: "12.0" Reviewed-by: Dave Airlie --- diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index fda38f91106..4c0c794f62c 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -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 */