aco: Skip TCS s_barrier when VS outputs are not stored in the LDS.

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>
This commit is contained in:
Timur Kristóf 2020-11-23 09:42:25 +01:00 committed by Marge Bot
parent 790144e65a
commit a9a8e05b69

View file

@ -11793,7 +11793,11 @@ void select_program(Program *program,
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) {