radv: Use correct image layout for blit based copies.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 24 Jun 2017 18:23:44 +0000 (20:23 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 25 Jun 2017 23:24:29 +0000 (01:24 +0200)
v2: Don't pass layout to image view usage mask.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Fixes: 0628580eff6 "radv: Specify semantics of HTILE layout helpers."
src/amd/vulkan/radv_meta_blit2d.c

index aae35d2a79e3aa0bf41966afa31b6dc6d7a94983..7d12d6cb559c2f0e4160336149258729947bdd60 100644 (file)
@@ -713,8 +713,8 @@ blit2d_init_color_pipeline(struct radv_device *device,
                                                       .format = format,
                                                       .loadOp = VK_ATTACHMENT_LOAD_OP_LOAD,
                                                       .storeOp = VK_ATTACHMENT_STORE_OP_STORE,
-                                                      .initialLayout = VK_IMAGE_LAYOUT_GENERAL,
-                                                      .finalLayout = VK_IMAGE_LAYOUT_GENERAL,
+                                                      .initialLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+                                                      .finalLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
                                                       },
                                               .subpassCount = 1,
                                               .pSubpasses = &(VkSubpassDescription) {
@@ -723,12 +723,12 @@ blit2d_init_color_pipeline(struct radv_device *device,
                                                       .colorAttachmentCount = 1,
                                                       .pColorAttachments = &(VkAttachmentReference) {
                                                               .attachment = 0,
-                                                              .layout = VK_IMAGE_LAYOUT_GENERAL,
+                                                              .layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
                                                        },
                                               .pResolveAttachments = NULL,
                                               .pDepthStencilAttachment = &(VkAttachmentReference) {
                                                       .attachment = VK_ATTACHMENT_UNUSED,
-                                                      .layout = VK_IMAGE_LAYOUT_GENERAL,
+                                                      .layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
                                               },
                                               .preserveAttachmentCount = 1,
                                               .pPreserveAttachments = (uint32_t[]) { 0 },
@@ -871,8 +871,8 @@ blit2d_init_depth_only_pipeline(struct radv_device *device,
                                                               .format = 0,
                                                               .loadOp = VK_ATTACHMENT_LOAD_OP_LOAD,
                                                               .storeOp = VK_ATTACHMENT_STORE_OP_STORE,
-                                                              .initialLayout = VK_IMAGE_LAYOUT_GENERAL,
-                                                              .finalLayout = VK_IMAGE_LAYOUT_GENERAL,
+                                                              .initialLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+                                                              .finalLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
                                                       },
                                                       .subpassCount = 1,
                                                       .pSubpasses = &(VkSubpassDescription) {
@@ -883,7 +883,7 @@ blit2d_init_depth_only_pipeline(struct radv_device *device,
                                                       .pResolveAttachments = NULL,
                                                       .pDepthStencilAttachment = &(VkAttachmentReference) {
                                                               .attachment = 0,
-                                                              .layout = VK_IMAGE_LAYOUT_GENERAL,
+                                                              .layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
                                                       },
                                                       .preserveAttachmentCount = 1,
                                                       .pPreserveAttachments = (uint32_t[]) { 0 },
@@ -1026,8 +1026,8 @@ blit2d_init_stencil_only_pipeline(struct radv_device *device,
                                                               .format = 0,
                                                               .loadOp = VK_ATTACHMENT_LOAD_OP_LOAD,
                                                               .storeOp = VK_ATTACHMENT_STORE_OP_STORE,
-                                                              .initialLayout = VK_IMAGE_LAYOUT_GENERAL,
-                                                              .finalLayout = VK_IMAGE_LAYOUT_GENERAL,
+                                                              .initialLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+                                                              .finalLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
                                                       },
                                                       .subpassCount = 1,
                                                       .pSubpasses = &(VkSubpassDescription) {
@@ -1038,7 +1038,7 @@ blit2d_init_stencil_only_pipeline(struct radv_device *device,
                                                       .pResolveAttachments = NULL,
                                                       .pDepthStencilAttachment = &(VkAttachmentReference) {
                                                               .attachment = 0,
-                                                              .layout = VK_IMAGE_LAYOUT_GENERAL,
+                                                              .layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
                                                       },
                                                       .preserveAttachmentCount = 1,
                                                       .pPreserveAttachments = (uint32_t[]) { 0 },