nir/spirv: Use the correct sources for CompareExchange on images

The CompareExchange operation has two "Memory Semantics" parameters instead
of one so the real arguments start at w[7] instead of w[6].

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:13:42 -07:00
parent 0ead7bef6b
commit f2a10937d8
1 changed files with 2 additions and 2 deletions

View File

@ -1749,8 +1749,8 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode,
break;
case SpvOpAtomicCompareExchange:
intrin->src[2] = nir_src_for_ssa(vtn_ssa_value(b, w[7])->def);
intrin->src[3] = nir_src_for_ssa(vtn_ssa_value(b, w[6])->def);
intrin->src[2] = nir_src_for_ssa(vtn_ssa_value(b, w[8])->def);
intrin->src[3] = nir_src_for_ssa(vtn_ssa_value(b, w[7])->def);
break;
case SpvOpAtomicISub: