spirv: Emit memory barriers for atomic operations
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 10 Sep 2019 20:21:49 +0000 (13:21 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 24 Oct 2019 18:39:56 +0000 (11:39 -0700)
commit1bb191a0d19d53785f1b69c6cd797a508378bb95
tree12681b62926e0414dda52c05ebcf88ed8b9569b0
parentd6992f996b5f7a18f9df9c720f285d05fc274173
spirv: Emit memory barriers for atomic operations

Add a helper to split the memory semantics into before and after the
operation, and use that result to emit memory barriers.

v2: Be more explicit about which bits we are keeping around when
    splitting memory semantics into a before and after.  For now
    we are ignoring Volatile.  (Jason)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_private.h