brw: switch mesh/task URB fence prior to EOT to GPU

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30849>
(cherry picked from commit 93fba40389)
This commit is contained in:
Lionel Landwerlin 2024-08-26 14:43:58 +03:00 committed by Eric Engestrom
parent c6187962a2
commit cbee9e7a88
2 changed files with 13 additions and 2 deletions

View file

@ -524,7 +524,7 @@
"description": "brw: switch mesh/task URB fence prior to EOT to GPU",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -964,7 +964,18 @@ fs_visitor::emit_urb_fence()
brw_imm_ud(true),
brw_imm_ud(0));
fence->sfid = BRW_SFID_URB;
fence->desc = lsc_fence_msg_desc(devinfo, LSC_FENCE_LOCAL,
/* The logical thing here would likely be a THREADGROUP fence but that's
* still failing some tests like in dEQP-VK.mesh_shader.ext.query.*
*
* Gfx12.5 has a comment about this on BSpec 53533 :
*
* "If fence scope is Local or Threadgroup, HW ignores the flush type
* and operates as if it was set to None (no flush)"
*
* Software workaround from HSD-22014129519 indicates that a GPU fence
* resolves the issue.
*/
fence->desc = lsc_fence_msg_desc(this->devinfo, LSC_FENCE_GPU,
LSC_FLUSH_TYPE_NONE, true);
bld.exec_all().group(1, 0).emit(FS_OPCODE_SCHEDULING_FENCE,