OSDN Git Service

intel/nir: Add a memory barrier before barrier()
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 7 Jan 2020 19:20:10 +0000 (13:20 -0600)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 8 Jan 2020 19:29:17 +0000 (11:29 -0800)
commit28cba736ce34127024e675881b9230ef568ddf4b
tree07a89833a23b457acc5714557cce79a5b04eb1f8
parentc63d04cb57002c636b65cdc5989c0b8aeb5dfe8b
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>
(cherry picked from commit 803fad43c3f9a89f0d8409bd33280b5457b104c7)
src/intel/compiler/brw_nir_lower_cs_intrinsics.c