diff options
| author | 2015-08-17 18:25:21 -0300 | |
|---|---|---|
| committer | 2015-08-24 22:16:28 -0300 | |
| commit | 0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237 (patch) | |
| tree | a1651d48113413e2de1e6e309362511b1ff7ffa8 /src/core/hw/gpu.cpp | |
| parent | citra-qt: Add helper function to get a monospace QFont (diff) | |
| download | yuzu-0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237.tar.gz yuzu-0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237.tar.xz yuzu-0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237.zip | |
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 68ae38289..bc7bde903 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "common/color.h" | 9 | #include "common/color.h" |
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 12 | #include "common/microprofile.h" | ||
| 12 | #include "common/vector_math.h" | 13 | #include "common/vector_math.h" |
| 13 | 14 | ||
| 14 | #include "core/settings.h" | 15 | #include "core/settings.h" |
| @@ -85,6 +86,9 @@ static Math::Vec4<u8> DecodePixel(Regs::PixelFormat input_format, const u8* src_ | |||
| 85 | } | 86 | } |
| 86 | } | 87 | } |
| 87 | 88 | ||
| 89 | MICROPROFILE_DEFINE(GPU_DisplayTransfer, "GPU", "DisplayTransfer", MP_RGB(100, 100, 255)); | ||
| 90 | MICROPROFILE_DEFINE(GPU_CmdlistProcessing, "GPU", "Cmdlist Processing", MP_RGB(100, 255, 100)); | ||
| 91 | |||
| 88 | template <typename T> | 92 | template <typename T> |
| 89 | inline void Write(u32 addr, const T data) { | 93 | inline void Write(u32 addr, const T data) { |
| 90 | addr -= HW::VADDR_GPU; | 94 | addr -= HW::VADDR_GPU; |
| @@ -150,6 +154,8 @@ inline void Write(u32 addr, const T data) { | |||
| 150 | 154 | ||
| 151 | case GPU_REG_INDEX(display_transfer_config.trigger): | 155 | case GPU_REG_INDEX(display_transfer_config.trigger): |
| 152 | { | 156 | { |
| 157 | MICROPROFILE_SCOPE(GPU_DisplayTransfer); | ||
| 158 | |||
| 153 | const auto& config = g_regs.display_transfer_config; | 159 | const auto& config = g_regs.display_transfer_config; |
| 154 | if (config.trigger & 1) { | 160 | if (config.trigger & 1) { |
| 155 | 161 | ||
| @@ -344,6 +350,8 @@ inline void Write(u32 addr, const T data) { | |||
| 344 | const auto& config = g_regs.command_processor_config; | 350 | const auto& config = g_regs.command_processor_config; |
| 345 | if (config.trigger & 1) | 351 | if (config.trigger & 1) |
| 346 | { | 352 | { |
| 353 | MICROPROFILE_SCOPE(GPU_CmdlistProcessing); | ||
| 354 | |||
| 347 | u32* buffer = (u32*)Memory::GetPhysicalPointer(config.GetPhysicalAddress()); | 355 | u32* buffer = (u32*)Memory::GetPhysicalPointer(config.GetPhysicalAddress()); |
| 348 | 356 | ||
| 349 | if (Pica::g_debug_context && Pica::g_debug_context->recorder) { | 357 | if (Pica::g_debug_context && Pica::g_debug_context->recorder) { |