diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 4c1c6376a5a..5a02f48e8fd 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -4477,8 +4477,11 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr break; } - if (stage != MESA_SHADER_COMPUTE && stage != MESA_SHADER_KERNEL) + if (nir->info.shared_size > 0) { + assert(gl_shader_stage_uses_workgroup(stage)); + } else { slm_fence = false; + } /* If the workgroup fits in a single HW thread, the messages for SLM are * processed in-order and the shader itself is already synchronized so