diff options
author | Samuel Pitoiset <[email protected]> | 2018-04-13 19:14:52 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-04-16 14:21:05 +0200 |
commit | 62510846b6ed7083b384d7f5b9765aebf34b2e3a (patch) | |
tree | b05071e8110114e7f5db8d1f9cb71fa3d0ded170 | |
parent | 56a171a499c861c261c2b0821951e05fde845af6 (diff) |
radv: clean up radv_decompress_resolve_subpass_src()
To handle the source color image transitions in the same place.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Niuwenhuizen <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_meta_resolve.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c index 1828eb37f46..d66f1c9f933 100644 --- a/src/amd/vulkan/radv_meta_resolve.c +++ b/src/amd/vulkan/radv_meta_resolve.c @@ -689,18 +689,15 @@ radv_decompress_resolve_subpass_src(struct radv_cmd_buffer *cmd_buffer) dest_att.attachment == VK_ATTACHMENT_UNUSED) continue; - struct radv_image_view *src_iview = - fb->attachments[src_att.attachment].attachment; + struct radv_image *src_image = + fb->attachments[src_att.attachment].attachment->image; - VkImageSubresourceRange range; - range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - range.baseMipLevel = 0; - range.levelCount = 1; - range.baseArrayLayer = 0; - range.layerCount = 1; + VkImageResolve region = {}; + region.srcSubresource.baseArrayLayer = 0; + region.srcSubresource.mipLevel = 0; + region.srcSubresource.layerCount = 1; - radv_fast_clear_flush_image_inplace(cmd_buffer, - src_iview->image, &range); + radv_decompress_resolve_src(cmd_buffer, src_image, 1, ®ion); } } |