radv: make sure to not clear the ds attachment after resolves
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 6 Nov 2019 12:55:08 +0000 (13:55 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 15 Nov 2019 08:36:43 +0000 (09:36 +0100)
To not overwrite the resolve if there is pending clear aspects,
same as color resolves.

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

index ea3d26c8d4c83cdabac4b3a419093eef8ada7ec5..d59802ba8131c333b601c49cb93eb05bf1ce33c0 100644 (file)
@@ -649,6 +649,9 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer)
                struct radv_image_view *dst_iview =
                        cmd_buffer->state.attachments[dst_att.attachment].iview;
 
+               /* Make sure to not clear the depth/stencil attachment after resolves. */
+               cmd_buffer->state.attachments[dst_att.attachment].pending_clear_aspects = 0;
+
                radv_pick_resolve_method_images(cmd_buffer->device,
                                                src_iview->image,
                                                src_iview->vk_format,