[Mesa-dev] [PATCH] radv: handle dcc in explicit image resolve path.

Dave Airlie airlied at gmail.com
Tue Feb 7 22:05:20 UTC 2017


From: Dave Airlie <airlied at redhat.com>

We need to initialize dcc like we do in the subpass path.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/amd/vulkan/radv_meta_resolve.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index 66f1466..e7d47c2b 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -116,7 +116,7 @@ create_pass(struct radv_device *device)
 							       },
 							       {
 								       .attachment = 1,
-								       .layout = VK_IMAGE_LAYOUT_GENERAL,
+								       .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
 							       },
 						       },
 						       .pResolveAttachments = NULL,
@@ -428,6 +428,9 @@ void radv_CmdResolveImage(
 	if (src_image->array_size > 1)
 		radv_finishme("vkCmdResolveImage: multisample array images");
 
+	if (dest_image->surface.dcc_size) {
+		radv_initialize_dcc(cmd_buffer, dest_image, 0xffffffff);
+	}
 	for (uint32_t r = 0; r < region_count; ++r) {
 		const VkImageResolve *region = &regions[r];
 
-- 
2.7.4



More information about the mesa-dev mailing list