summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2019-02-15 22:05:17 -0500
committerGravatar Lioncash2019-02-15 22:06:23 -0500
commita8fa5019b51c9ce765124121daac863cfc1365aa (patch)
treee23b97873c1e6b4fcb34066fccb393d2a1147bb8 /src/video_core/gpu.cpp
parentMerge pull request #2123 from lioncash/coretiming-global (diff)
downloadyuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.tar.gz
yuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.tar.xz
yuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.zip
video_core: Remove usages of System::GetInstance() within the engines
Avoids the use of the global accessor in favor of explicitly making the system a dependency within the interface.
Diffstat (limited to 'src/video_core/gpu.cpp')
-rw-r--r--src/video_core/gpu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index b86265dfe..ac30d1a89 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -28,14 +28,14 @@ u32 FramebufferConfig::BytesPerPixel(PixelFormat format) {
28 UNREACHABLE(); 28 UNREACHABLE();
29} 29}
30 30
31GPU::GPU(VideoCore::RasterizerInterface& rasterizer) { 31GPU::GPU(Core::System& system, VideoCore::RasterizerInterface& rasterizer) {
32 memory_manager = std::make_unique<Tegra::MemoryManager>(); 32 memory_manager = std::make_unique<Tegra::MemoryManager>();
33 dma_pusher = std::make_unique<Tegra::DmaPusher>(*this); 33 dma_pusher = std::make_unique<Tegra::DmaPusher>(*this);
34 maxwell_3d = std::make_unique<Engines::Maxwell3D>(rasterizer, *memory_manager); 34 maxwell_3d = std::make_unique<Engines::Maxwell3D>(system, rasterizer, *memory_manager);
35 fermi_2d = std::make_unique<Engines::Fermi2D>(rasterizer, *memory_manager); 35 fermi_2d = std::make_unique<Engines::Fermi2D>(rasterizer, *memory_manager);
36 kepler_compute = std::make_unique<Engines::KeplerCompute>(*memory_manager); 36 kepler_compute = std::make_unique<Engines::KeplerCompute>(*memory_manager);
37 maxwell_dma = std::make_unique<Engines::MaxwellDMA>(rasterizer, *memory_manager); 37 maxwell_dma = std::make_unique<Engines::MaxwellDMA>(system, rasterizer, *memory_manager);
38 kepler_memory = std::make_unique<Engines::KeplerMemory>(rasterizer, *memory_manager); 38 kepler_memory = std::make_unique<Engines::KeplerMemory>(system, rasterizer, *memory_manager);
39} 39}
40 40
41GPU::~GPU() = default; 41GPU::~GPU() = default;