From 0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Mon, 17 Aug 2015 18:25:21 -0300 Subject: Integrate the MicroProfile profiling library This brings goodies such as a configurable user interface and multi-threaded timeline view. --- src/core/hw/gpu.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/hw/gpu.cpp') diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 68ae38289..bc7bde903 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp @@ -9,6 +9,7 @@ #include "common/color.h" #include "common/common_types.h" #include "common/logging/log.h" +#include "common/microprofile.h" #include "common/vector_math.h" #include "core/settings.h" @@ -85,6 +86,9 @@ static Math::Vec4 DecodePixel(Regs::PixelFormat input_format, const u8* src_ } } +MICROPROFILE_DEFINE(GPU_DisplayTransfer, "GPU", "DisplayTransfer", MP_RGB(100, 100, 255)); +MICROPROFILE_DEFINE(GPU_CmdlistProcessing, "GPU", "Cmdlist Processing", MP_RGB(100, 255, 100)); + template inline void Write(u32 addr, const T data) { addr -= HW::VADDR_GPU; @@ -150,6 +154,8 @@ inline void Write(u32 addr, const T data) { case GPU_REG_INDEX(display_transfer_config.trigger): { + MICROPROFILE_SCOPE(GPU_DisplayTransfer); + const auto& config = g_regs.display_transfer_config; if (config.trigger & 1) { @@ -344,6 +350,8 @@ inline void Write(u32 addr, const T data) { const auto& config = g_regs.command_processor_config; if (config.trigger & 1) { + MICROPROFILE_SCOPE(GPU_CmdlistProcessing); + u32* buffer = (u32*)Memory::GetPhysicalPointer(config.GetPhysicalAddress()); if (Pica::g_debug_context && Pica::g_debug_context->recorder) { -- cgit v1.2.3