radv: fix restoring subpass during hw/fs color resolves

This fixes an stack-use-after-scope detect by ASAN because the
subpass is used after the loop by radv_mark_noncoherent_rb().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14317>
This commit is contained in:
Samuel Pitoiset 2021-12-28 10:38:41 +01:00 committed by Marge Bot
parent 030daf80b5
commit 7b7debe8f9
2 changed files with 4 additions and 4 deletions

View File

@ -728,9 +728,9 @@ radv_cmd_buffer_resolve_subpass_hw(struct radv_cmd_buffer *cmd_buffer)
emit_resolve(cmd_buffer, src_img, dst_img, dest_iview->vk_format, &(VkOffset2D){0, 0},
&(VkExtent2D){fb->width, fb->height});
}
radv_cmd_buffer_restore_subpass(cmd_buffer, subpass);
radv_cmd_buffer_restore_subpass(cmd_buffer, subpass);
}
radv_meta_restore(&saved_state, cmd_buffer);
}

View File

@ -1106,9 +1106,9 @@ radv_cmd_buffer_resolve_subpass_fs(struct radv_cmd_buffer *cmd_buffer)
emit_resolve(cmd_buffer, src_iview, dest_iview, &(VkOffset2D){0, 0}, &(VkOffset2D){0, 0},
&(VkExtent2D){fb->width, fb->height});
}
radv_cmd_buffer_restore_subpass(cmd_buffer, subpass);
radv_cmd_buffer_restore_subpass(cmd_buffer, subpass);
}
radv_meta_restore(&saved_state, cmd_buffer);
}