aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan/vk_swapchain.h
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2026-03-05 07:32:18 +0100
committercrueter <crueter@eden-emu.dev>2026-03-05 07:32:18 +0100
commit9a07bd0570ceba262b4a918f4927e5674b6f7269 (patch)
treeea0b393c537bb59e85adb374997a48e1a04ef8dc /src/video_core/renderer_vulkan/vk_swapchain.h
parent05f6942befe0ab1209ecc5e2ddb9716f49d65574 (diff)
[vk] unify VkSurfaceKHR with Android and the rest of platforms; remove technically incorrect nullptr() ctor for handles (#2971)
Removes some odd #ifdef-ing that just can use a shrimple opaque type. Also removes nullptr() ctor'ing for vulkan handles and such; it's not incorrect per se like how `void *p = 0;` isn't incorrect, just that, y'know, any static analyzer will go "woah". Also there isn't any guarantee that handles `sizeof(Handle) == sizeof(void*)` so may as well :) Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2971 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_swapchain.h')
-rw-r--r--src/video_core/renderer_vulkan/vk_swapchain.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.h b/src/video_core/renderer_vulkan/vk_swapchain.h
index 7e99bf8fa7..d926cc118a 100644
--- a/src/video_core/renderer_vulkan/vk_swapchain.h
+++ b/src/video_core/renderer_vulkan/vk_swapchain.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
@@ -11,8 +11,6 @@
#include "common/common_types.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
-struct VkSurfaceKHR_T;
-
namespace Layout {
struct FramebufferLayout;
}
@@ -25,11 +23,7 @@ class Scheduler;
class Swapchain {
public:
explicit Swapchain(
-#ifdef ANDROID
- VkSurfaceKHR surface,
-#else
- VkSurfaceKHR_T* surface_handle,
-#endif
+ VkSurfaceKHR_T* surface,
const Device& device,
Scheduler& scheduler,
u32 width,
@@ -38,11 +32,7 @@ public:
/// Creates (or recreates) the swapchain with a given size.
void Create(
-#ifdef ANDROID
- VkSurfaceKHR surface,
-#else
- VkSurfaceKHR_T* surface_handle,
-#endif
+ VkSurfaceKHR_T* surface,
u32 width,
u32 height);
@@ -128,11 +118,7 @@ private:
bool NeedsPresentModeUpdate() const;
-#ifdef ANDROID
- VkSurfaceKHR surface;
-#else
- VkSurfaceKHR_T* surface_handle;
-#endif
+ VkSurfaceKHR_T* surface;
const Device& device;
Scheduler& scheduler;