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.
This commit is contained in:
Lioncash
2019-02-15 22:05:17 -05:00
parent 99da6362c4
commit a8fa5019b5
9 changed files with 49 additions and 23 deletions

View File

@ -17,6 +17,10 @@
#include "video_core/memory_manager.h"
#include "video_core/textures/texture.h"
namespace Core {
class System;
}
namespace VideoCore {
class RasterizerInterface;
}
@ -28,7 +32,8 @@ namespace Tegra::Engines {
class Maxwell3D final {
public:
explicit Maxwell3D(VideoCore::RasterizerInterface& rasterizer, MemoryManager& memory_manager);
explicit Maxwell3D(Core::System& system, VideoCore::RasterizerInterface& rasterizer,
MemoryManager& memory_manager);
~Maxwell3D() = default;
/// Register structure of the Maxwell3D engine.
@ -1131,6 +1136,8 @@ public:
private:
void InitializeRegisterDefaults();
Core::System& system;
VideoCore::RasterizerInterface& rasterizer;
/// Start offsets of each macro in macro_memory