diff --git a/src/xenia/base/profiling.cc b/src/xenia/base/profiling.cc index b078e18a9..c1d474b01 100644 --- a/src/xenia/base/profiling.cc +++ b/src/xenia/base/profiling.cc @@ -236,7 +236,6 @@ void Profiler::set_window(ui::Window* window) { void Profiler::Present() { SCOPE_profile_cpu_f("internal"); - MicroProfileFlip(); #if XE_OPTION_PROFILING_UI if (!window_ || !drawer_) { return; @@ -247,6 +246,8 @@ void Profiler::Present() { #endif // XE_OPTION_PROFILING_UI } +void Profiler::Flip() { MicroProfileFlip(); } + #else bool Profiler::is_enabled() { return false; } diff --git a/src/xenia/base/profiling.h b/src/xenia/base/profiling.h index 15b1778ec..79d3338c7 100644 --- a/src/xenia/base/profiling.h +++ b/src/xenia/base/profiling.h @@ -168,6 +168,8 @@ class Profiler { static ui::MicroprofileDrawer* drawer() { return drawer_.get(); } // Presents the profiler to the bound display, if any. static void Present(); + // Starts a new frame on the profiler + static void Flip(); private: static ui::Window* window_; diff --git a/src/xenia/gpu/command_processor.cc b/src/xenia/gpu/command_processor.cc index f646c8351..e3b8504b7 100644 --- a/src/xenia/gpu/command_processor.cc +++ b/src/xenia/gpu/command_processor.cc @@ -693,6 +693,8 @@ bool CommandProcessor::ExecutePacketType3_XE_SWAP(RingBuffer* reader, XELOGI("XE_SWAP"); + Profiler::Flip(); + // Xenia-specific VdSwap hook. // VdSwap will post this to tell us we need to swap the screen/fire an // interrupt.