+ if (subpass->ds_resolve_attachment) {
+ struct radv_subpass_attachment src_att = *subpass->depth_stencil_attachment;
+ struct radv_subpass_attachment dst_att = *subpass->ds_resolve_attachment;
+ struct radv_image_view *src_iview =
+ cmd_buffer->state.attachments[src_att.attachment].iview;
+ 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,
+ dst_iview->image,
+ dst_att.layout,
+ dst_att.in_render_loop,
+ cmd_buffer,
+ &resolve_method);
+
+ if ((src_iview->aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) &&
+ subpass->depth_resolve_mode != VK_RESOLVE_MODE_NONE_KHR) {
+ if (resolve_method == RESOLVE_FRAGMENT) {
+ radv_depth_stencil_resolve_subpass_fs(cmd_buffer,
+ VK_IMAGE_ASPECT_DEPTH_BIT,
+ subpass->depth_resolve_mode);
+ } else {
+ assert(resolve_method == RESOLVE_COMPUTE);
+ radv_depth_stencil_resolve_subpass_cs(cmd_buffer,
+ VK_IMAGE_ASPECT_DEPTH_BIT,
+ subpass->depth_resolve_mode);
+ }
+ }
+
+ if ((src_iview->aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) &&
+ subpass->stencil_resolve_mode != VK_RESOLVE_MODE_NONE_KHR) {
+ if (resolve_method == RESOLVE_FRAGMENT) {
+ radv_depth_stencil_resolve_subpass_fs(cmd_buffer,
+ VK_IMAGE_ASPECT_STENCIL_BIT,
+ subpass->stencil_resolve_mode);
+ } else {
+ assert(resolve_method == RESOLVE_COMPUTE);
+ radv_depth_stencil_resolve_subpass_cs(cmd_buffer,
+ VK_IMAGE_ASPECT_STENCIL_BIT,
+ subpass->stencil_resolve_mode);
+ }
+ }
+ }
+
+ if (!subpass->has_color_resolve)