From f0769f5d8a9d718060c59c78db5804278875b23b Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 8 Mar 2024 01:32:42 -0800 Subject: [PATCH] intel/compiler: Adjust fs_visitor::emit_cs_terminate() for Xe2 Fixes: 97bf3d3b2d4 ("intel/brw: Replace CS_OPCODE_CS_TERMINATE with SHADER_OPCODE_SEND") Signed-off-by: Jordan Justen Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_fs_visitor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp index 8efb89d1244..e80bc491f41 100644 --- a/src/intel/compiler/brw_fs_visitor.cpp +++ b/src/intel/compiler/brw_fs_visitor.cpp @@ -977,8 +977,9 @@ fs_visitor::emit_cs_terminate() * make sure it uses the appropriate register range. */ struct brw_reg g0 = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD); - fs_reg payload = fs_reg(VGRF, alloc.allocate(1), BRW_REGISTER_TYPE_UD); - ubld.group(8, 0).MOV(payload, g0); + fs_reg payload = fs_reg(VGRF, alloc.allocate(reg_unit(devinfo)), + BRW_REGISTER_TYPE_UD); + ubld.group(8 * reg_unit(devinfo), 0).MOV(payload, g0); /* Set the descriptor to "Dereference Resource" and "Root Thread" */ unsigned desc = 0; @@ -1006,7 +1007,7 @@ fs_visitor::emit_cs_terminate() */ send->sfid = devinfo->verx10 >= 125 ? BRW_SFID_MESSAGE_GATEWAY : BRW_SFID_THREAD_SPAWNER; - send->mlen = 1; + send->mlen = reg_unit(devinfo); send->eot = true; }