diff options
author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2020-09-10 04:28:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 04:28:54 +0200 |
commit | 663ea382dae4b0a8d958753fb370416b1602c55e (patch) | |
tree | 74db3117e649cb5ae1a265c69f68d2bb03b9d542 /src/video_core/renderer_vulkan/renderer_vulkan.cpp | |
parent | Merge pull request #4635 from lioncash/gc-adap (diff) | |
parent | video_core: Remove all Core::System references in renderer (diff) | |
download | yuzu-663ea382dae4b0a8d958753fb370416b1602c55e.tar yuzu-663ea382dae4b0a8d958753fb370416b1602c55e.tar.gz yuzu-663ea382dae4b0a8d958753fb370416b1602c55e.tar.bz2 yuzu-663ea382dae4b0a8d958753fb370416b1602c55e.tar.lz yuzu-663ea382dae4b0a8d958753fb370416b1602c55e.tar.xz yuzu-663ea382dae4b0a8d958753fb370416b1602c55e.tar.zst yuzu-663ea382dae4b0a8d958753fb370416b1602c55e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index ae46e0444..0e4583986 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -86,7 +86,7 @@ Common::DynamicLibrary OpenVulkanLibrary() { if (!library.Open(filename.c_str())) { // Android devices may not have libvulkan.so.1, only libvulkan.so. filename = Common::DynamicLibrary::GetVersionedFilename("vulkan"); - library.Open(filename.c_str()); + (void)library.Open(filename.c_str()); } #endif return library; @@ -237,10 +237,12 @@ std::string BuildCommaSeparatedExtensions(std::vector<std::string> available_ext } // Anonymous namespace -RendererVulkan::RendererVulkan(Core::System& system_, Core::Frontend::EmuWindow& emu_window, - Tegra::GPU& gpu_, +RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_, + Core::Frontend::EmuWindow& emu_window, + Core::Memory::Memory& cpu_memory_, Tegra::GPU& gpu_, std::unique_ptr<Core::Frontend::GraphicsContext> context) - : RendererBase{emu_window, std::move(context)}, system{system_}, gpu{gpu_} {} + : RendererBase{emu_window, std::move(context)}, telemetry_session{telemetry_session_}, + cpu_memory{cpu_memory_}, gpu{gpu_} {} RendererVulkan::~RendererVulkan() { ShutDown(); @@ -304,15 +306,15 @@ bool RendererVulkan::Init() { swapchain = std::make_unique<VKSwapchain>(*surface, *device); swapchain->Create(framebuffer.width, framebuffer.height, false); - state_tracker = std::make_unique<StateTracker>(system); + state_tracker = std::make_unique<StateTracker>(gpu); scheduler = std::make_unique<VKScheduler>(*device, *resource_manager, *state_tracker); - rasterizer = std::make_unique<RasterizerVulkan>(system, render_window, screen_info, *device, - *resource_manager, *memory_manager, - *state_tracker, *scheduler); + rasterizer = std::make_unique<RasterizerVulkan>( + render_window, gpu, gpu.MemoryManager(), cpu_memory, screen_info, *device, + *resource_manager, *memory_manager, *state_tracker, *scheduler); - blit_screen = std::make_unique<VKBlitScreen>(system, render_window, *rasterizer, *device, + blit_screen = std::make_unique<VKBlitScreen>(cpu_memory, render_window, *rasterizer, *device, *resource_manager, *memory_manager, *swapchain, *scheduler, screen_info); @@ -440,8 +442,7 @@ void RendererVulkan::Report() const { LOG_INFO(Render_Vulkan, "Device: {}", model_name); LOG_INFO(Render_Vulkan, "Vulkan: {}", api_version); - auto& telemetry_session = system.TelemetrySession(); - constexpr auto field = Common::Telemetry::FieldType::UserSystem; + static constexpr auto field = Common::Telemetry::FieldType::UserSystem; telemetry_session.AddField(field, "GPU_Vendor", vendor_name); telemetry_session.AddField(field, "GPU_Model", model_name); telemetry_session.AddField(field, "GPU_Vulkan_Driver", driver_name); |