yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

vulkan_surface: Pass only window info for surface creation

We don't need the whole EmuWindow when creating a surface,
and it creates onerous requirements outside of typical usage for
creating a surface elsewhere.
This commit is contained in:
lat9nq 2023-05-01 20:25:53 -04:00
parent 2528cf7c54
commit c6c11c1553
3 changed files with 7 additions and 10 deletions

View File

@ -88,7 +88,7 @@ RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_,
instance(CreateInstance(library, dld, VK_API_VERSION_1_1, render_window.GetWindowInfo().type, instance(CreateInstance(library, dld, VK_API_VERSION_1_1, render_window.GetWindowInfo().type,
Settings::values.renderer_debug.GetValue())), Settings::values.renderer_debug.GetValue())),
debug_callback(Settings::values.renderer_debug ? CreateDebugCallback(instance) : nullptr), debug_callback(Settings::values.renderer_debug ? CreateDebugCallback(instance) : nullptr),
surface(CreateSurface(instance, render_window)), surface(CreateSurface(instance, render_window.GetWindowInfo())),
device(CreateDevice(instance, dld, *surface)), memory_allocator(device, false), device(CreateDevice(instance, dld, *surface)), memory_allocator(device, false),
state_tracker(), scheduler(device, state_tracker), state_tracker(), scheduler(device, state_tracker),
swapchain(*surface, device, scheduler, render_window.GetFramebufferLayout().width, swapchain(*surface, device, scheduler, render_window.GetFramebufferLayout().width,

View File

@ -23,10 +23,10 @@
namespace Vulkan { namespace Vulkan {
vk::SurfaceKHR CreateSurface(const vk::Instance& instance, vk::SurfaceKHR CreateSurface(
const Core::Frontend::EmuWindow& emu_window) { const vk::Instance& instance,
[[maybe_unused]] const Core::Frontend::EmuWindow::WindowSystemInfo& window_info) {
[[maybe_unused]] const vk::InstanceDispatch& dld = instance.Dispatch(); [[maybe_unused]] const vk::InstanceDispatch& dld = instance.Dispatch();
[[maybe_unused]] const auto& window_info = emu_window.GetWindowInfo();
VkSurfaceKHR unsafe_surface = nullptr; VkSurfaceKHR unsafe_surface = nullptr;
#ifdef _WIN32 #ifdef _WIN32

View File

@ -3,15 +3,12 @@
#pragma once #pragma once
#include "core/frontend/emu_window.h"
#include "video_core/vulkan_common/vulkan_wrapper.h" #include "video_core/vulkan_common/vulkan_wrapper.h"
namespace Core::Frontend {
class EmuWindow;
}
namespace Vulkan { namespace Vulkan {
[[nodiscard]] vk::SurfaceKHR CreateSurface(const vk::Instance& instance, [[nodiscard]] vk::SurfaceKHR CreateSurface(
const Core::Frontend::EmuWindow& emu_window); const vk::Instance& instance, const Core::Frontend::EmuWindow::WindowSystemInfo& window_info);
} // namespace Vulkan } // namespace Vulkan