ac/nir: fix tess factor optimization when workgroup barriers are reduced
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: b49eab68a8 ("ac/nir: use s_sendmsg(HS_TESSFACTOR) to optimize writing tess factors for gfx11")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12632
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33645>
This commit is contained in:
@@ -832,9 +832,10 @@ hs_msg_group_vote_use_memory(nir_builder *b, lower_tess_io_state *st,
|
||||
nir_pop_if(&top_b, thread0);
|
||||
|
||||
/* Insert a barrier to wait for initialization above if there hasn't been any other barrier
|
||||
* in the shader.
|
||||
* in the shader. If tcs_out_patch_fits_subgroup=true, then TCS barriers don't have a scope
|
||||
* larger than a subgroup.
|
||||
*/
|
||||
if (!st->tcs_info.always_executes_barrier) {
|
||||
if (!st->tcs_info.always_executes_barrier || st->tcs_out_patch_fits_subgroup) {
|
||||
nir_barrier(b, .execution_scope = SCOPE_WORKGROUP, .memory_scope = SCOPE_WORKGROUP,
|
||||
.memory_semantics = NIR_MEMORY_ACQ_REL, .memory_modes = nir_var_mem_shared);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user