mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 15:10:10 +01:00
intel/fs: Ignore SLM fences if shared is unused
Found this nugget while looking at the ACO driver. It seems sensible to avoid SLM fences if there is no SLM. This also makes the check depend on SLM usage rather than just shader stage which will be useful if we ever implement task/mesh because task shaders also have SLM. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092>
This commit is contained in:
parent
f726246297
commit
eb53d82d2d
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue