nak: Use barriers for re-convergence

Now that we're getting total re-convergence through barriers, we can
drop our OpWarpSyncs in front of barriers and derivatives

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
Faith Ekstrand 2023-10-25 11:13:21 -05:00 committed by Marge Bot
parent 22468439ff
commit 3468f70ca1
2 changed files with 2 additions and 3 deletions

View file

@ -922,7 +922,6 @@ impl<'a> ShaderFromNir<'a> {
assert!(alu.def.bit_size() == 32);
let scratch = b.alloc_ssa(RegFile::GPR, 1);
b.push_op(OpWarpSync { mask: u32::MAX });
b.push_op(OpShfl {
dst: scratch[0].into(),
src: srcs[0],
@ -953,7 +952,6 @@ impl<'a> ShaderFromNir<'a> {
assert!(alu.def.bit_size() == 32);
let scratch = b.alloc_ssa(RegFile::GPR, 1);
b.push_op(OpWarpSync { mask: u32::MAX });
b.push_op(OpShfl {
dst: scratch[0].into(),
src: srcs[0],
@ -1844,7 +1842,6 @@ impl<'a> ShaderFromNir<'a> {
match intrin.execution_scope() {
SCOPE_NONE => (),
SCOPE_WORKGROUP => {
b.push_op(OpWarpSync { mask: u32::MAX });
if self.nir.info.stage() == MESA_SHADER_COMPUTE {
b.push_op(OpBar {}).deps.yld = true;
}

View file

@ -790,6 +790,8 @@ nak_postprocess_nir(nir_shader *nir,
nir_divergence_analysis(nir);
OPT(nir, nak_nir_add_barriers, nak);
/* Re-index blocks and compact SSA defs because we'll use them to index
* arrays
*/