aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan/vk_swapchain.h
diff options
context:
space:
mode:
authorBriar <205427297+icy-briar@users.noreply.github.com>2025-05-02 18:42:58 +0000
committerCamilleLaVey <camillelavey@noreply.localhost>2025-05-02 18:42:58 +0000
commit559eb0a488b651397802066878aebdbd65b42baf (patch)
tree49a8295dabe49f0419bc2508fcff6a622f1f30cb /src/video_core/renderer_vulkan/vk_swapchain.h
parentcb8f449dca521a5625d012d5e8ec4ea5b2138f83 (diff)
renderer_vulkan: Use raw surface handles and improve release logic (#75)
Should fix or at least lessen the crashes when leaving runtime emulation on both Android / PC Also, may have improved the time required to leave the game Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/75 Co-authored-by: Briar <205427297+icy-briar@users.noreply.github.com> Co-committed-by: Briar <205427297+icy-briar@users.noreply.github.com>
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_swapchain.h')
-rw-r--r--src/video_core/renderer_vulkan/vk_swapchain.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.h b/src/video_core/renderer_vulkan/vk_swapchain.h
index d264f06e41..f5090c27f4 100644
--- a/src/video_core/renderer_vulkan/vk_swapchain.h
+++ b/src/video_core/renderer_vulkan/vk_swapchain.h
@@ -8,6 +8,8 @@
#include "common/common_types.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
+struct VkSurfaceKHR_T;
+
namespace Layout {
struct FramebufferLayout;
}
@@ -19,12 +21,12 @@ class Scheduler;
class Swapchain {
public:
- explicit Swapchain(VkSurfaceKHR surface, const Device& device, Scheduler& scheduler, u32 width,
+ explicit Swapchain(VkSurfaceKHR_T* surface_handle, const Device& device, Scheduler& scheduler, u32 width,
u32 height);
~Swapchain();
/// Creates (or recreates) the swapchain with a given size.
- void Create(VkSurfaceKHR surface, u32 width, u32 height);
+ void Create(VkSurfaceKHR_T* surface_handle, u32 width, u32 height);
/// Acquires the next image in the swapchain, waits as needed.
bool AcquireNextImage();
@@ -108,7 +110,7 @@ private:
bool NeedsPresentModeUpdate() const;
- VkSurfaceKHR surface;
+ VkSurfaceKHR_T* surface_handle;
const Device& device;
Scheduler& scheduler;