brw: Fix ordered dependency exec_all handling on Xe2+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

On Xe2+ the Wa_1407528679 NoMask workaround is disabled, so
baked_ordered_dependency_mode() should treat all instructions as
exec_all, matching the logic in gather_inst_dependencies() and
emit_inst_dependencies().

Without this, ordered RegDist dependencies from uniform/WE_all
producers (e.g. 'mov s0, imm') are not found during baking and
fall through as separate WE_all SYNC NOPs. Real shaders pile up
dozens of these in front of masked sends.

v2(Caio): Fix existing scalar_register test expectations

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Fixes: 47a6ef3fef ("brw/scoreboard: Use a predicate helper for the nomask workaround")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41713>
This commit is contained in:
Michael Cheng 2026-05-15 09:31:24 -07:00 committed by Marge Bot
parent 26e832d069
commit ec778a297f
2 changed files with 6 additions and 7 deletions

View file

@ -950,7 +950,8 @@ namespace {
const std::vector<dependency> &deps,
const ordered_address &jp)
{
const bool exec_all = inst->force_writemask_all;
const bool exec_all = inst->force_writemask_all ||
!needs_nomask_workaround(devinfo);
const bool has_ordered = find_ordered_dependency(deps, jp, exec_all);
const tgl_pipe ordered_pipe = ordered_dependency_swsb(deps, jp,
exec_all).pipe;

View file

@ -1125,8 +1125,7 @@ TEST_F(scoreboard_test, scalar_register_mov_immediate_is_in_scalar_pipe)
EXPECT_PROGRESS(brw_lower_scoreboard, bld);
exp.uniform().MOV(scalar, imm);
SYNC_NOP(exp )->sched = SWSB("S@1");
exp .MOV(r20, scalar);
exp .MOV(r20, scalar)->sched = SWSB("S@1");
EXPECT_SHADERS_MATCH(bld, exp);
}
@ -1148,8 +1147,7 @@ TEST_F(scoreboard_test, scalar_register_mov_grf_is_not_in_scalar_pipe)
EXPECT_PROGRESS(brw_lower_scoreboard, bld);
exp.uniform().MOV (scalar, r10);
SYNC_NOP(exp )->sched = SWSB("I@1");
exp .MOV (r20, scalar);
exp .MOV (r20, scalar)->sched = SWSB("I@1");
EXPECT_SHADERS_MATCH(bld, exp);
}
@ -1287,7 +1285,7 @@ TEST_F(scoreboard_test, implicit_dependency_inside_if)
EXPECT_SHADERS_MATCH(bld, exp);
}
TEST_F(scoreboard_test, DISABLED_xe2_uniform_writer_baked_into_masked_consumer)
TEST_F(scoreboard_test, xe2_uniform_writer_baked_into_masked_consumer)
{
set_gfx_verx10(200);
@ -1308,7 +1306,7 @@ TEST_F(scoreboard_test, DISABLED_xe2_uniform_writer_baked_into_masked_consumer)
EXPECT_SHADERS_MATCH(bld, exp);
}
TEST_F(scoreboard_test, DISABLED_xe2_uniform_writer_baked_into_masked_send)
TEST_F(scoreboard_test, xe2_uniform_writer_baked_into_masked_send)
{
set_gfx_verx10(200);