intel/nir: Add a memory barrier before barrier()
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 7 Jan 2020 19:20:10 +0000 (13:20 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Wed, 8 Jan 2020 03:52:19 +0000 (21:52 -0600)
commit803fad43c3f9a89f0d8409bd33280b5457b104c7
tree62077f6bc36daa0a842271ff57a1774bcd3edd23
parent7cc0702bbb955010600fcb2685edb4ba703561a8
intel/nir: Add a memory barrier before barrier()

Our barrier instruction does not implicitly do a memory fence but the
GLSL barrier() intrinsic is supposed to.  The easiest back-portable
solution is to just add the NIR barriers.  We'll sort this out more
properly in later commits.

Cc: mesa-stable@lists.freedesktop.org
Closes: #2138
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/intel/compiler/brw_nir_lower_cs_intrinsics.c