aco: don't skip VS->TCS barrier if TCS output vertices doesn't match input

TCS invocations correspond to output patch vertices, not input. If they
differ, TCS invocations can be in a different subgroup than VS invocations
of the input patch.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6564
Fixes: 152092b8ea ("aco: skip s_barrier if TCS patches are within subgroup")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17174>
This commit is contained in:
Rhys Perry
2022-06-21 18:34:44 +01:00
committed by Marge Bot
parent d4ce845a8d
commit 6fc2622abd
@@ -11554,7 +11554,8 @@ select_program(Program* program, unsigned shader_count, struct nir_shader* const
if (!ngg_gs && !tcs_skip_barrier) {
sync_scope scope =
ctx.stage == vertex_tess_control_hs &&
program->wave_size % ctx.options->key.tcs.tess_input_vertices == 0
program->wave_size % ctx.options->key.tcs.tess_input_vertices == 0 &&
ctx.options->key.tcs.tess_input_vertices == nir->info.tess.tcs_vertices_out
? scope_subgroup
: scope_workgroup;
bld.barrier(aco_opcode::p_barrier,