ttn: Emit scoped barriers when needed

As we start converting more backends over.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23191>
This commit is contained in:
Alyssa Rosenzweig 2023-05-23 13:41:59 -04:00 committed by Marge Bot
parent 4368365fcf
commit d3aca1a758

View file

@ -1127,7 +1127,10 @@ ttn_ucmp(nir_builder *b, nir_op op, nir_alu_dest dest, nir_ssa_def **src)
static void
ttn_barrier(nir_builder *b)
{
nir_control_barrier(b);
if (b->shader->options->use_scoped_barrier)
nir_scoped_barrier(b, .execution_scope = NIR_SCOPE_WORKGROUP);
else
nir_control_barrier(b);
}
static void