diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-08-17 18:25:21 -0300 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-08-24 22:16:28 -0300 |
commit | 0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237 (patch) | |
tree | a1651d48113413e2de1e6e309362511b1ff7ffa8 /src/core/hw/gpu.cpp | |
parent | c7745408f77a17771c1a26efb981d79aa66c9f66 (diff) |
Integrate the MicroProfile profiling library
This brings goodies such as a configurable user interface and
multi-threaded timeline view.
Diffstat (limited to 'src/core/hw/gpu.cpp')
-rw-r--r-- | src/core/hw/gpu.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 68ae38289f..bc7bde903a 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<u8> 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 <typename T> 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) { |