intel/fs: Only use SLM fence in compute shaders
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 13 Jan 2020 23:48:12 +0000 (15:48 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 14 Jan 2020 18:55:48 +0000 (10:55 -0800)
Fixes: b390ff35170 ("intel/fs: Add support for SLM fence in Gen11")
Fixes: e142061399c ("intel/fs: Implement scoped_memory_barrier")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs_nir.cpp

index c3748b503a9ed586cf660aa31a8eb3972991fc90..fca69bd184d64dd9c57a810f4a6884e15ec758f0 100644 (file)
@@ -4299,6 +4299,9 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
          }
       }
 
+      if (stage != MESA_SHADER_COMPUTE)
+         slm_fence = false;
+
       /* Be conservative in Gen11+ and always stall in a fence.  Since there
        * are two different fences, and shader might want to synchronize
        * between them.