radv: set the image view aspect mask before resolves
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 17 Oct 2019 13:26:07 +0000 (15:26 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 25 Nov 2019 15:29:16 +0000 (16:29 +0100)
No functional changes, but it will be used to decompress
separate depth/stencil aspects.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_resolve.c

index d59802ba8131c333b601c49cb93eb05bf1ce33c0..8404a68ca1e3115ef6908681d1f9e203f7f40947 100644 (file)
@@ -802,7 +802,7 @@ radv_decompress_resolve_subpass_src(struct radv_cmd_buffer *cmd_buffer)
                struct radv_image *src_image = src_iview->image;
 
                VkImageResolve region = {};
-               region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+               region.srcSubresource.aspectMask = src_iview->aspect_mask;
                region.srcSubresource.mipLevel = 0;
                region.srcSubresource.baseArrayLayer = src_iview->base_layer;
                region.srcSubresource.layerCount = layer_count;
@@ -817,7 +817,7 @@ radv_decompress_resolve_subpass_src(struct radv_cmd_buffer *cmd_buffer)
                struct radv_image *src_image = src_iview->image;
 
                VkImageResolve region = {};
-               region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
+               region.srcSubresource.aspectMask = src_iview->aspect_mask;
                region.srcSubresource.mipLevel = 0;
                region.srcSubresource.baseArrayLayer = src_iview->base_layer;
                region.srcSubresource.layerCount = layer_count;