mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 19:55:46 +00:00
video_core: Remove all Core::System references in renderer
Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
This commit is contained in:
parent
5841e4ae8c
commit
8efb2c5537
53 changed files with 573 additions and 633 deletions
|
@ -21,14 +21,17 @@ namespace {
|
|||
std::unique_ptr<VideoCore::RendererBase> CreateRenderer(
|
||||
Core::System& system, Core::Frontend::EmuWindow& emu_window, Tegra::GPU& gpu,
|
||||
std::unique_ptr<Core::Frontend::GraphicsContext> context) {
|
||||
auto& telemetry_session = system.TelemetrySession();
|
||||
auto& cpu_memory = system.Memory();
|
||||
|
||||
switch (Settings::values.renderer_backend.GetValue()) {
|
||||
case Settings::RendererBackend::OpenGL:
|
||||
return std::make_unique<OpenGL::RendererOpenGL>(system, emu_window, gpu,
|
||||
std::move(context));
|
||||
return std::make_unique<OpenGL::RendererOpenGL>(telemetry_session, emu_window, cpu_memory,
|
||||
gpu, std::move(context));
|
||||
#ifdef HAS_VULKAN
|
||||
case Settings::RendererBackend::Vulkan:
|
||||
return std::make_unique<Vulkan::RendererVulkan>(system, emu_window, gpu,
|
||||
std::move(context));
|
||||
return std::make_unique<Vulkan::RendererVulkan>(telemetry_session, emu_window, cpu_memory,
|
||||
gpu, std::move(context));
|
||||
#endif
|
||||
default:
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue