VideoCommon: Reduce padding in PresentInfo
This makes the struct 8 bytes smaller.
This commit is contained in:
1 parent
d8d37fdbc4
commit
5f372d6b1d
2 files changed
+26
-26
No files matched your search
@@ -234,9 +234,9 @@ void Presenter::ImmediateSwap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_
|
|||||||
PresentInfo present_info{
|
PresentInfo present_info{
|
||||||
.frame_count = m_frame_count++,
|
.frame_count = m_frame_count++,
|
||||||
.present_count = m_present_count++,
|
.present_count = m_present_count++,
|
||||||
.reason = PresentInfo::PresentReason::Immediate,
|
|
||||||
.emulated_timestamp = ticks,
|
.emulated_timestamp = ticks,
|
||||||
.intended_present_time = m_next_swap_estimated_time,
|
.intended_present_time = m_next_swap_estimated_time,
|
||||||
|
.reason = PresentInfo::PresentReason::Immediate,
|
||||||
};
|
};
|
||||||
|
|
||||||
auto& video_events = GetVideoEvents();
|
auto& video_events = GetVideoEvents();
|
||||||
|
|||||||
@@ -16,31 +16,6 @@ class System;
|
|||||||
|
|
||||||
struct PresentInfo
|
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
|
enum class PresentTimeAccuracy
|
||||||
{
|
{
|
||||||
// The Driver/OS has given us an exact timestamp of when the first line of the frame started
|
// 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,
|
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
|
// Accuracy of actual_present_time
|
||||||
PresentTimeAccuracy present_time_accuracy = PresentTimeAccuracy::Unimplemented;
|
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;
|
std::vector<std::string_view> xfb_copy_hashes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user