mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-01 14:59:13 +00:00
[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 <[email protected]> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3510 Reviewed-by: CamilleLaVey <[email protected]> Reviewed-by: DraVee <[email protected]> Co-authored-by: lizzie <[email protected]> Co-committed-by: lizzie <[email protected]>
This commit is contained in:
1 parent
866881d0e3
commit
0f8b35c4cd
1 file changed
+7
-5
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user