summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2015-03-07 15:30:40 +0100
committerTony Wasserka <neobrainx@gmail.com>2015-03-07 15:30:40 +0100
commit93e32bce72905ac1bd0a5e75066fda5e6b7bf250 (patch)
tree4530e9d8db22955416543899b6c0e59abf8b9732 /src/video_core
parentMerge pull request #630 from archshift/swap (diff)
parentProfiler: Implement QPCClock to get better precision on Win32 (diff)
downloadyuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar
yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.gz
yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.bz2
yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.lz
yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.xz
yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.zst
yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/command_processor.cpp6
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp12
2 files changed, 18 insertions, 0 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index 586ad62b6..e031871e8 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -4,6 +4,8 @@
#include <boost/range/algorithm/fill.hpp>
+#include "common/profiler.h"
+
#include "clipper.h"
#include "command_processor.h"
#include "math.h"
@@ -25,6 +27,8 @@ static int float_regs_counter = 0;
static u32 uniform_write_buffer[4];
+Common::Profiling::TimingCategory category_drawing("Drawing");
+
static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
if (id >= registers.NumIds())
@@ -53,6 +57,8 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
case PICA_REG_INDEX(trigger_draw):
case PICA_REG_INDEX(trigger_draw_indexed):
{
+ Common::Profiling::ScopeTimer scope_timer(category_drawing);
+
DebugUtils::DumpTevStageConfig(registers.GetTevStages());
if (g_debug_context)
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 272695174..db7538ddd 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -4,7 +4,10 @@
#include "core/hw/gpu.h"
#include "core/mem_map.h"
+
#include "common/emu_window.h"
+#include "common/profiler_reporting.h"
+
#include "video_core/video_core.h"
#include "video_core/renderer_opengl/renderer_opengl.h"
#include "video_core/renderer_opengl/gl_shader_util.h"
@@ -75,9 +78,18 @@ void RendererOpenGL::SwapBuffers() {
DrawScreens();
+ auto& profiler = Common::Profiling::GetProfilingManager();
+ profiler.FinishFrame();
+ {
+ auto aggregator = Common::Profiling::GetTimingResultsAggregator();
+ aggregator->AddFrame(profiler.GetPreviousFrameResults());
+ }
+
// Swap buffers
render_window->PollEvents();
render_window->SwapBuffers();
+
+ profiler.BeginFrame();
}
/**