diff options
author | Samuel Pitoiset <[email protected]> | 2019-05-28 10:47:12 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-05-29 08:53:46 +0200 |
commit | 017170a7859ab1a5c82e8cb5991b2bbb83d70c10 (patch) | |
tree | 1da4f21e67248d768925df8ec1c777f19877fb3b /src/amd/vulkan/radv_meta_resolve.c | |
parent | eaeaad25f78a3a6676518f54cc4d30945efd3a59 (diff) |
radv: always use view format when performing subpass resolves
It makes sense to use the image view formats when resolving
inside subpasses, while we have to use the image formats for
normal resolves.
Original patch by Philip Rebohle.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110348
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_resolve.c')
-rw-r--r-- | src/amd/vulkan/radv_meta_resolve.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c index 1544513a9bc..b4551a98637 100644 --- a/src/amd/vulkan/radv_meta_resolve.c +++ b/src/amd/vulkan/radv_meta_resolve.c @@ -439,8 +439,10 @@ void radv_CmdResolveImage( if (resolve_method == RESOLVE_COMPUTE) { radv_meta_resolve_compute_image(cmd_buffer, src_image, + src_image->vk_format, src_image_layout, dest_image, + dest_image->vk_format, dest_image_layout, region_count, regions); return; @@ -658,7 +660,8 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer) if (dest_att.attachment == VK_ATTACHMENT_UNUSED) continue; - struct radv_image *dst_img = cmd_buffer->state.framebuffer->attachments[dest_att.attachment].attachment->image; + struct radv_image_view *dest_iview = cmd_buffer->state.framebuffer->attachments[dest_att.attachment].attachment; + struct radv_image *dst_img = dest_iview->image; if (radv_image_has_dcc(dst_img)) { radv_initialize_dcc(cmd_buffer, dst_img, 0xffffffff); @@ -673,14 +676,14 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer) radv_cmd_buffer_set_subpass(cmd_buffer, &resolve_subpass); - VkResult ret = build_resolve_pipeline(cmd_buffer->device, radv_format_meta_fs_key(dst_img->vk_format)); + VkResult ret = build_resolve_pipeline(cmd_buffer->device, radv_format_meta_fs_key(dest_iview->vk_format)); if (ret != VK_SUCCESS) { cmd_buffer->record_result = ret; continue; } emit_resolve(cmd_buffer, - dst_img->vk_format, + dest_iview->vk_format, &(VkOffset2D) { 0, 0 }, &(VkExtent2D) { fb->width, fb->height }); } |