Module: Mesa Branch: main Commit: 9a6aa3e23a73b48d64ad556e4d1bcf72b178101d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a6aa3e23a73b48d64ad556e4d1bcf72b178101d
Author: Samuel Pitoiset <[email protected]> Date: Tue Aug 30 17:49:34 2022 +0200 aco: prevent a division by zero when patch control points is dynamic tess_input_vertices is zero if the state is dynamic. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18344> --- src/amd/compiler/aco_instruction_selection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 8904b21f7d5..9b564d68c95 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -11868,8 +11868,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 && - ctx.options->key.tcs.tess_input_vertices == nir->info.tess.tcs_vertices_out + ctx.options->key.tcs.tess_input_vertices == nir->info.tess.tcs_vertices_out && + program->wave_size % ctx.options->key.tcs.tess_input_vertices == 0 ? scope_subgroup : scope_workgroup; bld.barrier(aco_opcode::p_barrier,
