diff options
| author | 2019-02-14 12:42:58 -0500 | |
|---|---|---|
| committer | 2019-02-15 21:50:25 -0500 | |
| commit | bd983414f643b734a1f8bebe3183723733344f72 (patch) | |
| tree | bda0421458439e25cba9d772a6a79b56e473d72e /src/video_core/gpu.cpp | |
| parent | Merge pull request #2113 from ReinUsesLisp/vulkan-base (diff) | |
| download | yuzu-bd983414f643b734a1f8bebe3183723733344f72.tar.gz yuzu-bd983414f643b734a1f8bebe3183723733344f72.tar.xz yuzu-bd983414f643b734a1f8bebe3183723733344f72.zip | |
core_timing: Convert core timing into a class
Gets rid of the largest set of mutable global state within the core.
This also paves a way for eliminating usages of GetInstance() on the
System class as a follow-up.
Note that no behavioral changes have been made, and this simply extracts
the functionality into a class. This also has the benefit of making
dependencies on the core timing functionality explicit within the
relevant interfaces.
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 3d00c308b..b86265dfe 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/assert.h" | 5 | #include "common/assert.h" |
| 6 | #include "core/core.h" | ||
| 6 | #include "core/core_timing.h" | 7 | #include "core/core_timing.h" |
| 7 | #include "core/memory.h" | 8 | #include "core/memory.h" |
| 8 | #include "video_core/engines/fermi_2d.h" | 9 | #include "video_core/engines/fermi_2d.h" |
| @@ -283,7 +284,7 @@ void GPU::ProcessSemaphoreTriggerMethod() { | |||
| 283 | block.sequence = regs.semaphore_sequence; | 284 | block.sequence = regs.semaphore_sequence; |
| 284 | // TODO(Kmather73): Generate a real GPU timestamp and write it here instead of | 285 | // TODO(Kmather73): Generate a real GPU timestamp and write it here instead of |
| 285 | // CoreTiming | 286 | // CoreTiming |
| 286 | block.timestamp = Core::Timing::GetTicks(); | 287 | block.timestamp = Core::System::GetInstance().CoreTiming().GetTicks(); |
| 287 | Memory::WriteBlock(*address, &block, sizeof(block)); | 288 | Memory::WriteBlock(*address, &block, sizeof(block)); |
| 288 | } else { | 289 | } else { |
| 289 | const auto address = | 290 | const auto address = |