mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 02:32:46 +01:00
NVFlinger: Reverse the change that only signaled events on buffer acquire.
This has been hardware tested and it seems that NVFlinger will still signal even if there are no buffers to present.
This commit is contained in:
parent
ffc2ce89a0
commit
782b7a0ca4
2 changed files with 1 additions and 20 deletions
|
@ -174,19 +174,8 @@ const VI::Layer* NVFlinger::FindLayer(u64 display_id, u64 layer_id) const {
|
||||||
|
|
||||||
void NVFlinger::Compose() {
|
void NVFlinger::Compose() {
|
||||||
for (auto& display : displays) {
|
for (auto& display : displays) {
|
||||||
bool trigger_event = false;
|
|
||||||
// Trigger vsync for this display at the end of drawing
|
// Trigger vsync for this display at the end of drawing
|
||||||
SCOPE_EXIT({
|
SCOPE_EXIT({ display.SignalVSyncEvent(); });
|
||||||
// TODO(Blinkhawk): Correctly send buffers through nvflinger while
|
|
||||||
// loading the game thorugh the OS.
|
|
||||||
// During loading, the OS takes care of sending buffers to vsync,
|
|
||||||
// thus it triggers, since this is not properly emulated due to
|
|
||||||
// HLE complications, we allow it to signal until the game enqueues
|
|
||||||
// it's first buffer.
|
|
||||||
if (trigger_event || !first_buffer_enqueued) {
|
|
||||||
display.SignalVSyncEvent();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Don't do anything for displays without layers.
|
// Don't do anything for displays without layers.
|
||||||
if (!display.HasLayers())
|
if (!display.HasLayers())
|
||||||
|
@ -202,16 +191,10 @@ void NVFlinger::Compose() {
|
||||||
MicroProfileFlip();
|
MicroProfileFlip();
|
||||||
|
|
||||||
if (!buffer) {
|
if (!buffer) {
|
||||||
// There was no queued buffer to draw, render previous frame
|
|
||||||
auto& gpu = system.GPU();
|
|
||||||
// Always trigger on sync GPU.
|
|
||||||
trigger_event = !gpu.IsAsync();
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& igbp_buffer = buffer->get().igbp_buffer;
|
const auto& igbp_buffer = buffer->get().igbp_buffer;
|
||||||
trigger_event = true;
|
|
||||||
first_buffer_enqueued = true;
|
|
||||||
|
|
||||||
const auto& gpu = system.GPU();
|
const auto& gpu = system.GPU();
|
||||||
const auto& multi_fence = buffer->get().multi_fence;
|
const auto& multi_fence = buffer->get().multi_fence;
|
||||||
|
|
|
@ -102,8 +102,6 @@ private:
|
||||||
|
|
||||||
u32 swap_interval = 1;
|
u32 swap_interval = 1;
|
||||||
|
|
||||||
bool first_buffer_enqueued{};
|
|
||||||
|
|
||||||
/// Event that handles screen composition.
|
/// Event that handles screen composition.
|
||||||
Core::Timing::EventType* composition_event;
|
Core::Timing::EventType* composition_event;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue