From 4816318887d63dddca16480cd953e336662324ad Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 17 Nov 2025 09:52:53 +0200 Subject: [PATCH] brw: fix workaround fence rlen field send.ugm (1|M0) r125 r0 null:0 0x0 0x0200651F {$9} // wr:1+0, rd:0; fence invalid flush type scoped to tile When destination of Send(s) is not null, the response length must not be 0. Should only affect DG2 products. Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/brw/brw_workaround.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw/brw_workaround.cpp b/src/intel/compiler/brw/brw_workaround.cpp index 7dee3c96674..44106915935 100644 --- a/src/intel/compiler/brw/brw_workaround.cpp +++ b/src/intel/compiler/brw/brw_workaround.cpp @@ -120,9 +120,11 @@ brw_workaround_memory_fence_before_eot(brw_shader &s) dummy_fence->mlen = reg_unit(s.devinfo); dummy_fence->ex_mlen = 0; dummy_fence->sfid = BRW_SFID_UGM; - dummy_fence->desc = lsc_fence_msg_desc(s.devinfo, LSC_FENCE_TILE, - LSC_FLUSH_TYPE_NONE_6, false); dummy_fence->size_written = REG_SIZE * reg_unit(s.devinfo); + dummy_fence->desc = lsc_fence_msg_desc(s.devinfo, LSC_FENCE_TILE, + LSC_FLUSH_TYPE_NONE_6, false) | + brw_message_desc(s.devinfo, dummy_fence->mlen, + dummy_fence->size_written / REG_SIZE, 0); ubld.emit(FS_OPCODE_SCHEDULING_FENCE, ubld.null_reg_ud(), dst); progress = true; /* TODO: remove this break if we ever have shader with multiple EOT. */