aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-12-14 22:01:24 -0800
committerYuri Kunde Schlesner <yuriks@yuriks.net>2016-12-14 22:06:40 -0800
commiteb75205231a071ca5ded72e1cd58a0e20a03f320 (patch)
tree4d534fd50d1094d3d3c8655cb2aa9afe9789b430 /src/video_core/command_processor.cpp
parent37ca07cd2f9cc80de33dc70001c621771c30b11a (diff)
VideoCore: Inline IsPicaTracing
Speeds up ALBW main menu slightly (~3%)
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 8a5d8533c3..018631c575 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,