aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-12-18 21:15:24 -0500
committerGitHub <noreply@github.com>2016-12-18 21:15:24 -0500
commit3a1eaf2efc4e5cb3358ab7451182711dfbaa061b (patch)
tree232894ae24bb16688f6e5f480baf9168e72edc62 /src/video_core/command_processor.cpp
parentdac86b61ee32d535154d69cee93cf28f01a5e7b8 (diff)
parent945f554b849360405639efb6598afa2f18de64c2 (diff)
Merge pull request #2318 from yuriks/trace-opt
VideoCore: Inline IsPicaTracing
Diffstat (limited to 'src/video_core/command_processor.cpp')
-rw-r--r--src/video_core/command_processor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index 04de3e6b1..408375230 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -59,7 +59,10 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
regs[id] = (old_value & ~write_mask) | (value & write_mask);
- DebugUtils::OnPicaRegWrite({(u16)id, (u16)mask, regs[id]});
+ // Double check for is_pica_tracing to avoid call overhead
+ if (DebugUtils::IsPicaTracing()) {
+ DebugUtils::OnPicaRegWrite({(u16)id, (u16)mask, regs[id]});
+ }
if (g_debug_context)
g_debug_context->OnEvent(DebugContext::Event::PicaCommandLoaded,