[Mesa-stable] [PATCH 2/3] nir/spirv: Use the correct sources for CompareExchange on images

Jason Ekstrand jason at jlekstrand.net
Tue Sep 6 22:17:15 UTC 2016


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 at jlekstrand.net>
Cc: "12.0" <mesa-stable at lists.freedesktop.org>
---
 src/compiler/spirv/spirv_to_nir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 4c0c794..0d6a70e 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:
-- 
2.5.0.400.gff86faf



More information about the mesa-stable mailing list