diff options
author | James Legg <[email protected]> | 2017-06-26 10:46:23 +0100 |
---|---|---|
committer | Andres Gomez <[email protected]> | 2017-07-12 19:32:10 +0300 |
commit | 8164345b77a8e1538a070796c659a07539b5ab7f (patch) | |
tree | d25f7e72bea09194791b4fec64a016afc0e38c29 | |
parent | 8d0fa95bf222153cb5c8919c93a5011e0ca59ddc (diff) |
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 <[email protected]>
CC: <[email protected]>
(cherry picked from commit b117f59710e62f4afa5781c554f8113e2b0df9cc)
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 1 |
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 1398184e84e..2a136369a76 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -1977,6 +1977,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: |