From 73ea60139d6837269694a37de34e73eab6eba51c Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 14 Jan 2021 18:32:16 +0100 Subject: [PATCH] radv: do not invalidate the L2 metadata cache on compute queues The flush VA space was only allocated for command buffers on the graphics queue. Also, the ZPASS_DONE event should never be emitted on compute queues because it hangs. Invalidating the L2 metadata cache is only required for coherency between the RBs and L2, so only on the graphics queue. The L2 cache is invalidated at beginning of any IBs and that should also invalidate the L2 metadata cache for compute anyways. Fixes: 4a783a3c ("radv: Use L2 coherency on GFX9+.") Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: (cherry picked from commit c6849f9687295c2711b99579a3ba9306ec3c0a30) --- .pick_status.json | 2 +- src/amd/vulkan/si_cmd_buffer.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 858a7ab776e..69d321f4cfb 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -328,7 +328,7 @@ "description": "radv: do not invalidate the L2 metadata cache on compute queues", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "4a783a3c7846857671a9f2e91b62850e24e01029" }, diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index 4ba23c5b8d2..153acac1c84 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -1507,6 +1507,7 @@ si_emit_cache_flush(struct radv_cmd_buffer *cmd_buffer) RADV_CMD_FLAG_FLUSH_AND_INV_CB_META | RADV_CMD_FLAG_FLUSH_AND_INV_DB | RADV_CMD_FLAG_FLUSH_AND_INV_DB_META | + RADV_CMD_FLAG_INV_L2_METADATA | RADV_CMD_FLAG_PS_PARTIAL_FLUSH | RADV_CMD_FLAG_VS_PARTIAL_FLUSH | RADV_CMD_FLAG_VGT_FLUSH |