[Mesa-stable] [PATCH] radv: perform subpass transitions for resolve attachments

Rhys Perry pendingchaos02 at gmail.com
Fri Nov 16 14:45:07 UTC 2018


Fixes Sascha Willems's multisampling example on my Vega 64.

dEQP-VK.renderpass.multisample_resolve.* didn't exhibit issues
because of it's images being 32x32 which disabled DCC/CMASK and
made these transitions unnecessary.

Signed-of-by: Rhys Perry <pendingchaos02 at gmail.com>
CC: <mesa-stable at lists.freedesktop.org>
---
 src/amd/vulkan/radv_cmd_buffer.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index ee5373950f..ab1ed8173e 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2271,6 +2271,12 @@ radv_cmd_buffer_set_subpass(struct radv_cmd_buffer *cmd_buffer,
 				                                     subpass->color_attachments[i]);
 		}
 
+		for (unsigned i = 0; subpass->has_resolve && i < subpass->color_count; ++i) {
+			if (subpass->resolve_attachments[i].attachment != VK_ATTACHMENT_UNUSED)
+				radv_handle_subpass_image_transition(cmd_buffer,
+				                                     subpass->resolve_attachments[i]);
+		}
+
 		for (unsigned i = 0; i < subpass->input_count; ++i) {
 			radv_handle_subpass_image_transition(cmd_buffer,
 							subpass->input_attachments[i]);
-- 
2.19.1



More information about the mesa-stable mailing list