From 0f8b35c4cd0f8d09b38edc52b006472cd98540fc Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 9 Feb 2026 21:21:14 +0100 Subject: [PATCH] [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 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3510 Reviewed-by: CamilleLaVey Reviewed-by: DraVee Co-authored-by: lizzie Co-committed-by: lizzie --- src/video_core/vulkan_common/vulkan_surface.cpp | 12 +++++++----- 1 file 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(window_info.render_surface), }; - const auto vkCreateMetalSurfaceEXT = reinterpret_cast( - dld.vkGetInstanceProcAddr(*instance, "vkCreateMetalSurfaceEXT")); + const auto vkCreateMetalSurfaceEXT = reinterpret_cast(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); }