Mesa (master): spirv: Fix reaching unreachable for compare exchange on images
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Mon Jul 10 21:13:44 UTC 2017
Module: Mesa
Branch: master
Commit: b117f59710e62f4afa5781c554f8113e2b0df9cc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b117f59710e62f4afa5781c554f8113e2b0df9cc
Author: James Legg <jlegg at feralinteractive.com>
Date: Mon Jun 26 10:46:23 2017 +0100
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 at jlekstrand.net>
CC: <mesa-stable at lists.freedesktop.org>
---
src/compiler/spirv/spirv_to_nir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 8da58a7a3e..763dbf4e68 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:
More information about the mesa-commit
mailing list