diff options
| author | bunnei <bunneidev@gmail.com> | 2016-12-18 21:15:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-18 21:15:24 -0500 |
| commit | a50f5b47467c823ac195dd328ba4dc4634259e24 (patch) | |
| tree | 232894ae24bb16688f6e5f480baf9168e72edc62 /src/video_core/command_processor.cpp | |
| parent | 9a26d8ac0a7064c6031a02bb8bfa42b019c754d5 (diff) | |
| parent | eb75205231a071ca5ded72e1cd58a0e20a03f320 (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.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 04de3e6b10..4083752309 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, |
