From fd83fc4bfb75b1c4d028ac3c2395ecb29f37fb53 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Tue, 23 Jul 2024 11:11:08 -0500 Subject: [PATCH] nak: Don't emit barrier ops for shared memory pre-Volta Part-of: --- src/nouveau/compiler/nak/from_nir.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nouveau/compiler/nak/from_nir.rs b/src/nouveau/compiler/nak/from_nir.rs index 253460ad4b1..411141aa0b6 100644 --- a/src/nouveau/compiler/nak/from_nir.rs +++ b/src/nouveau/compiler/nak/from_nir.rs @@ -3148,7 +3148,8 @@ impl<'a> ShaderFromNir<'a> { let sm = self.sm; let mut b = SSAInstrBuilder::new(sm, ssa_alloc); - if nb.index == 0 && self.nir.info.shared_size > 0 { + if self.sm.sm() >= 70 && nb.index == 0 && self.nir.info.shared_size > 0 + { // The blob seems to always do a BSYNC before accessing shared // memory. Perhaps this is to ensure that our allocation is // actually available and not in use by another thread?