From 47369faaabee9fa47208890ed2945e54f3251f8a Mon Sep 17 00:00:00 2001
From: ameerj <52414509+ameerj@users.noreply.github.com>
Date: Sat, 23 Oct 2021 00:15:19 -0400
Subject: [PATCH] vk_blit_screen: Fix AA destruction order

---
 .../renderer_vulkan/vk_blit_screen.h          | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.h b/src/video_core/renderer_vulkan/vk_blit_screen.h
index e8737537e..ad0cd8ee1 100644
--- a/src/video_core/renderer_vulkan/vk_blit_screen.h
+++ b/src/video_core/renderer_vulkan/vk_blit_screen.h
@@ -34,12 +34,11 @@ namespace Vulkan {
 struct ScreenInfo;
 
 class Device;
+class FSR;
 class RasterizerVulkan;
 class VKScheduler;
 class VKSwapchain;
 
-class FSR;
-
 struct VKScreenInfo {
     VkImageView image_view{};
     u32 width{};
@@ -123,7 +122,6 @@ private:
     vk::DescriptorPool descriptor_pool;
     vk::DescriptorSetLayout descriptor_set_layout;
     vk::PipelineLayout pipeline_layout;
-    vk::Pipeline aa_pipeline;
     vk::Pipeline nearest_neightbor_pipeline;
     vk::Pipeline bilinear_pipeline;
     vk::Pipeline bicubic_pipeline;
@@ -144,15 +142,18 @@ private:
     std::vector<vk::Image> raw_images;
     std::vector<vk::ImageView> raw_image_views;
     std::vector<MemoryCommit> raw_buffer_commits;
-    vk::Image aa_image;
-    vk::ImageView aa_image_view;
-    MemoryCommit aa_commit;
-    vk::Framebuffer aa_framebuffer;
-    vk::RenderPass aa_renderpass;
-    vk::DescriptorSets aa_descriptor_sets;
+
     vk::DescriptorPool aa_descriptor_pool;
     vk::DescriptorSetLayout aa_descriptor_set_layout;
     vk::PipelineLayout aa_pipeline_layout;
+    vk::Pipeline aa_pipeline;
+    vk::RenderPass aa_renderpass;
+    vk::Framebuffer aa_framebuffer;
+    vk::DescriptorSets aa_descriptor_sets;
+    vk::Image aa_image;
+    vk::ImageView aa_image_view;
+    MemoryCommit aa_commit;
+
     u32 raw_width = 0;
     u32 raw_height = 0;