summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar James Rowe2019-02-15 19:52:11 -0700
committerGravatar GitHub2019-02-15 19:52:11 -0700
commit99da6362c43a24c608a2790f668f10a62e3b80a6 (patch)
tree6257ac07283ebb4ea5ac622784cc7a041d48f8b1 /src/video_core
parentMerge pull request #2112 from lioncash/shadowing (diff)
parentcore_timing: Convert core timing into a class (diff)
downloadyuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.gz
yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.xz
yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.zip
Merge pull request #2123 from lioncash/coretiming-global
core_timing: De-globalize core_timing facilities
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp2
-rw-r--r--src/video_core/gpu.cpp3
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 19b6b14b2..86ede5faa 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -317,7 +317,7 @@ void Maxwell3D::ProcessQueryGet() {
317 LongQueryResult query_result{}; 317 LongQueryResult query_result{};
318 query_result.value = result; 318 query_result.value = result;
319 // TODO(Subv): Generate a real GPU timestamp and write it here instead of CoreTiming 319 // TODO(Subv): Generate a real GPU timestamp and write it here instead of CoreTiming
320 query_result.timestamp = Core::Timing::GetTicks(); 320 query_result.timestamp = Core::System::GetInstance().CoreTiming().GetTicks();
321 Memory::WriteBlock(*address, &query_result, sizeof(query_result)); 321 Memory::WriteBlock(*address, &query_result, sizeof(query_result));
322 } 322 }
323 dirty_flags.OnMemoryWrite(); 323 dirty_flags.OnMemoryWrite();
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 =
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index cca2ed708..d40666ac6 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -137,7 +137,7 @@ void RendererOpenGL::SwapBuffers(
137 137
138 render_window.PollEvents(); 138 render_window.PollEvents();
139 139
140 system.FrameLimiter().DoFrameLimiting(Core::Timing::GetGlobalTimeUs()); 140 system.FrameLimiter().DoFrameLimiting(system.CoreTiming().GetGlobalTimeUs());
141 system.GetPerfStats().BeginSystemFrame(); 141 system.GetPerfStats().BeginSystemFrame();
142 142
143 // Restore the rasterizer state 143 // Restore the rasterizer state