diff options
author | Lioncash <mathew1800@gmail.com> | 2019-02-16 04:05:17 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-02-16 04:06:23 +0100 |
commit | a8fa5019b51c9ce765124121daac863cfc1365aa (patch) | |
tree | e23b97873c1e6b4fcb34066fccb393d2a1147bb8 /src/video_core/engines/maxwell_3d.cpp | |
parent | Merge pull request #2123 from lioncash/coretiming-global (diff) | |
download | yuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.tar yuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.tar.gz yuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.tar.bz2 yuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.tar.lz yuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.tar.xz yuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.tar.zst yuzu-a8fa5019b51c9ce765124121daac863cfc1365aa.zip |
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 12 |
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); |