summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-05-22 14:56:01 +0200
committerSamuel Pitoiset <[email protected]>2019-06-21 14:50:27 +0200
commitc7872237bf0508413f54d18c928fb33d4dac3695 (patch)
tree0c5f4f06df065faaca8176381b98499db4a06c5b /src/amd/vulkan
parent29c4d44cee0fa72e338ebdde31e9f32961e3a5ea (diff)
radv: decompress HTILE if the resolve src image is compressed
It's required to decompress HTILE before resolving with the compute path. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_meta_resolve.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index 79d9c2c4d11..d1cfda5dc48 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -800,6 +800,22 @@ radv_decompress_resolve_subpass_src(struct radv_cmd_buffer *cmd_buffer)
radv_decompress_resolve_src(cmd_buffer, src_image,
src_att.layout, 1, &region);
}
+
+ if (subpass->ds_resolve_attachment) {
+ struct radv_subpass_attachment src_att = *subpass->depth_stencil_attachment;
+ struct radv_image_view *src_iview =
+ fb->attachments[src_att.attachment].attachment;
+ struct radv_image *src_image = src_iview->image;
+
+ VkImageResolve region = {};
+ region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
+ region.srcSubresource.mipLevel = 0;
+ region.srcSubresource.baseArrayLayer = src_iview->base_layer;
+ region.srcSubresource.layerCount = layer_count;
+
+ radv_decompress_resolve_src(cmd_buffer, src_image,
+ src_att.layout, 1, &region);
+ }
}
/**
@@ -825,7 +841,7 @@ radv_decompress_resolve_src(struct radv_cmd_buffer *cmd_buffer,
barrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
barrier.image = radv_image_to_handle(src_image);
barrier.subresourceRange = (VkImageSubresourceRange) {
- .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
+ .aspectMask = region->srcSubresource.aspectMask,
.baseMipLevel = region->srcSubresource.mipLevel,
.levelCount = 1,
.baseArrayLayer = src_base_layer,