spirv: Properly handle SpvOpAtomicCompareExchangeWeak
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 30 Apr 2019 00:07:01 +0000 (17:07 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 30 Apr 2019 02:02:44 +0000 (19:02 -0700)
commit1fb663063694f191c30757af677ebfba76aace33
treed6ed2187dc19e1aa692ac095a8c52bc84d329ac6
parentcc6bbf6397d7984ecbba7a81e4d875eee1c2b6e8
spirv: Properly handle SpvOpAtomicCompareExchangeWeak

The code was handling the Weak variant in some cases, but missing
others, e.g. the get_deref_nir_atomic_op.  Add all the missing cases
with the same behavior of the non-Weak SpvOpAtomicCompareExchange.

Note that the Weak variant is basically an alias, as SPIR-V 1.3,
Revision 7 says

    "OpAtomicCompareExchangeWeak

    Deprecated (use OpAtomicCompareExchange).

    Has the same semantics as OpAtomicCompareExchange."

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/spirv_to_nir.c