aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu_neon
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gpu_neon')
-rw-r--r--plugins/gpu_neon/gpu.c2
-rw-r--r--plugins/gpu_neon/gpu.h1
-rw-r--r--plugins/gpu_neon/vout_fb.c22
3 files changed, 16 insertions, 9 deletions
diff --git a/plugins/gpu_neon/gpu.c b/plugins/gpu_neon/gpu.c
index 5bd4151..2db4379 100644
--- a/plugins/gpu_neon/gpu.c
+++ b/plugins/gpu_neon/gpu.c
@@ -113,7 +113,7 @@ void GPUwriteStatus(uint32_t data)
uint32_t cmd = data >> 24;
if (cmd < ARRAY_SIZE(gpu.regs)) {
- if (cmd != 0 && gpu.regs[cmd] == data)
+ if (cmd != 0 && cmd != 5 && gpu.regs[cmd] == data)
return;
gpu.regs[cmd] = data;
}
diff --git a/plugins/gpu_neon/gpu.h b/plugins/gpu_neon/gpu.h
index 033581e..cc202c5 100644
--- a/plugins/gpu_neon/gpu.h
+++ b/plugins/gpu_neon/gpu.h
@@ -74,6 +74,7 @@ struct psx_gpu {
uint32_t enabled:1;
uint32_t active:1;
uint32_t frame_ready:1;
+ uint32_t skipped_blits:5;
const int *advice;
} frameskip;
};
diff --git a/plugins/gpu_neon/vout_fb.c b/plugins/gpu_neon/vout_fb.c
index b7cb41b..1dfa8ab 100644
--- a/plugins/gpu_neon/vout_fb.c
+++ b/plugins/gpu_neon/vout_fb.c
@@ -81,20 +81,29 @@ static void blit(void)
void GPUupdateLace(void)
{
- if (gpu.frameskip.enabled && !gpu.frameskip.frame_ready)
+ if (gpu.status.blanking || !gpu.state.fb_dirty)
return;
- if (!gpu.status.blanking && gpu.state.fb_dirty) {
- renderer_flush_queues();
- blit();
- gpu.state.fb_dirty = 0;
+ if (gpu.frameskip.enabled) {
+ if (!gpu.frameskip.frame_ready && gpu.frameskip.skipped_blits < 6) {
+ gpu.frameskip.skipped_blits++;
+ return;
+ }
+ gpu.frameskip.frame_ready = 0;
+ gpu.frameskip.skipped_blits = 0;
}
+
+ renderer_flush_queues();
+ blit();
+ gpu.state.fb_dirty = 0;
}
long GPUopen(void)
{
gpu.frameskip.enabled = cbs->frameskip;
gpu.frameskip.advice = &cbs->fskip_advice;
+ gpu.frameskip.active = 0;
+ gpu.frameskip.frame_ready = 1;
cbs->pl_vout_open();
screen_buf = cbs->pl_vout_flip();
@@ -110,9 +119,6 @@ long GPUclose(void)
void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_)
{
cbs = cbs_;
- gpu.frameskip.enabled = cbs->frameskip;
- gpu.frameskip.advice = &cbs->fskip_advice;
- gpu.frameskip.active = gpu.frameskip.frame_ready = 0;
}
// vim:shiftwidth=2:expandtab