Mesa (20.3): radv: Deal with unused attachments in mip flush
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Dec 1 17:45:02 UTC 2020
Module: Mesa
Branch: 20.3
Commit: ded8b21e2a47fd99187c665eaae075b79359ee10
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ded8b21e2a47fd99187c665eaae075b79359ee10
Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date: Fri Nov 27 15:07:17 2020 +0100
radv: Deal with unused attachments in mip flush
Fixes: 4cce4d22a72 ("radv: Fix a hang on CB change by adding flushes.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7813>
(cherry picked from commit aed8d30b507568b7fc0f32afca012f8def5aca16)
---
.pick_status.json | 2 +-
src/amd/vulkan/radv_cmd_buffer.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 497647f1159..7f36027f762 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1444,7 +1444,7 @@
"description": "radv: Deal with unused attachments in mip flush",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "4cce4d22a72bf84459ee95223cc7d1c6542617fb"
},
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 8cd00ad22b4..6b02bd5f433 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2257,6 +2257,9 @@ radv_emit_fb_mip_change_flush(struct radv_cmd_buffer *cmd_buffer)
for (int i = 0; i < subpass->color_count; ++i) {
int idx = subpass->color_attachments[i].attachment;
+ if (idx == VK_ATTACHMENT_UNUSED)
+ continue;
+
struct radv_image_view *iview = cmd_buffer->state.attachments[idx].iview;
if ((radv_image_has_CB_metadata(iview->image) ||
More information about the mesa-commit
mailing list