VideoCommon: Reduce padding in PresentInfo

This makes the struct 8 bytes smaller.
This commit is contained in:
JosJuice
2026-06-19 11:37:04 +02:00
parent d8d37fdbc4
commit 5f372d6b1d
2 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -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();
+25 -25
View File
@@ -16,31 +16,6 @@ class System;
struct PresentInfo
{
enum class PresentReason
{
Immediate, // FIFO is Presenting the XFB immediately, straight after the XFB copy
VideoInterface, // VideoInterface has triggered a present with a new frame
VideoInterfaceDuplicate, // VideoInterface has triggered a present with a duplicate frame
};
// The number of (unique) frames since the emulated console booted
u64 frame_count = 0;
// The number of presents since the video backend was initialized.
// 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;
TimePoint intended_present_time{};
// 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
@@ -58,9 +33,34 @@ struct PresentInfo
Unimplemented,
};
enum class PresentReason
{
Immediate, // FIFO is Presenting the XFB immediately, straight after the XFB copy
VideoInterface, // VideoInterface has triggered a present with a new frame
VideoInterfaceDuplicate, // VideoInterface has triggered a present with a duplicate frame
};
// The number of (unique) frames since the emulated console booted
u64 frame_count = 0;
// The number of presents since the video backend was initialized.
// never goes backwards.
u64 present_count = 0;
// The exact emulated time of the when real hardware would have presented this frame
u64 emulated_timestamp = 0;
TimePoint intended_present_time{};
// AfterPresent only: The actual time the frame was presented
TimePoint actual_present_time{};
// 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;
};