summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Legg <jlegg@feralinteractive.com>2017-06-26 10:46:23 +0100
committerJason Ekstrand <jason.ekstrand@intel.com>2017-07-10 14:13:37 -0700
commitb117f59710e62f4afa5781c554f8113e2b0df9cc (patch)
tree1a107ece29427e9a2b33cc6782523445fec82d89
parentaaee0d1bbf60de17c95c0e2bc5a905753e8deef6 (diff)
downloadmesa-b117f59710e62f4afa5781c554f8113e2b0df9cc.tar.gz
spirv: Fix reaching unreachable for compare exchange on images
We were hitting the unreachable("Invalid image opcode") near the end of vtn_handle_image when parsing the SpvOpAtomicCompareExchange opcode. v2: Add stable CC. v3: Ignore SpvOpAtomicCompareExchangeWeak. It requires the Kernel capability which is not exposed in Vulkan, and spirv_to_nir is not used for OpenCL which does support it. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> CC: <mesa-stable@lists.freedesktop.org>
-rw-r--r--src/compiler/spirv/spirv_to_nir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 8da58a7a3e0..763dbf4e681 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -2008,6 +2008,7 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode,
intrin->src[2] = nir_src_for_ssa(vtn_ssa_value(b, w[3])->def);
break;
+ case SpvOpAtomicCompareExchange:
case SpvOpAtomicIIncrement:
case SpvOpAtomicIDecrement:
case SpvOpAtomicExchange: