diff options
| author | JosJuice <josjuice@gmail.com> | 2026-06-19 11:37:04 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2026-07-05 09:50:13 +0200 |
| commit | 5f372d6b1df2a6c87cf54e4f6eeb5c0e12383739 (patch) | |
| tree | 15191536089bea75cfb63a46d7716072d9d6c857 | |
| parent | d8d37fdbc487d7befe324a10b3b83e5b32f3644e (diff) | |
VideoCommon: Reduce padding in PresentInfo
This makes the struct 8 bytes smaller.
| -rw-r--r-- | Source/Core/VideoCommon/Present.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VideoEvents.h | 40 |
2 files changed, 21 insertions, 21 deletions
diff --git a/Source/Core/VideoCommon/Present.cpp b/Source/Core/VideoCommon/Present.cpp index 7c62730667..f74b9a8fa4 100644 --- a/Source/Core/VideoCommon/Present.cpp +++ b/Source/Core/VideoCommon/Present.cpp @@ -234,9 +234,9 @@ void Presenter::ImmediateSwap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_ PresentInfo present_info{ .frame_count = m_frame_count++, .present_count = m_present_count++, - .reason = PresentInfo::PresentReason::Immediate, .emulated_timestamp = ticks, .intended_present_time = m_next_swap_estimated_time, + .reason = PresentInfo::PresentReason::Immediate, }; auto& video_events = GetVideoEvents(); diff --git a/Source/Core/VideoCommon/VideoEvents.h b/Source/Core/VideoCommon/VideoEvents.h index fe30aa251b..f07ac631e4 100644 --- a/Source/Core/VideoCommon/VideoEvents.h +++ b/Source/Core/VideoCommon/VideoEvents.h @@ -16,6 +16,23 @@ class System; struct PresentInfo { + enum class PresentTimeAccuracy + { + // The Driver/OS has given us an exact timestamp of when the first line of the frame started + // scanning out to the monitor + PresentOnScreenExact, + + // An approximate timestamp of scanout. + PresentOnScreen, + + // Dolphin doesn't have visibility of the present time. But the present operation has + // been queued with the GPU driver and will happen in the near future. + PresentInProgress, + + // Not implemented + Unimplemented, + }; + enum class PresentReason { Immediate, // FIFO is Presenting the XFB immediately, straight after the XFB copy @@ -30,9 +47,6 @@ struct PresentInfo // never goes backwards. u64 present_count = 0; - // The frame is identical to the previous frame - PresentReason reason = PresentReason::Immediate; - // The exact emulated time of the when real hardware would have presented this frame u64 emulated_timestamp = 0; @@ -41,26 +55,12 @@ struct PresentInfo // AfterPresent only: The actual time the frame was presented TimePoint actual_present_time{}; - enum class PresentTimeAccuracy - { - // The Driver/OS has given us an exact timestamp of when the first line of the frame started - // scanning out to the monitor - PresentOnScreenExact, - - // An approximate timestamp of scanout. - PresentOnScreen, - - // Dolphin doesn't have visibility of the present time. But the present operation has - // been queued with the GPU driver and will happen in the near future. - PresentInProgress, - - // Not implemented - Unimplemented, - }; - // Accuracy of actual_present_time PresentTimeAccuracy present_time_accuracy = PresentTimeAccuracy::Unimplemented; + // Where the presentation of the frame was triggered from + PresentReason reason = PresentReason::Immediate; + std::vector<std::string_view> xfb_copy_hashes; }; |
