When VS outputs are known to be never stored in LDS, there is no
reason for HS waves to wait for all LS waves to complete. So, the
s_barrier between the LS and HS can be safely skipped.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7727>
if (i) {
Builder bld(ctx.program, ctx.block);
- if (!ngg_gs)
+ /* Skip s_barrier from TCS when VS outputs are not stored in the LDS. */
+ bool tcs_skip_barrier = ctx.stage == vertex_tess_control_hs &&
+ ctx.tcs_temp_only_inputs == nir->info.inputs_read;
+
+ if (!ngg_gs && !tcs_skip_barrier)
create_workgroup_barrier(bld);
if (ctx.stage == vertex_geometry_gs || ctx.stage == tess_eval_geometry_gs) {