summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-02-21 03:24:56 +0100
committerGitHub <noreply@github.com>2019-02-21 03:24:56 +0100
commitae437320c84e8c5fff69e8cec413e63b11f952b6 (patch)
treed7f7f74d87fdaa6dd9ec829086e8c3814ae0506b /src/video_core/engines/maxwell_3d.cpp
parentFixes Unicode Key File Directories (#2120) (diff)
parentvideo_core: Remove usages of System::GetInstance() within the engines (diff)
downloadyuzu-ae437320c84e8c5fff69e8cec413e63b11f952b6.tar
yuzu-ae437320c84e8c5fff69e8cec413e63b11f952b6.tar.gz
yuzu-ae437320c84e8c5fff69e8cec413e63b11f952b6.tar.bz2
yuzu-ae437320c84e8c5fff69e8cec413e63b11f952b6.tar.lz
yuzu-ae437320c84e8c5fff69e8cec413e63b11f952b6.tar.xz
yuzu-ae437320c84e8c5fff69e8cec413e63b11f952b6.tar.zst
yuzu-ae437320c84e8c5fff69e8cec413e63b11f952b6.zip
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 86ede5faa..2d2136067 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -19,8 +19,10 @@ namespace Tegra::Engines {
/// First register id that is actually a Macro call.
constexpr u32 MacroRegistersStart = 0xE00;
-Maxwell3D::Maxwell3D(VideoCore::RasterizerInterface& rasterizer, MemoryManager& memory_manager)
- : memory_manager(memory_manager), rasterizer{rasterizer}, macro_interpreter(*this) {
+Maxwell3D::Maxwell3D(Core::System& system, VideoCore::RasterizerInterface& rasterizer,
+ MemoryManager& memory_manager)
+ : memory_manager(memory_manager), system{system}, rasterizer{rasterizer},
+ macro_interpreter(*this) {
InitializeRegisterDefaults();
}
@@ -103,7 +105,7 @@ void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) {
}
void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) {
- auto debug_context = Core::System::GetInstance().GetGPUDebugContext();
+ auto debug_context = system.GetGPUDebugContext();
// It is an error to write to a register other than the current macro's ARG register before it
// has finished execution.
@@ -317,7 +319,7 @@ void Maxwell3D::ProcessQueryGet() {
LongQueryResult query_result{};
query_result.value = result;
// TODO(Subv): Generate a real GPU timestamp and write it here instead of CoreTiming
- query_result.timestamp = Core::System::GetInstance().CoreTiming().GetTicks();
+ query_result.timestamp = system.CoreTiming().GetTicks();
Memory::WriteBlock(*address, &query_result, sizeof(query_result));
}
dirty_flags.OnMemoryWrite();
@@ -334,7 +336,7 @@ void Maxwell3D::DrawArrays() {
regs.vertex_buffer.count);
ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?");
- auto debug_context = Core::System::GetInstance().GetGPUDebugContext();
+ auto debug_context = system.GetGPUDebugContext();
if (debug_context) {
debug_context->OnEvent(Tegra::DebugContext::Event::IncomingPrimitiveBatch, nullptr);