summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-02-07 21:35:51 +0000
committerDave Airlie <[email protected]>2017-02-07 23:31:08 +0000
commit6d5d6dad20901fbffd65239937562b80c075e476 (patch)
treee6060e2604166aeb711d80662058452b8b6c1f6a /src
parent0d1283850bef7738b09c23d6a546696d653863ca (diff)
radv: handle dcc in explicit image resolve path. (v2)
We need to initialize dcc like we do in the subpass path. v2: fix initial/final layouts Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_meta_resolve.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index 66f14667898..23ca569d801 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -95,9 +95,11 @@ create_pass(struct radv_device *device)
attachments[i].samples = 1;
attachments[i].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
attachments[i].storeOp = VK_ATTACHMENT_STORE_OP_STORE;
- attachments[i].initialLayout = VK_IMAGE_LAYOUT_GENERAL;
- attachments[i].finalLayout = VK_IMAGE_LAYOUT_GENERAL;
}
+ attachments[0].initialLayout = VK_IMAGE_LAYOUT_GENERAL;
+ attachments[0].finalLayout = VK_IMAGE_LAYOUT_GENERAL;
+ attachments[1].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
+ attachments[1].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
result = radv_CreateRenderPass(device_h,
&(VkRenderPassCreateInfo) {
@@ -116,7 +118,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 +430,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];