summaryrefslogtreecommitdiff
path: root/src/core/hw/gpu.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2015-01-05 15:51:36 -0500
committerGravatar bunnei2015-01-05 15:51:36 -0500
commit4828d0b7afabc4fcc9588b033135ab3a45d61cfa (patch)
treecf080db65388f4650878922e7e71eb7ee527e3f8 /src/core/hw/gpu.cpp
parentMerge pull request #420 from lioncash/qflag (diff)
parentDSP: Signal (faked) interrupt on every frame. (diff)
downloadyuzu-4828d0b7afabc4fcc9588b033135ab3a45d61cfa.tar.gz
yuzu-4828d0b7afabc4fcc9588b033135ab3a45d61cfa.tar.xz
yuzu-4828d0b7afabc4fcc9588b033135ab3a45d61cfa.zip
Merge pull request #416 from bunnei/fake-dsp-interrupt
DSP: Signal (faked) interrupt on every frame.
Diffstat (limited to 'src/core/hw/gpu.cpp')
-rw-r--r--src/core/hw/gpu.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 0ff6c6cde..e346e0ad6 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -10,6 +10,7 @@
10 10
11#include "core/hle/hle.h" 11#include "core/hle/hle.h"
12#include "core/hle/service/gsp_gpu.h" 12#include "core/hle/service/gsp_gpu.h"
13#include "core/hle/service/dsp_dsp.h"
13 14
14#include "core/hw/gpu.h" 15#include "core/hw/gpu.h"
15 16
@@ -214,13 +215,18 @@ void Update() {
214 // - If frameskip == 0 (disabled), always swap buffers 215 // - If frameskip == 0 (disabled), always swap buffers
215 // - If frameskip == 1, swap buffers every other frame (starting from the first frame) 216 // - If frameskip == 1, swap buffers every other frame (starting from the first frame)
216 // - If frameskip > 1, swap buffers every frameskip^n frames (starting from the second frame) 217 // - If frameskip > 1, swap buffers every frameskip^n frames (starting from the second frame)
217
218 if ((((Settings::values.frame_skip != 1) ^ last_skip_frame) && last_skip_frame != g_skip_frame) || 218 if ((((Settings::values.frame_skip != 1) ^ last_skip_frame) && last_skip_frame != g_skip_frame) ||
219 Settings::values.frame_skip == 0) { 219 Settings::values.frame_skip == 0) {
220 VideoCore::g_renderer->SwapBuffers(); 220 VideoCore::g_renderer->SwapBuffers();
221 } 221 }
222 222
223 // Signal to GSP that GPU interrupt has occurred
223 GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC1); 224 GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC1);
225
226 // TODO(bunnei): Fake a DSP interrupt on each frame. This does not belong here, but
227 // until we can emulate DSP interrupts, this is probably the only reasonable place to do
228 // this. Certain games expect this to be periodically signaled.
229 DSP_DSP::SignalInterrupt();
224 } 230 }
225 } 231 }
226} 232}