summaryrefslogtreecommitdiff
path: root/src/core/hw/gpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hw/gpu.cpp')
-rw-r--r--src/core/hw/gpu.cpp8
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
89MICROPROFILE_DEFINE(GPU_DisplayTransfer, "GPU", "DisplayTransfer", MP_RGB(100, 100, 255));
90MICROPROFILE_DEFINE(GPU_CmdlistProcessing, "GPU", "Cmdlist Processing", MP_RGB(100, 255, 100));
91
88template <typename T> 92template <typename T>
89inline void Write(u32 addr, const T data) { 93inline 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) {