summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp19
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.h2
2 files changed, 1 insertions, 20 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 3c08ac9a3..6eee20efe 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -174,19 +174,8 @@ const VI::Layer* NVFlinger::FindLayer(u64 display_id, u64 layer_id) const {
174 174
175void NVFlinger::Compose() { 175void NVFlinger::Compose() {
176 for (auto& display : displays) { 176 for (auto& display : displays) {
177 bool trigger_event = false;
178 // Trigger vsync for this display at the end of drawing 177 // Trigger vsync for this display at the end of drawing
179 SCOPE_EXIT({ 178 SCOPE_EXIT({ display.SignalVSyncEvent(); });
180 // TODO(Blinkhawk): Correctly send buffers through nvflinger while
181 // loading the game thorugh the OS.
182 // During loading, the OS takes care of sending buffers to vsync,
183 // thus it triggers, since this is not properly emulated due to
184 // HLE complications, we allow it to signal until the game enqueues
185 // it's first buffer.
186 if (trigger_event || !first_buffer_enqueued) {
187 display.SignalVSyncEvent();
188 }
189 });
190 179
191 // Don't do anything for displays without layers. 180 // Don't do anything for displays without layers.
192 if (!display.HasLayers()) 181 if (!display.HasLayers())
@@ -202,16 +191,10 @@ void NVFlinger::Compose() {
202 MicroProfileFlip(); 191 MicroProfileFlip();
203 192
204 if (!buffer) { 193 if (!buffer) {
205 // There was no queued buffer to draw, render previous frame
206 auto& gpu = system.GPU();
207 // Always trigger on sync GPU.
208 trigger_event = !gpu.IsAsync();
209 continue; 194 continue;
210 } 195 }
211 196
212 const auto& igbp_buffer = buffer->get().igbp_buffer; 197 const auto& igbp_buffer = buffer->get().igbp_buffer;
213 trigger_event = true;
214 first_buffer_enqueued = true;
215 198
216 const auto& gpu = system.GPU(); 199 const auto& gpu = system.GPU();
217 const auto& multi_fence = buffer->get().multi_fence; 200 const auto& multi_fence = buffer->get().multi_fence;
diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h
index 95d7278f5..5d7e3bfb8 100644
--- a/src/core/hle/service/nvflinger/nvflinger.h
+++ b/src/core/hle/service/nvflinger/nvflinger.h
@@ -102,8 +102,6 @@ private:
102 102
103 u32 swap_interval = 1; 103 u32 swap_interval = 1;
104 104
105 bool first_buffer_enqueued{};
106
107 /// Event that handles screen composition. 105 /// Event that handles screen composition.
108 Core::Timing::EventType* composition_event; 106 Core::Timing::EventType* composition_event;
109 107