aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2026-02-09 21:21:14 +0100
committercrueter <crueter@eden-emu.dev>2026-02-09 21:21:14 +0100
commit0f8b35c4cd0f8d09b38edc52b006472cd98540fc (patch)
treeb9594100f672c018bb79af84d7a8bc6effba4f3c
parent866881d0e36721f52ce3d788c2a33c28ad1fcaeb (diff)
[vk, macos] fix missing VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT sType (#3510)
sType wasn't properly set for the creationInfo struct (was init to 0) Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3510 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: DraVee <dravee@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
-rw-r--r--src/video_core/vulkan_common/vulkan_surface.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/video_core/vulkan_common/vulkan_surface.cpp b/src/video_core/vulkan_common/vulkan_surface.cpp
index f1b56cc0a8..dc65d3960a 100644
--- a/src/video_core/vulkan_common/vulkan_surface.cpp
+++ b/src/video_core/vulkan_common/vulkan_surface.cpp
@@ -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 2020 yuzu Emulator Project
@@ -32,13 +32,15 @@ vk::SurfaceKHR CreateSurface(
}
#elif defined(__APPLE__)
if (window_info.type == Core::Frontend::WindowSystemType::Cocoa) {
- const VkMetalSurfaceCreateInfoEXT macos_ci = {
+ const VkMetalSurfaceCreateInfoEXT metal_ci = {
+ .sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT,
+ .pNext = nullptr,
+ .flags = 0,
.pLayer = static_cast<const CAMetalLayer*>(window_info.render_surface),
};
- const auto vkCreateMetalSurfaceEXT = reinterpret_cast<PFN_vkCreateMetalSurfaceEXT>(
- dld.vkGetInstanceProcAddr(*instance, "vkCreateMetalSurfaceEXT"));
+ const auto vkCreateMetalSurfaceEXT = reinterpret_cast<PFN_vkCreateMetalSurfaceEXT>(dld.vkGetInstanceProcAddr(*instance, "vkCreateMetalSurfaceEXT"));
if (!vkCreateMetalSurfaceEXT ||
- vkCreateMetalSurfaceEXT(*instance, &macos_ci, nullptr, &unsafe_surface) != VK_SUCCESS) {
+ vkCreateMetalSurfaceEXT(*instance, &metal_ci, nullptr, &unsafe_surface) != VK_SUCCESS) {
LOG_ERROR(Render_Vulkan, "Failed to initialize Metal surface");
throw vk::Exception(VK_ERROR_INITIALIZATION_FAILED);
}