summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2022-06-21 18:34:44 +0100
committerMarge Bot <emma+marge@anholt.net>2022-06-23 10:08:02 +0000
commit6fc2622abd3c4d66742437e6fd4d8757ff65d74d (patch)
tree9f4b87a69cec09331768ab418efbd2f92768bdb1
parentd4ce845a8db246b4f0f8a90dd3b654cf4dc571e2 (diff)
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: 152092b8ead ("aco: skip s_barrier if TCS patches are within subgroup") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17174>
-rw-r--r--src/amd/compiler/aco_instruction_selection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index bd027fadda6..e0a8a7b0821 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -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,