diff options
author | Jason Ekstrand <[email protected]> | 2016-09-06 15:13:42 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-09-06 17:08:13 -0700 |
commit | f2a10937d8024cce25da2f4b764b2b8a61d6398e (patch) | |
tree | d8ba7e93eb2129c7bf56e6b501e95c70d05e13b3 /src/compiler/spirv | |
parent | 0ead7bef6b24add7bf0119f8d5f63e4ff806ec72 (diff) |
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 <[email protected]>
Cc: "12.0" <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 4c0c794f62c..0d6a70e4660 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -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: |