diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2023-03-02 18:44:45 +0200 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2023-03-08 18:00:15 +0000 |
commit | 6693d9bf26e42f628a5f90478ae7d76fbc97b5fc (patch) | |
tree | 340d6141ec6f1759547f3bf966448eae288ffd82 | |
parent | 3c705ffac9c8b2c085e56118009bfdfeeb5933c1 (diff) | |
download | mesa-6693d9bf26e42f628a5f90478ae7d76fbc97b5fc.tar.gz |
anv: pull Wa_14016118574 out of some loop not changing state
The WA is meant to be here to apply some state that is not propagated
properly inside the HW. But if you have a loop like :
for ( ... ) {
emit(3DPRIMITIVE, some param);
}
You're not really changing any state, just push more draws into the
pipeline.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: f2645229c2 ("anv: implement Wa_14016118574")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21660>
(cherry picked from commit 6ee7a2ecfa11ba77af79583b529696de643af165)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/.pick_status.json b/.pick_status.json index 2abe49b05b2..959077c6f78 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2821,7 +2821,7 @@ "description": "anv: pull Wa_14016118574 out of some loop not changing state", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f2645229c2fa6d9c595004a8dc4ee44cebedb5fd" }, diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 82210728f86..5d98ca16c94 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -4067,13 +4067,14 @@ void genX(CmdDrawMultiEXT)( prim.StartInstanceLocation = firstInstance; prim.BaseVertexLocation = 0; } + } #if GFX_VERx10 == 125 - genX(emit_dummy_post_sync_op)(cmd_buffer, draw->vertexCount); + genX(emit_dummy_post_sync_op)(cmd_buffer, + drawCount == 0 ? 0 : + pVertexInfo[drawCount - 1].vertexCount); #endif - } - update_dirty_vbs_for_gfx8_vb_flush(cmd_buffer, SEQUENTIAL); trace_intel_end_draw_multi(&cmd_buffer->trace, count); @@ -4242,12 +4243,15 @@ void genX(CmdDrawMultiIndexedEXT)( prim.StartInstanceLocation = firstInstance; prim.BaseVertexLocation = draw->vertexOffset; } -#if GFX_VERx10 == 125 - genX(emit_dummy_post_sync_op)(cmd_buffer, draw->indexCount); -#endif } } +#if GFX_VERx10 == 125 + genX(emit_dummy_post_sync_op)(cmd_buffer, + drawCount == 0 ? 0 : + pIndexInfo[drawCount - 1].indexCount); +#endif + update_dirty_vbs_for_gfx8_vb_flush(cmd_buffer, RANDOM); trace_intel_end_draw_indexed_multi(&cmd_buffer->trace, count); |