From 515d8f8e3ab4d09cedb97484500337f8439a88a0 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 27 Nov 2025 17:05:29 +0200 Subject: [PATCH] brw: fix sample mask flag emission It's also used for testing helper invocations. Signed-off-by: Lionel Landwerlin Fixes: e3328dfa2f ("brw: only initialize sample mask flag if needed") Reviewed-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/brw/brw_compile_fs.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/brw/brw_compile_fs.cpp b/src/intel/compiler/brw/brw_compile_fs.cpp index cf42ebb570f..50938464acd 100644 --- a/src/intel/compiler/brw/brw_compile_fs.cpp +++ b/src/intel/compiler/brw/brw_compile_fs.cpp @@ -1372,10 +1372,14 @@ run_fs(brw_shader &s, bool allow_spilling, bool do_rep_send) } /* We handle discards by keeping track of the still-live pixels in f0.1. - * On Xe2+, we also predicate stores with this mask. Initialize it with - * the dispatched pixels if we use discard or (on Xe2) memory stores. + * On Xe2+, we also predicate stores and test helper invocations with + * this mask. Initialize it with the dispatched pixels if we use discard + * or (on Xe2) memory stores or helper invocation testing. */ - if ((devinfo->ver >= 20 && nir->info.writes_memory) || + if ((devinfo->ver >= 20 && + (BITSET_TEST(nir->info.system_values_read, + SYSTEM_VALUE_HELPER_INVOCATION) || + nir->info.writes_memory)) || wm_prog_data->uses_kill) { const unsigned lower_width = MIN2(s.dispatch_width, 16);