[Mesa-dev] [PATCH 5/7] radv: decompress HTILE if the resolve src image is compressed
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon May 27 15:41:48 UTC 2019
It's required to decompress HTILE before resolving with the
compute path.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_meta_resolve.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index 2d048207b7a..8891a98e4d7 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -769,6 +769,32 @@ radv_decompress_resolve_subpass_src(struct radv_cmd_buffer *cmd_buffer)
radv_decompress_resolve_src(cmd_buffer, src_image,
src_att.layout, 1, ®ion);
}
+
+ if (subpass->ds_resolve_attachment) {
+ struct radv_subpass_attachment src_att = *subpass->depth_stencil_attachment;
+ struct radv_image *src_image =
+ fb->attachments[src_att.attachment].attachment->image;
+ uint32_t queue_mask =
+ radv_image_queue_family_mask(src_image,
+ cmd_buffer->queue_family_index,
+ cmd_buffer->queue_family_index);
+
+ VkImageSubresourceRange range;
+ range.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
+ range.baseMipLevel = 0;
+ range.levelCount = 1;
+ range.baseArrayLayer = 0;
+ range.layerCount = src_image->info.array_size;
+
+ if (radv_layout_is_htile_compressed(src_image, src_att.layout,
+ queue_mask)) {
+ radv_decompress_depth_image_inplace(cmd_buffer, src_image,
+ &range);
+
+ cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_DB |
+ RADV_CMD_FLAG_FLUSH_AND_INV_DB_META;
+ }
+ }
}
/**
--
2.21.0
More information about the mesa-dev
mailing list